16f52b16cSGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2607ca46eSDavid Howells #ifndef _UAPI__LINUX_RTNETLINK_H 3607ca46eSDavid Howells #define _UAPI__LINUX_RTNETLINK_H 4607ca46eSDavid Howells 5607ca46eSDavid Howells #include <linux/types.h> 6607ca46eSDavid Howells #include <linux/netlink.h> 7607ca46eSDavid Howells #include <linux/if_link.h> 8607ca46eSDavid Howells #include <linux/if_addr.h> 9607ca46eSDavid Howells #include <linux/neighbour.h> 10607ca46eSDavid Howells 11607ca46eSDavid Howells /* rtnetlink families. Values up to 127 are reserved for real address 12607ca46eSDavid Howells * families, values above 128 may be used arbitrarily. 13607ca46eSDavid Howells */ 14607ca46eSDavid Howells #define RTNL_FAMILY_IPMR 128 15607ca46eSDavid Howells #define RTNL_FAMILY_IP6MR 129 16607ca46eSDavid Howells #define RTNL_FAMILY_MAX 129 17607ca46eSDavid Howells 18607ca46eSDavid Howells /**** 19607ca46eSDavid Howells * Routing/neighbour discovery messages. 20607ca46eSDavid Howells ****/ 21607ca46eSDavid Howells 22607ca46eSDavid Howells /* Types of messages */ 23607ca46eSDavid Howells 24607ca46eSDavid Howells enum { 25607ca46eSDavid Howells RTM_BASE = 16, 26607ca46eSDavid Howells #define RTM_BASE RTM_BASE 27607ca46eSDavid Howells 28607ca46eSDavid Howells RTM_NEWLINK = 16, 29607ca46eSDavid Howells #define RTM_NEWLINK RTM_NEWLINK 30607ca46eSDavid Howells RTM_DELLINK, 31607ca46eSDavid Howells #define RTM_DELLINK RTM_DELLINK 32607ca46eSDavid Howells RTM_GETLINK, 33607ca46eSDavid Howells #define RTM_GETLINK RTM_GETLINK 34607ca46eSDavid Howells RTM_SETLINK, 35607ca46eSDavid Howells #define RTM_SETLINK RTM_SETLINK 36607ca46eSDavid Howells 37607ca46eSDavid Howells RTM_NEWADDR = 20, 38607ca46eSDavid Howells #define RTM_NEWADDR RTM_NEWADDR 39607ca46eSDavid Howells RTM_DELADDR, 40607ca46eSDavid Howells #define RTM_DELADDR RTM_DELADDR 41607ca46eSDavid Howells RTM_GETADDR, 42607ca46eSDavid Howells #define RTM_GETADDR RTM_GETADDR 43607ca46eSDavid Howells 44607ca46eSDavid Howells RTM_NEWROUTE = 24, 45607ca46eSDavid Howells #define RTM_NEWROUTE RTM_NEWROUTE 46607ca46eSDavid Howells RTM_DELROUTE, 47607ca46eSDavid Howells #define RTM_DELROUTE RTM_DELROUTE 48607ca46eSDavid Howells RTM_GETROUTE, 49607ca46eSDavid Howells #define RTM_GETROUTE RTM_GETROUTE 50607ca46eSDavid Howells 51607ca46eSDavid Howells RTM_NEWNEIGH = 28, 52607ca46eSDavid Howells #define RTM_NEWNEIGH RTM_NEWNEIGH 53607ca46eSDavid Howells RTM_DELNEIGH, 54607ca46eSDavid Howells #define RTM_DELNEIGH RTM_DELNEIGH 55607ca46eSDavid Howells RTM_GETNEIGH, 56607ca46eSDavid Howells #define RTM_GETNEIGH RTM_GETNEIGH 57607ca46eSDavid Howells 58607ca46eSDavid Howells RTM_NEWRULE = 32, 59607ca46eSDavid Howells #define RTM_NEWRULE RTM_NEWRULE 60607ca46eSDavid Howells RTM_DELRULE, 61607ca46eSDavid Howells #define RTM_DELRULE RTM_DELRULE 62607ca46eSDavid Howells RTM_GETRULE, 63607ca46eSDavid Howells #define RTM_GETRULE RTM_GETRULE 64607ca46eSDavid Howells 65607ca46eSDavid Howells RTM_NEWQDISC = 36, 66607ca46eSDavid Howells #define RTM_NEWQDISC RTM_NEWQDISC 67607ca46eSDavid Howells RTM_DELQDISC, 68607ca46eSDavid Howells #define RTM_DELQDISC RTM_DELQDISC 69607ca46eSDavid Howells RTM_GETQDISC, 70607ca46eSDavid Howells #define RTM_GETQDISC RTM_GETQDISC 71607ca46eSDavid Howells 72607ca46eSDavid Howells RTM_NEWTCLASS = 40, 73607ca46eSDavid Howells #define RTM_NEWTCLASS RTM_NEWTCLASS 74607ca46eSDavid Howells RTM_DELTCLASS, 75607ca46eSDavid Howells #define RTM_DELTCLASS RTM_DELTCLASS 76607ca46eSDavid Howells RTM_GETTCLASS, 77607ca46eSDavid Howells #define RTM_GETTCLASS RTM_GETTCLASS 78607ca46eSDavid Howells 79607ca46eSDavid Howells RTM_NEWTFILTER = 44, 80607ca46eSDavid Howells #define RTM_NEWTFILTER RTM_NEWTFILTER 81607ca46eSDavid Howells RTM_DELTFILTER, 82607ca46eSDavid Howells #define RTM_DELTFILTER RTM_DELTFILTER 83607ca46eSDavid Howells RTM_GETTFILTER, 84607ca46eSDavid Howells #define RTM_GETTFILTER RTM_GETTFILTER 85607ca46eSDavid Howells 86607ca46eSDavid Howells RTM_NEWACTION = 48, 87607ca46eSDavid Howells #define RTM_NEWACTION RTM_NEWACTION 88607ca46eSDavid Howells RTM_DELACTION, 89607ca46eSDavid Howells #define RTM_DELACTION RTM_DELACTION 90607ca46eSDavid Howells RTM_GETACTION, 91607ca46eSDavid Howells #define RTM_GETACTION RTM_GETACTION 92607ca46eSDavid Howells 93607ca46eSDavid Howells RTM_NEWPREFIX = 52, 94607ca46eSDavid Howells #define RTM_NEWPREFIX RTM_NEWPREFIX 95607ca46eSDavid Howells 96607ca46eSDavid Howells RTM_GETMULTICAST = 58, 97607ca46eSDavid Howells #define RTM_GETMULTICAST RTM_GETMULTICAST 98607ca46eSDavid Howells 99607ca46eSDavid Howells RTM_GETANYCAST = 62, 100607ca46eSDavid Howells #define RTM_GETANYCAST RTM_GETANYCAST 101607ca46eSDavid Howells 102607ca46eSDavid Howells RTM_NEWNEIGHTBL = 64, 103607ca46eSDavid Howells #define RTM_NEWNEIGHTBL RTM_NEWNEIGHTBL 104607ca46eSDavid Howells RTM_GETNEIGHTBL = 66, 105607ca46eSDavid Howells #define RTM_GETNEIGHTBL RTM_GETNEIGHTBL 106607ca46eSDavid Howells RTM_SETNEIGHTBL, 107607ca46eSDavid Howells #define RTM_SETNEIGHTBL RTM_SETNEIGHTBL 108607ca46eSDavid Howells 109607ca46eSDavid Howells RTM_NEWNDUSEROPT = 68, 110607ca46eSDavid Howells #define RTM_NEWNDUSEROPT RTM_NEWNDUSEROPT 111607ca46eSDavid Howells 112607ca46eSDavid Howells RTM_NEWADDRLABEL = 72, 113607ca46eSDavid Howells #define RTM_NEWADDRLABEL RTM_NEWADDRLABEL 114607ca46eSDavid Howells RTM_DELADDRLABEL, 115607ca46eSDavid Howells #define RTM_DELADDRLABEL RTM_DELADDRLABEL 116607ca46eSDavid Howells RTM_GETADDRLABEL, 117607ca46eSDavid Howells #define RTM_GETADDRLABEL RTM_GETADDRLABEL 118607ca46eSDavid Howells 119607ca46eSDavid Howells RTM_GETDCB = 78, 120607ca46eSDavid Howells #define RTM_GETDCB RTM_GETDCB 121607ca46eSDavid Howells RTM_SETDCB, 122607ca46eSDavid Howells #define RTM_SETDCB RTM_SETDCB 123607ca46eSDavid Howells 124d900082bSNicolas Dichtel RTM_NEWNETCONF = 80, 125d900082bSNicolas Dichtel #define RTM_NEWNETCONF RTM_NEWNETCONF 126983701ebSDavid Ahern RTM_DELNETCONF, 127983701ebSDavid Ahern #define RTM_DELNETCONF RTM_DELNETCONF 128d900082bSNicolas Dichtel RTM_GETNETCONF = 82, 129d900082bSNicolas Dichtel #define RTM_GETNETCONF RTM_GETNETCONF 130d900082bSNicolas Dichtel 13137a393bcSCong Wang RTM_NEWMDB = 84, 13237a393bcSCong Wang #define RTM_NEWMDB RTM_NEWMDB 13337a393bcSCong Wang RTM_DELMDB = 85, 13437a393bcSCong Wang #define RTM_DELMDB RTM_DELMDB 135ee07c6e7SCong Wang RTM_GETMDB = 86, 136ee07c6e7SCong Wang #define RTM_GETMDB RTM_GETMDB 137ee07c6e7SCong Wang 1380c7aecd4SNicolas Dichtel RTM_NEWNSID = 88, 1390c7aecd4SNicolas Dichtel #define RTM_NEWNSID RTM_NEWNSID 1409a963454SNicolas Dichtel RTM_DELNSID = 89, 1419a963454SNicolas Dichtel #define RTM_DELNSID RTM_DELNSID 1420c7aecd4SNicolas Dichtel RTM_GETNSID = 90, 1430c7aecd4SNicolas Dichtel #define RTM_GETNSID RTM_GETNSID 1440c7aecd4SNicolas Dichtel 14510c9ead9SRoopa Prabhu RTM_NEWSTATS = 92, 14610c9ead9SRoopa Prabhu #define RTM_NEWSTATS RTM_NEWSTATS 14710c9ead9SRoopa Prabhu RTM_GETSTATS = 94, 14810c9ead9SRoopa Prabhu #define RTM_GETSTATS RTM_GETSTATS 14910c9ead9SRoopa Prabhu 15094df30a6SJulien Gomes RTM_NEWCACHEREPORT = 96, 15194df30a6SJulien Gomes #define RTM_NEWCACHEREPORT RTM_NEWCACHEREPORT 15294df30a6SJulien Gomes 153607ca46eSDavid Howells __RTM_MAX, 154607ca46eSDavid Howells #define RTM_MAX (((__RTM_MAX + 3) & ~3) - 1) 155607ca46eSDavid Howells }; 156607ca46eSDavid Howells 157607ca46eSDavid Howells #define RTM_NR_MSGTYPES (RTM_MAX + 1 - RTM_BASE) 158607ca46eSDavid Howells #define RTM_NR_FAMILIES (RTM_NR_MSGTYPES >> 2) 159607ca46eSDavid Howells #define RTM_FAM(cmd) (((cmd) - RTM_BASE) >> 2) 160607ca46eSDavid Howells 161607ca46eSDavid Howells /* 162607ca46eSDavid Howells Generic structure for encapsulation of optional route information. 163607ca46eSDavid Howells It is reminiscent of sockaddr, but with sa_family replaced 164607ca46eSDavid Howells with attribute type. 165607ca46eSDavid Howells */ 166607ca46eSDavid Howells 167607ca46eSDavid Howells struct rtattr { 168607ca46eSDavid Howells unsigned short rta_len; 169607ca46eSDavid Howells unsigned short rta_type; 170607ca46eSDavid Howells }; 171607ca46eSDavid Howells 172607ca46eSDavid Howells /* Macros to handle rtattributes */ 173607ca46eSDavid Howells 174e8444637SArad, Ronen #define RTA_ALIGNTO 4U 175607ca46eSDavid Howells #define RTA_ALIGN(len) ( ((len)+RTA_ALIGNTO-1) & ~(RTA_ALIGNTO-1) ) 176607ca46eSDavid Howells #define RTA_OK(rta,len) ((len) >= (int)sizeof(struct rtattr) && \ 177607ca46eSDavid Howells (rta)->rta_len >= sizeof(struct rtattr) && \ 178607ca46eSDavid Howells (rta)->rta_len <= (len)) 179607ca46eSDavid Howells #define RTA_NEXT(rta,attrlen) ((attrlen) -= RTA_ALIGN((rta)->rta_len), \ 180607ca46eSDavid Howells (struct rtattr*)(((char*)(rta)) + RTA_ALIGN((rta)->rta_len))) 181607ca46eSDavid Howells #define RTA_LENGTH(len) (RTA_ALIGN(sizeof(struct rtattr)) + (len)) 182607ca46eSDavid Howells #define RTA_SPACE(len) RTA_ALIGN(RTA_LENGTH(len)) 183607ca46eSDavid Howells #define RTA_DATA(rta) ((void*)(((char*)(rta)) + RTA_LENGTH(0))) 184607ca46eSDavid Howells #define RTA_PAYLOAD(rta) ((int)((rta)->rta_len) - RTA_LENGTH(0)) 185607ca46eSDavid Howells 186607ca46eSDavid Howells 187607ca46eSDavid Howells 188607ca46eSDavid Howells 189607ca46eSDavid Howells /****************************************************************************** 190607ca46eSDavid Howells * Definitions used in routing table administration. 191607ca46eSDavid Howells ****/ 192607ca46eSDavid Howells 193607ca46eSDavid Howells struct rtmsg { 194607ca46eSDavid Howells unsigned char rtm_family; 195607ca46eSDavid Howells unsigned char rtm_dst_len; 196607ca46eSDavid Howells unsigned char rtm_src_len; 197607ca46eSDavid Howells unsigned char rtm_tos; 198607ca46eSDavid Howells 199607ca46eSDavid Howells unsigned char rtm_table; /* Routing table id */ 200607ca46eSDavid Howells unsigned char rtm_protocol; /* Routing protocol; see below */ 201607ca46eSDavid Howells unsigned char rtm_scope; /* See below */ 202607ca46eSDavid Howells unsigned char rtm_type; /* See below */ 203607ca46eSDavid Howells 204607ca46eSDavid Howells unsigned rtm_flags; 205607ca46eSDavid Howells }; 206607ca46eSDavid Howells 207607ca46eSDavid Howells /* rtm_type */ 208607ca46eSDavid Howells 209607ca46eSDavid Howells enum { 210607ca46eSDavid Howells RTN_UNSPEC, 211607ca46eSDavid Howells RTN_UNICAST, /* Gateway or direct route */ 212607ca46eSDavid Howells RTN_LOCAL, /* Accept locally */ 213607ca46eSDavid Howells RTN_BROADCAST, /* Accept locally as broadcast, 214607ca46eSDavid Howells send as broadcast */ 215607ca46eSDavid Howells RTN_ANYCAST, /* Accept locally as broadcast, 216607ca46eSDavid Howells but send as unicast */ 217607ca46eSDavid Howells RTN_MULTICAST, /* Multicast route */ 218607ca46eSDavid Howells RTN_BLACKHOLE, /* Drop */ 219607ca46eSDavid Howells RTN_UNREACHABLE, /* Destination is unreachable */ 220607ca46eSDavid Howells RTN_PROHIBIT, /* Administratively prohibited */ 221607ca46eSDavid Howells RTN_THROW, /* Not in this table */ 222607ca46eSDavid Howells RTN_NAT, /* Translate this address */ 223607ca46eSDavid Howells RTN_XRESOLVE, /* Use external resolver */ 224607ca46eSDavid Howells __RTN_MAX 225607ca46eSDavid Howells }; 226607ca46eSDavid Howells 227607ca46eSDavid Howells #define RTN_MAX (__RTN_MAX - 1) 228607ca46eSDavid Howells 229607ca46eSDavid Howells 230607ca46eSDavid Howells /* rtm_protocol */ 231607ca46eSDavid Howells 232607ca46eSDavid Howells #define RTPROT_UNSPEC 0 233607ca46eSDavid Howells #define RTPROT_REDIRECT 1 /* Route installed by ICMP redirects; 234607ca46eSDavid Howells not used by current IPv4 */ 235607ca46eSDavid Howells #define RTPROT_KERNEL 2 /* Route installed by kernel */ 236607ca46eSDavid Howells #define RTPROT_BOOT 3 /* Route installed during boot */ 237607ca46eSDavid Howells #define RTPROT_STATIC 4 /* Route installed by administrator */ 238607ca46eSDavid Howells 239607ca46eSDavid Howells /* Values of protocol >= RTPROT_STATIC are not interpreted by kernel; 240607ca46eSDavid Howells they are just passed from user and back as is. 241607ca46eSDavid Howells It will be used by hypothetical multiple routing daemons. 242607ca46eSDavid Howells Note that protocol values should be standardized in order to 243607ca46eSDavid Howells avoid conflicts. 244607ca46eSDavid Howells */ 245607ca46eSDavid Howells 246607ca46eSDavid Howells #define RTPROT_GATED 8 /* Apparently, GateD */ 247607ca46eSDavid Howells #define RTPROT_RA 9 /* RDISC/ND router advertisements */ 248607ca46eSDavid Howells #define RTPROT_MRT 10 /* Merit MRT */ 249607ca46eSDavid Howells #define RTPROT_ZEBRA 11 /* Zebra */ 250607ca46eSDavid Howells #define RTPROT_BIRD 12 /* BIRD */ 251607ca46eSDavid Howells #define RTPROT_DNROUTED 13 /* DECnet routing daemon */ 252607ca46eSDavid Howells #define RTPROT_XORP 14 /* XORP */ 253607ca46eSDavid Howells #define RTPROT_NTK 15 /* Netsukuku */ 254607ca46eSDavid Howells #define RTPROT_DHCP 16 /* DHCP client */ 2559a68ac72SNicolas Dichtel #define RTPROT_MROUTED 17 /* Multicast daemon */ 256be955b29SDave Taht #define RTPROT_BABEL 42 /* Babel daemon */ 257607ca46eSDavid Howells 258607ca46eSDavid Howells /* rtm_scope 259607ca46eSDavid Howells 260607ca46eSDavid Howells Really it is not scope, but sort of distance to the destination. 261607ca46eSDavid Howells NOWHERE are reserved for not existing destinations, HOST is our 262607ca46eSDavid Howells local addresses, LINK are destinations, located on directly attached 263607ca46eSDavid Howells link and UNIVERSE is everywhere in the Universe. 264607ca46eSDavid Howells 265607ca46eSDavid Howells Intermediate values are also possible f.e. interior routes 266607ca46eSDavid Howells could be assigned a value between UNIVERSE and LINK. 267607ca46eSDavid Howells */ 268607ca46eSDavid Howells 269607ca46eSDavid Howells enum rt_scope_t { 270607ca46eSDavid Howells RT_SCOPE_UNIVERSE=0, 271607ca46eSDavid Howells /* User defined values */ 272607ca46eSDavid Howells RT_SCOPE_SITE=200, 273607ca46eSDavid Howells RT_SCOPE_LINK=253, 274607ca46eSDavid Howells RT_SCOPE_HOST=254, 275607ca46eSDavid Howells RT_SCOPE_NOWHERE=255 276607ca46eSDavid Howells }; 277607ca46eSDavid Howells 278607ca46eSDavid Howells /* rtm_flags */ 279607ca46eSDavid Howells 280607ca46eSDavid Howells #define RTM_F_NOTIFY 0x100 /* Notify user of route change */ 281607ca46eSDavid Howells #define RTM_F_CLONED 0x200 /* This route is cloned */ 282607ca46eSDavid Howells #define RTM_F_EQUALIZE 0x400 /* Multipath equalizer: NI */ 283607ca46eSDavid Howells #define RTM_F_PREFIX 0x800 /* Prefix addresses */ 284c36ba660SDavid Ahern #define RTM_F_LOOKUP_TABLE 0x1000 /* set rtm_table to FIB lookup result */ 2850be1b305SRoopa Prabhu #define RTM_F_FIB_MATCH 0x2000 /* return full fib lookup match */ 286607ca46eSDavid Howells 287607ca46eSDavid Howells /* Reserved table identifiers */ 288607ca46eSDavid Howells 289607ca46eSDavid Howells enum rt_class_t { 290607ca46eSDavid Howells RT_TABLE_UNSPEC=0, 291607ca46eSDavid Howells /* User defined values */ 292607ca46eSDavid Howells RT_TABLE_COMPAT=252, 293607ca46eSDavid Howells RT_TABLE_DEFAULT=253, 294607ca46eSDavid Howells RT_TABLE_MAIN=254, 295607ca46eSDavid Howells RT_TABLE_LOCAL=255, 296607ca46eSDavid Howells RT_TABLE_MAX=0xFFFFFFFF 297607ca46eSDavid Howells }; 298607ca46eSDavid Howells 299607ca46eSDavid Howells 300607ca46eSDavid Howells /* Routing message attributes */ 301607ca46eSDavid Howells 302607ca46eSDavid Howells enum rtattr_type_t { 303607ca46eSDavid Howells RTA_UNSPEC, 304607ca46eSDavid Howells RTA_DST, 305607ca46eSDavid Howells RTA_SRC, 306607ca46eSDavid Howells RTA_IIF, 307607ca46eSDavid Howells RTA_OIF, 308607ca46eSDavid Howells RTA_GATEWAY, 309607ca46eSDavid Howells RTA_PRIORITY, 310607ca46eSDavid Howells RTA_PREFSRC, 311607ca46eSDavid Howells RTA_METRICS, 312607ca46eSDavid Howells RTA_MULTIPATH, 313607ca46eSDavid Howells RTA_PROTOINFO, /* no longer used */ 314607ca46eSDavid Howells RTA_FLOW, 315607ca46eSDavid Howells RTA_CACHEINFO, 316607ca46eSDavid Howells RTA_SESSION, /* no longer used */ 317607ca46eSDavid Howells RTA_MP_ALGO, /* no longer used */ 318607ca46eSDavid Howells RTA_TABLE, 319607ca46eSDavid Howells RTA_MARK, 320adfa85e4SNicolas Dichtel RTA_MFC_STATS, 32103c05665SEric W. Biederman RTA_VIA, 32203c05665SEric W. Biederman RTA_NEWDST, 323c78ba6d6SLubomir Rintel RTA_PREF, 324a0d9a860SRoopa Prabhu RTA_ENCAP_TYPE, 325a0d9a860SRoopa Prabhu RTA_ENCAP, 32632bc201eSXin Long RTA_EXPIRES, 327a9a08042SNicolas Dichtel RTA_PAD, 328622ec2c9SLorenzo Colitti RTA_UID, 3295b441ac8SRobert Shearman RTA_TTL_PROPAGATE, 330607ca46eSDavid Howells __RTA_MAX 331607ca46eSDavid Howells }; 332607ca46eSDavid Howells 333607ca46eSDavid Howells #define RTA_MAX (__RTA_MAX - 1) 334607ca46eSDavid Howells 335607ca46eSDavid Howells #define RTM_RTA(r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct rtmsg)))) 336607ca46eSDavid Howells #define RTM_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct rtmsg)) 337607ca46eSDavid Howells 338607ca46eSDavid Howells /* RTM_MULTIPATH --- array of struct rtnexthop. 339607ca46eSDavid Howells * 340607ca46eSDavid Howells * "struct rtnexthop" describes all necessary nexthop information, 341607ca46eSDavid Howells * i.e. parameters of path to a destination via this nexthop. 342607ca46eSDavid Howells * 343607ca46eSDavid Howells * At the moment it is impossible to set different prefsrc, mtu, window 344607ca46eSDavid Howells * and rtt for different paths from multipath. 345607ca46eSDavid Howells */ 346607ca46eSDavid Howells 347607ca46eSDavid Howells struct rtnexthop { 348607ca46eSDavid Howells unsigned short rtnh_len; 349607ca46eSDavid Howells unsigned char rtnh_flags; 350607ca46eSDavid Howells unsigned char rtnh_hops; 351607ca46eSDavid Howells int rtnh_ifindex; 352607ca46eSDavid Howells }; 353607ca46eSDavid Howells 354607ca46eSDavid Howells /* rtnh_flags */ 355607ca46eSDavid Howells 356607ca46eSDavid Howells #define RTNH_F_DEAD 1 /* Nexthop is dead (used by multipath) */ 357607ca46eSDavid Howells #define RTNH_F_PERVASIVE 2 /* Do recursive gateway lookup */ 358607ca46eSDavid Howells #define RTNH_F_ONLINK 4 /* Gateway is forced on link */ 359eea39946SRoopa Prabhu #define RTNH_F_OFFLOAD 8 /* offloaded route */ 3608a3d0316SAndy Gospodarek #define RTNH_F_LINKDOWN 16 /* carrier-down on nexthop */ 3611708ebc9SNikolay Aleksandrov #define RTNH_F_UNRESOLVED 32 /* The entry is unresolved (ipmr) */ 3628a3d0316SAndy Gospodarek 36385dda4e5SJiri Pirko #define RTNH_COMPARE_MASK (RTNH_F_DEAD | RTNH_F_LINKDOWN | RTNH_F_OFFLOAD) 364607ca46eSDavid Howells 365607ca46eSDavid Howells /* Macros to handle hexthops */ 366607ca46eSDavid Howells 367607ca46eSDavid Howells #define RTNH_ALIGNTO 4 368607ca46eSDavid Howells #define RTNH_ALIGN(len) ( ((len)+RTNH_ALIGNTO-1) & ~(RTNH_ALIGNTO-1) ) 369607ca46eSDavid Howells #define RTNH_OK(rtnh,len) ((rtnh)->rtnh_len >= sizeof(struct rtnexthop) && \ 370607ca46eSDavid Howells ((int)(rtnh)->rtnh_len) <= (len)) 371607ca46eSDavid Howells #define RTNH_NEXT(rtnh) ((struct rtnexthop*)(((char*)(rtnh)) + RTNH_ALIGN((rtnh)->rtnh_len))) 372607ca46eSDavid Howells #define RTNH_LENGTH(len) (RTNH_ALIGN(sizeof(struct rtnexthop)) + (len)) 373607ca46eSDavid Howells #define RTNH_SPACE(len) RTNH_ALIGN(RTNH_LENGTH(len)) 374607ca46eSDavid Howells #define RTNH_DATA(rtnh) ((struct rtattr*)(((char*)(rtnh)) + RTNH_LENGTH(0))) 375607ca46eSDavid Howells 37603c05665SEric W. Biederman /* RTA_VIA */ 37703c05665SEric W. Biederman struct rtvia { 37803c05665SEric W. Biederman __kernel_sa_family_t rtvia_family; 37903c05665SEric W. Biederman __u8 rtvia_addr[0]; 38003c05665SEric W. Biederman }; 38103c05665SEric W. Biederman 382607ca46eSDavid Howells /* RTM_CACHEINFO */ 383607ca46eSDavid Howells 384607ca46eSDavid Howells struct rta_cacheinfo { 385607ca46eSDavid Howells __u32 rta_clntref; 386607ca46eSDavid Howells __u32 rta_lastuse; 387607ca46eSDavid Howells __s32 rta_expires; 388607ca46eSDavid Howells __u32 rta_error; 389607ca46eSDavid Howells __u32 rta_used; 390607ca46eSDavid Howells 391607ca46eSDavid Howells #define RTNETLINK_HAVE_PEERINFO 1 392607ca46eSDavid Howells __u32 rta_id; 393607ca46eSDavid Howells __u32 rta_ts; 394607ca46eSDavid Howells __u32 rta_tsage; 395607ca46eSDavid Howells }; 396607ca46eSDavid Howells 397607ca46eSDavid Howells /* RTM_METRICS --- array of struct rtattr with types of RTAX_* */ 398607ca46eSDavid Howells 399607ca46eSDavid Howells enum { 400607ca46eSDavid Howells RTAX_UNSPEC, 401607ca46eSDavid Howells #define RTAX_UNSPEC RTAX_UNSPEC 402607ca46eSDavid Howells RTAX_LOCK, 403607ca46eSDavid Howells #define RTAX_LOCK RTAX_LOCK 404607ca46eSDavid Howells RTAX_MTU, 405607ca46eSDavid Howells #define RTAX_MTU RTAX_MTU 406607ca46eSDavid Howells RTAX_WINDOW, 407607ca46eSDavid Howells #define RTAX_WINDOW RTAX_WINDOW 408607ca46eSDavid Howells RTAX_RTT, 409607ca46eSDavid Howells #define RTAX_RTT RTAX_RTT 410607ca46eSDavid Howells RTAX_RTTVAR, 411607ca46eSDavid Howells #define RTAX_RTTVAR RTAX_RTTVAR 412607ca46eSDavid Howells RTAX_SSTHRESH, 413607ca46eSDavid Howells #define RTAX_SSTHRESH RTAX_SSTHRESH 414607ca46eSDavid Howells RTAX_CWND, 415607ca46eSDavid Howells #define RTAX_CWND RTAX_CWND 416607ca46eSDavid Howells RTAX_ADVMSS, 417607ca46eSDavid Howells #define RTAX_ADVMSS RTAX_ADVMSS 418607ca46eSDavid Howells RTAX_REORDERING, 419607ca46eSDavid Howells #define RTAX_REORDERING RTAX_REORDERING 420607ca46eSDavid Howells RTAX_HOPLIMIT, 421607ca46eSDavid Howells #define RTAX_HOPLIMIT RTAX_HOPLIMIT 422607ca46eSDavid Howells RTAX_INITCWND, 423607ca46eSDavid Howells #define RTAX_INITCWND RTAX_INITCWND 424607ca46eSDavid Howells RTAX_FEATURES, 425607ca46eSDavid Howells #define RTAX_FEATURES RTAX_FEATURES 426607ca46eSDavid Howells RTAX_RTO_MIN, 427607ca46eSDavid Howells #define RTAX_RTO_MIN RTAX_RTO_MIN 428607ca46eSDavid Howells RTAX_INITRWND, 429607ca46eSDavid Howells #define RTAX_INITRWND RTAX_INITRWND 430bcefe17cSCong Wang RTAX_QUICKACK, 431bcefe17cSCong Wang #define RTAX_QUICKACK RTAX_QUICKACK 432ea697639SDaniel Borkmann RTAX_CC_ALGO, 433ea697639SDaniel Borkmann #define RTAX_CC_ALGO RTAX_CC_ALGO 434607ca46eSDavid Howells __RTAX_MAX 435607ca46eSDavid Howells }; 436607ca46eSDavid Howells 437607ca46eSDavid Howells #define RTAX_MAX (__RTAX_MAX - 1) 438607ca46eSDavid Howells 439b8d3e416SDaniel Borkmann #define RTAX_FEATURE_ECN (1 << 0) 440b8d3e416SDaniel Borkmann #define RTAX_FEATURE_SACK (1 << 1) 441b8d3e416SDaniel Borkmann #define RTAX_FEATURE_TIMESTAMP (1 << 2) 442b8d3e416SDaniel Borkmann #define RTAX_FEATURE_ALLFRAG (1 << 3) 443b8d3e416SDaniel Borkmann 444b8d3e416SDaniel Borkmann #define RTAX_FEATURE_MASK (RTAX_FEATURE_ECN | RTAX_FEATURE_SACK | \ 445b8d3e416SDaniel Borkmann RTAX_FEATURE_TIMESTAMP | RTAX_FEATURE_ALLFRAG) 446607ca46eSDavid Howells 447607ca46eSDavid Howells struct rta_session { 448607ca46eSDavid Howells __u8 proto; 449607ca46eSDavid Howells __u8 pad1; 450607ca46eSDavid Howells __u16 pad2; 451607ca46eSDavid Howells 452607ca46eSDavid Howells union { 453607ca46eSDavid Howells struct { 454607ca46eSDavid Howells __u16 sport; 455607ca46eSDavid Howells __u16 dport; 456607ca46eSDavid Howells } ports; 457607ca46eSDavid Howells 458607ca46eSDavid Howells struct { 459607ca46eSDavid Howells __u8 type; 460607ca46eSDavid Howells __u8 code; 461607ca46eSDavid Howells __u16 ident; 462607ca46eSDavid Howells } icmpt; 463607ca46eSDavid Howells 464607ca46eSDavid Howells __u32 spi; 465607ca46eSDavid Howells } u; 466607ca46eSDavid Howells }; 467607ca46eSDavid Howells 468adfa85e4SNicolas Dichtel struct rta_mfc_stats { 469adfa85e4SNicolas Dichtel __u64 mfcs_packets; 470adfa85e4SNicolas Dichtel __u64 mfcs_bytes; 471adfa85e4SNicolas Dichtel __u64 mfcs_wrong_if; 472adfa85e4SNicolas Dichtel }; 473adfa85e4SNicolas Dichtel 474607ca46eSDavid Howells /**** 475607ca46eSDavid Howells * General form of address family dependent message. 476607ca46eSDavid Howells ****/ 477607ca46eSDavid Howells 478607ca46eSDavid Howells struct rtgenmsg { 479607ca46eSDavid Howells unsigned char rtgen_family; 480607ca46eSDavid Howells }; 481607ca46eSDavid Howells 482607ca46eSDavid Howells /***************************************************************** 483607ca46eSDavid Howells * Link layer specific messages. 484607ca46eSDavid Howells ****/ 485607ca46eSDavid Howells 486607ca46eSDavid Howells /* struct ifinfomsg 487607ca46eSDavid Howells * passes link level specific information, not dependent 488607ca46eSDavid Howells * on network protocol. 489607ca46eSDavid Howells */ 490607ca46eSDavid Howells 491607ca46eSDavid Howells struct ifinfomsg { 492607ca46eSDavid Howells unsigned char ifi_family; 493607ca46eSDavid Howells unsigned char __ifi_pad; 494607ca46eSDavid Howells unsigned short ifi_type; /* ARPHRD_* */ 495607ca46eSDavid Howells int ifi_index; /* Link index */ 496607ca46eSDavid Howells unsigned ifi_flags; /* IFF_* flags */ 497607ca46eSDavid Howells unsigned ifi_change; /* IFF_* change mask */ 498607ca46eSDavid Howells }; 499607ca46eSDavid Howells 500607ca46eSDavid Howells /******************************************************************** 501607ca46eSDavid Howells * prefix information 502607ca46eSDavid Howells ****/ 503607ca46eSDavid Howells 504607ca46eSDavid Howells struct prefixmsg { 505607ca46eSDavid Howells unsigned char prefix_family; 506607ca46eSDavid Howells unsigned char prefix_pad1; 507607ca46eSDavid Howells unsigned short prefix_pad2; 508607ca46eSDavid Howells int prefix_ifindex; 509607ca46eSDavid Howells unsigned char prefix_type; 510607ca46eSDavid Howells unsigned char prefix_len; 511607ca46eSDavid Howells unsigned char prefix_flags; 512607ca46eSDavid Howells unsigned char prefix_pad3; 513607ca46eSDavid Howells }; 514607ca46eSDavid Howells 515607ca46eSDavid Howells enum 516607ca46eSDavid Howells { 517607ca46eSDavid Howells PREFIX_UNSPEC, 518607ca46eSDavid Howells PREFIX_ADDRESS, 519607ca46eSDavid Howells PREFIX_CACHEINFO, 520607ca46eSDavid Howells __PREFIX_MAX 521607ca46eSDavid Howells }; 522607ca46eSDavid Howells 523607ca46eSDavid Howells #define PREFIX_MAX (__PREFIX_MAX - 1) 524607ca46eSDavid Howells 525607ca46eSDavid Howells struct prefix_cacheinfo { 526607ca46eSDavid Howells __u32 preferred_time; 527607ca46eSDavid Howells __u32 valid_time; 528607ca46eSDavid Howells }; 529607ca46eSDavid Howells 530607ca46eSDavid Howells 531607ca46eSDavid Howells /***************************************************************** 532607ca46eSDavid Howells * Traffic control messages. 533607ca46eSDavid Howells ****/ 534607ca46eSDavid Howells 535607ca46eSDavid Howells struct tcmsg { 536607ca46eSDavid Howells unsigned char tcm_family; 537607ca46eSDavid Howells unsigned char tcm__pad1; 538607ca46eSDavid Howells unsigned short tcm__pad2; 539607ca46eSDavid Howells int tcm_ifindex; 540607ca46eSDavid Howells __u32 tcm_handle; 541607ca46eSDavid Howells __u32 tcm_parent; 542607ca46eSDavid Howells __u32 tcm_info; 543607ca46eSDavid Howells }; 544607ca46eSDavid Howells 545607ca46eSDavid Howells enum { 546607ca46eSDavid Howells TCA_UNSPEC, 547607ca46eSDavid Howells TCA_KIND, 548607ca46eSDavid Howells TCA_OPTIONS, 549607ca46eSDavid Howells TCA_STATS, 550607ca46eSDavid Howells TCA_XSTATS, 551607ca46eSDavid Howells TCA_RATE, 552607ca46eSDavid Howells TCA_FCNT, 553607ca46eSDavid Howells TCA_STATS2, 554607ca46eSDavid Howells TCA_STAB, 5559854518eSNicolas Dichtel TCA_PAD, 55649b49971SJiri Kosina TCA_DUMP_INVISIBLE, 5575bc17018SJiri Pirko TCA_CHAIN, 558607ca46eSDavid Howells __TCA_MAX 559607ca46eSDavid Howells }; 560607ca46eSDavid Howells 561607ca46eSDavid Howells #define TCA_MAX (__TCA_MAX - 1) 562607ca46eSDavid Howells 563607ca46eSDavid Howells #define TCA_RTA(r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct tcmsg)))) 564607ca46eSDavid Howells #define TCA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct tcmsg)) 565607ca46eSDavid Howells 566607ca46eSDavid Howells /******************************************************************** 567607ca46eSDavid Howells * Neighbor Discovery userland options 568607ca46eSDavid Howells ****/ 569607ca46eSDavid Howells 570607ca46eSDavid Howells struct nduseroptmsg { 571607ca46eSDavid Howells unsigned char nduseropt_family; 572607ca46eSDavid Howells unsigned char nduseropt_pad1; 573607ca46eSDavid Howells unsigned short nduseropt_opts_len; /* Total length of options */ 574607ca46eSDavid Howells int nduseropt_ifindex; 575607ca46eSDavid Howells __u8 nduseropt_icmp_type; 576607ca46eSDavid Howells __u8 nduseropt_icmp_code; 577607ca46eSDavid Howells unsigned short nduseropt_pad2; 578607ca46eSDavid Howells unsigned int nduseropt_pad3; 579607ca46eSDavid Howells /* Followed by one or more ND options */ 580607ca46eSDavid Howells }; 581607ca46eSDavid Howells 582607ca46eSDavid Howells enum { 583607ca46eSDavid Howells NDUSEROPT_UNSPEC, 584607ca46eSDavid Howells NDUSEROPT_SRCADDR, 585607ca46eSDavid Howells __NDUSEROPT_MAX 586607ca46eSDavid Howells }; 587607ca46eSDavid Howells 588607ca46eSDavid Howells #define NDUSEROPT_MAX (__NDUSEROPT_MAX - 1) 589607ca46eSDavid Howells 590607ca46eSDavid Howells #ifndef __KERNEL__ 591607ca46eSDavid Howells /* RTnetlink multicast groups - backwards compatibility for userspace */ 592607ca46eSDavid Howells #define RTMGRP_LINK 1 593607ca46eSDavid Howells #define RTMGRP_NOTIFY 2 594607ca46eSDavid Howells #define RTMGRP_NEIGH 4 595607ca46eSDavid Howells #define RTMGRP_TC 8 596607ca46eSDavid Howells 597607ca46eSDavid Howells #define RTMGRP_IPV4_IFADDR 0x10 598607ca46eSDavid Howells #define RTMGRP_IPV4_MROUTE 0x20 599607ca46eSDavid Howells #define RTMGRP_IPV4_ROUTE 0x40 600607ca46eSDavid Howells #define RTMGRP_IPV4_RULE 0x80 601607ca46eSDavid Howells 602607ca46eSDavid Howells #define RTMGRP_IPV6_IFADDR 0x100 603607ca46eSDavid Howells #define RTMGRP_IPV6_MROUTE 0x200 604607ca46eSDavid Howells #define RTMGRP_IPV6_ROUTE 0x400 605607ca46eSDavid Howells #define RTMGRP_IPV6_IFINFO 0x800 606607ca46eSDavid Howells 607607ca46eSDavid Howells #define RTMGRP_DECnet_IFADDR 0x1000 608607ca46eSDavid Howells #define RTMGRP_DECnet_ROUTE 0x4000 609607ca46eSDavid Howells 610607ca46eSDavid Howells #define RTMGRP_IPV6_PREFIX 0x20000 611607ca46eSDavid Howells #endif 612607ca46eSDavid Howells 613607ca46eSDavid Howells /* RTnetlink multicast groups */ 614607ca46eSDavid Howells enum rtnetlink_groups { 615607ca46eSDavid Howells RTNLGRP_NONE, 616607ca46eSDavid Howells #define RTNLGRP_NONE RTNLGRP_NONE 617607ca46eSDavid Howells RTNLGRP_LINK, 618607ca46eSDavid Howells #define RTNLGRP_LINK RTNLGRP_LINK 619607ca46eSDavid Howells RTNLGRP_NOTIFY, 620607ca46eSDavid Howells #define RTNLGRP_NOTIFY RTNLGRP_NOTIFY 621607ca46eSDavid Howells RTNLGRP_NEIGH, 622607ca46eSDavid Howells #define RTNLGRP_NEIGH RTNLGRP_NEIGH 623607ca46eSDavid Howells RTNLGRP_TC, 624607ca46eSDavid Howells #define RTNLGRP_TC RTNLGRP_TC 625607ca46eSDavid Howells RTNLGRP_IPV4_IFADDR, 626607ca46eSDavid Howells #define RTNLGRP_IPV4_IFADDR RTNLGRP_IPV4_IFADDR 627607ca46eSDavid Howells RTNLGRP_IPV4_MROUTE, 628607ca46eSDavid Howells #define RTNLGRP_IPV4_MROUTE RTNLGRP_IPV4_MROUTE 629607ca46eSDavid Howells RTNLGRP_IPV4_ROUTE, 630607ca46eSDavid Howells #define RTNLGRP_IPV4_ROUTE RTNLGRP_IPV4_ROUTE 631607ca46eSDavid Howells RTNLGRP_IPV4_RULE, 632607ca46eSDavid Howells #define RTNLGRP_IPV4_RULE RTNLGRP_IPV4_RULE 633607ca46eSDavid Howells RTNLGRP_IPV6_IFADDR, 634607ca46eSDavid Howells #define RTNLGRP_IPV6_IFADDR RTNLGRP_IPV6_IFADDR 635607ca46eSDavid Howells RTNLGRP_IPV6_MROUTE, 636607ca46eSDavid Howells #define RTNLGRP_IPV6_MROUTE RTNLGRP_IPV6_MROUTE 637607ca46eSDavid Howells RTNLGRP_IPV6_ROUTE, 638607ca46eSDavid Howells #define RTNLGRP_IPV6_ROUTE RTNLGRP_IPV6_ROUTE 639607ca46eSDavid Howells RTNLGRP_IPV6_IFINFO, 640607ca46eSDavid Howells #define RTNLGRP_IPV6_IFINFO RTNLGRP_IPV6_IFINFO 641607ca46eSDavid Howells RTNLGRP_DECnet_IFADDR, 642607ca46eSDavid Howells #define RTNLGRP_DECnet_IFADDR RTNLGRP_DECnet_IFADDR 643607ca46eSDavid Howells RTNLGRP_NOP2, 644607ca46eSDavid Howells RTNLGRP_DECnet_ROUTE, 645607ca46eSDavid Howells #define RTNLGRP_DECnet_ROUTE RTNLGRP_DECnet_ROUTE 646607ca46eSDavid Howells RTNLGRP_DECnet_RULE, 647607ca46eSDavid Howells #define RTNLGRP_DECnet_RULE RTNLGRP_DECnet_RULE 648607ca46eSDavid Howells RTNLGRP_NOP4, 649607ca46eSDavid Howells RTNLGRP_IPV6_PREFIX, 650607ca46eSDavid Howells #define RTNLGRP_IPV6_PREFIX RTNLGRP_IPV6_PREFIX 651607ca46eSDavid Howells RTNLGRP_IPV6_RULE, 652607ca46eSDavid Howells #define RTNLGRP_IPV6_RULE RTNLGRP_IPV6_RULE 653607ca46eSDavid Howells RTNLGRP_ND_USEROPT, 654607ca46eSDavid Howells #define RTNLGRP_ND_USEROPT RTNLGRP_ND_USEROPT 655607ca46eSDavid Howells RTNLGRP_PHONET_IFADDR, 656607ca46eSDavid Howells #define RTNLGRP_PHONET_IFADDR RTNLGRP_PHONET_IFADDR 657607ca46eSDavid Howells RTNLGRP_PHONET_ROUTE, 658607ca46eSDavid Howells #define RTNLGRP_PHONET_ROUTE RTNLGRP_PHONET_ROUTE 659607ca46eSDavid Howells RTNLGRP_DCB, 660607ca46eSDavid Howells #define RTNLGRP_DCB RTNLGRP_DCB 661edc9e748SNicolas Dichtel RTNLGRP_IPV4_NETCONF, 662edc9e748SNicolas Dichtel #define RTNLGRP_IPV4_NETCONF RTNLGRP_IPV4_NETCONF 663f3a1bfb1SNicolas Dichtel RTNLGRP_IPV6_NETCONF, 664f3a1bfb1SNicolas Dichtel #define RTNLGRP_IPV6_NETCONF RTNLGRP_IPV6_NETCONF 66537a393bcSCong Wang RTNLGRP_MDB, 66637a393bcSCong Wang #define RTNLGRP_MDB RTNLGRP_MDB 6678de147dcSEric W. Biederman RTNLGRP_MPLS_ROUTE, 6688de147dcSEric W. Biederman #define RTNLGRP_MPLS_ROUTE RTNLGRP_MPLS_ROUTE 6699a963454SNicolas Dichtel RTNLGRP_NSID, 6709a963454SNicolas Dichtel #define RTNLGRP_NSID RTNLGRP_NSID 67124045a03SDavid Ahern RTNLGRP_MPLS_NETCONF, 67224045a03SDavid Ahern #define RTNLGRP_MPLS_NETCONF RTNLGRP_MPLS_NETCONF 6735f729eaaSJulien Gomes RTNLGRP_IPV4_MROUTE_R, 6745f729eaaSJulien Gomes #define RTNLGRP_IPV4_MROUTE_R RTNLGRP_IPV4_MROUTE_R 6755f729eaaSJulien Gomes RTNLGRP_IPV6_MROUTE_R, 6765f729eaaSJulien Gomes #define RTNLGRP_IPV6_MROUTE_R RTNLGRP_IPV6_MROUTE_R 677607ca46eSDavid Howells __RTNLGRP_MAX 678607ca46eSDavid Howells }; 679607ca46eSDavid Howells #define RTNLGRP_MAX (__RTNLGRP_MAX - 1) 680607ca46eSDavid Howells 681607ca46eSDavid Howells /* TC action piece */ 682607ca46eSDavid Howells struct tcamsg { 683607ca46eSDavid Howells unsigned char tca_family; 684607ca46eSDavid Howells unsigned char tca__pad1; 685607ca46eSDavid Howells unsigned short tca__pad2; 686607ca46eSDavid Howells }; 68790825b23SJamal Hadi Salim 68890825b23SJamal Hadi Salim enum { 68990825b23SJamal Hadi Salim TCA_ROOT_UNSPEC, 69090825b23SJamal Hadi Salim TCA_ROOT_TAB, 69190825b23SJamal Hadi Salim #define TCA_ACT_TAB TCA_ROOT_TAB 69290825b23SJamal Hadi Salim #define TCAA_MAX TCA_ROOT_TAB 69390825b23SJamal Hadi Salim TCA_ROOT_FLAGS, 69490825b23SJamal Hadi Salim TCA_ROOT_COUNT, 695e62e484dSJamal Hadi Salim TCA_ROOT_TIME_DELTA, /* in msecs */ 69690825b23SJamal Hadi Salim __TCA_ROOT_MAX, 69790825b23SJamal Hadi Salim #define TCA_ROOT_MAX (__TCA_ROOT_MAX - 1) 69890825b23SJamal Hadi Salim }; 69990825b23SJamal Hadi Salim 700607ca46eSDavid Howells #define TA_RTA(r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct tcamsg)))) 701607ca46eSDavid Howells #define TA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct tcamsg)) 70290825b23SJamal Hadi Salim /* tcamsg flags stored in attribute TCA_ROOT_FLAGS 70390825b23SJamal Hadi Salim * 70490825b23SJamal Hadi Salim * TCA_FLAG_LARGE_DUMP_ON user->kernel to request for larger than TCA_ACT_MAX_PRIO 70590825b23SJamal Hadi Salim * actions in a dump. All dump responses will contain the number of actions 70690825b23SJamal Hadi Salim * being dumped stored in for user app's consumption in TCA_ROOT_COUNT 70790825b23SJamal Hadi Salim * 70890825b23SJamal Hadi Salim */ 70990825b23SJamal Hadi Salim #define TCA_FLAG_LARGE_DUMP_ON (1 << 0) 710607ca46eSDavid Howells 711607ca46eSDavid Howells /* New extended info filters for IFLA_EXT_MASK */ 712607ca46eSDavid Howells #define RTEXT_FILTER_VF (1 << 0) 7136cbdceebSVlad Yasevich #define RTEXT_FILTER_BRVLAN (1 << 1) 71435a27ceeSRoopa Prabhu #define RTEXT_FILTER_BRVLAN_COMPRESSED (1 << 2) 715d5566fd7SSowmini Varadhan #define RTEXT_FILTER_SKIP_STATS (1 << 3) 716607ca46eSDavid Howells 717607ca46eSDavid Howells /* End of information exported to user level */ 718607ca46eSDavid Howells 719607ca46eSDavid Howells 720607ca46eSDavid Howells 721607ca46eSDavid Howells #endif /* _UAPI__LINUX_RTNETLINK_H */ 722