if_link.h revision 8cb52b056cfc302e05304d847c4228dff15715cf
1/****************************************************************************
2 ****************************************************************************
3 ***
4 ***   This header was automatically generated from a Linux kernel header
5 ***   of the same name, to make information necessary for userspace to
6 ***   call into the kernel available to libc.  It contains only constants,
7 ***   structures, and macros generated from the original header, and thus,
8 ***   contains no copyrightable information.
9 ***
10 ***   To edit the content of this header, modify the corresponding
11 ***   source file (e.g. under external/kernel-headers/original/) then
12 ***   run bionic/libc/kernel/tools/update_all.py
13 ***
14 ***   Any manual change here will be lost the next time this script will
15 ***   be run. You've been warned!
16 ***
17 ****************************************************************************
18 ****************************************************************************/
19#ifndef _UAPI_LINUX_IF_LINK_H
20#define _UAPI_LINUX_IF_LINK_H
21#include <linux/types.h>
22#include <linux/netlink.h>
23/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
24struct rtnl_link_stats {
25 __u32 rx_packets;
26 __u32 tx_packets;
27 __u32 rx_bytes;
28/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
29 __u32 tx_bytes;
30 __u32 rx_errors;
31 __u32 tx_errors;
32 __u32 rx_dropped;
33/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
34 __u32 tx_dropped;
35 __u32 multicast;
36 __u32 collisions;
37 __u32 rx_length_errors;
38/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
39 __u32 rx_over_errors;
40 __u32 rx_crc_errors;
41 __u32 rx_frame_errors;
42 __u32 rx_fifo_errors;
43/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
44 __u32 rx_missed_errors;
45 __u32 tx_aborted_errors;
46 __u32 tx_carrier_errors;
47 __u32 tx_fifo_errors;
48/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
49 __u32 tx_heartbeat_errors;
50 __u32 tx_window_errors;
51 __u32 rx_compressed;
52 __u32 tx_compressed;
53/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
54};
55struct rtnl_link_stats64 {
56 __u64 rx_packets;
57 __u64 tx_packets;
58/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
59 __u64 rx_bytes;
60 __u64 tx_bytes;
61 __u64 rx_errors;
62 __u64 tx_errors;
63/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
64 __u64 rx_dropped;
65 __u64 tx_dropped;
66 __u64 multicast;
67 __u64 collisions;
68/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
69 __u64 rx_length_errors;
70 __u64 rx_over_errors;
71 __u64 rx_crc_errors;
72 __u64 rx_frame_errors;
73/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
74 __u64 rx_fifo_errors;
75 __u64 rx_missed_errors;
76 __u64 tx_aborted_errors;
77 __u64 tx_carrier_errors;
78/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
79 __u64 tx_fifo_errors;
80 __u64 tx_heartbeat_errors;
81 __u64 tx_window_errors;
82 __u64 rx_compressed;
83/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
84 __u64 tx_compressed;
85};
86struct rtnl_link_ifmap {
87 __u64 mem_start;
88/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
89 __u64 mem_end;
90 __u64 base_addr;
91 __u16 irq;
92 __u8 dma;
93/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
94 __u8 port;
95};
96enum {
97 IFLA_UNSPEC,
98/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
99 IFLA_ADDRESS,
100 IFLA_BROADCAST,
101 IFLA_IFNAME,
102 IFLA_MTU,
103/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
104 IFLA_LINK,
105 IFLA_QDISC,
106 IFLA_STATS,
107 IFLA_COST,
108/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
109#define IFLA_COST IFLA_COST
110 IFLA_PRIORITY,
111#define IFLA_PRIORITY IFLA_PRIORITY
112 IFLA_MASTER,
113/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
114#define IFLA_MASTER IFLA_MASTER
115 IFLA_WIRELESS,
116#define IFLA_WIRELESS IFLA_WIRELESS
117 IFLA_PROTINFO,
118/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
119#define IFLA_PROTINFO IFLA_PROTINFO
120 IFLA_TXQLEN,
121#define IFLA_TXQLEN IFLA_TXQLEN
122 IFLA_MAP,
123/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
124#define IFLA_MAP IFLA_MAP
125 IFLA_WEIGHT,
126#define IFLA_WEIGHT IFLA_WEIGHT
127 IFLA_OPERSTATE,
128/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
129 IFLA_LINKMODE,
130 IFLA_LINKINFO,
131#define IFLA_LINKINFO IFLA_LINKINFO
132 IFLA_NET_NS_PID,
133/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
134 IFLA_IFALIAS,
135 IFLA_NUM_VF,
136 IFLA_VFINFO_LIST,
137 IFLA_STATS64,
138/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
139 IFLA_VF_PORTS,
140 IFLA_PORT_SELF,
141 IFLA_AF_SPEC,
142 IFLA_GROUP,
143/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
144 IFLA_NET_NS_FD,
145 IFLA_EXT_MASK,
146 IFLA_PROMISCUITY,
147#define IFLA_PROMISCUITY IFLA_PROMISCUITY
148/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
149 IFLA_NUM_TX_QUEUES,
150 IFLA_NUM_RX_QUEUES,
151 IFLA_CARRIER,
152 __IFLA_MAX
153/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
154};
155#define IFLA_MAX (__IFLA_MAX - 1)
156#define IFLA_RTA(r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ifinfomsg))))
157#define IFLA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct ifinfomsg))
158/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
159enum {
160 IFLA_INET_UNSPEC,
161 IFLA_INET_CONF,
162 __IFLA_INET_MAX,
163/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
164};
165#define IFLA_INET_MAX (__IFLA_INET_MAX - 1)
166enum {
167 IFLA_INET6_UNSPEC,
168/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
169 IFLA_INET6_FLAGS,
170 IFLA_INET6_CONF,
171 IFLA_INET6_STATS,
172 IFLA_INET6_MCAST,
173/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
174 IFLA_INET6_CACHEINFO,
175 IFLA_INET6_ICMP6STATS,
176 IFLA_INET6_TOKEN,
177 __IFLA_INET6_MAX
178/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
179};
180#define IFLA_INET6_MAX (__IFLA_INET6_MAX - 1)
181enum {
182 BRIDGE_MODE_UNSPEC,
183/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
184 BRIDGE_MODE_HAIRPIN,
185};
186enum {
187 IFLA_BRPORT_UNSPEC,
188/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
189 IFLA_BRPORT_STATE,
190 IFLA_BRPORT_PRIORITY,
191 IFLA_BRPORT_COST,
192 IFLA_BRPORT_MODE,
193/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
194 IFLA_BRPORT_GUARD,
195 IFLA_BRPORT_PROTECT,
196 IFLA_BRPORT_FAST_LEAVE,
197 __IFLA_BRPORT_MAX
198/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
199};
200#define IFLA_BRPORT_MAX (__IFLA_BRPORT_MAX - 1)
201struct ifla_cacheinfo {
202 __u32 max_reasm_len;
203/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
204 __u32 tstamp;
205 __u32 reachable_time;
206 __u32 retrans_time;
207};
208/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
209enum {
210 IFLA_INFO_UNSPEC,
211 IFLA_INFO_KIND,
212 IFLA_INFO_DATA,
213/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
214 IFLA_INFO_XSTATS,
215 __IFLA_INFO_MAX,
216};
217#define IFLA_INFO_MAX (__IFLA_INFO_MAX - 1)
218/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
219enum {
220 IFLA_VLAN_UNSPEC,
221 IFLA_VLAN_ID,
222 IFLA_VLAN_FLAGS,
223/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
224 IFLA_VLAN_EGRESS_QOS,
225 IFLA_VLAN_INGRESS_QOS,
226 IFLA_VLAN_PROTOCOL,
227 __IFLA_VLAN_MAX,
228/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
229};
230#define IFLA_VLAN_MAX (__IFLA_VLAN_MAX - 1)
231struct ifla_vlan_flags {
232 __u32 flags;
233/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
234 __u32 mask;
235};
236enum {
237 IFLA_VLAN_QOS_UNSPEC,
238/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
239 IFLA_VLAN_QOS_MAPPING,
240 __IFLA_VLAN_QOS_MAX
241};
242#define IFLA_VLAN_QOS_MAX (__IFLA_VLAN_QOS_MAX - 1)
243/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
244struct ifla_vlan_qos_mapping {
245 __u32 from;
246 __u32 to;
247};
248/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
249enum {
250 IFLA_MACVLAN_UNSPEC,
251 IFLA_MACVLAN_MODE,
252 IFLA_MACVLAN_FLAGS,
253/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
254 __IFLA_MACVLAN_MAX,
255};
256#define IFLA_MACVLAN_MAX (__IFLA_MACVLAN_MAX - 1)
257enum macvlan_mode {
258/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
259 MACVLAN_MODE_PRIVATE = 1,
260 MACVLAN_MODE_VEPA = 2,
261 MACVLAN_MODE_BRIDGE = 4,
262 MACVLAN_MODE_PASSTHRU = 8,
263/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
264};
265#define MACVLAN_FLAG_NOPROMISC 1
266enum {
267 IFLA_VXLAN_UNSPEC,
268/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
269 IFLA_VXLAN_ID,
270 IFLA_VXLAN_GROUP,
271 IFLA_VXLAN_LINK,
272 IFLA_VXLAN_LOCAL,
273/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
274 IFLA_VXLAN_TTL,
275 IFLA_VXLAN_TOS,
276 IFLA_VXLAN_LEARNING,
277 IFLA_VXLAN_AGEING,
278/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
279 IFLA_VXLAN_LIMIT,
280 IFLA_VXLAN_PORT_RANGE,
281 IFLA_VXLAN_PROXY,
282 IFLA_VXLAN_RSC,
283/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
284 IFLA_VXLAN_L2MISS,
285 IFLA_VXLAN_L3MISS,
286 IFLA_VXLAN_PORT,
287 __IFLA_VXLAN_MAX
288/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
289};
290#define IFLA_VXLAN_MAX (__IFLA_VXLAN_MAX - 1)
291struct ifla_vxlan_port_range {
292 __be16 low;
293/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
294 __be16 high;
295};
296enum {
297 IFLA_VF_INFO_UNSPEC,
298/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
299 IFLA_VF_INFO,
300 __IFLA_VF_INFO_MAX,
301};
302#define IFLA_VF_INFO_MAX (__IFLA_VF_INFO_MAX - 1)
303/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
304enum {
305 IFLA_VF_UNSPEC,
306 IFLA_VF_MAC,
307 IFLA_VF_VLAN,
308/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
309 IFLA_VF_TX_RATE,
310 IFLA_VF_SPOOFCHK,
311 __IFLA_VF_MAX,
312};
313/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
314#define IFLA_VF_MAX (__IFLA_VF_MAX - 1)
315struct ifla_vf_mac {
316 __u32 vf;
317 __u8 mac[32];
318/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
319};
320struct ifla_vf_vlan {
321 __u32 vf;
322 __u32 vlan;
323/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
324 __u32 qos;
325};
326struct ifla_vf_tx_rate {
327 __u32 vf;
328/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
329 __u32 rate;
330};
331struct ifla_vf_spoofchk {
332 __u32 vf;
333/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
334 __u32 setting;
335};
336enum {
337 IFLA_VF_PORT_UNSPEC,
338/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
339 IFLA_VF_PORT,
340 __IFLA_VF_PORT_MAX,
341};
342#define IFLA_VF_PORT_MAX (__IFLA_VF_PORT_MAX - 1)
343/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
344enum {
345 IFLA_PORT_UNSPEC,
346 IFLA_PORT_VF,
347 IFLA_PORT_PROFILE,
348/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
349 IFLA_PORT_VSI_TYPE,
350 IFLA_PORT_INSTANCE_UUID,
351 IFLA_PORT_HOST_UUID,
352 IFLA_PORT_REQUEST,
353/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
354 IFLA_PORT_RESPONSE,
355 __IFLA_PORT_MAX,
356};
357#define IFLA_PORT_MAX (__IFLA_PORT_MAX - 1)
358/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
359#define PORT_PROFILE_MAX 40
360#define PORT_UUID_MAX 16
361#define PORT_SELF_VF -1
362enum {
363/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
364 PORT_REQUEST_PREASSOCIATE = 0,
365 PORT_REQUEST_PREASSOCIATE_RR,
366 PORT_REQUEST_ASSOCIATE,
367 PORT_REQUEST_DISASSOCIATE,
368/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
369};
370enum {
371 PORT_VDP_RESPONSE_SUCCESS = 0,
372 PORT_VDP_RESPONSE_INVALID_FORMAT,
373/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
374 PORT_VDP_RESPONSE_INSUFFICIENT_RESOURCES,
375 PORT_VDP_RESPONSE_UNUSED_VTID,
376 PORT_VDP_RESPONSE_VTID_VIOLATION,
377 PORT_VDP_RESPONSE_VTID_VERSION_VIOALTION,
378/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
379 PORT_VDP_RESPONSE_OUT_OF_SYNC,
380 PORT_PROFILE_RESPONSE_SUCCESS = 0x100,
381 PORT_PROFILE_RESPONSE_INPROGRESS,
382 PORT_PROFILE_RESPONSE_INVALID,
383/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
384 PORT_PROFILE_RESPONSE_BADSTATE,
385 PORT_PROFILE_RESPONSE_INSUFFICIENT_RESOURCES,
386 PORT_PROFILE_RESPONSE_ERROR,
387};
388/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
389struct ifla_port_vsi {
390 __u8 vsi_mgr_id;
391 __u8 vsi_type_id[3];
392 __u8 vsi_type_version;
393/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
394 __u8 pad[3];
395};
396enum {
397 IFLA_IPOIB_UNSPEC,
398/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
399 IFLA_IPOIB_PKEY,
400 IFLA_IPOIB_MODE,
401 IFLA_IPOIB_UMCAST,
402 __IFLA_IPOIB_MAX
403/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
404};
405enum {
406 IPOIB_MODE_DATAGRAM = 0,
407 IPOIB_MODE_CONNECTED = 1,
408/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
409};
410#define IFLA_IPOIB_MAX (__IFLA_IPOIB_MAX - 1)
411#endif
412