Commit | Line | Data |
---|---|---|
607ca46e DH |
1 | #ifndef _UAPI_LINUX_IF_LINK_H |
2 | #define _UAPI_LINUX_IF_LINK_H | |
3 | ||
4 | #include <linux/types.h> | |
5 | #include <linux/netlink.h> | |
6 | ||
7 | /* This struct should be in sync with struct rtnl_link_stats64 */ | |
8 | struct rtnl_link_stats { | |
9 | __u32 rx_packets; /* total packets received */ | |
10 | __u32 tx_packets; /* total packets transmitted */ | |
11 | __u32 rx_bytes; /* total bytes received */ | |
12 | __u32 tx_bytes; /* total bytes transmitted */ | |
13 | __u32 rx_errors; /* bad packets received */ | |
14 | __u32 tx_errors; /* packet transmit problems */ | |
15 | __u32 rx_dropped; /* no space in linux buffers */ | |
16 | __u32 tx_dropped; /* no space available in linux */ | |
17 | __u32 multicast; /* multicast packets received */ | |
18 | __u32 collisions; | |
19 | ||
20 | /* detailed rx_errors: */ | |
21 | __u32 rx_length_errors; | |
22 | __u32 rx_over_errors; /* receiver ring buff overflow */ | |
23 | __u32 rx_crc_errors; /* recved pkt with crc error */ | |
24 | __u32 rx_frame_errors; /* recv'd frame alignment error */ | |
25 | __u32 rx_fifo_errors; /* recv'r fifo overrun */ | |
26 | __u32 rx_missed_errors; /* receiver missed packet */ | |
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 JW |
38 | |
39 | __u32 rx_nohandler; /* dropped, no handler found */ | |
607ca46e DH |
40 | }; |
41 | ||
42 | /* The main device statistics structure */ | |
43 | struct rtnl_link_stats64 { | |
44 | __u64 rx_packets; /* total packets received */ | |
45 | __u64 tx_packets; /* total packets transmitted */ | |
46 | __u64 rx_bytes; /* total bytes received */ | |
47 | __u64 tx_bytes; /* total bytes transmitted */ | |
48 | __u64 rx_errors; /* bad packets received */ | |
49 | __u64 tx_errors; /* packet transmit problems */ | |
50 | __u64 rx_dropped; /* no space in linux buffers */ | |
51 | __u64 tx_dropped; /* no space available in linux */ | |
52 | __u64 multicast; /* multicast packets received */ | |
53 | __u64 collisions; | |
54 | ||
55 | /* detailed rx_errors: */ | |
56 | __u64 rx_length_errors; | |
57 | __u64 rx_over_errors; /* receiver ring buff overflow */ | |
58 | __u64 rx_crc_errors; /* recved pkt with crc error */ | |
59 | __u64 rx_frame_errors; /* recv'd frame alignment error */ | |
60 | __u64 rx_fifo_errors; /* recv'r fifo overrun */ | |
61 | __u64 rx_missed_errors; /* receiver missed packet */ | |
62 | ||
63 | /* detailed tx_errors */ | |
64 | __u64 tx_aborted_errors; | |
65 | __u64 tx_carrier_errors; | |
66 | __u64 tx_fifo_errors; | |
67 | __u64 tx_heartbeat_errors; | |
68 | __u64 tx_window_errors; | |
69 | ||
70 | /* for cslip etc */ | |
71 | __u64 rx_compressed; | |
72 | __u64 tx_compressed; | |
6e7333d3 JW |
73 | |
74 | __u64 rx_nohandler; /* dropped, no handler found */ | |
607ca46e DH |
75 | }; |
76 | ||
77 | /* The struct should be in sync with struct ifmap */ | |
78 | struct rtnl_link_ifmap { | |
79 | __u64 mem_start; | |
80 | __u64 mem_end; | |
81 | __u64 base_addr; | |
82 | __u16 irq; | |
83 | __u8 dma; | |
84 | __u8 port; | |
85 | }; | |
86 | ||
87 | /* | |
88 | * IFLA_AF_SPEC | |
89 | * Contains nested attributes for address family specific attributes. | |
90 | * Each address family may create a attribute with the address family | |
91 | * number as type and create its own attribute structure in it. | |
92 | * | |
93 | * Example: | |
94 | * [IFLA_AF_SPEC] = { | |
95 | * [AF_INET] = { | |
96 | * [IFLA_INET_CONF] = ..., | |
97 | * }, | |
98 | * [AF_INET6] = { | |
99 | * [IFLA_INET6_FLAGS] = ..., | |
100 | * [IFLA_INET6_CONF] = ..., | |
101 | * } | |
102 | * } | |
103 | */ | |
104 | ||
105 | enum { | |
106 | IFLA_UNSPEC, | |
107 | IFLA_ADDRESS, | |
108 | IFLA_BROADCAST, | |
109 | IFLA_IFNAME, | |
110 | IFLA_MTU, | |
111 | IFLA_LINK, | |
112 | IFLA_QDISC, | |
113 | IFLA_STATS, | |
114 | IFLA_COST, | |
115 | #define IFLA_COST IFLA_COST | |
116 | IFLA_PRIORITY, | |
117 | #define IFLA_PRIORITY IFLA_PRIORITY | |
118 | IFLA_MASTER, | |
119 | #define IFLA_MASTER IFLA_MASTER | |
120 | IFLA_WIRELESS, /* Wireless Extension event - see wireless.h */ | |
121 | #define IFLA_WIRELESS IFLA_WIRELESS | |
122 | IFLA_PROTINFO, /* Protocol specific information for a link */ | |
123 | #define IFLA_PROTINFO IFLA_PROTINFO | |
124 | IFLA_TXQLEN, | |
125 | #define IFLA_TXQLEN IFLA_TXQLEN | |
126 | IFLA_MAP, | |
127 | #define IFLA_MAP IFLA_MAP | |
128 | IFLA_WEIGHT, | |
129 | #define IFLA_WEIGHT IFLA_WEIGHT | |
130 | IFLA_OPERSTATE, | |
131 | IFLA_LINKMODE, | |
132 | IFLA_LINKINFO, | |
133 | #define IFLA_LINKINFO IFLA_LINKINFO | |
134 | IFLA_NET_NS_PID, | |
135 | IFLA_IFALIAS, | |
136 | IFLA_NUM_VF, /* Number of VFs if device is SR-IOV PF */ | |
137 | IFLA_VFINFO_LIST, | |
138 | IFLA_STATS64, | |
139 | IFLA_VF_PORTS, | |
140 | IFLA_PORT_SELF, | |
141 | IFLA_AF_SPEC, | |
142 | IFLA_GROUP, /* Group the device belongs to */ | |
143 | IFLA_NET_NS_FD, | |
144 | IFLA_EXT_MASK, /* Extended info mask, VFs, etc */ | |
145 | IFLA_PROMISCUITY, /* Promiscuity count: > 0 means acts PROMISC */ | |
146 | #define IFLA_PROMISCUITY IFLA_PROMISCUITY | |
147 | IFLA_NUM_TX_QUEUES, | |
148 | IFLA_NUM_RX_QUEUES, | |
9a57247f | 149 | IFLA_CARRIER, |
66cae9ed | 150 | IFLA_PHYS_PORT_ID, |
2d3b479d | 151 | IFLA_CARRIER_CHANGES, |
82f28412 | 152 | IFLA_PHYS_SWITCH_ID, |
d37512a2 | 153 | IFLA_LINK_NETNSID, |
db24a904 | 154 | IFLA_PHYS_PORT_NAME, |
88d6378b | 155 | IFLA_PROTO_DOWN, |
c70ce028 ED |
156 | IFLA_GSO_MAX_SEGS, |
157 | IFLA_GSO_MAX_SIZE, | |
18402843 | 158 | IFLA_PAD, |
d1fdd913 | 159 | IFLA_XDP, |
607ca46e DH |
160 | __IFLA_MAX |
161 | }; | |
162 | ||
163 | ||
164 | #define IFLA_MAX (__IFLA_MAX - 1) | |
165 | ||
166 | /* backwards compatibility for userspace */ | |
167 | #ifndef __KERNEL__ | |
168 | #define IFLA_RTA(r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ifinfomsg)))) | |
169 | #define IFLA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct ifinfomsg)) | |
170 | #endif | |
171 | ||
172 | enum { | |
173 | IFLA_INET_UNSPEC, | |
174 | IFLA_INET_CONF, | |
175 | __IFLA_INET_MAX, | |
176 | }; | |
177 | ||
178 | #define IFLA_INET_MAX (__IFLA_INET_MAX - 1) | |
179 | ||
180 | /* ifi_flags. | |
181 | ||
182 | IFF_* flags. | |
183 | ||
184 | The only change is: | |
185 | IFF_LOOPBACK, IFF_BROADCAST and IFF_POINTOPOINT are | |
186 | more not changeable by user. They describe link media | |
187 | characteristics and set by device driver. | |
188 | ||
189 | Comments: | |
190 | - Combination IFF_BROADCAST|IFF_POINTOPOINT is invalid | |
191 | - If neither of these three flags are set; | |
192 | the interface is NBMA. | |
193 | ||
194 | - IFF_MULTICAST does not mean anything special: | |
195 | multicasts can be used on all not-NBMA links. | |
196 | IFF_MULTICAST means that this media uses special encapsulation | |
197 | for multicast frames. Apparently, all IFF_POINTOPOINT and | |
198 | IFF_BROADCAST devices are able to use multicasts too. | |
199 | */ | |
200 | ||
201 | /* IFLA_LINK. | |
202 | For usual devices it is equal ifi_index. | |
203 | If it is a "virtual interface" (f.e. tunnel), ifi_link | |
204 | can point to real physical interface (f.e. for bandwidth calculations), | |
205 | or maybe 0, what means, that real media is unknown (usual | |
206 | for IPIP tunnels, when route to endpoint is allowed to change) | |
207 | */ | |
208 | ||
209 | /* Subtype attributes for IFLA_PROTINFO */ | |
210 | enum { | |
211 | IFLA_INET6_UNSPEC, | |
212 | IFLA_INET6_FLAGS, /* link flags */ | |
213 | IFLA_INET6_CONF, /* sysctl parameters */ | |
214 | IFLA_INET6_STATS, /* statistics */ | |
215 | IFLA_INET6_MCAST, /* MC things. What of them? */ | |
216 | IFLA_INET6_CACHEINFO, /* time values and max reasm size */ | |
217 | IFLA_INET6_ICMP6STATS, /* statistics (icmpv6) */ | |
f53adae4 | 218 | IFLA_INET6_TOKEN, /* device token */ |
bc91b0f0 | 219 | IFLA_INET6_ADDR_GEN_MODE, /* implicit address generator mode */ |
607ca46e DH |
220 | __IFLA_INET6_MAX |
221 | }; | |
222 | ||
223 | #define IFLA_INET6_MAX (__IFLA_INET6_MAX - 1) | |
224 | ||
bc91b0f0 JP |
225 | enum in6_addr_gen_mode { |
226 | IN6_ADDR_GEN_MODE_EUI64, | |
227 | IN6_ADDR_GEN_MODE_NONE, | |
622c81d5 | 228 | IN6_ADDR_GEN_MODE_STABLE_PRIVACY, |
cc9da6cc | 229 | IN6_ADDR_GEN_MODE_RANDOM, |
bc91b0f0 JP |
230 | }; |
231 | ||
e5c3ea5c JP |
232 | /* Bridge section */ |
233 | ||
234 | enum { | |
235 | IFLA_BR_UNSPEC, | |
236 | IFLA_BR_FORWARD_DELAY, | |
237 | IFLA_BR_HELLO_TIME, | |
238 | IFLA_BR_MAX_AGE, | |
af615762 JT |
239 | IFLA_BR_AGEING_TIME, |
240 | IFLA_BR_STP_STATE, | |
241 | IFLA_BR_PRIORITY, | |
a7854037 | 242 | IFLA_BR_VLAN_FILTERING, |
d2d427b3 | 243 | IFLA_BR_VLAN_PROTOCOL, |
7910228b | 244 | IFLA_BR_GROUP_FWD_MASK, |
5127c81f | 245 | IFLA_BR_ROOT_ID, |
7599a220 | 246 | IFLA_BR_BRIDGE_ID, |
8762ba68 | 247 | IFLA_BR_ROOT_PORT, |
684dd248 | 248 | IFLA_BR_ROOT_PATH_COST, |
ed416309 NA |
249 | IFLA_BR_TOPOLOGY_CHANGE, |
250 | IFLA_BR_TOPOLOGY_CHANGE_DETECTED, | |
d76bd14e NA |
251 | IFLA_BR_HELLO_TIMER, |
252 | IFLA_BR_TCN_TIMER, | |
253 | IFLA_BR_TOPOLOGY_CHANGE_TIMER, | |
254 | IFLA_BR_GC_TIMER, | |
111189ab | 255 | IFLA_BR_GROUP_ADDR, |
150217c6 | 256 | IFLA_BR_FDB_FLUSH, |
a9a6bc70 | 257 | IFLA_BR_MCAST_ROUTER, |
89126327 | 258 | IFLA_BR_MCAST_SNOOPING, |
295141d9 | 259 | IFLA_BR_MCAST_QUERY_USE_IFADDR, |
ba062d7c | 260 | IFLA_BR_MCAST_QUERIER, |
431db3c0 | 261 | IFLA_BR_MCAST_HASH_ELASTICITY, |
858079fd | 262 | IFLA_BR_MCAST_HASH_MAX, |
79b859f5 | 263 | IFLA_BR_MCAST_LAST_MEMBER_CNT, |
b89e6bab | 264 | IFLA_BR_MCAST_STARTUP_QUERY_CNT, |
7e4df51e NA |
265 | IFLA_BR_MCAST_LAST_MEMBER_INTVL, |
266 | IFLA_BR_MCAST_MEMBERSHIP_INTVL, | |
267 | IFLA_BR_MCAST_QUERIER_INTVL, | |
268 | IFLA_BR_MCAST_QUERY_INTVL, | |
269 | IFLA_BR_MCAST_QUERY_RESPONSE_INTVL, | |
270 | IFLA_BR_MCAST_STARTUP_QUERY_INTVL, | |
93870cc0 NA |
271 | IFLA_BR_NF_CALL_IPTABLES, |
272 | IFLA_BR_NF_CALL_IP6TABLES, | |
273 | IFLA_BR_NF_CALL_ARPTABLES, | |
0f963b75 | 274 | IFLA_BR_VLAN_DEFAULT_PVID, |
12a0faa3 | 275 | IFLA_BR_PAD, |
6dada9b1 | 276 | IFLA_BR_VLAN_STATS_ENABLED, |
1080ab95 | 277 | IFLA_BR_MCAST_STATS_ENABLED, |
e5c3ea5c JP |
278 | __IFLA_BR_MAX, |
279 | }; | |
280 | ||
281 | #define IFLA_BR_MAX (__IFLA_BR_MAX - 1) | |
282 | ||
5127c81f NA |
283 | struct ifla_bridge_id { |
284 | __u8 prio[2]; | |
285 | __u8 addr[6]; /* ETH_ALEN */ | |
286 | }; | |
287 | ||
25c71c75 | 288 | enum { |
289 | BRIDGE_MODE_UNSPEC, | |
290 | BRIDGE_MODE_HAIRPIN, | |
291 | }; | |
292 | ||
293 | enum { | |
294 | IFLA_BRPORT_UNSPEC, | |
295 | IFLA_BRPORT_STATE, /* Spanning tree state */ | |
296 | IFLA_BRPORT_PRIORITY, /* " priority */ | |
297 | IFLA_BRPORT_COST, /* " cost */ | |
298 | IFLA_BRPORT_MODE, /* mode (hairpin) */ | |
a2e01a65 | 299 | IFLA_BRPORT_GUARD, /* bpdu guard */ |
1007dd1a | 300 | IFLA_BRPORT_PROTECT, /* root port protection */ |
c2d3babf | 301 | IFLA_BRPORT_FAST_LEAVE, /* multicast fast leave */ |
9ba18891 | 302 | IFLA_BRPORT_LEARNING, /* mac learning */ |
867a5943 | 303 | IFLA_BRPORT_UNICAST_FLOOD, /* flood unicast traffic */ |
95850116 | 304 | IFLA_BRPORT_PROXYARP, /* proxy ARP */ |
efacacda | 305 | IFLA_BRPORT_LEARNING_SYNC, /* mac learning sync from device */ |
842a9ae0 | 306 | IFLA_BRPORT_PROXYARP_WIFI, /* proxy ARP for Wi-Fi */ |
4ebc7660 | 307 | IFLA_BRPORT_ROOT_ID, /* designated root */ |
80df9a26 | 308 | IFLA_BRPORT_BRIDGE_ID, /* designated bridge */ |
96f94e7f NA |
309 | IFLA_BRPORT_DESIGNATED_PORT, |
310 | IFLA_BRPORT_DESIGNATED_COST, | |
42d452c4 NA |
311 | IFLA_BRPORT_ID, |
312 | IFLA_BRPORT_NO, | |
e08e838a NA |
313 | IFLA_BRPORT_TOPOLOGY_CHANGE_ACK, |
314 | IFLA_BRPORT_CONFIG_PENDING, | |
61c0a9a8 NA |
315 | IFLA_BRPORT_MESSAGE_AGE_TIMER, |
316 | IFLA_BRPORT_FORWARD_DELAY_TIMER, | |
317 | IFLA_BRPORT_HOLD_TIMER, | |
9b0c6e4d | 318 | IFLA_BRPORT_FLUSH, |
5d6ae479 | 319 | IFLA_BRPORT_MULTICAST_ROUTER, |
12a0faa3 | 320 | IFLA_BRPORT_PAD, |
b6cb5ac8 | 321 | IFLA_BRPORT_MCAST_FLOOD, |
25c71c75 | 322 | __IFLA_BRPORT_MAX |
323 | }; | |
324 | #define IFLA_BRPORT_MAX (__IFLA_BRPORT_MAX - 1) | |
325 | ||
607ca46e DH |
326 | struct ifla_cacheinfo { |
327 | __u32 max_reasm_len; | |
328 | __u32 tstamp; /* ipv6InterfaceTable updated timestamp */ | |
329 | __u32 reachable_time; | |
330 | __u32 retrans_time; | |
331 | }; | |
332 | ||
333 | enum { | |
334 | IFLA_INFO_UNSPEC, | |
335 | IFLA_INFO_KIND, | |
336 | IFLA_INFO_DATA, | |
337 | IFLA_INFO_XSTATS, | |
ba7d49b1 JP |
338 | IFLA_INFO_SLAVE_KIND, |
339 | IFLA_INFO_SLAVE_DATA, | |
607ca46e DH |
340 | __IFLA_INFO_MAX, |
341 | }; | |
342 | ||
343 | #define IFLA_INFO_MAX (__IFLA_INFO_MAX - 1) | |
344 | ||
345 | /* VLAN section */ | |
346 | ||
347 | enum { | |
348 | IFLA_VLAN_UNSPEC, | |
349 | IFLA_VLAN_ID, | |
350 | IFLA_VLAN_FLAGS, | |
351 | IFLA_VLAN_EGRESS_QOS, | |
352 | IFLA_VLAN_INGRESS_QOS, | |
8ad227ff | 353 | IFLA_VLAN_PROTOCOL, |
607ca46e DH |
354 | __IFLA_VLAN_MAX, |
355 | }; | |
356 | ||
357 | #define IFLA_VLAN_MAX (__IFLA_VLAN_MAX - 1) | |
358 | ||
359 | struct ifla_vlan_flags { | |
360 | __u32 flags; | |
361 | __u32 mask; | |
362 | }; | |
363 | ||
364 | enum { | |
365 | IFLA_VLAN_QOS_UNSPEC, | |
366 | IFLA_VLAN_QOS_MAPPING, | |
367 | __IFLA_VLAN_QOS_MAX | |
368 | }; | |
369 | ||
370 | #define IFLA_VLAN_QOS_MAX (__IFLA_VLAN_QOS_MAX - 1) | |
371 | ||
372 | struct ifla_vlan_qos_mapping { | |
373 | __u32 from; | |
374 | __u32 to; | |
375 | }; | |
376 | ||
377 | /* MACVLAN section */ | |
378 | enum { | |
379 | IFLA_MACVLAN_UNSPEC, | |
380 | IFLA_MACVLAN_MODE, | |
381 | IFLA_MACVLAN_FLAGS, | |
79cf79ab MB |
382 | IFLA_MACVLAN_MACADDR_MODE, |
383 | IFLA_MACVLAN_MACADDR, | |
384 | IFLA_MACVLAN_MACADDR_DATA, | |
385 | IFLA_MACVLAN_MACADDR_COUNT, | |
607ca46e DH |
386 | __IFLA_MACVLAN_MAX, |
387 | }; | |
388 | ||
389 | #define IFLA_MACVLAN_MAX (__IFLA_MACVLAN_MAX - 1) | |
390 | ||
391 | enum macvlan_mode { | |
392 | MACVLAN_MODE_PRIVATE = 1, /* don't talk to other macvlans */ | |
393 | MACVLAN_MODE_VEPA = 2, /* talk to other ports through ext bridge */ | |
394 | MACVLAN_MODE_BRIDGE = 4, /* talk to bridge ports directly */ | |
395 | MACVLAN_MODE_PASSTHRU = 8,/* take over the underlying device */ | |
79cf79ab MB |
396 | MACVLAN_MODE_SOURCE = 16,/* use source MAC address list to assign */ |
397 | }; | |
398 | ||
399 | enum macvlan_macaddr_mode { | |
400 | MACVLAN_MACADDR_ADD, | |
401 | MACVLAN_MACADDR_DEL, | |
402 | MACVLAN_MACADDR_FLUSH, | |
403 | MACVLAN_MACADDR_SET, | |
607ca46e DH |
404 | }; |
405 | ||
406 | #define MACVLAN_FLAG_NOPROMISC 1 | |
407 | ||
4e3c8992 DA |
408 | /* VRF section */ |
409 | enum { | |
410 | IFLA_VRF_UNSPEC, | |
411 | IFLA_VRF_TABLE, | |
412 | __IFLA_VRF_MAX | |
413 | }; | |
414 | ||
415 | #define IFLA_VRF_MAX (__IFLA_VRF_MAX - 1) | |
416 | ||
67eb0331 DA |
417 | enum { |
418 | IFLA_VRF_PORT_UNSPEC, | |
419 | IFLA_VRF_PORT_TABLE, | |
420 | __IFLA_VRF_PORT_MAX | |
421 | }; | |
422 | ||
423 | #define IFLA_VRF_PORT_MAX (__IFLA_VRF_PORT_MAX - 1) | |
424 | ||
dece8d2b SD |
425 | /* MACSEC section */ |
426 | enum { | |
427 | IFLA_MACSEC_UNSPEC, | |
428 | IFLA_MACSEC_SCI, | |
429 | IFLA_MACSEC_PORT, | |
430 | IFLA_MACSEC_ICV_LEN, | |
431 | IFLA_MACSEC_CIPHER_SUITE, | |
432 | IFLA_MACSEC_WINDOW, | |
433 | IFLA_MACSEC_ENCODING_SA, | |
434 | IFLA_MACSEC_ENCRYPT, | |
435 | IFLA_MACSEC_PROTECT, | |
436 | IFLA_MACSEC_INC_SCI, | |
437 | IFLA_MACSEC_ES, | |
438 | IFLA_MACSEC_SCB, | |
439 | IFLA_MACSEC_REPLAY_PROTECT, | |
440 | IFLA_MACSEC_VALIDATION, | |
f60d94c0 | 441 | IFLA_MACSEC_PAD, |
dece8d2b SD |
442 | __IFLA_MACSEC_MAX, |
443 | }; | |
444 | ||
445 | #define IFLA_MACSEC_MAX (__IFLA_MACSEC_MAX - 1) | |
446 | ||
447 | enum macsec_validation_type { | |
448 | MACSEC_VALIDATE_DISABLED = 0, | |
449 | MACSEC_VALIDATE_CHECK = 1, | |
450 | MACSEC_VALIDATE_STRICT = 2, | |
451 | __MACSEC_VALIDATE_END, | |
452 | MACSEC_VALIDATE_MAX = __MACSEC_VALIDATE_END - 1, | |
453 | }; | |
454 | ||
2ad7bf36 MB |
455 | /* IPVLAN section */ |
456 | enum { | |
457 | IFLA_IPVLAN_UNSPEC, | |
458 | IFLA_IPVLAN_MODE, | |
459 | __IFLA_IPVLAN_MAX | |
460 | }; | |
461 | ||
462 | #define IFLA_IPVLAN_MAX (__IFLA_IPVLAN_MAX - 1) | |
463 | ||
464 | enum ipvlan_mode { | |
465 | IPVLAN_MODE_L2 = 0, | |
466 | IPVLAN_MODE_L3, | |
467 | IPVLAN_MODE_MAX | |
468 | }; | |
469 | ||
607ca46e DH |
470 | /* VXLAN section */ |
471 | enum { | |
472 | IFLA_VXLAN_UNSPEC, | |
473 | IFLA_VXLAN_ID, | |
5d174dd8 | 474 | IFLA_VXLAN_GROUP, /* group or remote address */ |
607ca46e DH |
475 | IFLA_VXLAN_LINK, |
476 | IFLA_VXLAN_LOCAL, | |
477 | IFLA_VXLAN_TTL, | |
478 | IFLA_VXLAN_TOS, | |
479 | IFLA_VXLAN_LEARNING, | |
480 | IFLA_VXLAN_AGEING, | |
481 | IFLA_VXLAN_LIMIT, | |
823aa873 | 482 | IFLA_VXLAN_PORT_RANGE, /* source port */ |
e4f67add DS |
483 | IFLA_VXLAN_PROXY, |
484 | IFLA_VXLAN_RSC, | |
485 | IFLA_VXLAN_L2MISS, | |
486 | IFLA_VXLAN_L3MISS, | |
823aa873 | 487 | IFLA_VXLAN_PORT, /* destination port */ |
e4c7ed41 CW |
488 | IFLA_VXLAN_GROUP6, |
489 | IFLA_VXLAN_LOCAL6, | |
359a0ea9 TH |
490 | IFLA_VXLAN_UDP_CSUM, |
491 | IFLA_VXLAN_UDP_ZERO_CSUM6_TX, | |
492 | IFLA_VXLAN_UDP_ZERO_CSUM6_RX, | |
dfd8645e TH |
493 | IFLA_VXLAN_REMCSUM_TX, |
494 | IFLA_VXLAN_REMCSUM_RX, | |
3511494c | 495 | IFLA_VXLAN_GBP, |
0ace2ca8 | 496 | IFLA_VXLAN_REMCSUM_NOPARTIAL, |
f8a9b1bc | 497 | IFLA_VXLAN_COLLECT_METADATA, |
e7f70af1 | 498 | IFLA_VXLAN_LABEL, |
e1e5314d | 499 | IFLA_VXLAN_GPE, |
607ca46e DH |
500 | __IFLA_VXLAN_MAX |
501 | }; | |
502 | #define IFLA_VXLAN_MAX (__IFLA_VXLAN_MAX - 1) | |
503 | ||
504 | struct ifla_vxlan_port_range { | |
505 | __be16 low; | |
506 | __be16 high; | |
507 | }; | |
508 | ||
2d07dc79 JL |
509 | /* GENEVE section */ |
510 | enum { | |
511 | IFLA_GENEVE_UNSPEC, | |
512 | IFLA_GENEVE_ID, | |
513 | IFLA_GENEVE_REMOTE, | |
8760ce58 | 514 | IFLA_GENEVE_TTL, |
d8951125 | 515 | IFLA_GENEVE_TOS, |
cd7918b3 | 516 | IFLA_GENEVE_PORT, /* destination port */ |
e305ac6c | 517 | IFLA_GENEVE_COLLECT_METADATA, |
8ed66f0e | 518 | IFLA_GENEVE_REMOTE6, |
abe492b4 TH |
519 | IFLA_GENEVE_UDP_CSUM, |
520 | IFLA_GENEVE_UDP_ZERO_CSUM6_TX, | |
521 | IFLA_GENEVE_UDP_ZERO_CSUM6_RX, | |
8eb3b995 | 522 | IFLA_GENEVE_LABEL, |
2d07dc79 JL |
523 | __IFLA_GENEVE_MAX |
524 | }; | |
525 | #define IFLA_GENEVE_MAX (__IFLA_GENEVE_MAX - 1) | |
526 | ||
96d934c7 GN |
527 | /* PPP section */ |
528 | enum { | |
529 | IFLA_PPP_UNSPEC, | |
530 | IFLA_PPP_DEV_FD, | |
531 | __IFLA_PPP_MAX | |
532 | }; | |
533 | #define IFLA_PPP_MAX (__IFLA_PPP_MAX - 1) | |
534 | ||
459aa660 PN |
535 | /* GTP section */ |
536 | enum { | |
537 | IFLA_GTP_UNSPEC, | |
538 | IFLA_GTP_FD0, | |
539 | IFLA_GTP_FD1, | |
540 | IFLA_GTP_PDP_HASHSIZE, | |
541 | __IFLA_GTP_MAX, | |
542 | }; | |
543 | #define IFLA_GTP_MAX (__IFLA_GTP_MAX - 1) | |
544 | ||
90af2311 JP |
545 | /* Bonding section */ |
546 | ||
547 | enum { | |
548 | IFLA_BOND_UNSPEC, | |
549 | IFLA_BOND_MODE, | |
ec76aa49 | 550 | IFLA_BOND_ACTIVE_SLAVE, |
eecdaa6e | 551 | IFLA_BOND_MIIMON, |
25852e29 | 552 | IFLA_BOND_UPDELAY, |
c7461f9b | 553 | IFLA_BOND_DOWNDELAY, |
9f53e14e | 554 | IFLA_BOND_USE_CARRIER, |
06151dbc | 555 | IFLA_BOND_ARP_INTERVAL, |
7f28fa10 | 556 | IFLA_BOND_ARP_IP_TARGET, |
29c49482 | 557 | IFLA_BOND_ARP_VALIDATE, |
d5c84254 | 558 | IFLA_BOND_ARP_ALL_TARGETS, |
0a98a0d1 | 559 | IFLA_BOND_PRIMARY, |
8a41ae44 | 560 | IFLA_BOND_PRIMARY_RESELECT, |
89901972 | 561 | IFLA_BOND_FAIL_OVER_MAC, |
f70161c6 | 562 | IFLA_BOND_XMIT_HASH_POLICY, |
d8838de7 | 563 | IFLA_BOND_RESEND_IGMP, |
2c9839c1 | 564 | IFLA_BOND_NUM_PEER_NOTIF, |
1cc0b1e3 | 565 | IFLA_BOND_ALL_SLAVES_ACTIVE, |
7d101008 | 566 | IFLA_BOND_MIN_LINKS, |
8d836d09 | 567 | IFLA_BOND_LP_INTERVAL, |
c13ab3ff | 568 | IFLA_BOND_PACKETS_PER_SLAVE, |
998e40bb | 569 | IFLA_BOND_AD_LACP_RATE, |
ec029fac | 570 | IFLA_BOND_AD_SELECT, |
4ee7ac75 | 571 | IFLA_BOND_AD_INFO, |
171a42c3 AG |
572 | IFLA_BOND_AD_ACTOR_SYS_PRIO, |
573 | IFLA_BOND_AD_USER_PORT_KEY, | |
574 | IFLA_BOND_AD_ACTOR_SYSTEM, | |
0f7bffd9 | 575 | IFLA_BOND_TLB_DYNAMIC_LB, |
90af2311 JP |
576 | __IFLA_BOND_MAX, |
577 | }; | |
578 | ||
579 | #define IFLA_BOND_MAX (__IFLA_BOND_MAX - 1) | |
580 | ||
4ee7ac75 | 581 | enum { |
237266f7 | 582 | IFLA_BOND_AD_INFO_UNSPEC, |
4ee7ac75 | 583 | IFLA_BOND_AD_INFO_AGGREGATOR, |
584 | IFLA_BOND_AD_INFO_NUM_PORTS, | |
585 | IFLA_BOND_AD_INFO_ACTOR_KEY, | |
586 | IFLA_BOND_AD_INFO_PARTNER_KEY, | |
587 | IFLA_BOND_AD_INFO_PARTNER_MAC, | |
588 | __IFLA_BOND_AD_INFO_MAX, | |
589 | }; | |
590 | ||
591 | #define IFLA_BOND_AD_INFO_MAX (__IFLA_BOND_AD_INFO_MAX - 1) | |
592 | ||
1d3ee88a | 593 | enum { |
df7dbcbb JP |
594 | IFLA_BOND_SLAVE_UNSPEC, |
595 | IFLA_BOND_SLAVE_STATE, | |
596 | IFLA_BOND_SLAVE_MII_STATUS, | |
597 | IFLA_BOND_SLAVE_LINK_FAILURE_COUNT, | |
598 | IFLA_BOND_SLAVE_PERM_HWADDR, | |
599 | IFLA_BOND_SLAVE_QUEUE_ID, | |
600 | IFLA_BOND_SLAVE_AD_AGGREGATOR_ID, | |
254cb6db | 601 | IFLA_BOND_SLAVE_AD_ACTOR_OPER_PORT_STATE, |
46ea297e | 602 | IFLA_BOND_SLAVE_AD_PARTNER_OPER_PORT_STATE, |
df7dbcbb | 603 | __IFLA_BOND_SLAVE_MAX, |
1d3ee88a | 604 | }; |
605 | ||
df7dbcbb | 606 | #define IFLA_BOND_SLAVE_MAX (__IFLA_BOND_SLAVE_MAX - 1) |
1d3ee88a | 607 | |
607ca46e DH |
608 | /* SR-IOV virtual function management section */ |
609 | ||
610 | enum { | |
611 | IFLA_VF_INFO_UNSPEC, | |
612 | IFLA_VF_INFO, | |
613 | __IFLA_VF_INFO_MAX, | |
614 | }; | |
615 | ||
616 | #define IFLA_VF_INFO_MAX (__IFLA_VF_INFO_MAX - 1) | |
617 | ||
618 | enum { | |
619 | IFLA_VF_UNSPEC, | |
620 | IFLA_VF_MAC, /* Hardware queue specific attributes */ | |
621 | IFLA_VF_VLAN, | |
ed616689 | 622 | IFLA_VF_TX_RATE, /* Max TX Bandwidth Allocation */ |
607ca46e | 623 | IFLA_VF_SPOOFCHK, /* Spoof Checking on/off switch */ |
1d8faf48 | 624 | IFLA_VF_LINK_STATE, /* link state enable/disable/auto switch */ |
ed616689 | 625 | IFLA_VF_RATE, /* Min and Max TX Bandwidth Allocation */ |
01a3d796 VZ |
626 | IFLA_VF_RSS_QUERY_EN, /* RSS Redirection Table and Hash Key query |
627 | * on/off switch | |
628 | */ | |
3b766cd8 | 629 | IFLA_VF_STATS, /* network device statistics */ |
dd461d6a | 630 | IFLA_VF_TRUST, /* Trust VF */ |
cc8e27cc EC |
631 | IFLA_VF_IB_NODE_GUID, /* VF Infiniband node GUID */ |
632 | IFLA_VF_IB_PORT_GUID, /* VF Infiniband port GUID */ | |
607ca46e DH |
633 | __IFLA_VF_MAX, |
634 | }; | |
635 | ||
636 | #define IFLA_VF_MAX (__IFLA_VF_MAX - 1) | |
637 | ||
638 | struct ifla_vf_mac { | |
639 | __u32 vf; | |
640 | __u8 mac[32]; /* MAX_ADDR_LEN */ | |
641 | }; | |
642 | ||
643 | struct ifla_vf_vlan { | |
644 | __u32 vf; | |
645 | __u32 vlan; /* 0 - 4095, 0 disables VLAN filter */ | |
646 | __u32 qos; | |
647 | }; | |
648 | ||
649 | struct ifla_vf_tx_rate { | |
650 | __u32 vf; | |
651 | __u32 rate; /* Max TX bandwidth in Mbps, 0 disables throttling */ | |
652 | }; | |
653 | ||
ed616689 SC |
654 | struct ifla_vf_rate { |
655 | __u32 vf; | |
656 | __u32 min_tx_rate; /* Min Bandwidth in Mbps */ | |
657 | __u32 max_tx_rate; /* Max Bandwidth in Mbps */ | |
658 | }; | |
659 | ||
607ca46e DH |
660 | struct ifla_vf_spoofchk { |
661 | __u32 vf; | |
662 | __u32 setting; | |
663 | }; | |
664 | ||
cc8e27cc EC |
665 | struct ifla_vf_guid { |
666 | __u32 vf; | |
667 | __u64 guid; | |
668 | }; | |
669 | ||
1d8faf48 RE |
670 | enum { |
671 | IFLA_VF_LINK_STATE_AUTO, /* link state of the uplink */ | |
672 | IFLA_VF_LINK_STATE_ENABLE, /* link always up */ | |
673 | IFLA_VF_LINK_STATE_DISABLE, /* link always down */ | |
674 | __IFLA_VF_LINK_STATE_MAX, | |
675 | }; | |
676 | ||
677 | struct ifla_vf_link_state { | |
678 | __u32 vf; | |
679 | __u32 link_state; | |
680 | }; | |
681 | ||
01a3d796 VZ |
682 | struct ifla_vf_rss_query_en { |
683 | __u32 vf; | |
684 | __u32 setting; | |
685 | }; | |
686 | ||
3b766cd8 EBE |
687 | enum { |
688 | IFLA_VF_STATS_RX_PACKETS, | |
689 | IFLA_VF_STATS_TX_PACKETS, | |
690 | IFLA_VF_STATS_RX_BYTES, | |
691 | IFLA_VF_STATS_TX_BYTES, | |
692 | IFLA_VF_STATS_BROADCAST, | |
693 | IFLA_VF_STATS_MULTICAST, | |
343a6d8e | 694 | IFLA_VF_STATS_PAD, |
3b766cd8 EBE |
695 | __IFLA_VF_STATS_MAX, |
696 | }; | |
697 | ||
698 | #define IFLA_VF_STATS_MAX (__IFLA_VF_STATS_MAX - 1) | |
699 | ||
dd461d6a HS |
700 | struct ifla_vf_trust { |
701 | __u32 vf; | |
702 | __u32 setting; | |
703 | }; | |
704 | ||
607ca46e DH |
705 | /* VF ports management section |
706 | * | |
707 | * Nested layout of set/get msg is: | |
708 | * | |
709 | * [IFLA_NUM_VF] | |
710 | * [IFLA_VF_PORTS] | |
711 | * [IFLA_VF_PORT] | |
712 | * [IFLA_PORT_*], ... | |
713 | * [IFLA_VF_PORT] | |
714 | * [IFLA_PORT_*], ... | |
715 | * ... | |
716 | * [IFLA_PORT_SELF] | |
717 | * [IFLA_PORT_*], ... | |
718 | */ | |
719 | ||
720 | enum { | |
721 | IFLA_VF_PORT_UNSPEC, | |
722 | IFLA_VF_PORT, /* nest */ | |
723 | __IFLA_VF_PORT_MAX, | |
724 | }; | |
725 | ||
726 | #define IFLA_VF_PORT_MAX (__IFLA_VF_PORT_MAX - 1) | |
727 | ||
728 | enum { | |
729 | IFLA_PORT_UNSPEC, | |
730 | IFLA_PORT_VF, /* __u32 */ | |
731 | IFLA_PORT_PROFILE, /* string */ | |
732 | IFLA_PORT_VSI_TYPE, /* 802.1Qbg (pre-)standard VDP */ | |
733 | IFLA_PORT_INSTANCE_UUID, /* binary UUID */ | |
734 | IFLA_PORT_HOST_UUID, /* binary UUID */ | |
735 | IFLA_PORT_REQUEST, /* __u8 */ | |
736 | IFLA_PORT_RESPONSE, /* __u16, output only */ | |
737 | __IFLA_PORT_MAX, | |
738 | }; | |
739 | ||
740 | #define IFLA_PORT_MAX (__IFLA_PORT_MAX - 1) | |
741 | ||
742 | #define PORT_PROFILE_MAX 40 | |
743 | #define PORT_UUID_MAX 16 | |
744 | #define PORT_SELF_VF -1 | |
745 | ||
746 | enum { | |
747 | PORT_REQUEST_PREASSOCIATE = 0, | |
748 | PORT_REQUEST_PREASSOCIATE_RR, | |
749 | PORT_REQUEST_ASSOCIATE, | |
750 | PORT_REQUEST_DISASSOCIATE, | |
751 | }; | |
752 | ||
753 | enum { | |
754 | PORT_VDP_RESPONSE_SUCCESS = 0, | |
755 | PORT_VDP_RESPONSE_INVALID_FORMAT, | |
756 | PORT_VDP_RESPONSE_INSUFFICIENT_RESOURCES, | |
757 | PORT_VDP_RESPONSE_UNUSED_VTID, | |
758 | PORT_VDP_RESPONSE_VTID_VIOLATION, | |
759 | PORT_VDP_RESPONSE_VTID_VERSION_VIOALTION, | |
760 | PORT_VDP_RESPONSE_OUT_OF_SYNC, | |
761 | /* 0x08-0xFF reserved for future VDP use */ | |
762 | PORT_PROFILE_RESPONSE_SUCCESS = 0x100, | |
763 | PORT_PROFILE_RESPONSE_INPROGRESS, | |
764 | PORT_PROFILE_RESPONSE_INVALID, | |
765 | PORT_PROFILE_RESPONSE_BADSTATE, | |
766 | PORT_PROFILE_RESPONSE_INSUFFICIENT_RESOURCES, | |
767 | PORT_PROFILE_RESPONSE_ERROR, | |
768 | }; | |
769 | ||
770 | struct ifla_port_vsi { | |
771 | __u8 vsi_mgr_id; | |
772 | __u8 vsi_type_id[3]; | |
773 | __u8 vsi_type_version; | |
774 | __u8 pad[3]; | |
775 | }; | |
776 | ||
777 | ||
778 | /* IPoIB section */ | |
779 | ||
780 | enum { | |
781 | IFLA_IPOIB_UNSPEC, | |
782 | IFLA_IPOIB_PKEY, | |
783 | IFLA_IPOIB_MODE, | |
784 | IFLA_IPOIB_UMCAST, | |
785 | __IFLA_IPOIB_MAX | |
786 | }; | |
787 | ||
788 | enum { | |
789 | IPOIB_MODE_DATAGRAM = 0, /* using unreliable datagram QPs */ | |
790 | IPOIB_MODE_CONNECTED = 1, /* using connected QPs */ | |
791 | }; | |
792 | ||
793 | #define IFLA_IPOIB_MAX (__IFLA_IPOIB_MAX - 1) | |
794 | ||
f421436a AB |
795 | |
796 | /* HSR section */ | |
797 | ||
798 | enum { | |
799 | IFLA_HSR_UNSPEC, | |
800 | IFLA_HSR_SLAVE1, | |
801 | IFLA_HSR_SLAVE2, | |
98bf8362 AB |
802 | IFLA_HSR_MULTICAST_SPEC, /* Last byte of supervision addr */ |
803 | IFLA_HSR_SUPERVISION_ADDR, /* Supervision frame multicast addr */ | |
804 | IFLA_HSR_SEQ_NR, | |
b84e9307 | 805 | IFLA_HSR_VERSION, /* HSR version */ |
f421436a AB |
806 | __IFLA_HSR_MAX, |
807 | }; | |
808 | ||
809 | #define IFLA_HSR_MAX (__IFLA_HSR_MAX - 1) | |
810 | ||
10c9ead9 RP |
811 | /* STATS section */ |
812 | ||
813 | struct if_stats_msg { | |
814 | __u8 family; | |
815 | __u8 pad1; | |
816 | __u16 pad2; | |
817 | __u32 ifindex; | |
818 | __u32 filter_mask; | |
819 | }; | |
820 | ||
821 | /* A stats attribute can be netdev specific or a global stat. | |
822 | * For netdev stats, lets use the prefix IFLA_STATS_LINK_* | |
823 | */ | |
824 | enum { | |
825 | IFLA_STATS_UNSPEC, /* also used as 64bit pad attribute */ | |
826 | IFLA_STATS_LINK_64, | |
97a47fac | 827 | IFLA_STATS_LINK_XSTATS, |
80e73cc5 | 828 | IFLA_STATS_LINK_XSTATS_SLAVE, |
10c9ead9 RP |
829 | __IFLA_STATS_MAX, |
830 | }; | |
831 | ||
832 | #define IFLA_STATS_MAX (__IFLA_STATS_MAX - 1) | |
833 | ||
834 | #define IFLA_STATS_FILTER_BIT(ATTR) (1 << (ATTR - 1)) | |
835 | ||
97a47fac NA |
836 | /* These are embedded into IFLA_STATS_LINK_XSTATS: |
837 | * [IFLA_STATS_LINK_XSTATS] | |
838 | * -> [LINK_XSTATS_TYPE_xxx] | |
839 | * -> [rtnl link type specific attributes] | |
840 | */ | |
841 | enum { | |
842 | LINK_XSTATS_TYPE_UNSPEC, | |
a60c0903 | 843 | LINK_XSTATS_TYPE_BRIDGE, |
97a47fac NA |
844 | __LINK_XSTATS_TYPE_MAX |
845 | }; | |
846 | #define LINK_XSTATS_TYPE_MAX (__LINK_XSTATS_TYPE_MAX - 1) | |
847 | ||
d1fdd913 BB |
848 | /* XDP section */ |
849 | ||
850 | enum { | |
851 | IFLA_XDP_UNSPEC, | |
852 | IFLA_XDP_FD, | |
853 | IFLA_XDP_ATTACHED, | |
854 | __IFLA_XDP_MAX, | |
855 | }; | |
856 | ||
857 | #define IFLA_XDP_MAX (__IFLA_XDP_MAX - 1) | |
858 | ||
607ca46e | 859 | #endif /* _UAPI_LINUX_IF_LINK_H */ |