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  ****************************************************************************
     11  ****************************************************************************/
     12 #ifndef __LINUX_RTNETLINK_H
     13 #define __LINUX_RTNETLINK_H
     14 
     15 #include <linux/netlink.h>
     16 
     17 enum {
     18  RTM_BASE = 16,
     19 #define RTM_BASE RTM_BASE
     20 
     21  RTM_NEWLINK = 16,
     22 #define RTM_NEWLINK RTM_NEWLINK
     23  RTM_DELLINK,
     24 #define RTM_DELLINK RTM_DELLINK
     25  RTM_GETLINK,
     26 #define RTM_GETLINK RTM_GETLINK
     27  RTM_SETLINK,
     28 #define RTM_SETLINK RTM_SETLINK
     29 
     30  RTM_NEWADDR = 20,
     31 #define RTM_NEWADDR RTM_NEWADDR
     32  RTM_DELADDR,
     33 #define RTM_DELADDR RTM_DELADDR
     34  RTM_GETADDR,
     35 #define RTM_GETADDR RTM_GETADDR
     36 
     37  RTM_NEWROUTE = 24,
     38 #define RTM_NEWROUTE RTM_NEWROUTE
     39  RTM_DELROUTE,
     40 #define RTM_DELROUTE RTM_DELROUTE
     41  RTM_GETROUTE,
     42 #define RTM_GETROUTE RTM_GETROUTE
     43 
     44  RTM_NEWNEIGH = 28,
     45 #define RTM_NEWNEIGH RTM_NEWNEIGH
     46  RTM_DELNEIGH,
     47 #define RTM_DELNEIGH RTM_DELNEIGH
     48  RTM_GETNEIGH,
     49 #define RTM_GETNEIGH RTM_GETNEIGH
     50 
     51  RTM_NEWRULE = 32,
     52 #define RTM_NEWRULE RTM_NEWRULE
     53  RTM_DELRULE,
     54 #define RTM_DELRULE RTM_DELRULE
     55  RTM_GETRULE,
     56 #define RTM_GETRULE RTM_GETRULE
     57 
     58  RTM_NEWQDISC = 36,
     59 #define RTM_NEWQDISC RTM_NEWQDISC
     60  RTM_DELQDISC,
     61 #define RTM_DELQDISC RTM_DELQDISC
     62  RTM_GETQDISC,
     63 #define RTM_GETQDISC RTM_GETQDISC
     64 
     65  RTM_NEWTCLASS = 40,
     66 #define RTM_NEWTCLASS RTM_NEWTCLASS
     67  RTM_DELTCLASS,
     68 #define RTM_DELTCLASS RTM_DELTCLASS
     69  RTM_GETTCLASS,
     70 #define RTM_GETTCLASS RTM_GETTCLASS
     71 
     72  RTM_NEWTFILTER = 44,
     73 #define RTM_NEWTFILTER RTM_NEWTFILTER
     74  RTM_DELTFILTER,
     75 #define RTM_DELTFILTER RTM_DELTFILTER
     76  RTM_GETTFILTER,
     77 #define RTM_GETTFILTER RTM_GETTFILTER
     78 
     79  RTM_NEWACTION = 48,
     80 #define RTM_NEWACTION RTM_NEWACTION
     81  RTM_DELACTION,
     82 #define RTM_DELACTION RTM_DELACTION
     83  RTM_GETACTION,
     84 #define RTM_GETACTION RTM_GETACTION
     85 
     86  RTM_NEWPREFIX = 52,
     87 #define RTM_NEWPREFIX RTM_NEWPREFIX
     88  RTM_GETPREFIX = 54,
     89 #define RTM_GETPREFIX RTM_GETPREFIX
     90 
     91  RTM_GETMULTICAST = 58,
     92 #define RTM_GETMULTICAST RTM_GETMULTICAST
     93 
     94  RTM_GETANYCAST = 62,
     95 #define RTM_GETANYCAST RTM_GETANYCAST
     96 
     97  RTM_NEWNEIGHTBL = 64,
     98 #define RTM_NEWNEIGHTBL RTM_NEWNEIGHTBL
     99  RTM_GETNEIGHTBL = 66,
    100 #define RTM_GETNEIGHTBL RTM_GETNEIGHTBL
    101  RTM_SETNEIGHTBL,
    102 #define RTM_SETNEIGHTBL RTM_SETNEIGHTBL
    103 
    104  __RTM_MAX,
    105 #define RTM_MAX (((__RTM_MAX + 3) & ~3) - 1)
    106 };
    107 
    108 #define RTM_NR_MSGTYPES (RTM_MAX + 1 - RTM_BASE)
    109 #define RTM_NR_FAMILIES (RTM_NR_MSGTYPES >> 2)
    110 #define RTM_FAM(cmd) (((cmd) - RTM_BASE) >> 2)
    111 
    112 struct rtattr
    113 {
    114  unsigned short rta_len;
    115  unsigned short rta_type;
    116 };
    117 
    118 #define RTA_ALIGNTO 4
    119 #define RTA_ALIGN(len) ( ((len)+RTA_ALIGNTO-1) & ~(RTA_ALIGNTO-1) )
    120 #define RTA_OK(rta,len) ((len) >= (int)sizeof(struct rtattr) &&   (rta)->rta_len >= sizeof(struct rtattr) &&   (rta)->rta_len <= (len))
    121 #define RTA_NEXT(rta,attrlen) ((attrlen) -= RTA_ALIGN((rta)->rta_len),   (struct rtattr*)(((char*)(rta)) + RTA_ALIGN((rta)->rta_len)))
    122 #define RTA_LENGTH(len) (RTA_ALIGN(sizeof(struct rtattr)) + (len))
    123 #define RTA_SPACE(len) RTA_ALIGN(RTA_LENGTH(len))
    124 #define RTA_DATA(rta) ((void*)(((char*)(rta)) + RTA_LENGTH(0)))
    125 #define RTA_PAYLOAD(rta) ((int)((rta)->rta_len) - RTA_LENGTH(0))
    126 
    127 struct rtmsg
    128 {
    129  unsigned char rtm_family;
    130  unsigned char rtm_dst_len;
    131  unsigned char rtm_src_len;
    132  unsigned char rtm_tos;
    133 
    134  unsigned char rtm_table;
    135  unsigned char rtm_protocol;
    136  unsigned char rtm_scope;
    137  unsigned char rtm_type;
    138 
    139  unsigned rtm_flags;
    140 };
    141 
    142 enum
    143 {
    144  RTN_UNSPEC,
    145  RTN_UNICAST,
    146  RTN_LOCAL,
    147  RTN_BROADCAST,
    148  RTN_ANYCAST,
    149  RTN_MULTICAST,
    150  RTN_BLACKHOLE,
    151  RTN_UNREACHABLE,
    152  RTN_PROHIBIT,
    153  RTN_THROW,
    154  RTN_NAT,
    155  RTN_XRESOLVE,
    156  __RTN_MAX
    157 };
    158 
    159 #define RTN_MAX (__RTN_MAX - 1)
    160 
    161 #define RTPROT_UNSPEC 0
    162 #define RTPROT_REDIRECT 1
    163 #define RTPROT_KERNEL 2
    164 #define RTPROT_BOOT 3
    165 #define RTPROT_STATIC 4
    166 
    167 #define RTPROT_GATED 8
    168 #define RTPROT_RA 9
    169 #define RTPROT_MRT 10
    170 #define RTPROT_ZEBRA 11
    171 #define RTPROT_BIRD 12
    172 #define RTPROT_DNROUTED 13
    173 #define RTPROT_XORP 14
    174 #define RTPROT_NTK 15
    175 
    176 enum rt_scope_t
    177 {
    178  RT_SCOPE_UNIVERSE=0,
    179 
    180  RT_SCOPE_SITE=200,
    181  RT_SCOPE_LINK=253,
    182  RT_SCOPE_HOST=254,
    183  RT_SCOPE_NOWHERE=255
    184 };
    185 
    186 #define RTM_F_NOTIFY 0x100
    187 #define RTM_F_CLONED 0x200
    188 #define RTM_F_EQUALIZE 0x400
    189 #define RTM_F_PREFIX 0x800
    190 
    191 enum rt_class_t
    192 {
    193  RT_TABLE_UNSPEC=0,
    194 
    195  RT_TABLE_DEFAULT=253,
    196  RT_TABLE_MAIN=254,
    197  RT_TABLE_LOCAL=255,
    198  __RT_TABLE_MAX
    199 };
    200 #define RT_TABLE_MAX (__RT_TABLE_MAX - 1)
    201 
    202 enum rtattr_type_t
    203 {
    204  RTA_UNSPEC,
    205  RTA_DST,
    206  RTA_SRC,
    207  RTA_IIF,
    208  RTA_OIF,
    209  RTA_GATEWAY,
    210  RTA_PRIORITY,
    211  RTA_PREFSRC,
    212  RTA_METRICS,
    213  RTA_MULTIPATH,
    214  RTA_PROTOINFO,
    215  RTA_FLOW,
    216  RTA_CACHEINFO,
    217  RTA_SESSION,
    218  RTA_MP_ALGO,
    219  __RTA_MAX
    220 };
    221 
    222 #define RTA_MAX (__RTA_MAX - 1)
    223 
    224 #define RTM_RTA(r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct rtmsg))))
    225 #define RTM_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct rtmsg))
    226 
    227 struct rtnexthop
    228 {
    229  unsigned short rtnh_len;
    230  unsigned char rtnh_flags;
    231  unsigned char rtnh_hops;
    232  int rtnh_ifindex;
    233 };
    234 
    235 #define RTNH_F_DEAD 1
    236 #define RTNH_F_PERVASIVE 2
    237 #define RTNH_F_ONLINK 4
    238 
    239 #define RTNH_ALIGNTO 4
    240 #define RTNH_ALIGN(len) ( ((len)+RTNH_ALIGNTO-1) & ~(RTNH_ALIGNTO-1) )
    241 #define RTNH_OK(rtnh,len) ((rtnh)->rtnh_len >= sizeof(struct rtnexthop) &&   ((int)(rtnh)->rtnh_len) <= (len))
    242 #define RTNH_NEXT(rtnh) ((struct rtnexthop*)(((char*)(rtnh)) + RTNH_ALIGN((rtnh)->rtnh_len)))
    243 #define RTNH_LENGTH(len) (RTNH_ALIGN(sizeof(struct rtnexthop)) + (len))
    244 #define RTNH_SPACE(len) RTNH_ALIGN(RTNH_LENGTH(len))
    245 #define RTNH_DATA(rtnh) ((struct rtattr*)(((char*)(rtnh)) + RTNH_LENGTH(0)))
    246 
    247 struct rta_cacheinfo
    248 {
    249  __u32 rta_clntref;
    250  __u32 rta_lastuse;
    251  __s32 rta_expires;
    252  __u32 rta_error;
    253  __u32 rta_used;
    254 
    255 #define RTNETLINK_HAVE_PEERINFO 1
    256  __u32 rta_id;
    257  __u32 rta_ts;
    258  __u32 rta_tsage;
    259 };
    260 
    261 enum
    262 {
    263  RTAX_UNSPEC,
    264 #define RTAX_UNSPEC RTAX_UNSPEC
    265  RTAX_LOCK,
    266 #define RTAX_LOCK RTAX_LOCK
    267  RTAX_MTU,
    268 #define RTAX_MTU RTAX_MTU
    269  RTAX_WINDOW,
    270 #define RTAX_WINDOW RTAX_WINDOW
    271  RTAX_RTT,
    272 #define RTAX_RTT RTAX_RTT
    273  RTAX_RTTVAR,
    274 #define RTAX_RTTVAR RTAX_RTTVAR
    275  RTAX_SSTHRESH,
    276 #define RTAX_SSTHRESH RTAX_SSTHRESH
    277  RTAX_CWND,
    278 #define RTAX_CWND RTAX_CWND
    279  RTAX_ADVMSS,
    280 #define RTAX_ADVMSS RTAX_ADVMSS
    281  RTAX_REORDERING,
    282 #define RTAX_REORDERING RTAX_REORDERING
    283  RTAX_HOPLIMIT,
    284 #define RTAX_HOPLIMIT RTAX_HOPLIMIT
    285  RTAX_INITCWND,
    286 #define RTAX_INITCWND RTAX_INITCWND
    287  RTAX_FEATURES,
    288 #define RTAX_FEATURES RTAX_FEATURES
    289  __RTAX_MAX
    290 };
    291 
    292 #define RTAX_MAX (__RTAX_MAX - 1)
    293 
    294 #define RTAX_FEATURE_ECN 0x00000001
    295 #define RTAX_FEATURE_SACK 0x00000002
    296 #define RTAX_FEATURE_TIMESTAMP 0x00000004
    297 #define RTAX_FEATURE_ALLFRAG 0x00000008
    298 
    299 struct rta_session
    300 {
    301  __u8 proto;
    302  __u8 pad1;
    303  __u16 pad2;
    304 
    305  union {
    306  struct {
    307  __u16 sport;
    308  __u16 dport;
    309  } ports;
    310 
    311  struct {
    312  __u8 type;
    313  __u8 code;
    314  __u16 ident;
    315  } icmpt;
    316 
    317  __u32 spi;
    318  } u;
    319 };
    320 
    321 struct ifaddrmsg
    322 {
    323  unsigned char ifa_family;
    324  unsigned char ifa_prefixlen;
    325  unsigned char ifa_flags;
    326  unsigned char ifa_scope;
    327  int ifa_index;
    328 };
    329 
    330 enum
    331 {
    332  IFA_UNSPEC,
    333  IFA_ADDRESS,
    334  IFA_LOCAL,
    335  IFA_LABEL,
    336  IFA_BROADCAST,
    337  IFA_ANYCAST,
    338  IFA_CACHEINFO,
    339  IFA_MULTICAST,
    340  __IFA_MAX
    341 };
    342 
    343 #define IFA_MAX (__IFA_MAX - 1)
    344 
    345 #define IFA_F_SECONDARY 0x01
    346 #define IFA_F_TEMPORARY IFA_F_SECONDARY
    347 
    348 #define IFA_F_DEPRECATED 0x20
    349 #define IFA_F_TENTATIVE 0x40
    350 #define IFA_F_PERMANENT 0x80
    351 
    352 struct ifa_cacheinfo
    353 {
    354  __u32 ifa_prefered;
    355  __u32 ifa_valid;
    356  __u32 cstamp;
    357  __u32 tstamp;
    358 };
    359 
    360 #define IFA_RTA(r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ifaddrmsg))))
    361 #define IFA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct ifaddrmsg))
    362 
    363 struct ndmsg
    364 {
    365  unsigned char ndm_family;
    366  unsigned char ndm_pad1;
    367  unsigned short ndm_pad2;
    368  int ndm_ifindex;
    369  __u16 ndm_state;
    370  __u8 ndm_flags;
    371  __u8 ndm_type;
    372 };
    373 
    374 enum
    375 {
    376  NDA_UNSPEC,
    377  NDA_DST,
    378  NDA_LLADDR,
    379  NDA_CACHEINFO,
    380  NDA_PROBES,
    381  __NDA_MAX
    382 };
    383 
    384 #define NDA_MAX (__NDA_MAX - 1)
    385 
    386 #define NDA_RTA(r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ndmsg))))
    387 #define NDA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct ndmsg))
    388 
    389 #define NTF_PROXY 0x08
    390 #define NTF_ROUTER 0x80
    391 
    392 #define NUD_INCOMPLETE 0x01
    393 #define NUD_REACHABLE 0x02
    394 #define NUD_STALE 0x04
    395 #define NUD_DELAY 0x08
    396 #define NUD_PROBE 0x10
    397 #define NUD_FAILED 0x20
    398 
    399 #define NUD_NOARP 0x40
    400 #define NUD_PERMANENT 0x80
    401 #define NUD_NONE 0x00
    402 
    403 struct nda_cacheinfo
    404 {
    405  __u32 ndm_confirmed;
    406  __u32 ndm_used;
    407  __u32 ndm_updated;
    408  __u32 ndm_refcnt;
    409 };
    410 
    411 struct ndt_stats
    412 {
    413  __u64 ndts_allocs;
    414  __u64 ndts_destroys;
    415  __u64 ndts_hash_grows;
    416  __u64 ndts_res_failed;
    417  __u64 ndts_lookups;
    418  __u64 ndts_hits;
    419  __u64 ndts_rcv_probes_mcast;
    420  __u64 ndts_rcv_probes_ucast;
    421  __u64 ndts_periodic_gc_runs;
    422  __u64 ndts_forced_gc_runs;
    423 };
    424 
    425 enum {
    426  NDTPA_UNSPEC,
    427  NDTPA_IFINDEX,
    428  NDTPA_REFCNT,
    429  NDTPA_REACHABLE_TIME,
    430  NDTPA_BASE_REACHABLE_TIME,
    431  NDTPA_RETRANS_TIME,
    432  NDTPA_GC_STALETIME,
    433  NDTPA_DELAY_PROBE_TIME,
    434  NDTPA_QUEUE_LEN,
    435  NDTPA_APP_PROBES,
    436  NDTPA_UCAST_PROBES,
    437  NDTPA_MCAST_PROBES,
    438  NDTPA_ANYCAST_DELAY,
    439  NDTPA_PROXY_DELAY,
    440  NDTPA_PROXY_QLEN,
    441  NDTPA_LOCKTIME,
    442  __NDTPA_MAX
    443 };
    444 #define NDTPA_MAX (__NDTPA_MAX - 1)
    445 
    446 struct ndtmsg
    447 {
    448  __u8 ndtm_family;
    449  __u8 ndtm_pad1;
    450  __u16 ndtm_pad2;
    451 };
    452 
    453 struct ndt_config
    454 {
    455  __u16 ndtc_key_len;
    456  __u16 ndtc_entry_size;
    457  __u32 ndtc_entries;
    458  __u32 ndtc_last_flush;
    459  __u32 ndtc_last_rand;
    460  __u32 ndtc_hash_rnd;
    461  __u32 ndtc_hash_mask;
    462  __u32 ndtc_hash_chain_gc;
    463  __u32 ndtc_proxy_qlen;
    464 };
    465 
    466 enum {
    467  NDTA_UNSPEC,
    468  NDTA_NAME,
    469  NDTA_THRESH1,
    470  NDTA_THRESH2,
    471  NDTA_THRESH3,
    472  NDTA_CONFIG,
    473  NDTA_PARMS,
    474  NDTA_STATS,
    475  NDTA_GC_INTERVAL,
    476  __NDTA_MAX
    477 };
    478 #define NDTA_MAX (__NDTA_MAX - 1)
    479 
    480 #define NDTA_RTA(r) ((struct rtattr*)(((char*)(r)) +   NLMSG_ALIGN(sizeof(struct ndtmsg))))
    481 #define NDTA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct ndtmsg))
    482 
    483 struct rtgenmsg
    484 {
    485  unsigned char rtgen_family;
    486 };
    487 
    488 struct ifinfomsg
    489 {
    490  unsigned char ifi_family;
    491  unsigned char __ifi_pad;
    492  unsigned short ifi_type;
    493  int ifi_index;
    494  unsigned ifi_flags;
    495  unsigned ifi_change;
    496 };
    497 
    498 struct prefixmsg
    499 {
    500  unsigned char prefix_family;
    501  unsigned char prefix_pad1;
    502  unsigned short prefix_pad2;
    503  int prefix_ifindex;
    504  unsigned char prefix_type;
    505  unsigned char prefix_len;
    506  unsigned char prefix_flags;
    507  unsigned char prefix_pad3;
    508 };
    509 
    510 enum
    511 {
    512  PREFIX_UNSPEC,
    513  PREFIX_ADDRESS,
    514  PREFIX_CACHEINFO,
    515  __PREFIX_MAX
    516 };
    517 
    518 #define PREFIX_MAX (__PREFIX_MAX - 1)
    519 
    520 struct prefix_cacheinfo
    521 {
    522  __u32 preferred_time;
    523  __u32 valid_time;
    524 };
    525 
    526 struct rtnl_link_stats
    527 {
    528  __u32 rx_packets;
    529  __u32 tx_packets;
    530  __u32 rx_bytes;
    531  __u32 tx_bytes;
    532  __u32 rx_errors;
    533  __u32 tx_errors;
    534  __u32 rx_dropped;
    535  __u32 tx_dropped;
    536  __u32 multicast;
    537  __u32 collisions;
    538 
    539  __u32 rx_length_errors;
    540  __u32 rx_over_errors;
    541  __u32 rx_crc_errors;
    542  __u32 rx_frame_errors;
    543  __u32 rx_fifo_errors;
    544  __u32 rx_missed_errors;
    545 
    546  __u32 tx_aborted_errors;
    547  __u32 tx_carrier_errors;
    548  __u32 tx_fifo_errors;
    549  __u32 tx_heartbeat_errors;
    550  __u32 tx_window_errors;
    551 
    552  __u32 rx_compressed;
    553  __u32 tx_compressed;
    554 };
    555 
    556 struct rtnl_link_ifmap
    557 {
    558  __u64 mem_start;
    559  __u64 mem_end;
    560  __u64 base_addr;
    561  __u16 irq;
    562  __u8 dma;
    563  __u8 port;
    564 };
    565 
    566 enum
    567 {
    568  IFLA_UNSPEC,
    569  IFLA_ADDRESS,
    570  IFLA_BROADCAST,
    571  IFLA_IFNAME,
    572  IFLA_MTU,
    573  IFLA_LINK,
    574  IFLA_QDISC,
    575  IFLA_STATS,
    576  IFLA_COST,
    577 #define IFLA_COST IFLA_COST
    578  IFLA_PRIORITY,
    579 #define IFLA_PRIORITY IFLA_PRIORITY
    580  IFLA_MASTER,
    581 #define IFLA_MASTER IFLA_MASTER
    582  IFLA_WIRELESS,
    583 #define IFLA_WIRELESS IFLA_WIRELESS
    584  IFLA_PROTINFO,
    585 #define IFLA_PROTINFO IFLA_PROTINFO
    586  IFLA_TXQLEN,
    587 #define IFLA_TXQLEN IFLA_TXQLEN
    588  IFLA_MAP,
    589 #define IFLA_MAP IFLA_MAP
    590  IFLA_WEIGHT,
    591 #define IFLA_WEIGHT IFLA_WEIGHT
    592  IFLA_OPERSTATE,
    593  IFLA_LINKMODE,
    594  __IFLA_MAX
    595 };
    596 
    597 #define IFLA_MAX (__IFLA_MAX - 1)
    598 
    599 #define IFLA_RTA(r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ifinfomsg))))
    600 #define IFLA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct ifinfomsg))
    601 
    602 enum
    603 {
    604  IFLA_INET6_UNSPEC,
    605  IFLA_INET6_FLAGS,
    606  IFLA_INET6_CONF,
    607  IFLA_INET6_STATS,
    608  IFLA_INET6_MCAST,
    609  IFLA_INET6_CACHEINFO,
    610  __IFLA_INET6_MAX
    611 };
    612 
    613 #define IFLA_INET6_MAX (__IFLA_INET6_MAX - 1)
    614 
    615 struct ifla_cacheinfo
    616 {
    617  __u32 max_reasm_len;
    618  __u32 tstamp;
    619  __u32 reachable_time;
    620  __u32 retrans_time;
    621 };
    622 
    623 struct tcmsg
    624 {
    625  unsigned char tcm_family;
    626  unsigned char tcm__pad1;
    627  unsigned short tcm__pad2;
    628  int tcm_ifindex;
    629  __u32 tcm_handle;
    630  __u32 tcm_parent;
    631  __u32 tcm_info;
    632 };
    633 
    634 enum
    635 {
    636  TCA_UNSPEC,
    637  TCA_KIND,
    638  TCA_OPTIONS,
    639  TCA_STATS,
    640  TCA_XSTATS,
    641  TCA_RATE,
    642  TCA_FCNT,
    643  TCA_STATS2,
    644  __TCA_MAX
    645 };
    646 
    647 #define TCA_MAX (__TCA_MAX - 1)
    648 
    649 #define TCA_RTA(r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct tcmsg))))
    650 #define TCA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct tcmsg))
    651 
    652 #define RTMGRP_LINK 1
    653 #define RTMGRP_NOTIFY 2
    654 #define RTMGRP_NEIGH 4
    655 #define RTMGRP_TC 8
    656 
    657 #define RTMGRP_IPV4_IFADDR 0x10
    658 #define RTMGRP_IPV4_MROUTE 0x20
    659 #define RTMGRP_IPV4_ROUTE 0x40
    660 #define RTMGRP_IPV4_RULE 0x80
    661 
    662 #define RTMGRP_IPV6_IFADDR 0x100
    663 #define RTMGRP_IPV6_MROUTE 0x200
    664 #define RTMGRP_IPV6_ROUTE 0x400
    665 #define RTMGRP_IPV6_IFINFO 0x800
    666 
    667 #define RTMGRP_DECnet_IFADDR 0x1000
    668 #define RTMGRP_DECnet_ROUTE 0x4000
    669 
    670 #define RTMGRP_IPV6_PREFIX 0x20000
    671 
    672 enum rtnetlink_groups {
    673  RTNLGRP_NONE,
    674 #define RTNLGRP_NONE RTNLGRP_NONE
    675  RTNLGRP_LINK,
    676 #define RTNLGRP_LINK RTNLGRP_LINK
    677  RTNLGRP_NOTIFY,
    678 #define RTNLGRP_NOTIFY RTNLGRP_NOTIFY
    679  RTNLGRP_NEIGH,
    680 #define RTNLGRP_NEIGH RTNLGRP_NEIGH
    681  RTNLGRP_TC,
    682 #define RTNLGRP_TC RTNLGRP_TC
    683  RTNLGRP_IPV4_IFADDR,
    684 #define RTNLGRP_IPV4_IFADDR RTNLGRP_IPV4_IFADDR
    685  RTNLGRP_IPV4_MROUTE,
    686 #define RTNLGRP_IPV4_MROUTE RTNLGRP_IPV4_MROUTE
    687  RTNLGRP_IPV4_ROUTE,
    688 #define RTNLGRP_IPV4_ROUTE RTNLGRP_IPV4_ROUTE
    689  RTNLGRP_IPV4_RULE,
    690 #define RTNLGRP_IPV4_RULE RTNLGRP_IPV4_RULE
    691  RTNLGRP_IPV6_IFADDR,
    692 #define RTNLGRP_IPV6_IFADDR RTNLGRP_IPV6_IFADDR
    693  RTNLGRP_IPV6_MROUTE,
    694 #define RTNLGRP_IPV6_MROUTE RTNLGRP_IPV6_MROUTE
    695  RTNLGRP_IPV6_ROUTE,
    696 #define RTNLGRP_IPV6_ROUTE RTNLGRP_IPV6_ROUTE
    697  RTNLGRP_IPV6_IFINFO,
    698 #define RTNLGRP_IPV6_IFINFO RTNLGRP_IPV6_IFINFO
    699  RTNLGRP_DECnet_IFADDR,
    700 #define RTNLGRP_DECnet_IFADDR RTNLGRP_DECnet_IFADDR
    701  RTNLGRP_NOP2,
    702  RTNLGRP_DECnet_ROUTE,
    703 #define RTNLGRP_DECnet_ROUTE RTNLGRP_DECnet_ROUTE
    704  RTNLGRP_NOP3,
    705  RTNLGRP_NOP4,
    706  RTNLGRP_IPV6_PREFIX,
    707 #define RTNLGRP_IPV6_PREFIX RTNLGRP_IPV6_PREFIX
    708  __RTNLGRP_MAX
    709 };
    710 #define RTNLGRP_MAX (__RTNLGRP_MAX - 1)
    711 
    712 struct tcamsg
    713 {
    714  unsigned char tca_family;
    715  unsigned char tca__pad1;
    716  unsigned short tca__pad2;
    717 };
    718 #define TA_RTA(r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct tcamsg))))
    719 #define TA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct tcamsg))
    720 #define TCA_ACT_TAB 1
    721 #define TCAA_MAX 1
    722 
    723 #endif
    724