Blame include/uapi/linux/rtnetlink.h

Packit Service 3880ab
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
Packit Service 3880ab
#ifndef __LINUX_RTNETLINK_H
Packit Service 3880ab
#define __LINUX_RTNETLINK_H
Packit Service 3880ab
Packit Service 3880ab
#include <linux/types.h>
Packit Service 3880ab
#include <linux/netlink.h>
Packit Service 3880ab
#include <linux/if_link.h>
Packit Service 3880ab
#include <linux/if_addr.h>
Packit Service 3880ab
#include <linux/neighbour.h>
Packit Service 3880ab
Packit Service 3880ab
/* rtnetlink families. Values up to 127 are reserved for real address
Packit Service 3880ab
 * families, values above 128 may be used arbitrarily.
Packit Service 3880ab
 */
Packit Service 3880ab
#define RTNL_FAMILY_IPMR		128
Packit Service 3880ab
#define RTNL_FAMILY_IP6MR		129
Packit Service 3880ab
#define RTNL_FAMILY_MAX			129
Packit Service 3880ab
Packit Service 3880ab
/****
Packit Service 3880ab
 *		Routing/neighbour discovery messages.
Packit Service 3880ab
 ****/
Packit Service 3880ab
Packit Service 3880ab
/* Types of messages */
Packit Service 3880ab
Packit Service 3880ab
enum {
Packit Service 3880ab
	RTM_BASE	= 16,
Packit Service 3880ab
#define RTM_BASE	RTM_BASE
Packit Service 3880ab
Packit Service 3880ab
	RTM_NEWLINK	= 16,
Packit Service 3880ab
#define RTM_NEWLINK	RTM_NEWLINK
Packit Service 3880ab
	RTM_DELLINK,
Packit Service 3880ab
#define RTM_DELLINK	RTM_DELLINK
Packit Service 3880ab
	RTM_GETLINK,
Packit Service 3880ab
#define RTM_GETLINK	RTM_GETLINK
Packit Service 3880ab
	RTM_SETLINK,
Packit Service 3880ab
#define RTM_SETLINK	RTM_SETLINK
Packit Service 3880ab
Packit Service 3880ab
	RTM_NEWADDR	= 20,
Packit Service 3880ab
#define RTM_NEWADDR	RTM_NEWADDR
Packit Service 3880ab
	RTM_DELADDR,
Packit Service 3880ab
#define RTM_DELADDR	RTM_DELADDR
Packit Service 3880ab
	RTM_GETADDR,
Packit Service 3880ab
#define RTM_GETADDR	RTM_GETADDR
Packit Service 3880ab
Packit Service 3880ab
	RTM_NEWROUTE	= 24,
Packit Service 3880ab
#define RTM_NEWROUTE	RTM_NEWROUTE
Packit Service 3880ab
	RTM_DELROUTE,
Packit Service 3880ab
#define RTM_DELROUTE	RTM_DELROUTE
Packit Service 3880ab
	RTM_GETROUTE,
Packit Service 3880ab
#define RTM_GETROUTE	RTM_GETROUTE
Packit Service 3880ab
Packit Service 3880ab
	RTM_NEWNEIGH	= 28,
Packit Service 3880ab
#define RTM_NEWNEIGH	RTM_NEWNEIGH
Packit Service 3880ab
	RTM_DELNEIGH,
Packit Service 3880ab
#define RTM_DELNEIGH	RTM_DELNEIGH
Packit Service 3880ab
	RTM_GETNEIGH,
Packit Service 3880ab
#define RTM_GETNEIGH	RTM_GETNEIGH
Packit Service 3880ab
Packit Service 3880ab
	RTM_NEWRULE	= 32,
Packit Service 3880ab
#define RTM_NEWRULE	RTM_NEWRULE
Packit Service 3880ab
	RTM_DELRULE,
Packit Service 3880ab
#define RTM_DELRULE	RTM_DELRULE
Packit Service 3880ab
	RTM_GETRULE,
Packit Service 3880ab
#define RTM_GETRULE	RTM_GETRULE
Packit Service 3880ab
Packit Service 3880ab
	RTM_NEWQDISC	= 36,
Packit Service 3880ab
#define RTM_NEWQDISC	RTM_NEWQDISC
Packit Service 3880ab
	RTM_DELQDISC,
Packit Service 3880ab
#define RTM_DELQDISC	RTM_DELQDISC
Packit Service 3880ab
	RTM_GETQDISC,
Packit Service 3880ab
#define RTM_GETQDISC	RTM_GETQDISC
Packit Service 3880ab
Packit Service 3880ab
	RTM_NEWTCLASS	= 40,
Packit Service 3880ab
#define RTM_NEWTCLASS	RTM_NEWTCLASS
Packit Service 3880ab
	RTM_DELTCLASS,
Packit Service 3880ab
#define RTM_DELTCLASS	RTM_DELTCLASS
Packit Service 3880ab
	RTM_GETTCLASS,
Packit Service 3880ab
#define RTM_GETTCLASS	RTM_GETTCLASS
Packit Service 3880ab
Packit Service 3880ab
	RTM_NEWTFILTER	= 44,
Packit Service 3880ab
#define RTM_NEWTFILTER	RTM_NEWTFILTER
Packit Service 3880ab
	RTM_DELTFILTER,
Packit Service 3880ab
#define RTM_DELTFILTER	RTM_DELTFILTER
Packit Service 3880ab
	RTM_GETTFILTER,
Packit Service 3880ab
#define RTM_GETTFILTER	RTM_GETTFILTER
Packit Service 3880ab
Packit Service 3880ab
	RTM_NEWACTION	= 48,
Packit Service 3880ab
#define RTM_NEWACTION   RTM_NEWACTION
Packit Service 3880ab
	RTM_DELACTION,
Packit Service 3880ab
#define RTM_DELACTION   RTM_DELACTION
Packit Service 3880ab
	RTM_GETACTION,
Packit Service 3880ab
#define RTM_GETACTION   RTM_GETACTION
Packit Service 3880ab
Packit Service 3880ab
	RTM_NEWPREFIX	= 52,
Packit Service 3880ab
#define RTM_NEWPREFIX	RTM_NEWPREFIX
Packit Service 3880ab
Packit Service 3880ab
	RTM_GETMULTICAST = 58,
Packit Service 3880ab
#define RTM_GETMULTICAST RTM_GETMULTICAST
Packit Service 3880ab
Packit Service 3880ab
	RTM_GETANYCAST	= 62,
Packit Service 3880ab
#define RTM_GETANYCAST	RTM_GETANYCAST
Packit Service 3880ab
Packit Service 3880ab
	RTM_NEWNEIGHTBL	= 64,
Packit Service 3880ab
#define RTM_NEWNEIGHTBL	RTM_NEWNEIGHTBL
Packit Service 3880ab
	RTM_GETNEIGHTBL	= 66,
Packit Service 3880ab
#define RTM_GETNEIGHTBL	RTM_GETNEIGHTBL
Packit Service 3880ab
	RTM_SETNEIGHTBL,
Packit Service 3880ab
#define RTM_SETNEIGHTBL	RTM_SETNEIGHTBL
Packit Service 3880ab
Packit Service 3880ab
	RTM_NEWNDUSEROPT = 68,
Packit Service 3880ab
#define RTM_NEWNDUSEROPT RTM_NEWNDUSEROPT
Packit Service 3880ab
Packit Service 3880ab
	RTM_NEWADDRLABEL = 72,
Packit Service 3880ab
#define RTM_NEWADDRLABEL RTM_NEWADDRLABEL
Packit Service 3880ab
	RTM_DELADDRLABEL,
Packit Service 3880ab
#define RTM_DELADDRLABEL RTM_DELADDRLABEL
Packit Service 3880ab
	RTM_GETADDRLABEL,
Packit Service 3880ab
#define RTM_GETADDRLABEL RTM_GETADDRLABEL
Packit Service 3880ab
Packit Service 3880ab
	RTM_GETDCB = 78,
Packit Service 3880ab
#define RTM_GETDCB RTM_GETDCB
Packit Service 3880ab
	RTM_SETDCB,
Packit Service 3880ab
#define RTM_SETDCB RTM_SETDCB
Packit Service 3880ab
Packit Service 3880ab
	RTM_NEWNETCONF = 80,
Packit Service 3880ab
#define RTM_NEWNETCONF RTM_NEWNETCONF
Packit Service 3880ab
	RTM_DELNETCONF,
Packit Service 3880ab
#define RTM_DELNETCONF RTM_DELNETCONF
Packit Service 3880ab
	RTM_GETNETCONF = 82,
Packit Service 3880ab
#define RTM_GETNETCONF RTM_GETNETCONF
Packit Service 3880ab
Packit Service 3880ab
	RTM_NEWMDB = 84,
Packit Service 3880ab
#define RTM_NEWMDB RTM_NEWMDB
Packit Service 3880ab
	RTM_DELMDB = 85,
Packit Service 3880ab
#define RTM_DELMDB RTM_DELMDB
Packit Service 3880ab
	RTM_GETMDB = 86,
Packit Service 3880ab
#define RTM_GETMDB RTM_GETMDB
Packit Service 3880ab
Packit Service 3880ab
	RTM_NEWNSID = 88,
Packit Service 3880ab
#define RTM_NEWNSID RTM_NEWNSID
Packit Service 3880ab
	RTM_DELNSID = 89,
Packit Service 3880ab
#define RTM_DELNSID RTM_DELNSID
Packit Service 3880ab
	RTM_GETNSID = 90,
Packit Service 3880ab
#define RTM_GETNSID RTM_GETNSID
Packit Service 3880ab
Packit Service 3880ab
	RTM_NEWSTATS = 92,
Packit Service 3880ab
#define RTM_NEWSTATS RTM_NEWSTATS
Packit Service 3880ab
	RTM_GETSTATS = 94,
Packit Service 3880ab
#define RTM_GETSTATS RTM_GETSTATS
Packit Service 3880ab
Packit Service 3880ab
	RTM_NEWCACHEREPORT = 96,
Packit Service 3880ab
#define RTM_NEWCACHEREPORT RTM_NEWCACHEREPORT
Packit Service 3880ab
Packit Service 3880ab
	RTM_NEWCHAIN = 100,
Packit Service 3880ab
#define RTM_NEWCHAIN RTM_NEWCHAIN
Packit Service 3880ab
	RTM_DELCHAIN,
Packit Service 3880ab
#define RTM_DELCHAIN RTM_DELCHAIN
Packit Service 3880ab
	RTM_GETCHAIN,
Packit Service 3880ab
#define RTM_GETCHAIN RTM_GETCHAIN
Packit Service 3880ab
Packit Service 3880ab
	RTM_NEWNEXTHOP = 104,
Packit Service 3880ab
#define RTM_NEWNEXTHOP	RTM_NEWNEXTHOP
Packit Service 3880ab
	RTM_DELNEXTHOP,
Packit Service 3880ab
#define RTM_DELNEXTHOP	RTM_DELNEXTHOP
Packit Service 3880ab
	RTM_GETNEXTHOP,
Packit Service 3880ab
#define RTM_GETNEXTHOP	RTM_GETNEXTHOP
Packit Service 3880ab
Packit Service 3880ab
	RTM_NEWLINKPROP = 108,
Packit Service 3880ab
#define RTM_NEWLINKPROP	RTM_NEWLINKPROP
Packit Service 3880ab
	RTM_DELLINKPROP,
Packit Service 3880ab
#define RTM_DELLINKPROP	RTM_DELLINKPROP
Packit Service 3880ab
	RTM_GETLINKPROP,
Packit Service 3880ab
#define RTM_GETLINKPROP	RTM_GETLINKPROP
Packit Service 3880ab
Packit Service 3880ab
	RTM_NEWVLAN = 112,
Packit Service 3880ab
#define RTM_NEWNVLAN	RTM_NEWVLAN
Packit Service 3880ab
	RTM_DELVLAN,
Packit Service 3880ab
#define RTM_DELVLAN	RTM_DELVLAN
Packit Service 3880ab
	RTM_GETVLAN,
Packit Service 3880ab
#define RTM_GETVLAN	RTM_GETVLAN
Packit Service 3880ab
Packit Service 3880ab
	__RTM_MAX,
Packit Service 3880ab
#define RTM_MAX		(((__RTM_MAX + 3) & ~3) - 1)
Packit Service 3880ab
};
Packit Service 3880ab
Packit Service 3880ab
#define RTM_NR_MSGTYPES	(RTM_MAX + 1 - RTM_BASE)
Packit Service 3880ab
#define RTM_NR_FAMILIES	(RTM_NR_MSGTYPES >> 2)
Packit Service 3880ab
#define RTM_FAM(cmd)	(((cmd) - RTM_BASE) >> 2)
Packit Service 3880ab
Packit Service 3880ab
/* 
Packit Service 3880ab
   Generic structure for encapsulation of optional route information.
Packit Service 3880ab
   It is reminiscent of sockaddr, but with sa_family replaced
Packit Service 3880ab
   with attribute type.
Packit Service 3880ab
 */
Packit Service 3880ab
Packit Service 3880ab
struct rtattr {
Packit Service 3880ab
	unsigned short	rta_len;
Packit Service 3880ab
	unsigned short	rta_type;
Packit Service 3880ab
};
Packit Service 3880ab
Packit Service 3880ab
/* Macros to handle rtattributes */
Packit Service 3880ab
Packit Service 3880ab
#define RTA_ALIGNTO	4U
Packit Service 3880ab
#define RTA_ALIGN(len) ( ((len)+RTA_ALIGNTO-1) & ~(RTA_ALIGNTO-1) )
Packit Service 3880ab
#define RTA_OK(rta,len) ((len) >= (int)sizeof(struct rtattr) && \
Packit Service 3880ab
			 (rta)->rta_len >= sizeof(struct rtattr) && \
Packit Service 3880ab
			 (rta)->rta_len <= (len))
Packit Service 3880ab
#define RTA_NEXT(rta,attrlen)	((attrlen) -= RTA_ALIGN((rta)->rta_len), \
Packit Service 3880ab
				 (struct rtattr*)(((char*)(rta)) + RTA_ALIGN((rta)->rta_len)))
Packit Service 3880ab
#define RTA_LENGTH(len)	(RTA_ALIGN(sizeof(struct rtattr)) + (len))
Packit Service 3880ab
#define RTA_SPACE(len)	RTA_ALIGN(RTA_LENGTH(len))
Packit Service 3880ab
#define RTA_DATA(rta)   ((void*)(((char*)(rta)) + RTA_LENGTH(0)))
Packit Service 3880ab
#define RTA_PAYLOAD(rta) ((int)((rta)->rta_len) - RTA_LENGTH(0))
Packit Service 3880ab
Packit Service 3880ab
Packit Service 3880ab
Packit Service 3880ab
Packit Service 3880ab
/******************************************************************************
Packit Service 3880ab
 *		Definitions used in routing table administration.
Packit Service 3880ab
 ****/
Packit Service 3880ab
Packit Service 3880ab
struct rtmsg {
Packit Service 3880ab
	unsigned char		rtm_family;
Packit Service 3880ab
	unsigned char		rtm_dst_len;
Packit Service 3880ab
	unsigned char		rtm_src_len;
Packit Service 3880ab
	unsigned char		rtm_tos;
Packit Service 3880ab
Packit Service 3880ab
	unsigned char		rtm_table;	/* Routing table id */
Packit Service 3880ab
	unsigned char		rtm_protocol;	/* Routing protocol; see below	*/
Packit Service 3880ab
	unsigned char		rtm_scope;	/* See below */	
Packit Service 3880ab
	unsigned char		rtm_type;	/* See below	*/
Packit Service 3880ab
Packit Service 3880ab
	unsigned		rtm_flags;
Packit Service 3880ab
};
Packit Service 3880ab
Packit Service 3880ab
/* rtm_type */
Packit Service 3880ab
Packit Service 3880ab
enum {
Packit Service 3880ab
	RTN_UNSPEC,
Packit Service 3880ab
	RTN_UNICAST,		/* Gateway or direct route	*/
Packit Service 3880ab
	RTN_LOCAL,		/* Accept locally		*/
Packit Service 3880ab
	RTN_BROADCAST,		/* Accept locally as broadcast,
Packit Service 3880ab
				   send as broadcast */
Packit Service 3880ab
	RTN_ANYCAST,		/* Accept locally as broadcast,
Packit Service 3880ab
				   but send as unicast */
Packit Service 3880ab
	RTN_MULTICAST,		/* Multicast route		*/
Packit Service 3880ab
	RTN_BLACKHOLE,		/* Drop				*/
Packit Service 3880ab
	RTN_UNREACHABLE,	/* Destination is unreachable   */
Packit Service 3880ab
	RTN_PROHIBIT,		/* Administratively prohibited	*/
Packit Service 3880ab
	RTN_THROW,		/* Not in this table		*/
Packit Service 3880ab
	RTN_NAT,		/* Translate this address	*/
Packit Service 3880ab
	RTN_XRESOLVE,		/* Use external resolver	*/
Packit Service 3880ab
	__RTN_MAX
Packit Service 3880ab
};
Packit Service 3880ab
Packit Service 3880ab
#define RTN_MAX (__RTN_MAX - 1)
Packit Service 3880ab
Packit Service 3880ab
Packit Service 3880ab
/* rtm_protocol */
Packit Service 3880ab
Packit Service 3880ab
#define RTPROT_UNSPEC		0
Packit Service 3880ab
#define RTPROT_REDIRECT		1	/* Route installed by ICMP redirects;
Packit Service 3880ab
					   not used by current IPv4 */
Packit Service 3880ab
#define RTPROT_KERNEL		2	/* Route installed by kernel		*/
Packit Service 3880ab
#define RTPROT_BOOT		3	/* Route installed during boot		*/
Packit Service 3880ab
#define RTPROT_STATIC		4	/* Route installed by administrator	*/
Packit Service 3880ab
Packit Service 3880ab
/* Values of protocol >= RTPROT_STATIC are not interpreted by kernel;
Packit Service 3880ab
   they are just passed from user and back as is.
Packit Service 3880ab
   It will be used by hypothetical multiple routing daemons.
Packit Service 3880ab
   Note that protocol values should be standardized in order to
Packit Service 3880ab
   avoid conflicts.
Packit Service 3880ab
 */
Packit Service 3880ab
Packit Service 3880ab
#define RTPROT_GATED		8	/* Apparently, GateD */
Packit Service 3880ab
#define RTPROT_RA		9	/* RDISC/ND router advertisements */
Packit Service 3880ab
#define RTPROT_MRT		10	/* Merit MRT */
Packit Service 3880ab
#define RTPROT_ZEBRA		11	/* Zebra */
Packit Service 3880ab
#define RTPROT_BIRD		12	/* BIRD */
Packit Service 3880ab
#define RTPROT_DNROUTED		13	/* DECnet routing daemon */
Packit Service 3880ab
#define RTPROT_XORP		14	/* XORP */
Packit Service 3880ab
#define RTPROT_NTK		15	/* Netsukuku */
Packit Service 3880ab
#define RTPROT_DHCP		16	/* DHCP client */
Packit Service 3880ab
#define RTPROT_MROUTED		17	/* Multicast daemon */
Packit Service 3880ab
#define RTPROT_KEEPALIVED	18	/* Keepalived daemon */
Packit Service 3880ab
#define RTPROT_BABEL		42	/* Babel daemon */
Packit Service 3880ab
#define RTPROT_BGP		186	/* BGP Routes */
Packit Service 3880ab
#define RTPROT_ISIS		187	/* ISIS Routes */
Packit Service 3880ab
#define RTPROT_OSPF		188	/* OSPF Routes */
Packit Service 3880ab
#define RTPROT_RIP		189	/* RIP Routes */
Packit Service 3880ab
#define RTPROT_EIGRP		192	/* EIGRP Routes */
Packit Service 3880ab
Packit Service 3880ab
/* rtm_scope
Packit Service 3880ab
Packit Service 3880ab
   Really it is not scope, but sort of distance to the destination.
Packit Service 3880ab
   NOWHERE are reserved for not existing destinations, HOST is our
Packit Service 3880ab
   local addresses, LINK are destinations, located on directly attached
Packit Service 3880ab
   link and UNIVERSE is everywhere in the Universe.
Packit Service 3880ab
Packit Service 3880ab
   Intermediate values are also possible f.e. interior routes
Packit Service 3880ab
   could be assigned a value between UNIVERSE and LINK.
Packit Service 3880ab
*/
Packit Service 3880ab
Packit Service 3880ab
enum rt_scope_t {
Packit Service 3880ab
	RT_SCOPE_UNIVERSE=0,
Packit Service 3880ab
/* User defined values  */
Packit Service 3880ab
	RT_SCOPE_SITE=200,
Packit Service 3880ab
	RT_SCOPE_LINK=253,
Packit Service 3880ab
	RT_SCOPE_HOST=254,
Packit Service 3880ab
	RT_SCOPE_NOWHERE=255
Packit Service 3880ab
};
Packit Service 3880ab
Packit Service 3880ab
/* rtm_flags */
Packit Service 3880ab
Packit Service 3880ab
#define RTM_F_NOTIFY		0x100	/* Notify user of route change	*/
Packit Service 3880ab
#define RTM_F_CLONED		0x200	/* This route is cloned		*/
Packit Service 3880ab
#define RTM_F_EQUALIZE		0x400	/* Multipath equalizer: NI	*/
Packit Service 3880ab
#define RTM_F_PREFIX		0x800	/* Prefix addresses		*/
Packit Service 3880ab
#define RTM_F_LOOKUP_TABLE	0x1000	/* set rtm_table to FIB lookup result */
Packit Service 3880ab
#define RTM_F_FIB_MATCH	        0x2000	/* return full fib lookup match */
Packit Service 3880ab
#define RTM_F_OFFLOAD		0x4000	/* route is offloaded */
Packit Service 3880ab
#define RTM_F_TRAP		0x8000	/* route is trapping packets */
Packit Service 3880ab
Packit Service 3880ab
/* Reserved table identifiers */
Packit Service 3880ab
Packit Service 3880ab
enum rt_class_t {
Packit Service 3880ab
	RT_TABLE_UNSPEC=0,
Packit Service 3880ab
/* User defined values */
Packit Service 3880ab
	RT_TABLE_COMPAT=252,
Packit Service 3880ab
	RT_TABLE_DEFAULT=253,
Packit Service 3880ab
	RT_TABLE_MAIN=254,
Packit Service 3880ab
	RT_TABLE_LOCAL=255,
Packit Service 3880ab
	RT_TABLE_MAX=0xFFFFFFFF
Packit Service 3880ab
};
Packit Service 3880ab
Packit Service 3880ab
Packit Service 3880ab
/* Routing message attributes */
Packit Service 3880ab
Packit Service 3880ab
enum rtattr_type_t {
Packit Service 3880ab
	RTA_UNSPEC,
Packit Service 3880ab
	RTA_DST,
Packit Service 3880ab
	RTA_SRC,
Packit Service 3880ab
	RTA_IIF,
Packit Service 3880ab
	RTA_OIF,
Packit Service 3880ab
	RTA_GATEWAY,
Packit Service 3880ab
	RTA_PRIORITY,
Packit Service 3880ab
	RTA_PREFSRC,
Packit Service 3880ab
	RTA_METRICS,
Packit Service 3880ab
	RTA_MULTIPATH,
Packit Service 3880ab
	RTA_PROTOINFO, /* no longer used */
Packit Service 3880ab
	RTA_FLOW,
Packit Service 3880ab
	RTA_CACHEINFO,
Packit Service 3880ab
	RTA_SESSION, /* no longer used */
Packit Service 3880ab
	RTA_MP_ALGO, /* no longer used */
Packit Service 3880ab
	RTA_TABLE,
Packit Service 3880ab
	RTA_MARK,
Packit Service 3880ab
	RTA_MFC_STATS,
Packit Service 3880ab
	RTA_VIA,
Packit Service 3880ab
	RTA_NEWDST,
Packit Service 3880ab
	RTA_PREF,
Packit Service 3880ab
	RTA_ENCAP_TYPE,
Packit Service 3880ab
	RTA_ENCAP,
Packit Service 3880ab
	RTA_EXPIRES,
Packit Service 3880ab
	RTA_PAD,
Packit Service 3880ab
	RTA_UID,
Packit Service 3880ab
	RTA_TTL_PROPAGATE,
Packit Service 3880ab
	RTA_IP_PROTO,
Packit Service 3880ab
	RTA_SPORT,
Packit Service 3880ab
	RTA_DPORT,
Packit Service 3880ab
	RTA_NH_ID,
Packit Service 3880ab
	__RTA_MAX
Packit Service 3880ab
};
Packit Service 3880ab
Packit Service 3880ab
#define RTA_MAX (__RTA_MAX - 1)
Packit Service 3880ab
Packit Service 3880ab
#define RTM_RTA(r)  ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct rtmsg))))
Packit Service 3880ab
#define RTM_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct rtmsg))
Packit Service 3880ab
Packit Service 3880ab
/* RTM_MULTIPATH --- array of struct rtnexthop.
Packit Service 3880ab
 *
Packit Service 3880ab
 * "struct rtnexthop" describes all necessary nexthop information,
Packit Service 3880ab
 * i.e. parameters of path to a destination via this nexthop.
Packit Service 3880ab
 *
Packit Service 3880ab
 * At the moment it is impossible to set different prefsrc, mtu, window
Packit Service 3880ab
 * and rtt for different paths from multipath.
Packit Service 3880ab
 */
Packit Service 3880ab
Packit Service 3880ab
struct rtnexthop {
Packit Service 3880ab
	unsigned short		rtnh_len;
Packit Service 3880ab
	unsigned char		rtnh_flags;
Packit Service 3880ab
	unsigned char		rtnh_hops;
Packit Service 3880ab
	int			rtnh_ifindex;
Packit Service 3880ab
};
Packit Service 3880ab
Packit Service 3880ab
/* rtnh_flags */
Packit Service 3880ab
Packit Service 3880ab
#define RTNH_F_DEAD		1	/* Nexthop is dead (used by multipath)	*/
Packit Service 3880ab
#define RTNH_F_PERVASIVE	2	/* Do recursive gateway lookup	*/
Packit Service 3880ab
#define RTNH_F_ONLINK		4	/* Gateway is forced on link	*/
Packit Service 3880ab
#define RTNH_F_OFFLOAD		8	/* offloaded route */
Packit Service 3880ab
#define RTNH_F_LINKDOWN		16	/* carrier-down on nexthop */
Packit Service 3880ab
#define RTNH_F_UNRESOLVED	32	/* The entry is unresolved (ipmr) */
Packit Service 3880ab
Packit Service 3880ab
#define RTNH_COMPARE_MASK	(RTNH_F_DEAD | RTNH_F_LINKDOWN | RTNH_F_OFFLOAD)
Packit Service 3880ab
Packit Service 3880ab
/* Macros to handle hexthops */
Packit Service 3880ab
Packit Service 3880ab
#define RTNH_ALIGNTO	4
Packit Service 3880ab
#define RTNH_ALIGN(len) ( ((len)+RTNH_ALIGNTO-1) & ~(RTNH_ALIGNTO-1) )
Packit Service 3880ab
#define RTNH_OK(rtnh,len) ((rtnh)->rtnh_len >= sizeof(struct rtnexthop) && \
Packit Service 3880ab
			   ((int)(rtnh)->rtnh_len) <= (len))
Packit Service 3880ab
#define RTNH_NEXT(rtnh)	((struct rtnexthop*)(((char*)(rtnh)) + RTNH_ALIGN((rtnh)->rtnh_len)))
Packit Service 3880ab
#define RTNH_LENGTH(len) (RTNH_ALIGN(sizeof(struct rtnexthop)) + (len))
Packit Service 3880ab
#define RTNH_SPACE(len)	RTNH_ALIGN(RTNH_LENGTH(len))
Packit Service 3880ab
#define RTNH_DATA(rtnh)   ((struct rtattr*)(((char*)(rtnh)) + RTNH_LENGTH(0)))
Packit Service 3880ab
Packit Service 3880ab
/* RTA_VIA */
Packit Service 3880ab
struct rtvia {
Packit Service 3880ab
	__kernel_sa_family_t	rtvia_family;
Packit Service 3880ab
	__u8			rtvia_addr[0];
Packit Service 3880ab
};
Packit Service 3880ab
Packit Service 3880ab
/* RTM_CACHEINFO */
Packit Service 3880ab
Packit Service 3880ab
struct rta_cacheinfo {
Packit Service 3880ab
	__u32	rta_clntref;
Packit Service 3880ab
	__u32	rta_lastuse;
Packit Service 3880ab
	__s32	rta_expires;
Packit Service 3880ab
	__u32	rta_error;
Packit Service 3880ab
	__u32	rta_used;
Packit Service 3880ab
Packit Service 3880ab
#define RTNETLINK_HAVE_PEERINFO 1
Packit Service 3880ab
	__u32	rta_id;
Packit Service 3880ab
	__u32	rta_ts;
Packit Service 3880ab
	__u32	rta_tsage;
Packit Service 3880ab
};
Packit Service 3880ab
Packit Service 3880ab
/* RTM_METRICS --- array of struct rtattr with types of RTAX_* */
Packit Service 3880ab
Packit Service 3880ab
enum {
Packit Service 3880ab
	RTAX_UNSPEC,
Packit Service 3880ab
#define RTAX_UNSPEC RTAX_UNSPEC
Packit Service 3880ab
	RTAX_LOCK,
Packit Service 3880ab
#define RTAX_LOCK RTAX_LOCK
Packit Service 3880ab
	RTAX_MTU,
Packit Service 3880ab
#define RTAX_MTU RTAX_MTU
Packit Service 3880ab
	RTAX_WINDOW,
Packit Service 3880ab
#define RTAX_WINDOW RTAX_WINDOW
Packit Service 3880ab
	RTAX_RTT,
Packit Service 3880ab
#define RTAX_RTT RTAX_RTT
Packit Service 3880ab
	RTAX_RTTVAR,
Packit Service 3880ab
#define RTAX_RTTVAR RTAX_RTTVAR
Packit Service 3880ab
	RTAX_SSTHRESH,
Packit Service 3880ab
#define RTAX_SSTHRESH RTAX_SSTHRESH
Packit Service 3880ab
	RTAX_CWND,
Packit Service 3880ab
#define RTAX_CWND RTAX_CWND
Packit Service 3880ab
	RTAX_ADVMSS,
Packit Service 3880ab
#define RTAX_ADVMSS RTAX_ADVMSS
Packit Service 3880ab
	RTAX_REORDERING,
Packit Service 3880ab
#define RTAX_REORDERING RTAX_REORDERING
Packit Service 3880ab
	RTAX_HOPLIMIT,
Packit Service 3880ab
#define RTAX_HOPLIMIT RTAX_HOPLIMIT
Packit Service 3880ab
	RTAX_INITCWND,
Packit Service 3880ab
#define RTAX_INITCWND RTAX_INITCWND
Packit Service 3880ab
	RTAX_FEATURES,
Packit Service 3880ab
#define RTAX_FEATURES RTAX_FEATURES
Packit Service 3880ab
	RTAX_RTO_MIN,
Packit Service 3880ab
#define RTAX_RTO_MIN RTAX_RTO_MIN
Packit Service 3880ab
	RTAX_INITRWND,
Packit Service 3880ab
#define RTAX_INITRWND RTAX_INITRWND
Packit Service 3880ab
	RTAX_QUICKACK,
Packit Service 3880ab
#define RTAX_QUICKACK RTAX_QUICKACK
Packit Service 3880ab
	RTAX_CC_ALGO,
Packit Service 3880ab
#define RTAX_CC_ALGO RTAX_CC_ALGO
Packit Service 3880ab
	RTAX_FASTOPEN_NO_COOKIE,
Packit Service 3880ab
#define RTAX_FASTOPEN_NO_COOKIE RTAX_FASTOPEN_NO_COOKIE
Packit Service 3880ab
	__RTAX_MAX
Packit Service 3880ab
};
Packit Service 3880ab
Packit Service 3880ab
#define RTAX_MAX (__RTAX_MAX - 1)
Packit Service 3880ab
Packit Service 3880ab
#define RTAX_FEATURE_ECN	(1 << 0)
Packit Service 3880ab
#define RTAX_FEATURE_SACK	(1 << 1)
Packit Service 3880ab
#define RTAX_FEATURE_TIMESTAMP	(1 << 2)
Packit Service 3880ab
#define RTAX_FEATURE_ALLFRAG	(1 << 3)
Packit Service 3880ab
Packit Service 3880ab
#define RTAX_FEATURE_MASK	(RTAX_FEATURE_ECN | RTAX_FEATURE_SACK | \
Packit Service 3880ab
				 RTAX_FEATURE_TIMESTAMP | RTAX_FEATURE_ALLFRAG)
Packit Service 3880ab
Packit Service 3880ab
struct rta_session {
Packit Service 3880ab
	__u8	proto;
Packit Service 3880ab
	__u8	pad1;
Packit Service 3880ab
	__u16	pad2;
Packit Service 3880ab
Packit Service 3880ab
	union {
Packit Service 3880ab
		struct {
Packit Service 3880ab
			__u16	sport;
Packit Service 3880ab
			__u16	dport;
Packit Service 3880ab
		} ports;
Packit Service 3880ab
Packit Service 3880ab
		struct {
Packit Service 3880ab
			__u8	type;
Packit Service 3880ab
			__u8	code;
Packit Service 3880ab
			__u16	ident;
Packit Service 3880ab
		} icmpt;
Packit Service 3880ab
Packit Service 3880ab
		__u32		spi;
Packit Service 3880ab
	} u;
Packit Service 3880ab
};
Packit Service 3880ab
Packit Service 3880ab
struct rta_mfc_stats {
Packit Service 3880ab
	__u64	mfcs_packets;
Packit Service 3880ab
	__u64	mfcs_bytes;
Packit Service 3880ab
	__u64	mfcs_wrong_if;
Packit Service 3880ab
};
Packit Service 3880ab
Packit Service 3880ab
/****
Packit Service 3880ab
 *		General form of address family dependent message.
Packit Service 3880ab
 ****/
Packit Service 3880ab
Packit Service 3880ab
struct rtgenmsg {
Packit Service 3880ab
	unsigned char		rtgen_family;
Packit Service 3880ab
};
Packit Service 3880ab
Packit Service 3880ab
/*****************************************************************
Packit Service 3880ab
 *		Link layer specific messages.
Packit Service 3880ab
 ****/
Packit Service 3880ab
Packit Service 3880ab
/* struct ifinfomsg
Packit Service 3880ab
 * passes link level specific information, not dependent
Packit Service 3880ab
 * on network protocol.
Packit Service 3880ab
 */
Packit Service 3880ab
Packit Service 3880ab
struct ifinfomsg {
Packit Service 3880ab
	unsigned char	ifi_family;
Packit Service 3880ab
	unsigned char	__ifi_pad;
Packit Service 3880ab
	unsigned short	ifi_type;		/* ARPHRD_* */
Packit Service 3880ab
	int		ifi_index;		/* Link index	*/
Packit Service 3880ab
	unsigned	ifi_flags;		/* IFF_* flags	*/
Packit Service 3880ab
	unsigned	ifi_change;		/* IFF_* change mask */
Packit Service 3880ab
};
Packit Service 3880ab
Packit Service 3880ab
/********************************************************************
Packit Service 3880ab
 *		prefix information 
Packit Service 3880ab
 ****/
Packit Service 3880ab
Packit Service 3880ab
struct prefixmsg {
Packit Service 3880ab
	unsigned char	prefix_family;
Packit Service 3880ab
	unsigned char	prefix_pad1;
Packit Service 3880ab
	unsigned short	prefix_pad2;
Packit Service 3880ab
	int		prefix_ifindex;
Packit Service 3880ab
	unsigned char	prefix_type;
Packit Service 3880ab
	unsigned char	prefix_len;
Packit Service 3880ab
	unsigned char	prefix_flags;
Packit Service 3880ab
	unsigned char	prefix_pad3;
Packit Service 3880ab
};
Packit Service 3880ab
Packit Service 3880ab
enum 
Packit Service 3880ab
{
Packit Service 3880ab
	PREFIX_UNSPEC,
Packit Service 3880ab
	PREFIX_ADDRESS,
Packit Service 3880ab
	PREFIX_CACHEINFO,
Packit Service 3880ab
	__PREFIX_MAX
Packit Service 3880ab
};
Packit Service 3880ab
Packit Service 3880ab
#define PREFIX_MAX	(__PREFIX_MAX - 1)
Packit Service 3880ab
Packit Service 3880ab
struct prefix_cacheinfo {
Packit Service 3880ab
	__u32	preferred_time;
Packit Service 3880ab
	__u32	valid_time;
Packit Service 3880ab
};
Packit Service 3880ab
Packit Service 3880ab
Packit Service 3880ab
/*****************************************************************
Packit Service 3880ab
 *		Traffic control messages.
Packit Service 3880ab
 ****/
Packit Service 3880ab
Packit Service 3880ab
struct tcmsg {
Packit Service 3880ab
	unsigned char	tcm_family;
Packit Service 3880ab
	unsigned char	tcm__pad1;
Packit Service 3880ab
	unsigned short	tcm__pad2;
Packit Service 3880ab
	int		tcm_ifindex;
Packit Service 3880ab
	__u32		tcm_handle;
Packit Service 3880ab
	__u32		tcm_parent;
Packit Service 3880ab
/* tcm_block_index is used instead of tcm_parent
Packit Service 3880ab
 * in case tcm_ifindex == TCM_IFINDEX_MAGIC_BLOCK
Packit Service 3880ab
 */
Packit Service 3880ab
#define tcm_block_index tcm_parent
Packit Service 3880ab
	__u32		tcm_info;
Packit Service 3880ab
};
Packit Service 3880ab
Packit Service 3880ab
/* For manipulation of filters in shared block, tcm_ifindex is set to
Packit Service 3880ab
 * TCM_IFINDEX_MAGIC_BLOCK, and tcm_parent is aliased to tcm_block_index
Packit Service 3880ab
 * which is the block index.
Packit Service 3880ab
 */
Packit Service 3880ab
#define TCM_IFINDEX_MAGIC_BLOCK (0xFFFFFFFFU)
Packit Service 3880ab
Packit Service 3880ab
enum {
Packit Service 3880ab
	TCA_UNSPEC,
Packit Service 3880ab
	TCA_KIND,
Packit Service 3880ab
	TCA_OPTIONS,
Packit Service 3880ab
	TCA_STATS,
Packit Service 3880ab
	TCA_XSTATS,
Packit Service 3880ab
	TCA_RATE,
Packit Service 3880ab
	TCA_FCNT,
Packit Service 3880ab
	TCA_STATS2,
Packit Service 3880ab
	TCA_STAB,
Packit Service 3880ab
	TCA_PAD,
Packit Service 3880ab
	TCA_DUMP_INVISIBLE,
Packit Service 3880ab
	TCA_CHAIN,
Packit Service 3880ab
	TCA_HW_OFFLOAD,
Packit Service 3880ab
	TCA_INGRESS_BLOCK,
Packit Service 3880ab
	TCA_EGRESS_BLOCK,
Packit Service 3880ab
	TCA_DUMP_FLAGS,
Packit Service 3880ab
	__TCA_MAX
Packit Service 3880ab
};
Packit Service 3880ab
Packit Service 3880ab
#define TCA_MAX (__TCA_MAX - 1)
Packit Service 3880ab
Packit Service 3880ab
#define TCA_DUMP_FLAGS_TERSE (1 << 0) /* Means that in dump user gets only basic
Packit Service 3880ab
				       * data necessary to identify the objects
Packit Service 3880ab
				       * (handle, cookie, etc.) and stats.
Packit Service 3880ab
				       */
Packit Service 3880ab
Packit Service 3880ab
#define TCA_RTA(r)  ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct tcmsg))))
Packit Service 3880ab
#define TCA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct tcmsg))
Packit Service 3880ab
Packit Service 3880ab
/********************************************************************
Packit Service 3880ab
 *		Neighbor Discovery userland options
Packit Service 3880ab
 ****/
Packit Service 3880ab
Packit Service 3880ab
struct nduseroptmsg {
Packit Service 3880ab
	unsigned char	nduseropt_family;
Packit Service 3880ab
	unsigned char	nduseropt_pad1;
Packit Service 3880ab
	unsigned short	nduseropt_opts_len;	/* Total length of options */
Packit Service 3880ab
	int		nduseropt_ifindex;
Packit Service 3880ab
	__u8		nduseropt_icmp_type;
Packit Service 3880ab
	__u8		nduseropt_icmp_code;
Packit Service 3880ab
	unsigned short	nduseropt_pad2;
Packit Service 3880ab
	unsigned int	nduseropt_pad3;
Packit Service 3880ab
	/* Followed by one or more ND options */
Packit Service 3880ab
};
Packit Service 3880ab
Packit Service 3880ab
enum {
Packit Service 3880ab
	NDUSEROPT_UNSPEC,
Packit Service 3880ab
	NDUSEROPT_SRCADDR,
Packit Service 3880ab
	__NDUSEROPT_MAX
Packit Service 3880ab
};
Packit Service 3880ab
Packit Service 3880ab
#define NDUSEROPT_MAX	(__NDUSEROPT_MAX - 1)
Packit Service 3880ab
Packit Service 3880ab
/* RTnetlink multicast groups - backwards compatibility for userspace */
Packit Service 3880ab
#define RTMGRP_LINK		1
Packit Service 3880ab
#define RTMGRP_NOTIFY		2
Packit Service 3880ab
#define RTMGRP_NEIGH		4
Packit Service 3880ab
#define RTMGRP_TC		8
Packit Service 3880ab
Packit Service 3880ab
#define RTMGRP_IPV4_IFADDR	0x10
Packit Service 3880ab
#define RTMGRP_IPV4_MROUTE	0x20
Packit Service 3880ab
#define RTMGRP_IPV4_ROUTE	0x40
Packit Service 3880ab
#define RTMGRP_IPV4_RULE	0x80
Packit Service 3880ab
Packit Service 3880ab
#define RTMGRP_IPV6_IFADDR	0x100
Packit Service 3880ab
#define RTMGRP_IPV6_MROUTE	0x200
Packit Service 3880ab
#define RTMGRP_IPV6_ROUTE	0x400
Packit Service 3880ab
#define RTMGRP_IPV6_IFINFO	0x800
Packit Service 3880ab
Packit Service 3880ab
#define RTMGRP_DECnet_IFADDR    0x1000
Packit Service 3880ab
#define RTMGRP_DECnet_ROUTE     0x4000
Packit Service 3880ab
Packit Service 3880ab
#define RTMGRP_IPV6_PREFIX	0x20000
Packit Service 3880ab
Packit Service 3880ab
/* RTnetlink multicast groups */
Packit Service 3880ab
enum rtnetlink_groups {
Packit Service 3880ab
	RTNLGRP_NONE,
Packit Service 3880ab
#define RTNLGRP_NONE		RTNLGRP_NONE
Packit Service 3880ab
	RTNLGRP_LINK,
Packit Service 3880ab
#define RTNLGRP_LINK		RTNLGRP_LINK
Packit Service 3880ab
	RTNLGRP_NOTIFY,
Packit Service 3880ab
#define RTNLGRP_NOTIFY		RTNLGRP_NOTIFY
Packit Service 3880ab
	RTNLGRP_NEIGH,
Packit Service 3880ab
#define RTNLGRP_NEIGH		RTNLGRP_NEIGH
Packit Service 3880ab
	RTNLGRP_TC,
Packit Service 3880ab
#define RTNLGRP_TC		RTNLGRP_TC
Packit Service 3880ab
	RTNLGRP_IPV4_IFADDR,
Packit Service 3880ab
#define RTNLGRP_IPV4_IFADDR	RTNLGRP_IPV4_IFADDR
Packit Service 3880ab
	RTNLGRP_IPV4_MROUTE,
Packit Service 3880ab
#define	RTNLGRP_IPV4_MROUTE	RTNLGRP_IPV4_MROUTE
Packit Service 3880ab
	RTNLGRP_IPV4_ROUTE,
Packit Service 3880ab
#define RTNLGRP_IPV4_ROUTE	RTNLGRP_IPV4_ROUTE
Packit Service 3880ab
	RTNLGRP_IPV4_RULE,
Packit Service 3880ab
#define RTNLGRP_IPV4_RULE	RTNLGRP_IPV4_RULE
Packit Service 3880ab
	RTNLGRP_IPV6_IFADDR,
Packit Service 3880ab
#define RTNLGRP_IPV6_IFADDR	RTNLGRP_IPV6_IFADDR
Packit Service 3880ab
	RTNLGRP_IPV6_MROUTE,
Packit Service 3880ab
#define RTNLGRP_IPV6_MROUTE	RTNLGRP_IPV6_MROUTE
Packit Service 3880ab
	RTNLGRP_IPV6_ROUTE,
Packit Service 3880ab
#define RTNLGRP_IPV6_ROUTE	RTNLGRP_IPV6_ROUTE
Packit Service 3880ab
	RTNLGRP_IPV6_IFINFO,
Packit Service 3880ab
#define RTNLGRP_IPV6_IFINFO	RTNLGRP_IPV6_IFINFO
Packit Service 3880ab
	RTNLGRP_DECnet_IFADDR,
Packit Service 3880ab
#define RTNLGRP_DECnet_IFADDR	RTNLGRP_DECnet_IFADDR
Packit Service 3880ab
	RTNLGRP_NOP2,
Packit Service 3880ab
	RTNLGRP_DECnet_ROUTE,
Packit Service 3880ab
#define RTNLGRP_DECnet_ROUTE	RTNLGRP_DECnet_ROUTE
Packit Service 3880ab
	RTNLGRP_DECnet_RULE,
Packit Service 3880ab
#define RTNLGRP_DECnet_RULE	RTNLGRP_DECnet_RULE
Packit Service 3880ab
	RTNLGRP_NOP4,
Packit Service 3880ab
	RTNLGRP_IPV6_PREFIX,
Packit Service 3880ab
#define RTNLGRP_IPV6_PREFIX	RTNLGRP_IPV6_PREFIX
Packit Service 3880ab
	RTNLGRP_IPV6_RULE,
Packit Service 3880ab
#define RTNLGRP_IPV6_RULE	RTNLGRP_IPV6_RULE
Packit Service 3880ab
	RTNLGRP_ND_USEROPT,
Packit Service 3880ab
#define RTNLGRP_ND_USEROPT	RTNLGRP_ND_USEROPT
Packit Service 3880ab
	RTNLGRP_PHONET_IFADDR,
Packit Service 3880ab
#define RTNLGRP_PHONET_IFADDR	RTNLGRP_PHONET_IFADDR
Packit Service 3880ab
	RTNLGRP_PHONET_ROUTE,
Packit Service 3880ab
#define RTNLGRP_PHONET_ROUTE	RTNLGRP_PHONET_ROUTE
Packit Service 3880ab
	RTNLGRP_DCB,
Packit Service 3880ab
#define RTNLGRP_DCB		RTNLGRP_DCB
Packit Service 3880ab
	RTNLGRP_IPV4_NETCONF,
Packit Service 3880ab
#define RTNLGRP_IPV4_NETCONF	RTNLGRP_IPV4_NETCONF
Packit Service 3880ab
	RTNLGRP_IPV6_NETCONF,
Packit Service 3880ab
#define RTNLGRP_IPV6_NETCONF	RTNLGRP_IPV6_NETCONF
Packit Service 3880ab
	RTNLGRP_MDB,
Packit Service 3880ab
#define RTNLGRP_MDB		RTNLGRP_MDB
Packit Service 3880ab
	RTNLGRP_MPLS_ROUTE,
Packit Service 3880ab
#define RTNLGRP_MPLS_ROUTE	RTNLGRP_MPLS_ROUTE
Packit Service 3880ab
	RTNLGRP_NSID,
Packit Service 3880ab
#define RTNLGRP_NSID		RTNLGRP_NSID
Packit Service 3880ab
	RTNLGRP_MPLS_NETCONF,
Packit Service 3880ab
#define RTNLGRP_MPLS_NETCONF	RTNLGRP_MPLS_NETCONF
Packit Service 3880ab
	RTNLGRP_IPV4_MROUTE_R,
Packit Service 3880ab
#define RTNLGRP_IPV4_MROUTE_R	RTNLGRP_IPV4_MROUTE_R
Packit Service 3880ab
	RTNLGRP_IPV6_MROUTE_R,
Packit Service 3880ab
#define RTNLGRP_IPV6_MROUTE_R	RTNLGRP_IPV6_MROUTE_R
Packit Service 3880ab
	RTNLGRP_NEXTHOP,
Packit Service 3880ab
#define RTNLGRP_NEXTHOP		RTNLGRP_NEXTHOP
Packit Service 3880ab
	RTNLGRP_BRVLAN,
Packit Service 3880ab
#define RTNLGRP_BRVLAN		RTNLGRP_BRVLAN
Packit Service 3880ab
	__RTNLGRP_MAX
Packit Service 3880ab
};
Packit Service 3880ab
#define RTNLGRP_MAX	(__RTNLGRP_MAX - 1)
Packit Service 3880ab
Packit Service 3880ab
/* TC action piece */
Packit Service 3880ab
struct tcamsg {
Packit Service 3880ab
	unsigned char	tca_family;
Packit Service 3880ab
	unsigned char	tca__pad1;
Packit Service 3880ab
	unsigned short	tca__pad2;
Packit Service 3880ab
};
Packit Service 3880ab
Packit Service 3880ab
enum {
Packit Service 3880ab
	TCA_ROOT_UNSPEC,
Packit Service 3880ab
	TCA_ROOT_TAB,
Packit Service 3880ab
#define TCA_ACT_TAB TCA_ROOT_TAB
Packit Service 3880ab
#define TCAA_MAX TCA_ROOT_TAB
Packit Service 3880ab
	TCA_ROOT_FLAGS,
Packit Service 3880ab
	TCA_ROOT_COUNT,
Packit Service 3880ab
	TCA_ROOT_TIME_DELTA, /* in msecs */
Packit Service 3880ab
	__TCA_ROOT_MAX,
Packit Service 3880ab
#define	TCA_ROOT_MAX (__TCA_ROOT_MAX - 1)
Packit Service 3880ab
};
Packit Service 3880ab
Packit Service 3880ab
#define TA_RTA(r)  ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct tcamsg))))
Packit Service 3880ab
#define TA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct tcamsg))
Packit Service 3880ab
/* tcamsg flags stored in attribute TCA_ROOT_FLAGS
Packit Service 3880ab
 *
Packit Service 3880ab
 * TCA_FLAG_LARGE_DUMP_ON user->kernel to request for larger than TCA_ACT_MAX_PRIO
Packit Service 3880ab
 * actions in a dump. All dump responses will contain the number of actions
Packit Service 3880ab
 * being dumped stored in for user app's consumption in TCA_ROOT_COUNT
Packit Service 3880ab
 *
Packit Service 3880ab
 */
Packit Service 3880ab
#define TCA_FLAG_LARGE_DUMP_ON		(1 << 0)
Packit Service 3880ab
Packit Service 3880ab
/* New extended info filters for IFLA_EXT_MASK */
Packit Service 3880ab
#define RTEXT_FILTER_VF		(1 << 0)
Packit Service 3880ab
#define RTEXT_FILTER_BRVLAN	(1 << 1)
Packit Service 3880ab
#define RTEXT_FILTER_BRVLAN_COMPRESSED	(1 << 2)
Packit Service 3880ab
#define	RTEXT_FILTER_SKIP_STATS	(1 << 3)
Packit Service 3880ab
#define RTEXT_FILTER_MRP	(1 << 4)
Packit Service 3880ab
Packit Service 3880ab
/* End of information exported to user level */
Packit Service 3880ab
Packit Service 3880ab
Packit Service 3880ab
Packit Service 3880ab
#endif /* __LINUX_RTNETLINK_H */