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 struct rtnl_link_stats {
24   __u32 rx_packets;
25   __u32 tx_packets;
26   __u32 rx_bytes;
27   __u32 tx_bytes;
28   __u32 rx_errors;
29   __u32 tx_errors;
30   __u32 rx_dropped;
31   __u32 tx_dropped;
32   __u32 multicast;
33   __u32 collisions;
34   __u32 rx_length_errors;
35   __u32 rx_over_errors;
36   __u32 rx_crc_errors;
37   __u32 rx_frame_errors;
38   __u32 rx_fifo_errors;
39   __u32 rx_missed_errors;
40   __u32 tx_aborted_errors;
41   __u32 tx_carrier_errors;
42   __u32 tx_fifo_errors;
43   __u32 tx_heartbeat_errors;
44   __u32 tx_window_errors;
45   __u32 rx_compressed;
46   __u32 tx_compressed;
47   __u32 rx_nohandler;
48 };
49 struct rtnl_link_stats64 {
50   __u64 rx_packets;
51   __u64 tx_packets;
52   __u64 rx_bytes;
53   __u64 tx_bytes;
54   __u64 rx_errors;
55   __u64 tx_errors;
56   __u64 rx_dropped;
57   __u64 tx_dropped;
58   __u64 multicast;
59   __u64 collisions;
60   __u64 rx_length_errors;
61   __u64 rx_over_errors;
62   __u64 rx_crc_errors;
63   __u64 rx_frame_errors;
64   __u64 rx_fifo_errors;
65   __u64 rx_missed_errors;
66   __u64 tx_aborted_errors;
67   __u64 tx_carrier_errors;
68   __u64 tx_fifo_errors;
69   __u64 tx_heartbeat_errors;
70   __u64 tx_window_errors;
71   __u64 rx_compressed;
72   __u64 tx_compressed;
73   __u64 rx_nohandler;
74 };
75 struct rtnl_link_ifmap {
76   __u64 mem_start;
77   __u64 mem_end;
78   __u64 base_addr;
79   __u16 irq;
80   __u8 dma;
81   __u8 port;
82 };
83 enum {
84   IFLA_UNSPEC,
85   IFLA_ADDRESS,
86   IFLA_BROADCAST,
87   IFLA_IFNAME,
88   IFLA_MTU,
89   IFLA_LINK,
90   IFLA_QDISC,
91   IFLA_STATS,
92   IFLA_COST,
93 #define IFLA_COST IFLA_COST
94   IFLA_PRIORITY,
95 #define IFLA_PRIORITY IFLA_PRIORITY
96   IFLA_MASTER,
97 #define IFLA_MASTER IFLA_MASTER
98   IFLA_WIRELESS,
99 #define IFLA_WIRELESS IFLA_WIRELESS
100   IFLA_PROTINFO,
101 #define IFLA_PROTINFO IFLA_PROTINFO
102   IFLA_TXQLEN,
103 #define IFLA_TXQLEN IFLA_TXQLEN
104   IFLA_MAP,
105 #define IFLA_MAP IFLA_MAP
106   IFLA_WEIGHT,
107 #define IFLA_WEIGHT IFLA_WEIGHT
108   IFLA_OPERSTATE,
109   IFLA_LINKMODE,
110   IFLA_LINKINFO,
111 #define IFLA_LINKINFO IFLA_LINKINFO
112   IFLA_NET_NS_PID,
113   IFLA_IFALIAS,
114   IFLA_NUM_VF,
115   IFLA_VFINFO_LIST,
116   IFLA_STATS64,
117   IFLA_VF_PORTS,
118   IFLA_PORT_SELF,
119   IFLA_AF_SPEC,
120   IFLA_GROUP,
121   IFLA_NET_NS_FD,
122   IFLA_EXT_MASK,
123   IFLA_PROMISCUITY,
124 #define IFLA_PROMISCUITY IFLA_PROMISCUITY
125   IFLA_NUM_TX_QUEUES,
126   IFLA_NUM_RX_QUEUES,
127   IFLA_CARRIER,
128   IFLA_PHYS_PORT_ID,
129   IFLA_CARRIER_CHANGES,
130   IFLA_PHYS_SWITCH_ID,
131   IFLA_LINK_NETNSID,
132   IFLA_PHYS_PORT_NAME,
133   IFLA_PROTO_DOWN,
134   IFLA_GSO_MAX_SEGS,
135   IFLA_GSO_MAX_SIZE,
136   IFLA_PAD,
137   IFLA_XDP,
138   IFLA_EVENT,
139   IFLA_NEW_NETNSID,
140   IFLA_IF_NETNSID,
141   IFLA_TARGET_NETNSID = IFLA_IF_NETNSID,
142   IFLA_CARRIER_UP_COUNT,
143   IFLA_CARRIER_DOWN_COUNT,
144   IFLA_NEW_IFINDEX,
145   IFLA_MIN_MTU,
146   IFLA_MAX_MTU,
147   IFLA_PROP_LIST,
148   IFLA_ALT_IFNAME,
149   IFLA_PERM_ADDRESS,
150   __IFLA_MAX
151 };
152 #define IFLA_MAX (__IFLA_MAX - 1)
153 #define IFLA_RTA(r) ((struct rtattr *) (((char *) (r)) + NLMSG_ALIGN(sizeof(struct ifinfomsg))))
154 #define IFLA_PAYLOAD(n) NLMSG_PAYLOAD(n, sizeof(struct ifinfomsg))
155 enum {
156   IFLA_INET_UNSPEC,
157   IFLA_INET_CONF,
158   __IFLA_INET_MAX,
159 };
160 #define IFLA_INET_MAX (__IFLA_INET_MAX - 1)
161 enum {
162   IFLA_INET6_UNSPEC,
163   IFLA_INET6_FLAGS,
164   IFLA_INET6_CONF,
165   IFLA_INET6_STATS,
166   IFLA_INET6_MCAST,
167   IFLA_INET6_CACHEINFO,
168   IFLA_INET6_ICMP6STATS,
169   IFLA_INET6_TOKEN,
170   IFLA_INET6_ADDR_GEN_MODE,
171   __IFLA_INET6_MAX
172 };
173 #define IFLA_INET6_MAX (__IFLA_INET6_MAX - 1)
174 enum in6_addr_gen_mode {
175   IN6_ADDR_GEN_MODE_EUI64,
176   IN6_ADDR_GEN_MODE_NONE,
177   IN6_ADDR_GEN_MODE_STABLE_PRIVACY,
178   IN6_ADDR_GEN_MODE_RANDOM,
179 };
180 enum {
181   IFLA_BR_UNSPEC,
182   IFLA_BR_FORWARD_DELAY,
183   IFLA_BR_HELLO_TIME,
184   IFLA_BR_MAX_AGE,
185   IFLA_BR_AGEING_TIME,
186   IFLA_BR_STP_STATE,
187   IFLA_BR_PRIORITY,
188   IFLA_BR_VLAN_FILTERING,
189   IFLA_BR_VLAN_PROTOCOL,
190   IFLA_BR_GROUP_FWD_MASK,
191   IFLA_BR_ROOT_ID,
192   IFLA_BR_BRIDGE_ID,
193   IFLA_BR_ROOT_PORT,
194   IFLA_BR_ROOT_PATH_COST,
195   IFLA_BR_TOPOLOGY_CHANGE,
196   IFLA_BR_TOPOLOGY_CHANGE_DETECTED,
197   IFLA_BR_HELLO_TIMER,
198   IFLA_BR_TCN_TIMER,
199   IFLA_BR_TOPOLOGY_CHANGE_TIMER,
200   IFLA_BR_GC_TIMER,
201   IFLA_BR_GROUP_ADDR,
202   IFLA_BR_FDB_FLUSH,
203   IFLA_BR_MCAST_ROUTER,
204   IFLA_BR_MCAST_SNOOPING,
205   IFLA_BR_MCAST_QUERY_USE_IFADDR,
206   IFLA_BR_MCAST_QUERIER,
207   IFLA_BR_MCAST_HASH_ELASTICITY,
208   IFLA_BR_MCAST_HASH_MAX,
209   IFLA_BR_MCAST_LAST_MEMBER_CNT,
210   IFLA_BR_MCAST_STARTUP_QUERY_CNT,
211   IFLA_BR_MCAST_LAST_MEMBER_INTVL,
212   IFLA_BR_MCAST_MEMBERSHIP_INTVL,
213   IFLA_BR_MCAST_QUERIER_INTVL,
214   IFLA_BR_MCAST_QUERY_INTVL,
215   IFLA_BR_MCAST_QUERY_RESPONSE_INTVL,
216   IFLA_BR_MCAST_STARTUP_QUERY_INTVL,
217   IFLA_BR_NF_CALL_IPTABLES,
218   IFLA_BR_NF_CALL_IP6TABLES,
219   IFLA_BR_NF_CALL_ARPTABLES,
220   IFLA_BR_VLAN_DEFAULT_PVID,
221   IFLA_BR_PAD,
222   IFLA_BR_VLAN_STATS_ENABLED,
223   IFLA_BR_MCAST_STATS_ENABLED,
224   IFLA_BR_MCAST_IGMP_VERSION,
225   IFLA_BR_MCAST_MLD_VERSION,
226   IFLA_BR_VLAN_STATS_PER_PORT,
227   IFLA_BR_MULTI_BOOLOPT,
228   __IFLA_BR_MAX,
229 };
230 #define IFLA_BR_MAX (__IFLA_BR_MAX - 1)
231 struct ifla_bridge_id {
232   __u8 prio[2];
233   __u8 addr[6];
234 };
235 enum {
236   BRIDGE_MODE_UNSPEC,
237   BRIDGE_MODE_HAIRPIN,
238 };
239 enum {
240   IFLA_BRPORT_UNSPEC,
241   IFLA_BRPORT_STATE,
242   IFLA_BRPORT_PRIORITY,
243   IFLA_BRPORT_COST,
244   IFLA_BRPORT_MODE,
245   IFLA_BRPORT_GUARD,
246   IFLA_BRPORT_PROTECT,
247   IFLA_BRPORT_FAST_LEAVE,
248   IFLA_BRPORT_LEARNING,
249   IFLA_BRPORT_UNICAST_FLOOD,
250   IFLA_BRPORT_PROXYARP,
251   IFLA_BRPORT_LEARNING_SYNC,
252   IFLA_BRPORT_PROXYARP_WIFI,
253   IFLA_BRPORT_ROOT_ID,
254   IFLA_BRPORT_BRIDGE_ID,
255   IFLA_BRPORT_DESIGNATED_PORT,
256   IFLA_BRPORT_DESIGNATED_COST,
257   IFLA_BRPORT_ID,
258   IFLA_BRPORT_NO,
259   IFLA_BRPORT_TOPOLOGY_CHANGE_ACK,
260   IFLA_BRPORT_CONFIG_PENDING,
261   IFLA_BRPORT_MESSAGE_AGE_TIMER,
262   IFLA_BRPORT_FORWARD_DELAY_TIMER,
263   IFLA_BRPORT_HOLD_TIMER,
264   IFLA_BRPORT_FLUSH,
265   IFLA_BRPORT_MULTICAST_ROUTER,
266   IFLA_BRPORT_PAD,
267   IFLA_BRPORT_MCAST_FLOOD,
268   IFLA_BRPORT_MCAST_TO_UCAST,
269   IFLA_BRPORT_VLAN_TUNNEL,
270   IFLA_BRPORT_BCAST_FLOOD,
271   IFLA_BRPORT_GROUP_FWD_MASK,
272   IFLA_BRPORT_NEIGH_SUPPRESS,
273   IFLA_BRPORT_ISOLATED,
274   IFLA_BRPORT_BACKUP_PORT,
275   __IFLA_BRPORT_MAX
276 };
277 #define IFLA_BRPORT_MAX (__IFLA_BRPORT_MAX - 1)
278 struct ifla_cacheinfo {
279   __u32 max_reasm_len;
280   __u32 tstamp;
281   __u32 reachable_time;
282   __u32 retrans_time;
283 };
284 enum {
285   IFLA_INFO_UNSPEC,
286   IFLA_INFO_KIND,
287   IFLA_INFO_DATA,
288   IFLA_INFO_XSTATS,
289   IFLA_INFO_SLAVE_KIND,
290   IFLA_INFO_SLAVE_DATA,
291   __IFLA_INFO_MAX,
292 };
293 #define IFLA_INFO_MAX (__IFLA_INFO_MAX - 1)
294 enum {
295   IFLA_VLAN_UNSPEC,
296   IFLA_VLAN_ID,
297   IFLA_VLAN_FLAGS,
298   IFLA_VLAN_EGRESS_QOS,
299   IFLA_VLAN_INGRESS_QOS,
300   IFLA_VLAN_PROTOCOL,
301   __IFLA_VLAN_MAX,
302 };
303 #define IFLA_VLAN_MAX (__IFLA_VLAN_MAX - 1)
304 struct ifla_vlan_flags {
305   __u32 flags;
306   __u32 mask;
307 };
308 enum {
309   IFLA_VLAN_QOS_UNSPEC,
310   IFLA_VLAN_QOS_MAPPING,
311   __IFLA_VLAN_QOS_MAX
312 };
313 #define IFLA_VLAN_QOS_MAX (__IFLA_VLAN_QOS_MAX - 1)
314 struct ifla_vlan_qos_mapping {
315   __u32 from;
316   __u32 to;
317 };
318 enum {
319   IFLA_MACVLAN_UNSPEC,
320   IFLA_MACVLAN_MODE,
321   IFLA_MACVLAN_FLAGS,
322   IFLA_MACVLAN_MACADDR_MODE,
323   IFLA_MACVLAN_MACADDR,
324   IFLA_MACVLAN_MACADDR_DATA,
325   IFLA_MACVLAN_MACADDR_COUNT,
326   __IFLA_MACVLAN_MAX,
327 };
328 #define IFLA_MACVLAN_MAX (__IFLA_MACVLAN_MAX - 1)
329 enum macvlan_mode {
330   MACVLAN_MODE_PRIVATE = 1,
331   MACVLAN_MODE_VEPA = 2,
332   MACVLAN_MODE_BRIDGE = 4,
333   MACVLAN_MODE_PASSTHRU = 8,
334   MACVLAN_MODE_SOURCE = 16,
335 };
336 enum macvlan_macaddr_mode {
337   MACVLAN_MACADDR_ADD,
338   MACVLAN_MACADDR_DEL,
339   MACVLAN_MACADDR_FLUSH,
340   MACVLAN_MACADDR_SET,
341 };
342 #define MACVLAN_FLAG_NOPROMISC 1
343 enum {
344   IFLA_VRF_UNSPEC,
345   IFLA_VRF_TABLE,
346   __IFLA_VRF_MAX
347 };
348 #define IFLA_VRF_MAX (__IFLA_VRF_MAX - 1)
349 enum {
350   IFLA_VRF_PORT_UNSPEC,
351   IFLA_VRF_PORT_TABLE,
352   __IFLA_VRF_PORT_MAX
353 };
354 #define IFLA_VRF_PORT_MAX (__IFLA_VRF_PORT_MAX - 1)
355 enum {
356   IFLA_MACSEC_UNSPEC,
357   IFLA_MACSEC_SCI,
358   IFLA_MACSEC_PORT,
359   IFLA_MACSEC_ICV_LEN,
360   IFLA_MACSEC_CIPHER_SUITE,
361   IFLA_MACSEC_WINDOW,
362   IFLA_MACSEC_ENCODING_SA,
363   IFLA_MACSEC_ENCRYPT,
364   IFLA_MACSEC_PROTECT,
365   IFLA_MACSEC_INC_SCI,
366   IFLA_MACSEC_ES,
367   IFLA_MACSEC_SCB,
368   IFLA_MACSEC_REPLAY_PROTECT,
369   IFLA_MACSEC_VALIDATION,
370   IFLA_MACSEC_PAD,
371   IFLA_MACSEC_OFFLOAD,
372   __IFLA_MACSEC_MAX,
373 };
374 #define IFLA_MACSEC_MAX (__IFLA_MACSEC_MAX - 1)
375 enum {
376   IFLA_XFRM_UNSPEC,
377   IFLA_XFRM_LINK,
378   IFLA_XFRM_IF_ID,
379   __IFLA_XFRM_MAX
380 };
381 #define IFLA_XFRM_MAX (__IFLA_XFRM_MAX - 1)
382 enum macsec_validation_type {
383   MACSEC_VALIDATE_DISABLED = 0,
384   MACSEC_VALIDATE_CHECK = 1,
385   MACSEC_VALIDATE_STRICT = 2,
386   __MACSEC_VALIDATE_END,
387   MACSEC_VALIDATE_MAX = __MACSEC_VALIDATE_END - 1,
388 };
389 enum macsec_offload {
390   MACSEC_OFFLOAD_OFF = 0,
391   MACSEC_OFFLOAD_PHY = 1,
392   MACSEC_OFFLOAD_MAC = 2,
393   __MACSEC_OFFLOAD_END,
394   MACSEC_OFFLOAD_MAX = __MACSEC_OFFLOAD_END - 1,
395 };
396 enum {
397   IFLA_IPVLAN_UNSPEC,
398   IFLA_IPVLAN_MODE,
399   IFLA_IPVLAN_FLAGS,
400   __IFLA_IPVLAN_MAX
401 };
402 #define IFLA_IPVLAN_MAX (__IFLA_IPVLAN_MAX - 1)
403 enum ipvlan_mode {
404   IPVLAN_MODE_L2 = 0,
405   IPVLAN_MODE_L3,
406   IPVLAN_MODE_L3S,
407   IPVLAN_MODE_MAX
408 };
409 #define IPVLAN_F_PRIVATE 0x01
410 #define IPVLAN_F_VEPA 0x02
411 enum {
412   IFLA_VXLAN_UNSPEC,
413   IFLA_VXLAN_ID,
414   IFLA_VXLAN_GROUP,
415   IFLA_VXLAN_LINK,
416   IFLA_VXLAN_LOCAL,
417   IFLA_VXLAN_TTL,
418   IFLA_VXLAN_TOS,
419   IFLA_VXLAN_LEARNING,
420   IFLA_VXLAN_AGEING,
421   IFLA_VXLAN_LIMIT,
422   IFLA_VXLAN_PORT_RANGE,
423   IFLA_VXLAN_PROXY,
424   IFLA_VXLAN_RSC,
425   IFLA_VXLAN_L2MISS,
426   IFLA_VXLAN_L3MISS,
427   IFLA_VXLAN_PORT,
428   IFLA_VXLAN_GROUP6,
429   IFLA_VXLAN_LOCAL6,
430   IFLA_VXLAN_UDP_CSUM,
431   IFLA_VXLAN_UDP_ZERO_CSUM6_TX,
432   IFLA_VXLAN_UDP_ZERO_CSUM6_RX,
433   IFLA_VXLAN_REMCSUM_TX,
434   IFLA_VXLAN_REMCSUM_RX,
435   IFLA_VXLAN_GBP,
436   IFLA_VXLAN_REMCSUM_NOPARTIAL,
437   IFLA_VXLAN_COLLECT_METADATA,
438   IFLA_VXLAN_LABEL,
439   IFLA_VXLAN_GPE,
440   IFLA_VXLAN_TTL_INHERIT,
441   IFLA_VXLAN_DF,
442   __IFLA_VXLAN_MAX
443 };
444 #define IFLA_VXLAN_MAX (__IFLA_VXLAN_MAX - 1)
445 struct ifla_vxlan_port_range {
446   __be16 low;
447   __be16 high;
448 };
449 enum ifla_vxlan_df {
450   VXLAN_DF_UNSET = 0,
451   VXLAN_DF_SET,
452   VXLAN_DF_INHERIT,
453   __VXLAN_DF_END,
454   VXLAN_DF_MAX = __VXLAN_DF_END - 1,
455 };
456 enum {
457   IFLA_GENEVE_UNSPEC,
458   IFLA_GENEVE_ID,
459   IFLA_GENEVE_REMOTE,
460   IFLA_GENEVE_TTL,
461   IFLA_GENEVE_TOS,
462   IFLA_GENEVE_PORT,
463   IFLA_GENEVE_COLLECT_METADATA,
464   IFLA_GENEVE_REMOTE6,
465   IFLA_GENEVE_UDP_CSUM,
466   IFLA_GENEVE_UDP_ZERO_CSUM6_TX,
467   IFLA_GENEVE_UDP_ZERO_CSUM6_RX,
468   IFLA_GENEVE_LABEL,
469   IFLA_GENEVE_TTL_INHERIT,
470   IFLA_GENEVE_DF,
471   __IFLA_GENEVE_MAX
472 };
473 #define IFLA_GENEVE_MAX (__IFLA_GENEVE_MAX - 1)
474 enum ifla_geneve_df {
475   GENEVE_DF_UNSET = 0,
476   GENEVE_DF_SET,
477   GENEVE_DF_INHERIT,
478   __GENEVE_DF_END,
479   GENEVE_DF_MAX = __GENEVE_DF_END - 1,
480 };
481 enum {
482   IFLA_BAREUDP_UNSPEC,
483   IFLA_BAREUDP_PORT,
484   IFLA_BAREUDP_ETHERTYPE,
485   IFLA_BAREUDP_SRCPORT_MIN,
486   IFLA_BAREUDP_MULTIPROTO_MODE,
487   __IFLA_BAREUDP_MAX
488 };
489 #define IFLA_BAREUDP_MAX (__IFLA_BAREUDP_MAX - 1)
490 enum {
491   IFLA_PPP_UNSPEC,
492   IFLA_PPP_DEV_FD,
493   __IFLA_PPP_MAX
494 };
495 #define IFLA_PPP_MAX (__IFLA_PPP_MAX - 1)
496 enum ifla_gtp_role {
497   GTP_ROLE_GGSN = 0,
498   GTP_ROLE_SGSN,
499 };
500 enum {
501   IFLA_GTP_UNSPEC,
502   IFLA_GTP_FD0,
503   IFLA_GTP_FD1,
504   IFLA_GTP_PDP_HASHSIZE,
505   IFLA_GTP_ROLE,
506   __IFLA_GTP_MAX,
507 };
508 #define IFLA_GTP_MAX (__IFLA_GTP_MAX - 1)
509 enum {
510   IFLA_BOND_UNSPEC,
511   IFLA_BOND_MODE,
512   IFLA_BOND_ACTIVE_SLAVE,
513   IFLA_BOND_MIIMON,
514   IFLA_BOND_UPDELAY,
515   IFLA_BOND_DOWNDELAY,
516   IFLA_BOND_USE_CARRIER,
517   IFLA_BOND_ARP_INTERVAL,
518   IFLA_BOND_ARP_IP_TARGET,
519   IFLA_BOND_ARP_VALIDATE,
520   IFLA_BOND_ARP_ALL_TARGETS,
521   IFLA_BOND_PRIMARY,
522   IFLA_BOND_PRIMARY_RESELECT,
523   IFLA_BOND_FAIL_OVER_MAC,
524   IFLA_BOND_XMIT_HASH_POLICY,
525   IFLA_BOND_RESEND_IGMP,
526   IFLA_BOND_NUM_PEER_NOTIF,
527   IFLA_BOND_ALL_SLAVES_ACTIVE,
528   IFLA_BOND_MIN_LINKS,
529   IFLA_BOND_LP_INTERVAL,
530   IFLA_BOND_PACKETS_PER_SLAVE,
531   IFLA_BOND_AD_LACP_RATE,
532   IFLA_BOND_AD_SELECT,
533   IFLA_BOND_AD_INFO,
534   IFLA_BOND_AD_ACTOR_SYS_PRIO,
535   IFLA_BOND_AD_USER_PORT_KEY,
536   IFLA_BOND_AD_ACTOR_SYSTEM,
537   IFLA_BOND_TLB_DYNAMIC_LB,
538   IFLA_BOND_PEER_NOTIF_DELAY,
539   __IFLA_BOND_MAX,
540 };
541 #define IFLA_BOND_MAX (__IFLA_BOND_MAX - 1)
542 enum {
543   IFLA_BOND_AD_INFO_UNSPEC,
544   IFLA_BOND_AD_INFO_AGGREGATOR,
545   IFLA_BOND_AD_INFO_NUM_PORTS,
546   IFLA_BOND_AD_INFO_ACTOR_KEY,
547   IFLA_BOND_AD_INFO_PARTNER_KEY,
548   IFLA_BOND_AD_INFO_PARTNER_MAC,
549   __IFLA_BOND_AD_INFO_MAX,
550 };
551 #define IFLA_BOND_AD_INFO_MAX (__IFLA_BOND_AD_INFO_MAX - 1)
552 enum {
553   IFLA_BOND_SLAVE_UNSPEC,
554   IFLA_BOND_SLAVE_STATE,
555   IFLA_BOND_SLAVE_MII_STATUS,
556   IFLA_BOND_SLAVE_LINK_FAILURE_COUNT,
557   IFLA_BOND_SLAVE_PERM_HWADDR,
558   IFLA_BOND_SLAVE_QUEUE_ID,
559   IFLA_BOND_SLAVE_AD_AGGREGATOR_ID,
560   IFLA_BOND_SLAVE_AD_ACTOR_OPER_PORT_STATE,
561   IFLA_BOND_SLAVE_AD_PARTNER_OPER_PORT_STATE,
562   __IFLA_BOND_SLAVE_MAX,
563 };
564 #define IFLA_BOND_SLAVE_MAX (__IFLA_BOND_SLAVE_MAX - 1)
565 enum {
566   IFLA_VF_INFO_UNSPEC,
567   IFLA_VF_INFO,
568   __IFLA_VF_INFO_MAX,
569 };
570 #define IFLA_VF_INFO_MAX (__IFLA_VF_INFO_MAX - 1)
571 enum {
572   IFLA_VF_UNSPEC,
573   IFLA_VF_MAC,
574   IFLA_VF_VLAN,
575   IFLA_VF_TX_RATE,
576   IFLA_VF_SPOOFCHK,
577   IFLA_VF_LINK_STATE,
578   IFLA_VF_RATE,
579   IFLA_VF_RSS_QUERY_EN,
580   IFLA_VF_STATS,
581   IFLA_VF_TRUST,
582   IFLA_VF_IB_NODE_GUID,
583   IFLA_VF_IB_PORT_GUID,
584   IFLA_VF_VLAN_LIST,
585   IFLA_VF_BROADCAST,
586   __IFLA_VF_MAX,
587 };
588 #define IFLA_VF_MAX (__IFLA_VF_MAX - 1)
589 struct ifla_vf_mac {
590   __u32 vf;
591   __u8 mac[32];
592 };
593 struct ifla_vf_broadcast {
594   __u8 broadcast[32];
595 };
596 struct ifla_vf_vlan {
597   __u32 vf;
598   __u32 vlan;
599   __u32 qos;
600 };
601 enum {
602   IFLA_VF_VLAN_INFO_UNSPEC,
603   IFLA_VF_VLAN_INFO,
604   __IFLA_VF_VLAN_INFO_MAX,
605 };
606 #define IFLA_VF_VLAN_INFO_MAX (__IFLA_VF_VLAN_INFO_MAX - 1)
607 #define MAX_VLAN_LIST_LEN 1
608 struct ifla_vf_vlan_info {
609   __u32 vf;
610   __u32 vlan;
611   __u32 qos;
612   __be16 vlan_proto;
613 };
614 struct ifla_vf_tx_rate {
615   __u32 vf;
616   __u32 rate;
617 };
618 struct ifla_vf_rate {
619   __u32 vf;
620   __u32 min_tx_rate;
621   __u32 max_tx_rate;
622 };
623 struct ifla_vf_spoofchk {
624   __u32 vf;
625   __u32 setting;
626 };
627 struct ifla_vf_guid {
628   __u32 vf;
629   __u64 guid;
630 };
631 enum {
632   IFLA_VF_LINK_STATE_AUTO,
633   IFLA_VF_LINK_STATE_ENABLE,
634   IFLA_VF_LINK_STATE_DISABLE,
635   __IFLA_VF_LINK_STATE_MAX,
636 };
637 struct ifla_vf_link_state {
638   __u32 vf;
639   __u32 link_state;
640 };
641 struct ifla_vf_rss_query_en {
642   __u32 vf;
643   __u32 setting;
644 };
645 enum {
646   IFLA_VF_STATS_RX_PACKETS,
647   IFLA_VF_STATS_TX_PACKETS,
648   IFLA_VF_STATS_RX_BYTES,
649   IFLA_VF_STATS_TX_BYTES,
650   IFLA_VF_STATS_BROADCAST,
651   IFLA_VF_STATS_MULTICAST,
652   IFLA_VF_STATS_PAD,
653   IFLA_VF_STATS_RX_DROPPED,
654   IFLA_VF_STATS_TX_DROPPED,
655   __IFLA_VF_STATS_MAX,
656 };
657 #define IFLA_VF_STATS_MAX (__IFLA_VF_STATS_MAX - 1)
658 struct ifla_vf_trust {
659   __u32 vf;
660   __u32 setting;
661 };
662 enum {
663   IFLA_VF_PORT_UNSPEC,
664   IFLA_VF_PORT,
665   __IFLA_VF_PORT_MAX,
666 };
667 #define IFLA_VF_PORT_MAX (__IFLA_VF_PORT_MAX - 1)
668 enum {
669   IFLA_PORT_UNSPEC,
670   IFLA_PORT_VF,
671   IFLA_PORT_PROFILE,
672   IFLA_PORT_VSI_TYPE,
673   IFLA_PORT_INSTANCE_UUID,
674   IFLA_PORT_HOST_UUID,
675   IFLA_PORT_REQUEST,
676   IFLA_PORT_RESPONSE,
677   __IFLA_PORT_MAX,
678 };
679 #define IFLA_PORT_MAX (__IFLA_PORT_MAX - 1)
680 #define PORT_PROFILE_MAX 40
681 #define PORT_UUID_MAX 16
682 #define PORT_SELF_VF - 1
683 enum {
684   PORT_REQUEST_PREASSOCIATE = 0,
685   PORT_REQUEST_PREASSOCIATE_RR,
686   PORT_REQUEST_ASSOCIATE,
687   PORT_REQUEST_DISASSOCIATE,
688 };
689 enum {
690   PORT_VDP_RESPONSE_SUCCESS = 0,
691   PORT_VDP_RESPONSE_INVALID_FORMAT,
692   PORT_VDP_RESPONSE_INSUFFICIENT_RESOURCES,
693   PORT_VDP_RESPONSE_UNUSED_VTID,
694   PORT_VDP_RESPONSE_VTID_VIOLATION,
695   PORT_VDP_RESPONSE_VTID_VERSION_VIOALTION,
696   PORT_VDP_RESPONSE_OUT_OF_SYNC,
697   PORT_PROFILE_RESPONSE_SUCCESS = 0x100,
698   PORT_PROFILE_RESPONSE_INPROGRESS,
699   PORT_PROFILE_RESPONSE_INVALID,
700   PORT_PROFILE_RESPONSE_BADSTATE,
701   PORT_PROFILE_RESPONSE_INSUFFICIENT_RESOURCES,
702   PORT_PROFILE_RESPONSE_ERROR,
703 };
704 struct ifla_port_vsi {
705   __u8 vsi_mgr_id;
706   __u8 vsi_type_id[3];
707   __u8 vsi_type_version;
708   __u8 pad[3];
709 };
710 enum {
711   IFLA_IPOIB_UNSPEC,
712   IFLA_IPOIB_PKEY,
713   IFLA_IPOIB_MODE,
714   IFLA_IPOIB_UMCAST,
715   __IFLA_IPOIB_MAX
716 };
717 enum {
718   IPOIB_MODE_DATAGRAM = 0,
719   IPOIB_MODE_CONNECTED = 1,
720 };
721 #define IFLA_IPOIB_MAX (__IFLA_IPOIB_MAX - 1)
722 enum {
723   IFLA_HSR_UNSPEC,
724   IFLA_HSR_SLAVE1,
725   IFLA_HSR_SLAVE2,
726   IFLA_HSR_MULTICAST_SPEC,
727   IFLA_HSR_SUPERVISION_ADDR,
728   IFLA_HSR_SEQ_NR,
729   IFLA_HSR_VERSION,
730   __IFLA_HSR_MAX,
731 };
732 #define IFLA_HSR_MAX (__IFLA_HSR_MAX - 1)
733 struct if_stats_msg {
734   __u8 family;
735   __u8 pad1;
736   __u16 pad2;
737   __u32 ifindex;
738   __u32 filter_mask;
739 };
740 enum {
741   IFLA_STATS_UNSPEC,
742   IFLA_STATS_LINK_64,
743   IFLA_STATS_LINK_XSTATS,
744   IFLA_STATS_LINK_XSTATS_SLAVE,
745   IFLA_STATS_LINK_OFFLOAD_XSTATS,
746   IFLA_STATS_AF_SPEC,
747   __IFLA_STATS_MAX,
748 };
749 #define IFLA_STATS_MAX (__IFLA_STATS_MAX - 1)
750 #define IFLA_STATS_FILTER_BIT(ATTR) (1 << (ATTR - 1))
751 enum {
752   LINK_XSTATS_TYPE_UNSPEC,
753   LINK_XSTATS_TYPE_BRIDGE,
754   LINK_XSTATS_TYPE_BOND,
755   __LINK_XSTATS_TYPE_MAX
756 };
757 #define LINK_XSTATS_TYPE_MAX (__LINK_XSTATS_TYPE_MAX - 1)
758 enum {
759   IFLA_OFFLOAD_XSTATS_UNSPEC,
760   IFLA_OFFLOAD_XSTATS_CPU_HIT,
761   __IFLA_OFFLOAD_XSTATS_MAX
762 };
763 #define IFLA_OFFLOAD_XSTATS_MAX (__IFLA_OFFLOAD_XSTATS_MAX - 1)
764 #define XDP_FLAGS_UPDATE_IF_NOEXIST (1U << 0)
765 #define XDP_FLAGS_SKB_MODE (1U << 1)
766 #define XDP_FLAGS_DRV_MODE (1U << 2)
767 #define XDP_FLAGS_HW_MODE (1U << 3)
768 #define XDP_FLAGS_REPLACE (1U << 4)
769 #define XDP_FLAGS_MODES (XDP_FLAGS_SKB_MODE | XDP_FLAGS_DRV_MODE | XDP_FLAGS_HW_MODE)
770 #define XDP_FLAGS_MASK (XDP_FLAGS_UPDATE_IF_NOEXIST | XDP_FLAGS_MODES | XDP_FLAGS_REPLACE)
771 enum {
772   XDP_ATTACHED_NONE = 0,
773   XDP_ATTACHED_DRV,
774   XDP_ATTACHED_SKB,
775   XDP_ATTACHED_HW,
776   XDP_ATTACHED_MULTI,
777 };
778 enum {
779   IFLA_XDP_UNSPEC,
780   IFLA_XDP_FD,
781   IFLA_XDP_ATTACHED,
782   IFLA_XDP_FLAGS,
783   IFLA_XDP_PROG_ID,
784   IFLA_XDP_DRV_PROG_ID,
785   IFLA_XDP_SKB_PROG_ID,
786   IFLA_XDP_HW_PROG_ID,
787   IFLA_XDP_EXPECTED_FD,
788   __IFLA_XDP_MAX,
789 };
790 #define IFLA_XDP_MAX (__IFLA_XDP_MAX - 1)
791 enum {
792   IFLA_EVENT_NONE,
793   IFLA_EVENT_REBOOT,
794   IFLA_EVENT_FEATURES,
795   IFLA_EVENT_BONDING_FAILOVER,
796   IFLA_EVENT_NOTIFY_PEERS,
797   IFLA_EVENT_IGMP_RESEND,
798   IFLA_EVENT_BONDING_OPTIONS,
799 };
800 enum {
801   IFLA_TUN_UNSPEC,
802   IFLA_TUN_OWNER,
803   IFLA_TUN_GROUP,
804   IFLA_TUN_TYPE,
805   IFLA_TUN_PI,
806   IFLA_TUN_VNET_HDR,
807   IFLA_TUN_PERSIST,
808   IFLA_TUN_MULTI_QUEUE,
809   IFLA_TUN_NUM_QUEUES,
810   IFLA_TUN_NUM_DISABLED_QUEUES,
811   __IFLA_TUN_MAX,
812 };
813 #define IFLA_TUN_MAX (__IFLA_TUN_MAX - 1)
814 #define RMNET_FLAGS_INGRESS_DEAGGREGATION (1U << 0)
815 #define RMNET_FLAGS_INGRESS_MAP_COMMANDS (1U << 1)
816 #define RMNET_FLAGS_INGRESS_MAP_CKSUMV4 (1U << 2)
817 #define RMNET_FLAGS_EGRESS_MAP_CKSUMV4 (1U << 3)
818 enum {
819   IFLA_RMNET_UNSPEC,
820   IFLA_RMNET_MUX_ID,
821   IFLA_RMNET_FLAGS,
822   __IFLA_RMNET_MAX,
823 };
824 #define IFLA_RMNET_MAX (__IFLA_RMNET_MAX - 1)
825 struct ifla_rmnet_flags {
826   __u32 flags;
827   __u32 mask;
828 };
829 #endif
830