blob: 2054fb3c99d6f024b4e622622a2d499ea3a31463 [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,
Tao Baod7db5942015-01-28 10:07:51 -0800111 __IFLA_BRIDGE_MAX,
Christopher Ferris38062f92014-07-09 15:33:25 -0700112};
Ben Cheng655a7c02013-10-16 16:09:24 -0700113#define IFLA_BRIDGE_MAX (__IFLA_BRIDGE_MAX - 1)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800114#define BRIDGE_VLAN_INFO_MASTER (1 << 0)
Tao Baod7db5942015-01-28 10:07:51 -0800115#define BRIDGE_VLAN_INFO_PVID (1 << 1)
116#define BRIDGE_VLAN_INFO_UNTAGGED (1 << 2)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800117#define BRIDGE_VLAN_INFO_RANGE_BEGIN (1 << 3)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800118#define BRIDGE_VLAN_INFO_RANGE_END (1 << 4)
119#define BRIDGE_VLAN_INFO_BRENTRY (1 << 5)
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -0700120#define BRIDGE_VLAN_INFO_ONLY_OPTS (1 << 6)
Ben Cheng655a7c02013-10-16 16:09:24 -0700121struct bridge_vlan_info {
Tao Baod7db5942015-01-28 10:07:51 -0800122 __u16 flags;
Tao Baod7db5942015-01-28 10:07:51 -0800123 __u16 vid;
Christopher Ferris38062f92014-07-09 15:33:25 -0700124};
Christopher Ferris525ce912017-07-26 13:12:53 -0700125enum {
126 IFLA_BRIDGE_VLAN_TUNNEL_UNSPEC,
127 IFLA_BRIDGE_VLAN_TUNNEL_ID,
128 IFLA_BRIDGE_VLAN_TUNNEL_VID,
129 IFLA_BRIDGE_VLAN_TUNNEL_FLAGS,
130 __IFLA_BRIDGE_VLAN_TUNNEL_MAX,
131};
132#define IFLA_BRIDGE_VLAN_TUNNEL_MAX (__IFLA_BRIDGE_VLAN_TUNNEL_MAX - 1)
Christopher Ferris106b3a82016-08-24 12:15:38 -0700133struct bridge_vlan_xstats {
134 __u64 rx_bytes;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700135 __u64 rx_packets;
136 __u64 tx_bytes;
137 __u64 tx_packets;
138 __u16 vid;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800139 __u16 flags;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700140 __u32 pad2;
141};
Christopher Ferris8177cdf2020-08-03 11:53:55 -0700142enum {
143 IFLA_BRIDGE_MRP_UNSPEC,
144 IFLA_BRIDGE_MRP_INSTANCE,
145 IFLA_BRIDGE_MRP_PORT_STATE,
146 IFLA_BRIDGE_MRP_PORT_ROLE,
147 IFLA_BRIDGE_MRP_RING_STATE,
148 IFLA_BRIDGE_MRP_RING_ROLE,
149 IFLA_BRIDGE_MRP_START_TEST,
Christopher Ferris25c18d42020-10-14 17:42:58 -0700150 IFLA_BRIDGE_MRP_INFO,
151 IFLA_BRIDGE_MRP_IN_ROLE,
152 IFLA_BRIDGE_MRP_IN_STATE,
153 IFLA_BRIDGE_MRP_START_IN_TEST,
Christopher Ferris8177cdf2020-08-03 11:53:55 -0700154 __IFLA_BRIDGE_MRP_MAX,
155};
156#define IFLA_BRIDGE_MRP_MAX (__IFLA_BRIDGE_MRP_MAX - 1)
157enum {
158 IFLA_BRIDGE_MRP_INSTANCE_UNSPEC,
159 IFLA_BRIDGE_MRP_INSTANCE_RING_ID,
160 IFLA_BRIDGE_MRP_INSTANCE_P_IFINDEX,
161 IFLA_BRIDGE_MRP_INSTANCE_S_IFINDEX,
162 IFLA_BRIDGE_MRP_INSTANCE_PRIO,
163 __IFLA_BRIDGE_MRP_INSTANCE_MAX,
164};
165#define IFLA_BRIDGE_MRP_INSTANCE_MAX (__IFLA_BRIDGE_MRP_INSTANCE_MAX - 1)
166enum {
167 IFLA_BRIDGE_MRP_PORT_STATE_UNSPEC,
168 IFLA_BRIDGE_MRP_PORT_STATE_STATE,
169 __IFLA_BRIDGE_MRP_PORT_STATE_MAX,
170};
171#define IFLA_BRIDGE_MRP_PORT_STATE_MAX (__IFLA_BRIDGE_MRP_PORT_STATE_MAX - 1)
172enum {
173 IFLA_BRIDGE_MRP_PORT_ROLE_UNSPEC,
174 IFLA_BRIDGE_MRP_PORT_ROLE_ROLE,
175 __IFLA_BRIDGE_MRP_PORT_ROLE_MAX,
176};
177#define IFLA_BRIDGE_MRP_PORT_ROLE_MAX (__IFLA_BRIDGE_MRP_PORT_ROLE_MAX - 1)
178enum {
179 IFLA_BRIDGE_MRP_RING_STATE_UNSPEC,
180 IFLA_BRIDGE_MRP_RING_STATE_RING_ID,
181 IFLA_BRIDGE_MRP_RING_STATE_STATE,
182 __IFLA_BRIDGE_MRP_RING_STATE_MAX,
183};
184#define IFLA_BRIDGE_MRP_RING_STATE_MAX (__IFLA_BRIDGE_MRP_RING_STATE_MAX - 1)
185enum {
186 IFLA_BRIDGE_MRP_RING_ROLE_UNSPEC,
187 IFLA_BRIDGE_MRP_RING_ROLE_RING_ID,
188 IFLA_BRIDGE_MRP_RING_ROLE_ROLE,
189 __IFLA_BRIDGE_MRP_RING_ROLE_MAX,
190};
191#define IFLA_BRIDGE_MRP_RING_ROLE_MAX (__IFLA_BRIDGE_MRP_RING_ROLE_MAX - 1)
192enum {
193 IFLA_BRIDGE_MRP_START_TEST_UNSPEC,
194 IFLA_BRIDGE_MRP_START_TEST_RING_ID,
195 IFLA_BRIDGE_MRP_START_TEST_INTERVAL,
196 IFLA_BRIDGE_MRP_START_TEST_MAX_MISS,
197 IFLA_BRIDGE_MRP_START_TEST_PERIOD,
198 IFLA_BRIDGE_MRP_START_TEST_MONITOR,
199 __IFLA_BRIDGE_MRP_START_TEST_MAX,
200};
201#define IFLA_BRIDGE_MRP_START_TEST_MAX (__IFLA_BRIDGE_MRP_START_TEST_MAX - 1)
Christopher Ferris25c18d42020-10-14 17:42:58 -0700202enum {
203 IFLA_BRIDGE_MRP_INFO_UNSPEC,
204 IFLA_BRIDGE_MRP_INFO_RING_ID,
205 IFLA_BRIDGE_MRP_INFO_P_IFINDEX,
206 IFLA_BRIDGE_MRP_INFO_S_IFINDEX,
207 IFLA_BRIDGE_MRP_INFO_PRIO,
208 IFLA_BRIDGE_MRP_INFO_RING_STATE,
209 IFLA_BRIDGE_MRP_INFO_RING_ROLE,
210 IFLA_BRIDGE_MRP_INFO_TEST_INTERVAL,
211 IFLA_BRIDGE_MRP_INFO_TEST_MAX_MISS,
212 IFLA_BRIDGE_MRP_INFO_TEST_MONITOR,
213 IFLA_BRIDGE_MRP_INFO_I_IFINDEX,
214 IFLA_BRIDGE_MRP_INFO_IN_STATE,
215 IFLA_BRIDGE_MRP_INFO_IN_ROLE,
216 IFLA_BRIDGE_MRP_INFO_IN_TEST_INTERVAL,
217 IFLA_BRIDGE_MRP_INFO_IN_TEST_MAX_MISS,
218 __IFLA_BRIDGE_MRP_INFO_MAX,
219};
220#define IFLA_BRIDGE_MRP_INFO_MAX (__IFLA_BRIDGE_MRP_INFO_MAX - 1)
221enum {
222 IFLA_BRIDGE_MRP_IN_STATE_UNSPEC,
223 IFLA_BRIDGE_MRP_IN_STATE_IN_ID,
224 IFLA_BRIDGE_MRP_IN_STATE_STATE,
225 __IFLA_BRIDGE_MRP_IN_STATE_MAX,
226};
227#define IFLA_BRIDGE_MRP_IN_STATE_MAX (__IFLA_BRIDGE_MRP_IN_STATE_MAX - 1)
228enum {
229 IFLA_BRIDGE_MRP_IN_ROLE_UNSPEC,
230 IFLA_BRIDGE_MRP_IN_ROLE_RING_ID,
231 IFLA_BRIDGE_MRP_IN_ROLE_IN_ID,
232 IFLA_BRIDGE_MRP_IN_ROLE_ROLE,
233 IFLA_BRIDGE_MRP_IN_ROLE_I_IFINDEX,
234 __IFLA_BRIDGE_MRP_IN_ROLE_MAX,
235};
236#define IFLA_BRIDGE_MRP_IN_ROLE_MAX (__IFLA_BRIDGE_MRP_IN_ROLE_MAX - 1)
237enum {
238 IFLA_BRIDGE_MRP_START_IN_TEST_UNSPEC,
239 IFLA_BRIDGE_MRP_START_IN_TEST_IN_ID,
240 IFLA_BRIDGE_MRP_START_IN_TEST_INTERVAL,
241 IFLA_BRIDGE_MRP_START_IN_TEST_MAX_MISS,
242 IFLA_BRIDGE_MRP_START_IN_TEST_PERIOD,
243 __IFLA_BRIDGE_MRP_START_IN_TEST_MAX,
244};
245#define IFLA_BRIDGE_MRP_START_IN_TEST_MAX (__IFLA_BRIDGE_MRP_START_IN_TEST_MAX - 1)
Christopher Ferris8177cdf2020-08-03 11:53:55 -0700246struct br_mrp_instance {
247 __u32 ring_id;
248 __u32 p_ifindex;
249 __u32 s_ifindex;
250 __u16 prio;
251};
252struct br_mrp_ring_state {
253 __u32 ring_id;
254 __u32 ring_state;
255};
256struct br_mrp_ring_role {
257 __u32 ring_id;
258 __u32 ring_role;
259};
260struct br_mrp_start_test {
261 __u32 ring_id;
262 __u32 interval;
263 __u32 max_miss;
264 __u32 period;
265 __u32 monitor;
266};
Christopher Ferris25c18d42020-10-14 17:42:58 -0700267struct br_mrp_in_state {
268 __u32 in_state;
269 __u16 in_id;
270};
271struct br_mrp_in_role {
272 __u32 ring_id;
273 __u32 in_role;
274 __u32 i_ifindex;
275 __u16 in_id;
276};
277struct br_mrp_start_in_test {
278 __u32 interval;
279 __u32 max_miss;
280 __u32 period;
281 __u16 in_id;
282};
Christopher Ferris05667cd2021-02-16 16:01:34 -0800283enum {
284 IFLA_BRIDGE_CFM_UNSPEC,
285 IFLA_BRIDGE_CFM_MEP_CREATE,
286 IFLA_BRIDGE_CFM_MEP_DELETE,
287 IFLA_BRIDGE_CFM_MEP_CONFIG,
288 IFLA_BRIDGE_CFM_CC_CONFIG,
289 IFLA_BRIDGE_CFM_CC_PEER_MEP_ADD,
290 IFLA_BRIDGE_CFM_CC_PEER_MEP_REMOVE,
291 IFLA_BRIDGE_CFM_CC_RDI,
292 IFLA_BRIDGE_CFM_CC_CCM_TX,
293 IFLA_BRIDGE_CFM_MEP_CREATE_INFO,
294 IFLA_BRIDGE_CFM_MEP_CONFIG_INFO,
295 IFLA_BRIDGE_CFM_CC_CONFIG_INFO,
296 IFLA_BRIDGE_CFM_CC_RDI_INFO,
297 IFLA_BRIDGE_CFM_CC_CCM_TX_INFO,
298 IFLA_BRIDGE_CFM_CC_PEER_MEP_INFO,
299 IFLA_BRIDGE_CFM_MEP_STATUS_INFO,
300 IFLA_BRIDGE_CFM_CC_PEER_STATUS_INFO,
301 __IFLA_BRIDGE_CFM_MAX,
302};
303#define IFLA_BRIDGE_CFM_MAX (__IFLA_BRIDGE_CFM_MAX - 1)
304enum {
305 IFLA_BRIDGE_CFM_MEP_CREATE_UNSPEC,
306 IFLA_BRIDGE_CFM_MEP_CREATE_INSTANCE,
307 IFLA_BRIDGE_CFM_MEP_CREATE_DOMAIN,
308 IFLA_BRIDGE_CFM_MEP_CREATE_DIRECTION,
309 IFLA_BRIDGE_CFM_MEP_CREATE_IFINDEX,
310 __IFLA_BRIDGE_CFM_MEP_CREATE_MAX,
311};
312#define IFLA_BRIDGE_CFM_MEP_CREATE_MAX (__IFLA_BRIDGE_CFM_MEP_CREATE_MAX - 1)
313enum {
314 IFLA_BRIDGE_CFM_MEP_DELETE_UNSPEC,
315 IFLA_BRIDGE_CFM_MEP_DELETE_INSTANCE,
316 __IFLA_BRIDGE_CFM_MEP_DELETE_MAX,
317};
318#define IFLA_BRIDGE_CFM_MEP_DELETE_MAX (__IFLA_BRIDGE_CFM_MEP_DELETE_MAX - 1)
319enum {
320 IFLA_BRIDGE_CFM_MEP_CONFIG_UNSPEC,
321 IFLA_BRIDGE_CFM_MEP_CONFIG_INSTANCE,
322 IFLA_BRIDGE_CFM_MEP_CONFIG_UNICAST_MAC,
323 IFLA_BRIDGE_CFM_MEP_CONFIG_MDLEVEL,
324 IFLA_BRIDGE_CFM_MEP_CONFIG_MEPID,
325 __IFLA_BRIDGE_CFM_MEP_CONFIG_MAX,
326};
327#define IFLA_BRIDGE_CFM_MEP_CONFIG_MAX (__IFLA_BRIDGE_CFM_MEP_CONFIG_MAX - 1)
328enum {
329 IFLA_BRIDGE_CFM_CC_CONFIG_UNSPEC,
330 IFLA_BRIDGE_CFM_CC_CONFIG_INSTANCE,
331 IFLA_BRIDGE_CFM_CC_CONFIG_ENABLE,
332 IFLA_BRIDGE_CFM_CC_CONFIG_EXP_INTERVAL,
333 IFLA_BRIDGE_CFM_CC_CONFIG_EXP_MAID,
334 __IFLA_BRIDGE_CFM_CC_CONFIG_MAX,
335};
336#define IFLA_BRIDGE_CFM_CC_CONFIG_MAX (__IFLA_BRIDGE_CFM_CC_CONFIG_MAX - 1)
337enum {
338 IFLA_BRIDGE_CFM_CC_PEER_MEP_UNSPEC,
339 IFLA_BRIDGE_CFM_CC_PEER_MEP_INSTANCE,
340 IFLA_BRIDGE_CFM_CC_PEER_MEPID,
341 __IFLA_BRIDGE_CFM_CC_PEER_MEP_MAX,
342};
343#define IFLA_BRIDGE_CFM_CC_PEER_MEP_MAX (__IFLA_BRIDGE_CFM_CC_PEER_MEP_MAX - 1)
344enum {
345 IFLA_BRIDGE_CFM_CC_RDI_UNSPEC,
346 IFLA_BRIDGE_CFM_CC_RDI_INSTANCE,
347 IFLA_BRIDGE_CFM_CC_RDI_RDI,
348 __IFLA_BRIDGE_CFM_CC_RDI_MAX,
349};
350#define IFLA_BRIDGE_CFM_CC_RDI_MAX (__IFLA_BRIDGE_CFM_CC_RDI_MAX - 1)
351enum {
352 IFLA_BRIDGE_CFM_CC_CCM_TX_UNSPEC,
353 IFLA_BRIDGE_CFM_CC_CCM_TX_INSTANCE,
354 IFLA_BRIDGE_CFM_CC_CCM_TX_DMAC,
355 IFLA_BRIDGE_CFM_CC_CCM_TX_SEQ_NO_UPDATE,
356 IFLA_BRIDGE_CFM_CC_CCM_TX_PERIOD,
357 IFLA_BRIDGE_CFM_CC_CCM_TX_IF_TLV,
358 IFLA_BRIDGE_CFM_CC_CCM_TX_IF_TLV_VALUE,
359 IFLA_BRIDGE_CFM_CC_CCM_TX_PORT_TLV,
360 IFLA_BRIDGE_CFM_CC_CCM_TX_PORT_TLV_VALUE,
361 __IFLA_BRIDGE_CFM_CC_CCM_TX_MAX,
362};
363#define IFLA_BRIDGE_CFM_CC_CCM_TX_MAX (__IFLA_BRIDGE_CFM_CC_CCM_TX_MAX - 1)
364enum {
365 IFLA_BRIDGE_CFM_MEP_STATUS_UNSPEC,
366 IFLA_BRIDGE_CFM_MEP_STATUS_INSTANCE,
367 IFLA_BRIDGE_CFM_MEP_STATUS_OPCODE_UNEXP_SEEN,
368 IFLA_BRIDGE_CFM_MEP_STATUS_VERSION_UNEXP_SEEN,
369 IFLA_BRIDGE_CFM_MEP_STATUS_RX_LEVEL_LOW_SEEN,
370 __IFLA_BRIDGE_CFM_MEP_STATUS_MAX,
371};
372#define IFLA_BRIDGE_CFM_MEP_STATUS_MAX (__IFLA_BRIDGE_CFM_MEP_STATUS_MAX - 1)
373enum {
374 IFLA_BRIDGE_CFM_CC_PEER_STATUS_UNSPEC,
375 IFLA_BRIDGE_CFM_CC_PEER_STATUS_INSTANCE,
376 IFLA_BRIDGE_CFM_CC_PEER_STATUS_PEER_MEPID,
377 IFLA_BRIDGE_CFM_CC_PEER_STATUS_CCM_DEFECT,
378 IFLA_BRIDGE_CFM_CC_PEER_STATUS_RDI,
379 IFLA_BRIDGE_CFM_CC_PEER_STATUS_PORT_TLV_VALUE,
380 IFLA_BRIDGE_CFM_CC_PEER_STATUS_IF_TLV_VALUE,
381 IFLA_BRIDGE_CFM_CC_PEER_STATUS_SEEN,
382 IFLA_BRIDGE_CFM_CC_PEER_STATUS_TLV_SEEN,
383 IFLA_BRIDGE_CFM_CC_PEER_STATUS_SEQ_UNEXP_SEEN,
384 __IFLA_BRIDGE_CFM_CC_PEER_STATUS_MAX,
385};
386#define IFLA_BRIDGE_CFM_CC_PEER_STATUS_MAX (__IFLA_BRIDGE_CFM_CC_PEER_STATUS_MAX - 1)
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -0700387struct bridge_stp_xstats {
388 __u64 transition_blk;
389 __u64 transition_fwd;
390 __u64 rx_bpdu;
391 __u64 tx_bpdu;
392 __u64 rx_tcn;
393 __u64 tx_tcn;
394};
395struct br_vlan_msg {
396 __u8 family;
397 __u8 reserved1;
398 __u16 reserved2;
399 __u32 ifindex;
400};
401enum {
Christopher Ferrisaf09c702020-06-01 20:29:29 -0700402 BRIDGE_VLANDB_DUMP_UNSPEC,
403 BRIDGE_VLANDB_DUMP_FLAGS,
404 __BRIDGE_VLANDB_DUMP_MAX,
405};
406#define BRIDGE_VLANDB_DUMP_MAX (__BRIDGE_VLANDB_DUMP_MAX - 1)
407#define BRIDGE_VLANDB_DUMPF_STATS (1 << 0)
Christopher Ferris2abfa9e2021-11-01 16:26:06 -0700408#define BRIDGE_VLANDB_DUMPF_GLOBAL (1 << 1)
Christopher Ferrisaf09c702020-06-01 20:29:29 -0700409enum {
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -0700410 BRIDGE_VLANDB_UNSPEC,
411 BRIDGE_VLANDB_ENTRY,
Christopher Ferris2abfa9e2021-11-01 16:26:06 -0700412 BRIDGE_VLANDB_GLOBAL_OPTIONS,
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -0700413 __BRIDGE_VLANDB_MAX,
414};
415#define BRIDGE_VLANDB_MAX (__BRIDGE_VLANDB_MAX - 1)
416enum {
417 BRIDGE_VLANDB_ENTRY_UNSPEC,
418 BRIDGE_VLANDB_ENTRY_INFO,
419 BRIDGE_VLANDB_ENTRY_RANGE,
420 BRIDGE_VLANDB_ENTRY_STATE,
Christopher Ferrisaf09c702020-06-01 20:29:29 -0700421 BRIDGE_VLANDB_ENTRY_TUNNEL_INFO,
422 BRIDGE_VLANDB_ENTRY_STATS,
Christopher Ferris2abfa9e2021-11-01 16:26:06 -0700423 BRIDGE_VLANDB_ENTRY_MCAST_ROUTER,
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -0700424 __BRIDGE_VLANDB_ENTRY_MAX,
425};
426#define BRIDGE_VLANDB_ENTRY_MAX (__BRIDGE_VLANDB_ENTRY_MAX - 1)
Christopher Ferris106b3a82016-08-24 12:15:38 -0700427enum {
Christopher Ferrisaf09c702020-06-01 20:29:29 -0700428 BRIDGE_VLANDB_TINFO_UNSPEC,
429 BRIDGE_VLANDB_TINFO_ID,
430 BRIDGE_VLANDB_TINFO_CMD,
431 __BRIDGE_VLANDB_TINFO_MAX,
432};
433#define BRIDGE_VLANDB_TINFO_MAX (__BRIDGE_VLANDB_TINFO_MAX - 1)
434enum {
435 BRIDGE_VLANDB_STATS_UNSPEC,
436 BRIDGE_VLANDB_STATS_RX_BYTES,
437 BRIDGE_VLANDB_STATS_RX_PACKETS,
438 BRIDGE_VLANDB_STATS_TX_BYTES,
439 BRIDGE_VLANDB_STATS_TX_PACKETS,
440 BRIDGE_VLANDB_STATS_PAD,
441 __BRIDGE_VLANDB_STATS_MAX,
442};
443#define BRIDGE_VLANDB_STATS_MAX (__BRIDGE_VLANDB_STATS_MAX - 1)
444enum {
Christopher Ferris2abfa9e2021-11-01 16:26:06 -0700445 BRIDGE_VLANDB_GOPTS_UNSPEC,
446 BRIDGE_VLANDB_GOPTS_ID,
447 BRIDGE_VLANDB_GOPTS_RANGE,
448 BRIDGE_VLANDB_GOPTS_MCAST_SNOOPING,
449 BRIDGE_VLANDB_GOPTS_MCAST_IGMP_VERSION,
450 BRIDGE_VLANDB_GOPTS_MCAST_MLD_VERSION,
451 BRIDGE_VLANDB_GOPTS_MCAST_LAST_MEMBER_CNT,
452 BRIDGE_VLANDB_GOPTS_MCAST_STARTUP_QUERY_CNT,
453 BRIDGE_VLANDB_GOPTS_MCAST_LAST_MEMBER_INTVL,
454 BRIDGE_VLANDB_GOPTS_PAD,
455 BRIDGE_VLANDB_GOPTS_MCAST_MEMBERSHIP_INTVL,
456 BRIDGE_VLANDB_GOPTS_MCAST_QUERIER_INTVL,
457 BRIDGE_VLANDB_GOPTS_MCAST_QUERY_INTVL,
458 BRIDGE_VLANDB_GOPTS_MCAST_QUERY_RESPONSE_INTVL,
459 BRIDGE_VLANDB_GOPTS_MCAST_STARTUP_QUERY_INTVL,
460 BRIDGE_VLANDB_GOPTS_MCAST_QUERIER,
461 BRIDGE_VLANDB_GOPTS_MCAST_ROUTER_PORTS,
462 BRIDGE_VLANDB_GOPTS_MCAST_QUERIER_STATE,
463 __BRIDGE_VLANDB_GOPTS_MAX
464};
465#define BRIDGE_VLANDB_GOPTS_MAX (__BRIDGE_VLANDB_GOPTS_MAX - 1)
466enum {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700467 MDBA_UNSPEC,
Tao Baod7db5942015-01-28 10:07:51 -0800468 MDBA_MDB,
469 MDBA_ROUTER,
470 __MDBA_MAX,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700471};
Christopher Ferris82d75042015-01-26 10:57:07 -0800472#define MDBA_MAX (__MDBA_MAX - 1)
Christopher Ferris38062f92014-07-09 15:33:25 -0700473enum {
Tao Baod7db5942015-01-28 10:07:51 -0800474 MDBA_MDB_UNSPEC,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700475 MDBA_MDB_ENTRY,
Tao Baod7db5942015-01-28 10:07:51 -0800476 __MDBA_MDB_MAX,
Christopher Ferris38062f92014-07-09 15:33:25 -0700477};
Ben Cheng655a7c02013-10-16 16:09:24 -0700478#define MDBA_MDB_MAX (__MDBA_MDB_MAX - 1)
Christopher Ferris106b3a82016-08-24 12:15:38 -0700479enum {
Tao Baod7db5942015-01-28 10:07:51 -0800480 MDBA_MDB_ENTRY_UNSPEC,
481 MDBA_MDB_ENTRY_INFO,
482 __MDBA_MDB_ENTRY_MAX,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700483};
Christopher Ferris82d75042015-01-26 10:57:07 -0800484#define MDBA_MDB_ENTRY_MAX (__MDBA_MDB_ENTRY_MAX - 1)
Christopher Ferris38062f92014-07-09 15:33:25 -0700485enum {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700486 MDBA_MDB_EATTR_UNSPEC,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700487 MDBA_MDB_EATTR_TIMER,
Christopher Ferris32ff3f82020-12-14 13:10:04 -0800488 MDBA_MDB_EATTR_SRC_LIST,
489 MDBA_MDB_EATTR_GROUP_MODE,
490 MDBA_MDB_EATTR_SOURCE,
491 MDBA_MDB_EATTR_RTPROT,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700492 __MDBA_MDB_EATTR_MAX
493};
494#define MDBA_MDB_EATTR_MAX (__MDBA_MDB_EATTR_MAX - 1)
Christopher Ferris106b3a82016-08-24 12:15:38 -0700495enum {
Christopher Ferris32ff3f82020-12-14 13:10:04 -0800496 MDBA_MDB_SRCLIST_UNSPEC,
497 MDBA_MDB_SRCLIST_ENTRY,
498 __MDBA_MDB_SRCLIST_MAX
499};
500#define MDBA_MDB_SRCLIST_MAX (__MDBA_MDB_SRCLIST_MAX - 1)
501enum {
502 MDBA_MDB_SRCATTR_UNSPEC,
503 MDBA_MDB_SRCATTR_ADDRESS,
504 MDBA_MDB_SRCATTR_TIMER,
505 __MDBA_MDB_SRCATTR_MAX
506};
507#define MDBA_MDB_SRCATTR_MAX (__MDBA_MDB_SRCATTR_MAX - 1)
508enum {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700509 MDB_RTR_TYPE_DISABLED,
510 MDB_RTR_TYPE_TEMP_QUERY,
511 MDB_RTR_TYPE_PERM,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700512 MDB_RTR_TYPE_TEMP
513};
514enum {
515 MDBA_ROUTER_UNSPEC,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700516 MDBA_ROUTER_PORT,
Tao Baod7db5942015-01-28 10:07:51 -0800517 __MDBA_ROUTER_MAX,
Christopher Ferris38062f92014-07-09 15:33:25 -0700518};
Ben Cheng655a7c02013-10-16 16:09:24 -0700519#define MDBA_ROUTER_MAX (__MDBA_ROUTER_MAX - 1)
Christopher Ferris106b3a82016-08-24 12:15:38 -0700520enum {
521 MDBA_ROUTER_PATTR_UNSPEC,
522 MDBA_ROUTER_PATTR_TIMER,
523 MDBA_ROUTER_PATTR_TYPE,
Christopher Ferris3a39c0b2021-09-02 00:03:38 +0000524 MDBA_ROUTER_PATTR_INET_TIMER,
525 MDBA_ROUTER_PATTR_INET6_TIMER,
Christopher Ferris2abfa9e2021-11-01 16:26:06 -0700526 MDBA_ROUTER_PATTR_VID,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700527 __MDBA_ROUTER_PATTR_MAX
528};
529#define MDBA_ROUTER_PATTR_MAX (__MDBA_ROUTER_PATTR_MAX - 1)
Ben Cheng655a7c02013-10-16 16:09:24 -0700530struct br_port_msg {
Tao Baod7db5942015-01-28 10:07:51 -0800531 __u8 family;
532 __u32 ifindex;
Ben Cheng655a7c02013-10-16 16:09:24 -0700533};
534struct br_mdb_entry {
Tao Baod7db5942015-01-28 10:07:51 -0800535 __u32 ifindex;
Christopher Ferris38062f92014-07-09 15:33:25 -0700536#define MDB_TEMPORARY 0
Ben Cheng655a7c02013-10-16 16:09:24 -0700537#define MDB_PERMANENT 1
Tao Baod7db5942015-01-28 10:07:51 -0800538 __u8 state;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700539#define MDB_FLAGS_OFFLOAD (1 << 0)
Christopher Ferris9584fa42019-12-09 15:36:13 -0800540#define MDB_FLAGS_FAST_LEAVE (1 << 1)
Christopher Ferris32ff3f82020-12-14 13:10:04 -0800541#define MDB_FLAGS_STAR_EXCL (1 << 2)
542#define MDB_FLAGS_BLOCKED (1 << 3)
Christopher Ferris106b3a82016-08-24 12:15:38 -0700543 __u8 flags;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800544 __u16 vid;
Tao Baod7db5942015-01-28 10:07:51 -0800545 struct {
546 union {
547 __be32 ip4;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800548 struct in6_addr ip6;
Christopher Ferris05667cd2021-02-16 16:01:34 -0800549 unsigned char mac_addr[ETH_ALEN];
Tao Baod7db5942015-01-28 10:07:51 -0800550 } u;
551 __be16 proto;
552 } addr;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800553};
Christopher Ferris82d75042015-01-26 10:57:07 -0800554enum {
Tao Baod7db5942015-01-28 10:07:51 -0800555 MDBA_SET_ENTRY_UNSPEC,
556 MDBA_SET_ENTRY,
Christopher Ferris32ff3f82020-12-14 13:10:04 -0800557 MDBA_SET_ENTRY_ATTRS,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800558 __MDBA_SET_ENTRY_MAX,
Christopher Ferris82d75042015-01-26 10:57:07 -0800559};
Christopher Ferris38062f92014-07-09 15:33:25 -0700560#define MDBA_SET_ENTRY_MAX (__MDBA_SET_ENTRY_MAX - 1)
Christopher Ferris106b3a82016-08-24 12:15:38 -0700561enum {
Christopher Ferris32ff3f82020-12-14 13:10:04 -0800562 MDBE_ATTR_UNSPEC,
563 MDBE_ATTR_SOURCE,
564 __MDBE_ATTR_MAX,
565};
566#define MDBE_ATTR_MAX (__MDBE_ATTR_MAX - 1)
567enum {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700568 BRIDGE_XSTATS_UNSPEC,
569 BRIDGE_XSTATS_VLAN,
Christopher Ferris49f525c2016-12-12 14:55:36 -0800570 BRIDGE_XSTATS_MCAST,
571 BRIDGE_XSTATS_PAD,
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -0700572 BRIDGE_XSTATS_STP,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700573 __BRIDGE_XSTATS_MAX
574};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800575#define BRIDGE_XSTATS_MAX (__BRIDGE_XSTATS_MAX - 1)
576enum {
577 BR_MCAST_DIR_RX,
578 BR_MCAST_DIR_TX,
Christopher Ferris49f525c2016-12-12 14:55:36 -0800579 BR_MCAST_DIR_SIZE
580};
581struct br_mcast_stats {
582 __u64 igmp_v1queries[BR_MCAST_DIR_SIZE];
Christopher Ferris49f525c2016-12-12 14:55:36 -0800583 __u64 igmp_v2queries[BR_MCAST_DIR_SIZE];
584 __u64 igmp_v3queries[BR_MCAST_DIR_SIZE];
585 __u64 igmp_leaves[BR_MCAST_DIR_SIZE];
586 __u64 igmp_v1reports[BR_MCAST_DIR_SIZE];
Christopher Ferris49f525c2016-12-12 14:55:36 -0800587 __u64 igmp_v2reports[BR_MCAST_DIR_SIZE];
588 __u64 igmp_v3reports[BR_MCAST_DIR_SIZE];
589 __u64 igmp_parse_errors;
590 __u64 mld_v1queries[BR_MCAST_DIR_SIZE];
Christopher Ferris49f525c2016-12-12 14:55:36 -0800591 __u64 mld_v2queries[BR_MCAST_DIR_SIZE];
592 __u64 mld_leaves[BR_MCAST_DIR_SIZE];
593 __u64 mld_v1reports[BR_MCAST_DIR_SIZE];
594 __u64 mld_v2reports[BR_MCAST_DIR_SIZE];
Christopher Ferris49f525c2016-12-12 14:55:36 -0800595 __u64 mld_parse_errors;
596 __u64 mcast_bytes[BR_MCAST_DIR_SIZE];
597 __u64 mcast_packets[BR_MCAST_DIR_SIZE];
598};
Christopher Ferrisd842e432019-03-07 10:21:59 -0800599enum br_boolopt_id {
600 BR_BOOLOPT_NO_LL_LEARN,
Christopher Ferris2abfa9e2021-11-01 16:26:06 -0700601 BR_BOOLOPT_MCAST_VLAN_SNOOPING,
Christopher Ferrisd842e432019-03-07 10:21:59 -0800602 BR_BOOLOPT_MAX
603};
604struct br_boolopt_multi {
605 __u32 optval;
606 __u32 optmask;
607};
Christopher Ferris2abfa9e2021-11-01 16:26:06 -0700608enum {
609 BRIDGE_QUERIER_UNSPEC,
610 BRIDGE_QUERIER_IP_ADDRESS,
611 BRIDGE_QUERIER_IP_PORT,
612 BRIDGE_QUERIER_IP_OTHER_TIMER,
613 BRIDGE_QUERIER_PAD,
614 BRIDGE_QUERIER_IPV6_ADDRESS,
615 BRIDGE_QUERIER_IPV6_PORT,
616 BRIDGE_QUERIER_IPV6_OTHER_TIMER,
617 __BRIDGE_QUERIER_MAX
618};
619#define BRIDGE_QUERIER_MAX (__BRIDGE_QUERIER_MAX - 1)
Christopher Ferris49f525c2016-12-12 14:55:36 -0800620#endif