Blame view
include/uapi/linux/if_bridge.h
6.24 KB
607ca46e9 UAPI: (Scripted) ... |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
/* * Linux ethernet bridge * * Authors: * Lennert Buytenhek <buytenh@gnu.org> * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ #ifndef _UAPI_LINUX_IF_BRIDGE_H #define _UAPI_LINUX_IF_BRIDGE_H #include <linux/types.h> |
e216975ad uapi: Convert som... |
17 |
#include <linux/if_ether.h> |
66f1c4488 bridge: include i... |
18 |
#include <linux/in6.h> |
607ca46e9 UAPI: (Scripted) ... |
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 |
#define SYSFS_BRIDGE_ATTR "bridge" #define SYSFS_BRIDGE_FDB "brforward" #define SYSFS_BRIDGE_PORT_SUBDIR "brif" #define SYSFS_BRIDGE_PORT_ATTR "brport" #define SYSFS_BRIDGE_PORT_LINK "bridge" #define BRCTL_VERSION 1 #define BRCTL_GET_VERSION 0 #define BRCTL_GET_BRIDGES 1 #define BRCTL_ADD_BRIDGE 2 #define BRCTL_DEL_BRIDGE 3 #define BRCTL_ADD_IF 4 #define BRCTL_DEL_IF 5 #define BRCTL_GET_BRIDGE_INFO 6 #define BRCTL_GET_PORT_LIST 7 #define BRCTL_SET_BRIDGE_FORWARD_DELAY 8 #define BRCTL_SET_BRIDGE_HELLO_TIME 9 #define BRCTL_SET_BRIDGE_MAX_AGE 10 #define BRCTL_SET_AGEING_TIME 11 #define BRCTL_SET_GC_INTERVAL 12 #define BRCTL_GET_PORT_INFO 13 #define BRCTL_SET_BRIDGE_STP_STATE 14 #define BRCTL_SET_BRIDGE_PRIORITY 15 #define BRCTL_SET_PORT_PRIORITY 16 #define BRCTL_SET_PATH_COST 17 #define BRCTL_GET_FDB_ENTRIES 18 #define BR_STATE_DISABLED 0 #define BR_STATE_LISTENING 1 #define BR_STATE_LEARNING 2 #define BR_STATE_FORWARDING 3 #define BR_STATE_BLOCKING 4 struct __bridge_info { __u64 designated_root; __u64 bridge_id; __u32 root_path_cost; __u32 max_age; __u32 hello_time; __u32 forward_delay; __u32 bridge_max_age; __u32 bridge_hello_time; __u32 bridge_forward_delay; __u8 topology_change; __u8 topology_change_detected; __u8 root_port; __u8 stp_enabled; __u32 ageing_time; __u32 gc_interval; __u32 hello_timer_value; __u32 tcn_timer_value; __u32 topology_change_timer_value; __u32 gc_timer_value; }; struct __port_info { __u64 designated_root; __u64 designated_bridge; __u16 port_id; __u16 designated_port; __u32 path_cost; __u32 designated_cost; __u8 state; __u8 top_change_ack; __u8 config_pending; __u8 unused0; __u32 message_age_timer_value; __u32 forward_delay_timer_value; __u32 hold_timer_value; }; struct __fdb_entry { |
e216975ad uapi: Convert som... |
93 |
__u8 mac_addr[ETH_ALEN]; |
607ca46e9 UAPI: (Scripted) ... |
94 95 96 97 98 99 100 |
__u8 port_no; __u8 is_local; __u32 ageing_timer_value; __u8 port_hi; __u8 pad0; __u16 unused; }; |
2469ffd72 net: set and quer... |
101 102 103 |
/* Bridge Flags */ #define BRIDGE_FLAGS_MASTER 1 /* Bridge command to/from master */ #define BRIDGE_FLAGS_SELF 2 /* Bridge command to/from lowerdev */ |
607ca46e9 UAPI: (Scripted) ... |
104 |
|
2469ffd72 net: set and quer... |
105 106 |
#define BRIDGE_MODE_VEB 0 /* Default loopback mode */ #define BRIDGE_MODE_VEPA 1 /* 802.1Qbg defined VEPA mode */ |
fc0bdbbc6 bridge: new mode ... |
107 |
#define BRIDGE_MODE_UNDEF 0xFFFF /* mode undefined */ |
2469ffd72 net: set and quer... |
108 109 110 111 112 |
/* Bridge management nested attributes * [IFLA_AF_SPEC] = { * [IFLA_BRIDGE_FLAGS] * [IFLA_BRIDGE_MODE] |
407af3299 bridge: Add netli... |
113 |
* [IFLA_BRIDGE_VLAN_INFO] |
2469ffd72 net: set and quer... |
114 115 116 117 118 |
* } */ enum { IFLA_BRIDGE_FLAGS, IFLA_BRIDGE_MODE, |
407af3299 bridge: Add netli... |
119 |
IFLA_BRIDGE_VLAN_INFO, |
2469ffd72 net: set and quer... |
120 121 122 |
__IFLA_BRIDGE_MAX, }; #define IFLA_BRIDGE_MAX (__IFLA_BRIDGE_MAX - 1) |
ee07c6e7a bridge: export mu... |
123 |
|
407af3299 bridge: Add netli... |
124 |
#define BRIDGE_VLAN_INFO_MASTER (1<<0) /* Operate on Bridge device as well */ |
552406c48 bridge: Add the a... |
125 |
#define BRIDGE_VLAN_INFO_PVID (1<<1) /* VLAN is PVID, ingress untagged */ |
35e03f3a0 bridge: Separate ... |
126 |
#define BRIDGE_VLAN_INFO_UNTAGGED (1<<2) /* VLAN egresses untagged */ |
bdced7ef7 bridge: support f... |
127 128 |
#define BRIDGE_VLAN_INFO_RANGE_BEGIN (1<<3) /* VLAN is start of vlan range */ #define BRIDGE_VLAN_INFO_RANGE_END (1<<4) /* VLAN is end of vlan range */ |
2594e9064 bridge: vlan: add... |
129 |
#define BRIDGE_VLAN_INFO_BRENTRY (1<<5) /* Global bridge VLAN entry */ |
407af3299 bridge: Add netli... |
130 131 |
struct bridge_vlan_info { |
9f89ec825 bridge: use __u16... |
132 133 |
__u16 flags; __u16 vid; |
407af3299 bridge: Add netli... |
134 |
}; |
a60c09036 bridge: netlink: ... |
135 136 137 138 139 140 |
struct bridge_vlan_xstats { __u64 rx_bytes; __u64 rx_packets; __u64 tx_bytes; __u64 tx_packets; __u16 vid; |
61ba1a2da net: bridge: expo... |
141 |
__u16 flags; |
a60c09036 bridge: netlink: ... |
142 143 |
__u32 pad2; }; |
ee07c6e7a bridge: export mu... |
144 145 146 |
/* Bridge multicast database attributes * [MDBA_MDB] = { * [MDBA_MDB_ENTRY] = { |
212571563 bridge: mdb: add ... |
147 148 149 150 |
* [MDBA_MDB_ENTRY_INFO] { * struct br_mdb_entry * [MDBA_MDB_EATTR attributes] * } |
ee07c6e7a bridge: export mu... |
151 152 153 |
* } * } * [MDBA_ROUTER] = { |
59f78f9f6 bridge: mcast: ad... |
154 155 156 157 |
* [MDBA_ROUTER_PORT] = { * u32 ifindex * [MDBA_ROUTER_PATTR attributes] * } |
ee07c6e7a bridge: export mu... |
158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 |
* } */ enum { MDBA_UNSPEC, MDBA_MDB, MDBA_ROUTER, __MDBA_MAX, }; #define MDBA_MAX (__MDBA_MAX - 1) enum { MDBA_MDB_UNSPEC, MDBA_MDB_ENTRY, __MDBA_MDB_MAX, }; #define MDBA_MDB_MAX (__MDBA_MDB_MAX - 1) enum { MDBA_MDB_ENTRY_UNSPEC, MDBA_MDB_ENTRY_INFO, __MDBA_MDB_ENTRY_MAX, }; #define MDBA_MDB_ENTRY_MAX (__MDBA_MDB_ENTRY_MAX - 1) |
212571563 bridge: mdb: add ... |
181 182 183 184 185 186 187 |
/* per mdb entry additional attributes */ enum { MDBA_MDB_EATTR_UNSPEC, MDBA_MDB_EATTR_TIMER, __MDBA_MDB_EATTR_MAX }; #define MDBA_MDB_EATTR_MAX (__MDBA_MDB_EATTR_MAX - 1) |
7f0aec7a6 bridge: mcast: us... |
188 189 190 191 192 |
/* multicast router types */ enum { MDB_RTR_TYPE_DISABLED, MDB_RTR_TYPE_TEMP_QUERY, MDB_RTR_TYPE_PERM, |
a55d8246a bridge: mcast: ad... |
193 |
MDB_RTR_TYPE_TEMP |
7f0aec7a6 bridge: mcast: us... |
194 |
}; |
ee07c6e7a bridge: export mu... |
195 196 197 198 199 200 |
enum { MDBA_ROUTER_UNSPEC, MDBA_ROUTER_PORT, __MDBA_ROUTER_MAX, }; #define MDBA_ROUTER_MAX (__MDBA_ROUTER_MAX - 1) |
59f78f9f6 bridge: mcast: ad... |
201 202 203 204 205 206 207 208 |
/* router port attributes */ enum { MDBA_ROUTER_PATTR_UNSPEC, MDBA_ROUTER_PATTR_TIMER, MDBA_ROUTER_PATTR_TYPE, __MDBA_ROUTER_PATTR_MAX }; #define MDBA_ROUTER_PATTR_MAX (__MDBA_ROUTER_PATTR_MAX - 1) |
ee07c6e7a bridge: export mu... |
209 |
struct br_port_msg { |
cfd567543 bridge: add suppo... |
210 |
__u8 family; |
ee07c6e7a bridge: export mu... |
211 212 213 214 215 |
__u32 ifindex; }; struct br_mdb_entry { __u32 ifindex; |
ccb1c31a7 bridge: add flags... |
216 217 218 |
#define MDB_TEMPORARY 0 #define MDB_PERMANENT 1 __u8 state; |
157ede678 bridge: mdb: add ... |
219 220 |
#define MDB_FLAGS_OFFLOAD (1 << 0) __u8 flags; |
74fe61f17 bridge: mdb: add ... |
221 |
__u16 vid; |
ee07c6e7a bridge: export mu... |
222 223 224 225 226 227 228 229 |
struct { union { __be32 ip4; struct in6_addr ip6; } u; __be16 proto; } addr; }; |
cfd567543 bridge: add suppo... |
230 231 232 233 234 235 |
enum { MDBA_SET_ENTRY_UNSPEC, MDBA_SET_ENTRY, __MDBA_SET_ENTRY_MAX, }; #define MDBA_SET_ENTRY_MAX (__MDBA_SET_ENTRY_MAX - 1) |
a60c09036 bridge: netlink: ... |
236 237 238 239 |
/* Embedded inside LINK_XSTATS_TYPE_BRIDGE */ enum { BRIDGE_XSTATS_UNSPEC, BRIDGE_XSTATS_VLAN, |
1080ab95e net: bridge: add ... |
240 241 |
BRIDGE_XSTATS_MCAST, BRIDGE_XSTATS_PAD, |
a60c09036 bridge: netlink: ... |
242 243 244 |
__BRIDGE_XSTATS_MAX }; #define BRIDGE_XSTATS_MAX (__BRIDGE_XSTATS_MAX - 1) |
1080ab95e net: bridge: add ... |
245 246 247 248 249 250 251 252 |
enum { BR_MCAST_DIR_RX, BR_MCAST_DIR_TX, BR_MCAST_DIR_SIZE }; /* IGMP/MLD statistics */ struct br_mcast_stats { |
a65056ecf net: bridge: exte... |
253 254 255 |
__u64 igmp_v1queries[BR_MCAST_DIR_SIZE]; __u64 igmp_v2queries[BR_MCAST_DIR_SIZE]; __u64 igmp_v3queries[BR_MCAST_DIR_SIZE]; |
1080ab95e net: bridge: add ... |
256 257 258 259 260 |
__u64 igmp_leaves[BR_MCAST_DIR_SIZE]; __u64 igmp_v1reports[BR_MCAST_DIR_SIZE]; __u64 igmp_v2reports[BR_MCAST_DIR_SIZE]; __u64 igmp_v3reports[BR_MCAST_DIR_SIZE]; __u64 igmp_parse_errors; |
a65056ecf net: bridge: exte... |
261 262 |
__u64 mld_v1queries[BR_MCAST_DIR_SIZE]; __u64 mld_v2queries[BR_MCAST_DIR_SIZE]; |
1080ab95e net: bridge: add ... |
263 264 265 266 267 268 269 270 |
__u64 mld_leaves[BR_MCAST_DIR_SIZE]; __u64 mld_v1reports[BR_MCAST_DIR_SIZE]; __u64 mld_v2reports[BR_MCAST_DIR_SIZE]; __u64 mld_parse_errors; __u64 mcast_bytes[BR_MCAST_DIR_SIZE]; __u64 mcast_packets[BR_MCAST_DIR_SIZE]; }; |
607ca46e9 UAPI: (Scripted) ... |
271 |
#endif /* _UAPI_LINUX_IF_BRIDGE_H */ |