Lines Matching refs:buf
28 const char *buf, size_t len, in store_bridge_parm() argument
39 val = simple_strtoul(buf, &endp, 0); in store_bridge_parm()
40 if (endp == buf) in store_bridge_parm()
56 struct device_attribute *attr, char *buf) in forward_delay_show() argument
59 return sprintf(buf, "%lu\n", jiffies_to_clock_t(br->forward_delay)); in forward_delay_show()
64 const char *buf, size_t len) in forward_delay_store() argument
66 return store_bridge_parm(d, buf, len, br_set_forward_delay); in forward_delay_store()
71 char *buf) in hello_time_show() argument
73 return sprintf(buf, "%lu\n", in hello_time_show()
78 struct device_attribute *attr, const char *buf, in hello_time_store() argument
81 return store_bridge_parm(d, buf, len, br_set_hello_time); in hello_time_store()
86 char *buf) in max_age_show() argument
88 return sprintf(buf, "%lu\n", in max_age_show()
93 const char *buf, size_t len) in max_age_store() argument
95 return store_bridge_parm(d, buf, len, br_set_max_age); in max_age_store()
100 struct device_attribute *attr, char *buf) in ageing_time_show() argument
103 return sprintf(buf, "%lu\n", jiffies_to_clock_t(br->ageing_time)); in ageing_time_show()
113 const char *buf, size_t len) in ageing_time_store() argument
115 return store_bridge_parm(d, buf, len, set_ageing_time); in ageing_time_store()
120 struct device_attribute *attr, char *buf) in stp_state_show() argument
123 return sprintf(buf, "%d\n", br->stp_enabled); in stp_state_show()
133 struct device_attribute *attr, const char *buf, in stp_state_store() argument
136 return store_bridge_parm(d, buf, len, set_stp_state); in stp_state_store()
142 char *buf) in group_fwd_mask_show() argument
145 return sprintf(buf, "%#x\n", br->group_fwd_mask); in group_fwd_mask_show()
160 const char *buf, in group_fwd_mask_store() argument
163 return store_bridge_parm(d, buf, len, set_group_fwd_mask); in group_fwd_mask_store()
168 char *buf) in priority_show() argument
171 return sprintf(buf, "%d\n", in priority_show()
182 const char *buf, size_t len) in priority_store() argument
184 return store_bridge_parm(d, buf, len, set_priority); in priority_store()
189 char *buf) in root_id_show() argument
191 return br_show_bridge_id(buf, &to_bridge(d)->designated_root); in root_id_show()
196 char *buf) in bridge_id_show() argument
198 return br_show_bridge_id(buf, &to_bridge(d)->bridge_id); in bridge_id_show()
203 char *buf) in root_port_show() argument
205 return sprintf(buf, "%d\n", to_bridge(d)->root_port); in root_port_show()
210 struct device_attribute *attr, char *buf) in root_path_cost_show() argument
212 return sprintf(buf, "%d\n", to_bridge(d)->root_path_cost); in root_path_cost_show()
217 struct device_attribute *attr, char *buf) in topology_change_show() argument
219 return sprintf(buf, "%d\n", to_bridge(d)->topology_change); in topology_change_show()
225 char *buf) in topology_change_detected_show() argument
228 return sprintf(buf, "%d\n", br->topology_change_detected); in topology_change_detected_show()
233 struct device_attribute *attr, char *buf) in hello_timer_show() argument
236 return sprintf(buf, "%ld\n", br_timer_value(&br->hello_timer)); in hello_timer_show()
241 char *buf) in tcn_timer_show() argument
244 return sprintf(buf, "%ld\n", br_timer_value(&br->tcn_timer)); in tcn_timer_show()
250 char *buf) in topology_change_timer_show() argument
253 return sprintf(buf, "%ld\n", br_timer_value(&br->topology_change_timer)); in topology_change_timer_show()
258 char *buf) in gc_timer_show() argument
261 return sprintf(buf, "%ld\n", br_timer_value(&br->gc_work.timer)); in gc_timer_show()
266 struct device_attribute *attr, char *buf) in group_addr_show() argument
269 return sprintf(buf, "%pM\n", br->group_addr); in group_addr_show()
274 const char *buf, size_t len) in group_addr_store() argument
282 if (!mac_pton(buf, new_addr)) in group_addr_store()
319 const char *buf, size_t len) in flush_store() argument
321 return store_bridge_parm(d, buf, len, set_flush); in flush_store()
327 char *buf) in no_linklocal_learn_show() argument
330 return sprintf(buf, "%d\n", br_boolopt_get(br, BR_BOOLOPT_NO_LL_LEARN)); in no_linklocal_learn_show()
340 const char *buf, size_t len) in no_linklocal_learn_store() argument
342 return store_bridge_parm(d, buf, len, set_no_linklocal_learn); in no_linklocal_learn_store()
348 struct device_attribute *attr, char *buf) in multicast_router_show() argument
351 return sprintf(buf, "%d\n", br->multicast_router); in multicast_router_show()
356 const char *buf, size_t len) in multicast_router_store() argument
358 return store_bridge_parm(d, buf, len, br_multicast_set_router); in multicast_router_store()
364 char *buf) in multicast_snooping_show() argument
367 return sprintf(buf, "%d\n", br_opt_get(br, BROPT_MULTICAST_ENABLED)); in multicast_snooping_show()
372 const char *buf, size_t len) in multicast_snooping_store() argument
374 return store_bridge_parm(d, buf, len, br_multicast_toggle); in multicast_snooping_store()
380 char *buf) in multicast_query_use_ifaddr_show() argument
383 return sprintf(buf, "%d\n", in multicast_query_use_ifaddr_show()
396 const char *buf, size_t len) in multicast_query_use_ifaddr_store() argument
398 return store_bridge_parm(d, buf, len, set_query_use_ifaddr); in multicast_query_use_ifaddr_store()
404 char *buf) in multicast_querier_show() argument
407 return sprintf(buf, "%d\n", br_opt_get(br, BROPT_MULTICAST_QUERIER)); in multicast_querier_show()
412 const char *buf, size_t len) in multicast_querier_store() argument
414 return store_bridge_parm(d, buf, len, br_multicast_set_querier); in multicast_querier_store()
419 struct device_attribute *attr, char *buf) in hash_elasticity_show() argument
421 return sprintf(buf, "%u\n", RHT_ELASTICITY); in hash_elasticity_show()
433 const char *buf, size_t len) in hash_elasticity_store() argument
435 return store_bridge_parm(d, buf, len, set_elasticity); in hash_elasticity_store()
440 char *buf) in hash_max_show() argument
443 return sprintf(buf, "%u\n", br->hash_max); in hash_max_show()
453 const char *buf, size_t len) in hash_max_store() argument
455 return store_bridge_parm(d, buf, len, set_hash_max); in hash_max_store()
461 char *buf) in multicast_igmp_version_show() argument
465 return sprintf(buf, "%u\n", br->multicast_igmp_version); in multicast_igmp_version_show()
470 const char *buf, size_t len) in multicast_igmp_version_store() argument
472 return store_bridge_parm(d, buf, len, br_multicast_set_igmp_version); in multicast_igmp_version_store()
478 char *buf) in multicast_last_member_count_show() argument
481 return sprintf(buf, "%u\n", br->multicast_last_member_count); in multicast_last_member_count_show()
492 const char *buf, size_t len) in multicast_last_member_count_store() argument
494 return store_bridge_parm(d, buf, len, set_last_member_count); in multicast_last_member_count_store()
499 struct device *d, struct device_attribute *attr, char *buf) in multicast_startup_query_count_show() argument
502 return sprintf(buf, "%u\n", br->multicast_startup_query_count); in multicast_startup_query_count_show()
512 struct device *d, struct device_attribute *attr, const char *buf, in multicast_startup_query_count_store() argument
515 return store_bridge_parm(d, buf, len, set_startup_query_count); in multicast_startup_query_count_store()
520 struct device *d, struct device_attribute *attr, char *buf) in multicast_last_member_interval_show() argument
523 return sprintf(buf, "%lu\n", in multicast_last_member_interval_show()
534 struct device *d, struct device_attribute *attr, const char *buf, in multicast_last_member_interval_store() argument
537 return store_bridge_parm(d, buf, len, set_last_member_interval); in multicast_last_member_interval_store()
542 struct device *d, struct device_attribute *attr, char *buf) in multicast_membership_interval_show() argument
545 return sprintf(buf, "%lu\n", in multicast_membership_interval_show()
556 struct device *d, struct device_attribute *attr, const char *buf, in multicast_membership_interval_store() argument
559 return store_bridge_parm(d, buf, len, set_membership_interval); in multicast_membership_interval_store()
565 char *buf) in multicast_querier_interval_show() argument
568 return sprintf(buf, "%lu\n", in multicast_querier_interval_show()
580 const char *buf, size_t len) in multicast_querier_interval_store() argument
582 return store_bridge_parm(d, buf, len, set_querier_interval); in multicast_querier_interval_store()
588 char *buf) in multicast_query_interval_show() argument
591 return sprintf(buf, "%lu\n", in multicast_query_interval_show()
603 const char *buf, size_t len) in multicast_query_interval_store() argument
605 return store_bridge_parm(d, buf, len, set_query_interval); in multicast_query_interval_store()
610 struct device *d, struct device_attribute *attr, char *buf) in multicast_query_response_interval_show() argument
614 buf, "%lu\n", in multicast_query_response_interval_show()
625 struct device *d, struct device_attribute *attr, const char *buf, in multicast_query_response_interval_store() argument
628 return store_bridge_parm(d, buf, len, set_query_response_interval); in multicast_query_response_interval_store()
633 struct device *d, struct device_attribute *attr, char *buf) in multicast_startup_query_interval_show() argument
637 buf, "%lu\n", in multicast_startup_query_interval_show()
648 struct device *d, struct device_attribute *attr, const char *buf, in multicast_startup_query_interval_store() argument
651 return store_bridge_parm(d, buf, len, set_startup_query_interval); in multicast_startup_query_interval_store()
657 char *buf) in multicast_stats_enabled_show() argument
661 return sprintf(buf, "%d\n", in multicast_stats_enabled_show()
673 const char *buf, in multicast_stats_enabled_store() argument
676 return store_bridge_parm(d, buf, len, set_stats_enabled); in multicast_stats_enabled_store()
683 char *buf) in multicast_mld_version_show() argument
687 return sprintf(buf, "%u\n", br->multicast_mld_version); in multicast_mld_version_show()
692 const char *buf, size_t len) in multicast_mld_version_store() argument
694 return store_bridge_parm(d, buf, len, br_multicast_set_mld_version); in multicast_mld_version_store()
701 struct device *d, struct device_attribute *attr, char *buf) in nf_call_iptables_show() argument
704 return sprintf(buf, "%u\n", br_opt_get(br, BROPT_NF_CALL_IPTABLES)); in nf_call_iptables_show()
714 struct device *d, struct device_attribute *attr, const char *buf, in nf_call_iptables_store() argument
717 return store_bridge_parm(d, buf, len, set_nf_call_iptables); in nf_call_iptables_store()
722 struct device *d, struct device_attribute *attr, char *buf) in nf_call_ip6tables_show() argument
725 return sprintf(buf, "%u\n", br_opt_get(br, BROPT_NF_CALL_IP6TABLES)); in nf_call_ip6tables_show()
735 struct device *d, struct device_attribute *attr, const char *buf, in nf_call_ip6tables_store() argument
738 return store_bridge_parm(d, buf, len, set_nf_call_ip6tables); in nf_call_ip6tables_store()
743 struct device *d, struct device_attribute *attr, char *buf) in nf_call_arptables_show() argument
746 return sprintf(buf, "%u\n", br_opt_get(br, BROPT_NF_CALL_ARPTABLES)); in nf_call_arptables_show()
756 struct device *d, struct device_attribute *attr, const char *buf, in nf_call_arptables_store() argument
759 return store_bridge_parm(d, buf, len, set_nf_call_arptables); in nf_call_arptables_store()
766 char *buf) in vlan_filtering_show() argument
769 return sprintf(buf, "%d\n", br_opt_get(br, BROPT_VLAN_ENABLED)); in vlan_filtering_show()
774 const char *buf, size_t len) in vlan_filtering_store() argument
776 return store_bridge_parm(d, buf, len, br_vlan_filter_toggle); in vlan_filtering_store()
782 char *buf) in vlan_protocol_show() argument
785 return sprintf(buf, "%#06x\n", ntohs(br->vlan_proto)); in vlan_protocol_show()
790 const char *buf, size_t len) in vlan_protocol_store() argument
792 return store_bridge_parm(d, buf, len, br_vlan_set_proto); in vlan_protocol_store()
798 char *buf) in default_pvid_show() argument
801 return sprintf(buf, "%d\n", br->default_pvid); in default_pvid_show()
806 const char *buf, size_t len) in default_pvid_store() argument
808 return store_bridge_parm(d, buf, len, br_vlan_set_default_pvid); in default_pvid_store()
814 char *buf) in vlan_stats_enabled_show() argument
817 return sprintf(buf, "%u\n", br_opt_get(br, BROPT_VLAN_STATS_ENABLED)); in vlan_stats_enabled_show()
822 const char *buf, size_t len) in vlan_stats_enabled_store() argument
824 return store_bridge_parm(d, buf, len, br_vlan_set_stats); in vlan_stats_enabled_store()
830 char *buf) in vlan_stats_per_port_show() argument
833 return sprintf(buf, "%u\n", br_opt_get(br, BROPT_VLAN_STATS_PER_PORT)); in vlan_stats_per_port_show()
838 const char *buf, size_t len) in vlan_stats_per_port_store() argument
840 return store_bridge_parm(d, buf, len, br_vlan_set_stats_per_port); in vlan_stats_per_port_store()
915 char *buf, loff_t off, size_t count) in brforward_read() argument
925 n = br_fdb_fillbuf(br, buf, in brforward_read()