1 /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
3 * Linux ethernet bridge
6 * Lennert Buytenhek <buytenh@gnu.org>
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version
11 * 2 of the License, or (at your option) any later version.
14 #ifndef _UAPI_LINUX_IF_BRIDGE_H
15 #define _UAPI_LINUX_IF_BRIDGE_H
17 #include <linux/types.h>
18 #include <linux/if_ether.h>
19 #include <linux/in6.h>
21 #define SYSFS_BRIDGE_ATTR "bridge"
22 #define SYSFS_BRIDGE_FDB "brforward"
23 #define SYSFS_BRIDGE_PORT_SUBDIR "brif"
24 #define SYSFS_BRIDGE_PORT_ATTR "brport"
25 #define SYSFS_BRIDGE_PORT_LINK "bridge"
27 #define BRCTL_VERSION 1
29 #define BRCTL_GET_VERSION 0
30 #define BRCTL_GET_BRIDGES 1
31 #define BRCTL_ADD_BRIDGE 2
32 #define BRCTL_DEL_BRIDGE 3
33 #define BRCTL_ADD_IF 4
34 #define BRCTL_DEL_IF 5
35 #define BRCTL_GET_BRIDGE_INFO 6
36 #define BRCTL_GET_PORT_LIST 7
37 #define BRCTL_SET_BRIDGE_FORWARD_DELAY 8
38 #define BRCTL_SET_BRIDGE_HELLO_TIME 9
39 #define BRCTL_SET_BRIDGE_MAX_AGE 10
40 #define BRCTL_SET_AGEING_TIME 11
41 #define BRCTL_SET_GC_INTERVAL 12
42 #define BRCTL_GET_PORT_INFO 13
43 #define BRCTL_SET_BRIDGE_STP_STATE 14
44 #define BRCTL_SET_BRIDGE_PRIORITY 15
45 #define BRCTL_SET_PORT_PRIORITY 16
46 #define BRCTL_SET_PATH_COST 17
47 #define BRCTL_GET_FDB_ENTRIES 18
49 #define BR_STATE_DISABLED 0
50 #define BR_STATE_LISTENING 1
51 #define BR_STATE_LEARNING 2
52 #define BR_STATE_FORWARDING 3
53 #define BR_STATE_BLOCKING 4
55 struct __bridge_info {
56 __u64 designated_root;
63 __u32 bridge_hello_time;
64 __u32 bridge_forward_delay;
66 __u8 topology_change_detected;
71 __u32 hello_timer_value;
72 __u32 tcn_timer_value;
73 __u32 topology_change_timer_value;
78 __u64 designated_root;
79 __u64 designated_bridge;
81 __u16 designated_port;
83 __u32 designated_cost;
88 __u32 message_age_timer_value;
89 __u32 forward_delay_timer_value;
90 __u32 hold_timer_value;
94 __u8 mac_addr[ETH_ALEN];
97 __u32 ageing_timer_value;
104 #define BRIDGE_FLAGS_MASTER 1 /* Bridge command to/from master */
105 #define BRIDGE_FLAGS_SELF 2 /* Bridge command to/from lowerdev */
107 #define BRIDGE_MODE_VEB 0 /* Default loopback mode */
108 #define BRIDGE_MODE_VEPA 1 /* 802.1Qbg defined VEPA mode */
109 #define BRIDGE_MODE_UNDEF 0xFFFF /* mode undefined */
111 /* Bridge management nested attributes
113 * [IFLA_BRIDGE_FLAGS]
115 * [IFLA_BRIDGE_VLAN_INFO]
121 IFLA_BRIDGE_VLAN_INFO,
122 IFLA_BRIDGE_VLAN_TUNNEL_INFO,
127 #define IFLA_BRIDGE_MAX (__IFLA_BRIDGE_MAX - 1)
129 #define BRIDGE_VLAN_INFO_MASTER (1<<0) /* Operate on Bridge device as well */
130 #define BRIDGE_VLAN_INFO_PVID (1<<1) /* VLAN is PVID, ingress untagged */
131 #define BRIDGE_VLAN_INFO_UNTAGGED (1<<2) /* VLAN egresses untagged */
132 #define BRIDGE_VLAN_INFO_RANGE_BEGIN (1<<3) /* VLAN is start of vlan range */
133 #define BRIDGE_VLAN_INFO_RANGE_END (1<<4) /* VLAN is end of vlan range */
134 #define BRIDGE_VLAN_INFO_BRENTRY (1<<5) /* Global bridge VLAN entry */
135 #define BRIDGE_VLAN_INFO_ONLY_OPTS (1<<6) /* Skip create/delete/flags */
137 struct bridge_vlan_info {
143 IFLA_BRIDGE_VLAN_TUNNEL_UNSPEC,
144 IFLA_BRIDGE_VLAN_TUNNEL_ID,
145 IFLA_BRIDGE_VLAN_TUNNEL_VID,
146 IFLA_BRIDGE_VLAN_TUNNEL_FLAGS,
147 __IFLA_BRIDGE_VLAN_TUNNEL_MAX,
150 #define IFLA_BRIDGE_VLAN_TUNNEL_MAX (__IFLA_BRIDGE_VLAN_TUNNEL_MAX - 1)
152 struct bridge_vlan_xstats {
163 IFLA_BRIDGE_MRP_UNSPEC,
164 IFLA_BRIDGE_MRP_INSTANCE,
165 IFLA_BRIDGE_MRP_PORT_STATE,
166 IFLA_BRIDGE_MRP_PORT_ROLE,
167 IFLA_BRIDGE_MRP_RING_STATE,
168 IFLA_BRIDGE_MRP_RING_ROLE,
169 IFLA_BRIDGE_MRP_START_TEST,
170 IFLA_BRIDGE_MRP_INFO,
171 IFLA_BRIDGE_MRP_IN_ROLE,
172 IFLA_BRIDGE_MRP_IN_STATE,
173 IFLA_BRIDGE_MRP_START_IN_TEST,
174 __IFLA_BRIDGE_MRP_MAX,
177 #define IFLA_BRIDGE_MRP_MAX (__IFLA_BRIDGE_MRP_MAX - 1)
180 IFLA_BRIDGE_MRP_INSTANCE_UNSPEC,
181 IFLA_BRIDGE_MRP_INSTANCE_RING_ID,
182 IFLA_BRIDGE_MRP_INSTANCE_P_IFINDEX,
183 IFLA_BRIDGE_MRP_INSTANCE_S_IFINDEX,
184 IFLA_BRIDGE_MRP_INSTANCE_PRIO,
185 __IFLA_BRIDGE_MRP_INSTANCE_MAX,
188 #define IFLA_BRIDGE_MRP_INSTANCE_MAX (__IFLA_BRIDGE_MRP_INSTANCE_MAX - 1)
191 IFLA_BRIDGE_MRP_PORT_STATE_UNSPEC,
192 IFLA_BRIDGE_MRP_PORT_STATE_STATE,
193 __IFLA_BRIDGE_MRP_PORT_STATE_MAX,
196 #define IFLA_BRIDGE_MRP_PORT_STATE_MAX (__IFLA_BRIDGE_MRP_PORT_STATE_MAX - 1)
199 IFLA_BRIDGE_MRP_PORT_ROLE_UNSPEC,
200 IFLA_BRIDGE_MRP_PORT_ROLE_ROLE,
201 __IFLA_BRIDGE_MRP_PORT_ROLE_MAX,
204 #define IFLA_BRIDGE_MRP_PORT_ROLE_MAX (__IFLA_BRIDGE_MRP_PORT_ROLE_MAX - 1)
207 IFLA_BRIDGE_MRP_RING_STATE_UNSPEC,
208 IFLA_BRIDGE_MRP_RING_STATE_RING_ID,
209 IFLA_BRIDGE_MRP_RING_STATE_STATE,
210 __IFLA_BRIDGE_MRP_RING_STATE_MAX,
213 #define IFLA_BRIDGE_MRP_RING_STATE_MAX (__IFLA_BRIDGE_MRP_RING_STATE_MAX - 1)
216 IFLA_BRIDGE_MRP_RING_ROLE_UNSPEC,
217 IFLA_BRIDGE_MRP_RING_ROLE_RING_ID,
218 IFLA_BRIDGE_MRP_RING_ROLE_ROLE,
219 __IFLA_BRIDGE_MRP_RING_ROLE_MAX,
222 #define IFLA_BRIDGE_MRP_RING_ROLE_MAX (__IFLA_BRIDGE_MRP_RING_ROLE_MAX - 1)
225 IFLA_BRIDGE_MRP_START_TEST_UNSPEC,
226 IFLA_BRIDGE_MRP_START_TEST_RING_ID,
227 IFLA_BRIDGE_MRP_START_TEST_INTERVAL,
228 IFLA_BRIDGE_MRP_START_TEST_MAX_MISS,
229 IFLA_BRIDGE_MRP_START_TEST_PERIOD,
230 IFLA_BRIDGE_MRP_START_TEST_MONITOR,
231 __IFLA_BRIDGE_MRP_START_TEST_MAX,
234 #define IFLA_BRIDGE_MRP_START_TEST_MAX (__IFLA_BRIDGE_MRP_START_TEST_MAX - 1)
237 IFLA_BRIDGE_MRP_INFO_UNSPEC,
238 IFLA_BRIDGE_MRP_INFO_RING_ID,
239 IFLA_BRIDGE_MRP_INFO_P_IFINDEX,
240 IFLA_BRIDGE_MRP_INFO_S_IFINDEX,
241 IFLA_BRIDGE_MRP_INFO_PRIO,
242 IFLA_BRIDGE_MRP_INFO_RING_STATE,
243 IFLA_BRIDGE_MRP_INFO_RING_ROLE,
244 IFLA_BRIDGE_MRP_INFO_TEST_INTERVAL,
245 IFLA_BRIDGE_MRP_INFO_TEST_MAX_MISS,
246 IFLA_BRIDGE_MRP_INFO_TEST_MONITOR,
247 IFLA_BRIDGE_MRP_INFO_I_IFINDEX,
248 IFLA_BRIDGE_MRP_INFO_IN_STATE,
249 IFLA_BRIDGE_MRP_INFO_IN_ROLE,
250 IFLA_BRIDGE_MRP_INFO_IN_TEST_INTERVAL,
251 IFLA_BRIDGE_MRP_INFO_IN_TEST_MAX_MISS,
252 __IFLA_BRIDGE_MRP_INFO_MAX,
255 #define IFLA_BRIDGE_MRP_INFO_MAX (__IFLA_BRIDGE_MRP_INFO_MAX - 1)
258 IFLA_BRIDGE_MRP_IN_STATE_UNSPEC,
259 IFLA_BRIDGE_MRP_IN_STATE_IN_ID,
260 IFLA_BRIDGE_MRP_IN_STATE_STATE,
261 __IFLA_BRIDGE_MRP_IN_STATE_MAX,
264 #define IFLA_BRIDGE_MRP_IN_STATE_MAX (__IFLA_BRIDGE_MRP_IN_STATE_MAX - 1)
267 IFLA_BRIDGE_MRP_IN_ROLE_UNSPEC,
268 IFLA_BRIDGE_MRP_IN_ROLE_RING_ID,
269 IFLA_BRIDGE_MRP_IN_ROLE_IN_ID,
270 IFLA_BRIDGE_MRP_IN_ROLE_ROLE,
271 IFLA_BRIDGE_MRP_IN_ROLE_I_IFINDEX,
272 __IFLA_BRIDGE_MRP_IN_ROLE_MAX,
275 #define IFLA_BRIDGE_MRP_IN_ROLE_MAX (__IFLA_BRIDGE_MRP_IN_ROLE_MAX - 1)
278 IFLA_BRIDGE_MRP_START_IN_TEST_UNSPEC,
279 IFLA_BRIDGE_MRP_START_IN_TEST_IN_ID,
280 IFLA_BRIDGE_MRP_START_IN_TEST_INTERVAL,
281 IFLA_BRIDGE_MRP_START_IN_TEST_MAX_MISS,
282 IFLA_BRIDGE_MRP_START_IN_TEST_PERIOD,
283 __IFLA_BRIDGE_MRP_START_IN_TEST_MAX,
286 #define IFLA_BRIDGE_MRP_START_IN_TEST_MAX (__IFLA_BRIDGE_MRP_START_IN_TEST_MAX - 1)
288 struct br_mrp_instance {
295 struct br_mrp_ring_state {
300 struct br_mrp_ring_role {
305 struct br_mrp_start_test {
313 struct br_mrp_in_state {
318 struct br_mrp_in_role {
325 struct br_mrp_start_in_test {
333 IFLA_BRIDGE_CFM_UNSPEC,
334 IFLA_BRIDGE_CFM_MEP_CREATE,
335 IFLA_BRIDGE_CFM_MEP_DELETE,
336 IFLA_BRIDGE_CFM_MEP_CONFIG,
337 IFLA_BRIDGE_CFM_CC_CONFIG,
338 IFLA_BRIDGE_CFM_CC_PEER_MEP_ADD,
339 IFLA_BRIDGE_CFM_CC_PEER_MEP_REMOVE,
340 IFLA_BRIDGE_CFM_CC_RDI,
341 IFLA_BRIDGE_CFM_CC_CCM_TX,
342 IFLA_BRIDGE_CFM_MEP_CREATE_INFO,
343 IFLA_BRIDGE_CFM_MEP_CONFIG_INFO,
344 IFLA_BRIDGE_CFM_CC_CONFIG_INFO,
345 IFLA_BRIDGE_CFM_CC_RDI_INFO,
346 IFLA_BRIDGE_CFM_CC_CCM_TX_INFO,
347 IFLA_BRIDGE_CFM_CC_PEER_MEP_INFO,
348 IFLA_BRIDGE_CFM_MEP_STATUS_INFO,
349 IFLA_BRIDGE_CFM_CC_PEER_STATUS_INFO,
350 __IFLA_BRIDGE_CFM_MAX,
353 #define IFLA_BRIDGE_CFM_MAX (__IFLA_BRIDGE_CFM_MAX - 1)
356 IFLA_BRIDGE_CFM_MEP_CREATE_UNSPEC,
357 IFLA_BRIDGE_CFM_MEP_CREATE_INSTANCE,
358 IFLA_BRIDGE_CFM_MEP_CREATE_DOMAIN,
359 IFLA_BRIDGE_CFM_MEP_CREATE_DIRECTION,
360 IFLA_BRIDGE_CFM_MEP_CREATE_IFINDEX,
361 __IFLA_BRIDGE_CFM_MEP_CREATE_MAX,
364 #define IFLA_BRIDGE_CFM_MEP_CREATE_MAX (__IFLA_BRIDGE_CFM_MEP_CREATE_MAX - 1)
367 IFLA_BRIDGE_CFM_MEP_DELETE_UNSPEC,
368 IFLA_BRIDGE_CFM_MEP_DELETE_INSTANCE,
369 __IFLA_BRIDGE_CFM_MEP_DELETE_MAX,
372 #define IFLA_BRIDGE_CFM_MEP_DELETE_MAX (__IFLA_BRIDGE_CFM_MEP_DELETE_MAX - 1)
375 IFLA_BRIDGE_CFM_MEP_CONFIG_UNSPEC,
376 IFLA_BRIDGE_CFM_MEP_CONFIG_INSTANCE,
377 IFLA_BRIDGE_CFM_MEP_CONFIG_UNICAST_MAC,
378 IFLA_BRIDGE_CFM_MEP_CONFIG_MDLEVEL,
379 IFLA_BRIDGE_CFM_MEP_CONFIG_MEPID,
380 __IFLA_BRIDGE_CFM_MEP_CONFIG_MAX,
383 #define IFLA_BRIDGE_CFM_MEP_CONFIG_MAX (__IFLA_BRIDGE_CFM_MEP_CONFIG_MAX - 1)
386 IFLA_BRIDGE_CFM_CC_CONFIG_UNSPEC,
387 IFLA_BRIDGE_CFM_CC_CONFIG_INSTANCE,
388 IFLA_BRIDGE_CFM_CC_CONFIG_ENABLE,
389 IFLA_BRIDGE_CFM_CC_CONFIG_EXP_INTERVAL,
390 IFLA_BRIDGE_CFM_CC_CONFIG_EXP_MAID,
391 __IFLA_BRIDGE_CFM_CC_CONFIG_MAX,
394 #define IFLA_BRIDGE_CFM_CC_CONFIG_MAX (__IFLA_BRIDGE_CFM_CC_CONFIG_MAX - 1)
397 IFLA_BRIDGE_CFM_CC_PEER_MEP_UNSPEC,
398 IFLA_BRIDGE_CFM_CC_PEER_MEP_INSTANCE,
399 IFLA_BRIDGE_CFM_CC_PEER_MEPID,
400 __IFLA_BRIDGE_CFM_CC_PEER_MEP_MAX,
403 #define IFLA_BRIDGE_CFM_CC_PEER_MEP_MAX (__IFLA_BRIDGE_CFM_CC_PEER_MEP_MAX - 1)
406 IFLA_BRIDGE_CFM_CC_RDI_UNSPEC,
407 IFLA_BRIDGE_CFM_CC_RDI_INSTANCE,
408 IFLA_BRIDGE_CFM_CC_RDI_RDI,
409 __IFLA_BRIDGE_CFM_CC_RDI_MAX,
412 #define IFLA_BRIDGE_CFM_CC_RDI_MAX (__IFLA_BRIDGE_CFM_CC_RDI_MAX - 1)
415 IFLA_BRIDGE_CFM_CC_CCM_TX_UNSPEC,
416 IFLA_BRIDGE_CFM_CC_CCM_TX_INSTANCE,
417 IFLA_BRIDGE_CFM_CC_CCM_TX_DMAC,
418 IFLA_BRIDGE_CFM_CC_CCM_TX_SEQ_NO_UPDATE,
419 IFLA_BRIDGE_CFM_CC_CCM_TX_PERIOD,
420 IFLA_BRIDGE_CFM_CC_CCM_TX_IF_TLV,
421 IFLA_BRIDGE_CFM_CC_CCM_TX_IF_TLV_VALUE,
422 IFLA_BRIDGE_CFM_CC_CCM_TX_PORT_TLV,
423 IFLA_BRIDGE_CFM_CC_CCM_TX_PORT_TLV_VALUE,
424 __IFLA_BRIDGE_CFM_CC_CCM_TX_MAX,
427 #define IFLA_BRIDGE_CFM_CC_CCM_TX_MAX (__IFLA_BRIDGE_CFM_CC_CCM_TX_MAX - 1)
430 IFLA_BRIDGE_CFM_MEP_STATUS_UNSPEC,
431 IFLA_BRIDGE_CFM_MEP_STATUS_INSTANCE,
432 IFLA_BRIDGE_CFM_MEP_STATUS_OPCODE_UNEXP_SEEN,
433 IFLA_BRIDGE_CFM_MEP_STATUS_VERSION_UNEXP_SEEN,
434 IFLA_BRIDGE_CFM_MEP_STATUS_RX_LEVEL_LOW_SEEN,
435 __IFLA_BRIDGE_CFM_MEP_STATUS_MAX,
438 #define IFLA_BRIDGE_CFM_MEP_STATUS_MAX (__IFLA_BRIDGE_CFM_MEP_STATUS_MAX - 1)
441 IFLA_BRIDGE_CFM_CC_PEER_STATUS_UNSPEC,
442 IFLA_BRIDGE_CFM_CC_PEER_STATUS_INSTANCE,
443 IFLA_BRIDGE_CFM_CC_PEER_STATUS_PEER_MEPID,
444 IFLA_BRIDGE_CFM_CC_PEER_STATUS_CCM_DEFECT,
445 IFLA_BRIDGE_CFM_CC_PEER_STATUS_RDI,
446 IFLA_BRIDGE_CFM_CC_PEER_STATUS_PORT_TLV_VALUE,
447 IFLA_BRIDGE_CFM_CC_PEER_STATUS_IF_TLV_VALUE,
448 IFLA_BRIDGE_CFM_CC_PEER_STATUS_SEEN,
449 IFLA_BRIDGE_CFM_CC_PEER_STATUS_TLV_SEEN,
450 IFLA_BRIDGE_CFM_CC_PEER_STATUS_SEQ_UNEXP_SEEN,
451 __IFLA_BRIDGE_CFM_CC_PEER_STATUS_MAX,
454 #define IFLA_BRIDGE_CFM_CC_PEER_STATUS_MAX (__IFLA_BRIDGE_CFM_CC_PEER_STATUS_MAX - 1)
456 struct bridge_stp_xstats {
457 __u64 transition_blk;
458 __u64 transition_fwd;
465 /* Bridge vlan RTM header */
474 BRIDGE_VLANDB_DUMP_UNSPEC,
475 BRIDGE_VLANDB_DUMP_FLAGS,
476 __BRIDGE_VLANDB_DUMP_MAX,
478 #define BRIDGE_VLANDB_DUMP_MAX (__BRIDGE_VLANDB_DUMP_MAX - 1)
480 /* flags used in BRIDGE_VLANDB_DUMP_FLAGS attribute to affect dumps */
481 #define BRIDGE_VLANDB_DUMPF_STATS (1 << 0) /* Include stats in the dump */
483 /* Bridge vlan RTM attributes
484 * [BRIDGE_VLANDB_ENTRY] = {
485 * [BRIDGE_VLANDB_ENTRY_INFO]
490 BRIDGE_VLANDB_UNSPEC,
494 #define BRIDGE_VLANDB_MAX (__BRIDGE_VLANDB_MAX - 1)
497 BRIDGE_VLANDB_ENTRY_UNSPEC,
498 BRIDGE_VLANDB_ENTRY_INFO,
499 BRIDGE_VLANDB_ENTRY_RANGE,
500 BRIDGE_VLANDB_ENTRY_STATE,
501 BRIDGE_VLANDB_ENTRY_TUNNEL_INFO,
502 BRIDGE_VLANDB_ENTRY_STATS,
503 __BRIDGE_VLANDB_ENTRY_MAX,
505 #define BRIDGE_VLANDB_ENTRY_MAX (__BRIDGE_VLANDB_ENTRY_MAX - 1)
507 /* [BRIDGE_VLANDB_ENTRY] = {
508 * [BRIDGE_VLANDB_ENTRY_TUNNEL_INFO] = {
509 * [BRIDGE_VLANDB_TINFO_ID]
515 BRIDGE_VLANDB_TINFO_UNSPEC,
516 BRIDGE_VLANDB_TINFO_ID,
517 BRIDGE_VLANDB_TINFO_CMD,
518 __BRIDGE_VLANDB_TINFO_MAX,
520 #define BRIDGE_VLANDB_TINFO_MAX (__BRIDGE_VLANDB_TINFO_MAX - 1)
522 /* [BRIDGE_VLANDB_ENTRY] = {
523 * [BRIDGE_VLANDB_ENTRY_STATS] = {
524 * [BRIDGE_VLANDB_STATS_RX_BYTES]
531 BRIDGE_VLANDB_STATS_UNSPEC,
532 BRIDGE_VLANDB_STATS_RX_BYTES,
533 BRIDGE_VLANDB_STATS_RX_PACKETS,
534 BRIDGE_VLANDB_STATS_TX_BYTES,
535 BRIDGE_VLANDB_STATS_TX_PACKETS,
536 BRIDGE_VLANDB_STATS_PAD,
537 __BRIDGE_VLANDB_STATS_MAX,
539 #define BRIDGE_VLANDB_STATS_MAX (__BRIDGE_VLANDB_STATS_MAX - 1)
541 /* Bridge multicast database attributes
543 * [MDBA_MDB_ENTRY] = {
544 * [MDBA_MDB_ENTRY_INFO] {
545 * struct br_mdb_entry
546 * [MDBA_MDB_EATTR attributes]
551 * [MDBA_ROUTER_PORT] = {
553 * [MDBA_ROUTER_PATTR attributes]
563 #define MDBA_MAX (__MDBA_MAX - 1)
570 #define MDBA_MDB_MAX (__MDBA_MDB_MAX - 1)
573 MDBA_MDB_ENTRY_UNSPEC,
575 __MDBA_MDB_ENTRY_MAX,
577 #define MDBA_MDB_ENTRY_MAX (__MDBA_MDB_ENTRY_MAX - 1)
579 /* per mdb entry additional attributes */
581 MDBA_MDB_EATTR_UNSPEC,
582 MDBA_MDB_EATTR_TIMER,
583 MDBA_MDB_EATTR_SRC_LIST,
584 MDBA_MDB_EATTR_GROUP_MODE,
585 MDBA_MDB_EATTR_SOURCE,
586 MDBA_MDB_EATTR_RTPROT,
589 #define MDBA_MDB_EATTR_MAX (__MDBA_MDB_EATTR_MAX - 1)
591 /* per mdb entry source */
593 MDBA_MDB_SRCLIST_UNSPEC,
594 MDBA_MDB_SRCLIST_ENTRY,
595 __MDBA_MDB_SRCLIST_MAX
597 #define MDBA_MDB_SRCLIST_MAX (__MDBA_MDB_SRCLIST_MAX - 1)
599 /* per mdb entry per source attributes
600 * these are embedded in MDBA_MDB_SRCLIST_ENTRY
603 MDBA_MDB_SRCATTR_UNSPEC,
604 MDBA_MDB_SRCATTR_ADDRESS,
605 MDBA_MDB_SRCATTR_TIMER,
606 __MDBA_MDB_SRCATTR_MAX
608 #define MDBA_MDB_SRCATTR_MAX (__MDBA_MDB_SRCATTR_MAX - 1)
610 /* multicast router types */
612 MDB_RTR_TYPE_DISABLED,
613 MDB_RTR_TYPE_TEMP_QUERY,
623 #define MDBA_ROUTER_MAX (__MDBA_ROUTER_MAX - 1)
625 /* router port attributes */
627 MDBA_ROUTER_PATTR_UNSPEC,
628 MDBA_ROUTER_PATTR_TIMER,
629 MDBA_ROUTER_PATTR_TYPE,
630 __MDBA_ROUTER_PATTR_MAX
632 #define MDBA_ROUTER_PATTR_MAX (__MDBA_ROUTER_PATTR_MAX - 1)
639 struct br_mdb_entry {
641 #define MDB_TEMPORARY 0
642 #define MDB_PERMANENT 1
644 #define MDB_FLAGS_OFFLOAD (1 << 0)
645 #define MDB_FLAGS_FAST_LEAVE (1 << 1)
646 #define MDB_FLAGS_STAR_EXCL (1 << 2)
647 #define MDB_FLAGS_BLOCKED (1 << 3)
654 unsigned char mac_addr[ETH_ALEN];
661 MDBA_SET_ENTRY_UNSPEC,
663 MDBA_SET_ENTRY_ATTRS,
664 __MDBA_SET_ENTRY_MAX,
666 #define MDBA_SET_ENTRY_MAX (__MDBA_SET_ENTRY_MAX - 1)
668 /* [MDBA_SET_ENTRY_ATTRS] = {
678 #define MDBE_ATTR_MAX (__MDBE_ATTR_MAX - 1)
680 /* Embedded inside LINK_XSTATS_TYPE_BRIDGE */
682 BRIDGE_XSTATS_UNSPEC,
689 #define BRIDGE_XSTATS_MAX (__BRIDGE_XSTATS_MAX - 1)
697 /* IGMP/MLD statistics */
698 struct br_mcast_stats {
699 __u64 igmp_v1queries[BR_MCAST_DIR_SIZE];
700 __u64 igmp_v2queries[BR_MCAST_DIR_SIZE];
701 __u64 igmp_v3queries[BR_MCAST_DIR_SIZE];
702 __u64 igmp_leaves[BR_MCAST_DIR_SIZE];
703 __u64 igmp_v1reports[BR_MCAST_DIR_SIZE];
704 __u64 igmp_v2reports[BR_MCAST_DIR_SIZE];
705 __u64 igmp_v3reports[BR_MCAST_DIR_SIZE];
706 __u64 igmp_parse_errors;
708 __u64 mld_v1queries[BR_MCAST_DIR_SIZE];
709 __u64 mld_v2queries[BR_MCAST_DIR_SIZE];
710 __u64 mld_leaves[BR_MCAST_DIR_SIZE];
711 __u64 mld_v1reports[BR_MCAST_DIR_SIZE];
712 __u64 mld_v2reports[BR_MCAST_DIR_SIZE];
713 __u64 mld_parse_errors;
715 __u64 mcast_bytes[BR_MCAST_DIR_SIZE];
716 __u64 mcast_packets[BR_MCAST_DIR_SIZE];
719 /* bridge boolean options
720 * BR_BOOLOPT_NO_LL_LEARN - disable learning from link-local packets
722 * IMPORTANT: if adding a new option do not forget to handle
723 * it in br_boolopt_toggle/get and bridge sysfs
726 BR_BOOLOPT_NO_LL_LEARN,
730 /* struct br_boolopt_multi - change multiple bridge boolean options
732 * @optval: new option values (bit per option)
733 * @optmask: options to change (bit per option)
735 struct br_boolopt_multi {
739 #endif /* _UAPI_LINUX_IF_BRIDGE_H */