Lines Matching refs:buf
32 const char *buf, size_t len, in store_bridge_parm() argument
45 val = simple_strtoul(buf, &endp, 0); in store_bridge_parm()
46 if (endp == buf) in store_bridge_parm()
68 struct device_attribute *attr, char *buf) in forward_delay_show() argument
71 return sprintf(buf, "%lu\n", jiffies_to_clock_t(br->forward_delay)); in forward_delay_show()
82 const char *buf, size_t len) in forward_delay_store() argument
84 return store_bridge_parm(d, buf, len, set_forward_delay); in forward_delay_store()
89 char *buf) in hello_time_show() argument
91 return sprintf(buf, "%lu\n", in hello_time_show()
102 struct device_attribute *attr, const char *buf, in hello_time_store() argument
105 return store_bridge_parm(d, buf, len, set_hello_time); in hello_time_store()
110 char *buf) in max_age_show() argument
112 return sprintf(buf, "%lu\n", in max_age_show()
123 const char *buf, size_t len) in max_age_store() argument
125 return store_bridge_parm(d, buf, len, set_max_age); in max_age_store()
130 struct device_attribute *attr, char *buf) in ageing_time_show() argument
133 return sprintf(buf, "%lu\n", jiffies_to_clock_t(br->ageing_time)); in ageing_time_show()
144 const char *buf, size_t len) in ageing_time_store() argument
146 return store_bridge_parm(d, buf, len, set_ageing_time); in ageing_time_store()
151 struct device_attribute *attr, char *buf) in stp_state_show() argument
154 return sprintf(buf, "%d\n", br->stp_enabled); in stp_state_show()
165 struct device_attribute *attr, const char *buf, in stp_state_store() argument
168 return store_bridge_parm(d, buf, len, set_stp_state); in stp_state_store()
174 char *buf) in group_fwd_mask_show() argument
177 return sprintf(buf, "%#x\n", br->group_fwd_mask); in group_fwd_mask_show()
193 const char *buf, in group_fwd_mask_store() argument
196 return store_bridge_parm(d, buf, len, set_group_fwd_mask); in group_fwd_mask_store()
201 char *buf) in priority_show() argument
204 return sprintf(buf, "%d\n", in priority_show()
216 const char *buf, size_t len) in priority_store() argument
218 return store_bridge_parm(d, buf, len, set_priority); in priority_store()
223 char *buf) in root_id_show() argument
225 return br_show_bridge_id(buf, &to_bridge(d)->designated_root); in root_id_show()
230 char *buf) in bridge_id_show() argument
232 return br_show_bridge_id(buf, &to_bridge(d)->bridge_id); in bridge_id_show()
237 char *buf) in root_port_show() argument
239 return sprintf(buf, "%d\n", to_bridge(d)->root_port); in root_port_show()
244 struct device_attribute *attr, char *buf) in root_path_cost_show() argument
246 return sprintf(buf, "%d\n", to_bridge(d)->root_path_cost); in root_path_cost_show()
251 struct device_attribute *attr, char *buf) in topology_change_show() argument
253 return sprintf(buf, "%d\n", to_bridge(d)->topology_change); in topology_change_show()
259 char *buf) in topology_change_detected_show() argument
262 return sprintf(buf, "%d\n", br->topology_change_detected); in topology_change_detected_show()
267 struct device_attribute *attr, char *buf) in hello_timer_show() argument
270 return sprintf(buf, "%ld\n", br_timer_value(&br->hello_timer)); in hello_timer_show()
275 char *buf) in tcn_timer_show() argument
278 return sprintf(buf, "%ld\n", br_timer_value(&br->tcn_timer)); in tcn_timer_show()
284 char *buf) in topology_change_timer_show() argument
287 return sprintf(buf, "%ld\n", br_timer_value(&br->topology_change_timer)); in topology_change_timer_show()
292 char *buf) in gc_timer_show() argument
295 return sprintf(buf, "%ld\n", br_timer_value(&br->gc_work.timer)); in gc_timer_show()
300 struct device_attribute *attr, char *buf) in group_addr_show() argument
303 return sprintf(buf, "%pM\n", br->group_addr); in group_addr_show()
308 const char *buf, size_t len) in group_addr_store() argument
316 if (!mac_pton(buf, new_addr)) in group_addr_store()
354 const char *buf, size_t len) in flush_store() argument
356 return store_bridge_parm(d, buf, len, set_flush); in flush_store()
362 char *buf) in no_linklocal_learn_show() argument
365 return sprintf(buf, "%d\n", br_boolopt_get(br, BR_BOOLOPT_NO_LL_LEARN)); in no_linklocal_learn_show()
376 const char *buf, size_t len) in no_linklocal_learn_store() argument
378 return store_bridge_parm(d, buf, len, set_no_linklocal_learn); in no_linklocal_learn_store()
384 struct device_attribute *attr, char *buf) in multicast_router_show() argument
387 return sprintf(buf, "%d\n", br->multicast_ctx.multicast_router); in multicast_router_show()
398 const char *buf, size_t len) in multicast_router_store() argument
400 return store_bridge_parm(d, buf, len, set_multicast_router); in multicast_router_store()
406 char *buf) in multicast_snooping_show() argument
409 return sprintf(buf, "%d\n", br_opt_get(br, BROPT_MULTICAST_ENABLED)); in multicast_snooping_show()
414 const char *buf, size_t len) in multicast_snooping_store() argument
416 return store_bridge_parm(d, buf, len, br_multicast_toggle); in multicast_snooping_store()
422 char *buf) in multicast_query_use_ifaddr_show() argument
425 return sprintf(buf, "%d\n", in multicast_query_use_ifaddr_show()
439 const char *buf, size_t len) in multicast_query_use_ifaddr_store() argument
441 return store_bridge_parm(d, buf, len, set_query_use_ifaddr); in multicast_query_use_ifaddr_store()
447 char *buf) in multicast_querier_show() argument
450 return sprintf(buf, "%d\n", br->multicast_ctx.multicast_querier); in multicast_querier_show()
461 const char *buf, size_t len) in multicast_querier_store() argument
463 return store_bridge_parm(d, buf, len, set_multicast_querier); in multicast_querier_store()
468 struct device_attribute *attr, char *buf) in hash_elasticity_show() argument
470 return sprintf(buf, "%u\n", RHT_ELASTICITY); in hash_elasticity_show()
484 const char *buf, size_t len) in hash_elasticity_store() argument
486 return store_bridge_parm(d, buf, len, set_elasticity); in hash_elasticity_store()
491 char *buf) in hash_max_show() argument
494 return sprintf(buf, "%u\n", br->hash_max); in hash_max_show()
505 const char *buf, size_t len) in hash_max_store() argument
507 return store_bridge_parm(d, buf, len, set_hash_max); in hash_max_store()
513 char *buf) in multicast_igmp_version_show() argument
517 return sprintf(buf, "%u\n", br->multicast_ctx.multicast_igmp_version); in multicast_igmp_version_show()
528 const char *buf, size_t len) in multicast_igmp_version_store() argument
530 return store_bridge_parm(d, buf, len, set_multicast_igmp_version); in multicast_igmp_version_store()
536 char *buf) in multicast_last_member_count_show() argument
539 return sprintf(buf, "%u\n", br->multicast_ctx.multicast_last_member_count); in multicast_last_member_count_show()
551 const char *buf, size_t len) in multicast_last_member_count_store() argument
553 return store_bridge_parm(d, buf, len, set_last_member_count); in multicast_last_member_count_store()
558 struct device *d, struct device_attribute *attr, char *buf) in multicast_startup_query_count_show() argument
561 return sprintf(buf, "%u\n", br->multicast_ctx.multicast_startup_query_count); in multicast_startup_query_count_show()
572 struct device *d, struct device_attribute *attr, const char *buf, in multicast_startup_query_count_store() argument
575 return store_bridge_parm(d, buf, len, set_startup_query_count); in multicast_startup_query_count_store()
580 struct device *d, struct device_attribute *attr, char *buf) in multicast_last_member_interval_show() argument
583 return sprintf(buf, "%lu\n", in multicast_last_member_interval_show()
595 struct device *d, struct device_attribute *attr, const char *buf, in multicast_last_member_interval_store() argument
598 return store_bridge_parm(d, buf, len, set_last_member_interval); in multicast_last_member_interval_store()
603 struct device *d, struct device_attribute *attr, char *buf) in multicast_membership_interval_show() argument
606 return sprintf(buf, "%lu\n", in multicast_membership_interval_show()
618 struct device *d, struct device_attribute *attr, const char *buf, in multicast_membership_interval_store() argument
621 return store_bridge_parm(d, buf, len, set_membership_interval); in multicast_membership_interval_store()
627 char *buf) in multicast_querier_interval_show() argument
630 return sprintf(buf, "%lu\n", in multicast_querier_interval_show()
643 const char *buf, size_t len) in multicast_querier_interval_store() argument
645 return store_bridge_parm(d, buf, len, set_querier_interval); in multicast_querier_interval_store()
651 char *buf) in multicast_query_interval_show() argument
654 return sprintf(buf, "%lu\n", in multicast_query_interval_show()
667 const char *buf, size_t len) in multicast_query_interval_store() argument
669 return store_bridge_parm(d, buf, len, set_query_interval); in multicast_query_interval_store()
674 struct device *d, struct device_attribute *attr, char *buf) in multicast_query_response_interval_show() argument
678 buf, "%lu\n", in multicast_query_response_interval_show()
690 struct device *d, struct device_attribute *attr, const char *buf, in multicast_query_response_interval_store() argument
693 return store_bridge_parm(d, buf, len, set_query_response_interval); in multicast_query_response_interval_store()
698 struct device *d, struct device_attribute *attr, char *buf) in multicast_startup_query_interval_show() argument
702 buf, "%lu\n", in multicast_startup_query_interval_show()
714 struct device *d, struct device_attribute *attr, const char *buf, in multicast_startup_query_interval_store() argument
717 return store_bridge_parm(d, buf, len, set_startup_query_interval); in multicast_startup_query_interval_store()
723 char *buf) in multicast_stats_enabled_show() argument
727 return sprintf(buf, "%d\n", in multicast_stats_enabled_show()
740 const char *buf, in multicast_stats_enabled_store() argument
743 return store_bridge_parm(d, buf, len, set_stats_enabled); in multicast_stats_enabled_store()
750 char *buf) in multicast_mld_version_show() argument
754 return sprintf(buf, "%u\n", br->multicast_ctx.multicast_mld_version); in multicast_mld_version_show()
765 const char *buf, size_t len) in multicast_mld_version_store() argument
767 return store_bridge_parm(d, buf, len, set_multicast_mld_version); in multicast_mld_version_store()
774 struct device *d, struct device_attribute *attr, char *buf) in nf_call_iptables_show() argument
777 return sprintf(buf, "%u\n", br_opt_get(br, BROPT_NF_CALL_IPTABLES)); in nf_call_iptables_show()
788 struct device *d, struct device_attribute *attr, const char *buf, in nf_call_iptables_store() argument
791 return store_bridge_parm(d, buf, len, set_nf_call_iptables); in nf_call_iptables_store()
796 struct device *d, struct device_attribute *attr, char *buf) in nf_call_ip6tables_show() argument
799 return sprintf(buf, "%u\n", br_opt_get(br, BROPT_NF_CALL_IP6TABLES)); in nf_call_ip6tables_show()
810 struct device *d, struct device_attribute *attr, const char *buf, in nf_call_ip6tables_store() argument
813 return store_bridge_parm(d, buf, len, set_nf_call_ip6tables); in nf_call_ip6tables_store()
818 struct device *d, struct device_attribute *attr, char *buf) in nf_call_arptables_show() argument
821 return sprintf(buf, "%u\n", br_opt_get(br, BROPT_NF_CALL_ARPTABLES)); in nf_call_arptables_show()
832 struct device *d, struct device_attribute *attr, const char *buf, in nf_call_arptables_store() argument
835 return store_bridge_parm(d, buf, len, set_nf_call_arptables); in nf_call_arptables_store()
842 char *buf) in vlan_filtering_show() argument
845 return sprintf(buf, "%d\n", br_opt_get(br, BROPT_VLAN_ENABLED)); in vlan_filtering_show()
850 const char *buf, size_t len) in vlan_filtering_store() argument
852 return store_bridge_parm(d, buf, len, br_vlan_filter_toggle); in vlan_filtering_store()
858 char *buf) in vlan_protocol_show() argument
861 return sprintf(buf, "%#06x\n", ntohs(br->vlan_proto)); in vlan_protocol_show()
866 const char *buf, size_t len) in vlan_protocol_store() argument
868 return store_bridge_parm(d, buf, len, br_vlan_set_proto); in vlan_protocol_store()
874 char *buf) in default_pvid_show() argument
877 return sprintf(buf, "%d\n", br->default_pvid); in default_pvid_show()
882 const char *buf, size_t len) in default_pvid_store() argument
884 return store_bridge_parm(d, buf, len, br_vlan_set_default_pvid); in default_pvid_store()
890 char *buf) in vlan_stats_enabled_show() argument
893 return sprintf(buf, "%u\n", br_opt_get(br, BROPT_VLAN_STATS_ENABLED)); in vlan_stats_enabled_show()
904 const char *buf, size_t len) in vlan_stats_enabled_store() argument
906 return store_bridge_parm(d, buf, len, set_vlan_stats_enabled); in vlan_stats_enabled_store()
912 char *buf) in vlan_stats_per_port_show() argument
915 return sprintf(buf, "%u\n", br_opt_get(br, BROPT_VLAN_STATS_PER_PORT)); in vlan_stats_per_port_show()
926 const char *buf, size_t len) in vlan_stats_per_port_store() argument
928 return store_bridge_parm(d, buf, len, set_vlan_stats_per_port); in vlan_stats_per_port_store()
1003 char *buf, loff_t off, size_t count) in brforward_read() argument
1013 n = br_fdb_fillbuf(br, buf, in brforward_read()