~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/uapi/linux/if_bridge.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /include/uapi/linux/if_bridge.h (Architecture ppc) and /include/uapi/linux/if_bridge.h (Architecture alpha)


  1 /* SPDX-License-Identifier: GPL-2.0+ WITH Linu      1 /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
  2 /*                                                  2 /*
  3  *      Linux ethernet bridge                       3  *      Linux ethernet bridge
  4  *                                                  4  *
  5  *      Authors:                                    5  *      Authors:
  6  *      Lennert Buytenhek               <buyte      6  *      Lennert Buytenhek               <buytenh@gnu.org>
  7  *                                                  7  *
  8  *      This program is free software; you can      8  *      This program is free software; you can redistribute it and/or
  9  *      modify it under the terms of the GNU G      9  *      modify it under the terms of the GNU General Public License
 10  *      as published by the Free Software Foun     10  *      as published by the Free Software Foundation; either version
 11  *      2 of the License, or (at your option)      11  *      2 of the License, or (at your option) any later version.
 12  */                                                12  */
 13                                                    13 
 14 #ifndef _UAPI_LINUX_IF_BRIDGE_H                    14 #ifndef _UAPI_LINUX_IF_BRIDGE_H
 15 #define _UAPI_LINUX_IF_BRIDGE_H                    15 #define _UAPI_LINUX_IF_BRIDGE_H
 16                                                    16 
 17 #include <linux/types.h>                           17 #include <linux/types.h>
 18 #include <linux/if_ether.h>                        18 #include <linux/if_ether.h>
 19 #include <linux/in6.h>                             19 #include <linux/in6.h>
 20                                                    20 
 21 #define SYSFS_BRIDGE_ATTR       "bridge"           21 #define SYSFS_BRIDGE_ATTR       "bridge"
 22 #define SYSFS_BRIDGE_FDB        "brforward"        22 #define SYSFS_BRIDGE_FDB        "brforward"
 23 #define SYSFS_BRIDGE_PORT_SUBDIR "brif"            23 #define SYSFS_BRIDGE_PORT_SUBDIR "brif"
 24 #define SYSFS_BRIDGE_PORT_ATTR  "brport"           24 #define SYSFS_BRIDGE_PORT_ATTR  "brport"
 25 #define SYSFS_BRIDGE_PORT_LINK  "bridge"           25 #define SYSFS_BRIDGE_PORT_LINK  "bridge"
 26                                                    26 
 27 #define BRCTL_VERSION 1                            27 #define BRCTL_VERSION 1
 28                                                    28 
 29 #define BRCTL_GET_VERSION 0                        29 #define BRCTL_GET_VERSION 0
 30 #define BRCTL_GET_BRIDGES 1                        30 #define BRCTL_GET_BRIDGES 1
 31 #define BRCTL_ADD_BRIDGE 2                         31 #define BRCTL_ADD_BRIDGE 2
 32 #define BRCTL_DEL_BRIDGE 3                         32 #define BRCTL_DEL_BRIDGE 3
 33 #define BRCTL_ADD_IF 4                             33 #define BRCTL_ADD_IF 4
 34 #define BRCTL_DEL_IF 5                             34 #define BRCTL_DEL_IF 5
 35 #define BRCTL_GET_BRIDGE_INFO 6                    35 #define BRCTL_GET_BRIDGE_INFO 6
 36 #define BRCTL_GET_PORT_LIST 7                      36 #define BRCTL_GET_PORT_LIST 7
 37 #define BRCTL_SET_BRIDGE_FORWARD_DELAY 8           37 #define BRCTL_SET_BRIDGE_FORWARD_DELAY 8
 38 #define BRCTL_SET_BRIDGE_HELLO_TIME 9              38 #define BRCTL_SET_BRIDGE_HELLO_TIME 9
 39 #define BRCTL_SET_BRIDGE_MAX_AGE 10                39 #define BRCTL_SET_BRIDGE_MAX_AGE 10
 40 #define BRCTL_SET_AGEING_TIME 11                   40 #define BRCTL_SET_AGEING_TIME 11
 41 #define BRCTL_SET_GC_INTERVAL 12                   41 #define BRCTL_SET_GC_INTERVAL 12
 42 #define BRCTL_GET_PORT_INFO 13                     42 #define BRCTL_GET_PORT_INFO 13
 43 #define BRCTL_SET_BRIDGE_STP_STATE 14              43 #define BRCTL_SET_BRIDGE_STP_STATE 14
 44 #define BRCTL_SET_BRIDGE_PRIORITY 15               44 #define BRCTL_SET_BRIDGE_PRIORITY 15
 45 #define BRCTL_SET_PORT_PRIORITY 16                 45 #define BRCTL_SET_PORT_PRIORITY 16
 46 #define BRCTL_SET_PATH_COST 17                     46 #define BRCTL_SET_PATH_COST 17
 47 #define BRCTL_GET_FDB_ENTRIES 18                   47 #define BRCTL_GET_FDB_ENTRIES 18
 48                                                    48 
 49 #define BR_STATE_DISABLED 0                        49 #define BR_STATE_DISABLED 0
 50 #define BR_STATE_LISTENING 1                       50 #define BR_STATE_LISTENING 1
 51 #define BR_STATE_LEARNING 2                        51 #define BR_STATE_LEARNING 2
 52 #define BR_STATE_FORWARDING 3                      52 #define BR_STATE_FORWARDING 3
 53 #define BR_STATE_BLOCKING 4                        53 #define BR_STATE_BLOCKING 4
 54                                                    54 
 55 struct __bridge_info {                             55 struct __bridge_info {
 56         __u64 designated_root;                     56         __u64 designated_root;
 57         __u64 bridge_id;                           57         __u64 bridge_id;
 58         __u32 root_path_cost;                      58         __u32 root_path_cost;
 59         __u32 max_age;                             59         __u32 max_age;
 60         __u32 hello_time;                          60         __u32 hello_time;
 61         __u32 forward_delay;                       61         __u32 forward_delay;
 62         __u32 bridge_max_age;                      62         __u32 bridge_max_age;
 63         __u32 bridge_hello_time;                   63         __u32 bridge_hello_time;
 64         __u32 bridge_forward_delay;                64         __u32 bridge_forward_delay;
 65         __u8 topology_change;                      65         __u8 topology_change;
 66         __u8 topology_change_detected;             66         __u8 topology_change_detected;
 67         __u8 root_port;                            67         __u8 root_port;
 68         __u8 stp_enabled;                          68         __u8 stp_enabled;
 69         __u32 ageing_time;                         69         __u32 ageing_time;
 70         __u32 gc_interval;                         70         __u32 gc_interval;
 71         __u32 hello_timer_value;                   71         __u32 hello_timer_value;
 72         __u32 tcn_timer_value;                     72         __u32 tcn_timer_value;
 73         __u32 topology_change_timer_value;         73         __u32 topology_change_timer_value;
 74         __u32 gc_timer_value;                      74         __u32 gc_timer_value;
 75 };                                                 75 };
 76                                                    76 
 77 struct __port_info {                               77 struct __port_info {
 78         __u64 designated_root;                     78         __u64 designated_root;
 79         __u64 designated_bridge;                   79         __u64 designated_bridge;
 80         __u16 port_id;                             80         __u16 port_id;
 81         __u16 designated_port;                     81         __u16 designated_port;
 82         __u32 path_cost;                           82         __u32 path_cost;
 83         __u32 designated_cost;                     83         __u32 designated_cost;
 84         __u8 state;                                84         __u8 state;
 85         __u8 top_change_ack;                       85         __u8 top_change_ack;
 86         __u8 config_pending;                       86         __u8 config_pending;
 87         __u8 unused0;                              87         __u8 unused0;
 88         __u32 message_age_timer_value;             88         __u32 message_age_timer_value;
 89         __u32 forward_delay_timer_value;           89         __u32 forward_delay_timer_value;
 90         __u32 hold_timer_value;                    90         __u32 hold_timer_value;
 91 };                                                 91 };
 92                                                    92 
 93 struct __fdb_entry {                               93 struct __fdb_entry {
 94         __u8 mac_addr[ETH_ALEN];                   94         __u8 mac_addr[ETH_ALEN];
 95         __u8 port_no;                              95         __u8 port_no;
 96         __u8 is_local;                             96         __u8 is_local;
 97         __u32 ageing_timer_value;                  97         __u32 ageing_timer_value;
 98         __u8 port_hi;                              98         __u8 port_hi;
 99         __u8 pad0;                                 99         __u8 pad0;
100         __u16 unused;                             100         __u16 unused;
101 };                                                101 };
102                                                   102 
103 /* Bridge Flags */                                103 /* Bridge Flags */
104 #define BRIDGE_FLAGS_MASTER     1       /* Bri    104 #define BRIDGE_FLAGS_MASTER     1       /* Bridge command to/from master */
105 #define BRIDGE_FLAGS_SELF       2       /* Bri    105 #define BRIDGE_FLAGS_SELF       2       /* Bridge command to/from lowerdev */
106                                                   106 
107 #define BRIDGE_MODE_VEB         0       /* Def    107 #define BRIDGE_MODE_VEB         0       /* Default loopback mode */
108 #define BRIDGE_MODE_VEPA        1       /* 802    108 #define BRIDGE_MODE_VEPA        1       /* 802.1Qbg defined VEPA mode */
109 #define BRIDGE_MODE_UNDEF       0xFFFF  /* mod    109 #define BRIDGE_MODE_UNDEF       0xFFFF  /* mode undefined */
110                                                   110 
111 /* Bridge management nested attributes            111 /* Bridge management nested attributes
112  * [IFLA_AF_SPEC] = {                             112  * [IFLA_AF_SPEC] = {
113  *     [IFLA_BRIDGE_FLAGS]                        113  *     [IFLA_BRIDGE_FLAGS]
114  *     [IFLA_BRIDGE_MODE]                         114  *     [IFLA_BRIDGE_MODE]
115  *     [IFLA_BRIDGE_VLAN_INFO]                    115  *     [IFLA_BRIDGE_VLAN_INFO]
116  * }                                              116  * }
117  */                                               117  */
118 enum {                                            118 enum {
119         IFLA_BRIDGE_FLAGS,                        119         IFLA_BRIDGE_FLAGS,
120         IFLA_BRIDGE_MODE,                         120         IFLA_BRIDGE_MODE,
121         IFLA_BRIDGE_VLAN_INFO,                    121         IFLA_BRIDGE_VLAN_INFO,
122         IFLA_BRIDGE_VLAN_TUNNEL_INFO,             122         IFLA_BRIDGE_VLAN_TUNNEL_INFO,
123         IFLA_BRIDGE_MRP,                          123         IFLA_BRIDGE_MRP,
124         IFLA_BRIDGE_CFM,                          124         IFLA_BRIDGE_CFM,
125         IFLA_BRIDGE_MST,                          125         IFLA_BRIDGE_MST,
126         __IFLA_BRIDGE_MAX,                        126         __IFLA_BRIDGE_MAX,
127 };                                                127 };
128 #define IFLA_BRIDGE_MAX (__IFLA_BRIDGE_MAX - 1    128 #define IFLA_BRIDGE_MAX (__IFLA_BRIDGE_MAX - 1)
129                                                   129 
130 #define BRIDGE_VLAN_INFO_MASTER (1<<0)  /* Ope    130 #define BRIDGE_VLAN_INFO_MASTER (1<<0)  /* Operate on Bridge device as well */
131 #define BRIDGE_VLAN_INFO_PVID   (1<<1)  /* VLA    131 #define BRIDGE_VLAN_INFO_PVID   (1<<1)  /* VLAN is PVID, ingress untagged */
132 #define BRIDGE_VLAN_INFO_UNTAGGED       (1<<2)    132 #define BRIDGE_VLAN_INFO_UNTAGGED       (1<<2)  /* VLAN egresses untagged */
133 #define BRIDGE_VLAN_INFO_RANGE_BEGIN    (1<<3)    133 #define BRIDGE_VLAN_INFO_RANGE_BEGIN    (1<<3) /* VLAN is start of vlan range */
134 #define BRIDGE_VLAN_INFO_RANGE_END      (1<<4)    134 #define BRIDGE_VLAN_INFO_RANGE_END      (1<<4) /* VLAN is end of vlan range */
135 #define BRIDGE_VLAN_INFO_BRENTRY        (1<<5)    135 #define BRIDGE_VLAN_INFO_BRENTRY        (1<<5) /* Global bridge VLAN entry */
136 #define BRIDGE_VLAN_INFO_ONLY_OPTS      (1<<6)    136 #define BRIDGE_VLAN_INFO_ONLY_OPTS      (1<<6) /* Skip create/delete/flags */
137                                                   137 
138 struct bridge_vlan_info {                         138 struct bridge_vlan_info {
139         __u16 flags;                              139         __u16 flags;
140         __u16 vid;                                140         __u16 vid;
141 };                                                141 };
142                                                   142 
143 enum {                                            143 enum {
144         IFLA_BRIDGE_VLAN_TUNNEL_UNSPEC,           144         IFLA_BRIDGE_VLAN_TUNNEL_UNSPEC,
145         IFLA_BRIDGE_VLAN_TUNNEL_ID,               145         IFLA_BRIDGE_VLAN_TUNNEL_ID,
146         IFLA_BRIDGE_VLAN_TUNNEL_VID,              146         IFLA_BRIDGE_VLAN_TUNNEL_VID,
147         IFLA_BRIDGE_VLAN_TUNNEL_FLAGS,            147         IFLA_BRIDGE_VLAN_TUNNEL_FLAGS,
148         __IFLA_BRIDGE_VLAN_TUNNEL_MAX,            148         __IFLA_BRIDGE_VLAN_TUNNEL_MAX,
149 };                                                149 };
150                                                   150 
151 #define IFLA_BRIDGE_VLAN_TUNNEL_MAX (__IFLA_BR    151 #define IFLA_BRIDGE_VLAN_TUNNEL_MAX (__IFLA_BRIDGE_VLAN_TUNNEL_MAX - 1)
152                                                   152 
153 struct bridge_vlan_xstats {                       153 struct bridge_vlan_xstats {
154         __u64 rx_bytes;                           154         __u64 rx_bytes;
155         __u64 rx_packets;                         155         __u64 rx_packets;
156         __u64 tx_bytes;                           156         __u64 tx_bytes;
157         __u64 tx_packets;                         157         __u64 tx_packets;
158         __u16 vid;                                158         __u16 vid;
159         __u16 flags;                              159         __u16 flags;
160         __u32 pad2;                               160         __u32 pad2;
161 };                                                161 };
162                                                   162 
163 enum {                                            163 enum {
164         IFLA_BRIDGE_MRP_UNSPEC,                   164         IFLA_BRIDGE_MRP_UNSPEC,
165         IFLA_BRIDGE_MRP_INSTANCE,                 165         IFLA_BRIDGE_MRP_INSTANCE,
166         IFLA_BRIDGE_MRP_PORT_STATE,               166         IFLA_BRIDGE_MRP_PORT_STATE,
167         IFLA_BRIDGE_MRP_PORT_ROLE,                167         IFLA_BRIDGE_MRP_PORT_ROLE,
168         IFLA_BRIDGE_MRP_RING_STATE,               168         IFLA_BRIDGE_MRP_RING_STATE,
169         IFLA_BRIDGE_MRP_RING_ROLE,                169         IFLA_BRIDGE_MRP_RING_ROLE,
170         IFLA_BRIDGE_MRP_START_TEST,               170         IFLA_BRIDGE_MRP_START_TEST,
171         IFLA_BRIDGE_MRP_INFO,                     171         IFLA_BRIDGE_MRP_INFO,
172         IFLA_BRIDGE_MRP_IN_ROLE,                  172         IFLA_BRIDGE_MRP_IN_ROLE,
173         IFLA_BRIDGE_MRP_IN_STATE,                 173         IFLA_BRIDGE_MRP_IN_STATE,
174         IFLA_BRIDGE_MRP_START_IN_TEST,            174         IFLA_BRIDGE_MRP_START_IN_TEST,
175         __IFLA_BRIDGE_MRP_MAX,                    175         __IFLA_BRIDGE_MRP_MAX,
176 };                                                176 };
177                                                   177 
178 #define IFLA_BRIDGE_MRP_MAX (__IFLA_BRIDGE_MRP    178 #define IFLA_BRIDGE_MRP_MAX (__IFLA_BRIDGE_MRP_MAX - 1)
179                                                   179 
180 enum {                                            180 enum {
181         IFLA_BRIDGE_MRP_INSTANCE_UNSPEC,          181         IFLA_BRIDGE_MRP_INSTANCE_UNSPEC,
182         IFLA_BRIDGE_MRP_INSTANCE_RING_ID,         182         IFLA_BRIDGE_MRP_INSTANCE_RING_ID,
183         IFLA_BRIDGE_MRP_INSTANCE_P_IFINDEX,       183         IFLA_BRIDGE_MRP_INSTANCE_P_IFINDEX,
184         IFLA_BRIDGE_MRP_INSTANCE_S_IFINDEX,       184         IFLA_BRIDGE_MRP_INSTANCE_S_IFINDEX,
185         IFLA_BRIDGE_MRP_INSTANCE_PRIO,            185         IFLA_BRIDGE_MRP_INSTANCE_PRIO,
186         __IFLA_BRIDGE_MRP_INSTANCE_MAX,           186         __IFLA_BRIDGE_MRP_INSTANCE_MAX,
187 };                                                187 };
188                                                   188 
189 #define IFLA_BRIDGE_MRP_INSTANCE_MAX (__IFLA_B    189 #define IFLA_BRIDGE_MRP_INSTANCE_MAX (__IFLA_BRIDGE_MRP_INSTANCE_MAX - 1)
190                                                   190 
191 enum {                                            191 enum {
192         IFLA_BRIDGE_MRP_PORT_STATE_UNSPEC,        192         IFLA_BRIDGE_MRP_PORT_STATE_UNSPEC,
193         IFLA_BRIDGE_MRP_PORT_STATE_STATE,         193         IFLA_BRIDGE_MRP_PORT_STATE_STATE,
194         __IFLA_BRIDGE_MRP_PORT_STATE_MAX,         194         __IFLA_BRIDGE_MRP_PORT_STATE_MAX,
195 };                                                195 };
196                                                   196 
197 #define IFLA_BRIDGE_MRP_PORT_STATE_MAX (__IFLA    197 #define IFLA_BRIDGE_MRP_PORT_STATE_MAX (__IFLA_BRIDGE_MRP_PORT_STATE_MAX - 1)
198                                                   198 
199 enum {                                            199 enum {
200         IFLA_BRIDGE_MRP_PORT_ROLE_UNSPEC,         200         IFLA_BRIDGE_MRP_PORT_ROLE_UNSPEC,
201         IFLA_BRIDGE_MRP_PORT_ROLE_ROLE,           201         IFLA_BRIDGE_MRP_PORT_ROLE_ROLE,
202         __IFLA_BRIDGE_MRP_PORT_ROLE_MAX,          202         __IFLA_BRIDGE_MRP_PORT_ROLE_MAX,
203 };                                                203 };
204                                                   204 
205 #define IFLA_BRIDGE_MRP_PORT_ROLE_MAX (__IFLA_    205 #define IFLA_BRIDGE_MRP_PORT_ROLE_MAX (__IFLA_BRIDGE_MRP_PORT_ROLE_MAX - 1)
206                                                   206 
207 enum {                                            207 enum {
208         IFLA_BRIDGE_MRP_RING_STATE_UNSPEC,        208         IFLA_BRIDGE_MRP_RING_STATE_UNSPEC,
209         IFLA_BRIDGE_MRP_RING_STATE_RING_ID,       209         IFLA_BRIDGE_MRP_RING_STATE_RING_ID,
210         IFLA_BRIDGE_MRP_RING_STATE_STATE,         210         IFLA_BRIDGE_MRP_RING_STATE_STATE,
211         __IFLA_BRIDGE_MRP_RING_STATE_MAX,         211         __IFLA_BRIDGE_MRP_RING_STATE_MAX,
212 };                                                212 };
213                                                   213 
214 #define IFLA_BRIDGE_MRP_RING_STATE_MAX (__IFLA    214 #define IFLA_BRIDGE_MRP_RING_STATE_MAX (__IFLA_BRIDGE_MRP_RING_STATE_MAX - 1)
215                                                   215 
216 enum {                                            216 enum {
217         IFLA_BRIDGE_MRP_RING_ROLE_UNSPEC,         217         IFLA_BRIDGE_MRP_RING_ROLE_UNSPEC,
218         IFLA_BRIDGE_MRP_RING_ROLE_RING_ID,        218         IFLA_BRIDGE_MRP_RING_ROLE_RING_ID,
219         IFLA_BRIDGE_MRP_RING_ROLE_ROLE,           219         IFLA_BRIDGE_MRP_RING_ROLE_ROLE,
220         __IFLA_BRIDGE_MRP_RING_ROLE_MAX,          220         __IFLA_BRIDGE_MRP_RING_ROLE_MAX,
221 };                                                221 };
222                                                   222 
223 #define IFLA_BRIDGE_MRP_RING_ROLE_MAX (__IFLA_    223 #define IFLA_BRIDGE_MRP_RING_ROLE_MAX (__IFLA_BRIDGE_MRP_RING_ROLE_MAX - 1)
224                                                   224 
225 enum {                                            225 enum {
226         IFLA_BRIDGE_MRP_START_TEST_UNSPEC,        226         IFLA_BRIDGE_MRP_START_TEST_UNSPEC,
227         IFLA_BRIDGE_MRP_START_TEST_RING_ID,       227         IFLA_BRIDGE_MRP_START_TEST_RING_ID,
228         IFLA_BRIDGE_MRP_START_TEST_INTERVAL,      228         IFLA_BRIDGE_MRP_START_TEST_INTERVAL,
229         IFLA_BRIDGE_MRP_START_TEST_MAX_MISS,      229         IFLA_BRIDGE_MRP_START_TEST_MAX_MISS,
230         IFLA_BRIDGE_MRP_START_TEST_PERIOD,        230         IFLA_BRIDGE_MRP_START_TEST_PERIOD,
231         IFLA_BRIDGE_MRP_START_TEST_MONITOR,       231         IFLA_BRIDGE_MRP_START_TEST_MONITOR,
232         __IFLA_BRIDGE_MRP_START_TEST_MAX,         232         __IFLA_BRIDGE_MRP_START_TEST_MAX,
233 };                                                233 };
234                                                   234 
235 #define IFLA_BRIDGE_MRP_START_TEST_MAX (__IFLA    235 #define IFLA_BRIDGE_MRP_START_TEST_MAX (__IFLA_BRIDGE_MRP_START_TEST_MAX - 1)
236                                                   236 
237 enum {                                            237 enum {
238         IFLA_BRIDGE_MRP_INFO_UNSPEC,              238         IFLA_BRIDGE_MRP_INFO_UNSPEC,
239         IFLA_BRIDGE_MRP_INFO_RING_ID,             239         IFLA_BRIDGE_MRP_INFO_RING_ID,
240         IFLA_BRIDGE_MRP_INFO_P_IFINDEX,           240         IFLA_BRIDGE_MRP_INFO_P_IFINDEX,
241         IFLA_BRIDGE_MRP_INFO_S_IFINDEX,           241         IFLA_BRIDGE_MRP_INFO_S_IFINDEX,
242         IFLA_BRIDGE_MRP_INFO_PRIO,                242         IFLA_BRIDGE_MRP_INFO_PRIO,
243         IFLA_BRIDGE_MRP_INFO_RING_STATE,          243         IFLA_BRIDGE_MRP_INFO_RING_STATE,
244         IFLA_BRIDGE_MRP_INFO_RING_ROLE,           244         IFLA_BRIDGE_MRP_INFO_RING_ROLE,
245         IFLA_BRIDGE_MRP_INFO_TEST_INTERVAL,       245         IFLA_BRIDGE_MRP_INFO_TEST_INTERVAL,
246         IFLA_BRIDGE_MRP_INFO_TEST_MAX_MISS,       246         IFLA_BRIDGE_MRP_INFO_TEST_MAX_MISS,
247         IFLA_BRIDGE_MRP_INFO_TEST_MONITOR,        247         IFLA_BRIDGE_MRP_INFO_TEST_MONITOR,
248         IFLA_BRIDGE_MRP_INFO_I_IFINDEX,           248         IFLA_BRIDGE_MRP_INFO_I_IFINDEX,
249         IFLA_BRIDGE_MRP_INFO_IN_STATE,            249         IFLA_BRIDGE_MRP_INFO_IN_STATE,
250         IFLA_BRIDGE_MRP_INFO_IN_ROLE,             250         IFLA_BRIDGE_MRP_INFO_IN_ROLE,
251         IFLA_BRIDGE_MRP_INFO_IN_TEST_INTERVAL,    251         IFLA_BRIDGE_MRP_INFO_IN_TEST_INTERVAL,
252         IFLA_BRIDGE_MRP_INFO_IN_TEST_MAX_MISS,    252         IFLA_BRIDGE_MRP_INFO_IN_TEST_MAX_MISS,
253         __IFLA_BRIDGE_MRP_INFO_MAX,               253         __IFLA_BRIDGE_MRP_INFO_MAX,
254 };                                                254 };
255                                                   255 
256 #define IFLA_BRIDGE_MRP_INFO_MAX (__IFLA_BRIDG    256 #define IFLA_BRIDGE_MRP_INFO_MAX (__IFLA_BRIDGE_MRP_INFO_MAX - 1)
257                                                   257 
258 enum {                                            258 enum {
259         IFLA_BRIDGE_MRP_IN_STATE_UNSPEC,          259         IFLA_BRIDGE_MRP_IN_STATE_UNSPEC,
260         IFLA_BRIDGE_MRP_IN_STATE_IN_ID,           260         IFLA_BRIDGE_MRP_IN_STATE_IN_ID,
261         IFLA_BRIDGE_MRP_IN_STATE_STATE,           261         IFLA_BRIDGE_MRP_IN_STATE_STATE,
262         __IFLA_BRIDGE_MRP_IN_STATE_MAX,           262         __IFLA_BRIDGE_MRP_IN_STATE_MAX,
263 };                                                263 };
264                                                   264 
265 #define IFLA_BRIDGE_MRP_IN_STATE_MAX (__IFLA_B    265 #define IFLA_BRIDGE_MRP_IN_STATE_MAX (__IFLA_BRIDGE_MRP_IN_STATE_MAX - 1)
266                                                   266 
267 enum {                                            267 enum {
268         IFLA_BRIDGE_MRP_IN_ROLE_UNSPEC,           268         IFLA_BRIDGE_MRP_IN_ROLE_UNSPEC,
269         IFLA_BRIDGE_MRP_IN_ROLE_RING_ID,          269         IFLA_BRIDGE_MRP_IN_ROLE_RING_ID,
270         IFLA_BRIDGE_MRP_IN_ROLE_IN_ID,            270         IFLA_BRIDGE_MRP_IN_ROLE_IN_ID,
271         IFLA_BRIDGE_MRP_IN_ROLE_ROLE,             271         IFLA_BRIDGE_MRP_IN_ROLE_ROLE,
272         IFLA_BRIDGE_MRP_IN_ROLE_I_IFINDEX,        272         IFLA_BRIDGE_MRP_IN_ROLE_I_IFINDEX,
273         __IFLA_BRIDGE_MRP_IN_ROLE_MAX,            273         __IFLA_BRIDGE_MRP_IN_ROLE_MAX,
274 };                                                274 };
275                                                   275 
276 #define IFLA_BRIDGE_MRP_IN_ROLE_MAX (__IFLA_BR    276 #define IFLA_BRIDGE_MRP_IN_ROLE_MAX (__IFLA_BRIDGE_MRP_IN_ROLE_MAX - 1)
277                                                   277 
278 enum {                                            278 enum {
279         IFLA_BRIDGE_MRP_START_IN_TEST_UNSPEC,     279         IFLA_BRIDGE_MRP_START_IN_TEST_UNSPEC,
280         IFLA_BRIDGE_MRP_START_IN_TEST_IN_ID,      280         IFLA_BRIDGE_MRP_START_IN_TEST_IN_ID,
281         IFLA_BRIDGE_MRP_START_IN_TEST_INTERVAL    281         IFLA_BRIDGE_MRP_START_IN_TEST_INTERVAL,
282         IFLA_BRIDGE_MRP_START_IN_TEST_MAX_MISS    282         IFLA_BRIDGE_MRP_START_IN_TEST_MAX_MISS,
283         IFLA_BRIDGE_MRP_START_IN_TEST_PERIOD,     283         IFLA_BRIDGE_MRP_START_IN_TEST_PERIOD,
284         __IFLA_BRIDGE_MRP_START_IN_TEST_MAX,      284         __IFLA_BRIDGE_MRP_START_IN_TEST_MAX,
285 };                                                285 };
286                                                   286 
287 #define IFLA_BRIDGE_MRP_START_IN_TEST_MAX (__I    287 #define IFLA_BRIDGE_MRP_START_IN_TEST_MAX (__IFLA_BRIDGE_MRP_START_IN_TEST_MAX - 1)
288                                                   288 
289 struct br_mrp_instance {                          289 struct br_mrp_instance {
290         __u32 ring_id;                            290         __u32 ring_id;
291         __u32 p_ifindex;                          291         __u32 p_ifindex;
292         __u32 s_ifindex;                          292         __u32 s_ifindex;
293         __u16 prio;                               293         __u16 prio;
294 };                                                294 };
295                                                   295 
296 struct br_mrp_ring_state {                        296 struct br_mrp_ring_state {
297         __u32 ring_id;                            297         __u32 ring_id;
298         __u32 ring_state;                         298         __u32 ring_state;
299 };                                                299 };
300                                                   300 
301 struct br_mrp_ring_role {                         301 struct br_mrp_ring_role {
302         __u32 ring_id;                            302         __u32 ring_id;
303         __u32 ring_role;                          303         __u32 ring_role;
304 };                                                304 };
305                                                   305 
306 struct br_mrp_start_test {                        306 struct br_mrp_start_test {
307         __u32 ring_id;                            307         __u32 ring_id;
308         __u32 interval;                           308         __u32 interval;
309         __u32 max_miss;                           309         __u32 max_miss;
310         __u32 period;                             310         __u32 period;
311         __u32 monitor;                            311         __u32 monitor;
312 };                                                312 };
313                                                   313 
314 struct br_mrp_in_state {                          314 struct br_mrp_in_state {
315         __u32 in_state;                           315         __u32 in_state;
316         __u16 in_id;                              316         __u16 in_id;
317 };                                                317 };
318                                                   318 
319 struct br_mrp_in_role {                           319 struct br_mrp_in_role {
320         __u32 ring_id;                            320         __u32 ring_id;
321         __u32 in_role;                            321         __u32 in_role;
322         __u32 i_ifindex;                          322         __u32 i_ifindex;
323         __u16 in_id;                              323         __u16 in_id;
324 };                                                324 };
325                                                   325 
326 struct br_mrp_start_in_test {                     326 struct br_mrp_start_in_test {
327         __u32 interval;                           327         __u32 interval;
328         __u32 max_miss;                           328         __u32 max_miss;
329         __u32 period;                             329         __u32 period;
330         __u16 in_id;                              330         __u16 in_id;
331 };                                                331 };
332                                                   332 
333 enum {                                            333 enum {
334         IFLA_BRIDGE_CFM_UNSPEC,                   334         IFLA_BRIDGE_CFM_UNSPEC,
335         IFLA_BRIDGE_CFM_MEP_CREATE,               335         IFLA_BRIDGE_CFM_MEP_CREATE,
336         IFLA_BRIDGE_CFM_MEP_DELETE,               336         IFLA_BRIDGE_CFM_MEP_DELETE,
337         IFLA_BRIDGE_CFM_MEP_CONFIG,               337         IFLA_BRIDGE_CFM_MEP_CONFIG,
338         IFLA_BRIDGE_CFM_CC_CONFIG,                338         IFLA_BRIDGE_CFM_CC_CONFIG,
339         IFLA_BRIDGE_CFM_CC_PEER_MEP_ADD,          339         IFLA_BRIDGE_CFM_CC_PEER_MEP_ADD,
340         IFLA_BRIDGE_CFM_CC_PEER_MEP_REMOVE,       340         IFLA_BRIDGE_CFM_CC_PEER_MEP_REMOVE,
341         IFLA_BRIDGE_CFM_CC_RDI,                   341         IFLA_BRIDGE_CFM_CC_RDI,
342         IFLA_BRIDGE_CFM_CC_CCM_TX,                342         IFLA_BRIDGE_CFM_CC_CCM_TX,
343         IFLA_BRIDGE_CFM_MEP_CREATE_INFO,          343         IFLA_BRIDGE_CFM_MEP_CREATE_INFO,
344         IFLA_BRIDGE_CFM_MEP_CONFIG_INFO,          344         IFLA_BRIDGE_CFM_MEP_CONFIG_INFO,
345         IFLA_BRIDGE_CFM_CC_CONFIG_INFO,           345         IFLA_BRIDGE_CFM_CC_CONFIG_INFO,
346         IFLA_BRIDGE_CFM_CC_RDI_INFO,              346         IFLA_BRIDGE_CFM_CC_RDI_INFO,
347         IFLA_BRIDGE_CFM_CC_CCM_TX_INFO,           347         IFLA_BRIDGE_CFM_CC_CCM_TX_INFO,
348         IFLA_BRIDGE_CFM_CC_PEER_MEP_INFO,         348         IFLA_BRIDGE_CFM_CC_PEER_MEP_INFO,
349         IFLA_BRIDGE_CFM_MEP_STATUS_INFO,          349         IFLA_BRIDGE_CFM_MEP_STATUS_INFO,
350         IFLA_BRIDGE_CFM_CC_PEER_STATUS_INFO,      350         IFLA_BRIDGE_CFM_CC_PEER_STATUS_INFO,
351         __IFLA_BRIDGE_CFM_MAX,                    351         __IFLA_BRIDGE_CFM_MAX,
352 };                                                352 };
353                                                   353 
354 #define IFLA_BRIDGE_CFM_MAX (__IFLA_BRIDGE_CFM    354 #define IFLA_BRIDGE_CFM_MAX (__IFLA_BRIDGE_CFM_MAX - 1)
355                                                   355 
356 enum {                                            356 enum {
357         IFLA_BRIDGE_CFM_MEP_CREATE_UNSPEC,        357         IFLA_BRIDGE_CFM_MEP_CREATE_UNSPEC,
358         IFLA_BRIDGE_CFM_MEP_CREATE_INSTANCE,      358         IFLA_BRIDGE_CFM_MEP_CREATE_INSTANCE,
359         IFLA_BRIDGE_CFM_MEP_CREATE_DOMAIN,        359         IFLA_BRIDGE_CFM_MEP_CREATE_DOMAIN,
360         IFLA_BRIDGE_CFM_MEP_CREATE_DIRECTION,     360         IFLA_BRIDGE_CFM_MEP_CREATE_DIRECTION,
361         IFLA_BRIDGE_CFM_MEP_CREATE_IFINDEX,       361         IFLA_BRIDGE_CFM_MEP_CREATE_IFINDEX,
362         __IFLA_BRIDGE_CFM_MEP_CREATE_MAX,         362         __IFLA_BRIDGE_CFM_MEP_CREATE_MAX,
363 };                                                363 };
364                                                   364 
365 #define IFLA_BRIDGE_CFM_MEP_CREATE_MAX (__IFLA    365 #define IFLA_BRIDGE_CFM_MEP_CREATE_MAX (__IFLA_BRIDGE_CFM_MEP_CREATE_MAX - 1)
366                                                   366 
367 enum {                                            367 enum {
368         IFLA_BRIDGE_CFM_MEP_DELETE_UNSPEC,        368         IFLA_BRIDGE_CFM_MEP_DELETE_UNSPEC,
369         IFLA_BRIDGE_CFM_MEP_DELETE_INSTANCE,      369         IFLA_BRIDGE_CFM_MEP_DELETE_INSTANCE,
370         __IFLA_BRIDGE_CFM_MEP_DELETE_MAX,         370         __IFLA_BRIDGE_CFM_MEP_DELETE_MAX,
371 };                                                371 };
372                                                   372 
373 #define IFLA_BRIDGE_CFM_MEP_DELETE_MAX (__IFLA    373 #define IFLA_BRIDGE_CFM_MEP_DELETE_MAX (__IFLA_BRIDGE_CFM_MEP_DELETE_MAX - 1)
374                                                   374 
375 enum {                                            375 enum {
376         IFLA_BRIDGE_CFM_MEP_CONFIG_UNSPEC,        376         IFLA_BRIDGE_CFM_MEP_CONFIG_UNSPEC,
377         IFLA_BRIDGE_CFM_MEP_CONFIG_INSTANCE,      377         IFLA_BRIDGE_CFM_MEP_CONFIG_INSTANCE,
378         IFLA_BRIDGE_CFM_MEP_CONFIG_UNICAST_MAC    378         IFLA_BRIDGE_CFM_MEP_CONFIG_UNICAST_MAC,
379         IFLA_BRIDGE_CFM_MEP_CONFIG_MDLEVEL,       379         IFLA_BRIDGE_CFM_MEP_CONFIG_MDLEVEL,
380         IFLA_BRIDGE_CFM_MEP_CONFIG_MEPID,         380         IFLA_BRIDGE_CFM_MEP_CONFIG_MEPID,
381         __IFLA_BRIDGE_CFM_MEP_CONFIG_MAX,         381         __IFLA_BRIDGE_CFM_MEP_CONFIG_MAX,
382 };                                                382 };
383                                                   383 
384 #define IFLA_BRIDGE_CFM_MEP_CONFIG_MAX (__IFLA    384 #define IFLA_BRIDGE_CFM_MEP_CONFIG_MAX (__IFLA_BRIDGE_CFM_MEP_CONFIG_MAX - 1)
385                                                   385 
386 enum {                                            386 enum {
387         IFLA_BRIDGE_CFM_CC_CONFIG_UNSPEC,         387         IFLA_BRIDGE_CFM_CC_CONFIG_UNSPEC,
388         IFLA_BRIDGE_CFM_CC_CONFIG_INSTANCE,       388         IFLA_BRIDGE_CFM_CC_CONFIG_INSTANCE,
389         IFLA_BRIDGE_CFM_CC_CONFIG_ENABLE,         389         IFLA_BRIDGE_CFM_CC_CONFIG_ENABLE,
390         IFLA_BRIDGE_CFM_CC_CONFIG_EXP_INTERVAL    390         IFLA_BRIDGE_CFM_CC_CONFIG_EXP_INTERVAL,
391         IFLA_BRIDGE_CFM_CC_CONFIG_EXP_MAID,       391         IFLA_BRIDGE_CFM_CC_CONFIG_EXP_MAID,
392         __IFLA_BRIDGE_CFM_CC_CONFIG_MAX,          392         __IFLA_BRIDGE_CFM_CC_CONFIG_MAX,
393 };                                                393 };
394                                                   394 
395 #define IFLA_BRIDGE_CFM_CC_CONFIG_MAX (__IFLA_    395 #define IFLA_BRIDGE_CFM_CC_CONFIG_MAX (__IFLA_BRIDGE_CFM_CC_CONFIG_MAX - 1)
396                                                   396 
397 enum {                                            397 enum {
398         IFLA_BRIDGE_CFM_CC_PEER_MEP_UNSPEC,       398         IFLA_BRIDGE_CFM_CC_PEER_MEP_UNSPEC,
399         IFLA_BRIDGE_CFM_CC_PEER_MEP_INSTANCE,     399         IFLA_BRIDGE_CFM_CC_PEER_MEP_INSTANCE,
400         IFLA_BRIDGE_CFM_CC_PEER_MEPID,            400         IFLA_BRIDGE_CFM_CC_PEER_MEPID,
401         __IFLA_BRIDGE_CFM_CC_PEER_MEP_MAX,        401         __IFLA_BRIDGE_CFM_CC_PEER_MEP_MAX,
402 };                                                402 };
403                                                   403 
404 #define IFLA_BRIDGE_CFM_CC_PEER_MEP_MAX (__IFL    404 #define IFLA_BRIDGE_CFM_CC_PEER_MEP_MAX (__IFLA_BRIDGE_CFM_CC_PEER_MEP_MAX - 1)
405                                                   405 
406 enum {                                            406 enum {
407         IFLA_BRIDGE_CFM_CC_RDI_UNSPEC,            407         IFLA_BRIDGE_CFM_CC_RDI_UNSPEC,
408         IFLA_BRIDGE_CFM_CC_RDI_INSTANCE,          408         IFLA_BRIDGE_CFM_CC_RDI_INSTANCE,
409         IFLA_BRIDGE_CFM_CC_RDI_RDI,               409         IFLA_BRIDGE_CFM_CC_RDI_RDI,
410         __IFLA_BRIDGE_CFM_CC_RDI_MAX,             410         __IFLA_BRIDGE_CFM_CC_RDI_MAX,
411 };                                                411 };
412                                                   412 
413 #define IFLA_BRIDGE_CFM_CC_RDI_MAX (__IFLA_BRI    413 #define IFLA_BRIDGE_CFM_CC_RDI_MAX (__IFLA_BRIDGE_CFM_CC_RDI_MAX - 1)
414                                                   414 
415 enum {                                            415 enum {
416         IFLA_BRIDGE_CFM_CC_CCM_TX_UNSPEC,         416         IFLA_BRIDGE_CFM_CC_CCM_TX_UNSPEC,
417         IFLA_BRIDGE_CFM_CC_CCM_TX_INSTANCE,       417         IFLA_BRIDGE_CFM_CC_CCM_TX_INSTANCE,
418         IFLA_BRIDGE_CFM_CC_CCM_TX_DMAC,           418         IFLA_BRIDGE_CFM_CC_CCM_TX_DMAC,
419         IFLA_BRIDGE_CFM_CC_CCM_TX_SEQ_NO_UPDAT    419         IFLA_BRIDGE_CFM_CC_CCM_TX_SEQ_NO_UPDATE,
420         IFLA_BRIDGE_CFM_CC_CCM_TX_PERIOD,         420         IFLA_BRIDGE_CFM_CC_CCM_TX_PERIOD,
421         IFLA_BRIDGE_CFM_CC_CCM_TX_IF_TLV,         421         IFLA_BRIDGE_CFM_CC_CCM_TX_IF_TLV,
422         IFLA_BRIDGE_CFM_CC_CCM_TX_IF_TLV_VALUE    422         IFLA_BRIDGE_CFM_CC_CCM_TX_IF_TLV_VALUE,
423         IFLA_BRIDGE_CFM_CC_CCM_TX_PORT_TLV,       423         IFLA_BRIDGE_CFM_CC_CCM_TX_PORT_TLV,
424         IFLA_BRIDGE_CFM_CC_CCM_TX_PORT_TLV_VAL    424         IFLA_BRIDGE_CFM_CC_CCM_TX_PORT_TLV_VALUE,
425         __IFLA_BRIDGE_CFM_CC_CCM_TX_MAX,          425         __IFLA_BRIDGE_CFM_CC_CCM_TX_MAX,
426 };                                                426 };
427                                                   427 
428 #define IFLA_BRIDGE_CFM_CC_CCM_TX_MAX (__IFLA_    428 #define IFLA_BRIDGE_CFM_CC_CCM_TX_MAX (__IFLA_BRIDGE_CFM_CC_CCM_TX_MAX - 1)
429                                                   429 
430 enum {                                            430 enum {
431         IFLA_BRIDGE_CFM_MEP_STATUS_UNSPEC,        431         IFLA_BRIDGE_CFM_MEP_STATUS_UNSPEC,
432         IFLA_BRIDGE_CFM_MEP_STATUS_INSTANCE,      432         IFLA_BRIDGE_CFM_MEP_STATUS_INSTANCE,
433         IFLA_BRIDGE_CFM_MEP_STATUS_OPCODE_UNEX    433         IFLA_BRIDGE_CFM_MEP_STATUS_OPCODE_UNEXP_SEEN,
434         IFLA_BRIDGE_CFM_MEP_STATUS_VERSION_UNE    434         IFLA_BRIDGE_CFM_MEP_STATUS_VERSION_UNEXP_SEEN,
435         IFLA_BRIDGE_CFM_MEP_STATUS_RX_LEVEL_LO    435         IFLA_BRIDGE_CFM_MEP_STATUS_RX_LEVEL_LOW_SEEN,
436         __IFLA_BRIDGE_CFM_MEP_STATUS_MAX,         436         __IFLA_BRIDGE_CFM_MEP_STATUS_MAX,
437 };                                                437 };
438                                                   438 
439 #define IFLA_BRIDGE_CFM_MEP_STATUS_MAX (__IFLA    439 #define IFLA_BRIDGE_CFM_MEP_STATUS_MAX (__IFLA_BRIDGE_CFM_MEP_STATUS_MAX - 1)
440                                                   440 
441 enum {                                            441 enum {
442         IFLA_BRIDGE_CFM_CC_PEER_STATUS_UNSPEC,    442         IFLA_BRIDGE_CFM_CC_PEER_STATUS_UNSPEC,
443         IFLA_BRIDGE_CFM_CC_PEER_STATUS_INSTANC    443         IFLA_BRIDGE_CFM_CC_PEER_STATUS_INSTANCE,
444         IFLA_BRIDGE_CFM_CC_PEER_STATUS_PEER_ME    444         IFLA_BRIDGE_CFM_CC_PEER_STATUS_PEER_MEPID,
445         IFLA_BRIDGE_CFM_CC_PEER_STATUS_CCM_DEF    445         IFLA_BRIDGE_CFM_CC_PEER_STATUS_CCM_DEFECT,
446         IFLA_BRIDGE_CFM_CC_PEER_STATUS_RDI,       446         IFLA_BRIDGE_CFM_CC_PEER_STATUS_RDI,
447         IFLA_BRIDGE_CFM_CC_PEER_STATUS_PORT_TL    447         IFLA_BRIDGE_CFM_CC_PEER_STATUS_PORT_TLV_VALUE,
448         IFLA_BRIDGE_CFM_CC_PEER_STATUS_IF_TLV_    448         IFLA_BRIDGE_CFM_CC_PEER_STATUS_IF_TLV_VALUE,
449         IFLA_BRIDGE_CFM_CC_PEER_STATUS_SEEN,      449         IFLA_BRIDGE_CFM_CC_PEER_STATUS_SEEN,
450         IFLA_BRIDGE_CFM_CC_PEER_STATUS_TLV_SEE    450         IFLA_BRIDGE_CFM_CC_PEER_STATUS_TLV_SEEN,
451         IFLA_BRIDGE_CFM_CC_PEER_STATUS_SEQ_UNE    451         IFLA_BRIDGE_CFM_CC_PEER_STATUS_SEQ_UNEXP_SEEN,
452         __IFLA_BRIDGE_CFM_CC_PEER_STATUS_MAX,     452         __IFLA_BRIDGE_CFM_CC_PEER_STATUS_MAX,
453 };                                                453 };
454                                                   454 
455 #define IFLA_BRIDGE_CFM_CC_PEER_STATUS_MAX (__    455 #define IFLA_BRIDGE_CFM_CC_PEER_STATUS_MAX (__IFLA_BRIDGE_CFM_CC_PEER_STATUS_MAX - 1)
456                                                   456 
457 enum {                                            457 enum {
458         IFLA_BRIDGE_MST_UNSPEC,                   458         IFLA_BRIDGE_MST_UNSPEC,
459         IFLA_BRIDGE_MST_ENTRY,                    459         IFLA_BRIDGE_MST_ENTRY,
460         __IFLA_BRIDGE_MST_MAX,                    460         __IFLA_BRIDGE_MST_MAX,
461 };                                                461 };
462 #define IFLA_BRIDGE_MST_MAX (__IFLA_BRIDGE_MST    462 #define IFLA_BRIDGE_MST_MAX (__IFLA_BRIDGE_MST_MAX - 1)
463                                                   463 
464 enum {                                            464 enum {
465         IFLA_BRIDGE_MST_ENTRY_UNSPEC,             465         IFLA_BRIDGE_MST_ENTRY_UNSPEC,
466         IFLA_BRIDGE_MST_ENTRY_MSTI,               466         IFLA_BRIDGE_MST_ENTRY_MSTI,
467         IFLA_BRIDGE_MST_ENTRY_STATE,              467         IFLA_BRIDGE_MST_ENTRY_STATE,
468         __IFLA_BRIDGE_MST_ENTRY_MAX,              468         __IFLA_BRIDGE_MST_ENTRY_MAX,
469 };                                                469 };
470 #define IFLA_BRIDGE_MST_ENTRY_MAX (__IFLA_BRID    470 #define IFLA_BRIDGE_MST_ENTRY_MAX (__IFLA_BRIDGE_MST_ENTRY_MAX - 1)
471                                                   471 
472 struct bridge_stp_xstats {                        472 struct bridge_stp_xstats {
473         __u64 transition_blk;                     473         __u64 transition_blk;
474         __u64 transition_fwd;                     474         __u64 transition_fwd;
475         __u64 rx_bpdu;                            475         __u64 rx_bpdu;
476         __u64 tx_bpdu;                            476         __u64 tx_bpdu;
477         __u64 rx_tcn;                             477         __u64 rx_tcn;
478         __u64 tx_tcn;                             478         __u64 tx_tcn;
479 };                                                479 };
480                                                   480 
481 /* Bridge vlan RTM header */                      481 /* Bridge vlan RTM header */
482 struct br_vlan_msg {                              482 struct br_vlan_msg {
483         __u8 family;                              483         __u8 family;
484         __u8 reserved1;                           484         __u8 reserved1;
485         __u16 reserved2;                          485         __u16 reserved2;
486         __u32 ifindex;                            486         __u32 ifindex;
487 };                                                487 };
488                                                   488 
489 enum {                                            489 enum {
490         BRIDGE_VLANDB_DUMP_UNSPEC,                490         BRIDGE_VLANDB_DUMP_UNSPEC,
491         BRIDGE_VLANDB_DUMP_FLAGS,                 491         BRIDGE_VLANDB_DUMP_FLAGS,
492         __BRIDGE_VLANDB_DUMP_MAX,                 492         __BRIDGE_VLANDB_DUMP_MAX,
493 };                                                493 };
494 #define BRIDGE_VLANDB_DUMP_MAX (__BRIDGE_VLAND    494 #define BRIDGE_VLANDB_DUMP_MAX (__BRIDGE_VLANDB_DUMP_MAX - 1)
495                                                   495 
496 /* flags used in BRIDGE_VLANDB_DUMP_FLAGS attr    496 /* flags used in BRIDGE_VLANDB_DUMP_FLAGS attribute to affect dumps */
497 #define BRIDGE_VLANDB_DUMPF_STATS       (1 <<     497 #define BRIDGE_VLANDB_DUMPF_STATS       (1 << 0) /* Include stats in the dump */
498 #define BRIDGE_VLANDB_DUMPF_GLOBAL      (1 <<     498 #define BRIDGE_VLANDB_DUMPF_GLOBAL      (1 << 1) /* Dump global vlan options only */
499                                                   499 
500 /* Bridge vlan RTM attributes                     500 /* Bridge vlan RTM attributes
501  * [BRIDGE_VLANDB_ENTRY] = {                      501  * [BRIDGE_VLANDB_ENTRY] = {
502  *     [BRIDGE_VLANDB_ENTRY_INFO]                 502  *     [BRIDGE_VLANDB_ENTRY_INFO]
503  *     ...                                        503  *     ...
504  * }                                              504  * }
505  * [BRIDGE_VLANDB_GLOBAL_OPTIONS] = {             505  * [BRIDGE_VLANDB_GLOBAL_OPTIONS] = {
506  *     [BRIDGE_VLANDB_GOPTS_ID]                   506  *     [BRIDGE_VLANDB_GOPTS_ID]
507  *     ...                                        507  *     ...
508  * }                                              508  * }
509  */                                               509  */
510 enum {                                            510 enum {
511         BRIDGE_VLANDB_UNSPEC,                     511         BRIDGE_VLANDB_UNSPEC,
512         BRIDGE_VLANDB_ENTRY,                      512         BRIDGE_VLANDB_ENTRY,
513         BRIDGE_VLANDB_GLOBAL_OPTIONS,             513         BRIDGE_VLANDB_GLOBAL_OPTIONS,
514         __BRIDGE_VLANDB_MAX,                      514         __BRIDGE_VLANDB_MAX,
515 };                                                515 };
516 #define BRIDGE_VLANDB_MAX (__BRIDGE_VLANDB_MAX    516 #define BRIDGE_VLANDB_MAX (__BRIDGE_VLANDB_MAX - 1)
517                                                   517 
518 enum {                                            518 enum {
519         BRIDGE_VLANDB_ENTRY_UNSPEC,               519         BRIDGE_VLANDB_ENTRY_UNSPEC,
520         BRIDGE_VLANDB_ENTRY_INFO,                 520         BRIDGE_VLANDB_ENTRY_INFO,
521         BRIDGE_VLANDB_ENTRY_RANGE,                521         BRIDGE_VLANDB_ENTRY_RANGE,
522         BRIDGE_VLANDB_ENTRY_STATE,                522         BRIDGE_VLANDB_ENTRY_STATE,
523         BRIDGE_VLANDB_ENTRY_TUNNEL_INFO,          523         BRIDGE_VLANDB_ENTRY_TUNNEL_INFO,
524         BRIDGE_VLANDB_ENTRY_STATS,                524         BRIDGE_VLANDB_ENTRY_STATS,
525         BRIDGE_VLANDB_ENTRY_MCAST_ROUTER,         525         BRIDGE_VLANDB_ENTRY_MCAST_ROUTER,
526         BRIDGE_VLANDB_ENTRY_MCAST_N_GROUPS,       526         BRIDGE_VLANDB_ENTRY_MCAST_N_GROUPS,
527         BRIDGE_VLANDB_ENTRY_MCAST_MAX_GROUPS,     527         BRIDGE_VLANDB_ENTRY_MCAST_MAX_GROUPS,
528         BRIDGE_VLANDB_ENTRY_NEIGH_SUPPRESS,       528         BRIDGE_VLANDB_ENTRY_NEIGH_SUPPRESS,
529         __BRIDGE_VLANDB_ENTRY_MAX,                529         __BRIDGE_VLANDB_ENTRY_MAX,
530 };                                                530 };
531 #define BRIDGE_VLANDB_ENTRY_MAX (__BRIDGE_VLAN    531 #define BRIDGE_VLANDB_ENTRY_MAX (__BRIDGE_VLANDB_ENTRY_MAX - 1)
532                                                   532 
533 /* [BRIDGE_VLANDB_ENTRY] = {                      533 /* [BRIDGE_VLANDB_ENTRY] = {
534  *     [BRIDGE_VLANDB_ENTRY_TUNNEL_INFO] = {      534  *     [BRIDGE_VLANDB_ENTRY_TUNNEL_INFO] = {
535  *         [BRIDGE_VLANDB_TINFO_ID]               535  *         [BRIDGE_VLANDB_TINFO_ID]
536  *         ...                                    536  *         ...
537  *     }                                          537  *     }
538  * }                                              538  * }
539  */                                               539  */
540 enum {                                            540 enum {
541         BRIDGE_VLANDB_TINFO_UNSPEC,               541         BRIDGE_VLANDB_TINFO_UNSPEC,
542         BRIDGE_VLANDB_TINFO_ID,                   542         BRIDGE_VLANDB_TINFO_ID,
543         BRIDGE_VLANDB_TINFO_CMD,                  543         BRIDGE_VLANDB_TINFO_CMD,
544         __BRIDGE_VLANDB_TINFO_MAX,                544         __BRIDGE_VLANDB_TINFO_MAX,
545 };                                                545 };
546 #define BRIDGE_VLANDB_TINFO_MAX (__BRIDGE_VLAN    546 #define BRIDGE_VLANDB_TINFO_MAX (__BRIDGE_VLANDB_TINFO_MAX - 1)
547                                                   547 
548 /* [BRIDGE_VLANDB_ENTRY] = {                      548 /* [BRIDGE_VLANDB_ENTRY] = {
549  *     [BRIDGE_VLANDB_ENTRY_STATS] = {            549  *     [BRIDGE_VLANDB_ENTRY_STATS] = {
550  *         [BRIDGE_VLANDB_STATS_RX_BYTES]         550  *         [BRIDGE_VLANDB_STATS_RX_BYTES]
551  *         ...                                    551  *         ...
552  *     }                                          552  *     }
553  *     ...                                        553  *     ...
554  * }                                              554  * }
555  */                                               555  */
556 enum {                                            556 enum {
557         BRIDGE_VLANDB_STATS_UNSPEC,               557         BRIDGE_VLANDB_STATS_UNSPEC,
558         BRIDGE_VLANDB_STATS_RX_BYTES,             558         BRIDGE_VLANDB_STATS_RX_BYTES,
559         BRIDGE_VLANDB_STATS_RX_PACKETS,           559         BRIDGE_VLANDB_STATS_RX_PACKETS,
560         BRIDGE_VLANDB_STATS_TX_BYTES,             560         BRIDGE_VLANDB_STATS_TX_BYTES,
561         BRIDGE_VLANDB_STATS_TX_PACKETS,           561         BRIDGE_VLANDB_STATS_TX_PACKETS,
562         BRIDGE_VLANDB_STATS_PAD,                  562         BRIDGE_VLANDB_STATS_PAD,
563         __BRIDGE_VLANDB_STATS_MAX,                563         __BRIDGE_VLANDB_STATS_MAX,
564 };                                                564 };
565 #define BRIDGE_VLANDB_STATS_MAX (__BRIDGE_VLAN    565 #define BRIDGE_VLANDB_STATS_MAX (__BRIDGE_VLANDB_STATS_MAX - 1)
566                                                   566 
567 enum {                                            567 enum {
568         BRIDGE_VLANDB_GOPTS_UNSPEC,               568         BRIDGE_VLANDB_GOPTS_UNSPEC,
569         BRIDGE_VLANDB_GOPTS_ID,                   569         BRIDGE_VLANDB_GOPTS_ID,
570         BRIDGE_VLANDB_GOPTS_RANGE,                570         BRIDGE_VLANDB_GOPTS_RANGE,
571         BRIDGE_VLANDB_GOPTS_MCAST_SNOOPING,       571         BRIDGE_VLANDB_GOPTS_MCAST_SNOOPING,
572         BRIDGE_VLANDB_GOPTS_MCAST_IGMP_VERSION    572         BRIDGE_VLANDB_GOPTS_MCAST_IGMP_VERSION,
573         BRIDGE_VLANDB_GOPTS_MCAST_MLD_VERSION,    573         BRIDGE_VLANDB_GOPTS_MCAST_MLD_VERSION,
574         BRIDGE_VLANDB_GOPTS_MCAST_LAST_MEMBER_    574         BRIDGE_VLANDB_GOPTS_MCAST_LAST_MEMBER_CNT,
575         BRIDGE_VLANDB_GOPTS_MCAST_STARTUP_QUER    575         BRIDGE_VLANDB_GOPTS_MCAST_STARTUP_QUERY_CNT,
576         BRIDGE_VLANDB_GOPTS_MCAST_LAST_MEMBER_    576         BRIDGE_VLANDB_GOPTS_MCAST_LAST_MEMBER_INTVL,
577         BRIDGE_VLANDB_GOPTS_PAD,                  577         BRIDGE_VLANDB_GOPTS_PAD,
578         BRIDGE_VLANDB_GOPTS_MCAST_MEMBERSHIP_I    578         BRIDGE_VLANDB_GOPTS_MCAST_MEMBERSHIP_INTVL,
579         BRIDGE_VLANDB_GOPTS_MCAST_QUERIER_INTV    579         BRIDGE_VLANDB_GOPTS_MCAST_QUERIER_INTVL,
580         BRIDGE_VLANDB_GOPTS_MCAST_QUERY_INTVL,    580         BRIDGE_VLANDB_GOPTS_MCAST_QUERY_INTVL,
581         BRIDGE_VLANDB_GOPTS_MCAST_QUERY_RESPON    581         BRIDGE_VLANDB_GOPTS_MCAST_QUERY_RESPONSE_INTVL,
582         BRIDGE_VLANDB_GOPTS_MCAST_STARTUP_QUER    582         BRIDGE_VLANDB_GOPTS_MCAST_STARTUP_QUERY_INTVL,
583         BRIDGE_VLANDB_GOPTS_MCAST_QUERIER,        583         BRIDGE_VLANDB_GOPTS_MCAST_QUERIER,
584         BRIDGE_VLANDB_GOPTS_MCAST_ROUTER_PORTS    584         BRIDGE_VLANDB_GOPTS_MCAST_ROUTER_PORTS,
585         BRIDGE_VLANDB_GOPTS_MCAST_QUERIER_STAT    585         BRIDGE_VLANDB_GOPTS_MCAST_QUERIER_STATE,
586         BRIDGE_VLANDB_GOPTS_MSTI,                 586         BRIDGE_VLANDB_GOPTS_MSTI,
587         __BRIDGE_VLANDB_GOPTS_MAX                 587         __BRIDGE_VLANDB_GOPTS_MAX
588 };                                                588 };
589 #define BRIDGE_VLANDB_GOPTS_MAX (__BRIDGE_VLAN    589 #define BRIDGE_VLANDB_GOPTS_MAX (__BRIDGE_VLANDB_GOPTS_MAX - 1)
590                                                   590 
591 /* Bridge multicast database attributes           591 /* Bridge multicast database attributes
592  * [MDBA_MDB] = {                                 592  * [MDBA_MDB] = {
593  *     [MDBA_MDB_ENTRY] = {                       593  *     [MDBA_MDB_ENTRY] = {
594  *         [MDBA_MDB_ENTRY_INFO] {                594  *         [MDBA_MDB_ENTRY_INFO] {
595  *              struct br_mdb_entry               595  *              struct br_mdb_entry
596  *              [MDBA_MDB_EATTR attributes]       596  *              [MDBA_MDB_EATTR attributes]
597  *         }                                      597  *         }
598  *     }                                          598  *     }
599  * }                                              599  * }
600  * [MDBA_ROUTER] = {                              600  * [MDBA_ROUTER] = {
601  *    [MDBA_ROUTER_PORT] = {                      601  *    [MDBA_ROUTER_PORT] = {
602  *        u32 ifindex                             602  *        u32 ifindex
603  *        [MDBA_ROUTER_PATTR attributes]          603  *        [MDBA_ROUTER_PATTR attributes]
604  *    }                                           604  *    }
605  * }                                              605  * }
606  */                                               606  */
607 enum {                                            607 enum {
608         MDBA_UNSPEC,                              608         MDBA_UNSPEC,
609         MDBA_MDB,                                 609         MDBA_MDB,
610         MDBA_ROUTER,                              610         MDBA_ROUTER,
611         __MDBA_MAX,                               611         __MDBA_MAX,
612 };                                                612 };
613 #define MDBA_MAX (__MDBA_MAX - 1)                 613 #define MDBA_MAX (__MDBA_MAX - 1)
614                                                   614 
615 enum {                                            615 enum {
616         MDBA_MDB_UNSPEC,                          616         MDBA_MDB_UNSPEC,
617         MDBA_MDB_ENTRY,                           617         MDBA_MDB_ENTRY,
618         __MDBA_MDB_MAX,                           618         __MDBA_MDB_MAX,
619 };                                                619 };
620 #define MDBA_MDB_MAX (__MDBA_MDB_MAX - 1)         620 #define MDBA_MDB_MAX (__MDBA_MDB_MAX - 1)
621                                                   621 
622 enum {                                            622 enum {
623         MDBA_MDB_ENTRY_UNSPEC,                    623         MDBA_MDB_ENTRY_UNSPEC,
624         MDBA_MDB_ENTRY_INFO,                      624         MDBA_MDB_ENTRY_INFO,
625         __MDBA_MDB_ENTRY_MAX,                     625         __MDBA_MDB_ENTRY_MAX,
626 };                                                626 };
627 #define MDBA_MDB_ENTRY_MAX (__MDBA_MDB_ENTRY_M    627 #define MDBA_MDB_ENTRY_MAX (__MDBA_MDB_ENTRY_MAX - 1)
628                                                   628 
629 /* per mdb entry additional attributes */         629 /* per mdb entry additional attributes */
630 enum {                                            630 enum {
631         MDBA_MDB_EATTR_UNSPEC,                    631         MDBA_MDB_EATTR_UNSPEC,
632         MDBA_MDB_EATTR_TIMER,                     632         MDBA_MDB_EATTR_TIMER,
633         MDBA_MDB_EATTR_SRC_LIST,                  633         MDBA_MDB_EATTR_SRC_LIST,
634         MDBA_MDB_EATTR_GROUP_MODE,                634         MDBA_MDB_EATTR_GROUP_MODE,
635         MDBA_MDB_EATTR_SOURCE,                    635         MDBA_MDB_EATTR_SOURCE,
636         MDBA_MDB_EATTR_RTPROT,                    636         MDBA_MDB_EATTR_RTPROT,
637         MDBA_MDB_EATTR_DST,                       637         MDBA_MDB_EATTR_DST,
638         MDBA_MDB_EATTR_DST_PORT,                  638         MDBA_MDB_EATTR_DST_PORT,
639         MDBA_MDB_EATTR_VNI,                       639         MDBA_MDB_EATTR_VNI,
640         MDBA_MDB_EATTR_IFINDEX,                   640         MDBA_MDB_EATTR_IFINDEX,
641         MDBA_MDB_EATTR_SRC_VNI,                   641         MDBA_MDB_EATTR_SRC_VNI,
642         __MDBA_MDB_EATTR_MAX                      642         __MDBA_MDB_EATTR_MAX
643 };                                                643 };
644 #define MDBA_MDB_EATTR_MAX (__MDBA_MDB_EATTR_M    644 #define MDBA_MDB_EATTR_MAX (__MDBA_MDB_EATTR_MAX - 1)
645                                                   645 
646 /* per mdb entry source */                        646 /* per mdb entry source */
647 enum {                                            647 enum {
648         MDBA_MDB_SRCLIST_UNSPEC,                  648         MDBA_MDB_SRCLIST_UNSPEC,
649         MDBA_MDB_SRCLIST_ENTRY,                   649         MDBA_MDB_SRCLIST_ENTRY,
650         __MDBA_MDB_SRCLIST_MAX                    650         __MDBA_MDB_SRCLIST_MAX
651 };                                                651 };
652 #define MDBA_MDB_SRCLIST_MAX (__MDBA_MDB_SRCLI    652 #define MDBA_MDB_SRCLIST_MAX (__MDBA_MDB_SRCLIST_MAX - 1)
653                                                   653 
654 /* per mdb entry per source attributes            654 /* per mdb entry per source attributes
655  * these are embedded in MDBA_MDB_SRCLIST_ENTR    655  * these are embedded in MDBA_MDB_SRCLIST_ENTRY
656  */                                               656  */
657 enum {                                            657 enum {
658         MDBA_MDB_SRCATTR_UNSPEC,                  658         MDBA_MDB_SRCATTR_UNSPEC,
659         MDBA_MDB_SRCATTR_ADDRESS,                 659         MDBA_MDB_SRCATTR_ADDRESS,
660         MDBA_MDB_SRCATTR_TIMER,                   660         MDBA_MDB_SRCATTR_TIMER,
661         __MDBA_MDB_SRCATTR_MAX                    661         __MDBA_MDB_SRCATTR_MAX
662 };                                                662 };
663 #define MDBA_MDB_SRCATTR_MAX (__MDBA_MDB_SRCAT    663 #define MDBA_MDB_SRCATTR_MAX (__MDBA_MDB_SRCATTR_MAX - 1)
664                                                   664 
665 /* multicast router types */                      665 /* multicast router types */
666 enum {                                            666 enum {
667         MDB_RTR_TYPE_DISABLED,                    667         MDB_RTR_TYPE_DISABLED,
668         MDB_RTR_TYPE_TEMP_QUERY,                  668         MDB_RTR_TYPE_TEMP_QUERY,
669         MDB_RTR_TYPE_PERM,                        669         MDB_RTR_TYPE_PERM,
670         MDB_RTR_TYPE_TEMP                         670         MDB_RTR_TYPE_TEMP
671 };                                                671 };
672                                                   672 
673 enum {                                            673 enum {
674         MDBA_ROUTER_UNSPEC,                       674         MDBA_ROUTER_UNSPEC,
675         MDBA_ROUTER_PORT,                         675         MDBA_ROUTER_PORT,
676         __MDBA_ROUTER_MAX,                        676         __MDBA_ROUTER_MAX,
677 };                                                677 };
678 #define MDBA_ROUTER_MAX (__MDBA_ROUTER_MAX - 1    678 #define MDBA_ROUTER_MAX (__MDBA_ROUTER_MAX - 1)
679                                                   679 
680 /* router port attributes */                      680 /* router port attributes */
681 enum {                                            681 enum {
682         MDBA_ROUTER_PATTR_UNSPEC,                 682         MDBA_ROUTER_PATTR_UNSPEC,
683         MDBA_ROUTER_PATTR_TIMER,                  683         MDBA_ROUTER_PATTR_TIMER,
684         MDBA_ROUTER_PATTR_TYPE,                   684         MDBA_ROUTER_PATTR_TYPE,
685         MDBA_ROUTER_PATTR_INET_TIMER,             685         MDBA_ROUTER_PATTR_INET_TIMER,
686         MDBA_ROUTER_PATTR_INET6_TIMER,            686         MDBA_ROUTER_PATTR_INET6_TIMER,
687         MDBA_ROUTER_PATTR_VID,                    687         MDBA_ROUTER_PATTR_VID,
688         __MDBA_ROUTER_PATTR_MAX                   688         __MDBA_ROUTER_PATTR_MAX
689 };                                                689 };
690 #define MDBA_ROUTER_PATTR_MAX (__MDBA_ROUTER_P    690 #define MDBA_ROUTER_PATTR_MAX (__MDBA_ROUTER_PATTR_MAX - 1)
691                                                   691 
692 struct br_port_msg {                              692 struct br_port_msg {
693         __u8  family;                             693         __u8  family;
694         __u32 ifindex;                            694         __u32 ifindex;
695 };                                                695 };
696                                                   696 
697 struct br_mdb_entry {                             697 struct br_mdb_entry {
698         __u32 ifindex;                            698         __u32 ifindex;
699 #define MDB_TEMPORARY 0                           699 #define MDB_TEMPORARY 0
700 #define MDB_PERMANENT 1                           700 #define MDB_PERMANENT 1
701         __u8 state;                               701         __u8 state;
702 #define MDB_FLAGS_OFFLOAD       (1 << 0)          702 #define MDB_FLAGS_OFFLOAD       (1 << 0)
703 #define MDB_FLAGS_FAST_LEAVE    (1 << 1)          703 #define MDB_FLAGS_FAST_LEAVE    (1 << 1)
704 #define MDB_FLAGS_STAR_EXCL     (1 << 2)          704 #define MDB_FLAGS_STAR_EXCL     (1 << 2)
705 #define MDB_FLAGS_BLOCKED       (1 << 3)          705 #define MDB_FLAGS_BLOCKED       (1 << 3)
706         __u8 flags;                               706         __u8 flags;
707         __u16 vid;                                707         __u16 vid;
708         struct {                                  708         struct {
709                 union {                           709                 union {
710                         __be32  ip4;              710                         __be32  ip4;
711                         struct in6_addr ip6;      711                         struct in6_addr ip6;
712                         unsigned char mac_addr    712                         unsigned char mac_addr[ETH_ALEN];
713                 } u;                              713                 } u;
714                 __be16          proto;            714                 __be16          proto;
715         } addr;                                   715         } addr;
716 };                                                716 };
717                                                   717 
718 enum {                                            718 enum {
719         MDBA_SET_ENTRY_UNSPEC,                    719         MDBA_SET_ENTRY_UNSPEC,
720         MDBA_SET_ENTRY,                           720         MDBA_SET_ENTRY,
721         MDBA_SET_ENTRY_ATTRS,                     721         MDBA_SET_ENTRY_ATTRS,
722         __MDBA_SET_ENTRY_MAX,                     722         __MDBA_SET_ENTRY_MAX,
723 };                                                723 };
724 #define MDBA_SET_ENTRY_MAX (__MDBA_SET_ENTRY_M    724 #define MDBA_SET_ENTRY_MAX (__MDBA_SET_ENTRY_MAX - 1)
725                                                   725 
726 /* [MDBA_GET_ENTRY] = {                           726 /* [MDBA_GET_ENTRY] = {
727  *    struct br_mdb_entry                         727  *    struct br_mdb_entry
728  *    [MDBA_GET_ENTRY_ATTRS] = {                  728  *    [MDBA_GET_ENTRY_ATTRS] = {
729  *       [MDBE_ATTR_SOURCE]                       729  *       [MDBE_ATTR_SOURCE]
730  *          struct in_addr / struct in6_addr      730  *          struct in_addr / struct in6_addr
731  *       [MDBE_ATTR_SRC_VNI]                      731  *       [MDBE_ATTR_SRC_VNI]
732  *          u32                                   732  *          u32
733  *    }                                           733  *    }
734  * }                                              734  * }
735  */                                               735  */
736 enum {                                            736 enum {
737         MDBA_GET_ENTRY_UNSPEC,                    737         MDBA_GET_ENTRY_UNSPEC,
738         MDBA_GET_ENTRY,                           738         MDBA_GET_ENTRY,
739         MDBA_GET_ENTRY_ATTRS,                     739         MDBA_GET_ENTRY_ATTRS,
740         __MDBA_GET_ENTRY_MAX,                     740         __MDBA_GET_ENTRY_MAX,
741 };                                                741 };
742 #define MDBA_GET_ENTRY_MAX (__MDBA_GET_ENTRY_M    742 #define MDBA_GET_ENTRY_MAX (__MDBA_GET_ENTRY_MAX - 1)
743                                                   743 
744 /* [MDBA_SET_ENTRY_ATTRS] = {                     744 /* [MDBA_SET_ENTRY_ATTRS] = {
745  *    [MDBE_ATTR_xxx]                             745  *    [MDBE_ATTR_xxx]
746  *    ...                                         746  *    ...
747  * }                                              747  * }
748  */                                               748  */
749 enum {                                            749 enum {
750         MDBE_ATTR_UNSPEC,                         750         MDBE_ATTR_UNSPEC,
751         MDBE_ATTR_SOURCE,                         751         MDBE_ATTR_SOURCE,
752         MDBE_ATTR_SRC_LIST,                       752         MDBE_ATTR_SRC_LIST,
753         MDBE_ATTR_GROUP_MODE,                     753         MDBE_ATTR_GROUP_MODE,
754         MDBE_ATTR_RTPROT,                         754         MDBE_ATTR_RTPROT,
755         MDBE_ATTR_DST,                            755         MDBE_ATTR_DST,
756         MDBE_ATTR_DST_PORT,                       756         MDBE_ATTR_DST_PORT,
757         MDBE_ATTR_VNI,                            757         MDBE_ATTR_VNI,
758         MDBE_ATTR_IFINDEX,                        758         MDBE_ATTR_IFINDEX,
759         MDBE_ATTR_SRC_VNI,                        759         MDBE_ATTR_SRC_VNI,
760         MDBE_ATTR_STATE_MASK,                     760         MDBE_ATTR_STATE_MASK,
761         __MDBE_ATTR_MAX,                          761         __MDBE_ATTR_MAX,
762 };                                                762 };
763 #define MDBE_ATTR_MAX (__MDBE_ATTR_MAX - 1)       763 #define MDBE_ATTR_MAX (__MDBE_ATTR_MAX - 1)
764                                                   764 
765 /* per mdb entry source */                        765 /* per mdb entry source */
766 enum {                                            766 enum {
767         MDBE_SRC_LIST_UNSPEC,                     767         MDBE_SRC_LIST_UNSPEC,
768         MDBE_SRC_LIST_ENTRY,                      768         MDBE_SRC_LIST_ENTRY,
769         __MDBE_SRC_LIST_MAX,                      769         __MDBE_SRC_LIST_MAX,
770 };                                                770 };
771 #define MDBE_SRC_LIST_MAX (__MDBE_SRC_LIST_MAX    771 #define MDBE_SRC_LIST_MAX (__MDBE_SRC_LIST_MAX - 1)
772                                                   772 
773 /* per mdb entry per source attributes            773 /* per mdb entry per source attributes
774  * these are embedded in MDBE_SRC_LIST_ENTRY      774  * these are embedded in MDBE_SRC_LIST_ENTRY
775  */                                               775  */
776 enum {                                            776 enum {
777         MDBE_SRCATTR_UNSPEC,                      777         MDBE_SRCATTR_UNSPEC,
778         MDBE_SRCATTR_ADDRESS,                     778         MDBE_SRCATTR_ADDRESS,
779         __MDBE_SRCATTR_MAX,                       779         __MDBE_SRCATTR_MAX,
780 };                                                780 };
781 #define MDBE_SRCATTR_MAX (__MDBE_SRCATTR_MAX -    781 #define MDBE_SRCATTR_MAX (__MDBE_SRCATTR_MAX - 1)
782                                                   782 
783 /* Embedded inside LINK_XSTATS_TYPE_BRIDGE */     783 /* Embedded inside LINK_XSTATS_TYPE_BRIDGE */
784 enum {                                            784 enum {
785         BRIDGE_XSTATS_UNSPEC,                     785         BRIDGE_XSTATS_UNSPEC,
786         BRIDGE_XSTATS_VLAN,                       786         BRIDGE_XSTATS_VLAN,
787         BRIDGE_XSTATS_MCAST,                      787         BRIDGE_XSTATS_MCAST,
788         BRIDGE_XSTATS_PAD,                        788         BRIDGE_XSTATS_PAD,
789         BRIDGE_XSTATS_STP,                        789         BRIDGE_XSTATS_STP,
790         __BRIDGE_XSTATS_MAX                       790         __BRIDGE_XSTATS_MAX
791 };                                                791 };
792 #define BRIDGE_XSTATS_MAX (__BRIDGE_XSTATS_MAX    792 #define BRIDGE_XSTATS_MAX (__BRIDGE_XSTATS_MAX - 1)
793                                                   793 
794 enum {                                            794 enum {
795         BR_MCAST_DIR_RX,                          795         BR_MCAST_DIR_RX,
796         BR_MCAST_DIR_TX,                          796         BR_MCAST_DIR_TX,
797         BR_MCAST_DIR_SIZE                         797         BR_MCAST_DIR_SIZE
798 };                                                798 };
799                                                   799 
800 /* IGMP/MLD statistics */                         800 /* IGMP/MLD statistics */
801 struct br_mcast_stats {                           801 struct br_mcast_stats {
802         __u64 igmp_v1queries[BR_MCAST_DIR_SIZE    802         __u64 igmp_v1queries[BR_MCAST_DIR_SIZE];
803         __u64 igmp_v2queries[BR_MCAST_DIR_SIZE    803         __u64 igmp_v2queries[BR_MCAST_DIR_SIZE];
804         __u64 igmp_v3queries[BR_MCAST_DIR_SIZE    804         __u64 igmp_v3queries[BR_MCAST_DIR_SIZE];
805         __u64 igmp_leaves[BR_MCAST_DIR_SIZE];     805         __u64 igmp_leaves[BR_MCAST_DIR_SIZE];
806         __u64 igmp_v1reports[BR_MCAST_DIR_SIZE    806         __u64 igmp_v1reports[BR_MCAST_DIR_SIZE];
807         __u64 igmp_v2reports[BR_MCAST_DIR_SIZE    807         __u64 igmp_v2reports[BR_MCAST_DIR_SIZE];
808         __u64 igmp_v3reports[BR_MCAST_DIR_SIZE    808         __u64 igmp_v3reports[BR_MCAST_DIR_SIZE];
809         __u64 igmp_parse_errors;                  809         __u64 igmp_parse_errors;
810                                                   810 
811         __u64 mld_v1queries[BR_MCAST_DIR_SIZE]    811         __u64 mld_v1queries[BR_MCAST_DIR_SIZE];
812         __u64 mld_v2queries[BR_MCAST_DIR_SIZE]    812         __u64 mld_v2queries[BR_MCAST_DIR_SIZE];
813         __u64 mld_leaves[BR_MCAST_DIR_SIZE];      813         __u64 mld_leaves[BR_MCAST_DIR_SIZE];
814         __u64 mld_v1reports[BR_MCAST_DIR_SIZE]    814         __u64 mld_v1reports[BR_MCAST_DIR_SIZE];
815         __u64 mld_v2reports[BR_MCAST_DIR_SIZE]    815         __u64 mld_v2reports[BR_MCAST_DIR_SIZE];
816         __u64 mld_parse_errors;                   816         __u64 mld_parse_errors;
817                                                   817 
818         __u64 mcast_bytes[BR_MCAST_DIR_SIZE];     818         __u64 mcast_bytes[BR_MCAST_DIR_SIZE];
819         __u64 mcast_packets[BR_MCAST_DIR_SIZE]    819         __u64 mcast_packets[BR_MCAST_DIR_SIZE];
820 };                                                820 };
821                                                   821 
822 /* bridge boolean options                         822 /* bridge boolean options
823  * BR_BOOLOPT_NO_LL_LEARN - disable learning f    823  * BR_BOOLOPT_NO_LL_LEARN - disable learning from link-local packets
824  * BR_BOOLOPT_MCAST_VLAN_SNOOPING - control vl    824  * BR_BOOLOPT_MCAST_VLAN_SNOOPING - control vlan multicast snooping
825  *                                                825  *
826  * IMPORTANT: if adding a new option do not fo    826  * IMPORTANT: if adding a new option do not forget to handle
827  *            it in br_boolopt_toggle/get and     827  *            it in br_boolopt_toggle/get and bridge sysfs
828  */                                               828  */
829 enum br_boolopt_id {                              829 enum br_boolopt_id {
830         BR_BOOLOPT_NO_LL_LEARN,                   830         BR_BOOLOPT_NO_LL_LEARN,
831         BR_BOOLOPT_MCAST_VLAN_SNOOPING,           831         BR_BOOLOPT_MCAST_VLAN_SNOOPING,
832         BR_BOOLOPT_MST_ENABLE,                    832         BR_BOOLOPT_MST_ENABLE,
833         BR_BOOLOPT_MAX                            833         BR_BOOLOPT_MAX
834 };                                                834 };
835                                                   835 
836 /* struct br_boolopt_multi - change multiple b    836 /* struct br_boolopt_multi - change multiple bridge boolean options
837  *                                                837  *
838  * @optval: new option values (bit per option)    838  * @optval: new option values (bit per option)
839  * @optmask: options to change (bit per option    839  * @optmask: options to change (bit per option)
840  */                                               840  */
841 struct br_boolopt_multi {                         841 struct br_boolopt_multi {
842         __u32 optval;                             842         __u32 optval;
843         __u32 optmask;                            843         __u32 optmask;
844 };                                                844 };
845                                                   845 
846 enum {                                            846 enum {
847         BRIDGE_QUERIER_UNSPEC,                    847         BRIDGE_QUERIER_UNSPEC,
848         BRIDGE_QUERIER_IP_ADDRESS,                848         BRIDGE_QUERIER_IP_ADDRESS,
849         BRIDGE_QUERIER_IP_PORT,                   849         BRIDGE_QUERIER_IP_PORT,
850         BRIDGE_QUERIER_IP_OTHER_TIMER,            850         BRIDGE_QUERIER_IP_OTHER_TIMER,
851         BRIDGE_QUERIER_PAD,                       851         BRIDGE_QUERIER_PAD,
852         BRIDGE_QUERIER_IPV6_ADDRESS,              852         BRIDGE_QUERIER_IPV6_ADDRESS,
853         BRIDGE_QUERIER_IPV6_PORT,                 853         BRIDGE_QUERIER_IPV6_PORT,
854         BRIDGE_QUERIER_IPV6_OTHER_TIMER,          854         BRIDGE_QUERIER_IPV6_OTHER_TIMER,
855         __BRIDGE_QUERIER_MAX                      855         __BRIDGE_QUERIER_MAX
856 };                                                856 };
857 #define BRIDGE_QUERIER_MAX (__BRIDGE_QUERIER_M    857 #define BRIDGE_QUERIER_MAX (__BRIDGE_QUERIER_MAX - 1)
858 #endif /* _UAPI_LINUX_IF_BRIDGE_H */              858 #endif /* _UAPI_LINUX_IF_BRIDGE_H */
859                                                   859 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php