Commit | Line | Data |
---|---|---|
6f52b16c | 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ |
607ca46e DH |
2 | #ifndef _UAPI_LINUX_IF_LINK_H |
3 | #define _UAPI_LINUX_IF_LINK_H | |
4 | ||
5 | #include <linux/types.h> | |
6 | #include <linux/netlink.h> | |
7 | ||
8 | /* This struct should be in sync with struct rtnl_link_stats64 */ | |
9 | struct rtnl_link_stats { | |
78a3ea55 JK |
10 | __u32 rx_packets; |
11 | __u32 tx_packets; | |
12 | __u32 rx_bytes; | |
13 | __u32 tx_bytes; | |
14 | __u32 rx_errors; | |
15 | __u32 tx_errors; | |
16 | __u32 rx_dropped; | |
17 | __u32 tx_dropped; | |
18 | __u32 multicast; | |
607ca46e | 19 | __u32 collisions; |
607ca46e DH |
20 | /* detailed rx_errors: */ |
21 | __u32 rx_length_errors; | |
78a3ea55 JK |
22 | __u32 rx_over_errors; |
23 | __u32 rx_crc_errors; | |
24 | __u32 rx_frame_errors; | |
25 | __u32 rx_fifo_errors; | |
26 | __u32 rx_missed_errors; | |
607ca46e DH |
27 | |
28 | /* detailed tx_errors */ | |
29 | __u32 tx_aborted_errors; | |
30 | __u32 tx_carrier_errors; | |
31 | __u32 tx_fifo_errors; | |
32 | __u32 tx_heartbeat_errors; | |
33 | __u32 tx_window_errors; | |
34 | ||
35 | /* for cslip etc */ | |
36 | __u32 rx_compressed; | |
37 | __u32 tx_compressed; | |
6e7333d3 | 38 | |
78a3ea55 | 39 | __u32 rx_nohandler; |
607ca46e DH |
40 | }; |
41 | ||
0db0c34c JK |
42 | /** |
43 | * struct rtnl_link_stats64 - The main device statistics structure. | |
44 | * | |
45 | * @rx_packets: Number of good packets received by the interface. | |
46 | * For hardware interfaces counts all good packets received from the device | |
47 | * by the host, including packets which host had to drop at various stages | |
48 | * of processing (even in the driver). | |
49 | * | |
50 | * @tx_packets: Number of packets successfully transmitted. | |
51 | * For hardware interfaces counts packets which host was able to successfully | |
52 | * hand over to the device, which does not necessarily mean that packets | |
53 | * had been successfully transmitted out of the device, only that device | |
54 | * acknowledged it copied them out of host memory. | |
55 | * | |
56 | * @rx_bytes: Number of good received bytes, corresponding to @rx_packets. | |
57 | * | |
58 | * For IEEE 802.3 devices should count the length of Ethernet Frames | |
59 | * excluding the FCS. | |
60 | * | |
61 | * @tx_bytes: Number of good transmitted bytes, corresponding to @tx_packets. | |
62 | * | |
63 | * For IEEE 802.3 devices should count the length of Ethernet Frames | |
64 | * excluding the FCS. | |
65 | * | |
66 | * @rx_errors: Total number of bad packets received on this network device. | |
67 | * This counter must include events counted by @rx_length_errors, | |
68 | * @rx_crc_errors, @rx_frame_errors and other errors not otherwise | |
69 | * counted. | |
70 | * | |
71 | * @tx_errors: Total number of transmit problems. | |
72 | * This counter must include events counter by @tx_aborted_errors, | |
73 | * @tx_carrier_errors, @tx_fifo_errors, @tx_heartbeat_errors, | |
74 | * @tx_window_errors and other errors not otherwise counted. | |
75 | * | |
76 | * @rx_dropped: Number of packets received but not processed, | |
77 | * e.g. due to lack of resources or unsupported protocol. | |
cf072069 JK |
78 | * For hardware interfaces this counter may include packets discarded |
79 | * due to L2 address filtering but should not include packets dropped | |
80 | * by the device due to buffer exhaustion which are counted separately in | |
0db0c34c JK |
81 | * @rx_missed_errors (since procfs folds those two counters together). |
82 | * | |
83 | * @tx_dropped: Number of packets dropped on their way to transmission, | |
84 | * e.g. due to lack of resources. | |
85 | * | |
86 | * @multicast: Multicast packets received. | |
87 | * For hardware interfaces this statistic is commonly calculated | |
88 | * at the device level (unlike @rx_packets) and therefore may include | |
89 | * packets which did not reach the host. | |
90 | * | |
91 | * For IEEE 802.3 devices this counter may be equivalent to: | |
92 | * | |
93 | * - 30.3.1.1.21 aMulticastFramesReceivedOK | |
94 | * | |
95 | * @collisions: Number of collisions during packet transmissions. | |
96 | * | |
97 | * @rx_length_errors: Number of packets dropped due to invalid length. | |
98 | * Part of aggregate "frame" errors in `/proc/net/dev`. | |
99 | * | |
100 | * For IEEE 802.3 devices this counter should be equivalent to a sum | |
101 | * of the following attributes: | |
102 | * | |
103 | * - 30.3.1.1.23 aInRangeLengthErrors | |
104 | * - 30.3.1.1.24 aOutOfRangeLengthField | |
105 | * - 30.3.1.1.25 aFrameTooLongErrors | |
106 | * | |
107 | * @rx_over_errors: Receiver FIFO overflow event counter. | |
108 | * | |
109 | * Historically the count of overflow events. Such events may be | |
110 | * reported in the receive descriptors or via interrupts, and may | |
111 | * not correspond one-to-one with dropped packets. | |
112 | * | |
113 | * The recommended interpretation for high speed interfaces is - | |
114 | * number of packets dropped because they did not fit into buffers | |
115 | * provided by the host, e.g. packets larger than MTU or next buffer | |
116 | * in the ring was not available for a scatter transfer. | |
117 | * | |
118 | * Part of aggregate "frame" errors in `/proc/net/dev`. | |
119 | * | |
120 | * This statistics was historically used interchangeably with | |
121 | * @rx_fifo_errors. | |
122 | * | |
123 | * This statistic corresponds to hardware events and is not commonly used | |
124 | * on software devices. | |
125 | * | |
126 | * @rx_crc_errors: Number of packets received with a CRC error. | |
127 | * Part of aggregate "frame" errors in `/proc/net/dev`. | |
128 | * | |
129 | * For IEEE 802.3 devices this counter must be equivalent to: | |
130 | * | |
131 | * - 30.3.1.1.6 aFrameCheckSequenceErrors | |
132 | * | |
133 | * @rx_frame_errors: Receiver frame alignment errors. | |
134 | * Part of aggregate "frame" errors in `/proc/net/dev`. | |
135 | * | |
136 | * For IEEE 802.3 devices this counter should be equivalent to: | |
137 | * | |
138 | * - 30.3.1.1.7 aAlignmentErrors | |
139 | * | |
140 | * @rx_fifo_errors: Receiver FIFO error counter. | |
141 | * | |
142 | * Historically the count of overflow events. Those events may be | |
143 | * reported in the receive descriptors or via interrupts, and may | |
144 | * not correspond one-to-one with dropped packets. | |
145 | * | |
146 | * This statistics was used interchangeably with @rx_over_errors. | |
147 | * Not recommended for use in drivers for high speed interfaces. | |
148 | * | |
149 | * This statistic is used on software devices, e.g. to count software | |
150 | * packet queue overflow (can) or sequencing errors (GRE). | |
151 | * | |
152 | * @rx_missed_errors: Count of packets missed by the host. | |
153 | * Folded into the "drop" counter in `/proc/net/dev`. | |
154 | * | |
155 | * Counts number of packets dropped by the device due to lack | |
156 | * of buffer space. This usually indicates that the host interface | |
157 | * is slower than the network interface, or host is not keeping up | |
158 | * with the receive packet rate. | |
159 | * | |
160 | * This statistic corresponds to hardware events and is not used | |
161 | * on software devices. | |
162 | * | |
163 | * @tx_aborted_errors: | |
164 | * Part of aggregate "carrier" errors in `/proc/net/dev`. | |
165 | * For IEEE 802.3 devices capable of half-duplex operation this counter | |
166 | * must be equivalent to: | |
167 | * | |
168 | * - 30.3.1.1.11 aFramesAbortedDueToXSColls | |
169 | * | |
170 | * High speed interfaces may use this counter as a general device | |
171 | * discard counter. | |
172 | * | |
173 | * @tx_carrier_errors: Number of frame transmission errors due to loss | |
174 | * of carrier during transmission. | |
175 | * Part of aggregate "carrier" errors in `/proc/net/dev`. | |
176 | * | |
177 | * For IEEE 802.3 devices this counter must be equivalent to: | |
178 | * | |
179 | * - 30.3.1.1.13 aCarrierSenseErrors | |
180 | * | |
181 | * @tx_fifo_errors: Number of frame transmission errors due to device | |
182 | * FIFO underrun / underflow. This condition occurs when the device | |
183 | * begins transmission of a frame but is unable to deliver the | |
184 | * entire frame to the transmitter in time for transmission. | |
185 | * Part of aggregate "carrier" errors in `/proc/net/dev`. | |
186 | * | |
187 | * @tx_heartbeat_errors: Number of Heartbeat / SQE Test errors for | |
188 | * old half-duplex Ethernet. | |
189 | * Part of aggregate "carrier" errors in `/proc/net/dev`. | |
190 | * | |
191 | * For IEEE 802.3 devices possibly equivalent to: | |
192 | * | |
193 | * - 30.3.2.1.4 aSQETestErrors | |
194 | * | |
195 | * @tx_window_errors: Number of frame transmission errors due | |
196 | * to late collisions (for Ethernet - after the first 64B of transmission). | |
197 | * Part of aggregate "carrier" errors in `/proc/net/dev`. | |
198 | * | |
199 | * For IEEE 802.3 devices this counter must be equivalent to: | |
200 | * | |
201 | * - 30.3.1.1.10 aLateCollisions | |
202 | * | |
203 | * @rx_compressed: Number of correctly received compressed packets. | |
204 | * This counters is only meaningful for interfaces which support | |
205 | * packet compression (e.g. CSLIP, PPP). | |
206 | * | |
207 | * @tx_compressed: Number of transmitted compressed packets. | |
208 | * This counters is only meaningful for interfaces which support | |
209 | * packet compression (e.g. CSLIP, PPP). | |
210 | * | |
211 | * @rx_nohandler: Number of packets received on the interface | |
212 | * but dropped by the networking stack because the device is | |
213 | * not designated to receive packets (e.g. backup link in a bond). | |
794c24e9 JJ |
214 | * |
215 | * @rx_otherhost_dropped: Number of packets dropped due to mismatch | |
216 | * in destination MAC address. | |
0db0c34c | 217 | */ |
607ca46e | 218 | struct rtnl_link_stats64 { |
0db0c34c JK |
219 | __u64 rx_packets; |
220 | __u64 tx_packets; | |
221 | __u64 rx_bytes; | |
222 | __u64 tx_bytes; | |
223 | __u64 rx_errors; | |
224 | __u64 tx_errors; | |
225 | __u64 rx_dropped; | |
226 | __u64 tx_dropped; | |
227 | __u64 multicast; | |
607ca46e DH |
228 | __u64 collisions; |
229 | ||
230 | /* detailed rx_errors: */ | |
231 | __u64 rx_length_errors; | |
0db0c34c JK |
232 | __u64 rx_over_errors; |
233 | __u64 rx_crc_errors; | |
234 | __u64 rx_frame_errors; | |
235 | __u64 rx_fifo_errors; | |
236 | __u64 rx_missed_errors; | |
607ca46e DH |
237 | |
238 | /* detailed tx_errors */ | |
239 | __u64 tx_aborted_errors; | |
240 | __u64 tx_carrier_errors; | |
241 | __u64 tx_fifo_errors; | |
242 | __u64 tx_heartbeat_errors; | |
243 | __u64 tx_window_errors; | |
244 | ||
245 | /* for cslip etc */ | |
246 | __u64 rx_compressed; | |
247 | __u64 tx_compressed; | |
0db0c34c | 248 | __u64 rx_nohandler; |
794c24e9 JJ |
249 | |
250 | __u64 rx_otherhost_dropped; | |
607ca46e DH |
251 | }; |
252 | ||
9309f97a PM |
253 | /* Subset of link stats useful for in-HW collection. Meaning of the fields is as |
254 | * for struct rtnl_link_stats64. | |
255 | */ | |
256 | struct rtnl_hw_stats64 { | |
257 | __u64 rx_packets; | |
258 | __u64 tx_packets; | |
259 | __u64 rx_bytes; | |
260 | __u64 tx_bytes; | |
261 | __u64 rx_errors; | |
262 | __u64 tx_errors; | |
263 | __u64 rx_dropped; | |
264 | __u64 tx_dropped; | |
265 | __u64 multicast; | |
266 | }; | |
267 | ||
607ca46e DH |
268 | /* The struct should be in sync with struct ifmap */ |
269 | struct rtnl_link_ifmap { | |
270 | __u64 mem_start; | |
271 | __u64 mem_end; | |
272 | __u64 base_addr; | |
273 | __u16 irq; | |
274 | __u8 dma; | |
275 | __u8 port; | |
276 | }; | |
277 | ||
278 | /* | |
279 | * IFLA_AF_SPEC | |
280 | * Contains nested attributes for address family specific attributes. | |
281 | * Each address family may create a attribute with the address family | |
282 | * number as type and create its own attribute structure in it. | |
283 | * | |
284 | * Example: | |
285 | * [IFLA_AF_SPEC] = { | |
286 | * [AF_INET] = { | |
287 | * [IFLA_INET_CONF] = ..., | |
288 | * }, | |
289 | * [AF_INET6] = { | |
290 | * [IFLA_INET6_FLAGS] = ..., | |
291 | * [IFLA_INET6_CONF] = ..., | |
292 | * } | |
293 | * } | |
294 | */ | |
295 | ||
296 | enum { | |
297 | IFLA_UNSPEC, | |
298 | IFLA_ADDRESS, | |
299 | IFLA_BROADCAST, | |
300 | IFLA_IFNAME, | |
301 | IFLA_MTU, | |
302 | IFLA_LINK, | |
303 | IFLA_QDISC, | |
304 | IFLA_STATS, | |
305 | IFLA_COST, | |
306 | #define IFLA_COST IFLA_COST | |
307 | IFLA_PRIORITY, | |
308 | #define IFLA_PRIORITY IFLA_PRIORITY | |
309 | IFLA_MASTER, | |
310 | #define IFLA_MASTER IFLA_MASTER | |
311 | IFLA_WIRELESS, /* Wireless Extension event - see wireless.h */ | |
312 | #define IFLA_WIRELESS IFLA_WIRELESS | |
313 | IFLA_PROTINFO, /* Protocol specific information for a link */ | |
314 | #define IFLA_PROTINFO IFLA_PROTINFO | |
315 | IFLA_TXQLEN, | |
316 | #define IFLA_TXQLEN IFLA_TXQLEN | |
317 | IFLA_MAP, | |
318 | #define IFLA_MAP IFLA_MAP | |
319 | IFLA_WEIGHT, | |
320 | #define IFLA_WEIGHT IFLA_WEIGHT | |
321 | IFLA_OPERSTATE, | |
322 | IFLA_LINKMODE, | |
323 | IFLA_LINKINFO, | |
324 | #define IFLA_LINKINFO IFLA_LINKINFO | |
325 | IFLA_NET_NS_PID, | |
326 | IFLA_IFALIAS, | |
327 | IFLA_NUM_VF, /* Number of VFs if device is SR-IOV PF */ | |
328 | IFLA_VFINFO_LIST, | |
329 | IFLA_STATS64, | |
330 | IFLA_VF_PORTS, | |
331 | IFLA_PORT_SELF, | |
332 | IFLA_AF_SPEC, | |
333 | IFLA_GROUP, /* Group the device belongs to */ | |
334 | IFLA_NET_NS_FD, | |
335 | IFLA_EXT_MASK, /* Extended info mask, VFs, etc */ | |
336 | IFLA_PROMISCUITY, /* Promiscuity count: > 0 means acts PROMISC */ | |
337 | #define IFLA_PROMISCUITY IFLA_PROMISCUITY | |
338 | IFLA_NUM_TX_QUEUES, | |
339 | IFLA_NUM_RX_QUEUES, | |
9a57247f | 340 | IFLA_CARRIER, |
66cae9ed | 341 | IFLA_PHYS_PORT_ID, |
2d3b479d | 342 | IFLA_CARRIER_CHANGES, |
82f28412 | 343 | IFLA_PHYS_SWITCH_ID, |
d37512a2 | 344 | IFLA_LINK_NETNSID, |
db24a904 | 345 | IFLA_PHYS_PORT_NAME, |
88d6378b | 346 | IFLA_PROTO_DOWN, |
c70ce028 ED |
347 | IFLA_GSO_MAX_SEGS, |
348 | IFLA_GSO_MAX_SIZE, | |
18402843 | 349 | IFLA_PAD, |
d1fdd913 | 350 | IFLA_XDP, |
3d3ea5af | 351 | IFLA_EVENT, |
6621dd29 | 352 | IFLA_NEW_NETNSID, |
79e1ad14 | 353 | IFLA_IF_NETNSID, |
19d8f1ad | 354 | IFLA_TARGET_NETNSID = IFLA_IF_NETNSID, /* new alias */ |
b2d3bcfa DD |
355 | IFLA_CARRIER_UP_COUNT, |
356 | IFLA_CARRIER_DOWN_COUNT, | |
38e01b30 | 357 | IFLA_NEW_IFINDEX, |
3e7a50ce SH |
358 | IFLA_MIN_MTU, |
359 | IFLA_MAX_MTU, | |
36fbf1e5 JP |
360 | IFLA_PROP_LIST, |
361 | IFLA_ALT_IFNAME, /* Alternative ifname */ | |
f74877a5 | 362 | IFLA_PERM_ADDRESS, |
829eb208 | 363 | IFLA_PROTO_DOWN_REASON, |
00e77ed8 JB |
364 | |
365 | /* device (sysfs) name as parent, used instead | |
366 | * of IFLA_LINK where there's no parent netdev | |
367 | */ | |
368 | IFLA_PARENT_DEV_NAME, | |
369 | IFLA_PARENT_DEV_BUS_NAME, | |
eac1b93c | 370 | IFLA_GRO_MAX_SIZE, |
89527be8 ED |
371 | IFLA_TSO_MAX_SIZE, |
372 | IFLA_TSO_MAX_SEGS, | |
7e6e1b57 | 373 | IFLA_ALLMULTI, /* Allmulti count: > 0 means acts ALLMULTI */ |
00e77ed8 | 374 | |
dca56c30 JP |
375 | IFLA_DEVLINK_PORT, |
376 | ||
9eefedd5 XL |
377 | IFLA_GSO_IPV4_MAX_SIZE, |
378 | IFLA_GRO_IPV4_MAX_SIZE, | |
5f184269 | 379 | IFLA_DPLL_PIN, |
f858cc9e | 380 | IFLA_MAX_PACING_OFFLOAD_HORIZON, |
4754affe | 381 | IFLA_NETNS_IMMUTABLE, |
607ca46e DH |
382 | __IFLA_MAX |
383 | }; | |
384 | ||
385 | ||
386 | #define IFLA_MAX (__IFLA_MAX - 1) | |
387 | ||
829eb208 RP |
388 | enum { |
389 | IFLA_PROTO_DOWN_REASON_UNSPEC, | |
390 | IFLA_PROTO_DOWN_REASON_MASK, /* u32, mask for reason bits */ | |
391 | IFLA_PROTO_DOWN_REASON_VALUE, /* u32, reason bit value */ | |
392 | ||
393 | __IFLA_PROTO_DOWN_REASON_CNT, | |
394 | IFLA_PROTO_DOWN_REASON_MAX = __IFLA_PROTO_DOWN_REASON_CNT - 1 | |
395 | }; | |
396 | ||
607ca46e DH |
397 | /* backwards compatibility for userspace */ |
398 | #ifndef __KERNEL__ | |
399 | #define IFLA_RTA(r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ifinfomsg)))) | |
400 | #define IFLA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct ifinfomsg)) | |
401 | #endif | |
402 | ||
403 | enum { | |
404 | IFLA_INET_UNSPEC, | |
405 | IFLA_INET_CONF, | |
406 | __IFLA_INET_MAX, | |
407 | }; | |
408 | ||
409 | #define IFLA_INET_MAX (__IFLA_INET_MAX - 1) | |
410 | ||
411 | /* ifi_flags. | |
412 | ||
413 | IFF_* flags. | |
414 | ||
415 | The only change is: | |
416 | IFF_LOOPBACK, IFF_BROADCAST and IFF_POINTOPOINT are | |
417 | more not changeable by user. They describe link media | |
418 | characteristics and set by device driver. | |
419 | ||
420 | Comments: | |
421 | - Combination IFF_BROADCAST|IFF_POINTOPOINT is invalid | |
422 | - If neither of these three flags are set; | |
423 | the interface is NBMA. | |
424 | ||
425 | - IFF_MULTICAST does not mean anything special: | |
426 | multicasts can be used on all not-NBMA links. | |
427 | IFF_MULTICAST means that this media uses special encapsulation | |
428 | for multicast frames. Apparently, all IFF_POINTOPOINT and | |
429 | IFF_BROADCAST devices are able to use multicasts too. | |
430 | */ | |
431 | ||
432 | /* IFLA_LINK. | |
433 | For usual devices it is equal ifi_index. | |
434 | If it is a "virtual interface" (f.e. tunnel), ifi_link | |
435 | can point to real physical interface (f.e. for bandwidth calculations), | |
436 | or maybe 0, what means, that real media is unknown (usual | |
437 | for IPIP tunnels, when route to endpoint is allowed to change) | |
438 | */ | |
439 | ||
440 | /* Subtype attributes for IFLA_PROTINFO */ | |
441 | enum { | |
442 | IFLA_INET6_UNSPEC, | |
443 | IFLA_INET6_FLAGS, /* link flags */ | |
444 | IFLA_INET6_CONF, /* sysctl parameters */ | |
445 | IFLA_INET6_STATS, /* statistics */ | |
446 | IFLA_INET6_MCAST, /* MC things. What of them? */ | |
447 | IFLA_INET6_CACHEINFO, /* time values and max reasm size */ | |
448 | IFLA_INET6_ICMP6STATS, /* statistics (icmpv6) */ | |
f53adae4 | 449 | IFLA_INET6_TOKEN, /* device token */ |
bc91b0f0 | 450 | IFLA_INET6_ADDR_GEN_MODE, /* implicit address generator mode */ |
49b99da2 | 451 | IFLA_INET6_RA_MTU, /* mtu carried in the RA message */ |
607ca46e DH |
452 | __IFLA_INET6_MAX |
453 | }; | |
454 | ||
455 | #define IFLA_INET6_MAX (__IFLA_INET6_MAX - 1) | |
456 | ||
bc91b0f0 JP |
457 | enum in6_addr_gen_mode { |
458 | IN6_ADDR_GEN_MODE_EUI64, | |
459 | IN6_ADDR_GEN_MODE_NONE, | |
622c81d5 | 460 | IN6_ADDR_GEN_MODE_STABLE_PRIVACY, |
cc9da6cc | 461 | IN6_ADDR_GEN_MODE_RANDOM, |
bc91b0f0 JP |
462 | }; |
463 | ||
e5c3ea5c JP |
464 | /* Bridge section */ |
465 | ||
8ebe0661 HL |
466 | /** |
467 | * DOC: Bridge enum definition | |
468 | * | |
469 | * Please *note* that the timer values in the following section are expected | |
470 | * in clock_t format, which is seconds multiplied by USER_HZ (generally | |
471 | * defined as 100). | |
472 | * | |
473 | * @IFLA_BR_FORWARD_DELAY | |
474 | * The bridge forwarding delay is the time spent in LISTENING state | |
475 | * (before moving to LEARNING) and in LEARNING state (before moving | |
476 | * to FORWARDING). Only relevant if STP is enabled. | |
477 | * | |
478 | * The valid values are between (2 * USER_HZ) and (30 * USER_HZ). | |
479 | * The default value is (15 * USER_HZ). | |
480 | * | |
481 | * @IFLA_BR_HELLO_TIME | |
482 | * The time between hello packets sent by the bridge, when it is a root | |
483 | * bridge or a designated bridge. Only relevant if STP is enabled. | |
484 | * | |
485 | * The valid values are between (1 * USER_HZ) and (10 * USER_HZ). | |
486 | * The default value is (2 * USER_HZ). | |
487 | * | |
488 | * @IFLA_BR_MAX_AGE | |
489 | * The hello packet timeout is the time until another bridge in the | |
490 | * spanning tree is assumed to be dead, after reception of its last hello | |
491 | * message. Only relevant if STP is enabled. | |
492 | * | |
493 | * The valid values are between (6 * USER_HZ) and (40 * USER_HZ). | |
494 | * The default value is (20 * USER_HZ). | |
495 | * | |
496 | * @IFLA_BR_AGEING_TIME | |
497 | * Configure the bridge's FDB entries aging time. It is the time a MAC | |
498 | * address will be kept in the FDB after a packet has been received from | |
499 | * that address. After this time has passed, entries are cleaned up. | |
500 | * Allow values outside the 802.1 standard specification for special cases: | |
501 | * | |
502 | * * 0 - entry never ages (all permanent) | |
503 | * * 1 - entry disappears (no persistence) | |
504 | * | |
505 | * The default value is (300 * USER_HZ). | |
506 | * | |
507 | * @IFLA_BR_STP_STATE | |
508 | * Turn spanning tree protocol on (*IFLA_BR_STP_STATE* > 0) or off | |
509 | * (*IFLA_BR_STP_STATE* == 0) for this bridge. | |
510 | * | |
511 | * The default value is 0 (disabled). | |
512 | * | |
513 | * @IFLA_BR_PRIORITY | |
514 | * Set this bridge's spanning tree priority, used during STP root bridge | |
515 | * election. | |
516 | * | |
517 | * The valid values are between 0 and 65535. | |
518 | * | |
519 | * @IFLA_BR_VLAN_FILTERING | |
520 | * Turn VLAN filtering on (*IFLA_BR_VLAN_FILTERING* > 0) or off | |
521 | * (*IFLA_BR_VLAN_FILTERING* == 0). When disabled, the bridge will not | |
522 | * consider the VLAN tag when handling packets. | |
523 | * | |
524 | * The default value is 0 (disabled). | |
525 | * | |
526 | * @IFLA_BR_VLAN_PROTOCOL | |
527 | * Set the protocol used for VLAN filtering. | |
528 | * | |
529 | * The valid values are 0x8100(802.1Q) or 0x88A8(802.1AD). The default value | |
530 | * is 0x8100(802.1Q). | |
531 | * | |
532 | * @IFLA_BR_GROUP_FWD_MASK | |
533 | * The group forwarding mask. This is the bitmask that is applied to | |
534 | * decide whether to forward incoming frames destined to link-local | |
535 | * addresses (of the form 01:80:C2:00:00:0X). | |
536 | * | |
537 | * The default value is 0, which means the bridge does not forward any | |
538 | * link-local frames coming on this port. | |
539 | * | |
540 | * @IFLA_BR_ROOT_ID | |
541 | * The bridge root id, read only. | |
542 | * | |
543 | * @IFLA_BR_BRIDGE_ID | |
544 | * The bridge id, read only. | |
545 | * | |
546 | * @IFLA_BR_ROOT_PORT | |
547 | * The bridge root port, read only. | |
548 | * | |
549 | * @IFLA_BR_ROOT_PATH_COST | |
550 | * The bridge root path cost, read only. | |
551 | * | |
552 | * @IFLA_BR_TOPOLOGY_CHANGE | |
553 | * The bridge topology change, read only. | |
554 | * | |
555 | * @IFLA_BR_TOPOLOGY_CHANGE_DETECTED | |
556 | * The bridge topology change detected, read only. | |
557 | * | |
558 | * @IFLA_BR_HELLO_TIMER | |
559 | * The bridge hello timer, read only. | |
560 | * | |
561 | * @IFLA_BR_TCN_TIMER | |
562 | * The bridge tcn timer, read only. | |
563 | * | |
564 | * @IFLA_BR_TOPOLOGY_CHANGE_TIMER | |
565 | * The bridge topology change timer, read only. | |
566 | * | |
567 | * @IFLA_BR_GC_TIMER | |
568 | * The bridge gc timer, read only. | |
569 | * | |
570 | * @IFLA_BR_GROUP_ADDR | |
571 | * Set the MAC address of the multicast group this bridge uses for STP. | |
572 | * The address must be a link-local address in standard Ethernet MAC address | |
573 | * format. It is an address of the form 01:80:C2:00:00:0X, with X in [0, 4..f]. | |
574 | * | |
575 | * The default value is 0. | |
576 | * | |
577 | * @IFLA_BR_FDB_FLUSH | |
578 | * Flush bridge's fdb dynamic entries. | |
579 | * | |
580 | * @IFLA_BR_MCAST_ROUTER | |
581 | * Set bridge's multicast router if IGMP snooping is enabled. | |
582 | * The valid values are: | |
583 | * | |
584 | * * 0 - disabled. | |
585 | * * 1 - automatic (queried). | |
586 | * * 2 - permanently enabled. | |
587 | * | |
588 | * The default value is 1. | |
589 | * | |
590 | * @IFLA_BR_MCAST_SNOOPING | |
591 | * Turn multicast snooping on (*IFLA_BR_MCAST_SNOOPING* > 0) or off | |
592 | * (*IFLA_BR_MCAST_SNOOPING* == 0). | |
593 | * | |
594 | * The default value is 1. | |
595 | * | |
596 | * @IFLA_BR_MCAST_QUERY_USE_IFADDR | |
597 | * If enabled use the bridge's own IP address as source address for IGMP | |
598 | * queries (*IFLA_BR_MCAST_QUERY_USE_IFADDR* > 0) or the default of 0.0.0.0 | |
599 | * (*IFLA_BR_MCAST_QUERY_USE_IFADDR* == 0). | |
600 | * | |
601 | * The default value is 0 (disabled). | |
602 | * | |
603 | * @IFLA_BR_MCAST_QUERIER | |
604 | * Enable (*IFLA_BR_MULTICAST_QUERIER* > 0) or disable | |
605 | * (*IFLA_BR_MULTICAST_QUERIER* == 0) IGMP querier, ie sending of multicast | |
606 | * queries by the bridge. | |
607 | * | |
608 | * The default value is 0 (disabled). | |
609 | * | |
610 | * @IFLA_BR_MCAST_HASH_ELASTICITY | |
611 | * Set multicast database hash elasticity, It is the maximum chain length in | |
612 | * the multicast hash table. This attribute is *deprecated* and the value | |
613 | * is always 16. | |
614 | * | |
615 | * @IFLA_BR_MCAST_HASH_MAX | |
616 | * Set maximum size of the multicast hash table | |
617 | * | |
618 | * The default value is 4096, the value must be a power of 2. | |
619 | * | |
620 | * @IFLA_BR_MCAST_LAST_MEMBER_CNT | |
621 | * The Last Member Query Count is the number of Group-Specific Queries | |
622 | * sent before the router assumes there are no local members. The Last | |
623 | * Member Query Count is also the number of Group-and-Source-Specific | |
624 | * Queries sent before the router assumes there are no listeners for a | |
625 | * particular source. | |
626 | * | |
627 | * The default value is 2. | |
628 | * | |
629 | * @IFLA_BR_MCAST_STARTUP_QUERY_CNT | |
630 | * The Startup Query Count is the number of Queries sent out on startup, | |
631 | * separated by the Startup Query Interval. | |
632 | * | |
633 | * The default value is 2. | |
634 | * | |
635 | * @IFLA_BR_MCAST_LAST_MEMBER_INTVL | |
636 | * The Last Member Query Interval is the Max Response Time inserted into | |
637 | * Group-Specific Queries sent in response to Leave Group messages, and | |
638 | * is also the amount of time between Group-Specific Query messages. | |
639 | * | |
640 | * The default value is (1 * USER_HZ). | |
641 | * | |
642 | * @IFLA_BR_MCAST_MEMBERSHIP_INTVL | |
643 | * The interval after which the bridge will leave a group, if no membership | |
644 | * reports for this group are received. | |
645 | * | |
646 | * The default value is (260 * USER_HZ). | |
647 | * | |
648 | * @IFLA_BR_MCAST_QUERIER_INTVL | |
649 | * The interval between queries sent by other routers. if no queries are | |
650 | * seen after this delay has passed, the bridge will start to send its own | |
651 | * queries (as if *IFLA_BR_MCAST_QUERIER_INTVL* was enabled). | |
652 | * | |
653 | * The default value is (255 * USER_HZ). | |
654 | * | |
655 | * @IFLA_BR_MCAST_QUERY_INTVL | |
656 | * The Query Interval is the interval between General Queries sent by | |
657 | * the Querier. | |
658 | * | |
659 | * The default value is (125 * USER_HZ). The minimum value is (1 * USER_HZ). | |
660 | * | |
661 | * @IFLA_BR_MCAST_QUERY_RESPONSE_INTVL | |
662 | * The Max Response Time used to calculate the Max Resp Code inserted | |
663 | * into the periodic General Queries. | |
664 | * | |
665 | * The default value is (10 * USER_HZ). | |
666 | * | |
667 | * @IFLA_BR_MCAST_STARTUP_QUERY_INTVL | |
668 | * The interval between queries in the startup phase. | |
669 | * | |
670 | * The default value is (125 * USER_HZ) / 4. The minimum value is (1 * USER_HZ). | |
671 | * | |
672 | * @IFLA_BR_NF_CALL_IPTABLES | |
673 | * Enable (*NF_CALL_IPTABLES* > 0) or disable (*NF_CALL_IPTABLES* == 0) | |
674 | * iptables hooks on the bridge. | |
675 | * | |
676 | * The default value is 0 (disabled). | |
677 | * | |
678 | * @IFLA_BR_NF_CALL_IP6TABLES | |
679 | * Enable (*NF_CALL_IP6TABLES* > 0) or disable (*NF_CALL_IP6TABLES* == 0) | |
680 | * ip6tables hooks on the bridge. | |
681 | * | |
682 | * The default value is 0 (disabled). | |
683 | * | |
684 | * @IFLA_BR_NF_CALL_ARPTABLES | |
685 | * Enable (*NF_CALL_ARPTABLES* > 0) or disable (*NF_CALL_ARPTABLES* == 0) | |
686 | * arptables hooks on the bridge. | |
687 | * | |
688 | * The default value is 0 (disabled). | |
689 | * | |
690 | * @IFLA_BR_VLAN_DEFAULT_PVID | |
691 | * VLAN ID applied to untagged and priority-tagged incoming packets. | |
692 | * | |
693 | * The default value is 1. Setting to the special value 0 makes all ports of | |
694 | * this bridge not have a PVID by default, which means that they will | |
695 | * not accept VLAN-untagged traffic. | |
696 | * | |
697 | * @IFLA_BR_PAD | |
698 | * Bridge attribute padding type for netlink message. | |
699 | * | |
700 | * @IFLA_BR_VLAN_STATS_ENABLED | |
701 | * Enable (*IFLA_BR_VLAN_STATS_ENABLED* == 1) or disable | |
702 | * (*IFLA_BR_VLAN_STATS_ENABLED* == 0) per-VLAN stats accounting. | |
703 | * | |
704 | * The default value is 0 (disabled). | |
705 | * | |
706 | * @IFLA_BR_MCAST_STATS_ENABLED | |
707 | * Enable (*IFLA_BR_MCAST_STATS_ENABLED* > 0) or disable | |
708 | * (*IFLA_BR_MCAST_STATS_ENABLED* == 0) multicast (IGMP/MLD) stats | |
709 | * accounting. | |
710 | * | |
711 | * The default value is 0 (disabled). | |
712 | * | |
713 | * @IFLA_BR_MCAST_IGMP_VERSION | |
714 | * Set the IGMP version. | |
715 | * | |
716 | * The valid values are 2 and 3. The default value is 2. | |
717 | * | |
718 | * @IFLA_BR_MCAST_MLD_VERSION | |
719 | * Set the MLD version. | |
720 | * | |
721 | * The valid values are 1 and 2. The default value is 1. | |
722 | * | |
723 | * @IFLA_BR_VLAN_STATS_PER_PORT | |
724 | * Enable (*IFLA_BR_VLAN_STATS_PER_PORT* == 1) or disable | |
725 | * (*IFLA_BR_VLAN_STATS_PER_PORT* == 0) per-VLAN per-port stats accounting. | |
726 | * Can be changed only when there are no port VLANs configured. | |
727 | * | |
728 | * The default value is 0 (disabled). | |
729 | * | |
730 | * @IFLA_BR_MULTI_BOOLOPT | |
731 | * The multi_boolopt is used to control new boolean options to avoid adding | |
732 | * new netlink attributes. You can look at ``enum br_boolopt_id`` for those | |
733 | * options. | |
734 | * | |
735 | * @IFLA_BR_MCAST_QUERIER_STATE | |
736 | * Bridge mcast querier states, read only. | |
737 | * | |
738 | * @IFLA_BR_FDB_N_LEARNED | |
739 | * The number of dynamically learned FDB entries for the current bridge, | |
740 | * read only. | |
741 | * | |
742 | * @IFLA_BR_FDB_MAX_LEARNED | |
743 | * Set the number of max dynamically learned FDB entries for the current | |
744 | * bridge. | |
745 | */ | |
e5c3ea5c JP |
746 | enum { |
747 | IFLA_BR_UNSPEC, | |
748 | IFLA_BR_FORWARD_DELAY, | |
749 | IFLA_BR_HELLO_TIME, | |
750 | IFLA_BR_MAX_AGE, | |
af615762 JT |
751 | IFLA_BR_AGEING_TIME, |
752 | IFLA_BR_STP_STATE, | |
753 | IFLA_BR_PRIORITY, | |
a7854037 | 754 | IFLA_BR_VLAN_FILTERING, |
d2d427b3 | 755 | IFLA_BR_VLAN_PROTOCOL, |
7910228b | 756 | IFLA_BR_GROUP_FWD_MASK, |
5127c81f | 757 | IFLA_BR_ROOT_ID, |
7599a220 | 758 | IFLA_BR_BRIDGE_ID, |
8762ba68 | 759 | IFLA_BR_ROOT_PORT, |
684dd248 | 760 | IFLA_BR_ROOT_PATH_COST, |
ed416309 NA |
761 | IFLA_BR_TOPOLOGY_CHANGE, |
762 | IFLA_BR_TOPOLOGY_CHANGE_DETECTED, | |
d76bd14e NA |
763 | IFLA_BR_HELLO_TIMER, |
764 | IFLA_BR_TCN_TIMER, | |
765 | IFLA_BR_TOPOLOGY_CHANGE_TIMER, | |
766 | IFLA_BR_GC_TIMER, | |
111189ab | 767 | IFLA_BR_GROUP_ADDR, |
150217c6 | 768 | IFLA_BR_FDB_FLUSH, |
a9a6bc70 | 769 | IFLA_BR_MCAST_ROUTER, |
89126327 | 770 | IFLA_BR_MCAST_SNOOPING, |
295141d9 | 771 | IFLA_BR_MCAST_QUERY_USE_IFADDR, |
ba062d7c | 772 | IFLA_BR_MCAST_QUERIER, |
431db3c0 | 773 | IFLA_BR_MCAST_HASH_ELASTICITY, |
858079fd | 774 | IFLA_BR_MCAST_HASH_MAX, |
79b859f5 | 775 | IFLA_BR_MCAST_LAST_MEMBER_CNT, |
b89e6bab | 776 | IFLA_BR_MCAST_STARTUP_QUERY_CNT, |
7e4df51e NA |
777 | IFLA_BR_MCAST_LAST_MEMBER_INTVL, |
778 | IFLA_BR_MCAST_MEMBERSHIP_INTVL, | |
779 | IFLA_BR_MCAST_QUERIER_INTVL, | |
780 | IFLA_BR_MCAST_QUERY_INTVL, | |
781 | IFLA_BR_MCAST_QUERY_RESPONSE_INTVL, | |
782 | IFLA_BR_MCAST_STARTUP_QUERY_INTVL, | |
93870cc0 NA |
783 | IFLA_BR_NF_CALL_IPTABLES, |
784 | IFLA_BR_NF_CALL_IP6TABLES, | |
785 | IFLA_BR_NF_CALL_ARPTABLES, | |
0f963b75 | 786 | IFLA_BR_VLAN_DEFAULT_PVID, |
12a0faa3 | 787 | IFLA_BR_PAD, |
6dada9b1 | 788 | IFLA_BR_VLAN_STATS_ENABLED, |
1080ab95 | 789 | IFLA_BR_MCAST_STATS_ENABLED, |
5e923585 | 790 | IFLA_BR_MCAST_IGMP_VERSION, |
aa2ae3e7 | 791 | IFLA_BR_MCAST_MLD_VERSION, |
9163a0fc | 792 | IFLA_BR_VLAN_STATS_PER_PORT, |
a428afe8 | 793 | IFLA_BR_MULTI_BOOLOPT, |
c7fa1d9b | 794 | IFLA_BR_MCAST_QUERIER_STATE, |
ddd1ad68 JN |
795 | IFLA_BR_FDB_N_LEARNED, |
796 | IFLA_BR_FDB_MAX_LEARNED, | |
e5c3ea5c JP |
797 | __IFLA_BR_MAX, |
798 | }; | |
799 | ||
800 | #define IFLA_BR_MAX (__IFLA_BR_MAX - 1) | |
801 | ||
5127c81f NA |
802 | struct ifla_bridge_id { |
803 | __u8 prio[2]; | |
804 | __u8 addr[6]; /* ETH_ALEN */ | |
805 | }; | |
806 | ||
8c4bafdb HL |
807 | /** |
808 | * DOC: Bridge mode enum definition | |
809 | * | |
810 | * @BRIDGE_MODE_HAIRPIN | |
811 | * Controls whether traffic may be sent back out of the port on which it | |
812 | * was received. This option is also called reflective relay mode, and is | |
813 | * used to support basic VEPA (Virtual Ethernet Port Aggregator) | |
814 | * capabilities. By default, this flag is turned off and the bridge will | |
815 | * not forward traffic back out of the receiving port. | |
816 | */ | |
25c71c75 | 817 | enum { |
818 | BRIDGE_MODE_UNSPEC, | |
819 | BRIDGE_MODE_HAIRPIN, | |
820 | }; | |
821 | ||
8c4bafdb HL |
822 | /** |
823 | * DOC: Bridge port enum definition | |
824 | * | |
825 | * @IFLA_BRPORT_STATE | |
826 | * The operation state of the port. Here are the valid values. | |
827 | * | |
828 | * * 0 - port is in STP *DISABLED* state. Make this port completely | |
829 | * inactive for STP. This is also called BPDU filter and could be used | |
830 | * to disable STP on an untrusted port, like a leaf virtual device. | |
831 | * The traffic forwarding is also stopped on this port. | |
832 | * * 1 - port is in STP *LISTENING* state. Only valid if STP is enabled | |
833 | * on the bridge. In this state the port listens for STP BPDUs and | |
834 | * drops all other traffic frames. | |
835 | * * 2 - port is in STP *LEARNING* state. Only valid if STP is enabled on | |
836 | * the bridge. In this state the port will accept traffic only for the | |
837 | * purpose of updating MAC address tables. | |
838 | * * 3 - port is in STP *FORWARDING* state. Port is fully active. | |
839 | * * 4 - port is in STP *BLOCKING* state. Only valid if STP is enabled on | |
840 | * the bridge. This state is used during the STP election process. | |
841 | * In this state, port will only process STP BPDUs. | |
842 | * | |
843 | * @IFLA_BRPORT_PRIORITY | |
844 | * The STP port priority. The valid values are between 0 and 255. | |
845 | * | |
846 | * @IFLA_BRPORT_COST | |
847 | * The STP path cost of the port. The valid values are between 1 and 65535. | |
848 | * | |
849 | * @IFLA_BRPORT_MODE | |
850 | * Set the bridge port mode. See *BRIDGE_MODE_HAIRPIN* for more details. | |
851 | * | |
852 | * @IFLA_BRPORT_GUARD | |
853 | * Controls whether STP BPDUs will be processed by the bridge port. By | |
854 | * default, the flag is turned off to allow BPDU processing. Turning this | |
855 | * flag on will disable the bridge port if a STP BPDU packet is received. | |
856 | * | |
857 | * If the bridge has Spanning Tree enabled, hostile devices on the network | |
858 | * may send BPDU on a port and cause network failure. Setting *guard on* | |
859 | * will detect and stop this by disabling the port. The port will be | |
860 | * restarted if the link is brought down, or removed and reattached. | |
861 | * | |
862 | * @IFLA_BRPORT_PROTECT | |
863 | * Controls whether a given port is allowed to become a root port or not. | |
864 | * Only used when STP is enabled on the bridge. By default the flag is off. | |
865 | * | |
866 | * This feature is also called root port guard. If BPDU is received from a | |
867 | * leaf (edge) port, it should not be elected as root port. This could | |
868 | * be used if using STP on a bridge and the downstream bridges are not fully | |
869 | * trusted; this prevents a hostile guest from rerouting traffic. | |
870 | * | |
871 | * @IFLA_BRPORT_FAST_LEAVE | |
872 | * This flag allows the bridge to immediately stop multicast traffic | |
873 | * forwarding on a port that receives an IGMP Leave message. It is only used | |
874 | * when IGMP snooping is enabled on the bridge. By default the flag is off. | |
875 | * | |
876 | * @IFLA_BRPORT_LEARNING | |
877 | * Controls whether a given port will learn *source* MAC addresses from | |
878 | * received traffic or not. Also controls whether dynamic FDB entries | |
879 | * (which can also be added by software) will be refreshed by incoming | |
880 | * traffic. By default this flag is on. | |
881 | * | |
882 | * @IFLA_BRPORT_UNICAST_FLOOD | |
883 | * Controls whether unicast traffic for which there is no FDB entry will | |
884 | * be flooded towards this port. By default this flag is on. | |
885 | * | |
886 | * @IFLA_BRPORT_PROXYARP | |
887 | * Enable proxy ARP on this port. | |
888 | * | |
889 | * @IFLA_BRPORT_LEARNING_SYNC | |
890 | * Controls whether a given port will sync MAC addresses learned on device | |
891 | * port to bridge FDB. | |
892 | * | |
893 | * @IFLA_BRPORT_PROXYARP_WIFI | |
894 | * Enable proxy ARP on this port which meets extended requirements by | |
895 | * IEEE 802.11 and Hotspot 2.0 specifications. | |
896 | * | |
897 | * @IFLA_BRPORT_ROOT_ID | |
898 | * | |
899 | * @IFLA_BRPORT_BRIDGE_ID | |
900 | * | |
901 | * @IFLA_BRPORT_DESIGNATED_PORT | |
902 | * | |
903 | * @IFLA_BRPORT_DESIGNATED_COST | |
904 | * | |
905 | * @IFLA_BRPORT_ID | |
906 | * | |
907 | * @IFLA_BRPORT_NO | |
908 | * | |
909 | * @IFLA_BRPORT_TOPOLOGY_CHANGE_ACK | |
910 | * | |
911 | * @IFLA_BRPORT_CONFIG_PENDING | |
912 | * | |
913 | * @IFLA_BRPORT_MESSAGE_AGE_TIMER | |
914 | * | |
915 | * @IFLA_BRPORT_FORWARD_DELAY_TIMER | |
916 | * | |
917 | * @IFLA_BRPORT_HOLD_TIMER | |
918 | * | |
919 | * @IFLA_BRPORT_FLUSH | |
920 | * Flush bridge ports' fdb dynamic entries. | |
921 | * | |
922 | * @IFLA_BRPORT_MULTICAST_ROUTER | |
923 | * Configure the port's multicast router presence. A port with | |
924 | * a multicast router will receive all multicast traffic. | |
925 | * The valid values are: | |
926 | * | |
927 | * * 0 disable multicast routers on this port | |
928 | * * 1 let the system detect the presence of routers (default) | |
929 | * * 2 permanently enable multicast traffic forwarding on this port | |
930 | * * 3 enable multicast routers temporarily on this port, not depending | |
931 | * on incoming queries. | |
932 | * | |
933 | * @IFLA_BRPORT_PAD | |
934 | * | |
935 | * @IFLA_BRPORT_MCAST_FLOOD | |
936 | * Controls whether a given port will flood multicast traffic for which | |
937 | * there is no MDB entry. By default this flag is on. | |
938 | * | |
939 | * @IFLA_BRPORT_MCAST_TO_UCAST | |
940 | * Controls whether a given port will replicate packets using unicast | |
941 | * instead of multicast. By default this flag is off. | |
942 | * | |
943 | * This is done by copying the packet per host and changing the multicast | |
944 | * destination MAC to a unicast one accordingly. | |
945 | * | |
946 | * *mcast_to_unicast* works on top of the multicast snooping feature of the | |
947 | * bridge. Which means unicast copies are only delivered to hosts which | |
948 | * are interested in unicast and signaled this via IGMP/MLD reports previously. | |
949 | * | |
950 | * This feature is intended for interface types which have a more reliable | |
951 | * and/or efficient way to deliver unicast packets than broadcast ones | |
952 | * (e.g. WiFi). | |
953 | * | |
954 | * However, it should only be enabled on interfaces where no IGMPv2/MLDv1 | |
955 | * report suppression takes place. IGMP/MLD report suppression issue is | |
956 | * usually overcome by the network daemon (supplicant) enabling AP isolation | |
957 | * and by that separating all STAs. | |
958 | * | |
959 | * Delivery of STA-to-STA IP multicast is made possible again by enabling | |
960 | * and utilizing the bridge hairpin mode, which considers the incoming port | |
961 | * as a potential outgoing port, too (see *BRIDGE_MODE_HAIRPIN* option). | |
962 | * Hairpin mode is performed after multicast snooping, therefore leading | |
963 | * to only deliver reports to STAs running a multicast router. | |
964 | * | |
965 | * @IFLA_BRPORT_VLAN_TUNNEL | |
966 | * Controls whether vlan to tunnel mapping is enabled on the port. | |
967 | * By default this flag is off. | |
968 | * | |
969 | * @IFLA_BRPORT_BCAST_FLOOD | |
970 | * Controls flooding of broadcast traffic on the given port. By default | |
971 | * this flag is on. | |
972 | * | |
973 | * @IFLA_BRPORT_GROUP_FWD_MASK | |
974 | * Set the group forward mask. This is a bitmask that is applied to | |
975 | * decide whether to forward incoming frames destined to link-local | |
976 | * addresses. The addresses of the form are 01:80:C2:00:00:0X (defaults | |
977 | * to 0, which means the bridge does not forward any link-local frames | |
978 | * coming on this port). | |
979 | * | |
980 | * @IFLA_BRPORT_NEIGH_SUPPRESS | |
981 | * Controls whether neighbor discovery (arp and nd) proxy and suppression | |
982 | * is enabled on the port. By default this flag is off. | |
983 | * | |
984 | * @IFLA_BRPORT_ISOLATED | |
985 | * Controls whether a given port will be isolated, which means it will be | |
986 | * able to communicate with non-isolated ports only. By default this | |
987 | * flag is off. | |
988 | * | |
989 | * @IFLA_BRPORT_BACKUP_PORT | |
990 | * Set a backup port. If the port loses carrier all traffic will be | |
991 | * redirected to the configured backup port. Set the value to 0 to disable | |
992 | * it. | |
993 | * | |
994 | * @IFLA_BRPORT_MRP_RING_OPEN | |
995 | * | |
996 | * @IFLA_BRPORT_MRP_IN_OPEN | |
997 | * | |
998 | * @IFLA_BRPORT_MCAST_EHT_HOSTS_LIMIT | |
999 | * The number of per-port EHT hosts limit. The default value is 512. | |
1000 | * Setting to 0 is not allowed. | |
1001 | * | |
1002 | * @IFLA_BRPORT_MCAST_EHT_HOSTS_CNT | |
1003 | * The current number of tracked hosts, read only. | |
1004 | * | |
1005 | * @IFLA_BRPORT_LOCKED | |
1006 | * Controls whether a port will be locked, meaning that hosts behind the | |
1007 | * port will not be able to communicate through the port unless an FDB | |
1008 | * entry with the unit's MAC address is in the FDB. The common use case is | |
1009 | * that hosts are allowed access through authentication with the IEEE 802.1X | |
1010 | * protocol or based on whitelists. By default this flag is off. | |
1011 | * | |
1012 | * Please note that secure 802.1X deployments should always use the | |
1013 | * *BR_BOOLOPT_NO_LL_LEARN* flag, to not permit the bridge to populate its | |
1014 | * FDB based on link-local (EAPOL) traffic received on the port. | |
1015 | * | |
1016 | * @IFLA_BRPORT_MAB | |
1017 | * Controls whether a port will use MAC Authentication Bypass (MAB), a | |
1018 | * technique through which select MAC addresses may be allowed on a locked | |
1019 | * port, without using 802.1X authentication. Packets with an unknown source | |
1020 | * MAC address generates a "locked" FDB entry on the incoming bridge port. | |
1021 | * The common use case is for user space to react to these bridge FDB | |
1022 | * notifications and optionally replace the locked FDB entry with a normal | |
1023 | * one, allowing traffic to pass for whitelisted MAC addresses. | |
1024 | * | |
1025 | * Setting this flag also requires *IFLA_BRPORT_LOCKED* and | |
1026 | * *IFLA_BRPORT_LEARNING*. *IFLA_BRPORT_LOCKED* ensures that unauthorized | |
1027 | * data packets are dropped, and *IFLA_BRPORT_LEARNING* allows the dynamic | |
1028 | * FDB entries installed by user space (as replacements for the locked FDB | |
1029 | * entries) to be refreshed and/or aged out. | |
1030 | * | |
1031 | * @IFLA_BRPORT_MCAST_N_GROUPS | |
1032 | * | |
1033 | * @IFLA_BRPORT_MCAST_MAX_GROUPS | |
1034 | * Sets the maximum number of MDB entries that can be registered for a | |
1035 | * given port. Attempts to register more MDB entries at the port than this | |
1036 | * limit allows will be rejected, whether they are done through netlink | |
1037 | * (e.g. the bridge tool), or IGMP or MLD membership reports. Setting a | |
1038 | * limit of 0 disables the limit. The default value is 0. | |
1039 | * | |
1040 | * @IFLA_BRPORT_NEIGH_VLAN_SUPPRESS | |
1041 | * Controls whether neighbor discovery (arp and nd) proxy and suppression is | |
1042 | * enabled for a given port. By default this flag is off. | |
1043 | * | |
1044 | * Note that this option only takes effect when *IFLA_BRPORT_NEIGH_SUPPRESS* | |
1045 | * is enabled for a given port. | |
1046 | * | |
1047 | * @IFLA_BRPORT_BACKUP_NHID | |
1048 | * The FDB nexthop object ID to attach to packets being redirected to a | |
1049 | * backup port that has VLAN tunnel mapping enabled (via the | |
1050 | * *IFLA_BRPORT_VLAN_TUNNEL* option). Setting a value of 0 (default) has | |
1051 | * the effect of not attaching any ID. | |
1052 | */ | |
25c71c75 | 1053 | enum { |
1054 | IFLA_BRPORT_UNSPEC, | |
1055 | IFLA_BRPORT_STATE, /* Spanning tree state */ | |
1056 | IFLA_BRPORT_PRIORITY, /* " priority */ | |
1057 | IFLA_BRPORT_COST, /* " cost */ | |
1058 | IFLA_BRPORT_MODE, /* mode (hairpin) */ | |
a2e01a65 | 1059 | IFLA_BRPORT_GUARD, /* bpdu guard */ |
1007dd1a | 1060 | IFLA_BRPORT_PROTECT, /* root port protection */ |
c2d3babf | 1061 | IFLA_BRPORT_FAST_LEAVE, /* multicast fast leave */ |
9ba18891 | 1062 | IFLA_BRPORT_LEARNING, /* mac learning */ |
867a5943 | 1063 | IFLA_BRPORT_UNICAST_FLOOD, /* flood unicast traffic */ |
95850116 | 1064 | IFLA_BRPORT_PROXYARP, /* proxy ARP */ |
efacacda | 1065 | IFLA_BRPORT_LEARNING_SYNC, /* mac learning sync from device */ |
842a9ae0 | 1066 | IFLA_BRPORT_PROXYARP_WIFI, /* proxy ARP for Wi-Fi */ |
4ebc7660 | 1067 | IFLA_BRPORT_ROOT_ID, /* designated root */ |
80df9a26 | 1068 | IFLA_BRPORT_BRIDGE_ID, /* designated bridge */ |
96f94e7f NA |
1069 | IFLA_BRPORT_DESIGNATED_PORT, |
1070 | IFLA_BRPORT_DESIGNATED_COST, | |
42d452c4 NA |
1071 | IFLA_BRPORT_ID, |
1072 | IFLA_BRPORT_NO, | |
e08e838a NA |
1073 | IFLA_BRPORT_TOPOLOGY_CHANGE_ACK, |
1074 | IFLA_BRPORT_CONFIG_PENDING, | |
61c0a9a8 NA |
1075 | IFLA_BRPORT_MESSAGE_AGE_TIMER, |
1076 | IFLA_BRPORT_FORWARD_DELAY_TIMER, | |
1077 | IFLA_BRPORT_HOLD_TIMER, | |
9b0c6e4d | 1078 | IFLA_BRPORT_FLUSH, |
5d6ae479 | 1079 | IFLA_BRPORT_MULTICAST_ROUTER, |
12a0faa3 | 1080 | IFLA_BRPORT_PAD, |
b6cb5ac8 | 1081 | IFLA_BRPORT_MCAST_FLOOD, |
6db6f0ea | 1082 | IFLA_BRPORT_MCAST_TO_UCAST, |
b3c7ef0a | 1083 | IFLA_BRPORT_VLAN_TUNNEL, |
99f906e9 | 1084 | IFLA_BRPORT_BCAST_FLOOD, |
5af48b59 | 1085 | IFLA_BRPORT_GROUP_FWD_MASK, |
821f1b21 | 1086 | IFLA_BRPORT_NEIGH_SUPPRESS, |
7d850abd | 1087 | IFLA_BRPORT_ISOLATED, |
2756f68c | 1088 | IFLA_BRPORT_BACKUP_PORT, |
3e54442c | 1089 | IFLA_BRPORT_MRP_RING_OPEN, |
ffb3adba | 1090 | IFLA_BRPORT_MRP_IN_OPEN, |
2dba407f NA |
1091 | IFLA_BRPORT_MCAST_EHT_HOSTS_LIMIT, |
1092 | IFLA_BRPORT_MCAST_EHT_HOSTS_CNT, | |
a21d9a67 | 1093 | IFLA_BRPORT_LOCKED, |
a35ec8e3 | 1094 | IFLA_BRPORT_MAB, |
a1aee20d PM |
1095 | IFLA_BRPORT_MCAST_N_GROUPS, |
1096 | IFLA_BRPORT_MCAST_MAX_GROUPS, | |
160656d7 | 1097 | IFLA_BRPORT_NEIGH_VLAN_SUPPRESS, |
29cfb2aa | 1098 | IFLA_BRPORT_BACKUP_NHID, |
25c71c75 | 1099 | __IFLA_BRPORT_MAX |
1100 | }; | |
1101 | #define IFLA_BRPORT_MAX (__IFLA_BRPORT_MAX - 1) | |
1102 | ||
607ca46e DH |
1103 | struct ifla_cacheinfo { |
1104 | __u32 max_reasm_len; | |
1105 | __u32 tstamp; /* ipv6InterfaceTable updated timestamp */ | |
1106 | __u32 reachable_time; | |
1107 | __u32 retrans_time; | |
1108 | }; | |
1109 | ||
1110 | enum { | |
1111 | IFLA_INFO_UNSPEC, | |
1112 | IFLA_INFO_KIND, | |
1113 | IFLA_INFO_DATA, | |
1114 | IFLA_INFO_XSTATS, | |
ba7d49b1 JP |
1115 | IFLA_INFO_SLAVE_KIND, |
1116 | IFLA_INFO_SLAVE_DATA, | |
607ca46e DH |
1117 | __IFLA_INFO_MAX, |
1118 | }; | |
1119 | ||
1120 | #define IFLA_INFO_MAX (__IFLA_INFO_MAX - 1) | |
1121 | ||
1122 | /* VLAN section */ | |
1123 | ||
1124 | enum { | |
1125 | IFLA_VLAN_UNSPEC, | |
1126 | IFLA_VLAN_ID, | |
1127 | IFLA_VLAN_FLAGS, | |
1128 | IFLA_VLAN_EGRESS_QOS, | |
1129 | IFLA_VLAN_INGRESS_QOS, | |
8ad227ff | 1130 | IFLA_VLAN_PROTOCOL, |
607ca46e DH |
1131 | __IFLA_VLAN_MAX, |
1132 | }; | |
1133 | ||
1134 | #define IFLA_VLAN_MAX (__IFLA_VLAN_MAX - 1) | |
1135 | ||
1136 | struct ifla_vlan_flags { | |
1137 | __u32 flags; | |
1138 | __u32 mask; | |
1139 | }; | |
1140 | ||
1141 | enum { | |
1142 | IFLA_VLAN_QOS_UNSPEC, | |
1143 | IFLA_VLAN_QOS_MAPPING, | |
1144 | __IFLA_VLAN_QOS_MAX | |
1145 | }; | |
1146 | ||
1147 | #define IFLA_VLAN_QOS_MAX (__IFLA_VLAN_QOS_MAX - 1) | |
1148 | ||
1149 | struct ifla_vlan_qos_mapping { | |
1150 | __u32 from; | |
1151 | __u32 to; | |
1152 | }; | |
1153 | ||
1154 | /* MACVLAN section */ | |
1155 | enum { | |
1156 | IFLA_MACVLAN_UNSPEC, | |
1157 | IFLA_MACVLAN_MODE, | |
1158 | IFLA_MACVLAN_FLAGS, | |
79cf79ab MB |
1159 | IFLA_MACVLAN_MACADDR_MODE, |
1160 | IFLA_MACVLAN_MACADDR, | |
1161 | IFLA_MACVLAN_MACADDR_DATA, | |
1162 | IFLA_MACVLAN_MACADDR_COUNT, | |
d4bff72c TK |
1163 | IFLA_MACVLAN_BC_QUEUE_LEN, |
1164 | IFLA_MACVLAN_BC_QUEUE_LEN_USED, | |
954d1fa1 | 1165 | IFLA_MACVLAN_BC_CUTOFF, |
607ca46e DH |
1166 | __IFLA_MACVLAN_MAX, |
1167 | }; | |
1168 | ||
1169 | #define IFLA_MACVLAN_MAX (__IFLA_MACVLAN_MAX - 1) | |
1170 | ||
1171 | enum macvlan_mode { | |
1172 | MACVLAN_MODE_PRIVATE = 1, /* don't talk to other macvlans */ | |
1173 | MACVLAN_MODE_VEPA = 2, /* talk to other ports through ext bridge */ | |
1174 | MACVLAN_MODE_BRIDGE = 4, /* talk to bridge ports directly */ | |
1175 | MACVLAN_MODE_PASSTHRU = 8,/* take over the underlying device */ | |
79cf79ab MB |
1176 | MACVLAN_MODE_SOURCE = 16,/* use source MAC address list to assign */ |
1177 | }; | |
1178 | ||
1179 | enum macvlan_macaddr_mode { | |
1180 | MACVLAN_MACADDR_ADD, | |
1181 | MACVLAN_MACADDR_DEL, | |
1182 | MACVLAN_MACADDR_FLUSH, | |
1183 | MACVLAN_MACADDR_SET, | |
607ca46e DH |
1184 | }; |
1185 | ||
1186 | #define MACVLAN_FLAG_NOPROMISC 1 | |
427f0c8c | 1187 | #define MACVLAN_FLAG_NODST 2 /* skip dst macvlan if matching src macvlan */ |
607ca46e | 1188 | |
4e3c8992 DA |
1189 | /* VRF section */ |
1190 | enum { | |
1191 | IFLA_VRF_UNSPEC, | |
1192 | IFLA_VRF_TABLE, | |
1193 | __IFLA_VRF_MAX | |
1194 | }; | |
1195 | ||
1196 | #define IFLA_VRF_MAX (__IFLA_VRF_MAX - 1) | |
1197 | ||
67eb0331 DA |
1198 | enum { |
1199 | IFLA_VRF_PORT_UNSPEC, | |
1200 | IFLA_VRF_PORT_TABLE, | |
1201 | __IFLA_VRF_PORT_MAX | |
1202 | }; | |
1203 | ||
1204 | #define IFLA_VRF_PORT_MAX (__IFLA_VRF_PORT_MAX - 1) | |
1205 | ||
dece8d2b SD |
1206 | /* MACSEC section */ |
1207 | enum { | |
1208 | IFLA_MACSEC_UNSPEC, | |
1209 | IFLA_MACSEC_SCI, | |
1210 | IFLA_MACSEC_PORT, | |
1211 | IFLA_MACSEC_ICV_LEN, | |
1212 | IFLA_MACSEC_CIPHER_SUITE, | |
1213 | IFLA_MACSEC_WINDOW, | |
1214 | IFLA_MACSEC_ENCODING_SA, | |
1215 | IFLA_MACSEC_ENCRYPT, | |
1216 | IFLA_MACSEC_PROTECT, | |
1217 | IFLA_MACSEC_INC_SCI, | |
1218 | IFLA_MACSEC_ES, | |
1219 | IFLA_MACSEC_SCB, | |
1220 | IFLA_MACSEC_REPLAY_PROTECT, | |
1221 | IFLA_MACSEC_VALIDATION, | |
f60d94c0 | 1222 | IFLA_MACSEC_PAD, |
791bb3fc | 1223 | IFLA_MACSEC_OFFLOAD, |
dece8d2b SD |
1224 | __IFLA_MACSEC_MAX, |
1225 | }; | |
1226 | ||
1227 | #define IFLA_MACSEC_MAX (__IFLA_MACSEC_MAX - 1) | |
1228 | ||
f203b76d SK |
1229 | /* XFRM section */ |
1230 | enum { | |
1231 | IFLA_XFRM_UNSPEC, | |
1232 | IFLA_XFRM_LINK, | |
1233 | IFLA_XFRM_IF_ID, | |
abc340b3 | 1234 | IFLA_XFRM_COLLECT_METADATA, |
f203b76d SK |
1235 | __IFLA_XFRM_MAX |
1236 | }; | |
1237 | ||
1238 | #define IFLA_XFRM_MAX (__IFLA_XFRM_MAX - 1) | |
dece8d2b SD |
1239 | |
1240 | enum macsec_validation_type { | |
1241 | MACSEC_VALIDATE_DISABLED = 0, | |
1242 | MACSEC_VALIDATE_CHECK = 1, | |
1243 | MACSEC_VALIDATE_STRICT = 2, | |
1244 | __MACSEC_VALIDATE_END, | |
1245 | MACSEC_VALIDATE_MAX = __MACSEC_VALIDATE_END - 1, | |
1246 | }; | |
1247 | ||
76564261 AT |
1248 | enum macsec_offload { |
1249 | MACSEC_OFFLOAD_OFF = 0, | |
1250 | MACSEC_OFFLOAD_PHY = 1, | |
21114b7f | 1251 | MACSEC_OFFLOAD_MAC = 2, |
76564261 AT |
1252 | __MACSEC_OFFLOAD_END, |
1253 | MACSEC_OFFLOAD_MAX = __MACSEC_OFFLOAD_END - 1, | |
1254 | }; | |
1255 | ||
2ad7bf36 MB |
1256 | /* IPVLAN section */ |
1257 | enum { | |
1258 | IFLA_IPVLAN_UNSPEC, | |
1259 | IFLA_IPVLAN_MODE, | |
a190d04d | 1260 | IFLA_IPVLAN_FLAGS, |
2ad7bf36 MB |
1261 | __IFLA_IPVLAN_MAX |
1262 | }; | |
1263 | ||
1264 | #define IFLA_IPVLAN_MAX (__IFLA_IPVLAN_MAX - 1) | |
1265 | ||
1266 | enum ipvlan_mode { | |
1267 | IPVLAN_MODE_L2 = 0, | |
1268 | IPVLAN_MODE_L3, | |
4fbae7d8 | 1269 | IPVLAN_MODE_L3S, |
2ad7bf36 MB |
1270 | IPVLAN_MODE_MAX |
1271 | }; | |
1272 | ||
a190d04d | 1273 | #define IPVLAN_F_PRIVATE 0x01 |
fe89aa6b | 1274 | #define IPVLAN_F_VEPA 0x02 |
a190d04d | 1275 | |
7b8135f4 RP |
1276 | /* Tunnel RTM header */ |
1277 | struct tunnel_msg { | |
1278 | __u8 family; | |
445b2f36 | 1279 | __u8 flags; |
7b8135f4 RP |
1280 | __u16 reserved2; |
1281 | __u32 ifindex; | |
1282 | }; | |
1283 | ||
35dfaad7 DB |
1284 | /* netkit section */ |
1285 | enum netkit_action { | |
1286 | NETKIT_NEXT = -1, | |
1287 | NETKIT_PASS = 0, | |
1288 | NETKIT_DROP = 2, | |
1289 | NETKIT_REDIRECT = 7, | |
1290 | }; | |
1291 | ||
1292 | enum netkit_mode { | |
1293 | NETKIT_L2, | |
1294 | NETKIT_L3, | |
1295 | }; | |
1296 | ||
83134ef4 DB |
1297 | /* NETKIT_SCRUB_NONE leaves clearing skb->{mark,priority} up to |
1298 | * the BPF program if attached. This also means the latter can | |
1299 | * consume the two fields if they were populated earlier. | |
1300 | * | |
1301 | * NETKIT_SCRUB_DEFAULT zeroes skb->{mark,priority} fields before | |
1302 | * invoking the attached BPF program when the peer device resides | |
1303 | * in a different network namespace. This is the default behavior. | |
1304 | */ | |
1305 | enum netkit_scrub { | |
1306 | NETKIT_SCRUB_NONE, | |
1307 | NETKIT_SCRUB_DEFAULT, | |
1308 | }; | |
1309 | ||
35dfaad7 DB |
1310 | enum { |
1311 | IFLA_NETKIT_UNSPEC, | |
1312 | IFLA_NETKIT_PEER_INFO, | |
1313 | IFLA_NETKIT_PRIMARY, | |
1314 | IFLA_NETKIT_POLICY, | |
1315 | IFLA_NETKIT_PEER_POLICY, | |
1316 | IFLA_NETKIT_MODE, | |
83134ef4 DB |
1317 | IFLA_NETKIT_SCRUB, |
1318 | IFLA_NETKIT_PEER_SCRUB, | |
b9ed315d DB |
1319 | IFLA_NETKIT_HEADROOM, |
1320 | IFLA_NETKIT_TAILROOM, | |
35dfaad7 DB |
1321 | __IFLA_NETKIT_MAX, |
1322 | }; | |
1323 | #define IFLA_NETKIT_MAX (__IFLA_NETKIT_MAX - 1) | |
1324 | ||
607ca46e | 1325 | /* VXLAN section */ |
445b2f36 NA |
1326 | |
1327 | /* include statistics in the dump */ | |
1328 | #define TUNNEL_MSG_FLAG_STATS 0x01 | |
1329 | ||
1330 | #define TUNNEL_MSG_VALID_USER_FLAGS TUNNEL_MSG_FLAG_STATS | |
1331 | ||
1332 | /* Embedded inside VXLAN_VNIFILTER_ENTRY_STATS */ | |
1333 | enum { | |
1334 | VNIFILTER_ENTRY_STATS_UNSPEC, | |
1335 | VNIFILTER_ENTRY_STATS_RX_BYTES, | |
1336 | VNIFILTER_ENTRY_STATS_RX_PKTS, | |
1337 | VNIFILTER_ENTRY_STATS_RX_DROPS, | |
1338 | VNIFILTER_ENTRY_STATS_RX_ERRORS, | |
1339 | VNIFILTER_ENTRY_STATS_TX_BYTES, | |
1340 | VNIFILTER_ENTRY_STATS_TX_PKTS, | |
1341 | VNIFILTER_ENTRY_STATS_TX_DROPS, | |
1342 | VNIFILTER_ENTRY_STATS_TX_ERRORS, | |
1343 | VNIFILTER_ENTRY_STATS_PAD, | |
1344 | __VNIFILTER_ENTRY_STATS_MAX | |
1345 | }; | |
1346 | #define VNIFILTER_ENTRY_STATS_MAX (__VNIFILTER_ENTRY_STATS_MAX - 1) | |
1347 | ||
7b8135f4 RP |
1348 | enum { |
1349 | VXLAN_VNIFILTER_ENTRY_UNSPEC, | |
1350 | VXLAN_VNIFILTER_ENTRY_START, | |
1351 | VXLAN_VNIFILTER_ENTRY_END, | |
1352 | VXLAN_VNIFILTER_ENTRY_GROUP, | |
1353 | VXLAN_VNIFILTER_ENTRY_GROUP6, | |
445b2f36 | 1354 | VXLAN_VNIFILTER_ENTRY_STATS, |
7b8135f4 RP |
1355 | __VXLAN_VNIFILTER_ENTRY_MAX |
1356 | }; | |
1357 | #define VXLAN_VNIFILTER_ENTRY_MAX (__VXLAN_VNIFILTER_ENTRY_MAX - 1) | |
1358 | ||
1359 | enum { | |
1360 | VXLAN_VNIFILTER_UNSPEC, | |
1361 | VXLAN_VNIFILTER_ENTRY, | |
1362 | __VXLAN_VNIFILTER_MAX | |
1363 | }; | |
1364 | #define VXLAN_VNIFILTER_MAX (__VXLAN_VNIFILTER_MAX - 1) | |
1365 | ||
607ca46e DH |
1366 | enum { |
1367 | IFLA_VXLAN_UNSPEC, | |
1368 | IFLA_VXLAN_ID, | |
5d174dd8 | 1369 | IFLA_VXLAN_GROUP, /* group or remote address */ |
607ca46e DH |
1370 | IFLA_VXLAN_LINK, |
1371 | IFLA_VXLAN_LOCAL, | |
1372 | IFLA_VXLAN_TTL, | |
1373 | IFLA_VXLAN_TOS, | |
1374 | IFLA_VXLAN_LEARNING, | |
1375 | IFLA_VXLAN_AGEING, | |
1376 | IFLA_VXLAN_LIMIT, | |
823aa873 | 1377 | IFLA_VXLAN_PORT_RANGE, /* source port */ |
e4f67add DS |
1378 | IFLA_VXLAN_PROXY, |
1379 | IFLA_VXLAN_RSC, | |
1380 | IFLA_VXLAN_L2MISS, | |
1381 | IFLA_VXLAN_L3MISS, | |
823aa873 | 1382 | IFLA_VXLAN_PORT, /* destination port */ |
e4c7ed41 CW |
1383 | IFLA_VXLAN_GROUP6, |
1384 | IFLA_VXLAN_LOCAL6, | |
359a0ea9 TH |
1385 | IFLA_VXLAN_UDP_CSUM, |
1386 | IFLA_VXLAN_UDP_ZERO_CSUM6_TX, | |
1387 | IFLA_VXLAN_UDP_ZERO_CSUM6_RX, | |
dfd8645e TH |
1388 | IFLA_VXLAN_REMCSUM_TX, |
1389 | IFLA_VXLAN_REMCSUM_RX, | |
3511494c | 1390 | IFLA_VXLAN_GBP, |
0ace2ca8 | 1391 | IFLA_VXLAN_REMCSUM_NOPARTIAL, |
f8a9b1bc | 1392 | IFLA_VXLAN_COLLECT_METADATA, |
e7f70af1 | 1393 | IFLA_VXLAN_LABEL, |
e1e5314d | 1394 | IFLA_VXLAN_GPE, |
72f6d71e | 1395 | IFLA_VXLAN_TTL_INHERIT, |
b4d30697 | 1396 | IFLA_VXLAN_DF, |
7b8135f4 | 1397 | IFLA_VXLAN_VNIFILTER, /* only applicable with COLLECT_METADATA mode */ |
69474a8a | 1398 | IFLA_VXLAN_LOCALBYPASS, |
c6e9dba3 | 1399 | IFLA_VXLAN_LABEL_POLICY, /* IPv6 flow label policy; ifla_vxlan_label_policy */ |
6c11379b | 1400 | IFLA_VXLAN_RESERVED_BITS, |
607ca46e DH |
1401 | __IFLA_VXLAN_MAX |
1402 | }; | |
1403 | #define IFLA_VXLAN_MAX (__IFLA_VXLAN_MAX - 1) | |
1404 | ||
1405 | struct ifla_vxlan_port_range { | |
1406 | __be16 low; | |
1407 | __be16 high; | |
1408 | }; | |
1409 | ||
b4d30697 SB |
1410 | enum ifla_vxlan_df { |
1411 | VXLAN_DF_UNSET = 0, | |
1412 | VXLAN_DF_SET, | |
1413 | VXLAN_DF_INHERIT, | |
1414 | __VXLAN_DF_END, | |
1415 | VXLAN_DF_MAX = __VXLAN_DF_END - 1, | |
1416 | }; | |
1417 | ||
c6e9dba3 AL |
1418 | enum ifla_vxlan_label_policy { |
1419 | VXLAN_LABEL_FIXED = 0, | |
1420 | VXLAN_LABEL_INHERIT = 1, | |
1421 | __VXLAN_LABEL_END, | |
1422 | VXLAN_LABEL_MAX = __VXLAN_LABEL_END - 1, | |
1423 | }; | |
1424 | ||
2d07dc79 JL |
1425 | /* GENEVE section */ |
1426 | enum { | |
1427 | IFLA_GENEVE_UNSPEC, | |
1428 | IFLA_GENEVE_ID, | |
1429 | IFLA_GENEVE_REMOTE, | |
8760ce58 | 1430 | IFLA_GENEVE_TTL, |
d8951125 | 1431 | IFLA_GENEVE_TOS, |
cd7918b3 | 1432 | IFLA_GENEVE_PORT, /* destination port */ |
e305ac6c | 1433 | IFLA_GENEVE_COLLECT_METADATA, |
8ed66f0e | 1434 | IFLA_GENEVE_REMOTE6, |
abe492b4 TH |
1435 | IFLA_GENEVE_UDP_CSUM, |
1436 | IFLA_GENEVE_UDP_ZERO_CSUM6_TX, | |
1437 | IFLA_GENEVE_UDP_ZERO_CSUM6_RX, | |
8eb3b995 | 1438 | IFLA_GENEVE_LABEL, |
52d0d404 | 1439 | IFLA_GENEVE_TTL_INHERIT, |
a025fb5f | 1440 | IFLA_GENEVE_DF, |
435fe1c0 | 1441 | IFLA_GENEVE_INNER_PROTO_INHERIT, |
e1f95b19 | 1442 | IFLA_GENEVE_PORT_RANGE, |
2d07dc79 JL |
1443 | __IFLA_GENEVE_MAX |
1444 | }; | |
1445 | #define IFLA_GENEVE_MAX (__IFLA_GENEVE_MAX - 1) | |
1446 | ||
a025fb5f SB |
1447 | enum ifla_geneve_df { |
1448 | GENEVE_DF_UNSET = 0, | |
1449 | GENEVE_DF_SET, | |
1450 | GENEVE_DF_INHERIT, | |
1451 | __GENEVE_DF_END, | |
1452 | GENEVE_DF_MAX = __GENEVE_DF_END - 1, | |
1453 | }; | |
1454 | ||
e1f95b19 DB |
1455 | struct ifla_geneve_port_range { |
1456 | __be16 low; | |
1457 | __be16 high; | |
1458 | }; | |
1459 | ||
571912c6 MV |
1460 | /* Bareudp section */ |
1461 | enum { | |
1462 | IFLA_BAREUDP_UNSPEC, | |
1463 | IFLA_BAREUDP_PORT, | |
1464 | IFLA_BAREUDP_ETHERTYPE, | |
1465 | IFLA_BAREUDP_SRCPORT_MIN, | |
4b5f6723 | 1466 | IFLA_BAREUDP_MULTIPROTO_MODE, |
571912c6 MV |
1467 | __IFLA_BAREUDP_MAX |
1468 | }; | |
1469 | ||
1470 | #define IFLA_BAREUDP_MAX (__IFLA_BAREUDP_MAX - 1) | |
1471 | ||
96d934c7 GN |
1472 | /* PPP section */ |
1473 | enum { | |
1474 | IFLA_PPP_UNSPEC, | |
1475 | IFLA_PPP_DEV_FD, | |
1476 | __IFLA_PPP_MAX | |
1477 | }; | |
1478 | #define IFLA_PPP_MAX (__IFLA_PPP_MAX - 1) | |
1479 | ||
459aa660 | 1480 | /* GTP section */ |
91ed81f9 JB |
1481 | |
1482 | enum ifla_gtp_role { | |
1483 | GTP_ROLE_GGSN = 0, | |
1484 | GTP_ROLE_SGSN, | |
1485 | }; | |
1486 | ||
459aa660 PN |
1487 | enum { |
1488 | IFLA_GTP_UNSPEC, | |
1489 | IFLA_GTP_FD0, | |
1490 | IFLA_GTP_FD1, | |
1491 | IFLA_GTP_PDP_HASHSIZE, | |
91ed81f9 | 1492 | IFLA_GTP_ROLE, |
b20dc3c6 | 1493 | IFLA_GTP_CREATE_SOCKETS, |
9af41cc3 | 1494 | IFLA_GTP_RESTART_COUNT, |
999cb275 PNA |
1495 | IFLA_GTP_LOCAL, |
1496 | IFLA_GTP_LOCAL6, | |
459aa660 PN |
1497 | __IFLA_GTP_MAX, |
1498 | }; | |
1499 | #define IFLA_GTP_MAX (__IFLA_GTP_MAX - 1) | |
1500 | ||
90af2311 JP |
1501 | /* Bonding section */ |
1502 | ||
1503 | enum { | |
1504 | IFLA_BOND_UNSPEC, | |
1505 | IFLA_BOND_MODE, | |
ec76aa49 | 1506 | IFLA_BOND_ACTIVE_SLAVE, |
eecdaa6e | 1507 | IFLA_BOND_MIIMON, |
25852e29 | 1508 | IFLA_BOND_UPDELAY, |
c7461f9b | 1509 | IFLA_BOND_DOWNDELAY, |
9f53e14e | 1510 | IFLA_BOND_USE_CARRIER, |
06151dbc | 1511 | IFLA_BOND_ARP_INTERVAL, |
7f28fa10 | 1512 | IFLA_BOND_ARP_IP_TARGET, |
29c49482 | 1513 | IFLA_BOND_ARP_VALIDATE, |
d5c84254 | 1514 | IFLA_BOND_ARP_ALL_TARGETS, |
0a98a0d1 | 1515 | IFLA_BOND_PRIMARY, |
8a41ae44 | 1516 | IFLA_BOND_PRIMARY_RESELECT, |
89901972 | 1517 | IFLA_BOND_FAIL_OVER_MAC, |
f70161c6 | 1518 | IFLA_BOND_XMIT_HASH_POLICY, |
d8838de7 | 1519 | IFLA_BOND_RESEND_IGMP, |
2c9839c1 | 1520 | IFLA_BOND_NUM_PEER_NOTIF, |
1cc0b1e3 | 1521 | IFLA_BOND_ALL_SLAVES_ACTIVE, |
7d101008 | 1522 | IFLA_BOND_MIN_LINKS, |
8d836d09 | 1523 | IFLA_BOND_LP_INTERVAL, |
c13ab3ff | 1524 | IFLA_BOND_PACKETS_PER_SLAVE, |
998e40bb | 1525 | IFLA_BOND_AD_LACP_RATE, |
ec029fac | 1526 | IFLA_BOND_AD_SELECT, |
4ee7ac75 | 1527 | IFLA_BOND_AD_INFO, |
171a42c3 AG |
1528 | IFLA_BOND_AD_ACTOR_SYS_PRIO, |
1529 | IFLA_BOND_AD_USER_PORT_KEY, | |
1530 | IFLA_BOND_AD_ACTOR_SYSTEM, | |
0f7bffd9 | 1531 | IFLA_BOND_TLB_DYNAMIC_LB, |
07a4ddec | 1532 | IFLA_BOND_PEER_NOTIF_DELAY, |
3a755cd8 | 1533 | IFLA_BOND_AD_LACP_ACTIVE, |
5944b5ab | 1534 | IFLA_BOND_MISSED_MAX, |
129e3c1b | 1535 | IFLA_BOND_NS_IP6_TARGET, |
240fd405 | 1536 | IFLA_BOND_COUPLED_CONTROL, |
90af2311 JP |
1537 | __IFLA_BOND_MAX, |
1538 | }; | |
1539 | ||
1540 | #define IFLA_BOND_MAX (__IFLA_BOND_MAX - 1) | |
1541 | ||
4ee7ac75 | 1542 | enum { |
237266f7 | 1543 | IFLA_BOND_AD_INFO_UNSPEC, |
4ee7ac75 | 1544 | IFLA_BOND_AD_INFO_AGGREGATOR, |
1545 | IFLA_BOND_AD_INFO_NUM_PORTS, | |
1546 | IFLA_BOND_AD_INFO_ACTOR_KEY, | |
1547 | IFLA_BOND_AD_INFO_PARTNER_KEY, | |
1548 | IFLA_BOND_AD_INFO_PARTNER_MAC, | |
1549 | __IFLA_BOND_AD_INFO_MAX, | |
1550 | }; | |
1551 | ||
1552 | #define IFLA_BOND_AD_INFO_MAX (__IFLA_BOND_AD_INFO_MAX - 1) | |
1553 | ||
1d3ee88a | 1554 | enum { |
df7dbcbb JP |
1555 | IFLA_BOND_SLAVE_UNSPEC, |
1556 | IFLA_BOND_SLAVE_STATE, | |
1557 | IFLA_BOND_SLAVE_MII_STATUS, | |
1558 | IFLA_BOND_SLAVE_LINK_FAILURE_COUNT, | |
1559 | IFLA_BOND_SLAVE_PERM_HWADDR, | |
1560 | IFLA_BOND_SLAVE_QUEUE_ID, | |
1561 | IFLA_BOND_SLAVE_AD_AGGREGATOR_ID, | |
254cb6db | 1562 | IFLA_BOND_SLAVE_AD_ACTOR_OPER_PORT_STATE, |
46ea297e | 1563 | IFLA_BOND_SLAVE_AD_PARTNER_OPER_PORT_STATE, |
0a2ff7cc | 1564 | IFLA_BOND_SLAVE_PRIO, |
df7dbcbb | 1565 | __IFLA_BOND_SLAVE_MAX, |
1d3ee88a | 1566 | }; |
1567 | ||
df7dbcbb | 1568 | #define IFLA_BOND_SLAVE_MAX (__IFLA_BOND_SLAVE_MAX - 1) |
1d3ee88a | 1569 | |
607ca46e DH |
1570 | /* SR-IOV virtual function management section */ |
1571 | ||
1572 | enum { | |
1573 | IFLA_VF_INFO_UNSPEC, | |
1574 | IFLA_VF_INFO, | |
1575 | __IFLA_VF_INFO_MAX, | |
1576 | }; | |
1577 | ||
1578 | #define IFLA_VF_INFO_MAX (__IFLA_VF_INFO_MAX - 1) | |
1579 | ||
1580 | enum { | |
1581 | IFLA_VF_UNSPEC, | |
1582 | IFLA_VF_MAC, /* Hardware queue specific attributes */ | |
79aab093 | 1583 | IFLA_VF_VLAN, /* VLAN ID and QoS */ |
ed616689 | 1584 | IFLA_VF_TX_RATE, /* Max TX Bandwidth Allocation */ |
607ca46e | 1585 | IFLA_VF_SPOOFCHK, /* Spoof Checking on/off switch */ |
1d8faf48 | 1586 | IFLA_VF_LINK_STATE, /* link state enable/disable/auto switch */ |
ed616689 | 1587 | IFLA_VF_RATE, /* Min and Max TX Bandwidth Allocation */ |
01a3d796 VZ |
1588 | IFLA_VF_RSS_QUERY_EN, /* RSS Redirection Table and Hash Key query |
1589 | * on/off switch | |
1590 | */ | |
3b766cd8 | 1591 | IFLA_VF_STATS, /* network device statistics */ |
dd461d6a | 1592 | IFLA_VF_TRUST, /* Trust VF */ |
cc8e27cc EC |
1593 | IFLA_VF_IB_NODE_GUID, /* VF Infiniband node GUID */ |
1594 | IFLA_VF_IB_PORT_GUID, /* VF Infiniband port GUID */ | |
79aab093 | 1595 | IFLA_VF_VLAN_LIST, /* nested list of vlans, option for QinQ */ |
75345f88 | 1596 | IFLA_VF_BROADCAST, /* VF broadcast */ |
607ca46e DH |
1597 | __IFLA_VF_MAX, |
1598 | }; | |
1599 | ||
1600 | #define IFLA_VF_MAX (__IFLA_VF_MAX - 1) | |
1601 | ||
1602 | struct ifla_vf_mac { | |
1603 | __u32 vf; | |
1604 | __u8 mac[32]; /* MAX_ADDR_LEN */ | |
1605 | }; | |
1606 | ||
75345f88 DK |
1607 | struct ifla_vf_broadcast { |
1608 | __u8 broadcast[32]; | |
1609 | }; | |
1610 | ||
607ca46e DH |
1611 | struct ifla_vf_vlan { |
1612 | __u32 vf; | |
1613 | __u32 vlan; /* 0 - 4095, 0 disables VLAN filter */ | |
1614 | __u32 qos; | |
1615 | }; | |
1616 | ||
79aab093 MS |
1617 | enum { |
1618 | IFLA_VF_VLAN_INFO_UNSPEC, | |
1619 | IFLA_VF_VLAN_INFO, /* VLAN ID, QoS and VLAN protocol */ | |
1620 | __IFLA_VF_VLAN_INFO_MAX, | |
1621 | }; | |
1622 | ||
1623 | #define IFLA_VF_VLAN_INFO_MAX (__IFLA_VF_VLAN_INFO_MAX - 1) | |
1624 | #define MAX_VLAN_LIST_LEN 1 | |
1625 | ||
1626 | struct ifla_vf_vlan_info { | |
1627 | __u32 vf; | |
1628 | __u32 vlan; /* 0 - 4095, 0 disables VLAN filter */ | |
1629 | __u32 qos; | |
1630 | __be16 vlan_proto; /* VLAN protocol either 802.1Q or 802.1ad */ | |
1631 | }; | |
1632 | ||
607ca46e DH |
1633 | struct ifla_vf_tx_rate { |
1634 | __u32 vf; | |
1635 | __u32 rate; /* Max TX bandwidth in Mbps, 0 disables throttling */ | |
1636 | }; | |
1637 | ||
ed616689 SC |
1638 | struct ifla_vf_rate { |
1639 | __u32 vf; | |
1640 | __u32 min_tx_rate; /* Min Bandwidth in Mbps */ | |
1641 | __u32 max_tx_rate; /* Max Bandwidth in Mbps */ | |
1642 | }; | |
1643 | ||
607ca46e DH |
1644 | struct ifla_vf_spoofchk { |
1645 | __u32 vf; | |
1646 | __u32 setting; | |
1647 | }; | |
1648 | ||
cc8e27cc EC |
1649 | struct ifla_vf_guid { |
1650 | __u32 vf; | |
1651 | __u64 guid; | |
1652 | }; | |
1653 | ||
1d8faf48 RE |
1654 | enum { |
1655 | IFLA_VF_LINK_STATE_AUTO, /* link state of the uplink */ | |
1656 | IFLA_VF_LINK_STATE_ENABLE, /* link always up */ | |
1657 | IFLA_VF_LINK_STATE_DISABLE, /* link always down */ | |
1658 | __IFLA_VF_LINK_STATE_MAX, | |
1659 | }; | |
1660 | ||
1661 | struct ifla_vf_link_state { | |
1662 | __u32 vf; | |
1663 | __u32 link_state; | |
1664 | }; | |
1665 | ||
01a3d796 VZ |
1666 | struct ifla_vf_rss_query_en { |
1667 | __u32 vf; | |
1668 | __u32 setting; | |
1669 | }; | |
1670 | ||
3b766cd8 EBE |
1671 | enum { |
1672 | IFLA_VF_STATS_RX_PACKETS, | |
1673 | IFLA_VF_STATS_TX_PACKETS, | |
1674 | IFLA_VF_STATS_RX_BYTES, | |
1675 | IFLA_VF_STATS_TX_BYTES, | |
1676 | IFLA_VF_STATS_BROADCAST, | |
1677 | IFLA_VF_STATS_MULTICAST, | |
343a6d8e | 1678 | IFLA_VF_STATS_PAD, |
c5a9f6f0 EE |
1679 | IFLA_VF_STATS_RX_DROPPED, |
1680 | IFLA_VF_STATS_TX_DROPPED, | |
3b766cd8 EBE |
1681 | __IFLA_VF_STATS_MAX, |
1682 | }; | |
1683 | ||
1684 | #define IFLA_VF_STATS_MAX (__IFLA_VF_STATS_MAX - 1) | |
1685 | ||
dd461d6a HS |
1686 | struct ifla_vf_trust { |
1687 | __u32 vf; | |
1688 | __u32 setting; | |
1689 | }; | |
1690 | ||
607ca46e DH |
1691 | /* VF ports management section |
1692 | * | |
1693 | * Nested layout of set/get msg is: | |
1694 | * | |
1695 | * [IFLA_NUM_VF] | |
1696 | * [IFLA_VF_PORTS] | |
1697 | * [IFLA_VF_PORT] | |
1698 | * [IFLA_PORT_*], ... | |
1699 | * [IFLA_VF_PORT] | |
1700 | * [IFLA_PORT_*], ... | |
1701 | * ... | |
1702 | * [IFLA_PORT_SELF] | |
1703 | * [IFLA_PORT_*], ... | |
1704 | */ | |
1705 | ||
1706 | enum { | |
1707 | IFLA_VF_PORT_UNSPEC, | |
1708 | IFLA_VF_PORT, /* nest */ | |
1709 | __IFLA_VF_PORT_MAX, | |
1710 | }; | |
1711 | ||
1712 | #define IFLA_VF_PORT_MAX (__IFLA_VF_PORT_MAX - 1) | |
1713 | ||
1714 | enum { | |
1715 | IFLA_PORT_UNSPEC, | |
1716 | IFLA_PORT_VF, /* __u32 */ | |
1717 | IFLA_PORT_PROFILE, /* string */ | |
1718 | IFLA_PORT_VSI_TYPE, /* 802.1Qbg (pre-)standard VDP */ | |
1719 | IFLA_PORT_INSTANCE_UUID, /* binary UUID */ | |
1720 | IFLA_PORT_HOST_UUID, /* binary UUID */ | |
1721 | IFLA_PORT_REQUEST, /* __u8 */ | |
1722 | IFLA_PORT_RESPONSE, /* __u16, output only */ | |
1723 | __IFLA_PORT_MAX, | |
1724 | }; | |
1725 | ||
1726 | #define IFLA_PORT_MAX (__IFLA_PORT_MAX - 1) | |
1727 | ||
1728 | #define PORT_PROFILE_MAX 40 | |
1729 | #define PORT_UUID_MAX 16 | |
1730 | #define PORT_SELF_VF -1 | |
1731 | ||
1732 | enum { | |
1733 | PORT_REQUEST_PREASSOCIATE = 0, | |
1734 | PORT_REQUEST_PREASSOCIATE_RR, | |
1735 | PORT_REQUEST_ASSOCIATE, | |
1736 | PORT_REQUEST_DISASSOCIATE, | |
1737 | }; | |
1738 | ||
1739 | enum { | |
1740 | PORT_VDP_RESPONSE_SUCCESS = 0, | |
1741 | PORT_VDP_RESPONSE_INVALID_FORMAT, | |
1742 | PORT_VDP_RESPONSE_INSUFFICIENT_RESOURCES, | |
1743 | PORT_VDP_RESPONSE_UNUSED_VTID, | |
1744 | PORT_VDP_RESPONSE_VTID_VIOLATION, | |
1745 | PORT_VDP_RESPONSE_VTID_VERSION_VIOALTION, | |
1746 | PORT_VDP_RESPONSE_OUT_OF_SYNC, | |
1747 | /* 0x08-0xFF reserved for future VDP use */ | |
1748 | PORT_PROFILE_RESPONSE_SUCCESS = 0x100, | |
1749 | PORT_PROFILE_RESPONSE_INPROGRESS, | |
1750 | PORT_PROFILE_RESPONSE_INVALID, | |
1751 | PORT_PROFILE_RESPONSE_BADSTATE, | |
1752 | PORT_PROFILE_RESPONSE_INSUFFICIENT_RESOURCES, | |
1753 | PORT_PROFILE_RESPONSE_ERROR, | |
1754 | }; | |
1755 | ||
1756 | struct ifla_port_vsi { | |
1757 | __u8 vsi_mgr_id; | |
1758 | __u8 vsi_type_id[3]; | |
1759 | __u8 vsi_type_version; | |
1760 | __u8 pad[3]; | |
1761 | }; | |
1762 | ||
1763 | ||
1764 | /* IPoIB section */ | |
1765 | ||
1766 | enum { | |
1767 | IFLA_IPOIB_UNSPEC, | |
1768 | IFLA_IPOIB_PKEY, | |
1769 | IFLA_IPOIB_MODE, | |
1770 | IFLA_IPOIB_UMCAST, | |
1771 | __IFLA_IPOIB_MAX | |
1772 | }; | |
1773 | ||
1774 | enum { | |
1775 | IPOIB_MODE_DATAGRAM = 0, /* using unreliable datagram QPs */ | |
1776 | IPOIB_MODE_CONNECTED = 1, /* using connected QPs */ | |
1777 | }; | |
1778 | ||
1779 | #define IFLA_IPOIB_MAX (__IFLA_IPOIB_MAX - 1) | |
1780 | ||
f421436a | 1781 | |
8f4c0e01 MK |
1782 | /* HSR/PRP section, both uses same interface */ |
1783 | ||
1784 | /* Different redundancy protocols for hsr device */ | |
1785 | enum { | |
1786 | HSR_PROTOCOL_HSR, | |
1787 | HSR_PROTOCOL_PRP, | |
1788 | HSR_PROTOCOL_MAX, | |
1789 | }; | |
f421436a AB |
1790 | |
1791 | enum { | |
1792 | IFLA_HSR_UNSPEC, | |
1793 | IFLA_HSR_SLAVE1, | |
1794 | IFLA_HSR_SLAVE2, | |
98bf8362 AB |
1795 | IFLA_HSR_MULTICAST_SPEC, /* Last byte of supervision addr */ |
1796 | IFLA_HSR_SUPERVISION_ADDR, /* Supervision frame multicast addr */ | |
1797 | IFLA_HSR_SEQ_NR, | |
b84e9307 | 1798 | IFLA_HSR_VERSION, /* HSR version */ |
8f4c0e01 MK |
1799 | IFLA_HSR_PROTOCOL, /* Indicate different protocol than |
1800 | * HSR. For example PRP. | |
1801 | */ | |
5055cccf | 1802 | IFLA_HSR_INTERLINK, /* HSR interlink network device */ |
f421436a AB |
1803 | __IFLA_HSR_MAX, |
1804 | }; | |
1805 | ||
1806 | #define IFLA_HSR_MAX (__IFLA_HSR_MAX - 1) | |
1807 | ||
10c9ead9 RP |
1808 | /* STATS section */ |
1809 | ||
1810 | struct if_stats_msg { | |
1811 | __u8 family; | |
1812 | __u8 pad1; | |
1813 | __u16 pad2; | |
1814 | __u32 ifindex; | |
1815 | __u32 filter_mask; | |
1816 | }; | |
1817 | ||
1818 | /* A stats attribute can be netdev specific or a global stat. | |
1819 | * For netdev stats, lets use the prefix IFLA_STATS_LINK_* | |
1820 | */ | |
1821 | enum { | |
1822 | IFLA_STATS_UNSPEC, /* also used as 64bit pad attribute */ | |
1823 | IFLA_STATS_LINK_64, | |
97a47fac | 1824 | IFLA_STATS_LINK_XSTATS, |
80e73cc5 | 1825 | IFLA_STATS_LINK_XSTATS_SLAVE, |
69ae6ad2 | 1826 | IFLA_STATS_LINK_OFFLOAD_XSTATS, |
aefb4d4a | 1827 | IFLA_STATS_AF_SPEC, |
10c9ead9 RP |
1828 | __IFLA_STATS_MAX, |
1829 | }; | |
1830 | ||
1831 | #define IFLA_STATS_MAX (__IFLA_STATS_MAX - 1) | |
1832 | ||
1833 | #define IFLA_STATS_FILTER_BIT(ATTR) (1 << (ATTR - 1)) | |
1834 | ||
46efc97b PM |
1835 | enum { |
1836 | IFLA_STATS_GETSET_UNSPEC, | |
1837 | IFLA_STATS_GET_FILTERS, /* Nest of IFLA_STATS_LINK_xxx, each a u32 with | |
1838 | * a filter mask for the corresponding group. | |
1839 | */ | |
5fd0b838 | 1840 | IFLA_STATS_SET_OFFLOAD_XSTATS_L3_STATS, /* 0 or 1 as u8 */ |
46efc97b PM |
1841 | __IFLA_STATS_GETSET_MAX, |
1842 | }; | |
1843 | ||
1844 | #define IFLA_STATS_GETSET_MAX (__IFLA_STATS_GETSET_MAX - 1) | |
1845 | ||
97a47fac NA |
1846 | /* These are embedded into IFLA_STATS_LINK_XSTATS: |
1847 | * [IFLA_STATS_LINK_XSTATS] | |
1848 | * -> [LINK_XSTATS_TYPE_xxx] | |
1849 | * -> [rtnl link type specific attributes] | |
1850 | */ | |
1851 | enum { | |
1852 | LINK_XSTATS_TYPE_UNSPEC, | |
a60c0903 | 1853 | LINK_XSTATS_TYPE_BRIDGE, |
a258aeac | 1854 | LINK_XSTATS_TYPE_BOND, |
97a47fac NA |
1855 | __LINK_XSTATS_TYPE_MAX |
1856 | }; | |
1857 | #define LINK_XSTATS_TYPE_MAX (__LINK_XSTATS_TYPE_MAX - 1) | |
1858 | ||
69ae6ad2 NF |
1859 | /* These are stats embedded into IFLA_STATS_LINK_OFFLOAD_XSTATS */ |
1860 | enum { | |
1861 | IFLA_OFFLOAD_XSTATS_UNSPEC, | |
1862 | IFLA_OFFLOAD_XSTATS_CPU_HIT, /* struct rtnl_link_stats64 */ | |
0e7788fd PM |
1863 | IFLA_OFFLOAD_XSTATS_HW_S_INFO, /* HW stats info. A nest */ |
1864 | IFLA_OFFLOAD_XSTATS_L3_STATS, /* struct rtnl_hw_stats64 */ | |
69ae6ad2 NF |
1865 | __IFLA_OFFLOAD_XSTATS_MAX |
1866 | }; | |
1867 | #define IFLA_OFFLOAD_XSTATS_MAX (__IFLA_OFFLOAD_XSTATS_MAX - 1) | |
1868 | ||
0e7788fd PM |
1869 | enum { |
1870 | IFLA_OFFLOAD_XSTATS_HW_S_INFO_UNSPEC, | |
1871 | IFLA_OFFLOAD_XSTATS_HW_S_INFO_REQUEST, /* u8 */ | |
1872 | IFLA_OFFLOAD_XSTATS_HW_S_INFO_USED, /* u8 */ | |
1873 | __IFLA_OFFLOAD_XSTATS_HW_S_INFO_MAX, | |
1874 | }; | |
1875 | #define IFLA_OFFLOAD_XSTATS_HW_S_INFO_MAX \ | |
1876 | (__IFLA_OFFLOAD_XSTATS_HW_S_INFO_MAX - 1) | |
1877 | ||
d1fdd913 BB |
1878 | /* XDP section */ |
1879 | ||
85de8576 | 1880 | #define XDP_FLAGS_UPDATE_IF_NOEXIST (1U << 0) |
0489df9a DB |
1881 | #define XDP_FLAGS_SKB_MODE (1U << 1) |
1882 | #define XDP_FLAGS_DRV_MODE (1U << 2) | |
ee5d032f | 1883 | #define XDP_FLAGS_HW_MODE (1U << 3) |
92234c8f | 1884 | #define XDP_FLAGS_REPLACE (1U << 4) |
ee5d032f JK |
1885 | #define XDP_FLAGS_MODES (XDP_FLAGS_SKB_MODE | \ |
1886 | XDP_FLAGS_DRV_MODE | \ | |
1887 | XDP_FLAGS_HW_MODE) | |
b5cdae32 | 1888 | #define XDP_FLAGS_MASK (XDP_FLAGS_UPDATE_IF_NOEXIST | \ |
92234c8f | 1889 | XDP_FLAGS_MODES | XDP_FLAGS_REPLACE) |
85de8576 | 1890 | |
d67b9cd2 DB |
1891 | /* These are stored into IFLA_XDP_ATTACHED on dump. */ |
1892 | enum { | |
1893 | XDP_ATTACHED_NONE = 0, | |
1894 | XDP_ATTACHED_DRV, | |
1895 | XDP_ATTACHED_SKB, | |
ce158e58 | 1896 | XDP_ATTACHED_HW, |
a25717d2 | 1897 | XDP_ATTACHED_MULTI, |
d67b9cd2 DB |
1898 | }; |
1899 | ||
d1fdd913 BB |
1900 | enum { |
1901 | IFLA_XDP_UNSPEC, | |
1902 | IFLA_XDP_FD, | |
1903 | IFLA_XDP_ATTACHED, | |
85de8576 | 1904 | IFLA_XDP_FLAGS, |
58038695 | 1905 | IFLA_XDP_PROG_ID, |
4f91da26 JK |
1906 | IFLA_XDP_DRV_PROG_ID, |
1907 | IFLA_XDP_SKB_PROG_ID, | |
1908 | IFLA_XDP_HW_PROG_ID, | |
92234c8f | 1909 | IFLA_XDP_EXPECTED_FD, |
d1fdd913 BB |
1910 | __IFLA_XDP_MAX, |
1911 | }; | |
1912 | ||
1913 | #define IFLA_XDP_MAX (__IFLA_XDP_MAX - 1) | |
1914 | ||
3d3ea5af VY |
1915 | enum { |
1916 | IFLA_EVENT_NONE, | |
1917 | IFLA_EVENT_REBOOT, /* internal reset / reboot */ | |
1918 | IFLA_EVENT_FEATURES, /* change in offload features */ | |
1919 | IFLA_EVENT_BONDING_FAILOVER, /* change in active slave */ | |
1920 | IFLA_EVENT_NOTIFY_PEERS, /* re-sent grat. arp/ndisc */ | |
1921 | IFLA_EVENT_IGMP_RESEND, /* re-sent IGMP JOIN */ | |
1922 | IFLA_EVENT_BONDING_OPTIONS, /* change in bonding options */ | |
1923 | }; | |
1924 | ||
1ec010e7 SD |
1925 | /* tun section */ |
1926 | ||
1927 | enum { | |
1928 | IFLA_TUN_UNSPEC, | |
1929 | IFLA_TUN_OWNER, | |
1930 | IFLA_TUN_GROUP, | |
1931 | IFLA_TUN_TYPE, | |
1932 | IFLA_TUN_PI, | |
1933 | IFLA_TUN_VNET_HDR, | |
1934 | IFLA_TUN_PERSIST, | |
1935 | IFLA_TUN_MULTI_QUEUE, | |
1936 | IFLA_TUN_NUM_QUEUES, | |
1937 | IFLA_TUN_NUM_DISABLED_QUEUES, | |
1938 | __IFLA_TUN_MAX, | |
1939 | }; | |
1940 | ||
1941 | #define IFLA_TUN_MAX (__IFLA_TUN_MAX - 1) | |
1942 | ||
14452ca3 SAK |
1943 | /* rmnet section */ |
1944 | ||
1945 | #define RMNET_FLAGS_INGRESS_DEAGGREGATION (1U << 0) | |
1946 | #define RMNET_FLAGS_INGRESS_MAP_COMMANDS (1U << 1) | |
1947 | #define RMNET_FLAGS_INGRESS_MAP_CKSUMV4 (1U << 2) | |
1948 | #define RMNET_FLAGS_EGRESS_MAP_CKSUMV4 (1U << 3) | |
e1d9a90a | 1949 | #define RMNET_FLAGS_INGRESS_MAP_CKSUMV5 (1U << 4) |
b6e5d27e | 1950 | #define RMNET_FLAGS_EGRESS_MAP_CKSUMV5 (1U << 5) |
14452ca3 SAK |
1951 | |
1952 | enum { | |
1953 | IFLA_RMNET_UNSPEC, | |
1954 | IFLA_RMNET_MUX_ID, | |
1955 | IFLA_RMNET_FLAGS, | |
1956 | __IFLA_RMNET_MAX, | |
1957 | }; | |
1958 | ||
1959 | #define IFLA_RMNET_MAX (__IFLA_RMNET_MAX - 1) | |
1960 | ||
1961 | struct ifla_rmnet_flags { | |
1962 | __u32 flags; | |
1963 | __u32 mask; | |
1964 | }; | |
1965 | ||
583be982 JK |
1966 | /* MCTP section */ |
1967 | ||
1968 | enum { | |
1969 | IFLA_MCTP_UNSPEC, | |
1970 | IFLA_MCTP_NET, | |
580db513 | 1971 | IFLA_MCTP_PHYS_BINDING, |
583be982 JK |
1972 | __IFLA_MCTP_MAX, |
1973 | }; | |
1974 | ||
1975 | #define IFLA_MCTP_MAX (__IFLA_MCTP_MAX - 1) | |
1976 | ||
95f510d0 VO |
1977 | /* DSA section */ |
1978 | ||
1979 | enum { | |
1980 | IFLA_DSA_UNSPEC, | |
87cd8371 FF |
1981 | IFLA_DSA_CONDUIT, |
1982 | /* Deprecated, use IFLA_DSA_CONDUIT instead */ | |
1983 | IFLA_DSA_MASTER = IFLA_DSA_CONDUIT, | |
95f510d0 VO |
1984 | __IFLA_DSA_MAX, |
1985 | }; | |
1986 | ||
1987 | #define IFLA_DSA_MAX (__IFLA_DSA_MAX - 1) | |
1988 | ||
c2d950c4 AQ |
1989 | /* OVPN section */ |
1990 | ||
1991 | enum ovpn_mode { | |
1992 | OVPN_MODE_P2P, | |
1993 | OVPN_MODE_MP, | |
1994 | }; | |
1995 | ||
1996 | enum { | |
1997 | IFLA_OVPN_UNSPEC, | |
1998 | IFLA_OVPN_MODE, | |
1999 | __IFLA_OVPN_MAX, | |
2000 | }; | |
2001 | ||
2002 | #define IFLA_OVPN_MAX (__IFLA_OVPN_MAX - 1) | |
2003 | ||
607ca46e | 2004 | #endif /* _UAPI_LINUX_IF_LINK_H */ |