blob: aa12dea1f37de5064b750c0dabf9a48f1c1e5f9d [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,
Tao Baod7db5942015-01-28 10:07:51 -0800110 __IFLA_BRIDGE_MAX,
Christopher Ferris38062f92014-07-09 15:33:25 -0700111};
Ben Cheng655a7c02013-10-16 16:09:24 -0700112#define IFLA_BRIDGE_MAX (__IFLA_BRIDGE_MAX - 1)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800113#define BRIDGE_VLAN_INFO_MASTER (1 << 0)
Tao Baod7db5942015-01-28 10:07:51 -0800114#define BRIDGE_VLAN_INFO_PVID (1 << 1)
115#define BRIDGE_VLAN_INFO_UNTAGGED (1 << 2)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800116#define BRIDGE_VLAN_INFO_RANGE_BEGIN (1 << 3)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800117#define BRIDGE_VLAN_INFO_RANGE_END (1 << 4)
118#define BRIDGE_VLAN_INFO_BRENTRY (1 << 5)
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -0700119#define BRIDGE_VLAN_INFO_ONLY_OPTS (1 << 6)
Ben Cheng655a7c02013-10-16 16:09:24 -0700120struct bridge_vlan_info {
Tao Baod7db5942015-01-28 10:07:51 -0800121 __u16 flags;
Tao Baod7db5942015-01-28 10:07:51 -0800122 __u16 vid;
Christopher Ferris38062f92014-07-09 15:33:25 -0700123};
Christopher Ferris525ce912017-07-26 13:12:53 -0700124enum {
125 IFLA_BRIDGE_VLAN_TUNNEL_UNSPEC,
126 IFLA_BRIDGE_VLAN_TUNNEL_ID,
127 IFLA_BRIDGE_VLAN_TUNNEL_VID,
128 IFLA_BRIDGE_VLAN_TUNNEL_FLAGS,
129 __IFLA_BRIDGE_VLAN_TUNNEL_MAX,
130};
131#define IFLA_BRIDGE_VLAN_TUNNEL_MAX (__IFLA_BRIDGE_VLAN_TUNNEL_MAX - 1)
Christopher Ferris106b3a82016-08-24 12:15:38 -0700132struct bridge_vlan_xstats {
133 __u64 rx_bytes;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700134 __u64 rx_packets;
135 __u64 tx_bytes;
136 __u64 tx_packets;
137 __u16 vid;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800138 __u16 flags;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700139 __u32 pad2;
140};
Christopher Ferris8177cdf2020-08-03 11:53:55 -0700141enum {
142 IFLA_BRIDGE_MRP_UNSPEC,
143 IFLA_BRIDGE_MRP_INSTANCE,
144 IFLA_BRIDGE_MRP_PORT_STATE,
145 IFLA_BRIDGE_MRP_PORT_ROLE,
146 IFLA_BRIDGE_MRP_RING_STATE,
147 IFLA_BRIDGE_MRP_RING_ROLE,
148 IFLA_BRIDGE_MRP_START_TEST,
Christopher Ferris25c18d42020-10-14 17:42:58 -0700149 IFLA_BRIDGE_MRP_INFO,
150 IFLA_BRIDGE_MRP_IN_ROLE,
151 IFLA_BRIDGE_MRP_IN_STATE,
152 IFLA_BRIDGE_MRP_START_IN_TEST,
Christopher Ferris8177cdf2020-08-03 11:53:55 -0700153 __IFLA_BRIDGE_MRP_MAX,
154};
155#define IFLA_BRIDGE_MRP_MAX (__IFLA_BRIDGE_MRP_MAX - 1)
156enum {
157 IFLA_BRIDGE_MRP_INSTANCE_UNSPEC,
158 IFLA_BRIDGE_MRP_INSTANCE_RING_ID,
159 IFLA_BRIDGE_MRP_INSTANCE_P_IFINDEX,
160 IFLA_BRIDGE_MRP_INSTANCE_S_IFINDEX,
161 IFLA_BRIDGE_MRP_INSTANCE_PRIO,
162 __IFLA_BRIDGE_MRP_INSTANCE_MAX,
163};
164#define IFLA_BRIDGE_MRP_INSTANCE_MAX (__IFLA_BRIDGE_MRP_INSTANCE_MAX - 1)
165enum {
166 IFLA_BRIDGE_MRP_PORT_STATE_UNSPEC,
167 IFLA_BRIDGE_MRP_PORT_STATE_STATE,
168 __IFLA_BRIDGE_MRP_PORT_STATE_MAX,
169};
170#define IFLA_BRIDGE_MRP_PORT_STATE_MAX (__IFLA_BRIDGE_MRP_PORT_STATE_MAX - 1)
171enum {
172 IFLA_BRIDGE_MRP_PORT_ROLE_UNSPEC,
173 IFLA_BRIDGE_MRP_PORT_ROLE_ROLE,
174 __IFLA_BRIDGE_MRP_PORT_ROLE_MAX,
175};
176#define IFLA_BRIDGE_MRP_PORT_ROLE_MAX (__IFLA_BRIDGE_MRP_PORT_ROLE_MAX - 1)
177enum {
178 IFLA_BRIDGE_MRP_RING_STATE_UNSPEC,
179 IFLA_BRIDGE_MRP_RING_STATE_RING_ID,
180 IFLA_BRIDGE_MRP_RING_STATE_STATE,
181 __IFLA_BRIDGE_MRP_RING_STATE_MAX,
182};
183#define IFLA_BRIDGE_MRP_RING_STATE_MAX (__IFLA_BRIDGE_MRP_RING_STATE_MAX - 1)
184enum {
185 IFLA_BRIDGE_MRP_RING_ROLE_UNSPEC,
186 IFLA_BRIDGE_MRP_RING_ROLE_RING_ID,
187 IFLA_BRIDGE_MRP_RING_ROLE_ROLE,
188 __IFLA_BRIDGE_MRP_RING_ROLE_MAX,
189};
190#define IFLA_BRIDGE_MRP_RING_ROLE_MAX (__IFLA_BRIDGE_MRP_RING_ROLE_MAX - 1)
191enum {
192 IFLA_BRIDGE_MRP_START_TEST_UNSPEC,
193 IFLA_BRIDGE_MRP_START_TEST_RING_ID,
194 IFLA_BRIDGE_MRP_START_TEST_INTERVAL,
195 IFLA_BRIDGE_MRP_START_TEST_MAX_MISS,
196 IFLA_BRIDGE_MRP_START_TEST_PERIOD,
197 IFLA_BRIDGE_MRP_START_TEST_MONITOR,
198 __IFLA_BRIDGE_MRP_START_TEST_MAX,
199};
200#define IFLA_BRIDGE_MRP_START_TEST_MAX (__IFLA_BRIDGE_MRP_START_TEST_MAX - 1)
Christopher Ferris25c18d42020-10-14 17:42:58 -0700201enum {
202 IFLA_BRIDGE_MRP_INFO_UNSPEC,
203 IFLA_BRIDGE_MRP_INFO_RING_ID,
204 IFLA_BRIDGE_MRP_INFO_P_IFINDEX,
205 IFLA_BRIDGE_MRP_INFO_S_IFINDEX,
206 IFLA_BRIDGE_MRP_INFO_PRIO,
207 IFLA_BRIDGE_MRP_INFO_RING_STATE,
208 IFLA_BRIDGE_MRP_INFO_RING_ROLE,
209 IFLA_BRIDGE_MRP_INFO_TEST_INTERVAL,
210 IFLA_BRIDGE_MRP_INFO_TEST_MAX_MISS,
211 IFLA_BRIDGE_MRP_INFO_TEST_MONITOR,
212 IFLA_BRIDGE_MRP_INFO_I_IFINDEX,
213 IFLA_BRIDGE_MRP_INFO_IN_STATE,
214 IFLA_BRIDGE_MRP_INFO_IN_ROLE,
215 IFLA_BRIDGE_MRP_INFO_IN_TEST_INTERVAL,
216 IFLA_BRIDGE_MRP_INFO_IN_TEST_MAX_MISS,
217 __IFLA_BRIDGE_MRP_INFO_MAX,
218};
219#define IFLA_BRIDGE_MRP_INFO_MAX (__IFLA_BRIDGE_MRP_INFO_MAX - 1)
220enum {
221 IFLA_BRIDGE_MRP_IN_STATE_UNSPEC,
222 IFLA_BRIDGE_MRP_IN_STATE_IN_ID,
223 IFLA_BRIDGE_MRP_IN_STATE_STATE,
224 __IFLA_BRIDGE_MRP_IN_STATE_MAX,
225};
226#define IFLA_BRIDGE_MRP_IN_STATE_MAX (__IFLA_BRIDGE_MRP_IN_STATE_MAX - 1)
227enum {
228 IFLA_BRIDGE_MRP_IN_ROLE_UNSPEC,
229 IFLA_BRIDGE_MRP_IN_ROLE_RING_ID,
230 IFLA_BRIDGE_MRP_IN_ROLE_IN_ID,
231 IFLA_BRIDGE_MRP_IN_ROLE_ROLE,
232 IFLA_BRIDGE_MRP_IN_ROLE_I_IFINDEX,
233 __IFLA_BRIDGE_MRP_IN_ROLE_MAX,
234};
235#define IFLA_BRIDGE_MRP_IN_ROLE_MAX (__IFLA_BRIDGE_MRP_IN_ROLE_MAX - 1)
236enum {
237 IFLA_BRIDGE_MRP_START_IN_TEST_UNSPEC,
238 IFLA_BRIDGE_MRP_START_IN_TEST_IN_ID,
239 IFLA_BRIDGE_MRP_START_IN_TEST_INTERVAL,
240 IFLA_BRIDGE_MRP_START_IN_TEST_MAX_MISS,
241 IFLA_BRIDGE_MRP_START_IN_TEST_PERIOD,
242 __IFLA_BRIDGE_MRP_START_IN_TEST_MAX,
243};
244#define IFLA_BRIDGE_MRP_START_IN_TEST_MAX (__IFLA_BRIDGE_MRP_START_IN_TEST_MAX - 1)
Christopher Ferris8177cdf2020-08-03 11:53:55 -0700245struct br_mrp_instance {
246 __u32 ring_id;
247 __u32 p_ifindex;
248 __u32 s_ifindex;
249 __u16 prio;
250};
251struct br_mrp_ring_state {
252 __u32 ring_id;
253 __u32 ring_state;
254};
255struct br_mrp_ring_role {
256 __u32 ring_id;
257 __u32 ring_role;
258};
259struct br_mrp_start_test {
260 __u32 ring_id;
261 __u32 interval;
262 __u32 max_miss;
263 __u32 period;
264 __u32 monitor;
265};
Christopher Ferris25c18d42020-10-14 17:42:58 -0700266struct br_mrp_in_state {
267 __u32 in_state;
268 __u16 in_id;
269};
270struct br_mrp_in_role {
271 __u32 ring_id;
272 __u32 in_role;
273 __u32 i_ifindex;
274 __u16 in_id;
275};
276struct br_mrp_start_in_test {
277 __u32 interval;
278 __u32 max_miss;
279 __u32 period;
280 __u16 in_id;
281};
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -0700282struct bridge_stp_xstats {
283 __u64 transition_blk;
284 __u64 transition_fwd;
285 __u64 rx_bpdu;
286 __u64 tx_bpdu;
287 __u64 rx_tcn;
288 __u64 tx_tcn;
289};
290struct br_vlan_msg {
291 __u8 family;
292 __u8 reserved1;
293 __u16 reserved2;
294 __u32 ifindex;
295};
296enum {
Christopher Ferrisaf09c702020-06-01 20:29:29 -0700297 BRIDGE_VLANDB_DUMP_UNSPEC,
298 BRIDGE_VLANDB_DUMP_FLAGS,
299 __BRIDGE_VLANDB_DUMP_MAX,
300};
301#define BRIDGE_VLANDB_DUMP_MAX (__BRIDGE_VLANDB_DUMP_MAX - 1)
302#define BRIDGE_VLANDB_DUMPF_STATS (1 << 0)
303enum {
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -0700304 BRIDGE_VLANDB_UNSPEC,
305 BRIDGE_VLANDB_ENTRY,
306 __BRIDGE_VLANDB_MAX,
307};
308#define BRIDGE_VLANDB_MAX (__BRIDGE_VLANDB_MAX - 1)
309enum {
310 BRIDGE_VLANDB_ENTRY_UNSPEC,
311 BRIDGE_VLANDB_ENTRY_INFO,
312 BRIDGE_VLANDB_ENTRY_RANGE,
313 BRIDGE_VLANDB_ENTRY_STATE,
Christopher Ferrisaf09c702020-06-01 20:29:29 -0700314 BRIDGE_VLANDB_ENTRY_TUNNEL_INFO,
315 BRIDGE_VLANDB_ENTRY_STATS,
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -0700316 __BRIDGE_VLANDB_ENTRY_MAX,
317};
318#define BRIDGE_VLANDB_ENTRY_MAX (__BRIDGE_VLANDB_ENTRY_MAX - 1)
Christopher Ferris106b3a82016-08-24 12:15:38 -0700319enum {
Christopher Ferrisaf09c702020-06-01 20:29:29 -0700320 BRIDGE_VLANDB_TINFO_UNSPEC,
321 BRIDGE_VLANDB_TINFO_ID,
322 BRIDGE_VLANDB_TINFO_CMD,
323 __BRIDGE_VLANDB_TINFO_MAX,
324};
325#define BRIDGE_VLANDB_TINFO_MAX (__BRIDGE_VLANDB_TINFO_MAX - 1)
326enum {
327 BRIDGE_VLANDB_STATS_UNSPEC,
328 BRIDGE_VLANDB_STATS_RX_BYTES,
329 BRIDGE_VLANDB_STATS_RX_PACKETS,
330 BRIDGE_VLANDB_STATS_TX_BYTES,
331 BRIDGE_VLANDB_STATS_TX_PACKETS,
332 BRIDGE_VLANDB_STATS_PAD,
333 __BRIDGE_VLANDB_STATS_MAX,
334};
335#define BRIDGE_VLANDB_STATS_MAX (__BRIDGE_VLANDB_STATS_MAX - 1)
336enum {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700337 MDBA_UNSPEC,
Tao Baod7db5942015-01-28 10:07:51 -0800338 MDBA_MDB,
339 MDBA_ROUTER,
340 __MDBA_MAX,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700341};
Christopher Ferris82d75042015-01-26 10:57:07 -0800342#define MDBA_MAX (__MDBA_MAX - 1)
Christopher Ferris38062f92014-07-09 15:33:25 -0700343enum {
Tao Baod7db5942015-01-28 10:07:51 -0800344 MDBA_MDB_UNSPEC,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700345 MDBA_MDB_ENTRY,
Tao Baod7db5942015-01-28 10:07:51 -0800346 __MDBA_MDB_MAX,
Christopher Ferris38062f92014-07-09 15:33:25 -0700347};
Ben Cheng655a7c02013-10-16 16:09:24 -0700348#define MDBA_MDB_MAX (__MDBA_MDB_MAX - 1)
Christopher Ferris106b3a82016-08-24 12:15:38 -0700349enum {
Tao Baod7db5942015-01-28 10:07:51 -0800350 MDBA_MDB_ENTRY_UNSPEC,
351 MDBA_MDB_ENTRY_INFO,
352 __MDBA_MDB_ENTRY_MAX,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700353};
Christopher Ferris82d75042015-01-26 10:57:07 -0800354#define MDBA_MDB_ENTRY_MAX (__MDBA_MDB_ENTRY_MAX - 1)
Christopher Ferris38062f92014-07-09 15:33:25 -0700355enum {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700356 MDBA_MDB_EATTR_UNSPEC,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700357 MDBA_MDB_EATTR_TIMER,
358 __MDBA_MDB_EATTR_MAX
359};
360#define MDBA_MDB_EATTR_MAX (__MDBA_MDB_EATTR_MAX - 1)
Christopher Ferris106b3a82016-08-24 12:15:38 -0700361enum {
362 MDB_RTR_TYPE_DISABLED,
363 MDB_RTR_TYPE_TEMP_QUERY,
364 MDB_RTR_TYPE_PERM,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700365 MDB_RTR_TYPE_TEMP
366};
367enum {
368 MDBA_ROUTER_UNSPEC,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700369 MDBA_ROUTER_PORT,
Tao Baod7db5942015-01-28 10:07:51 -0800370 __MDBA_ROUTER_MAX,
Christopher Ferris38062f92014-07-09 15:33:25 -0700371};
Ben Cheng655a7c02013-10-16 16:09:24 -0700372#define MDBA_ROUTER_MAX (__MDBA_ROUTER_MAX - 1)
Christopher Ferris106b3a82016-08-24 12:15:38 -0700373enum {
374 MDBA_ROUTER_PATTR_UNSPEC,
375 MDBA_ROUTER_PATTR_TIMER,
376 MDBA_ROUTER_PATTR_TYPE,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700377 __MDBA_ROUTER_PATTR_MAX
378};
379#define MDBA_ROUTER_PATTR_MAX (__MDBA_ROUTER_PATTR_MAX - 1)
Ben Cheng655a7c02013-10-16 16:09:24 -0700380struct br_port_msg {
Tao Baod7db5942015-01-28 10:07:51 -0800381 __u8 family;
382 __u32 ifindex;
Ben Cheng655a7c02013-10-16 16:09:24 -0700383};
384struct br_mdb_entry {
Tao Baod7db5942015-01-28 10:07:51 -0800385 __u32 ifindex;
Christopher Ferris38062f92014-07-09 15:33:25 -0700386#define MDB_TEMPORARY 0
Ben Cheng655a7c02013-10-16 16:09:24 -0700387#define MDB_PERMANENT 1
Tao Baod7db5942015-01-28 10:07:51 -0800388 __u8 state;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700389#define MDB_FLAGS_OFFLOAD (1 << 0)
Christopher Ferris9584fa42019-12-09 15:36:13 -0800390#define MDB_FLAGS_FAST_LEAVE (1 << 1)
Christopher Ferris106b3a82016-08-24 12:15:38 -0700391 __u8 flags;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800392 __u16 vid;
Tao Baod7db5942015-01-28 10:07:51 -0800393 struct {
394 union {
395 __be32 ip4;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800396 struct in6_addr ip6;
Tao Baod7db5942015-01-28 10:07:51 -0800397 } u;
398 __be16 proto;
399 } addr;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800400};
Christopher Ferris82d75042015-01-26 10:57:07 -0800401enum {
Tao Baod7db5942015-01-28 10:07:51 -0800402 MDBA_SET_ENTRY_UNSPEC,
403 MDBA_SET_ENTRY,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800404 __MDBA_SET_ENTRY_MAX,
Christopher Ferris82d75042015-01-26 10:57:07 -0800405};
Christopher Ferris38062f92014-07-09 15:33:25 -0700406#define MDBA_SET_ENTRY_MAX (__MDBA_SET_ENTRY_MAX - 1)
Christopher Ferris106b3a82016-08-24 12:15:38 -0700407enum {
408 BRIDGE_XSTATS_UNSPEC,
409 BRIDGE_XSTATS_VLAN,
Christopher Ferris49f525c2016-12-12 14:55:36 -0800410 BRIDGE_XSTATS_MCAST,
411 BRIDGE_XSTATS_PAD,
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -0700412 BRIDGE_XSTATS_STP,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700413 __BRIDGE_XSTATS_MAX
414};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800415#define BRIDGE_XSTATS_MAX (__BRIDGE_XSTATS_MAX - 1)
416enum {
417 BR_MCAST_DIR_RX,
418 BR_MCAST_DIR_TX,
Christopher Ferris49f525c2016-12-12 14:55:36 -0800419 BR_MCAST_DIR_SIZE
420};
421struct br_mcast_stats {
422 __u64 igmp_v1queries[BR_MCAST_DIR_SIZE];
Christopher Ferris49f525c2016-12-12 14:55:36 -0800423 __u64 igmp_v2queries[BR_MCAST_DIR_SIZE];
424 __u64 igmp_v3queries[BR_MCAST_DIR_SIZE];
425 __u64 igmp_leaves[BR_MCAST_DIR_SIZE];
426 __u64 igmp_v1reports[BR_MCAST_DIR_SIZE];
Christopher Ferris49f525c2016-12-12 14:55:36 -0800427 __u64 igmp_v2reports[BR_MCAST_DIR_SIZE];
428 __u64 igmp_v3reports[BR_MCAST_DIR_SIZE];
429 __u64 igmp_parse_errors;
430 __u64 mld_v1queries[BR_MCAST_DIR_SIZE];
Christopher Ferris49f525c2016-12-12 14:55:36 -0800431 __u64 mld_v2queries[BR_MCAST_DIR_SIZE];
432 __u64 mld_leaves[BR_MCAST_DIR_SIZE];
433 __u64 mld_v1reports[BR_MCAST_DIR_SIZE];
434 __u64 mld_v2reports[BR_MCAST_DIR_SIZE];
Christopher Ferris49f525c2016-12-12 14:55:36 -0800435 __u64 mld_parse_errors;
436 __u64 mcast_bytes[BR_MCAST_DIR_SIZE];
437 __u64 mcast_packets[BR_MCAST_DIR_SIZE];
438};
Christopher Ferrisd842e432019-03-07 10:21:59 -0800439enum br_boolopt_id {
440 BR_BOOLOPT_NO_LL_LEARN,
441 BR_BOOLOPT_MAX
442};
443struct br_boolopt_multi {
444 __u32 optval;
445 __u32 optmask;
446};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800447#endif