blob: 48f634575a12dd50007a08fec9e4da4b9569710f [file] [log] [blame]
Ben Cheng655a7c02013-10-16 16:09:24 -07001/****************************************************************************
2 ****************************************************************************
3 ***
4 *** This header was automatically generated from a Linux kernel header
5 *** of the same name, to make information necessary for userspace to
6 *** call into the kernel available to libc. It contains only constants,
7 *** structures, and macros generated from the original header, and thus,
8 *** contains no copyrightable information.
9 ***
10 *** To edit the content of this header, modify the corresponding
11 *** source file (e.g. under external/kernel-headers/original/) then
12 *** run bionic/libc/kernel/tools/update_all.py
13 ***
14 *** Any manual change here will be lost the next time this script will
15 *** be run. You've been warned!
16 ***
17 ****************************************************************************
18 ****************************************************************************/
19#ifndef _UAPI_LINUX_IF_BRIDGE_H
20#define _UAPI_LINUX_IF_BRIDGE_H
21#include <linux/types.h>
Christopher Ferris38062f92014-07-09 15:33:25 -070022#include <linux/if_ether.h>
Christopher Ferris82d75042015-01-26 10:57:07 -080023#include <linux/in6.h>
Christopher Ferris38062f92014-07-09 15:33:25 -070024#define SYSFS_BRIDGE_ATTR "bridge"
Ben Cheng655a7c02013-10-16 16:09:24 -070025#define SYSFS_BRIDGE_FDB "brforward"
26#define SYSFS_BRIDGE_PORT_SUBDIR "brif"
Christopher Ferris82d75042015-01-26 10:57:07 -080027#define SYSFS_BRIDGE_PORT_ATTR "brport"
Christopher Ferris38062f92014-07-09 15:33:25 -070028#define SYSFS_BRIDGE_PORT_LINK "bridge"
Ben Cheng655a7c02013-10-16 16:09:24 -070029#define BRCTL_VERSION 1
30#define BRCTL_GET_VERSION 0
Christopher Ferris82d75042015-01-26 10:57:07 -080031#define BRCTL_GET_BRIDGES 1
Christopher Ferris38062f92014-07-09 15:33:25 -070032#define BRCTL_ADD_BRIDGE 2
Ben Cheng655a7c02013-10-16 16:09:24 -070033#define BRCTL_DEL_BRIDGE 3
34#define BRCTL_ADD_IF 4
Christopher Ferris82d75042015-01-26 10:57:07 -080035#define BRCTL_DEL_IF 5
Christopher Ferris38062f92014-07-09 15:33:25 -070036#define BRCTL_GET_BRIDGE_INFO 6
Ben Cheng655a7c02013-10-16 16:09:24 -070037#define BRCTL_GET_PORT_LIST 7
38#define BRCTL_SET_BRIDGE_FORWARD_DELAY 8
Christopher Ferris82d75042015-01-26 10:57:07 -080039#define BRCTL_SET_BRIDGE_HELLO_TIME 9
Christopher Ferris38062f92014-07-09 15:33:25 -070040#define BRCTL_SET_BRIDGE_MAX_AGE 10
Ben Cheng655a7c02013-10-16 16:09:24 -070041#define BRCTL_SET_AGEING_TIME 11
42#define BRCTL_SET_GC_INTERVAL 12
Christopher Ferris82d75042015-01-26 10:57:07 -080043#define BRCTL_GET_PORT_INFO 13
Christopher Ferris38062f92014-07-09 15:33:25 -070044#define BRCTL_SET_BRIDGE_STP_STATE 14
Ben Cheng655a7c02013-10-16 16:09:24 -070045#define BRCTL_SET_BRIDGE_PRIORITY 15
46#define BRCTL_SET_PORT_PRIORITY 16
Christopher Ferris82d75042015-01-26 10:57:07 -080047#define BRCTL_SET_PATH_COST 17
Christopher Ferris38062f92014-07-09 15:33:25 -070048#define BRCTL_GET_FDB_ENTRIES 18
Ben Cheng655a7c02013-10-16 16:09:24 -070049#define BR_STATE_DISABLED 0
50#define BR_STATE_LISTENING 1
Christopher Ferris82d75042015-01-26 10:57:07 -080051#define BR_STATE_LEARNING 2
Christopher Ferris38062f92014-07-09 15:33:25 -070052#define BR_STATE_FORWARDING 3
Ben Cheng655a7c02013-10-16 16:09:24 -070053#define BR_STATE_BLOCKING 4
54struct __bridge_info {
Tao Baod7db5942015-01-28 10:07:51 -080055 __u64 designated_root;
56 __u64 bridge_id;
57 __u32 root_path_cost;
58 __u32 max_age;
Tao Baod7db5942015-01-28 10:07:51 -080059 __u32 hello_time;
60 __u32 forward_delay;
61 __u32 bridge_max_age;
62 __u32 bridge_hello_time;
Tao Baod7db5942015-01-28 10:07:51 -080063 __u32 bridge_forward_delay;
64 __u8 topology_change;
65 __u8 topology_change_detected;
66 __u8 root_port;
Tao Baod7db5942015-01-28 10:07:51 -080067 __u8 stp_enabled;
68 __u32 ageing_time;
69 __u32 gc_interval;
70 __u32 hello_timer_value;
Tao Baod7db5942015-01-28 10:07:51 -080071 __u32 tcn_timer_value;
72 __u32 topology_change_timer_value;
73 __u32 gc_timer_value;
Ben Cheng655a7c02013-10-16 16:09:24 -070074};
Christopher Ferris82d75042015-01-26 10:57:07 -080075struct __port_info {
Tao Baod7db5942015-01-28 10:07:51 -080076 __u64 designated_root;
77 __u64 designated_bridge;
78 __u16 port_id;
Tao Baod7db5942015-01-28 10:07:51 -080079 __u16 designated_port;
80 __u32 path_cost;
81 __u32 designated_cost;
82 __u8 state;
Tao Baod7db5942015-01-28 10:07:51 -080083 __u8 top_change_ack;
84 __u8 config_pending;
85 __u8 unused0;
86 __u32 message_age_timer_value;
Tao Baod7db5942015-01-28 10:07:51 -080087 __u32 forward_delay_timer_value;
88 __u32 hold_timer_value;
Ben Cheng655a7c02013-10-16 16:09:24 -070089};
90struct __fdb_entry {
Tao Baod7db5942015-01-28 10:07:51 -080091 __u8 mac_addr[ETH_ALEN];
92 __u8 port_no;
93 __u8 is_local;
94 __u32 ageing_timer_value;
Tao Baod7db5942015-01-28 10:07:51 -080095 __u8 port_hi;
96 __u8 pad0;
97 __u16 unused;
Ben Cheng655a7c02013-10-16 16:09:24 -070098};
Christopher Ferris82d75042015-01-26 10:57:07 -080099#define BRIDGE_FLAGS_MASTER 1
Christopher Ferris38062f92014-07-09 15:33:25 -0700100#define BRIDGE_FLAGS_SELF 2
Ben Cheng655a7c02013-10-16 16:09:24 -0700101#define BRIDGE_MODE_VEB 0
102#define BRIDGE_MODE_VEPA 1
Christopher Ferris05d08e92016-02-04 13:16:38 -0800103#define BRIDGE_MODE_UNDEF 0xFFFF
Christopher Ferris82d75042015-01-26 10:57:07 -0800104enum {
Tao Baod7db5942015-01-28 10:07:51 -0800105 IFLA_BRIDGE_FLAGS,
106 IFLA_BRIDGE_MODE,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800107 IFLA_BRIDGE_VLAN_INFO,
Christopher Ferris525ce912017-07-26 13:12:53 -0700108 IFLA_BRIDGE_VLAN_TUNNEL_INFO,
Christopher Ferris8177cdf2020-08-03 11:53:55 -0700109 IFLA_BRIDGE_MRP,
Christopher Ferris05667cd2021-02-16 16:01:34 -0800110 IFLA_BRIDGE_CFM,
Christopher Ferris10a76e62022-06-08 13:31:52 -0700111 IFLA_BRIDGE_MST,
Tao Baod7db5942015-01-28 10:07:51 -0800112 __IFLA_BRIDGE_MAX,
Christopher Ferris38062f92014-07-09 15:33:25 -0700113};
Ben Cheng655a7c02013-10-16 16:09:24 -0700114#define IFLA_BRIDGE_MAX (__IFLA_BRIDGE_MAX - 1)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800115#define BRIDGE_VLAN_INFO_MASTER (1 << 0)
Tao Baod7db5942015-01-28 10:07:51 -0800116#define BRIDGE_VLAN_INFO_PVID (1 << 1)
117#define BRIDGE_VLAN_INFO_UNTAGGED (1 << 2)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800118#define BRIDGE_VLAN_INFO_RANGE_BEGIN (1 << 3)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800119#define BRIDGE_VLAN_INFO_RANGE_END (1 << 4)
120#define BRIDGE_VLAN_INFO_BRENTRY (1 << 5)
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -0700121#define BRIDGE_VLAN_INFO_ONLY_OPTS (1 << 6)
Ben Cheng655a7c02013-10-16 16:09:24 -0700122struct bridge_vlan_info {
Tao Baod7db5942015-01-28 10:07:51 -0800123 __u16 flags;
Tao Baod7db5942015-01-28 10:07:51 -0800124 __u16 vid;
Christopher Ferris38062f92014-07-09 15:33:25 -0700125};
Christopher Ferris525ce912017-07-26 13:12:53 -0700126enum {
127 IFLA_BRIDGE_VLAN_TUNNEL_UNSPEC,
128 IFLA_BRIDGE_VLAN_TUNNEL_ID,
129 IFLA_BRIDGE_VLAN_TUNNEL_VID,
130 IFLA_BRIDGE_VLAN_TUNNEL_FLAGS,
131 __IFLA_BRIDGE_VLAN_TUNNEL_MAX,
132};
133#define IFLA_BRIDGE_VLAN_TUNNEL_MAX (__IFLA_BRIDGE_VLAN_TUNNEL_MAX - 1)
Christopher Ferris106b3a82016-08-24 12:15:38 -0700134struct bridge_vlan_xstats {
135 __u64 rx_bytes;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700136 __u64 rx_packets;
137 __u64 tx_bytes;
138 __u64 tx_packets;
139 __u16 vid;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800140 __u16 flags;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700141 __u32 pad2;
142};
Christopher Ferris8177cdf2020-08-03 11:53:55 -0700143enum {
144 IFLA_BRIDGE_MRP_UNSPEC,
145 IFLA_BRIDGE_MRP_INSTANCE,
146 IFLA_BRIDGE_MRP_PORT_STATE,
147 IFLA_BRIDGE_MRP_PORT_ROLE,
148 IFLA_BRIDGE_MRP_RING_STATE,
149 IFLA_BRIDGE_MRP_RING_ROLE,
150 IFLA_BRIDGE_MRP_START_TEST,
Christopher Ferris25c18d42020-10-14 17:42:58 -0700151 IFLA_BRIDGE_MRP_INFO,
152 IFLA_BRIDGE_MRP_IN_ROLE,
153 IFLA_BRIDGE_MRP_IN_STATE,
154 IFLA_BRIDGE_MRP_START_IN_TEST,
Christopher Ferris8177cdf2020-08-03 11:53:55 -0700155 __IFLA_BRIDGE_MRP_MAX,
156};
157#define IFLA_BRIDGE_MRP_MAX (__IFLA_BRIDGE_MRP_MAX - 1)
158enum {
159 IFLA_BRIDGE_MRP_INSTANCE_UNSPEC,
160 IFLA_BRIDGE_MRP_INSTANCE_RING_ID,
161 IFLA_BRIDGE_MRP_INSTANCE_P_IFINDEX,
162 IFLA_BRIDGE_MRP_INSTANCE_S_IFINDEX,
163 IFLA_BRIDGE_MRP_INSTANCE_PRIO,
164 __IFLA_BRIDGE_MRP_INSTANCE_MAX,
165};
166#define IFLA_BRIDGE_MRP_INSTANCE_MAX (__IFLA_BRIDGE_MRP_INSTANCE_MAX - 1)
167enum {
168 IFLA_BRIDGE_MRP_PORT_STATE_UNSPEC,
169 IFLA_BRIDGE_MRP_PORT_STATE_STATE,
170 __IFLA_BRIDGE_MRP_PORT_STATE_MAX,
171};
172#define IFLA_BRIDGE_MRP_PORT_STATE_MAX (__IFLA_BRIDGE_MRP_PORT_STATE_MAX - 1)
173enum {
174 IFLA_BRIDGE_MRP_PORT_ROLE_UNSPEC,
175 IFLA_BRIDGE_MRP_PORT_ROLE_ROLE,
176 __IFLA_BRIDGE_MRP_PORT_ROLE_MAX,
177};
178#define IFLA_BRIDGE_MRP_PORT_ROLE_MAX (__IFLA_BRIDGE_MRP_PORT_ROLE_MAX - 1)
179enum {
180 IFLA_BRIDGE_MRP_RING_STATE_UNSPEC,
181 IFLA_BRIDGE_MRP_RING_STATE_RING_ID,
182 IFLA_BRIDGE_MRP_RING_STATE_STATE,
183 __IFLA_BRIDGE_MRP_RING_STATE_MAX,
184};
185#define IFLA_BRIDGE_MRP_RING_STATE_MAX (__IFLA_BRIDGE_MRP_RING_STATE_MAX - 1)
186enum {
187 IFLA_BRIDGE_MRP_RING_ROLE_UNSPEC,
188 IFLA_BRIDGE_MRP_RING_ROLE_RING_ID,
189 IFLA_BRIDGE_MRP_RING_ROLE_ROLE,
190 __IFLA_BRIDGE_MRP_RING_ROLE_MAX,
191};
192#define IFLA_BRIDGE_MRP_RING_ROLE_MAX (__IFLA_BRIDGE_MRP_RING_ROLE_MAX - 1)
193enum {
194 IFLA_BRIDGE_MRP_START_TEST_UNSPEC,
195 IFLA_BRIDGE_MRP_START_TEST_RING_ID,
196 IFLA_BRIDGE_MRP_START_TEST_INTERVAL,
197 IFLA_BRIDGE_MRP_START_TEST_MAX_MISS,
198 IFLA_BRIDGE_MRP_START_TEST_PERIOD,
199 IFLA_BRIDGE_MRP_START_TEST_MONITOR,
200 __IFLA_BRIDGE_MRP_START_TEST_MAX,
201};
202#define IFLA_BRIDGE_MRP_START_TEST_MAX (__IFLA_BRIDGE_MRP_START_TEST_MAX - 1)
Christopher Ferris25c18d42020-10-14 17:42:58 -0700203enum {
204 IFLA_BRIDGE_MRP_INFO_UNSPEC,
205 IFLA_BRIDGE_MRP_INFO_RING_ID,
206 IFLA_BRIDGE_MRP_INFO_P_IFINDEX,
207 IFLA_BRIDGE_MRP_INFO_S_IFINDEX,
208 IFLA_BRIDGE_MRP_INFO_PRIO,
209 IFLA_BRIDGE_MRP_INFO_RING_STATE,
210 IFLA_BRIDGE_MRP_INFO_RING_ROLE,
211 IFLA_BRIDGE_MRP_INFO_TEST_INTERVAL,
212 IFLA_BRIDGE_MRP_INFO_TEST_MAX_MISS,
213 IFLA_BRIDGE_MRP_INFO_TEST_MONITOR,
214 IFLA_BRIDGE_MRP_INFO_I_IFINDEX,
215 IFLA_BRIDGE_MRP_INFO_IN_STATE,
216 IFLA_BRIDGE_MRP_INFO_IN_ROLE,
217 IFLA_BRIDGE_MRP_INFO_IN_TEST_INTERVAL,
218 IFLA_BRIDGE_MRP_INFO_IN_TEST_MAX_MISS,
219 __IFLA_BRIDGE_MRP_INFO_MAX,
220};
221#define IFLA_BRIDGE_MRP_INFO_MAX (__IFLA_BRIDGE_MRP_INFO_MAX - 1)
222enum {
223 IFLA_BRIDGE_MRP_IN_STATE_UNSPEC,
224 IFLA_BRIDGE_MRP_IN_STATE_IN_ID,
225 IFLA_BRIDGE_MRP_IN_STATE_STATE,
226 __IFLA_BRIDGE_MRP_IN_STATE_MAX,
227};
228#define IFLA_BRIDGE_MRP_IN_STATE_MAX (__IFLA_BRIDGE_MRP_IN_STATE_MAX - 1)
229enum {
230 IFLA_BRIDGE_MRP_IN_ROLE_UNSPEC,
231 IFLA_BRIDGE_MRP_IN_ROLE_RING_ID,
232 IFLA_BRIDGE_MRP_IN_ROLE_IN_ID,
233 IFLA_BRIDGE_MRP_IN_ROLE_ROLE,
234 IFLA_BRIDGE_MRP_IN_ROLE_I_IFINDEX,
235 __IFLA_BRIDGE_MRP_IN_ROLE_MAX,
236};
237#define IFLA_BRIDGE_MRP_IN_ROLE_MAX (__IFLA_BRIDGE_MRP_IN_ROLE_MAX - 1)
238enum {
239 IFLA_BRIDGE_MRP_START_IN_TEST_UNSPEC,
240 IFLA_BRIDGE_MRP_START_IN_TEST_IN_ID,
241 IFLA_BRIDGE_MRP_START_IN_TEST_INTERVAL,
242 IFLA_BRIDGE_MRP_START_IN_TEST_MAX_MISS,
243 IFLA_BRIDGE_MRP_START_IN_TEST_PERIOD,
244 __IFLA_BRIDGE_MRP_START_IN_TEST_MAX,
245};
246#define IFLA_BRIDGE_MRP_START_IN_TEST_MAX (__IFLA_BRIDGE_MRP_START_IN_TEST_MAX - 1)
Christopher Ferris8177cdf2020-08-03 11:53:55 -0700247struct br_mrp_instance {
248 __u32 ring_id;
249 __u32 p_ifindex;
250 __u32 s_ifindex;
251 __u16 prio;
252};
253struct br_mrp_ring_state {
254 __u32 ring_id;
255 __u32 ring_state;
256};
257struct br_mrp_ring_role {
258 __u32 ring_id;
259 __u32 ring_role;
260};
261struct br_mrp_start_test {
262 __u32 ring_id;
263 __u32 interval;
264 __u32 max_miss;
265 __u32 period;
266 __u32 monitor;
267};
Christopher Ferris25c18d42020-10-14 17:42:58 -0700268struct br_mrp_in_state {
269 __u32 in_state;
270 __u16 in_id;
271};
272struct br_mrp_in_role {
273 __u32 ring_id;
274 __u32 in_role;
275 __u32 i_ifindex;
276 __u16 in_id;
277};
278struct br_mrp_start_in_test {
279 __u32 interval;
280 __u32 max_miss;
281 __u32 period;
282 __u16 in_id;
283};
Christopher Ferris05667cd2021-02-16 16:01:34 -0800284enum {
285 IFLA_BRIDGE_CFM_UNSPEC,
286 IFLA_BRIDGE_CFM_MEP_CREATE,
287 IFLA_BRIDGE_CFM_MEP_DELETE,
288 IFLA_BRIDGE_CFM_MEP_CONFIG,
289 IFLA_BRIDGE_CFM_CC_CONFIG,
290 IFLA_BRIDGE_CFM_CC_PEER_MEP_ADD,
291 IFLA_BRIDGE_CFM_CC_PEER_MEP_REMOVE,
292 IFLA_BRIDGE_CFM_CC_RDI,
293 IFLA_BRIDGE_CFM_CC_CCM_TX,
294 IFLA_BRIDGE_CFM_MEP_CREATE_INFO,
295 IFLA_BRIDGE_CFM_MEP_CONFIG_INFO,
296 IFLA_BRIDGE_CFM_CC_CONFIG_INFO,
297 IFLA_BRIDGE_CFM_CC_RDI_INFO,
298 IFLA_BRIDGE_CFM_CC_CCM_TX_INFO,
299 IFLA_BRIDGE_CFM_CC_PEER_MEP_INFO,
300 IFLA_BRIDGE_CFM_MEP_STATUS_INFO,
301 IFLA_BRIDGE_CFM_CC_PEER_STATUS_INFO,
302 __IFLA_BRIDGE_CFM_MAX,
303};
304#define IFLA_BRIDGE_CFM_MAX (__IFLA_BRIDGE_CFM_MAX - 1)
305enum {
306 IFLA_BRIDGE_CFM_MEP_CREATE_UNSPEC,
307 IFLA_BRIDGE_CFM_MEP_CREATE_INSTANCE,
308 IFLA_BRIDGE_CFM_MEP_CREATE_DOMAIN,
309 IFLA_BRIDGE_CFM_MEP_CREATE_DIRECTION,
310 IFLA_BRIDGE_CFM_MEP_CREATE_IFINDEX,
311 __IFLA_BRIDGE_CFM_MEP_CREATE_MAX,
312};
313#define IFLA_BRIDGE_CFM_MEP_CREATE_MAX (__IFLA_BRIDGE_CFM_MEP_CREATE_MAX - 1)
314enum {
315 IFLA_BRIDGE_CFM_MEP_DELETE_UNSPEC,
316 IFLA_BRIDGE_CFM_MEP_DELETE_INSTANCE,
317 __IFLA_BRIDGE_CFM_MEP_DELETE_MAX,
318};
319#define IFLA_BRIDGE_CFM_MEP_DELETE_MAX (__IFLA_BRIDGE_CFM_MEP_DELETE_MAX - 1)
320enum {
321 IFLA_BRIDGE_CFM_MEP_CONFIG_UNSPEC,
322 IFLA_BRIDGE_CFM_MEP_CONFIG_INSTANCE,
323 IFLA_BRIDGE_CFM_MEP_CONFIG_UNICAST_MAC,
324 IFLA_BRIDGE_CFM_MEP_CONFIG_MDLEVEL,
325 IFLA_BRIDGE_CFM_MEP_CONFIG_MEPID,
326 __IFLA_BRIDGE_CFM_MEP_CONFIG_MAX,
327};
328#define IFLA_BRIDGE_CFM_MEP_CONFIG_MAX (__IFLA_BRIDGE_CFM_MEP_CONFIG_MAX - 1)
329enum {
330 IFLA_BRIDGE_CFM_CC_CONFIG_UNSPEC,
331 IFLA_BRIDGE_CFM_CC_CONFIG_INSTANCE,
332 IFLA_BRIDGE_CFM_CC_CONFIG_ENABLE,
333 IFLA_BRIDGE_CFM_CC_CONFIG_EXP_INTERVAL,
334 IFLA_BRIDGE_CFM_CC_CONFIG_EXP_MAID,
335 __IFLA_BRIDGE_CFM_CC_CONFIG_MAX,
336};
337#define IFLA_BRIDGE_CFM_CC_CONFIG_MAX (__IFLA_BRIDGE_CFM_CC_CONFIG_MAX - 1)
338enum {
339 IFLA_BRIDGE_CFM_CC_PEER_MEP_UNSPEC,
340 IFLA_BRIDGE_CFM_CC_PEER_MEP_INSTANCE,
341 IFLA_BRIDGE_CFM_CC_PEER_MEPID,
342 __IFLA_BRIDGE_CFM_CC_PEER_MEP_MAX,
343};
344#define IFLA_BRIDGE_CFM_CC_PEER_MEP_MAX (__IFLA_BRIDGE_CFM_CC_PEER_MEP_MAX - 1)
345enum {
346 IFLA_BRIDGE_CFM_CC_RDI_UNSPEC,
347 IFLA_BRIDGE_CFM_CC_RDI_INSTANCE,
348 IFLA_BRIDGE_CFM_CC_RDI_RDI,
349 __IFLA_BRIDGE_CFM_CC_RDI_MAX,
350};
351#define IFLA_BRIDGE_CFM_CC_RDI_MAX (__IFLA_BRIDGE_CFM_CC_RDI_MAX - 1)
352enum {
353 IFLA_BRIDGE_CFM_CC_CCM_TX_UNSPEC,
354 IFLA_BRIDGE_CFM_CC_CCM_TX_INSTANCE,
355 IFLA_BRIDGE_CFM_CC_CCM_TX_DMAC,
356 IFLA_BRIDGE_CFM_CC_CCM_TX_SEQ_NO_UPDATE,
357 IFLA_BRIDGE_CFM_CC_CCM_TX_PERIOD,
358 IFLA_BRIDGE_CFM_CC_CCM_TX_IF_TLV,
359 IFLA_BRIDGE_CFM_CC_CCM_TX_IF_TLV_VALUE,
360 IFLA_BRIDGE_CFM_CC_CCM_TX_PORT_TLV,
361 IFLA_BRIDGE_CFM_CC_CCM_TX_PORT_TLV_VALUE,
362 __IFLA_BRIDGE_CFM_CC_CCM_TX_MAX,
363};
364#define IFLA_BRIDGE_CFM_CC_CCM_TX_MAX (__IFLA_BRIDGE_CFM_CC_CCM_TX_MAX - 1)
365enum {
366 IFLA_BRIDGE_CFM_MEP_STATUS_UNSPEC,
367 IFLA_BRIDGE_CFM_MEP_STATUS_INSTANCE,
368 IFLA_BRIDGE_CFM_MEP_STATUS_OPCODE_UNEXP_SEEN,
369 IFLA_BRIDGE_CFM_MEP_STATUS_VERSION_UNEXP_SEEN,
370 IFLA_BRIDGE_CFM_MEP_STATUS_RX_LEVEL_LOW_SEEN,
371 __IFLA_BRIDGE_CFM_MEP_STATUS_MAX,
372};
373#define IFLA_BRIDGE_CFM_MEP_STATUS_MAX (__IFLA_BRIDGE_CFM_MEP_STATUS_MAX - 1)
374enum {
375 IFLA_BRIDGE_CFM_CC_PEER_STATUS_UNSPEC,
376 IFLA_BRIDGE_CFM_CC_PEER_STATUS_INSTANCE,
377 IFLA_BRIDGE_CFM_CC_PEER_STATUS_PEER_MEPID,
378 IFLA_BRIDGE_CFM_CC_PEER_STATUS_CCM_DEFECT,
379 IFLA_BRIDGE_CFM_CC_PEER_STATUS_RDI,
380 IFLA_BRIDGE_CFM_CC_PEER_STATUS_PORT_TLV_VALUE,
381 IFLA_BRIDGE_CFM_CC_PEER_STATUS_IF_TLV_VALUE,
382 IFLA_BRIDGE_CFM_CC_PEER_STATUS_SEEN,
383 IFLA_BRIDGE_CFM_CC_PEER_STATUS_TLV_SEEN,
384 IFLA_BRIDGE_CFM_CC_PEER_STATUS_SEQ_UNEXP_SEEN,
385 __IFLA_BRIDGE_CFM_CC_PEER_STATUS_MAX,
386};
387#define IFLA_BRIDGE_CFM_CC_PEER_STATUS_MAX (__IFLA_BRIDGE_CFM_CC_PEER_STATUS_MAX - 1)
Christopher Ferris10a76e62022-06-08 13:31:52 -0700388enum {
389 IFLA_BRIDGE_MST_UNSPEC,
390 IFLA_BRIDGE_MST_ENTRY,
391 __IFLA_BRIDGE_MST_MAX,
392};
393#define IFLA_BRIDGE_MST_MAX (__IFLA_BRIDGE_MST_MAX - 1)
394enum {
395 IFLA_BRIDGE_MST_ENTRY_UNSPEC,
396 IFLA_BRIDGE_MST_ENTRY_MSTI,
397 IFLA_BRIDGE_MST_ENTRY_STATE,
398 __IFLA_BRIDGE_MST_ENTRY_MAX,
399};
400#define IFLA_BRIDGE_MST_ENTRY_MAX (__IFLA_BRIDGE_MST_ENTRY_MAX - 1)
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -0700401struct bridge_stp_xstats {
402 __u64 transition_blk;
403 __u64 transition_fwd;
404 __u64 rx_bpdu;
405 __u64 tx_bpdu;
406 __u64 rx_tcn;
407 __u64 tx_tcn;
408};
409struct br_vlan_msg {
410 __u8 family;
411 __u8 reserved1;
412 __u16 reserved2;
413 __u32 ifindex;
414};
415enum {
Christopher Ferrisaf09c702020-06-01 20:29:29 -0700416 BRIDGE_VLANDB_DUMP_UNSPEC,
417 BRIDGE_VLANDB_DUMP_FLAGS,
418 __BRIDGE_VLANDB_DUMP_MAX,
419};
420#define BRIDGE_VLANDB_DUMP_MAX (__BRIDGE_VLANDB_DUMP_MAX - 1)
421#define BRIDGE_VLANDB_DUMPF_STATS (1 << 0)
Christopher Ferris2abfa9e2021-11-01 16:26:06 -0700422#define BRIDGE_VLANDB_DUMPF_GLOBAL (1 << 1)
Christopher Ferrisaf09c702020-06-01 20:29:29 -0700423enum {
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -0700424 BRIDGE_VLANDB_UNSPEC,
425 BRIDGE_VLANDB_ENTRY,
Christopher Ferris2abfa9e2021-11-01 16:26:06 -0700426 BRIDGE_VLANDB_GLOBAL_OPTIONS,
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -0700427 __BRIDGE_VLANDB_MAX,
428};
429#define BRIDGE_VLANDB_MAX (__BRIDGE_VLANDB_MAX - 1)
430enum {
431 BRIDGE_VLANDB_ENTRY_UNSPEC,
432 BRIDGE_VLANDB_ENTRY_INFO,
433 BRIDGE_VLANDB_ENTRY_RANGE,
434 BRIDGE_VLANDB_ENTRY_STATE,
Christopher Ferrisaf09c702020-06-01 20:29:29 -0700435 BRIDGE_VLANDB_ENTRY_TUNNEL_INFO,
436 BRIDGE_VLANDB_ENTRY_STATS,
Christopher Ferris2abfa9e2021-11-01 16:26:06 -0700437 BRIDGE_VLANDB_ENTRY_MCAST_ROUTER,
Christopher Ferrisb7cef6d2023-05-09 19:04:15 +0000438 BRIDGE_VLANDB_ENTRY_MCAST_N_GROUPS,
439 BRIDGE_VLANDB_ENTRY_MCAST_MAX_GROUPS,
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -0700440 __BRIDGE_VLANDB_ENTRY_MAX,
441};
442#define BRIDGE_VLANDB_ENTRY_MAX (__BRIDGE_VLANDB_ENTRY_MAX - 1)
Christopher Ferris106b3a82016-08-24 12:15:38 -0700443enum {
Christopher Ferrisaf09c702020-06-01 20:29:29 -0700444 BRIDGE_VLANDB_TINFO_UNSPEC,
445 BRIDGE_VLANDB_TINFO_ID,
446 BRIDGE_VLANDB_TINFO_CMD,
447 __BRIDGE_VLANDB_TINFO_MAX,
448};
449#define BRIDGE_VLANDB_TINFO_MAX (__BRIDGE_VLANDB_TINFO_MAX - 1)
450enum {
451 BRIDGE_VLANDB_STATS_UNSPEC,
452 BRIDGE_VLANDB_STATS_RX_BYTES,
453 BRIDGE_VLANDB_STATS_RX_PACKETS,
454 BRIDGE_VLANDB_STATS_TX_BYTES,
455 BRIDGE_VLANDB_STATS_TX_PACKETS,
456 BRIDGE_VLANDB_STATS_PAD,
457 __BRIDGE_VLANDB_STATS_MAX,
458};
459#define BRIDGE_VLANDB_STATS_MAX (__BRIDGE_VLANDB_STATS_MAX - 1)
460enum {
Christopher Ferris2abfa9e2021-11-01 16:26:06 -0700461 BRIDGE_VLANDB_GOPTS_UNSPEC,
462 BRIDGE_VLANDB_GOPTS_ID,
463 BRIDGE_VLANDB_GOPTS_RANGE,
464 BRIDGE_VLANDB_GOPTS_MCAST_SNOOPING,
465 BRIDGE_VLANDB_GOPTS_MCAST_IGMP_VERSION,
466 BRIDGE_VLANDB_GOPTS_MCAST_MLD_VERSION,
467 BRIDGE_VLANDB_GOPTS_MCAST_LAST_MEMBER_CNT,
468 BRIDGE_VLANDB_GOPTS_MCAST_STARTUP_QUERY_CNT,
469 BRIDGE_VLANDB_GOPTS_MCAST_LAST_MEMBER_INTVL,
470 BRIDGE_VLANDB_GOPTS_PAD,
471 BRIDGE_VLANDB_GOPTS_MCAST_MEMBERSHIP_INTVL,
472 BRIDGE_VLANDB_GOPTS_MCAST_QUERIER_INTVL,
473 BRIDGE_VLANDB_GOPTS_MCAST_QUERY_INTVL,
474 BRIDGE_VLANDB_GOPTS_MCAST_QUERY_RESPONSE_INTVL,
475 BRIDGE_VLANDB_GOPTS_MCAST_STARTUP_QUERY_INTVL,
476 BRIDGE_VLANDB_GOPTS_MCAST_QUERIER,
477 BRIDGE_VLANDB_GOPTS_MCAST_ROUTER_PORTS,
478 BRIDGE_VLANDB_GOPTS_MCAST_QUERIER_STATE,
Christopher Ferris10a76e62022-06-08 13:31:52 -0700479 BRIDGE_VLANDB_GOPTS_MSTI,
Christopher Ferris2abfa9e2021-11-01 16:26:06 -0700480 __BRIDGE_VLANDB_GOPTS_MAX
481};
482#define BRIDGE_VLANDB_GOPTS_MAX (__BRIDGE_VLANDB_GOPTS_MAX - 1)
483enum {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700484 MDBA_UNSPEC,
Tao Baod7db5942015-01-28 10:07:51 -0800485 MDBA_MDB,
486 MDBA_ROUTER,
487 __MDBA_MAX,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700488};
Christopher Ferris82d75042015-01-26 10:57:07 -0800489#define MDBA_MAX (__MDBA_MAX - 1)
Christopher Ferris38062f92014-07-09 15:33:25 -0700490enum {
Tao Baod7db5942015-01-28 10:07:51 -0800491 MDBA_MDB_UNSPEC,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700492 MDBA_MDB_ENTRY,
Tao Baod7db5942015-01-28 10:07:51 -0800493 __MDBA_MDB_MAX,
Christopher Ferris38062f92014-07-09 15:33:25 -0700494};
Ben Cheng655a7c02013-10-16 16:09:24 -0700495#define MDBA_MDB_MAX (__MDBA_MDB_MAX - 1)
Christopher Ferris106b3a82016-08-24 12:15:38 -0700496enum {
Tao Baod7db5942015-01-28 10:07:51 -0800497 MDBA_MDB_ENTRY_UNSPEC,
498 MDBA_MDB_ENTRY_INFO,
499 __MDBA_MDB_ENTRY_MAX,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700500};
Christopher Ferris82d75042015-01-26 10:57:07 -0800501#define MDBA_MDB_ENTRY_MAX (__MDBA_MDB_ENTRY_MAX - 1)
Christopher Ferris38062f92014-07-09 15:33:25 -0700502enum {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700503 MDBA_MDB_EATTR_UNSPEC,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700504 MDBA_MDB_EATTR_TIMER,
Christopher Ferris32ff3f82020-12-14 13:10:04 -0800505 MDBA_MDB_EATTR_SRC_LIST,
506 MDBA_MDB_EATTR_GROUP_MODE,
507 MDBA_MDB_EATTR_SOURCE,
508 MDBA_MDB_EATTR_RTPROT,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700509 __MDBA_MDB_EATTR_MAX
510};
511#define MDBA_MDB_EATTR_MAX (__MDBA_MDB_EATTR_MAX - 1)
Christopher Ferris106b3a82016-08-24 12:15:38 -0700512enum {
Christopher Ferris32ff3f82020-12-14 13:10:04 -0800513 MDBA_MDB_SRCLIST_UNSPEC,
514 MDBA_MDB_SRCLIST_ENTRY,
515 __MDBA_MDB_SRCLIST_MAX
516};
517#define MDBA_MDB_SRCLIST_MAX (__MDBA_MDB_SRCLIST_MAX - 1)
518enum {
519 MDBA_MDB_SRCATTR_UNSPEC,
520 MDBA_MDB_SRCATTR_ADDRESS,
521 MDBA_MDB_SRCATTR_TIMER,
522 __MDBA_MDB_SRCATTR_MAX
523};
524#define MDBA_MDB_SRCATTR_MAX (__MDBA_MDB_SRCATTR_MAX - 1)
525enum {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700526 MDB_RTR_TYPE_DISABLED,
527 MDB_RTR_TYPE_TEMP_QUERY,
528 MDB_RTR_TYPE_PERM,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700529 MDB_RTR_TYPE_TEMP
530};
531enum {
532 MDBA_ROUTER_UNSPEC,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700533 MDBA_ROUTER_PORT,
Tao Baod7db5942015-01-28 10:07:51 -0800534 __MDBA_ROUTER_MAX,
Christopher Ferris38062f92014-07-09 15:33:25 -0700535};
Ben Cheng655a7c02013-10-16 16:09:24 -0700536#define MDBA_ROUTER_MAX (__MDBA_ROUTER_MAX - 1)
Christopher Ferris106b3a82016-08-24 12:15:38 -0700537enum {
538 MDBA_ROUTER_PATTR_UNSPEC,
539 MDBA_ROUTER_PATTR_TIMER,
540 MDBA_ROUTER_PATTR_TYPE,
Christopher Ferris3a39c0b2021-09-02 00:03:38 +0000541 MDBA_ROUTER_PATTR_INET_TIMER,
542 MDBA_ROUTER_PATTR_INET6_TIMER,
Christopher Ferris2abfa9e2021-11-01 16:26:06 -0700543 MDBA_ROUTER_PATTR_VID,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700544 __MDBA_ROUTER_PATTR_MAX
545};
546#define MDBA_ROUTER_PATTR_MAX (__MDBA_ROUTER_PATTR_MAX - 1)
Ben Cheng655a7c02013-10-16 16:09:24 -0700547struct br_port_msg {
Tao Baod7db5942015-01-28 10:07:51 -0800548 __u8 family;
549 __u32 ifindex;
Ben Cheng655a7c02013-10-16 16:09:24 -0700550};
551struct br_mdb_entry {
Tao Baod7db5942015-01-28 10:07:51 -0800552 __u32 ifindex;
Christopher Ferris38062f92014-07-09 15:33:25 -0700553#define MDB_TEMPORARY 0
Ben Cheng655a7c02013-10-16 16:09:24 -0700554#define MDB_PERMANENT 1
Tao Baod7db5942015-01-28 10:07:51 -0800555 __u8 state;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700556#define MDB_FLAGS_OFFLOAD (1 << 0)
Christopher Ferris9584fa42019-12-09 15:36:13 -0800557#define MDB_FLAGS_FAST_LEAVE (1 << 1)
Christopher Ferris32ff3f82020-12-14 13:10:04 -0800558#define MDB_FLAGS_STAR_EXCL (1 << 2)
559#define MDB_FLAGS_BLOCKED (1 << 3)
Christopher Ferris106b3a82016-08-24 12:15:38 -0700560 __u8 flags;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800561 __u16 vid;
Tao Baod7db5942015-01-28 10:07:51 -0800562 struct {
563 union {
564 __be32 ip4;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800565 struct in6_addr ip6;
Christopher Ferris05667cd2021-02-16 16:01:34 -0800566 unsigned char mac_addr[ETH_ALEN];
Tao Baod7db5942015-01-28 10:07:51 -0800567 } u;
568 __be16 proto;
569 } addr;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800570};
Christopher Ferris82d75042015-01-26 10:57:07 -0800571enum {
Tao Baod7db5942015-01-28 10:07:51 -0800572 MDBA_SET_ENTRY_UNSPEC,
573 MDBA_SET_ENTRY,
Christopher Ferris32ff3f82020-12-14 13:10:04 -0800574 MDBA_SET_ENTRY_ATTRS,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800575 __MDBA_SET_ENTRY_MAX,
Christopher Ferris82d75042015-01-26 10:57:07 -0800576};
Christopher Ferris38062f92014-07-09 15:33:25 -0700577#define MDBA_SET_ENTRY_MAX (__MDBA_SET_ENTRY_MAX - 1)
Christopher Ferris106b3a82016-08-24 12:15:38 -0700578enum {
Christopher Ferris32ff3f82020-12-14 13:10:04 -0800579 MDBE_ATTR_UNSPEC,
580 MDBE_ATTR_SOURCE,
Christopher Ferris8b7fdc92023-02-21 13:36:32 -0800581 MDBE_ATTR_SRC_LIST,
582 MDBE_ATTR_GROUP_MODE,
583 MDBE_ATTR_RTPROT,
Christopher Ferris32ff3f82020-12-14 13:10:04 -0800584 __MDBE_ATTR_MAX,
585};
586#define MDBE_ATTR_MAX (__MDBE_ATTR_MAX - 1)
587enum {
Christopher Ferris8b7fdc92023-02-21 13:36:32 -0800588 MDBE_SRC_LIST_UNSPEC,
589 MDBE_SRC_LIST_ENTRY,
590 __MDBE_SRC_LIST_MAX,
591};
592#define MDBE_SRC_LIST_MAX (__MDBE_SRC_LIST_MAX - 1)
593enum {
594 MDBE_SRCATTR_UNSPEC,
595 MDBE_SRCATTR_ADDRESS,
596 __MDBE_SRCATTR_MAX,
597};
598#define MDBE_SRCATTR_MAX (__MDBE_SRCATTR_MAX - 1)
599enum {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700600 BRIDGE_XSTATS_UNSPEC,
601 BRIDGE_XSTATS_VLAN,
Christopher Ferris49f525c2016-12-12 14:55:36 -0800602 BRIDGE_XSTATS_MCAST,
603 BRIDGE_XSTATS_PAD,
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -0700604 BRIDGE_XSTATS_STP,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700605 __BRIDGE_XSTATS_MAX
606};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800607#define BRIDGE_XSTATS_MAX (__BRIDGE_XSTATS_MAX - 1)
608enum {
609 BR_MCAST_DIR_RX,
610 BR_MCAST_DIR_TX,
Christopher Ferris49f525c2016-12-12 14:55:36 -0800611 BR_MCAST_DIR_SIZE
612};
613struct br_mcast_stats {
614 __u64 igmp_v1queries[BR_MCAST_DIR_SIZE];
Christopher Ferris49f525c2016-12-12 14:55:36 -0800615 __u64 igmp_v2queries[BR_MCAST_DIR_SIZE];
616 __u64 igmp_v3queries[BR_MCAST_DIR_SIZE];
617 __u64 igmp_leaves[BR_MCAST_DIR_SIZE];
618 __u64 igmp_v1reports[BR_MCAST_DIR_SIZE];
Christopher Ferris49f525c2016-12-12 14:55:36 -0800619 __u64 igmp_v2reports[BR_MCAST_DIR_SIZE];
620 __u64 igmp_v3reports[BR_MCAST_DIR_SIZE];
621 __u64 igmp_parse_errors;
622 __u64 mld_v1queries[BR_MCAST_DIR_SIZE];
Christopher Ferris49f525c2016-12-12 14:55:36 -0800623 __u64 mld_v2queries[BR_MCAST_DIR_SIZE];
624 __u64 mld_leaves[BR_MCAST_DIR_SIZE];
625 __u64 mld_v1reports[BR_MCAST_DIR_SIZE];
626 __u64 mld_v2reports[BR_MCAST_DIR_SIZE];
Christopher Ferris49f525c2016-12-12 14:55:36 -0800627 __u64 mld_parse_errors;
628 __u64 mcast_bytes[BR_MCAST_DIR_SIZE];
629 __u64 mcast_packets[BR_MCAST_DIR_SIZE];
630};
Christopher Ferrisd842e432019-03-07 10:21:59 -0800631enum br_boolopt_id {
632 BR_BOOLOPT_NO_LL_LEARN,
Christopher Ferris2abfa9e2021-11-01 16:26:06 -0700633 BR_BOOLOPT_MCAST_VLAN_SNOOPING,
Christopher Ferris10a76e62022-06-08 13:31:52 -0700634 BR_BOOLOPT_MST_ENABLE,
Christopher Ferrisd842e432019-03-07 10:21:59 -0800635 BR_BOOLOPT_MAX
636};
637struct br_boolopt_multi {
638 __u32 optval;
639 __u32 optmask;
640};
Christopher Ferris2abfa9e2021-11-01 16:26:06 -0700641enum {
642 BRIDGE_QUERIER_UNSPEC,
643 BRIDGE_QUERIER_IP_ADDRESS,
644 BRIDGE_QUERIER_IP_PORT,
645 BRIDGE_QUERIER_IP_OTHER_TIMER,
646 BRIDGE_QUERIER_PAD,
647 BRIDGE_QUERIER_IPV6_ADDRESS,
648 BRIDGE_QUERIER_IPV6_PORT,
649 BRIDGE_QUERIER_IPV6_OTHER_TIMER,
650 __BRIDGE_QUERIER_MAX
651};
652#define BRIDGE_QUERIER_MAX (__BRIDGE_QUERIER_MAX - 1)
Christopher Ferris49f525c2016-12-12 14:55:36 -0800653#endif