Home | History | Annotate | Download | only in linux
      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_MAX
    142 };
    143 #define IFLA_MAX (__IFLA_MAX - 1)
    144 #define IFLA_RTA(r) ((struct rtattr *) (((char *) (r)) + NLMSG_ALIGN(sizeof(struct ifinfomsg))))
    145 #define IFLA_PAYLOAD(n) NLMSG_PAYLOAD(n, sizeof(struct ifinfomsg))
    146 enum {
    147   IFLA_INET_UNSPEC,
    148   IFLA_INET_CONF,
    149   __IFLA_INET_MAX,
    150 };
    151 #define IFLA_INET_MAX (__IFLA_INET_MAX - 1)
    152 enum {
    153   IFLA_INET6_UNSPEC,
    154   IFLA_INET6_FLAGS,
    155   IFLA_INET6_CONF,
    156   IFLA_INET6_STATS,
    157   IFLA_INET6_MCAST,
    158   IFLA_INET6_CACHEINFO,
    159   IFLA_INET6_ICMP6STATS,
    160   IFLA_INET6_TOKEN,
    161   IFLA_INET6_ADDR_GEN_MODE,
    162   __IFLA_INET6_MAX
    163 };
    164 #define IFLA_INET6_MAX (__IFLA_INET6_MAX - 1)
    165 enum in6_addr_gen_mode {
    166   IN6_ADDR_GEN_MODE_EUI64,
    167   IN6_ADDR_GEN_MODE_NONE,
    168   IN6_ADDR_GEN_MODE_STABLE_PRIVACY,
    169   IN6_ADDR_GEN_MODE_RANDOM,
    170 };
    171 enum {
    172   IFLA_BR_UNSPEC,
    173   IFLA_BR_FORWARD_DELAY,
    174   IFLA_BR_HELLO_TIME,
    175   IFLA_BR_MAX_AGE,
    176   IFLA_BR_AGEING_TIME,
    177   IFLA_BR_STP_STATE,
    178   IFLA_BR_PRIORITY,
    179   IFLA_BR_VLAN_FILTERING,
    180   IFLA_BR_VLAN_PROTOCOL,
    181   IFLA_BR_GROUP_FWD_MASK,
    182   IFLA_BR_ROOT_ID,
    183   IFLA_BR_BRIDGE_ID,
    184   IFLA_BR_ROOT_PORT,
    185   IFLA_BR_ROOT_PATH_COST,
    186   IFLA_BR_TOPOLOGY_CHANGE,
    187   IFLA_BR_TOPOLOGY_CHANGE_DETECTED,
    188   IFLA_BR_HELLO_TIMER,
    189   IFLA_BR_TCN_TIMER,
    190   IFLA_BR_TOPOLOGY_CHANGE_TIMER,
    191   IFLA_BR_GC_TIMER,
    192   IFLA_BR_GROUP_ADDR,
    193   IFLA_BR_FDB_FLUSH,
    194   IFLA_BR_MCAST_ROUTER,
    195   IFLA_BR_MCAST_SNOOPING,
    196   IFLA_BR_MCAST_QUERY_USE_IFADDR,
    197   IFLA_BR_MCAST_QUERIER,
    198   IFLA_BR_MCAST_HASH_ELASTICITY,
    199   IFLA_BR_MCAST_HASH_MAX,
    200   IFLA_BR_MCAST_LAST_MEMBER_CNT,
    201   IFLA_BR_MCAST_STARTUP_QUERY_CNT,
    202   IFLA_BR_MCAST_LAST_MEMBER_INTVL,
    203   IFLA_BR_MCAST_MEMBERSHIP_INTVL,
    204   IFLA_BR_MCAST_QUERIER_INTVL,
    205   IFLA_BR_MCAST_QUERY_INTVL,
    206   IFLA_BR_MCAST_QUERY_RESPONSE_INTVL,
    207   IFLA_BR_MCAST_STARTUP_QUERY_INTVL,
    208   IFLA_BR_NF_CALL_IPTABLES,
    209   IFLA_BR_NF_CALL_IP6TABLES,
    210   IFLA_BR_NF_CALL_ARPTABLES,
    211   IFLA_BR_VLAN_DEFAULT_PVID,
    212   IFLA_BR_PAD,
    213   IFLA_BR_VLAN_STATS_ENABLED,
    214   IFLA_BR_MCAST_STATS_ENABLED,
    215   IFLA_BR_MCAST_IGMP_VERSION,
    216   IFLA_BR_MCAST_MLD_VERSION,
    217   __IFLA_BR_MAX,
    218 };
    219 #define IFLA_BR_MAX (__IFLA_BR_MAX - 1)
    220 struct ifla_bridge_id {
    221   __u8 prio[2];
    222   __u8 addr[6];
    223 };
    224 enum {
    225   BRIDGE_MODE_UNSPEC,
    226   BRIDGE_MODE_HAIRPIN,
    227 };
    228 enum {
    229   IFLA_BRPORT_UNSPEC,
    230   IFLA_BRPORT_STATE,
    231   IFLA_BRPORT_PRIORITY,
    232   IFLA_BRPORT_COST,
    233   IFLA_BRPORT_MODE,
    234   IFLA_BRPORT_GUARD,
    235   IFLA_BRPORT_PROTECT,
    236   IFLA_BRPORT_FAST_LEAVE,
    237   IFLA_BRPORT_LEARNING,
    238   IFLA_BRPORT_UNICAST_FLOOD,
    239   IFLA_BRPORT_PROXYARP,
    240   IFLA_BRPORT_LEARNING_SYNC,
    241   IFLA_BRPORT_PROXYARP_WIFI,
    242   IFLA_BRPORT_ROOT_ID,
    243   IFLA_BRPORT_BRIDGE_ID,
    244   IFLA_BRPORT_DESIGNATED_PORT,
    245   IFLA_BRPORT_DESIGNATED_COST,
    246   IFLA_BRPORT_ID,
    247   IFLA_BRPORT_NO,
    248   IFLA_BRPORT_TOPOLOGY_CHANGE_ACK,
    249   IFLA_BRPORT_CONFIG_PENDING,
    250   IFLA_BRPORT_MESSAGE_AGE_TIMER,
    251   IFLA_BRPORT_FORWARD_DELAY_TIMER,
    252   IFLA_BRPORT_HOLD_TIMER,
    253   IFLA_BRPORT_FLUSH,
    254   IFLA_BRPORT_MULTICAST_ROUTER,
    255   IFLA_BRPORT_PAD,
    256   IFLA_BRPORT_MCAST_FLOOD,
    257   IFLA_BRPORT_MCAST_TO_UCAST,
    258   IFLA_BRPORT_VLAN_TUNNEL,
    259   IFLA_BRPORT_BCAST_FLOOD,
    260   IFLA_BRPORT_GROUP_FWD_MASK,
    261   IFLA_BRPORT_NEIGH_SUPPRESS,
    262   __IFLA_BRPORT_MAX
    263 };
    264 #define IFLA_BRPORT_MAX (__IFLA_BRPORT_MAX - 1)
    265 struct ifla_cacheinfo {
    266   __u32 max_reasm_len;
    267   __u32 tstamp;
    268   __u32 reachable_time;
    269   __u32 retrans_time;
    270 };
    271 enum {
    272   IFLA_INFO_UNSPEC,
    273   IFLA_INFO_KIND,
    274   IFLA_INFO_DATA,
    275   IFLA_INFO_XSTATS,
    276   IFLA_INFO_SLAVE_KIND,
    277   IFLA_INFO_SLAVE_DATA,
    278   __IFLA_INFO_MAX,
    279 };
    280 #define IFLA_INFO_MAX (__IFLA_INFO_MAX - 1)
    281 enum {
    282   IFLA_VLAN_UNSPEC,
    283   IFLA_VLAN_ID,
    284   IFLA_VLAN_FLAGS,
    285   IFLA_VLAN_EGRESS_QOS,
    286   IFLA_VLAN_INGRESS_QOS,
    287   IFLA_VLAN_PROTOCOL,
    288   __IFLA_VLAN_MAX,
    289 };
    290 #define IFLA_VLAN_MAX (__IFLA_VLAN_MAX - 1)
    291 struct ifla_vlan_flags {
    292   __u32 flags;
    293   __u32 mask;
    294 };
    295 enum {
    296   IFLA_VLAN_QOS_UNSPEC,
    297   IFLA_VLAN_QOS_MAPPING,
    298   __IFLA_VLAN_QOS_MAX
    299 };
    300 #define IFLA_VLAN_QOS_MAX (__IFLA_VLAN_QOS_MAX - 1)
    301 struct ifla_vlan_qos_mapping {
    302   __u32 from;
    303   __u32 to;
    304 };
    305 enum {
    306   IFLA_MACVLAN_UNSPEC,
    307   IFLA_MACVLAN_MODE,
    308   IFLA_MACVLAN_FLAGS,
    309   IFLA_MACVLAN_MACADDR_MODE,
    310   IFLA_MACVLAN_MACADDR,
    311   IFLA_MACVLAN_MACADDR_DATA,
    312   IFLA_MACVLAN_MACADDR_COUNT,
    313   __IFLA_MACVLAN_MAX,
    314 };
    315 #define IFLA_MACVLAN_MAX (__IFLA_MACVLAN_MAX - 1)
    316 enum macvlan_mode {
    317   MACVLAN_MODE_PRIVATE = 1,
    318   MACVLAN_MODE_VEPA = 2,
    319   MACVLAN_MODE_BRIDGE = 4,
    320   MACVLAN_MODE_PASSTHRU = 8,
    321   MACVLAN_MODE_SOURCE = 16,
    322 };
    323 enum macvlan_macaddr_mode {
    324   MACVLAN_MACADDR_ADD,
    325   MACVLAN_MACADDR_DEL,
    326   MACVLAN_MACADDR_FLUSH,
    327   MACVLAN_MACADDR_SET,
    328 };
    329 #define MACVLAN_FLAG_NOPROMISC 1
    330 enum {
    331   IFLA_VRF_UNSPEC,
    332   IFLA_VRF_TABLE,
    333   __IFLA_VRF_MAX
    334 };
    335 #define IFLA_VRF_MAX (__IFLA_VRF_MAX - 1)
    336 enum {
    337   IFLA_VRF_PORT_UNSPEC,
    338   IFLA_VRF_PORT_TABLE,
    339   __IFLA_VRF_PORT_MAX
    340 };
    341 #define IFLA_VRF_PORT_MAX (__IFLA_VRF_PORT_MAX - 1)
    342 enum {
    343   IFLA_MACSEC_UNSPEC,
    344   IFLA_MACSEC_SCI,
    345   IFLA_MACSEC_PORT,
    346   IFLA_MACSEC_ICV_LEN,
    347   IFLA_MACSEC_CIPHER_SUITE,
    348   IFLA_MACSEC_WINDOW,
    349   IFLA_MACSEC_ENCODING_SA,
    350   IFLA_MACSEC_ENCRYPT,
    351   IFLA_MACSEC_PROTECT,
    352   IFLA_MACSEC_INC_SCI,
    353   IFLA_MACSEC_ES,
    354   IFLA_MACSEC_SCB,
    355   IFLA_MACSEC_REPLAY_PROTECT,
    356   IFLA_MACSEC_VALIDATION,
    357   IFLA_MACSEC_PAD,
    358   __IFLA_MACSEC_MAX,
    359 };
    360 #define IFLA_MACSEC_MAX (__IFLA_MACSEC_MAX - 1)
    361 enum macsec_validation_type {
    362   MACSEC_VALIDATE_DISABLED = 0,
    363   MACSEC_VALIDATE_CHECK = 1,
    364   MACSEC_VALIDATE_STRICT = 2,
    365   __MACSEC_VALIDATE_END,
    366   MACSEC_VALIDATE_MAX = __MACSEC_VALIDATE_END - 1,
    367 };
    368 enum {
    369   IFLA_IPVLAN_UNSPEC,
    370   IFLA_IPVLAN_MODE,
    371   IFLA_IPVLAN_FLAGS,
    372   __IFLA_IPVLAN_MAX
    373 };
    374 #define IFLA_IPVLAN_MAX (__IFLA_IPVLAN_MAX - 1)
    375 enum ipvlan_mode {
    376   IPVLAN_MODE_L2 = 0,
    377   IPVLAN_MODE_L3,
    378   IPVLAN_MODE_L3S,
    379   IPVLAN_MODE_MAX
    380 };
    381 #define IPVLAN_F_PRIVATE 0x01
    382 #define IPVLAN_F_VEPA 0x02
    383 enum {
    384   IFLA_VXLAN_UNSPEC,
    385   IFLA_VXLAN_ID,
    386   IFLA_VXLAN_GROUP,
    387   IFLA_VXLAN_LINK,
    388   IFLA_VXLAN_LOCAL,
    389   IFLA_VXLAN_TTL,
    390   IFLA_VXLAN_TOS,
    391   IFLA_VXLAN_LEARNING,
    392   IFLA_VXLAN_AGEING,
    393   IFLA_VXLAN_LIMIT,
    394   IFLA_VXLAN_PORT_RANGE,
    395   IFLA_VXLAN_PROXY,
    396   IFLA_VXLAN_RSC,
    397   IFLA_VXLAN_L2MISS,
    398   IFLA_VXLAN_L3MISS,
    399   IFLA_VXLAN_PORT,
    400   IFLA_VXLAN_GROUP6,
    401   IFLA_VXLAN_LOCAL6,
    402   IFLA_VXLAN_UDP_CSUM,
    403   IFLA_VXLAN_UDP_ZERO_CSUM6_TX,
    404   IFLA_VXLAN_UDP_ZERO_CSUM6_RX,
    405   IFLA_VXLAN_REMCSUM_TX,
    406   IFLA_VXLAN_REMCSUM_RX,
    407   IFLA_VXLAN_GBP,
    408   IFLA_VXLAN_REMCSUM_NOPARTIAL,
    409   IFLA_VXLAN_COLLECT_METADATA,
    410   IFLA_VXLAN_LABEL,
    411   IFLA_VXLAN_GPE,
    412   __IFLA_VXLAN_MAX
    413 };
    414 #define IFLA_VXLAN_MAX (__IFLA_VXLAN_MAX - 1)
    415 struct ifla_vxlan_port_range {
    416   __be16 low;
    417   __be16 high;
    418 };
    419 enum {
    420   IFLA_GENEVE_UNSPEC,
    421   IFLA_GENEVE_ID,
    422   IFLA_GENEVE_REMOTE,
    423   IFLA_GENEVE_TTL,
    424   IFLA_GENEVE_TOS,
    425   IFLA_GENEVE_PORT,
    426   IFLA_GENEVE_COLLECT_METADATA,
    427   IFLA_GENEVE_REMOTE6,
    428   IFLA_GENEVE_UDP_CSUM,
    429   IFLA_GENEVE_UDP_ZERO_CSUM6_TX,
    430   IFLA_GENEVE_UDP_ZERO_CSUM6_RX,
    431   IFLA_GENEVE_LABEL,
    432   __IFLA_GENEVE_MAX
    433 };
    434 #define IFLA_GENEVE_MAX (__IFLA_GENEVE_MAX - 1)
    435 enum {
    436   IFLA_PPP_UNSPEC,
    437   IFLA_PPP_DEV_FD,
    438   __IFLA_PPP_MAX
    439 };
    440 #define IFLA_PPP_MAX (__IFLA_PPP_MAX - 1)
    441 enum ifla_gtp_role {
    442   GTP_ROLE_GGSN = 0,
    443   GTP_ROLE_SGSN,
    444 };
    445 enum {
    446   IFLA_GTP_UNSPEC,
    447   IFLA_GTP_FD0,
    448   IFLA_GTP_FD1,
    449   IFLA_GTP_PDP_HASHSIZE,
    450   IFLA_GTP_ROLE,
    451   __IFLA_GTP_MAX,
    452 };
    453 #define IFLA_GTP_MAX (__IFLA_GTP_MAX - 1)
    454 enum {
    455   IFLA_BOND_UNSPEC,
    456   IFLA_BOND_MODE,
    457   IFLA_BOND_ACTIVE_SLAVE,
    458   IFLA_BOND_MIIMON,
    459   IFLA_BOND_UPDELAY,
    460   IFLA_BOND_DOWNDELAY,
    461   IFLA_BOND_USE_CARRIER,
    462   IFLA_BOND_ARP_INTERVAL,
    463   IFLA_BOND_ARP_IP_TARGET,
    464   IFLA_BOND_ARP_VALIDATE,
    465   IFLA_BOND_ARP_ALL_TARGETS,
    466   IFLA_BOND_PRIMARY,
    467   IFLA_BOND_PRIMARY_RESELECT,
    468   IFLA_BOND_FAIL_OVER_MAC,
    469   IFLA_BOND_XMIT_HASH_POLICY,
    470   IFLA_BOND_RESEND_IGMP,
    471   IFLA_BOND_NUM_PEER_NOTIF,
    472   IFLA_BOND_ALL_SLAVES_ACTIVE,
    473   IFLA_BOND_MIN_LINKS,
    474   IFLA_BOND_LP_INTERVAL,
    475   IFLA_BOND_PACKETS_PER_SLAVE,
    476   IFLA_BOND_AD_LACP_RATE,
    477   IFLA_BOND_AD_SELECT,
    478   IFLA_BOND_AD_INFO,
    479   IFLA_BOND_AD_ACTOR_SYS_PRIO,
    480   IFLA_BOND_AD_USER_PORT_KEY,
    481   IFLA_BOND_AD_ACTOR_SYSTEM,
    482   IFLA_BOND_TLB_DYNAMIC_LB,
    483   __IFLA_BOND_MAX,
    484 };
    485 #define IFLA_BOND_MAX (__IFLA_BOND_MAX - 1)
    486 enum {
    487   IFLA_BOND_AD_INFO_UNSPEC,
    488   IFLA_BOND_AD_INFO_AGGREGATOR,
    489   IFLA_BOND_AD_INFO_NUM_PORTS,
    490   IFLA_BOND_AD_INFO_ACTOR_KEY,
    491   IFLA_BOND_AD_INFO_PARTNER_KEY,
    492   IFLA_BOND_AD_INFO_PARTNER_MAC,
    493   __IFLA_BOND_AD_INFO_MAX,
    494 };
    495 #define IFLA_BOND_AD_INFO_MAX (__IFLA_BOND_AD_INFO_MAX - 1)
    496 enum {
    497   IFLA_BOND_SLAVE_UNSPEC,
    498   IFLA_BOND_SLAVE_STATE,
    499   IFLA_BOND_SLAVE_MII_STATUS,
    500   IFLA_BOND_SLAVE_LINK_FAILURE_COUNT,
    501   IFLA_BOND_SLAVE_PERM_HWADDR,
    502   IFLA_BOND_SLAVE_QUEUE_ID,
    503   IFLA_BOND_SLAVE_AD_AGGREGATOR_ID,
    504   IFLA_BOND_SLAVE_AD_ACTOR_OPER_PORT_STATE,
    505   IFLA_BOND_SLAVE_AD_PARTNER_OPER_PORT_STATE,
    506   __IFLA_BOND_SLAVE_MAX,
    507 };
    508 #define IFLA_BOND_SLAVE_MAX (__IFLA_BOND_SLAVE_MAX - 1)
    509 enum {
    510   IFLA_VF_INFO_UNSPEC,
    511   IFLA_VF_INFO,
    512   __IFLA_VF_INFO_MAX,
    513 };
    514 #define IFLA_VF_INFO_MAX (__IFLA_VF_INFO_MAX - 1)
    515 enum {
    516   IFLA_VF_UNSPEC,
    517   IFLA_VF_MAC,
    518   IFLA_VF_VLAN,
    519   IFLA_VF_TX_RATE,
    520   IFLA_VF_SPOOFCHK,
    521   IFLA_VF_LINK_STATE,
    522   IFLA_VF_RATE,
    523   IFLA_VF_RSS_QUERY_EN,
    524   IFLA_VF_STATS,
    525   IFLA_VF_TRUST,
    526   IFLA_VF_IB_NODE_GUID,
    527   IFLA_VF_IB_PORT_GUID,
    528   IFLA_VF_VLAN_LIST,
    529   __IFLA_VF_MAX,
    530 };
    531 #define IFLA_VF_MAX (__IFLA_VF_MAX - 1)
    532 struct ifla_vf_mac {
    533   __u32 vf;
    534   __u8 mac[32];
    535 };
    536 struct ifla_vf_vlan {
    537   __u32 vf;
    538   __u32 vlan;
    539   __u32 qos;
    540 };
    541 enum {
    542   IFLA_VF_VLAN_INFO_UNSPEC,
    543   IFLA_VF_VLAN_INFO,
    544   __IFLA_VF_VLAN_INFO_MAX,
    545 };
    546 #define IFLA_VF_VLAN_INFO_MAX (__IFLA_VF_VLAN_INFO_MAX - 1)
    547 #define MAX_VLAN_LIST_LEN 1
    548 struct ifla_vf_vlan_info {
    549   __u32 vf;
    550   __u32 vlan;
    551   __u32 qos;
    552   __be16 vlan_proto;
    553 };
    554 struct ifla_vf_tx_rate {
    555   __u32 vf;
    556   __u32 rate;
    557 };
    558 struct ifla_vf_rate {
    559   __u32 vf;
    560   __u32 min_tx_rate;
    561   __u32 max_tx_rate;
    562 };
    563 struct ifla_vf_spoofchk {
    564   __u32 vf;
    565   __u32 setting;
    566 };
    567 struct ifla_vf_guid {
    568   __u32 vf;
    569   __u64 guid;
    570 };
    571 enum {
    572   IFLA_VF_LINK_STATE_AUTO,
    573   IFLA_VF_LINK_STATE_ENABLE,
    574   IFLA_VF_LINK_STATE_DISABLE,
    575   __IFLA_VF_LINK_STATE_MAX,
    576 };
    577 struct ifla_vf_link_state {
    578   __u32 vf;
    579   __u32 link_state;
    580 };
    581 struct ifla_vf_rss_query_en {
    582   __u32 vf;
    583   __u32 setting;
    584 };
    585 enum {
    586   IFLA_VF_STATS_RX_PACKETS,
    587   IFLA_VF_STATS_TX_PACKETS,
    588   IFLA_VF_STATS_RX_BYTES,
    589   IFLA_VF_STATS_TX_BYTES,
    590   IFLA_VF_STATS_BROADCAST,
    591   IFLA_VF_STATS_MULTICAST,
    592   IFLA_VF_STATS_PAD,
    593   __IFLA_VF_STATS_MAX,
    594 };
    595 #define IFLA_VF_STATS_MAX (__IFLA_VF_STATS_MAX - 1)
    596 struct ifla_vf_trust {
    597   __u32 vf;
    598   __u32 setting;
    599 };
    600 enum {
    601   IFLA_VF_PORT_UNSPEC,
    602   IFLA_VF_PORT,
    603   __IFLA_VF_PORT_MAX,
    604 };
    605 #define IFLA_VF_PORT_MAX (__IFLA_VF_PORT_MAX - 1)
    606 enum {
    607   IFLA_PORT_UNSPEC,
    608   IFLA_PORT_VF,
    609   IFLA_PORT_PROFILE,
    610   IFLA_PORT_VSI_TYPE,
    611   IFLA_PORT_INSTANCE_UUID,
    612   IFLA_PORT_HOST_UUID,
    613   IFLA_PORT_REQUEST,
    614   IFLA_PORT_RESPONSE,
    615   __IFLA_PORT_MAX,
    616 };
    617 #define IFLA_PORT_MAX (__IFLA_PORT_MAX - 1)
    618 #define PORT_PROFILE_MAX 40
    619 #define PORT_UUID_MAX 16
    620 #define PORT_SELF_VF - 1
    621 enum {
    622   PORT_REQUEST_PREASSOCIATE = 0,
    623   PORT_REQUEST_PREASSOCIATE_RR,
    624   PORT_REQUEST_ASSOCIATE,
    625   PORT_REQUEST_DISASSOCIATE,
    626 };
    627 enum {
    628   PORT_VDP_RESPONSE_SUCCESS = 0,
    629   PORT_VDP_RESPONSE_INVALID_FORMAT,
    630   PORT_VDP_RESPONSE_INSUFFICIENT_RESOURCES,
    631   PORT_VDP_RESPONSE_UNUSED_VTID,
    632   PORT_VDP_RESPONSE_VTID_VIOLATION,
    633   PORT_VDP_RESPONSE_VTID_VERSION_VIOALTION,
    634   PORT_VDP_RESPONSE_OUT_OF_SYNC,
    635   PORT_PROFILE_RESPONSE_SUCCESS = 0x100,
    636   PORT_PROFILE_RESPONSE_INPROGRESS,
    637   PORT_PROFILE_RESPONSE_INVALID,
    638   PORT_PROFILE_RESPONSE_BADSTATE,
    639   PORT_PROFILE_RESPONSE_INSUFFICIENT_RESOURCES,
    640   PORT_PROFILE_RESPONSE_ERROR,
    641 };
    642 struct ifla_port_vsi {
    643   __u8 vsi_mgr_id;
    644   __u8 vsi_type_id[3];
    645   __u8 vsi_type_version;
    646   __u8 pad[3];
    647 };
    648 enum {
    649   IFLA_IPOIB_UNSPEC,
    650   IFLA_IPOIB_PKEY,
    651   IFLA_IPOIB_MODE,
    652   IFLA_IPOIB_UMCAST,
    653   __IFLA_IPOIB_MAX
    654 };
    655 enum {
    656   IPOIB_MODE_DATAGRAM = 0,
    657   IPOIB_MODE_CONNECTED = 1,
    658 };
    659 #define IFLA_IPOIB_MAX (__IFLA_IPOIB_MAX - 1)
    660 enum {
    661   IFLA_HSR_UNSPEC,
    662   IFLA_HSR_SLAVE1,
    663   IFLA_HSR_SLAVE2,
    664   IFLA_HSR_MULTICAST_SPEC,
    665   IFLA_HSR_SUPERVISION_ADDR,
    666   IFLA_HSR_SEQ_NR,
    667   IFLA_HSR_VERSION,
    668   __IFLA_HSR_MAX,
    669 };
    670 #define IFLA_HSR_MAX (__IFLA_HSR_MAX - 1)
    671 struct if_stats_msg {
    672   __u8 family;
    673   __u8 pad1;
    674   __u16 pad2;
    675   __u32 ifindex;
    676   __u32 filter_mask;
    677 };
    678 enum {
    679   IFLA_STATS_UNSPEC,
    680   IFLA_STATS_LINK_64,
    681   IFLA_STATS_LINK_XSTATS,
    682   IFLA_STATS_LINK_XSTATS_SLAVE,
    683   IFLA_STATS_LINK_OFFLOAD_XSTATS,
    684   IFLA_STATS_AF_SPEC,
    685   __IFLA_STATS_MAX,
    686 };
    687 #define IFLA_STATS_MAX (__IFLA_STATS_MAX - 1)
    688 #define IFLA_STATS_FILTER_BIT(ATTR) (1 << (ATTR - 1))
    689 enum {
    690   LINK_XSTATS_TYPE_UNSPEC,
    691   LINK_XSTATS_TYPE_BRIDGE,
    692   __LINK_XSTATS_TYPE_MAX
    693 };
    694 #define LINK_XSTATS_TYPE_MAX (__LINK_XSTATS_TYPE_MAX - 1)
    695 enum {
    696   IFLA_OFFLOAD_XSTATS_UNSPEC,
    697   IFLA_OFFLOAD_XSTATS_CPU_HIT,
    698   __IFLA_OFFLOAD_XSTATS_MAX
    699 };
    700 #define IFLA_OFFLOAD_XSTATS_MAX (__IFLA_OFFLOAD_XSTATS_MAX - 1)
    701 #define XDP_FLAGS_UPDATE_IF_NOEXIST (1U << 0)
    702 #define XDP_FLAGS_SKB_MODE (1U << 1)
    703 #define XDP_FLAGS_DRV_MODE (1U << 2)
    704 #define XDP_FLAGS_HW_MODE (1U << 3)
    705 #define XDP_FLAGS_MODES (XDP_FLAGS_SKB_MODE | XDP_FLAGS_DRV_MODE | XDP_FLAGS_HW_MODE)
    706 #define XDP_FLAGS_MASK (XDP_FLAGS_UPDATE_IF_NOEXIST | XDP_FLAGS_MODES)
    707 enum {
    708   XDP_ATTACHED_NONE = 0,
    709   XDP_ATTACHED_DRV,
    710   XDP_ATTACHED_SKB,
    711   XDP_ATTACHED_HW,
    712 };
    713 enum {
    714   IFLA_XDP_UNSPEC,
    715   IFLA_XDP_FD,
    716   IFLA_XDP_ATTACHED,
    717   IFLA_XDP_FLAGS,
    718   IFLA_XDP_PROG_ID,
    719   __IFLA_XDP_MAX,
    720 };
    721 #define IFLA_XDP_MAX (__IFLA_XDP_MAX - 1)
    722 enum {
    723   IFLA_EVENT_NONE,
    724   IFLA_EVENT_REBOOT,
    725   IFLA_EVENT_FEATURES,
    726   IFLA_EVENT_BONDING_FAILOVER,
    727   IFLA_EVENT_NOTIFY_PEERS,
    728   IFLA_EVENT_IGMP_RESEND,
    729   IFLA_EVENT_BONDING_OPTIONS,
    730 };
    731 #endif
    732