blob: 366912ea34d1aaff2ffb24a8e5515407adec502a [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 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"
27#define SYSFS_BRIDGE_PORT_ATTR "brport"
Ben Cheng655a7c02013-10-16 16:09:24 -070028/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris38062f92014-07-09 15:33:25 -070029#define SYSFS_BRIDGE_PORT_LINK "bridge"
Ben Cheng655a7c02013-10-16 16:09:24 -070030#define BRCTL_VERSION 1
31#define BRCTL_GET_VERSION 0
32#define BRCTL_GET_BRIDGES 1
Ben Cheng655a7c02013-10-16 16:09:24 -070033/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris38062f92014-07-09 15:33:25 -070034#define BRCTL_ADD_BRIDGE 2
Ben Cheng655a7c02013-10-16 16:09:24 -070035#define BRCTL_DEL_BRIDGE 3
36#define BRCTL_ADD_IF 4
37#define BRCTL_DEL_IF 5
Ben Cheng655a7c02013-10-16 16:09:24 -070038/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris38062f92014-07-09 15:33:25 -070039#define BRCTL_GET_BRIDGE_INFO 6
Ben Cheng655a7c02013-10-16 16:09:24 -070040#define BRCTL_GET_PORT_LIST 7
41#define BRCTL_SET_BRIDGE_FORWARD_DELAY 8
42#define BRCTL_SET_BRIDGE_HELLO_TIME 9
Ben Cheng655a7c02013-10-16 16:09:24 -070043/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris38062f92014-07-09 15:33:25 -070044#define BRCTL_SET_BRIDGE_MAX_AGE 10
Ben Cheng655a7c02013-10-16 16:09:24 -070045#define BRCTL_SET_AGEING_TIME 11
46#define BRCTL_SET_GC_INTERVAL 12
47#define BRCTL_GET_PORT_INFO 13
Ben Cheng655a7c02013-10-16 16:09:24 -070048/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris38062f92014-07-09 15:33:25 -070049#define BRCTL_SET_BRIDGE_STP_STATE 14
Ben Cheng655a7c02013-10-16 16:09:24 -070050#define BRCTL_SET_BRIDGE_PRIORITY 15
51#define BRCTL_SET_PORT_PRIORITY 16
52#define BRCTL_SET_PATH_COST 17
Ben Cheng655a7c02013-10-16 16:09:24 -070053/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris38062f92014-07-09 15:33:25 -070054#define BRCTL_GET_FDB_ENTRIES 18
Ben Cheng655a7c02013-10-16 16:09:24 -070055#define BR_STATE_DISABLED 0
56#define BR_STATE_LISTENING 1
57#define BR_STATE_LEARNING 2
Ben Cheng655a7c02013-10-16 16:09:24 -070058/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris38062f92014-07-09 15:33:25 -070059#define BR_STATE_FORWARDING 3
Ben Cheng655a7c02013-10-16 16:09:24 -070060#define BR_STATE_BLOCKING 4
61struct __bridge_info {
62 __u64 designated_root;
Ben Cheng655a7c02013-10-16 16:09:24 -070063/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris38062f92014-07-09 15:33:25 -070064 __u64 bridge_id;
Ben Cheng655a7c02013-10-16 16:09:24 -070065 __u32 root_path_cost;
66 __u32 max_age;
67 __u32 hello_time;
Ben Cheng655a7c02013-10-16 16:09:24 -070068/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris38062f92014-07-09 15:33:25 -070069 __u32 forward_delay;
Ben Cheng655a7c02013-10-16 16:09:24 -070070 __u32 bridge_max_age;
71 __u32 bridge_hello_time;
72 __u32 bridge_forward_delay;
Ben Cheng655a7c02013-10-16 16:09:24 -070073/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris38062f92014-07-09 15:33:25 -070074 __u8 topology_change;
Ben Cheng655a7c02013-10-16 16:09:24 -070075 __u8 topology_change_detected;
76 __u8 root_port;
77 __u8 stp_enabled;
Ben Cheng655a7c02013-10-16 16:09:24 -070078/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris38062f92014-07-09 15:33:25 -070079 __u32 ageing_time;
Ben Cheng655a7c02013-10-16 16:09:24 -070080 __u32 gc_interval;
81 __u32 hello_timer_value;
82 __u32 tcn_timer_value;
Ben Cheng655a7c02013-10-16 16:09:24 -070083/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris38062f92014-07-09 15:33:25 -070084 __u32 topology_change_timer_value;
Ben Cheng655a7c02013-10-16 16:09:24 -070085 __u32 gc_timer_value;
86};
87struct __port_info {
Ben Cheng655a7c02013-10-16 16:09:24 -070088/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris38062f92014-07-09 15:33:25 -070089 __u64 designated_root;
Ben Cheng655a7c02013-10-16 16:09:24 -070090 __u64 designated_bridge;
91 __u16 port_id;
92 __u16 designated_port;
Ben Cheng655a7c02013-10-16 16:09:24 -070093/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris38062f92014-07-09 15:33:25 -070094 __u32 path_cost;
Ben Cheng655a7c02013-10-16 16:09:24 -070095 __u32 designated_cost;
96 __u8 state;
97 __u8 top_change_ack;
Ben Cheng655a7c02013-10-16 16:09:24 -070098/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris38062f92014-07-09 15:33:25 -070099 __u8 config_pending;
Ben Cheng655a7c02013-10-16 16:09:24 -0700100 __u8 unused0;
101 __u32 message_age_timer_value;
102 __u32 forward_delay_timer_value;
Ben Cheng655a7c02013-10-16 16:09:24 -0700103/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris38062f92014-07-09 15:33:25 -0700104 __u32 hold_timer_value;
Ben Cheng655a7c02013-10-16 16:09:24 -0700105};
106struct __fdb_entry {
Christopher Ferris38062f92014-07-09 15:33:25 -0700107 __u8 mac_addr[ETH_ALEN];
Ben Cheng655a7c02013-10-16 16:09:24 -0700108/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris38062f92014-07-09 15:33:25 -0700109 __u8 port_no;
Ben Cheng655a7c02013-10-16 16:09:24 -0700110 __u8 is_local;
111 __u32 ageing_timer_value;
112 __u8 port_hi;
Ben Cheng655a7c02013-10-16 16:09:24 -0700113/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris38062f92014-07-09 15:33:25 -0700114 __u8 pad0;
Ben Cheng655a7c02013-10-16 16:09:24 -0700115 __u16 unused;
116};
117#define BRIDGE_FLAGS_MASTER 1
Ben Cheng655a7c02013-10-16 16:09:24 -0700118/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris38062f92014-07-09 15:33:25 -0700119#define BRIDGE_FLAGS_SELF 2
Ben Cheng655a7c02013-10-16 16:09:24 -0700120#define BRIDGE_MODE_VEB 0
121#define BRIDGE_MODE_VEPA 1
122enum {
Ben Cheng655a7c02013-10-16 16:09:24 -0700123/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris38062f92014-07-09 15:33:25 -0700124 IFLA_BRIDGE_FLAGS,
Ben Cheng655a7c02013-10-16 16:09:24 -0700125 IFLA_BRIDGE_MODE,
126 IFLA_BRIDGE_VLAN_INFO,
127 __IFLA_BRIDGE_MAX,
Ben Cheng655a7c02013-10-16 16:09:24 -0700128/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris38062f92014-07-09 15:33:25 -0700129};
Ben Cheng655a7c02013-10-16 16:09:24 -0700130#define IFLA_BRIDGE_MAX (__IFLA_BRIDGE_MAX - 1)
131#define BRIDGE_VLAN_INFO_MASTER (1<<0)
132#define BRIDGE_VLAN_INFO_PVID (1<<1)
Ben Cheng655a7c02013-10-16 16:09:24 -0700133/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris38062f92014-07-09 15:33:25 -0700134#define BRIDGE_VLAN_INFO_UNTAGGED (1<<2)
Ben Cheng655a7c02013-10-16 16:09:24 -0700135struct bridge_vlan_info {
136 __u16 flags;
137 __u16 vid;
Ben Cheng655a7c02013-10-16 16:09:24 -0700138/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris38062f92014-07-09 15:33:25 -0700139};
Ben Cheng655a7c02013-10-16 16:09:24 -0700140enum {
141 MDBA_UNSPEC,
142 MDBA_MDB,
Ben Cheng655a7c02013-10-16 16:09:24 -0700143/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris38062f92014-07-09 15:33:25 -0700144 MDBA_ROUTER,
Ben Cheng655a7c02013-10-16 16:09:24 -0700145 __MDBA_MAX,
146};
147#define MDBA_MAX (__MDBA_MAX - 1)
Ben Cheng655a7c02013-10-16 16:09:24 -0700148/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris38062f92014-07-09 15:33:25 -0700149enum {
Ben Cheng655a7c02013-10-16 16:09:24 -0700150 MDBA_MDB_UNSPEC,
151 MDBA_MDB_ENTRY,
152 __MDBA_MDB_MAX,
Ben Cheng655a7c02013-10-16 16:09:24 -0700153/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris38062f92014-07-09 15:33:25 -0700154};
Ben Cheng655a7c02013-10-16 16:09:24 -0700155#define MDBA_MDB_MAX (__MDBA_MDB_MAX - 1)
156enum {
157 MDBA_MDB_ENTRY_UNSPEC,
Ben Cheng655a7c02013-10-16 16:09:24 -0700158/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris38062f92014-07-09 15:33:25 -0700159 MDBA_MDB_ENTRY_INFO,
Ben Cheng655a7c02013-10-16 16:09:24 -0700160 __MDBA_MDB_ENTRY_MAX,
161};
162#define MDBA_MDB_ENTRY_MAX (__MDBA_MDB_ENTRY_MAX - 1)
Ben Cheng655a7c02013-10-16 16:09:24 -0700163/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris38062f92014-07-09 15:33:25 -0700164enum {
Ben Cheng655a7c02013-10-16 16:09:24 -0700165 MDBA_ROUTER_UNSPEC,
166 MDBA_ROUTER_PORT,
167 __MDBA_ROUTER_MAX,
Ben Cheng655a7c02013-10-16 16:09:24 -0700168/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris38062f92014-07-09 15:33:25 -0700169};
Ben Cheng655a7c02013-10-16 16:09:24 -0700170#define MDBA_ROUTER_MAX (__MDBA_ROUTER_MAX - 1)
171struct br_port_msg {
172 __u8 family;
Ben Cheng655a7c02013-10-16 16:09:24 -0700173/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris38062f92014-07-09 15:33:25 -0700174 __u32 ifindex;
Ben Cheng655a7c02013-10-16 16:09:24 -0700175};
176struct br_mdb_entry {
177 __u32 ifindex;
Ben Cheng655a7c02013-10-16 16:09:24 -0700178/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris38062f92014-07-09 15:33:25 -0700179#define MDB_TEMPORARY 0
Ben Cheng655a7c02013-10-16 16:09:24 -0700180#define MDB_PERMANENT 1
181 __u8 state;
182 struct {
Ben Cheng655a7c02013-10-16 16:09:24 -0700183/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris38062f92014-07-09 15:33:25 -0700184 union {
Ben Cheng655a7c02013-10-16 16:09:24 -0700185 __be32 ip4;
186 struct in6_addr ip6;
187 } u;
Ben Cheng655a7c02013-10-16 16:09:24 -0700188/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris38062f92014-07-09 15:33:25 -0700189 __be16 proto;
Ben Cheng655a7c02013-10-16 16:09:24 -0700190 } addr;
191};
192enum {
Ben Cheng655a7c02013-10-16 16:09:24 -0700193/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris38062f92014-07-09 15:33:25 -0700194 MDBA_SET_ENTRY_UNSPEC,
Ben Cheng655a7c02013-10-16 16:09:24 -0700195 MDBA_SET_ENTRY,
196 __MDBA_SET_ENTRY_MAX,
197};
Ben Cheng655a7c02013-10-16 16:09:24 -0700198/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris38062f92014-07-09 15:33:25 -0700199#define MDBA_SET_ENTRY_MAX (__MDBA_SET_ENTRY_MAX - 1)
Ben Cheng655a7c02013-10-16 16:09:24 -0700200#endif