Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 1 | /**************************************************************************** |
| 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 Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 22 | #include <linux/if_ether.h> |
Christopher Ferris | 82d7504 | 2015-01-26 10:57:07 -0800 | [diff] [blame] | 23 | #include <linux/in6.h> |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 24 | #define SYSFS_BRIDGE_ATTR "bridge" |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 25 | #define SYSFS_BRIDGE_FDB "brforward" |
| 26 | #define SYSFS_BRIDGE_PORT_SUBDIR "brif" |
Christopher Ferris | 82d7504 | 2015-01-26 10:57:07 -0800 | [diff] [blame] | 27 | #define SYSFS_BRIDGE_PORT_ATTR "brport" |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 28 | #define SYSFS_BRIDGE_PORT_LINK "bridge" |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 29 | #define BRCTL_VERSION 1 |
| 30 | #define BRCTL_GET_VERSION 0 |
Christopher Ferris | 82d7504 | 2015-01-26 10:57:07 -0800 | [diff] [blame] | 31 | #define BRCTL_GET_BRIDGES 1 |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 32 | #define BRCTL_ADD_BRIDGE 2 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 33 | #define BRCTL_DEL_BRIDGE 3 |
| 34 | #define BRCTL_ADD_IF 4 |
Christopher Ferris | 82d7504 | 2015-01-26 10:57:07 -0800 | [diff] [blame] | 35 | #define BRCTL_DEL_IF 5 |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 36 | #define BRCTL_GET_BRIDGE_INFO 6 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 37 | #define BRCTL_GET_PORT_LIST 7 |
| 38 | #define BRCTL_SET_BRIDGE_FORWARD_DELAY 8 |
Christopher Ferris | 82d7504 | 2015-01-26 10:57:07 -0800 | [diff] [blame] | 39 | #define BRCTL_SET_BRIDGE_HELLO_TIME 9 |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 40 | #define BRCTL_SET_BRIDGE_MAX_AGE 10 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 41 | #define BRCTL_SET_AGEING_TIME 11 |
| 42 | #define BRCTL_SET_GC_INTERVAL 12 |
Christopher Ferris | 82d7504 | 2015-01-26 10:57:07 -0800 | [diff] [blame] | 43 | #define BRCTL_GET_PORT_INFO 13 |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 44 | #define BRCTL_SET_BRIDGE_STP_STATE 14 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 45 | #define BRCTL_SET_BRIDGE_PRIORITY 15 |
| 46 | #define BRCTL_SET_PORT_PRIORITY 16 |
Christopher Ferris | 82d7504 | 2015-01-26 10:57:07 -0800 | [diff] [blame] | 47 | #define BRCTL_SET_PATH_COST 17 |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 48 | #define BRCTL_GET_FDB_ENTRIES 18 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 49 | #define BR_STATE_DISABLED 0 |
| 50 | #define BR_STATE_LISTENING 1 |
Christopher Ferris | 82d7504 | 2015-01-26 10:57:07 -0800 | [diff] [blame] | 51 | #define BR_STATE_LEARNING 2 |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 52 | #define BR_STATE_FORWARDING 3 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 53 | #define BR_STATE_BLOCKING 4 |
| 54 | struct __bridge_info { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 55 | __u64 designated_root; |
| 56 | __u64 bridge_id; |
| 57 | __u32 root_path_cost; |
| 58 | __u32 max_age; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 59 | __u32 hello_time; |
| 60 | __u32 forward_delay; |
| 61 | __u32 bridge_max_age; |
| 62 | __u32 bridge_hello_time; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 63 | __u32 bridge_forward_delay; |
| 64 | __u8 topology_change; |
| 65 | __u8 topology_change_detected; |
| 66 | __u8 root_port; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 67 | __u8 stp_enabled; |
| 68 | __u32 ageing_time; |
| 69 | __u32 gc_interval; |
| 70 | __u32 hello_timer_value; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 71 | __u32 tcn_timer_value; |
| 72 | __u32 topology_change_timer_value; |
| 73 | __u32 gc_timer_value; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 74 | }; |
Christopher Ferris | 82d7504 | 2015-01-26 10:57:07 -0800 | [diff] [blame] | 75 | struct __port_info { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 76 | __u64 designated_root; |
| 77 | __u64 designated_bridge; |
| 78 | __u16 port_id; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 79 | __u16 designated_port; |
| 80 | __u32 path_cost; |
| 81 | __u32 designated_cost; |
| 82 | __u8 state; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 83 | __u8 top_change_ack; |
| 84 | __u8 config_pending; |
| 85 | __u8 unused0; |
| 86 | __u32 message_age_timer_value; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 87 | __u32 forward_delay_timer_value; |
| 88 | __u32 hold_timer_value; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 89 | }; |
| 90 | struct __fdb_entry { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 91 | __u8 mac_addr[ETH_ALEN]; |
| 92 | __u8 port_no; |
| 93 | __u8 is_local; |
| 94 | __u32 ageing_timer_value; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 95 | __u8 port_hi; |
| 96 | __u8 pad0; |
| 97 | __u16 unused; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 98 | }; |
Christopher Ferris | 82d7504 | 2015-01-26 10:57:07 -0800 | [diff] [blame] | 99 | #define BRIDGE_FLAGS_MASTER 1 |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 100 | #define BRIDGE_FLAGS_SELF 2 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 101 | #define BRIDGE_MODE_VEB 0 |
| 102 | #define BRIDGE_MODE_VEPA 1 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 103 | #define BRIDGE_MODE_UNDEF 0xFFFF |
Christopher Ferris | 82d7504 | 2015-01-26 10:57:07 -0800 | [diff] [blame] | 104 | enum { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 105 | IFLA_BRIDGE_FLAGS, |
| 106 | IFLA_BRIDGE_MODE, |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 107 | IFLA_BRIDGE_VLAN_INFO, |
Christopher Ferris | 525ce91 | 2017-07-26 13:12:53 -0700 | [diff] [blame] | 108 | IFLA_BRIDGE_VLAN_TUNNEL_INFO, |
Christopher Ferris | 8177cdf | 2020-08-03 11:53:55 -0700 | [diff] [blame] | 109 | IFLA_BRIDGE_MRP, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 110 | __IFLA_BRIDGE_MAX, |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 111 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 112 | #define IFLA_BRIDGE_MAX (__IFLA_BRIDGE_MAX - 1) |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 113 | #define BRIDGE_VLAN_INFO_MASTER (1 << 0) |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 114 | #define BRIDGE_VLAN_INFO_PVID (1 << 1) |
| 115 | #define BRIDGE_VLAN_INFO_UNTAGGED (1 << 2) |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 116 | #define BRIDGE_VLAN_INFO_RANGE_BEGIN (1 << 3) |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 117 | #define BRIDGE_VLAN_INFO_RANGE_END (1 << 4) |
| 118 | #define BRIDGE_VLAN_INFO_BRENTRY (1 << 5) |
Christopher Ferris | bb9fcb4 | 2020-04-06 11:38:04 -0700 | [diff] [blame] | 119 | #define BRIDGE_VLAN_INFO_ONLY_OPTS (1 << 6) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 120 | struct bridge_vlan_info { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 121 | __u16 flags; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 122 | __u16 vid; |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 123 | }; |
Christopher Ferris | 525ce91 | 2017-07-26 13:12:53 -0700 | [diff] [blame] | 124 | enum { |
| 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 Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 132 | struct bridge_vlan_xstats { |
| 133 | __u64 rx_bytes; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 134 | __u64 rx_packets; |
| 135 | __u64 tx_bytes; |
| 136 | __u64 tx_packets; |
| 137 | __u16 vid; |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 138 | __u16 flags; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 139 | __u32 pad2; |
| 140 | }; |
Christopher Ferris | 8177cdf | 2020-08-03 11:53:55 -0700 | [diff] [blame] | 141 | enum { |
| 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 Ferris | 25c18d4 | 2020-10-14 17:42:58 -0700 | [diff] [blame] | 149 | IFLA_BRIDGE_MRP_INFO, |
| 150 | IFLA_BRIDGE_MRP_IN_ROLE, |
| 151 | IFLA_BRIDGE_MRP_IN_STATE, |
| 152 | IFLA_BRIDGE_MRP_START_IN_TEST, |
Christopher Ferris | 8177cdf | 2020-08-03 11:53:55 -0700 | [diff] [blame] | 153 | __IFLA_BRIDGE_MRP_MAX, |
| 154 | }; |
| 155 | #define IFLA_BRIDGE_MRP_MAX (__IFLA_BRIDGE_MRP_MAX - 1) |
| 156 | enum { |
| 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) |
| 165 | enum { |
| 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) |
| 171 | enum { |
| 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) |
| 177 | enum { |
| 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) |
| 184 | enum { |
| 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) |
| 191 | enum { |
| 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 Ferris | 25c18d4 | 2020-10-14 17:42:58 -0700 | [diff] [blame] | 201 | enum { |
| 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) |
| 220 | enum { |
| 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) |
| 227 | enum { |
| 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) |
| 236 | enum { |
| 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 Ferris | 8177cdf | 2020-08-03 11:53:55 -0700 | [diff] [blame] | 245 | struct br_mrp_instance { |
| 246 | __u32 ring_id; |
| 247 | __u32 p_ifindex; |
| 248 | __u32 s_ifindex; |
| 249 | __u16 prio; |
| 250 | }; |
| 251 | struct br_mrp_ring_state { |
| 252 | __u32 ring_id; |
| 253 | __u32 ring_state; |
| 254 | }; |
| 255 | struct br_mrp_ring_role { |
| 256 | __u32 ring_id; |
| 257 | __u32 ring_role; |
| 258 | }; |
| 259 | struct br_mrp_start_test { |
| 260 | __u32 ring_id; |
| 261 | __u32 interval; |
| 262 | __u32 max_miss; |
| 263 | __u32 period; |
| 264 | __u32 monitor; |
| 265 | }; |
Christopher Ferris | 25c18d4 | 2020-10-14 17:42:58 -0700 | [diff] [blame] | 266 | struct br_mrp_in_state { |
| 267 | __u32 in_state; |
| 268 | __u16 in_id; |
| 269 | }; |
| 270 | struct br_mrp_in_role { |
| 271 | __u32 ring_id; |
| 272 | __u32 in_role; |
| 273 | __u32 i_ifindex; |
| 274 | __u16 in_id; |
| 275 | }; |
| 276 | struct br_mrp_start_in_test { |
| 277 | __u32 interval; |
| 278 | __u32 max_miss; |
| 279 | __u32 period; |
| 280 | __u16 in_id; |
| 281 | }; |
Christopher Ferris | bb9fcb4 | 2020-04-06 11:38:04 -0700 | [diff] [blame] | 282 | struct 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 | }; |
| 290 | struct br_vlan_msg { |
| 291 | __u8 family; |
| 292 | __u8 reserved1; |
| 293 | __u16 reserved2; |
| 294 | __u32 ifindex; |
| 295 | }; |
| 296 | enum { |
Christopher Ferris | af09c70 | 2020-06-01 20:29:29 -0700 | [diff] [blame] | 297 | 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) |
| 303 | enum { |
Christopher Ferris | bb9fcb4 | 2020-04-06 11:38:04 -0700 | [diff] [blame] | 304 | BRIDGE_VLANDB_UNSPEC, |
| 305 | BRIDGE_VLANDB_ENTRY, |
| 306 | __BRIDGE_VLANDB_MAX, |
| 307 | }; |
| 308 | #define BRIDGE_VLANDB_MAX (__BRIDGE_VLANDB_MAX - 1) |
| 309 | enum { |
| 310 | BRIDGE_VLANDB_ENTRY_UNSPEC, |
| 311 | BRIDGE_VLANDB_ENTRY_INFO, |
| 312 | BRIDGE_VLANDB_ENTRY_RANGE, |
| 313 | BRIDGE_VLANDB_ENTRY_STATE, |
Christopher Ferris | af09c70 | 2020-06-01 20:29:29 -0700 | [diff] [blame] | 314 | BRIDGE_VLANDB_ENTRY_TUNNEL_INFO, |
| 315 | BRIDGE_VLANDB_ENTRY_STATS, |
Christopher Ferris | bb9fcb4 | 2020-04-06 11:38:04 -0700 | [diff] [blame] | 316 | __BRIDGE_VLANDB_ENTRY_MAX, |
| 317 | }; |
| 318 | #define BRIDGE_VLANDB_ENTRY_MAX (__BRIDGE_VLANDB_ENTRY_MAX - 1) |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 319 | enum { |
Christopher Ferris | af09c70 | 2020-06-01 20:29:29 -0700 | [diff] [blame] | 320 | 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) |
| 326 | enum { |
| 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) |
| 336 | enum { |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 337 | MDBA_UNSPEC, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 338 | MDBA_MDB, |
| 339 | MDBA_ROUTER, |
| 340 | __MDBA_MAX, |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 341 | }; |
Christopher Ferris | 82d7504 | 2015-01-26 10:57:07 -0800 | [diff] [blame] | 342 | #define MDBA_MAX (__MDBA_MAX - 1) |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 343 | enum { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 344 | MDBA_MDB_UNSPEC, |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 345 | MDBA_MDB_ENTRY, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 346 | __MDBA_MDB_MAX, |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 347 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 348 | #define MDBA_MDB_MAX (__MDBA_MDB_MAX - 1) |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 349 | enum { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 350 | MDBA_MDB_ENTRY_UNSPEC, |
| 351 | MDBA_MDB_ENTRY_INFO, |
| 352 | __MDBA_MDB_ENTRY_MAX, |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 353 | }; |
Christopher Ferris | 82d7504 | 2015-01-26 10:57:07 -0800 | [diff] [blame] | 354 | #define MDBA_MDB_ENTRY_MAX (__MDBA_MDB_ENTRY_MAX - 1) |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 355 | enum { |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 356 | MDBA_MDB_EATTR_UNSPEC, |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 357 | MDBA_MDB_EATTR_TIMER, |
Christopher Ferris | 32ff3f8 | 2020-12-14 13:10:04 -0800 | [diff] [blame^] | 358 | MDBA_MDB_EATTR_SRC_LIST, |
| 359 | MDBA_MDB_EATTR_GROUP_MODE, |
| 360 | MDBA_MDB_EATTR_SOURCE, |
| 361 | MDBA_MDB_EATTR_RTPROT, |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 362 | __MDBA_MDB_EATTR_MAX |
| 363 | }; |
| 364 | #define MDBA_MDB_EATTR_MAX (__MDBA_MDB_EATTR_MAX - 1) |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 365 | enum { |
Christopher Ferris | 32ff3f8 | 2020-12-14 13:10:04 -0800 | [diff] [blame^] | 366 | MDBA_MDB_SRCLIST_UNSPEC, |
| 367 | MDBA_MDB_SRCLIST_ENTRY, |
| 368 | __MDBA_MDB_SRCLIST_MAX |
| 369 | }; |
| 370 | #define MDBA_MDB_SRCLIST_MAX (__MDBA_MDB_SRCLIST_MAX - 1) |
| 371 | enum { |
| 372 | MDBA_MDB_SRCATTR_UNSPEC, |
| 373 | MDBA_MDB_SRCATTR_ADDRESS, |
| 374 | MDBA_MDB_SRCATTR_TIMER, |
| 375 | __MDBA_MDB_SRCATTR_MAX |
| 376 | }; |
| 377 | #define MDBA_MDB_SRCATTR_MAX (__MDBA_MDB_SRCATTR_MAX - 1) |
| 378 | enum { |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 379 | MDB_RTR_TYPE_DISABLED, |
| 380 | MDB_RTR_TYPE_TEMP_QUERY, |
| 381 | MDB_RTR_TYPE_PERM, |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 382 | MDB_RTR_TYPE_TEMP |
| 383 | }; |
| 384 | enum { |
| 385 | MDBA_ROUTER_UNSPEC, |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 386 | MDBA_ROUTER_PORT, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 387 | __MDBA_ROUTER_MAX, |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 388 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 389 | #define MDBA_ROUTER_MAX (__MDBA_ROUTER_MAX - 1) |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 390 | enum { |
| 391 | MDBA_ROUTER_PATTR_UNSPEC, |
| 392 | MDBA_ROUTER_PATTR_TIMER, |
| 393 | MDBA_ROUTER_PATTR_TYPE, |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 394 | __MDBA_ROUTER_PATTR_MAX |
| 395 | }; |
| 396 | #define MDBA_ROUTER_PATTR_MAX (__MDBA_ROUTER_PATTR_MAX - 1) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 397 | struct br_port_msg { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 398 | __u8 family; |
| 399 | __u32 ifindex; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 400 | }; |
| 401 | struct br_mdb_entry { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 402 | __u32 ifindex; |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 403 | #define MDB_TEMPORARY 0 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 404 | #define MDB_PERMANENT 1 |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 405 | __u8 state; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 406 | #define MDB_FLAGS_OFFLOAD (1 << 0) |
Christopher Ferris | 9584fa4 | 2019-12-09 15:36:13 -0800 | [diff] [blame] | 407 | #define MDB_FLAGS_FAST_LEAVE (1 << 1) |
Christopher Ferris | 32ff3f8 | 2020-12-14 13:10:04 -0800 | [diff] [blame^] | 408 | #define MDB_FLAGS_STAR_EXCL (1 << 2) |
| 409 | #define MDB_FLAGS_BLOCKED (1 << 3) |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 410 | __u8 flags; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 411 | __u16 vid; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 412 | struct { |
| 413 | union { |
| 414 | __be32 ip4; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 415 | struct in6_addr ip6; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 416 | } u; |
| 417 | __be16 proto; |
| 418 | } addr; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 419 | }; |
Christopher Ferris | 82d7504 | 2015-01-26 10:57:07 -0800 | [diff] [blame] | 420 | enum { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 421 | MDBA_SET_ENTRY_UNSPEC, |
| 422 | MDBA_SET_ENTRY, |
Christopher Ferris | 32ff3f8 | 2020-12-14 13:10:04 -0800 | [diff] [blame^] | 423 | MDBA_SET_ENTRY_ATTRS, |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 424 | __MDBA_SET_ENTRY_MAX, |
Christopher Ferris | 82d7504 | 2015-01-26 10:57:07 -0800 | [diff] [blame] | 425 | }; |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 426 | #define MDBA_SET_ENTRY_MAX (__MDBA_SET_ENTRY_MAX - 1) |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 427 | enum { |
Christopher Ferris | 32ff3f8 | 2020-12-14 13:10:04 -0800 | [diff] [blame^] | 428 | MDBE_ATTR_UNSPEC, |
| 429 | MDBE_ATTR_SOURCE, |
| 430 | __MDBE_ATTR_MAX, |
| 431 | }; |
| 432 | #define MDBE_ATTR_MAX (__MDBE_ATTR_MAX - 1) |
| 433 | enum { |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 434 | BRIDGE_XSTATS_UNSPEC, |
| 435 | BRIDGE_XSTATS_VLAN, |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 436 | BRIDGE_XSTATS_MCAST, |
| 437 | BRIDGE_XSTATS_PAD, |
Christopher Ferris | bb9fcb4 | 2020-04-06 11:38:04 -0700 | [diff] [blame] | 438 | BRIDGE_XSTATS_STP, |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 439 | __BRIDGE_XSTATS_MAX |
| 440 | }; |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 441 | #define BRIDGE_XSTATS_MAX (__BRIDGE_XSTATS_MAX - 1) |
| 442 | enum { |
| 443 | BR_MCAST_DIR_RX, |
| 444 | BR_MCAST_DIR_TX, |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 445 | BR_MCAST_DIR_SIZE |
| 446 | }; |
| 447 | struct br_mcast_stats { |
| 448 | __u64 igmp_v1queries[BR_MCAST_DIR_SIZE]; |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 449 | __u64 igmp_v2queries[BR_MCAST_DIR_SIZE]; |
| 450 | __u64 igmp_v3queries[BR_MCAST_DIR_SIZE]; |
| 451 | __u64 igmp_leaves[BR_MCAST_DIR_SIZE]; |
| 452 | __u64 igmp_v1reports[BR_MCAST_DIR_SIZE]; |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 453 | __u64 igmp_v2reports[BR_MCAST_DIR_SIZE]; |
| 454 | __u64 igmp_v3reports[BR_MCAST_DIR_SIZE]; |
| 455 | __u64 igmp_parse_errors; |
| 456 | __u64 mld_v1queries[BR_MCAST_DIR_SIZE]; |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 457 | __u64 mld_v2queries[BR_MCAST_DIR_SIZE]; |
| 458 | __u64 mld_leaves[BR_MCAST_DIR_SIZE]; |
| 459 | __u64 mld_v1reports[BR_MCAST_DIR_SIZE]; |
| 460 | __u64 mld_v2reports[BR_MCAST_DIR_SIZE]; |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 461 | __u64 mld_parse_errors; |
| 462 | __u64 mcast_bytes[BR_MCAST_DIR_SIZE]; |
| 463 | __u64 mcast_packets[BR_MCAST_DIR_SIZE]; |
| 464 | }; |
Christopher Ferris | d842e43 | 2019-03-07 10:21:59 -0800 | [diff] [blame] | 465 | enum br_boolopt_id { |
| 466 | BR_BOOLOPT_NO_LL_LEARN, |
| 467 | BR_BOOLOPT_MAX |
| 468 | }; |
| 469 | struct br_boolopt_multi { |
| 470 | __u32 optval; |
| 471 | __u32 optmask; |
| 472 | }; |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 473 | #endif |