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
,
128 #define IFLA_BRIDGE_MAX (__IFLA_BRIDGE_MAX - 1)
130 #define BRIDGE_VLAN_INFO_MASTER (1<<0) /* Operate on Bridge device as well */
131 #define BRIDGE_VLAN_INFO_PVID (1<<1) /* VLAN is PVID, ingress untagged */
132 #define BRIDGE_VLAN_INFO_UNTAGGED (1<<2) /* VLAN egresses untagged */
133 #define BRIDGE_VLAN_INFO_RANGE_BEGIN (1<<3) /* VLAN is start of vlan range */
134 #define BRIDGE_VLAN_INFO_RANGE_END (1<<4) /* VLAN is end of vlan range */
135 #define BRIDGE_VLAN_INFO_BRENTRY (1<<5) /* Global bridge VLAN entry */
136 #define BRIDGE_VLAN_INFO_ONLY_OPTS (1<<6) /* Skip create/delete/flags */
138 struct bridge_vlan_info
{
144 IFLA_BRIDGE_VLAN_TUNNEL_UNSPEC
,
145 IFLA_BRIDGE_VLAN_TUNNEL_ID
,
146 IFLA_BRIDGE_VLAN_TUNNEL_VID
,
147 IFLA_BRIDGE_VLAN_TUNNEL_FLAGS
,
148 __IFLA_BRIDGE_VLAN_TUNNEL_MAX
,
151 #define IFLA_BRIDGE_VLAN_TUNNEL_MAX (__IFLA_BRIDGE_VLAN_TUNNEL_MAX - 1)
153 struct bridge_vlan_xstats
{
164 IFLA_BRIDGE_MRP_UNSPEC
,
165 IFLA_BRIDGE_MRP_INSTANCE
,
166 IFLA_BRIDGE_MRP_PORT_STATE
,
167 IFLA_BRIDGE_MRP_PORT_ROLE
,
168 IFLA_BRIDGE_MRP_RING_STATE
,
169 IFLA_BRIDGE_MRP_RING_ROLE
,
170 IFLA_BRIDGE_MRP_START_TEST
,
171 IFLA_BRIDGE_MRP_INFO
,
172 IFLA_BRIDGE_MRP_IN_ROLE
,
173 IFLA_BRIDGE_MRP_IN_STATE
,
174 IFLA_BRIDGE_MRP_START_IN_TEST
,
175 __IFLA_BRIDGE_MRP_MAX
,
178 #define IFLA_BRIDGE_MRP_MAX (__IFLA_BRIDGE_MRP_MAX - 1)
181 IFLA_BRIDGE_MRP_INSTANCE_UNSPEC
,
182 IFLA_BRIDGE_MRP_INSTANCE_RING_ID
,
183 IFLA_BRIDGE_MRP_INSTANCE_P_IFINDEX
,
184 IFLA_BRIDGE_MRP_INSTANCE_S_IFINDEX
,
185 IFLA_BRIDGE_MRP_INSTANCE_PRIO
,
186 __IFLA_BRIDGE_MRP_INSTANCE_MAX
,
189 #define IFLA_BRIDGE_MRP_INSTANCE_MAX (__IFLA_BRIDGE_MRP_INSTANCE_MAX - 1)
192 IFLA_BRIDGE_MRP_PORT_STATE_UNSPEC
,
193 IFLA_BRIDGE_MRP_PORT_STATE_STATE
,
194 __IFLA_BRIDGE_MRP_PORT_STATE_MAX
,
197 #define IFLA_BRIDGE_MRP_PORT_STATE_MAX (__IFLA_BRIDGE_MRP_PORT_STATE_MAX - 1)
200 IFLA_BRIDGE_MRP_PORT_ROLE_UNSPEC
,
201 IFLA_BRIDGE_MRP_PORT_ROLE_ROLE
,
202 __IFLA_BRIDGE_MRP_PORT_ROLE_MAX
,
205 #define IFLA_BRIDGE_MRP_PORT_ROLE_MAX (__IFLA_BRIDGE_MRP_PORT_ROLE_MAX - 1)
208 IFLA_BRIDGE_MRP_RING_STATE_UNSPEC
,
209 IFLA_BRIDGE_MRP_RING_STATE_RING_ID
,
210 IFLA_BRIDGE_MRP_RING_STATE_STATE
,
211 __IFLA_BRIDGE_MRP_RING_STATE_MAX
,
214 #define IFLA_BRIDGE_MRP_RING_STATE_MAX (__IFLA_BRIDGE_MRP_RING_STATE_MAX - 1)
217 IFLA_BRIDGE_MRP_RING_ROLE_UNSPEC
,
218 IFLA_BRIDGE_MRP_RING_ROLE_RING_ID
,
219 IFLA_BRIDGE_MRP_RING_ROLE_ROLE
,
220 __IFLA_BRIDGE_MRP_RING_ROLE_MAX
,
223 #define IFLA_BRIDGE_MRP_RING_ROLE_MAX (__IFLA_BRIDGE_MRP_RING_ROLE_MAX - 1)
226 IFLA_BRIDGE_MRP_START_TEST_UNSPEC
,
227 IFLA_BRIDGE_MRP_START_TEST_RING_ID
,
228 IFLA_BRIDGE_MRP_START_TEST_INTERVAL
,
229 IFLA_BRIDGE_MRP_START_TEST_MAX_MISS
,
230 IFLA_BRIDGE_MRP_START_TEST_PERIOD
,
231 IFLA_BRIDGE_MRP_START_TEST_MONITOR
,
232 __IFLA_BRIDGE_MRP_START_TEST_MAX
,
235 #define IFLA_BRIDGE_MRP_START_TEST_MAX (__IFLA_BRIDGE_MRP_START_TEST_MAX - 1)
238 IFLA_BRIDGE_MRP_INFO_UNSPEC
,
239 IFLA_BRIDGE_MRP_INFO_RING_ID
,
240 IFLA_BRIDGE_MRP_INFO_P_IFINDEX
,
241 IFLA_BRIDGE_MRP_INFO_S_IFINDEX
,
242 IFLA_BRIDGE_MRP_INFO_PRIO
,
243 IFLA_BRIDGE_MRP_INFO_RING_STATE
,
244 IFLA_BRIDGE_MRP_INFO_RING_ROLE
,
245 IFLA_BRIDGE_MRP_INFO_TEST_INTERVAL
,
246 IFLA_BRIDGE_MRP_INFO_TEST_MAX_MISS
,
247 IFLA_BRIDGE_MRP_INFO_TEST_MONITOR
,
248 IFLA_BRIDGE_MRP_INFO_I_IFINDEX
,
249 IFLA_BRIDGE_MRP_INFO_IN_STATE
,
250 IFLA_BRIDGE_MRP_INFO_IN_ROLE
,
251 IFLA_BRIDGE_MRP_INFO_IN_TEST_INTERVAL
,
252 IFLA_BRIDGE_MRP_INFO_IN_TEST_MAX_MISS
,
253 __IFLA_BRIDGE_MRP_INFO_MAX
,
256 #define IFLA_BRIDGE_MRP_INFO_MAX (__IFLA_BRIDGE_MRP_INFO_MAX - 1)
259 IFLA_BRIDGE_MRP_IN_STATE_UNSPEC
,
260 IFLA_BRIDGE_MRP_IN_STATE_IN_ID
,
261 IFLA_BRIDGE_MRP_IN_STATE_STATE
,
262 __IFLA_BRIDGE_MRP_IN_STATE_MAX
,
265 #define IFLA_BRIDGE_MRP_IN_STATE_MAX (__IFLA_BRIDGE_MRP_IN_STATE_MAX - 1)
268 IFLA_BRIDGE_MRP_IN_ROLE_UNSPEC
,
269 IFLA_BRIDGE_MRP_IN_ROLE_RING_ID
,
270 IFLA_BRIDGE_MRP_IN_ROLE_IN_ID
,
271 IFLA_BRIDGE_MRP_IN_ROLE_ROLE
,
272 IFLA_BRIDGE_MRP_IN_ROLE_I_IFINDEX
,
273 __IFLA_BRIDGE_MRP_IN_ROLE_MAX
,
276 #define IFLA_BRIDGE_MRP_IN_ROLE_MAX (__IFLA_BRIDGE_MRP_IN_ROLE_MAX - 1)
279 IFLA_BRIDGE_MRP_START_IN_TEST_UNSPEC
,
280 IFLA_BRIDGE_MRP_START_IN_TEST_IN_ID
,
281 IFLA_BRIDGE_MRP_START_IN_TEST_INTERVAL
,
282 IFLA_BRIDGE_MRP_START_IN_TEST_MAX_MISS
,
283 IFLA_BRIDGE_MRP_START_IN_TEST_PERIOD
,
284 __IFLA_BRIDGE_MRP_START_IN_TEST_MAX
,
287 #define IFLA_BRIDGE_MRP_START_IN_TEST_MAX (__IFLA_BRIDGE_MRP_START_IN_TEST_MAX - 1)
289 struct br_mrp_instance
{
296 struct br_mrp_ring_state
{
301 struct br_mrp_ring_role
{
306 struct br_mrp_start_test
{
314 struct br_mrp_in_state
{
319 struct br_mrp_in_role
{
326 struct br_mrp_start_in_test
{
334 IFLA_BRIDGE_CFM_UNSPEC
,
335 IFLA_BRIDGE_CFM_MEP_CREATE
,
336 IFLA_BRIDGE_CFM_MEP_DELETE
,
337 IFLA_BRIDGE_CFM_MEP_CONFIG
,
338 IFLA_BRIDGE_CFM_CC_CONFIG
,
339 IFLA_BRIDGE_CFM_CC_PEER_MEP_ADD
,
340 IFLA_BRIDGE_CFM_CC_PEER_MEP_REMOVE
,
341 IFLA_BRIDGE_CFM_CC_RDI
,
342 IFLA_BRIDGE_CFM_CC_CCM_TX
,
343 IFLA_BRIDGE_CFM_MEP_CREATE_INFO
,
344 IFLA_BRIDGE_CFM_MEP_CONFIG_INFO
,
345 IFLA_BRIDGE_CFM_CC_CONFIG_INFO
,
346 IFLA_BRIDGE_CFM_CC_RDI_INFO
,
347 IFLA_BRIDGE_CFM_CC_CCM_TX_INFO
,
348 IFLA_BRIDGE_CFM_CC_PEER_MEP_INFO
,
349 IFLA_BRIDGE_CFM_MEP_STATUS_INFO
,
350 IFLA_BRIDGE_CFM_CC_PEER_STATUS_INFO
,
351 __IFLA_BRIDGE_CFM_MAX
,
354 #define IFLA_BRIDGE_CFM_MAX (__IFLA_BRIDGE_CFM_MAX - 1)
357 IFLA_BRIDGE_CFM_MEP_CREATE_UNSPEC
,
358 IFLA_BRIDGE_CFM_MEP_CREATE_INSTANCE
,
359 IFLA_BRIDGE_CFM_MEP_CREATE_DOMAIN
,
360 IFLA_BRIDGE_CFM_MEP_CREATE_DIRECTION
,
361 IFLA_BRIDGE_CFM_MEP_CREATE_IFINDEX
,
362 __IFLA_BRIDGE_CFM_MEP_CREATE_MAX
,
365 #define IFLA_BRIDGE_CFM_MEP_CREATE_MAX (__IFLA_BRIDGE_CFM_MEP_CREATE_MAX - 1)
368 IFLA_BRIDGE_CFM_MEP_DELETE_UNSPEC
,
369 IFLA_BRIDGE_CFM_MEP_DELETE_INSTANCE
,
370 __IFLA_BRIDGE_CFM_MEP_DELETE_MAX
,
373 #define IFLA_BRIDGE_CFM_MEP_DELETE_MAX (__IFLA_BRIDGE_CFM_MEP_DELETE_MAX - 1)
376 IFLA_BRIDGE_CFM_MEP_CONFIG_UNSPEC
,
377 IFLA_BRIDGE_CFM_MEP_CONFIG_INSTANCE
,
378 IFLA_BRIDGE_CFM_MEP_CONFIG_UNICAST_MAC
,
379 IFLA_BRIDGE_CFM_MEP_CONFIG_MDLEVEL
,
380 IFLA_BRIDGE_CFM_MEP_CONFIG_MEPID
,
381 __IFLA_BRIDGE_CFM_MEP_CONFIG_MAX
,
384 #define IFLA_BRIDGE_CFM_MEP_CONFIG_MAX (__IFLA_BRIDGE_CFM_MEP_CONFIG_MAX - 1)
387 IFLA_BRIDGE_CFM_CC_CONFIG_UNSPEC
,
388 IFLA_BRIDGE_CFM_CC_CONFIG_INSTANCE
,
389 IFLA_BRIDGE_CFM_CC_CONFIG_ENABLE
,
390 IFLA_BRIDGE_CFM_CC_CONFIG_EXP_INTERVAL
,
391 IFLA_BRIDGE_CFM_CC_CONFIG_EXP_MAID
,
392 __IFLA_BRIDGE_CFM_CC_CONFIG_MAX
,
395 #define IFLA_BRIDGE_CFM_CC_CONFIG_MAX (__IFLA_BRIDGE_CFM_CC_CONFIG_MAX - 1)
398 IFLA_BRIDGE_CFM_CC_PEER_MEP_UNSPEC
,
399 IFLA_BRIDGE_CFM_CC_PEER_MEP_INSTANCE
,
400 IFLA_BRIDGE_CFM_CC_PEER_MEPID
,
401 __IFLA_BRIDGE_CFM_CC_PEER_MEP_MAX
,
404 #define IFLA_BRIDGE_CFM_CC_PEER_MEP_MAX (__IFLA_BRIDGE_CFM_CC_PEER_MEP_MAX - 1)
407 IFLA_BRIDGE_CFM_CC_RDI_UNSPEC
,
408 IFLA_BRIDGE_CFM_CC_RDI_INSTANCE
,
409 IFLA_BRIDGE_CFM_CC_RDI_RDI
,
410 __IFLA_BRIDGE_CFM_CC_RDI_MAX
,
413 #define IFLA_BRIDGE_CFM_CC_RDI_MAX (__IFLA_BRIDGE_CFM_CC_RDI_MAX - 1)
416 IFLA_BRIDGE_CFM_CC_CCM_TX_UNSPEC
,
417 IFLA_BRIDGE_CFM_CC_CCM_TX_INSTANCE
,
418 IFLA_BRIDGE_CFM_CC_CCM_TX_DMAC
,
419 IFLA_BRIDGE_CFM_CC_CCM_TX_SEQ_NO_UPDATE
,
420 IFLA_BRIDGE_CFM_CC_CCM_TX_PERIOD
,
421 IFLA_BRIDGE_CFM_CC_CCM_TX_IF_TLV
,
422 IFLA_BRIDGE_CFM_CC_CCM_TX_IF_TLV_VALUE
,
423 IFLA_BRIDGE_CFM_CC_CCM_TX_PORT_TLV
,
424 IFLA_BRIDGE_CFM_CC_CCM_TX_PORT_TLV_VALUE
,
425 __IFLA_BRIDGE_CFM_CC_CCM_TX_MAX
,
428 #define IFLA_BRIDGE_CFM_CC_CCM_TX_MAX (__IFLA_BRIDGE_CFM_CC_CCM_TX_MAX - 1)
431 IFLA_BRIDGE_CFM_MEP_STATUS_UNSPEC
,
432 IFLA_BRIDGE_CFM_MEP_STATUS_INSTANCE
,
433 IFLA_BRIDGE_CFM_MEP_STATUS_OPCODE_UNEXP_SEEN
,
434 IFLA_BRIDGE_CFM_MEP_STATUS_VERSION_UNEXP_SEEN
,
435 IFLA_BRIDGE_CFM_MEP_STATUS_RX_LEVEL_LOW_SEEN
,
436 __IFLA_BRIDGE_CFM_MEP_STATUS_MAX
,
439 #define IFLA_BRIDGE_CFM_MEP_STATUS_MAX (__IFLA_BRIDGE_CFM_MEP_STATUS_MAX - 1)
442 IFLA_BRIDGE_CFM_CC_PEER_STATUS_UNSPEC
,
443 IFLA_BRIDGE_CFM_CC_PEER_STATUS_INSTANCE
,
444 IFLA_BRIDGE_CFM_CC_PEER_STATUS_PEER_MEPID
,
445 IFLA_BRIDGE_CFM_CC_PEER_STATUS_CCM_DEFECT
,
446 IFLA_BRIDGE_CFM_CC_PEER_STATUS_RDI
,
447 IFLA_BRIDGE_CFM_CC_PEER_STATUS_PORT_TLV_VALUE
,
448 IFLA_BRIDGE_CFM_CC_PEER_STATUS_IF_TLV_VALUE
,
449 IFLA_BRIDGE_CFM_CC_PEER_STATUS_SEEN
,
450 IFLA_BRIDGE_CFM_CC_PEER_STATUS_TLV_SEEN
,
451 IFLA_BRIDGE_CFM_CC_PEER_STATUS_SEQ_UNEXP_SEEN
,
452 __IFLA_BRIDGE_CFM_CC_PEER_STATUS_MAX
,
455 #define IFLA_BRIDGE_CFM_CC_PEER_STATUS_MAX (__IFLA_BRIDGE_CFM_CC_PEER_STATUS_MAX - 1)
458 IFLA_BRIDGE_MST_UNSPEC
,
459 IFLA_BRIDGE_MST_ENTRY
,
460 __IFLA_BRIDGE_MST_MAX
,
462 #define IFLA_BRIDGE_MST_MAX (__IFLA_BRIDGE_MST_MAX - 1)
465 IFLA_BRIDGE_MST_ENTRY_UNSPEC
,
466 IFLA_BRIDGE_MST_ENTRY_MSTI
,
467 IFLA_BRIDGE_MST_ENTRY_STATE
,
468 __IFLA_BRIDGE_MST_ENTRY_MAX
,
470 #define IFLA_BRIDGE_MST_ENTRY_MAX (__IFLA_BRIDGE_MST_ENTRY_MAX - 1)
472 struct bridge_stp_xstats
{
473 __u64 transition_blk
;
474 __u64 transition_fwd
;
481 /* Bridge vlan RTM header */
490 BRIDGE_VLANDB_DUMP_UNSPEC
,
491 BRIDGE_VLANDB_DUMP_FLAGS
,
492 __BRIDGE_VLANDB_DUMP_MAX
,
494 #define BRIDGE_VLANDB_DUMP_MAX (__BRIDGE_VLANDB_DUMP_MAX - 1)
496 /* flags used in BRIDGE_VLANDB_DUMP_FLAGS attribute to affect dumps */
497 #define BRIDGE_VLANDB_DUMPF_STATS (1 << 0) /* Include stats in the dump */
498 #define BRIDGE_VLANDB_DUMPF_GLOBAL (1 << 1) /* Dump global vlan options only */
500 /* Bridge vlan RTM attributes
501 * [BRIDGE_VLANDB_ENTRY] = {
502 * [BRIDGE_VLANDB_ENTRY_INFO]
505 * [BRIDGE_VLANDB_GLOBAL_OPTIONS] = {
506 * [BRIDGE_VLANDB_GOPTS_ID]
511 BRIDGE_VLANDB_UNSPEC
,
513 BRIDGE_VLANDB_GLOBAL_OPTIONS
,
516 #define BRIDGE_VLANDB_MAX (__BRIDGE_VLANDB_MAX - 1)
519 BRIDGE_VLANDB_ENTRY_UNSPEC
,
520 BRIDGE_VLANDB_ENTRY_INFO
,
521 BRIDGE_VLANDB_ENTRY_RANGE
,
522 BRIDGE_VLANDB_ENTRY_STATE
,
523 BRIDGE_VLANDB_ENTRY_TUNNEL_INFO
,
524 BRIDGE_VLANDB_ENTRY_STATS
,
525 BRIDGE_VLANDB_ENTRY_MCAST_ROUTER
,
526 BRIDGE_VLANDB_ENTRY_MCAST_N_GROUPS
,
527 BRIDGE_VLANDB_ENTRY_MCAST_MAX_GROUPS
,
528 BRIDGE_VLANDB_ENTRY_NEIGH_SUPPRESS
,
529 __BRIDGE_VLANDB_ENTRY_MAX
,
531 #define BRIDGE_VLANDB_ENTRY_MAX (__BRIDGE_VLANDB_ENTRY_MAX - 1)
533 /* [BRIDGE_VLANDB_ENTRY] = {
534 * [BRIDGE_VLANDB_ENTRY_TUNNEL_INFO] = {
535 * [BRIDGE_VLANDB_TINFO_ID]
541 BRIDGE_VLANDB_TINFO_UNSPEC
,
542 BRIDGE_VLANDB_TINFO_ID
,
543 BRIDGE_VLANDB_TINFO_CMD
,
544 __BRIDGE_VLANDB_TINFO_MAX
,
546 #define BRIDGE_VLANDB_TINFO_MAX (__BRIDGE_VLANDB_TINFO_MAX - 1)
548 /* [BRIDGE_VLANDB_ENTRY] = {
549 * [BRIDGE_VLANDB_ENTRY_STATS] = {
550 * [BRIDGE_VLANDB_STATS_RX_BYTES]
557 BRIDGE_VLANDB_STATS_UNSPEC
,
558 BRIDGE_VLANDB_STATS_RX_BYTES
,
559 BRIDGE_VLANDB_STATS_RX_PACKETS
,
560 BRIDGE_VLANDB_STATS_TX_BYTES
,
561 BRIDGE_VLANDB_STATS_TX_PACKETS
,
562 BRIDGE_VLANDB_STATS_PAD
,
563 __BRIDGE_VLANDB_STATS_MAX
,
565 #define BRIDGE_VLANDB_STATS_MAX (__BRIDGE_VLANDB_STATS_MAX - 1)
568 BRIDGE_VLANDB_GOPTS_UNSPEC
,
569 BRIDGE_VLANDB_GOPTS_ID
,
570 BRIDGE_VLANDB_GOPTS_RANGE
,
571 BRIDGE_VLANDB_GOPTS_MCAST_SNOOPING
,
572 BRIDGE_VLANDB_GOPTS_MCAST_IGMP_VERSION
,
573 BRIDGE_VLANDB_GOPTS_MCAST_MLD_VERSION
,
574 BRIDGE_VLANDB_GOPTS_MCAST_LAST_MEMBER_CNT
,
575 BRIDGE_VLANDB_GOPTS_MCAST_STARTUP_QUERY_CNT
,
576 BRIDGE_VLANDB_GOPTS_MCAST_LAST_MEMBER_INTVL
,
577 BRIDGE_VLANDB_GOPTS_PAD
,
578 BRIDGE_VLANDB_GOPTS_MCAST_MEMBERSHIP_INTVL
,
579 BRIDGE_VLANDB_GOPTS_MCAST_QUERIER_INTVL
,
580 BRIDGE_VLANDB_GOPTS_MCAST_QUERY_INTVL
,
581 BRIDGE_VLANDB_GOPTS_MCAST_QUERY_RESPONSE_INTVL
,
582 BRIDGE_VLANDB_GOPTS_MCAST_STARTUP_QUERY_INTVL
,
583 BRIDGE_VLANDB_GOPTS_MCAST_QUERIER
,
584 BRIDGE_VLANDB_GOPTS_MCAST_ROUTER_PORTS
,
585 BRIDGE_VLANDB_GOPTS_MCAST_QUERIER_STATE
,
586 BRIDGE_VLANDB_GOPTS_MSTI
,
587 __BRIDGE_VLANDB_GOPTS_MAX
589 #define BRIDGE_VLANDB_GOPTS_MAX (__BRIDGE_VLANDB_GOPTS_MAX - 1)
591 /* Bridge multicast database attributes
593 * [MDBA_MDB_ENTRY] = {
594 * [MDBA_MDB_ENTRY_INFO] {
595 * struct br_mdb_entry
596 * [MDBA_MDB_EATTR attributes]
601 * [MDBA_ROUTER_PORT] = {
603 * [MDBA_ROUTER_PATTR attributes]
613 #define MDBA_MAX (__MDBA_MAX - 1)
620 #define MDBA_MDB_MAX (__MDBA_MDB_MAX - 1)
623 MDBA_MDB_ENTRY_UNSPEC
,
625 __MDBA_MDB_ENTRY_MAX
,
627 #define MDBA_MDB_ENTRY_MAX (__MDBA_MDB_ENTRY_MAX - 1)
629 /* per mdb entry additional attributes */
631 MDBA_MDB_EATTR_UNSPEC
,
632 MDBA_MDB_EATTR_TIMER
,
633 MDBA_MDB_EATTR_SRC_LIST
,
634 MDBA_MDB_EATTR_GROUP_MODE
,
635 MDBA_MDB_EATTR_SOURCE
,
636 MDBA_MDB_EATTR_RTPROT
,
638 MDBA_MDB_EATTR_DST_PORT
,
640 MDBA_MDB_EATTR_IFINDEX
,
641 MDBA_MDB_EATTR_SRC_VNI
,
644 #define MDBA_MDB_EATTR_MAX (__MDBA_MDB_EATTR_MAX - 1)
646 /* per mdb entry source */
648 MDBA_MDB_SRCLIST_UNSPEC
,
649 MDBA_MDB_SRCLIST_ENTRY
,
650 __MDBA_MDB_SRCLIST_MAX
652 #define MDBA_MDB_SRCLIST_MAX (__MDBA_MDB_SRCLIST_MAX - 1)
654 /* per mdb entry per source attributes
655 * these are embedded in MDBA_MDB_SRCLIST_ENTRY
658 MDBA_MDB_SRCATTR_UNSPEC
,
659 MDBA_MDB_SRCATTR_ADDRESS
,
660 MDBA_MDB_SRCATTR_TIMER
,
661 __MDBA_MDB_SRCATTR_MAX
663 #define MDBA_MDB_SRCATTR_MAX (__MDBA_MDB_SRCATTR_MAX - 1)
665 /* multicast router types */
667 MDB_RTR_TYPE_DISABLED
,
668 MDB_RTR_TYPE_TEMP_QUERY
,
678 #define MDBA_ROUTER_MAX (__MDBA_ROUTER_MAX - 1)
680 /* router port attributes */
682 MDBA_ROUTER_PATTR_UNSPEC
,
683 MDBA_ROUTER_PATTR_TIMER
,
684 MDBA_ROUTER_PATTR_TYPE
,
685 MDBA_ROUTER_PATTR_INET_TIMER
,
686 MDBA_ROUTER_PATTR_INET6_TIMER
,
687 MDBA_ROUTER_PATTR_VID
,
688 __MDBA_ROUTER_PATTR_MAX
690 #define MDBA_ROUTER_PATTR_MAX (__MDBA_ROUTER_PATTR_MAX - 1)
697 struct br_mdb_entry
{
699 #define MDB_TEMPORARY 0
700 #define MDB_PERMANENT 1
702 #define MDB_FLAGS_OFFLOAD (1 << 0)
703 #define MDB_FLAGS_FAST_LEAVE (1 << 1)
704 #define MDB_FLAGS_STAR_EXCL (1 << 2)
705 #define MDB_FLAGS_BLOCKED (1 << 3)
712 unsigned char mac_addr
[ETH_ALEN
];
719 MDBA_SET_ENTRY_UNSPEC
,
721 MDBA_SET_ENTRY_ATTRS
,
722 __MDBA_SET_ENTRY_MAX
,
724 #define MDBA_SET_ENTRY_MAX (__MDBA_SET_ENTRY_MAX - 1)
726 /* [MDBA_GET_ENTRY] = {
727 * struct br_mdb_entry
728 * [MDBA_GET_ENTRY_ATTRS] = {
730 * struct in_addr / struct in6_addr
731 * [MDBE_ATTR_SRC_VNI]
737 MDBA_GET_ENTRY_UNSPEC
,
739 MDBA_GET_ENTRY_ATTRS
,
740 __MDBA_GET_ENTRY_MAX
,
742 #define MDBA_GET_ENTRY_MAX (__MDBA_GET_ENTRY_MAX - 1)
744 /* [MDBA_SET_ENTRY_ATTRS] = {
753 MDBE_ATTR_GROUP_MODE
,
760 MDBE_ATTR_STATE_MASK
,
763 #define MDBE_ATTR_MAX (__MDBE_ATTR_MAX - 1)
765 /* per mdb entry source */
767 MDBE_SRC_LIST_UNSPEC
,
771 #define MDBE_SRC_LIST_MAX (__MDBE_SRC_LIST_MAX - 1)
773 /* per mdb entry per source attributes
774 * these are embedded in MDBE_SRC_LIST_ENTRY
778 MDBE_SRCATTR_ADDRESS
,
781 #define MDBE_SRCATTR_MAX (__MDBE_SRCATTR_MAX - 1)
783 /* Embedded inside LINK_XSTATS_TYPE_BRIDGE */
785 BRIDGE_XSTATS_UNSPEC
,
792 #define BRIDGE_XSTATS_MAX (__BRIDGE_XSTATS_MAX - 1)
800 /* IGMP/MLD statistics */
801 struct br_mcast_stats
{
802 __u64 igmp_v1queries
[BR_MCAST_DIR_SIZE
];
803 __u64 igmp_v2queries
[BR_MCAST_DIR_SIZE
];
804 __u64 igmp_v3queries
[BR_MCAST_DIR_SIZE
];
805 __u64 igmp_leaves
[BR_MCAST_DIR_SIZE
];
806 __u64 igmp_v1reports
[BR_MCAST_DIR_SIZE
];
807 __u64 igmp_v2reports
[BR_MCAST_DIR_SIZE
];
808 __u64 igmp_v3reports
[BR_MCAST_DIR_SIZE
];
809 __u64 igmp_parse_errors
;
811 __u64 mld_v1queries
[BR_MCAST_DIR_SIZE
];
812 __u64 mld_v2queries
[BR_MCAST_DIR_SIZE
];
813 __u64 mld_leaves
[BR_MCAST_DIR_SIZE
];
814 __u64 mld_v1reports
[BR_MCAST_DIR_SIZE
];
815 __u64 mld_v2reports
[BR_MCAST_DIR_SIZE
];
816 __u64 mld_parse_errors
;
818 __u64 mcast_bytes
[BR_MCAST_DIR_SIZE
];
819 __u64 mcast_packets
[BR_MCAST_DIR_SIZE
];
822 /* bridge boolean options
823 * BR_BOOLOPT_NO_LL_LEARN - disable learning from link-local packets
824 * BR_BOOLOPT_MCAST_VLAN_SNOOPING - control vlan multicast snooping
826 * IMPORTANT: if adding a new option do not forget to handle
827 * it in br_boolopt_toggle/get and bridge sysfs
830 BR_BOOLOPT_NO_LL_LEARN
,
831 BR_BOOLOPT_MCAST_VLAN_SNOOPING
,
832 BR_BOOLOPT_MST_ENABLE
,
836 /* struct br_boolopt_multi - change multiple bridge boolean options
838 * @optval: new option values (bit per option)
839 * @optmask: options to change (bit per option)
841 struct br_boolopt_multi
{
847 BRIDGE_QUERIER_UNSPEC
,
848 BRIDGE_QUERIER_IP_ADDRESS
,
849 BRIDGE_QUERIER_IP_PORT
,
850 BRIDGE_QUERIER_IP_OTHER_TIMER
,
852 BRIDGE_QUERIER_IPV6_ADDRESS
,
853 BRIDGE_QUERIER_IPV6_PORT
,
854 BRIDGE_QUERIER_IPV6_OTHER_TIMER
,
857 #define BRIDGE_QUERIER_MAX (__BRIDGE_QUERIER_MAX - 1)
858 #endif /* _UAPI_LINUX_IF_BRIDGE_H */