1
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
9struct rtnl_link_stats {
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;
19 __u32 collisions;
20
21
22 __u32 rx_length_errors;
23 __u32 rx_over_errors;
24 __u32 rx_crc_errors;
25 __u32 rx_frame_errors;
26 __u32 rx_fifo_errors;
27 __u32 rx_missed_errors;
28
29
30 __u32 tx_aborted_errors;
31 __u32 tx_carrier_errors;
32 __u32 tx_fifo_errors;
33 __u32 tx_heartbeat_errors;
34 __u32 tx_window_errors;
35
36
37 __u32 rx_compressed;
38 __u32 tx_compressed;
39
40 __u32 rx_nohandler;
41
42#ifdef __KERNEL__
43#ifndef __GENKSYMS__
44
45
46
47
48 char __rh_tail[0];
49 __u32 __rh_reserved_1;
50 __u32 __rh_reserved_2;
51 __u32 __rh_reserved_3;
52 __u32 __rh_reserved_4;
53#endif
54#endif
55};
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229struct rtnl_link_stats64 {
230 __u64 rx_packets;
231 __u64 tx_packets;
232 __u64 rx_bytes;
233 __u64 tx_bytes;
234 __u64 rx_errors;
235 __u64 tx_errors;
236 __u64 rx_dropped;
237 __u64 tx_dropped;
238 __u64 multicast;
239 __u64 collisions;
240
241
242 __u64 rx_length_errors;
243 __u64 rx_over_errors;
244 __u64 rx_crc_errors;
245 __u64 rx_frame_errors;
246 __u64 rx_fifo_errors;
247 __u64 rx_missed_errors;
248
249
250 __u64 tx_aborted_errors;
251 __u64 tx_carrier_errors;
252 __u64 tx_fifo_errors;
253 __u64 tx_heartbeat_errors;
254 __u64 tx_window_errors;
255
256
257 __u64 rx_compressed;
258 __u64 tx_compressed;
259 __u64 rx_nohandler;
260
261#ifdef __KERNEL__
262#ifndef __GENKSYMS__
263 char __rh_tail[0];
264 __u64 __rh_reserved_1;
265 __u64 __rh_reserved_2;
266 __u64 __rh_reserved_3;
267 __u64 __rh_reserved_4;
268#endif
269#endif
270};
271
272#ifdef __KERNEL__
273#define sizeof_rtnl_link_stats offsetof(struct rtnl_link_stats, __rh_tail)
274#define sizeof_rtnl_link_stats64 offsetof(struct rtnl_link_stats64, __rh_tail)
275#endif
276
277
278struct rtnl_link_ifmap {
279 __u64 mem_start;
280 __u64 mem_end;
281 __u64 base_addr;
282 __u16 irq;
283 __u8 dma;
284 __u8 port;
285};
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305enum {
306 IFLA_UNSPEC,
307 IFLA_ADDRESS,
308 IFLA_BROADCAST,
309 IFLA_IFNAME,
310 IFLA_MTU,
311 IFLA_LINK,
312 IFLA_QDISC,
313 IFLA_STATS,
314 IFLA_COST,
315#define IFLA_COST IFLA_COST
316 IFLA_PRIORITY,
317#define IFLA_PRIORITY IFLA_PRIORITY
318 IFLA_MASTER,
319#define IFLA_MASTER IFLA_MASTER
320 IFLA_WIRELESS,
321#define IFLA_WIRELESS IFLA_WIRELESS
322 IFLA_PROTINFO,
323#define IFLA_PROTINFO IFLA_PROTINFO
324 IFLA_TXQLEN,
325#define IFLA_TXQLEN IFLA_TXQLEN
326 IFLA_MAP,
327#define IFLA_MAP IFLA_MAP
328 IFLA_WEIGHT,
329#define IFLA_WEIGHT IFLA_WEIGHT
330 IFLA_OPERSTATE,
331 IFLA_LINKMODE,
332 IFLA_LINKINFO,
333#define IFLA_LINKINFO IFLA_LINKINFO
334 IFLA_NET_NS_PID,
335 IFLA_IFALIAS,
336 IFLA_NUM_VF,
337 IFLA_VFINFO_LIST,
338 IFLA_STATS64,
339 IFLA_VF_PORTS,
340 IFLA_PORT_SELF,
341 IFLA_AF_SPEC,
342 IFLA_GROUP,
343 IFLA_NET_NS_FD,
344 IFLA_EXT_MASK,
345 IFLA_PROMISCUITY,
346#define IFLA_PROMISCUITY IFLA_PROMISCUITY
347 IFLA_NUM_TX_QUEUES,
348 IFLA_NUM_RX_QUEUES,
349 IFLA_CARRIER,
350 IFLA_PHYS_PORT_ID,
351 IFLA_CARRIER_CHANGES,
352 IFLA_PHYS_SWITCH_ID,
353 IFLA_LINK_NETNSID,
354 IFLA_PHYS_PORT_NAME,
355 IFLA_PROTO_DOWN,
356 IFLA_GSO_MAX_SEGS,
357 IFLA_GSO_MAX_SIZE,
358 IFLA_PAD,
359 IFLA_XDP,
360 IFLA_EVENT,
361 IFLA_NEW_NETNSID,
362 IFLA_IF_NETNSID,
363 IFLA_TARGET_NETNSID = IFLA_IF_NETNSID,
364 IFLA_CARRIER_UP_COUNT,
365 IFLA_CARRIER_DOWN_COUNT,
366 IFLA_NEW_IFINDEX,
367 IFLA_MIN_MTU,
368 IFLA_MAX_MTU,
369 IFLA_PROP_LIST,
370 IFLA_ALT_IFNAME,
371 IFLA_PERM_ADDRESS,
372 __IFLA_MAX
373};
374
375
376#define IFLA_MAX (__IFLA_MAX - 1)
377
378
379#ifndef __KERNEL__
380#define IFLA_RTA(r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ifinfomsg))))
381#define IFLA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct ifinfomsg))
382#endif
383
384enum {
385 IFLA_INET_UNSPEC,
386 IFLA_INET_CONF,
387 __IFLA_INET_MAX,
388};
389
390#define IFLA_INET_MAX (__IFLA_INET_MAX - 1)
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422enum {
423 IFLA_INET6_UNSPEC,
424 IFLA_INET6_FLAGS,
425 IFLA_INET6_CONF,
426 IFLA_INET6_STATS,
427 IFLA_INET6_MCAST,
428 IFLA_INET6_CACHEINFO,
429 IFLA_INET6_ICMP6STATS,
430 IFLA_INET6_TOKEN,
431 IFLA_INET6_ADDR_GEN_MODE,
432 __IFLA_INET6_MAX
433};
434
435#define IFLA_INET6_MAX (__IFLA_INET6_MAX - 1)
436
437enum in6_addr_gen_mode {
438 IN6_ADDR_GEN_MODE_EUI64,
439 IN6_ADDR_GEN_MODE_NONE,
440 IN6_ADDR_GEN_MODE_STABLE_PRIVACY,
441 IN6_ADDR_GEN_MODE_RANDOM,
442};
443
444
445
446enum {
447 IFLA_BR_UNSPEC,
448 IFLA_BR_FORWARD_DELAY,
449 IFLA_BR_HELLO_TIME,
450 IFLA_BR_MAX_AGE,
451 IFLA_BR_AGEING_TIME,
452 IFLA_BR_STP_STATE,
453 IFLA_BR_PRIORITY,
454 IFLA_BR_VLAN_FILTERING,
455 IFLA_BR_VLAN_PROTOCOL,
456 IFLA_BR_GROUP_FWD_MASK,
457 IFLA_BR_ROOT_ID,
458 IFLA_BR_BRIDGE_ID,
459 IFLA_BR_ROOT_PORT,
460 IFLA_BR_ROOT_PATH_COST,
461 IFLA_BR_TOPOLOGY_CHANGE,
462 IFLA_BR_TOPOLOGY_CHANGE_DETECTED,
463 IFLA_BR_HELLO_TIMER,
464 IFLA_BR_TCN_TIMER,
465 IFLA_BR_TOPOLOGY_CHANGE_TIMER,
466 IFLA_BR_GC_TIMER,
467 IFLA_BR_GROUP_ADDR,
468 IFLA_BR_FDB_FLUSH,
469 IFLA_BR_MCAST_ROUTER,
470 IFLA_BR_MCAST_SNOOPING,
471 IFLA_BR_MCAST_QUERY_USE_IFADDR,
472 IFLA_BR_MCAST_QUERIER,
473 IFLA_BR_MCAST_HASH_ELASTICITY,
474 IFLA_BR_MCAST_HASH_MAX,
475 IFLA_BR_MCAST_LAST_MEMBER_CNT,
476 IFLA_BR_MCAST_STARTUP_QUERY_CNT,
477 IFLA_BR_MCAST_LAST_MEMBER_INTVL,
478 IFLA_BR_MCAST_MEMBERSHIP_INTVL,
479 IFLA_BR_MCAST_QUERIER_INTVL,
480 IFLA_BR_MCAST_QUERY_INTVL,
481 IFLA_BR_MCAST_QUERY_RESPONSE_INTVL,
482 IFLA_BR_MCAST_STARTUP_QUERY_INTVL,
483 IFLA_BR_NF_CALL_IPTABLES,
484 IFLA_BR_NF_CALL_IP6TABLES,
485 IFLA_BR_NF_CALL_ARPTABLES,
486 IFLA_BR_VLAN_DEFAULT_PVID,
487 IFLA_BR_PAD,
488 IFLA_BR_VLAN_STATS_ENABLED,
489 IFLA_BR_MCAST_STATS_ENABLED,
490 IFLA_BR_MCAST_IGMP_VERSION,
491 IFLA_BR_MCAST_MLD_VERSION,
492 IFLA_BR_VLAN_STATS_PER_PORT,
493 __IFLA_BR_MAX,
494};
495
496#define IFLA_BR_MAX (__IFLA_BR_MAX - 1)
497
498struct ifla_bridge_id {
499 __u8 prio[2];
500 __u8 addr[6];
501};
502
503enum {
504 BRIDGE_MODE_UNSPEC,
505 BRIDGE_MODE_HAIRPIN,
506};
507
508enum {
509 IFLA_BRPORT_UNSPEC,
510 IFLA_BRPORT_STATE,
511 IFLA_BRPORT_PRIORITY,
512 IFLA_BRPORT_COST,
513 IFLA_BRPORT_MODE,
514 IFLA_BRPORT_GUARD,
515 IFLA_BRPORT_PROTECT,
516 IFLA_BRPORT_FAST_LEAVE,
517 IFLA_BRPORT_LEARNING,
518 IFLA_BRPORT_UNICAST_FLOOD,
519 IFLA_BRPORT_PROXYARP,
520 IFLA_BRPORT_LEARNING_SYNC,
521 IFLA_BRPORT_PROXYARP_WIFI,
522 IFLA_BRPORT_ROOT_ID,
523 IFLA_BRPORT_BRIDGE_ID,
524 IFLA_BRPORT_DESIGNATED_PORT,
525 IFLA_BRPORT_DESIGNATED_COST,
526 IFLA_BRPORT_ID,
527 IFLA_BRPORT_NO,
528 IFLA_BRPORT_TOPOLOGY_CHANGE_ACK,
529 IFLA_BRPORT_CONFIG_PENDING,
530 IFLA_BRPORT_MESSAGE_AGE_TIMER,
531 IFLA_BRPORT_FORWARD_DELAY_TIMER,
532 IFLA_BRPORT_HOLD_TIMER,
533 IFLA_BRPORT_FLUSH,
534 IFLA_BRPORT_MULTICAST_ROUTER,
535 IFLA_BRPORT_PAD,
536 IFLA_BRPORT_MCAST_FLOOD,
537 IFLA_BRPORT_MCAST_TO_UCAST,
538 IFLA_BRPORT_VLAN_TUNNEL,
539 IFLA_BRPORT_BCAST_FLOOD,
540 IFLA_BRPORT_GROUP_FWD_MASK,
541 IFLA_BRPORT_NEIGH_SUPPRESS,
542 IFLA_BRPORT_ISOLATED,
543 __IFLA_BRPORT_MAX
544};
545#define IFLA_BRPORT_MAX (__IFLA_BRPORT_MAX - 1)
546
547struct ifla_cacheinfo {
548 __u32 max_reasm_len;
549 __u32 tstamp;
550 __u32 reachable_time;
551 __u32 retrans_time;
552};
553
554enum {
555 IFLA_INFO_UNSPEC,
556 IFLA_INFO_KIND,
557 IFLA_INFO_DATA,
558 IFLA_INFO_XSTATS,
559 IFLA_INFO_SLAVE_KIND,
560 IFLA_INFO_SLAVE_DATA,
561 __IFLA_INFO_MAX,
562};
563
564#define IFLA_INFO_MAX (__IFLA_INFO_MAX - 1)
565
566
567
568enum {
569 IFLA_VLAN_UNSPEC,
570 IFLA_VLAN_ID,
571 IFLA_VLAN_FLAGS,
572 IFLA_VLAN_EGRESS_QOS,
573 IFLA_VLAN_INGRESS_QOS,
574 IFLA_VLAN_PROTOCOL,
575 __IFLA_VLAN_MAX,
576};
577
578#define IFLA_VLAN_MAX (__IFLA_VLAN_MAX - 1)
579
580struct ifla_vlan_flags {
581 __u32 flags;
582 __u32 mask;
583};
584
585enum {
586 IFLA_VLAN_QOS_UNSPEC,
587 IFLA_VLAN_QOS_MAPPING,
588 __IFLA_VLAN_QOS_MAX
589};
590
591#define IFLA_VLAN_QOS_MAX (__IFLA_VLAN_QOS_MAX - 1)
592
593struct ifla_vlan_qos_mapping {
594 __u32 from;
595 __u32 to;
596};
597
598
599enum {
600 IFLA_MACVLAN_UNSPEC,
601 IFLA_MACVLAN_MODE,
602 IFLA_MACVLAN_FLAGS,
603 IFLA_MACVLAN_MACADDR_MODE,
604 IFLA_MACVLAN_MACADDR,
605 IFLA_MACVLAN_MACADDR_DATA,
606 IFLA_MACVLAN_MACADDR_COUNT,
607 __IFLA_MACVLAN_MAX,
608};
609
610#define IFLA_MACVLAN_MAX (__IFLA_MACVLAN_MAX - 1)
611
612enum macvlan_mode {
613 MACVLAN_MODE_PRIVATE = 1,
614 MACVLAN_MODE_VEPA = 2,
615 MACVLAN_MODE_BRIDGE = 4,
616 MACVLAN_MODE_PASSTHRU = 8,
617 MACVLAN_MODE_SOURCE = 16,
618};
619
620enum macvlan_macaddr_mode {
621 MACVLAN_MACADDR_ADD,
622 MACVLAN_MACADDR_DEL,
623 MACVLAN_MACADDR_FLUSH,
624 MACVLAN_MACADDR_SET,
625};
626
627#define MACVLAN_FLAG_NOPROMISC 1
628
629
630enum {
631 IFLA_VRF_UNSPEC,
632 IFLA_VRF_TABLE,
633 __IFLA_VRF_MAX
634};
635
636#define IFLA_VRF_MAX (__IFLA_VRF_MAX - 1)
637
638enum {
639 IFLA_VRF_PORT_UNSPEC,
640 IFLA_VRF_PORT_TABLE,
641 __IFLA_VRF_PORT_MAX
642};
643
644#define IFLA_VRF_PORT_MAX (__IFLA_VRF_PORT_MAX - 1)
645
646
647enum {
648 IFLA_MACSEC_UNSPEC,
649 IFLA_MACSEC_SCI,
650 IFLA_MACSEC_PORT,
651 IFLA_MACSEC_ICV_LEN,
652 IFLA_MACSEC_CIPHER_SUITE,
653 IFLA_MACSEC_WINDOW,
654 IFLA_MACSEC_ENCODING_SA,
655 IFLA_MACSEC_ENCRYPT,
656 IFLA_MACSEC_PROTECT,
657 IFLA_MACSEC_INC_SCI,
658 IFLA_MACSEC_ES,
659 IFLA_MACSEC_SCB,
660 IFLA_MACSEC_REPLAY_PROTECT,
661 IFLA_MACSEC_VALIDATION,
662 IFLA_MACSEC_PAD,
663 __IFLA_MACSEC_MAX,
664};
665
666#define IFLA_MACSEC_MAX (__IFLA_MACSEC_MAX - 1)
667
668
669enum {
670 IFLA_XFRM_UNSPEC,
671 IFLA_XFRM_LINK,
672 IFLA_XFRM_IF_ID,
673 __IFLA_XFRM_MAX
674};
675
676#define IFLA_XFRM_MAX (__IFLA_XFRM_MAX - 1)
677
678enum macsec_validation_type {
679 MACSEC_VALIDATE_DISABLED = 0,
680 MACSEC_VALIDATE_CHECK = 1,
681 MACSEC_VALIDATE_STRICT = 2,
682 __MACSEC_VALIDATE_END,
683 MACSEC_VALIDATE_MAX = __MACSEC_VALIDATE_END - 1,
684};
685
686
687enum {
688 IFLA_IPVLAN_UNSPEC,
689 IFLA_IPVLAN_MODE,
690 IFLA_IPVLAN_FLAGS,
691 __IFLA_IPVLAN_MAX
692};
693
694#define IFLA_IPVLAN_MAX (__IFLA_IPVLAN_MAX - 1)
695
696enum ipvlan_mode {
697 IPVLAN_MODE_L2 = 0,
698 IPVLAN_MODE_L3,
699 IPVLAN_MODE_L3S,
700 IPVLAN_MODE_MAX
701};
702
703#define IPVLAN_F_PRIVATE 0x01
704#define IPVLAN_F_VEPA 0x02
705
706
707enum {
708 IFLA_VXLAN_UNSPEC,
709 IFLA_VXLAN_ID,
710 IFLA_VXLAN_GROUP,
711 IFLA_VXLAN_LINK,
712 IFLA_VXLAN_LOCAL,
713 IFLA_VXLAN_TTL,
714 IFLA_VXLAN_TOS,
715 IFLA_VXLAN_LEARNING,
716 IFLA_VXLAN_AGEING,
717 IFLA_VXLAN_LIMIT,
718 IFLA_VXLAN_PORT_RANGE,
719 IFLA_VXLAN_PROXY,
720 IFLA_VXLAN_RSC,
721 IFLA_VXLAN_L2MISS,
722 IFLA_VXLAN_L3MISS,
723 IFLA_VXLAN_PORT,
724 IFLA_VXLAN_GROUP6,
725 IFLA_VXLAN_LOCAL6,
726 IFLA_VXLAN_UDP_CSUM,
727 IFLA_VXLAN_UDP_ZERO_CSUM6_TX,
728 IFLA_VXLAN_UDP_ZERO_CSUM6_RX,
729 IFLA_VXLAN_REMCSUM_TX,
730 IFLA_VXLAN_REMCSUM_RX,
731 IFLA_VXLAN_GBP,
732 IFLA_VXLAN_REMCSUM_NOPARTIAL,
733 IFLA_VXLAN_COLLECT_METADATA,
734 IFLA_VXLAN_LABEL,
735 IFLA_VXLAN_GPE,
736 IFLA_VXLAN_TTL_INHERIT,
737 IFLA_VXLAN_DF,
738 __IFLA_VXLAN_MAX
739};
740#define IFLA_VXLAN_MAX (__IFLA_VXLAN_MAX - 1)
741
742struct ifla_vxlan_port_range {
743 __be16 low;
744 __be16 high;
745};
746
747enum ifla_vxlan_df {
748 VXLAN_DF_UNSET = 0,
749 VXLAN_DF_SET,
750 VXLAN_DF_INHERIT,
751 __VXLAN_DF_END,
752 VXLAN_DF_MAX = __VXLAN_DF_END - 1,
753};
754
755
756enum {
757 IFLA_GENEVE_UNSPEC,
758 IFLA_GENEVE_ID,
759 IFLA_GENEVE_REMOTE,
760 IFLA_GENEVE_TTL,
761 IFLA_GENEVE_TOS,
762 IFLA_GENEVE_PORT,
763 IFLA_GENEVE_COLLECT_METADATA,
764 IFLA_GENEVE_REMOTE6,
765 IFLA_GENEVE_UDP_CSUM,
766 IFLA_GENEVE_UDP_ZERO_CSUM6_TX,
767 IFLA_GENEVE_UDP_ZERO_CSUM6_RX,
768 IFLA_GENEVE_LABEL,
769 IFLA_GENEVE_TTL_INHERIT,
770 IFLA_GENEVE_DF,
771 __IFLA_GENEVE_MAX
772};
773#define IFLA_GENEVE_MAX (__IFLA_GENEVE_MAX - 1)
774
775enum ifla_geneve_df {
776 GENEVE_DF_UNSET = 0,
777 GENEVE_DF_SET,
778 GENEVE_DF_INHERIT,
779 __GENEVE_DF_END,
780 GENEVE_DF_MAX = __GENEVE_DF_END - 1,
781};
782
783
784enum {
785 IFLA_BAREUDP_UNSPEC,
786 IFLA_BAREUDP_PORT,
787 IFLA_BAREUDP_ETHERTYPE,
788 IFLA_BAREUDP_SRCPORT_MIN,
789 IFLA_BAREUDP_MULTIPROTO_MODE,
790 __IFLA_BAREUDP_MAX
791};
792
793#define IFLA_BAREUDP_MAX (__IFLA_BAREUDP_MAX - 1)
794
795
796enum {
797 IFLA_PPP_UNSPEC,
798 IFLA_PPP_DEV_FD,
799 __IFLA_PPP_MAX
800};
801#define IFLA_PPP_MAX (__IFLA_PPP_MAX - 1)
802
803
804
805enum ifla_gtp_role {
806 GTP_ROLE_GGSN = 0,
807 GTP_ROLE_SGSN,
808};
809
810enum {
811 IFLA_GTP_UNSPEC,
812 IFLA_GTP_FD0,
813 IFLA_GTP_FD1,
814 IFLA_GTP_PDP_HASHSIZE,
815 IFLA_GTP_ROLE,
816 __IFLA_GTP_MAX,
817};
818#define IFLA_GTP_MAX (__IFLA_GTP_MAX - 1)
819
820
821
822enum {
823 IFLA_BOND_UNSPEC,
824 IFLA_BOND_MODE,
825 IFLA_BOND_ACTIVE_SLAVE,
826 IFLA_BOND_MIIMON,
827 IFLA_BOND_UPDELAY,
828 IFLA_BOND_DOWNDELAY,
829 IFLA_BOND_USE_CARRIER,
830 IFLA_BOND_ARP_INTERVAL,
831 IFLA_BOND_ARP_IP_TARGET,
832 IFLA_BOND_ARP_VALIDATE,
833 IFLA_BOND_ARP_ALL_TARGETS,
834 IFLA_BOND_PRIMARY,
835 IFLA_BOND_PRIMARY_RESELECT,
836 IFLA_BOND_FAIL_OVER_MAC,
837 IFLA_BOND_XMIT_HASH_POLICY,
838 IFLA_BOND_RESEND_IGMP,
839 IFLA_BOND_NUM_PEER_NOTIF,
840 IFLA_BOND_ALL_SLAVES_ACTIVE,
841 IFLA_BOND_MIN_LINKS,
842 IFLA_BOND_LP_INTERVAL,
843 IFLA_BOND_PACKETS_PER_SLAVE,
844 IFLA_BOND_AD_LACP_RATE,
845 IFLA_BOND_AD_SELECT,
846 IFLA_BOND_AD_INFO,
847 IFLA_BOND_AD_ACTOR_SYS_PRIO,
848 IFLA_BOND_AD_USER_PORT_KEY,
849 IFLA_BOND_AD_ACTOR_SYSTEM,
850 IFLA_BOND_TLB_DYNAMIC_LB,
851 IFLA_BOND_PEER_NOTIF_DELAY,
852 __IFLA_BOND_MAX,
853};
854
855#define IFLA_BOND_MAX (__IFLA_BOND_MAX - 1)
856
857enum {
858 IFLA_BOND_AD_INFO_UNSPEC,
859 IFLA_BOND_AD_INFO_AGGREGATOR,
860 IFLA_BOND_AD_INFO_NUM_PORTS,
861 IFLA_BOND_AD_INFO_ACTOR_KEY,
862 IFLA_BOND_AD_INFO_PARTNER_KEY,
863 IFLA_BOND_AD_INFO_PARTNER_MAC,
864 __IFLA_BOND_AD_INFO_MAX,
865};
866
867#define IFLA_BOND_AD_INFO_MAX (__IFLA_BOND_AD_INFO_MAX - 1)
868
869enum {
870 IFLA_BOND_SLAVE_UNSPEC,
871 IFLA_BOND_SLAVE_STATE,
872 IFLA_BOND_SLAVE_MII_STATUS,
873 IFLA_BOND_SLAVE_LINK_FAILURE_COUNT,
874 IFLA_BOND_SLAVE_PERM_HWADDR,
875 IFLA_BOND_SLAVE_QUEUE_ID,
876 IFLA_BOND_SLAVE_AD_AGGREGATOR_ID,
877 IFLA_BOND_SLAVE_AD_ACTOR_OPER_PORT_STATE,
878 IFLA_BOND_SLAVE_AD_PARTNER_OPER_PORT_STATE,
879 __IFLA_BOND_SLAVE_MAX,
880};
881
882#define IFLA_BOND_SLAVE_MAX (__IFLA_BOND_SLAVE_MAX - 1)
883
884
885
886enum {
887 IFLA_VF_INFO_UNSPEC,
888 IFLA_VF_INFO,
889 __IFLA_VF_INFO_MAX,
890};
891
892#define IFLA_VF_INFO_MAX (__IFLA_VF_INFO_MAX - 1)
893
894enum {
895 IFLA_VF_UNSPEC,
896 IFLA_VF_MAC,
897 IFLA_VF_VLAN,
898 IFLA_VF_TX_RATE,
899 IFLA_VF_SPOOFCHK,
900 IFLA_VF_LINK_STATE,
901 IFLA_VF_RATE,
902 IFLA_VF_RSS_QUERY_EN,
903
904
905 IFLA_VF_STATS,
906 IFLA_VF_TRUST,
907 IFLA_VF_IB_NODE_GUID,
908 IFLA_VF_IB_PORT_GUID,
909 IFLA_VF_VLAN_LIST,
910 IFLA_VF_BROADCAST,
911 __IFLA_VF_MAX,
912};
913
914#define IFLA_VF_MAX (__IFLA_VF_MAX - 1)
915
916struct ifla_vf_mac {
917 __u32 vf;
918 __u8 mac[32];
919};
920
921struct ifla_vf_broadcast {
922 __u8 broadcast[32];
923};
924
925struct ifla_vf_vlan {
926 __u32 vf;
927 __u32 vlan;
928 __u32 qos;
929};
930
931enum {
932 IFLA_VF_VLAN_INFO_UNSPEC,
933 IFLA_VF_VLAN_INFO,
934 __IFLA_VF_VLAN_INFO_MAX,
935};
936
937#define IFLA_VF_VLAN_INFO_MAX (__IFLA_VF_VLAN_INFO_MAX - 1)
938#define MAX_VLAN_LIST_LEN 1
939
940struct ifla_vf_vlan_info {
941 __u32 vf;
942 __u32 vlan;
943 __u32 qos;
944 __be16 vlan_proto;
945};
946
947struct ifla_vf_tx_rate {
948 __u32 vf;
949 __u32 rate;
950};
951
952struct ifla_vf_rate {
953 __u32 vf;
954 __u32 min_tx_rate;
955 __u32 max_tx_rate;
956};
957
958struct ifla_vf_spoofchk {
959 __u32 vf;
960 __u32 setting;
961};
962
963struct ifla_vf_guid {
964 __u32 vf;
965 __u64 guid;
966};
967
968enum {
969 IFLA_VF_LINK_STATE_AUTO,
970 IFLA_VF_LINK_STATE_ENABLE,
971 IFLA_VF_LINK_STATE_DISABLE,
972 __IFLA_VF_LINK_STATE_MAX,
973};
974
975struct ifla_vf_link_state {
976 __u32 vf;
977 __u32 link_state;
978};
979
980struct ifla_vf_rss_query_en {
981 __u32 vf;
982 __u32 setting;
983};
984
985enum {
986 IFLA_VF_STATS_RX_PACKETS,
987 IFLA_VF_STATS_TX_PACKETS,
988 IFLA_VF_STATS_RX_BYTES,
989 IFLA_VF_STATS_TX_BYTES,
990 IFLA_VF_STATS_BROADCAST,
991 IFLA_VF_STATS_MULTICAST,
992 IFLA_VF_STATS_PAD,
993 IFLA_VF_STATS_RX_DROPPED,
994 IFLA_VF_STATS_TX_DROPPED,
995 __IFLA_VF_STATS_MAX,
996};
997
998#define IFLA_VF_STATS_MAX (__IFLA_VF_STATS_MAX - 1)
999
1000struct ifla_vf_trust {
1001 __u32 vf;
1002 __u32 setting;
1003};
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020enum {
1021 IFLA_VF_PORT_UNSPEC,
1022 IFLA_VF_PORT,
1023 __IFLA_VF_PORT_MAX,
1024};
1025
1026#define IFLA_VF_PORT_MAX (__IFLA_VF_PORT_MAX - 1)
1027
1028enum {
1029 IFLA_PORT_UNSPEC,
1030 IFLA_PORT_VF,
1031 IFLA_PORT_PROFILE,
1032 IFLA_PORT_VSI_TYPE,
1033 IFLA_PORT_INSTANCE_UUID,
1034 IFLA_PORT_HOST_UUID,
1035 IFLA_PORT_REQUEST,
1036 IFLA_PORT_RESPONSE,
1037 __IFLA_PORT_MAX,
1038};
1039
1040#define IFLA_PORT_MAX (__IFLA_PORT_MAX - 1)
1041
1042#define PORT_PROFILE_MAX 40
1043#define PORT_UUID_MAX 16
1044#define PORT_SELF_VF -1
1045
1046enum {
1047 PORT_REQUEST_PREASSOCIATE = 0,
1048 PORT_REQUEST_PREASSOCIATE_RR,
1049 PORT_REQUEST_ASSOCIATE,
1050 PORT_REQUEST_DISASSOCIATE,
1051};
1052
1053enum {
1054 PORT_VDP_RESPONSE_SUCCESS = 0,
1055 PORT_VDP_RESPONSE_INVALID_FORMAT,
1056 PORT_VDP_RESPONSE_INSUFFICIENT_RESOURCES,
1057 PORT_VDP_RESPONSE_UNUSED_VTID,
1058 PORT_VDP_RESPONSE_VTID_VIOLATION,
1059 PORT_VDP_RESPONSE_VTID_VERSION_VIOALTION,
1060 PORT_VDP_RESPONSE_OUT_OF_SYNC,
1061
1062 PORT_PROFILE_RESPONSE_SUCCESS = 0x100,
1063 PORT_PROFILE_RESPONSE_INPROGRESS,
1064 PORT_PROFILE_RESPONSE_INVALID,
1065 PORT_PROFILE_RESPONSE_BADSTATE,
1066 PORT_PROFILE_RESPONSE_INSUFFICIENT_RESOURCES,
1067 PORT_PROFILE_RESPONSE_ERROR,
1068};
1069
1070struct ifla_port_vsi {
1071 __u8 vsi_mgr_id;
1072 __u8 vsi_type_id[3];
1073 __u8 vsi_type_version;
1074 __u8 pad[3];
1075};
1076
1077
1078
1079
1080enum {
1081 IFLA_IPOIB_UNSPEC,
1082 IFLA_IPOIB_PKEY,
1083 IFLA_IPOIB_MODE,
1084 IFLA_IPOIB_UMCAST,
1085 __IFLA_IPOIB_MAX
1086};
1087
1088enum {
1089 IPOIB_MODE_DATAGRAM = 0,
1090 IPOIB_MODE_CONNECTED = 1,
1091};
1092
1093#define IFLA_IPOIB_MAX (__IFLA_IPOIB_MAX - 1)
1094
1095
1096
1097
1098enum {
1099 IFLA_HSR_UNSPEC,
1100 IFLA_HSR_SLAVE1,
1101 IFLA_HSR_SLAVE2,
1102 IFLA_HSR_MULTICAST_SPEC,
1103 IFLA_HSR_SUPERVISION_ADDR,
1104 IFLA_HSR_SEQ_NR,
1105 IFLA_HSR_VERSION,
1106 __IFLA_HSR_MAX,
1107};
1108
1109#define IFLA_HSR_MAX (__IFLA_HSR_MAX - 1)
1110
1111
1112
1113struct if_stats_msg {
1114 __u8 family;
1115 __u8 pad1;
1116 __u16 pad2;
1117 __u32 ifindex;
1118 __u32 filter_mask;
1119};
1120
1121
1122
1123
1124enum {
1125 IFLA_STATS_UNSPEC,
1126 IFLA_STATS_LINK_64,
1127 IFLA_STATS_LINK_XSTATS,
1128 IFLA_STATS_LINK_XSTATS_SLAVE,
1129 IFLA_STATS_LINK_OFFLOAD_XSTATS,
1130 IFLA_STATS_AF_SPEC,
1131 __IFLA_STATS_MAX,
1132};
1133
1134#define IFLA_STATS_MAX (__IFLA_STATS_MAX - 1)
1135
1136#define IFLA_STATS_FILTER_BIT(ATTR) (1 << (ATTR - 1))
1137
1138
1139
1140
1141
1142
1143enum {
1144 LINK_XSTATS_TYPE_UNSPEC,
1145 LINK_XSTATS_TYPE_BRIDGE,
1146 LINK_XSTATS_TYPE_BOND,
1147 __LINK_XSTATS_TYPE_MAX
1148};
1149#define LINK_XSTATS_TYPE_MAX (__LINK_XSTATS_TYPE_MAX - 1)
1150
1151
1152enum {
1153 IFLA_OFFLOAD_XSTATS_UNSPEC,
1154 IFLA_OFFLOAD_XSTATS_CPU_HIT,
1155 __IFLA_OFFLOAD_XSTATS_MAX
1156};
1157#define IFLA_OFFLOAD_XSTATS_MAX (__IFLA_OFFLOAD_XSTATS_MAX - 1)
1158
1159
1160
1161#define XDP_FLAGS_UPDATE_IF_NOEXIST (1U << 0)
1162#define XDP_FLAGS_SKB_MODE (1U << 1)
1163#define XDP_FLAGS_DRV_MODE (1U << 2)
1164#define XDP_FLAGS_HW_MODE (1U << 3)
1165#define XDP_FLAGS_REPLACE (1U << 4)
1166#define XDP_FLAGS_MODES (XDP_FLAGS_SKB_MODE | \
1167 XDP_FLAGS_DRV_MODE | \
1168 XDP_FLAGS_HW_MODE)
1169#define XDP_FLAGS_MASK (XDP_FLAGS_UPDATE_IF_NOEXIST | \
1170 XDP_FLAGS_MODES | XDP_FLAGS_REPLACE)
1171
1172
1173enum {
1174 XDP_ATTACHED_NONE = 0,
1175 XDP_ATTACHED_DRV,
1176 XDP_ATTACHED_SKB,
1177 XDP_ATTACHED_HW,
1178 XDP_ATTACHED_MULTI,
1179};
1180
1181enum {
1182 IFLA_XDP_UNSPEC,
1183 IFLA_XDP_FD,
1184 IFLA_XDP_ATTACHED,
1185 IFLA_XDP_FLAGS,
1186 IFLA_XDP_PROG_ID,
1187 IFLA_XDP_DRV_PROG_ID,
1188 IFLA_XDP_SKB_PROG_ID,
1189 IFLA_XDP_HW_PROG_ID,
1190 IFLA_XDP_EXPECTED_FD,
1191 __IFLA_XDP_MAX,
1192};
1193
1194#define IFLA_XDP_MAX (__IFLA_XDP_MAX - 1)
1195
1196enum {
1197 IFLA_EVENT_NONE,
1198 IFLA_EVENT_REBOOT,
1199 IFLA_EVENT_FEATURES,
1200 IFLA_EVENT_BONDING_FAILOVER,
1201 IFLA_EVENT_NOTIFY_PEERS,
1202 IFLA_EVENT_IGMP_RESEND,
1203 IFLA_EVENT_BONDING_OPTIONS,
1204};
1205
1206
1207
1208enum {
1209 IFLA_TUN_UNSPEC,
1210 IFLA_TUN_OWNER,
1211 IFLA_TUN_GROUP,
1212 IFLA_TUN_TYPE,
1213 IFLA_TUN_PI,
1214 IFLA_TUN_VNET_HDR,
1215 IFLA_TUN_PERSIST,
1216 IFLA_TUN_MULTI_QUEUE,
1217 IFLA_TUN_NUM_QUEUES,
1218 IFLA_TUN_NUM_DISABLED_QUEUES,
1219 __IFLA_TUN_MAX,
1220};
1221
1222#define IFLA_TUN_MAX (__IFLA_TUN_MAX - 1)
1223
1224
1225
1226#define RMNET_FLAGS_INGRESS_DEAGGREGATION (1U << 0)
1227#define RMNET_FLAGS_INGRESS_MAP_COMMANDS (1U << 1)
1228#define RMNET_FLAGS_INGRESS_MAP_CKSUMV4 (1U << 2)
1229#define RMNET_FLAGS_EGRESS_MAP_CKSUMV4 (1U << 3)
1230
1231enum {
1232 IFLA_RMNET_UNSPEC,
1233 IFLA_RMNET_MUX_ID,
1234 IFLA_RMNET_FLAGS,
1235 __IFLA_RMNET_MAX,
1236};
1237
1238#define IFLA_RMNET_MAX (__IFLA_RMNET_MAX - 1)
1239
1240struct ifla_rmnet_flags {
1241 __u32 flags;
1242 __u32 mask;
1243};
1244
1245#endif
1246