blob: b4c3b59d72cce86d397db8ff90bf5c7b3a4d775e [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>
Ben Cheng655a7c02013-10-16 16:09:24 -070023/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris82d75042015-01-26 10:57:07 -080024#include <linux/in6.h>
Christopher Ferris38062f92014-07-09 15:33:25 -070025#define SYSFS_BRIDGE_ATTR "bridge"
Ben Cheng655a7c02013-10-16 16:09:24 -070026#define SYSFS_BRIDGE_FDB "brforward"
27#define SYSFS_BRIDGE_PORT_SUBDIR "brif"
Ben Cheng655a7c02013-10-16 16:09:24 -070028/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris82d75042015-01-26 10:57:07 -080029#define SYSFS_BRIDGE_PORT_ATTR "brport"
Christopher Ferris38062f92014-07-09 15:33:25 -070030#define SYSFS_BRIDGE_PORT_LINK "bridge"
Ben Cheng655a7c02013-10-16 16:09:24 -070031#define BRCTL_VERSION 1
32#define BRCTL_GET_VERSION 0
Ben Cheng655a7c02013-10-16 16:09:24 -070033/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris82d75042015-01-26 10:57:07 -080034#define BRCTL_GET_BRIDGES 1
Christopher Ferris38062f92014-07-09 15:33:25 -070035#define BRCTL_ADD_BRIDGE 2
Ben Cheng655a7c02013-10-16 16:09:24 -070036#define BRCTL_DEL_BRIDGE 3
37#define BRCTL_ADD_IF 4
Ben Cheng655a7c02013-10-16 16:09:24 -070038/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris82d75042015-01-26 10:57:07 -080039#define BRCTL_DEL_IF 5
Christopher Ferris38062f92014-07-09 15:33:25 -070040#define BRCTL_GET_BRIDGE_INFO 6
Ben Cheng655a7c02013-10-16 16:09:24 -070041#define BRCTL_GET_PORT_LIST 7
42#define BRCTL_SET_BRIDGE_FORWARD_DELAY 8
Ben Cheng655a7c02013-10-16 16:09:24 -070043/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris82d75042015-01-26 10:57:07 -080044#define BRCTL_SET_BRIDGE_HELLO_TIME 9
Christopher Ferris38062f92014-07-09 15:33:25 -070045#define BRCTL_SET_BRIDGE_MAX_AGE 10
Ben Cheng655a7c02013-10-16 16:09:24 -070046#define BRCTL_SET_AGEING_TIME 11
47#define BRCTL_SET_GC_INTERVAL 12
Ben Cheng655a7c02013-10-16 16:09:24 -070048/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris82d75042015-01-26 10:57:07 -080049#define BRCTL_GET_PORT_INFO 13
Christopher Ferris38062f92014-07-09 15:33:25 -070050#define BRCTL_SET_BRIDGE_STP_STATE 14
Ben Cheng655a7c02013-10-16 16:09:24 -070051#define BRCTL_SET_BRIDGE_PRIORITY 15
52#define BRCTL_SET_PORT_PRIORITY 16
Ben Cheng655a7c02013-10-16 16:09:24 -070053/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris82d75042015-01-26 10:57:07 -080054#define BRCTL_SET_PATH_COST 17
Christopher Ferris38062f92014-07-09 15:33:25 -070055#define BRCTL_GET_FDB_ENTRIES 18
Ben Cheng655a7c02013-10-16 16:09:24 -070056#define BR_STATE_DISABLED 0
57#define BR_STATE_LISTENING 1
Ben Cheng655a7c02013-10-16 16:09:24 -070058/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris82d75042015-01-26 10:57:07 -080059#define BR_STATE_LEARNING 2
Christopher Ferris38062f92014-07-09 15:33:25 -070060#define BR_STATE_FORWARDING 3
Ben Cheng655a7c02013-10-16 16:09:24 -070061#define BR_STATE_BLOCKING 4
62struct __bridge_info {
Ben Cheng655a7c02013-10-16 16:09:24 -070063/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris82d75042015-01-26 10:57:07 -080064 __u64 designated_root;
Christopher Ferris38062f92014-07-09 15:33:25 -070065 __u64 bridge_id;
Ben Cheng655a7c02013-10-16 16:09:24 -070066 __u32 root_path_cost;
67 __u32 max_age;
Ben Cheng655a7c02013-10-16 16:09:24 -070068/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris82d75042015-01-26 10:57:07 -080069 __u32 hello_time;
Christopher Ferris38062f92014-07-09 15:33:25 -070070 __u32 forward_delay;
Ben Cheng655a7c02013-10-16 16:09:24 -070071 __u32 bridge_max_age;
72 __u32 bridge_hello_time;
Ben Cheng655a7c02013-10-16 16:09:24 -070073/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris82d75042015-01-26 10:57:07 -080074 __u32 bridge_forward_delay;
Christopher Ferris38062f92014-07-09 15:33:25 -070075 __u8 topology_change;
Ben Cheng655a7c02013-10-16 16:09:24 -070076 __u8 topology_change_detected;
77 __u8 root_port;
Ben Cheng655a7c02013-10-16 16:09:24 -070078/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris82d75042015-01-26 10:57:07 -080079 __u8 stp_enabled;
Christopher Ferris38062f92014-07-09 15:33:25 -070080 __u32 ageing_time;
Ben Cheng655a7c02013-10-16 16:09:24 -070081 __u32 gc_interval;
82 __u32 hello_timer_value;
Ben Cheng655a7c02013-10-16 16:09:24 -070083/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris82d75042015-01-26 10:57:07 -080084 __u32 tcn_timer_value;
Christopher Ferris38062f92014-07-09 15:33:25 -070085 __u32 topology_change_timer_value;
Ben Cheng655a7c02013-10-16 16:09:24 -070086 __u32 gc_timer_value;
87};
Ben Cheng655a7c02013-10-16 16:09:24 -070088/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris82d75042015-01-26 10:57:07 -080089struct __port_info {
Christopher Ferris38062f92014-07-09 15:33:25 -070090 __u64 designated_root;
Ben Cheng655a7c02013-10-16 16:09:24 -070091 __u64 designated_bridge;
92 __u16 port_id;
Ben Cheng655a7c02013-10-16 16:09:24 -070093/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris82d75042015-01-26 10:57:07 -080094 __u16 designated_port;
Christopher Ferris38062f92014-07-09 15:33:25 -070095 __u32 path_cost;
Ben Cheng655a7c02013-10-16 16:09:24 -070096 __u32 designated_cost;
97 __u8 state;
Ben Cheng655a7c02013-10-16 16:09:24 -070098/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris82d75042015-01-26 10:57:07 -080099 __u8 top_change_ack;
Christopher Ferris38062f92014-07-09 15:33:25 -0700100 __u8 config_pending;
Ben Cheng655a7c02013-10-16 16:09:24 -0700101 __u8 unused0;
102 __u32 message_age_timer_value;
Ben Cheng655a7c02013-10-16 16:09:24 -0700103/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris82d75042015-01-26 10:57:07 -0800104 __u32 forward_delay_timer_value;
Christopher Ferris38062f92014-07-09 15:33:25 -0700105 __u32 hold_timer_value;
Ben Cheng655a7c02013-10-16 16:09:24 -0700106};
107struct __fdb_entry {
Ben Cheng655a7c02013-10-16 16:09:24 -0700108/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris82d75042015-01-26 10:57:07 -0800109 __u8 mac_addr[ETH_ALEN];
Christopher Ferris38062f92014-07-09 15:33:25 -0700110 __u8 port_no;
Ben Cheng655a7c02013-10-16 16:09:24 -0700111 __u8 is_local;
112 __u32 ageing_timer_value;
Ben Cheng655a7c02013-10-16 16:09:24 -0700113/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris82d75042015-01-26 10:57:07 -0800114 __u8 port_hi;
Christopher Ferris38062f92014-07-09 15:33:25 -0700115 __u8 pad0;
Ben Cheng655a7c02013-10-16 16:09:24 -0700116 __u16 unused;
117};
Ben Cheng655a7c02013-10-16 16:09:24 -0700118/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris82d75042015-01-26 10:57:07 -0800119#define BRIDGE_FLAGS_MASTER 1
Christopher Ferris38062f92014-07-09 15:33:25 -0700120#define BRIDGE_FLAGS_SELF 2
Ben Cheng655a7c02013-10-16 16:09:24 -0700121#define BRIDGE_MODE_VEB 0
122#define BRIDGE_MODE_VEPA 1
Ben Cheng655a7c02013-10-16 16:09:24 -0700123/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris82d75042015-01-26 10:57:07 -0800124enum {
Christopher Ferris38062f92014-07-09 15:33:25 -0700125 IFLA_BRIDGE_FLAGS,
Ben Cheng655a7c02013-10-16 16:09:24 -0700126 IFLA_BRIDGE_MODE,
127 IFLA_BRIDGE_VLAN_INFO,
Ben Cheng655a7c02013-10-16 16:09:24 -0700128/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris82d75042015-01-26 10:57:07 -0800129 __IFLA_BRIDGE_MAX,
Christopher Ferris38062f92014-07-09 15:33:25 -0700130};
Ben Cheng655a7c02013-10-16 16:09:24 -0700131#define IFLA_BRIDGE_MAX (__IFLA_BRIDGE_MAX - 1)
132#define BRIDGE_VLAN_INFO_MASTER (1<<0)
Ben Cheng655a7c02013-10-16 16:09:24 -0700133/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris82d75042015-01-26 10:57:07 -0800134#define BRIDGE_VLAN_INFO_PVID (1<<1)
Christopher Ferris38062f92014-07-09 15:33:25 -0700135#define BRIDGE_VLAN_INFO_UNTAGGED (1<<2)
Ben Cheng655a7c02013-10-16 16:09:24 -0700136struct bridge_vlan_info {
137 __u16 flags;
Ben Cheng655a7c02013-10-16 16:09:24 -0700138/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris82d75042015-01-26 10:57:07 -0800139 __u16 vid;
Christopher Ferris38062f92014-07-09 15:33:25 -0700140};
Ben Cheng655a7c02013-10-16 16:09:24 -0700141enum {
142 MDBA_UNSPEC,
Ben Cheng655a7c02013-10-16 16:09:24 -0700143/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris82d75042015-01-26 10:57:07 -0800144 MDBA_MDB,
Christopher Ferris38062f92014-07-09 15:33:25 -0700145 MDBA_ROUTER,
Ben Cheng655a7c02013-10-16 16:09:24 -0700146 __MDBA_MAX,
147};
Ben Cheng655a7c02013-10-16 16:09:24 -0700148/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris82d75042015-01-26 10:57:07 -0800149#define MDBA_MAX (__MDBA_MAX - 1)
Christopher Ferris38062f92014-07-09 15:33:25 -0700150enum {
Ben Cheng655a7c02013-10-16 16:09:24 -0700151 MDBA_MDB_UNSPEC,
152 MDBA_MDB_ENTRY,
Ben Cheng655a7c02013-10-16 16:09:24 -0700153/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris82d75042015-01-26 10:57:07 -0800154 __MDBA_MDB_MAX,
Christopher Ferris38062f92014-07-09 15:33:25 -0700155};
Ben Cheng655a7c02013-10-16 16:09:24 -0700156#define MDBA_MDB_MAX (__MDBA_MDB_MAX - 1)
157enum {
Ben Cheng655a7c02013-10-16 16:09:24 -0700158/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris82d75042015-01-26 10:57:07 -0800159 MDBA_MDB_ENTRY_UNSPEC,
Christopher Ferris38062f92014-07-09 15:33:25 -0700160 MDBA_MDB_ENTRY_INFO,
Ben Cheng655a7c02013-10-16 16:09:24 -0700161 __MDBA_MDB_ENTRY_MAX,
162};
Ben Cheng655a7c02013-10-16 16:09:24 -0700163/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris82d75042015-01-26 10:57:07 -0800164#define MDBA_MDB_ENTRY_MAX (__MDBA_MDB_ENTRY_MAX - 1)
Christopher Ferris38062f92014-07-09 15:33:25 -0700165enum {
Ben Cheng655a7c02013-10-16 16:09:24 -0700166 MDBA_ROUTER_UNSPEC,
167 MDBA_ROUTER_PORT,
Ben Cheng655a7c02013-10-16 16:09:24 -0700168/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris82d75042015-01-26 10:57:07 -0800169 __MDBA_ROUTER_MAX,
Christopher Ferris38062f92014-07-09 15:33:25 -0700170};
Ben Cheng655a7c02013-10-16 16:09:24 -0700171#define MDBA_ROUTER_MAX (__MDBA_ROUTER_MAX - 1)
172struct br_port_msg {
Ben Cheng655a7c02013-10-16 16:09:24 -0700173/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris82d75042015-01-26 10:57:07 -0800174 __u8 family;
Christopher Ferris38062f92014-07-09 15:33:25 -0700175 __u32 ifindex;
Ben Cheng655a7c02013-10-16 16:09:24 -0700176};
177struct br_mdb_entry {
Ben Cheng655a7c02013-10-16 16:09:24 -0700178/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris82d75042015-01-26 10:57:07 -0800179 __u32 ifindex;
Christopher Ferris38062f92014-07-09 15:33:25 -0700180#define MDB_TEMPORARY 0
Ben Cheng655a7c02013-10-16 16:09:24 -0700181#define MDB_PERMANENT 1
182 __u8 state;
Ben Cheng655a7c02013-10-16 16:09:24 -0700183/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris82d75042015-01-26 10:57:07 -0800184 struct {
Christopher Ferris38062f92014-07-09 15:33:25 -0700185 union {
Ben Cheng655a7c02013-10-16 16:09:24 -0700186 __be32 ip4;
187 struct in6_addr ip6;
Ben Cheng655a7c02013-10-16 16:09:24 -0700188/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris82d75042015-01-26 10:57:07 -0800189 } u;
Christopher Ferris38062f92014-07-09 15:33:25 -0700190 __be16 proto;
Ben Cheng655a7c02013-10-16 16:09:24 -0700191 } addr;
192};
Ben Cheng655a7c02013-10-16 16:09:24 -0700193/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris82d75042015-01-26 10:57:07 -0800194enum {
Christopher Ferris38062f92014-07-09 15:33:25 -0700195 MDBA_SET_ENTRY_UNSPEC,
Ben Cheng655a7c02013-10-16 16:09:24 -0700196 MDBA_SET_ENTRY,
197 __MDBA_SET_ENTRY_MAX,
Ben Cheng655a7c02013-10-16 16:09:24 -0700198/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris82d75042015-01-26 10:57:07 -0800199};
Christopher Ferris38062f92014-07-09 15:33:25 -0700200#define MDBA_SET_ENTRY_MAX (__MDBA_SET_ENTRY_MAX - 1)
Ben Cheng655a7c02013-10-16 16:09:24 -0700201#endif