blob: 570c09ea667162603eb85541bc15c886535b4ef4 [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)
408enum {
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -0700409 BRIDGE_VLANDB_UNSPEC,
410 BRIDGE_VLANDB_ENTRY,
411 __BRIDGE_VLANDB_MAX,
412};
413#define BRIDGE_VLANDB_MAX (__BRIDGE_VLANDB_MAX - 1)
414enum {
415 BRIDGE_VLANDB_ENTRY_UNSPEC,
416 BRIDGE_VLANDB_ENTRY_INFO,
417 BRIDGE_VLANDB_ENTRY_RANGE,
418 BRIDGE_VLANDB_ENTRY_STATE,
Christopher Ferrisaf09c702020-06-01 20:29:29 -0700419 BRIDGE_VLANDB_ENTRY_TUNNEL_INFO,
420 BRIDGE_VLANDB_ENTRY_STATS,
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -0700421 __BRIDGE_VLANDB_ENTRY_MAX,
422};
423#define BRIDGE_VLANDB_ENTRY_MAX (__BRIDGE_VLANDB_ENTRY_MAX - 1)
Christopher Ferris106b3a82016-08-24 12:15:38 -0700424enum {
Christopher Ferrisaf09c702020-06-01 20:29:29 -0700425 BRIDGE_VLANDB_TINFO_UNSPEC,
426 BRIDGE_VLANDB_TINFO_ID,
427 BRIDGE_VLANDB_TINFO_CMD,
428 __BRIDGE_VLANDB_TINFO_MAX,
429};
430#define BRIDGE_VLANDB_TINFO_MAX (__BRIDGE_VLANDB_TINFO_MAX - 1)
431enum {
432 BRIDGE_VLANDB_STATS_UNSPEC,
433 BRIDGE_VLANDB_STATS_RX_BYTES,
434 BRIDGE_VLANDB_STATS_RX_PACKETS,
435 BRIDGE_VLANDB_STATS_TX_BYTES,
436 BRIDGE_VLANDB_STATS_TX_PACKETS,
437 BRIDGE_VLANDB_STATS_PAD,
438 __BRIDGE_VLANDB_STATS_MAX,
439};
440#define BRIDGE_VLANDB_STATS_MAX (__BRIDGE_VLANDB_STATS_MAX - 1)
441enum {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700442 MDBA_UNSPEC,
Tao Baod7db5942015-01-28 10:07:51 -0800443 MDBA_MDB,
444 MDBA_ROUTER,
445 __MDBA_MAX,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700446};
Christopher Ferris82d75042015-01-26 10:57:07 -0800447#define MDBA_MAX (__MDBA_MAX - 1)
Christopher Ferris38062f92014-07-09 15:33:25 -0700448enum {
Tao Baod7db5942015-01-28 10:07:51 -0800449 MDBA_MDB_UNSPEC,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700450 MDBA_MDB_ENTRY,
Tao Baod7db5942015-01-28 10:07:51 -0800451 __MDBA_MDB_MAX,
Christopher Ferris38062f92014-07-09 15:33:25 -0700452};
Ben Cheng655a7c02013-10-16 16:09:24 -0700453#define MDBA_MDB_MAX (__MDBA_MDB_MAX - 1)
Christopher Ferris106b3a82016-08-24 12:15:38 -0700454enum {
Tao Baod7db5942015-01-28 10:07:51 -0800455 MDBA_MDB_ENTRY_UNSPEC,
456 MDBA_MDB_ENTRY_INFO,
457 __MDBA_MDB_ENTRY_MAX,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700458};
Christopher Ferris82d75042015-01-26 10:57:07 -0800459#define MDBA_MDB_ENTRY_MAX (__MDBA_MDB_ENTRY_MAX - 1)
Christopher Ferris38062f92014-07-09 15:33:25 -0700460enum {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700461 MDBA_MDB_EATTR_UNSPEC,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700462 MDBA_MDB_EATTR_TIMER,
Christopher Ferris32ff3f82020-12-14 13:10:04 -0800463 MDBA_MDB_EATTR_SRC_LIST,
464 MDBA_MDB_EATTR_GROUP_MODE,
465 MDBA_MDB_EATTR_SOURCE,
466 MDBA_MDB_EATTR_RTPROT,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700467 __MDBA_MDB_EATTR_MAX
468};
469#define MDBA_MDB_EATTR_MAX (__MDBA_MDB_EATTR_MAX - 1)
Christopher Ferris106b3a82016-08-24 12:15:38 -0700470enum {
Christopher Ferris32ff3f82020-12-14 13:10:04 -0800471 MDBA_MDB_SRCLIST_UNSPEC,
472 MDBA_MDB_SRCLIST_ENTRY,
473 __MDBA_MDB_SRCLIST_MAX
474};
475#define MDBA_MDB_SRCLIST_MAX (__MDBA_MDB_SRCLIST_MAX - 1)
476enum {
477 MDBA_MDB_SRCATTR_UNSPEC,
478 MDBA_MDB_SRCATTR_ADDRESS,
479 MDBA_MDB_SRCATTR_TIMER,
480 __MDBA_MDB_SRCATTR_MAX
481};
482#define MDBA_MDB_SRCATTR_MAX (__MDBA_MDB_SRCATTR_MAX - 1)
483enum {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700484 MDB_RTR_TYPE_DISABLED,
485 MDB_RTR_TYPE_TEMP_QUERY,
486 MDB_RTR_TYPE_PERM,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700487 MDB_RTR_TYPE_TEMP
488};
489enum {
490 MDBA_ROUTER_UNSPEC,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700491 MDBA_ROUTER_PORT,
Tao Baod7db5942015-01-28 10:07:51 -0800492 __MDBA_ROUTER_MAX,
Christopher Ferris38062f92014-07-09 15:33:25 -0700493};
Ben Cheng655a7c02013-10-16 16:09:24 -0700494#define MDBA_ROUTER_MAX (__MDBA_ROUTER_MAX - 1)
Christopher Ferris106b3a82016-08-24 12:15:38 -0700495enum {
496 MDBA_ROUTER_PATTR_UNSPEC,
497 MDBA_ROUTER_PATTR_TIMER,
498 MDBA_ROUTER_PATTR_TYPE,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700499 __MDBA_ROUTER_PATTR_MAX
500};
501#define MDBA_ROUTER_PATTR_MAX (__MDBA_ROUTER_PATTR_MAX - 1)
Ben Cheng655a7c02013-10-16 16:09:24 -0700502struct br_port_msg {
Tao Baod7db5942015-01-28 10:07:51 -0800503 __u8 family;
504 __u32 ifindex;
Ben Cheng655a7c02013-10-16 16:09:24 -0700505};
506struct br_mdb_entry {
Tao Baod7db5942015-01-28 10:07:51 -0800507 __u32 ifindex;
Christopher Ferris38062f92014-07-09 15:33:25 -0700508#define MDB_TEMPORARY 0
Ben Cheng655a7c02013-10-16 16:09:24 -0700509#define MDB_PERMANENT 1
Tao Baod7db5942015-01-28 10:07:51 -0800510 __u8 state;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700511#define MDB_FLAGS_OFFLOAD (1 << 0)
Christopher Ferris9584fa42019-12-09 15:36:13 -0800512#define MDB_FLAGS_FAST_LEAVE (1 << 1)
Christopher Ferris32ff3f82020-12-14 13:10:04 -0800513#define MDB_FLAGS_STAR_EXCL (1 << 2)
514#define MDB_FLAGS_BLOCKED (1 << 3)
Christopher Ferris106b3a82016-08-24 12:15:38 -0700515 __u8 flags;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800516 __u16 vid;
Tao Baod7db5942015-01-28 10:07:51 -0800517 struct {
518 union {
519 __be32 ip4;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800520 struct in6_addr ip6;
Christopher Ferris05667cd2021-02-16 16:01:34 -0800521 unsigned char mac_addr[ETH_ALEN];
Tao Baod7db5942015-01-28 10:07:51 -0800522 } u;
523 __be16 proto;
524 } addr;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800525};
Christopher Ferris82d75042015-01-26 10:57:07 -0800526enum {
Tao Baod7db5942015-01-28 10:07:51 -0800527 MDBA_SET_ENTRY_UNSPEC,
528 MDBA_SET_ENTRY,
Christopher Ferris32ff3f82020-12-14 13:10:04 -0800529 MDBA_SET_ENTRY_ATTRS,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800530 __MDBA_SET_ENTRY_MAX,
Christopher Ferris82d75042015-01-26 10:57:07 -0800531};
Christopher Ferris38062f92014-07-09 15:33:25 -0700532#define MDBA_SET_ENTRY_MAX (__MDBA_SET_ENTRY_MAX - 1)
Christopher Ferris106b3a82016-08-24 12:15:38 -0700533enum {
Christopher Ferris32ff3f82020-12-14 13:10:04 -0800534 MDBE_ATTR_UNSPEC,
535 MDBE_ATTR_SOURCE,
536 __MDBE_ATTR_MAX,
537};
538#define MDBE_ATTR_MAX (__MDBE_ATTR_MAX - 1)
539enum {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700540 BRIDGE_XSTATS_UNSPEC,
541 BRIDGE_XSTATS_VLAN,
Christopher Ferris49f525c2016-12-12 14:55:36 -0800542 BRIDGE_XSTATS_MCAST,
543 BRIDGE_XSTATS_PAD,
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -0700544 BRIDGE_XSTATS_STP,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700545 __BRIDGE_XSTATS_MAX
546};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800547#define BRIDGE_XSTATS_MAX (__BRIDGE_XSTATS_MAX - 1)
548enum {
549 BR_MCAST_DIR_RX,
550 BR_MCAST_DIR_TX,
Christopher Ferris49f525c2016-12-12 14:55:36 -0800551 BR_MCAST_DIR_SIZE
552};
553struct br_mcast_stats {
554 __u64 igmp_v1queries[BR_MCAST_DIR_SIZE];
Christopher Ferris49f525c2016-12-12 14:55:36 -0800555 __u64 igmp_v2queries[BR_MCAST_DIR_SIZE];
556 __u64 igmp_v3queries[BR_MCAST_DIR_SIZE];
557 __u64 igmp_leaves[BR_MCAST_DIR_SIZE];
558 __u64 igmp_v1reports[BR_MCAST_DIR_SIZE];
Christopher Ferris49f525c2016-12-12 14:55:36 -0800559 __u64 igmp_v2reports[BR_MCAST_DIR_SIZE];
560 __u64 igmp_v3reports[BR_MCAST_DIR_SIZE];
561 __u64 igmp_parse_errors;
562 __u64 mld_v1queries[BR_MCAST_DIR_SIZE];
Christopher Ferris49f525c2016-12-12 14:55:36 -0800563 __u64 mld_v2queries[BR_MCAST_DIR_SIZE];
564 __u64 mld_leaves[BR_MCAST_DIR_SIZE];
565 __u64 mld_v1reports[BR_MCAST_DIR_SIZE];
566 __u64 mld_v2reports[BR_MCAST_DIR_SIZE];
Christopher Ferris49f525c2016-12-12 14:55:36 -0800567 __u64 mld_parse_errors;
568 __u64 mcast_bytes[BR_MCAST_DIR_SIZE];
569 __u64 mcast_packets[BR_MCAST_DIR_SIZE];
570};
Christopher Ferrisd842e432019-03-07 10:21:59 -0800571enum br_boolopt_id {
572 BR_BOOLOPT_NO_LL_LEARN,
573 BR_BOOLOPT_MAX
574};
575struct br_boolopt_multi {
576 __u32 optval;
577 __u32 optmask;
578};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800579#endif