linux/include/uapi/linux/rtnetlink.h

/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
#ifndef _UAPI__LINUX_RTNETLINK_H
#define _UAPI__LINUX_RTNETLINK_H

#include <linux/types.h>
#include <linux/netlink.h>
#include <linux/if_link.h>
#include <linux/if_addr.h>
#include <linux/neighbour.h>

/* rtnetlink families. Values up to 127 are reserved for real address
 * families, values above 128 may be used arbitrarily.
 */
#define RTNL_FAMILY_IPMR
#define RTNL_FAMILY_IP6MR
#define RTNL_FAMILY_MAX

/****
 *		Routing/neighbour discovery messages.
 ****/

/* Types of messages */

enum {};

#define RTM_NR_MSGTYPES
#define RTM_NR_FAMILIES
#define RTM_FAM(cmd)

/* 
   Generic structure for encapsulation of optional route information.
   It is reminiscent of sockaddr, but with sa_family replaced
   with attribute type.
 */

struct rtattr {};

/* Macros to handle rtattributes */

#define RTA_ALIGNTO
#define RTA_ALIGN(len)
#define RTA_OK(rta,len)
#define RTA_NEXT(rta,attrlen)
#define RTA_LENGTH(len)
#define RTA_SPACE(len)
#define RTA_DATA(rta)
#define RTA_PAYLOAD(rta)




/******************************************************************************
 *		Definitions used in routing table administration.
 ****/

struct rtmsg {};

/* rtm_type */

enum {};

#define RTN_MAX


/* rtm_protocol */

#define RTPROT_UNSPEC
#define RTPROT_REDIRECT
#define RTPROT_KERNEL
#define RTPROT_BOOT
#define RTPROT_STATIC

/* Values of protocol >= RTPROT_STATIC are not interpreted by kernel;
   they are just passed from user and back as is.
   It will be used by hypothetical multiple routing daemons.
   Note that protocol values should be standardized in order to
   avoid conflicts.
 */

#define RTPROT_GATED
#define RTPROT_RA
#define RTPROT_MRT
#define RTPROT_ZEBRA
#define RTPROT_BIRD
#define RTPROT_DNROUTED
#define RTPROT_XORP
#define RTPROT_NTK
#define RTPROT_DHCP
#define RTPROT_MROUTED
#define RTPROT_KEEPALIVED
#define RTPROT_BABEL
#define RTPROT_OPENR
#define RTPROT_BGP
#define RTPROT_ISIS
#define RTPROT_OSPF
#define RTPROT_RIP
#define RTPROT_EIGRP

/* rtm_scope

   Really it is not scope, but sort of distance to the destination.
   NOWHERE are reserved for not existing destinations, HOST is our
   local addresses, LINK are destinations, located on directly attached
   link and UNIVERSE is everywhere in the Universe.

   Intermediate values are also possible f.e. interior routes
   could be assigned a value between UNIVERSE and LINK.
*/

enum rt_scope_t {};

/* rtm_flags */

#define RTM_F_NOTIFY
#define RTM_F_CLONED
#define RTM_F_EQUALIZE
#define RTM_F_PREFIX
#define RTM_F_LOOKUP_TABLE
#define RTM_F_FIB_MATCH
#define RTM_F_OFFLOAD
#define RTM_F_TRAP
#define RTM_F_OFFLOAD_FAILED

/* Reserved table identifiers */

enum rt_class_t {};


/* Routing message attributes */

enum rtattr_type_t {};

#define RTA_MAX

#define RTM_RTA(r)
#define RTM_PAYLOAD(n)

/* RTM_MULTIPATH --- array of struct rtnexthop.
 *
 * "struct rtnexthop" describes all necessary nexthop information,
 * i.e. parameters of path to a destination via this nexthop.
 *
 * At the moment it is impossible to set different prefsrc, mtu, window
 * and rtt for different paths from multipath.
 */

struct rtnexthop {};

/* rtnh_flags */

#define RTNH_F_DEAD
#define RTNH_F_PERVASIVE
#define RTNH_F_ONLINK
#define RTNH_F_OFFLOAD
#define RTNH_F_LINKDOWN
#define RTNH_F_UNRESOLVED
#define RTNH_F_TRAP

#define RTNH_COMPARE_MASK

/* Macros to handle hexthops */

#define RTNH_ALIGNTO
#define RTNH_ALIGN(len)
#define RTNH_OK(rtnh,len)
#define RTNH_NEXT(rtnh)
#define RTNH_LENGTH(len)
#define RTNH_SPACE(len)
#define RTNH_DATA(rtnh)

/* RTA_VIA */
struct rtvia {};

/* RTM_CACHEINFO */

struct rta_cacheinfo {};

/* RTM_METRICS --- array of struct rtattr with types of RTAX_* */

enum {};

#define RTAX_MAX

#define RTAX_FEATURE_ECN
#define RTAX_FEATURE_SACK
#define RTAX_FEATURE_TIMESTAMP
#define RTAX_FEATURE_ALLFRAG
#define RTAX_FEATURE_TCP_USEC_TS

#define RTAX_FEATURE_MASK

struct rta_session {};

struct rta_mfc_stats {};

/****
 *		General form of address family dependent message.
 ****/

struct rtgenmsg {};

/*****************************************************************
 *		Link layer specific messages.
 ****/

/* struct ifinfomsg
 * passes link level specific information, not dependent
 * on network protocol.
 */

struct ifinfomsg {};

/********************************************************************
 *		prefix information 
 ****/

struct prefixmsg {};

enum 
{};

#define PREFIX_MAX

struct prefix_cacheinfo {};


/*****************************************************************
 *		Traffic control messages.
 ****/

struct tcmsg {};

/* For manipulation of filters in shared block, tcm_ifindex is set to
 * TCM_IFINDEX_MAGIC_BLOCK, and tcm_parent is aliased to tcm_block_index
 * which is the block index.
 */
#define TCM_IFINDEX_MAGIC_BLOCK

enum {};

#define TCA_MAX

#define TCA_DUMP_FLAGS_TERSE

#define TCA_RTA(r)
#define TCA_PAYLOAD(n)

/********************************************************************
 *		Neighbor Discovery userland options
 ****/

struct nduseroptmsg {};

enum {};

#define NDUSEROPT_MAX

#ifndef __KERNEL__
/* RTnetlink multicast groups - backwards compatibility for userspace */
#define RTMGRP_LINK
#define RTMGRP_NOTIFY
#define RTMGRP_NEIGH
#define RTMGRP_TC

#define RTMGRP_IPV4_IFADDR
#define RTMGRP_IPV4_MROUTE
#define RTMGRP_IPV4_ROUTE
#define RTMGRP_IPV4_RULE

#define RTMGRP_IPV6_IFADDR
#define RTMGRP_IPV6_MROUTE
#define RTMGRP_IPV6_ROUTE
#define RTMGRP_IPV6_IFINFO

#define RTMGRP_DECnet_IFADDR
#define RTMGRP_DECnet_ROUTE

#define RTMGRP_IPV6_PREFIX
#endif

/* RTnetlink multicast groups */
enum rtnetlink_groups {};
#define RTNLGRP_MAX

/* TC action piece */
struct tcamsg {};

enum {};

#define TA_RTA(r)
#define TA_PAYLOAD(n)
/* tcamsg flags stored in attribute TCA_ROOT_FLAGS
 *
 * TCA_ACT_FLAG_LARGE_DUMP_ON user->kernel to request for larger than
 * TCA_ACT_MAX_PRIO actions in a dump. All dump responses will contain the
 * number of actions being dumped stored in for user app's consumption in
 * TCA_ROOT_COUNT
 *
 * TCA_ACT_FLAG_TERSE_DUMP user->kernel to request terse (brief) dump that only
 * includes essential action info (kind, index, etc.)
 *
 */
#define TCA_FLAG_LARGE_DUMP_ON
#define TCA_ACT_FLAG_LARGE_DUMP_ON
#define TCA_ACT_FLAG_TERSE_DUMP

/* New extended info filters for IFLA_EXT_MASK */
#define RTEXT_FILTER_VF
#define RTEXT_FILTER_BRVLAN
#define RTEXT_FILTER_BRVLAN_COMPRESSED
#define RTEXT_FILTER_SKIP_STATS
#define RTEXT_FILTER_MRP
#define RTEXT_FILTER_CFM_CONFIG
#define RTEXT_FILTER_CFM_STATUS
#define RTEXT_FILTER_MST

/* End of information exported to user level */



#endif /* _UAPI__LINUX_RTNETLINK_H */