#include <linux/netlink.h>
#include <linux/if_link.h>
#include <linux/if_addr.h>
#include <linux/neighbour.h>
Data Structures | |
struct | rtattr |
struct | rtmsg |
struct | rtnexthop |
struct | rta_cacheinfo |
struct | rta_session |
struct | rtgenmsg |
struct | ifinfomsg |
struct | prefixmsg |
struct | prefix_cacheinfo |
struct | tcmsg |
struct | nduseroptmsg |
struct | tcamsg |
Macros | |
#define | RTM_BASE RTM_BASE |
#define | RTM_NEWLINK RTM_NEWLINK |
#define | RTM_DELLINK RTM_DELLINK |
#define | RTM_GETLINK RTM_GETLINK |
#define | RTM_SETLINK RTM_SETLINK |
#define | RTM_NEWADDR RTM_NEWADDR |
#define | RTM_DELADDR RTM_DELADDR |
#define | RTM_GETADDR RTM_GETADDR |
#define | RTM_NEWROUTE RTM_NEWROUTE |
#define | RTM_DELROUTE RTM_DELROUTE |
#define | RTM_GETROUTE RTM_GETROUTE |
#define | RTM_NEWNEIGH RTM_NEWNEIGH |
#define | RTM_DELNEIGH RTM_DELNEIGH |
#define | RTM_GETNEIGH RTM_GETNEIGH |
#define | RTM_NEWRULE RTM_NEWRULE |
#define | RTM_DELRULE RTM_DELRULE |
#define | RTM_GETRULE RTM_GETRULE |
#define | RTM_NEWQDISC RTM_NEWQDISC |
#define | RTM_DELQDISC RTM_DELQDISC |
#define | RTM_GETQDISC RTM_GETQDISC |
#define | RTM_NEWTCLASS RTM_NEWTCLASS |
#define | RTM_DELTCLASS RTM_DELTCLASS |
#define | RTM_GETTCLASS RTM_GETTCLASS |
#define | RTM_NEWTFILTER RTM_NEWTFILTER |
#define | RTM_DELTFILTER RTM_DELTFILTER |
#define | RTM_GETTFILTER RTM_GETTFILTER |
#define | RTM_NEWACTION RTM_NEWACTION |
#define | RTM_DELACTION RTM_DELACTION |
#define | RTM_GETACTION RTM_GETACTION |
#define | RTM_NEWPREFIX RTM_NEWPREFIX |
#define | RTM_GETMULTICAST RTM_GETMULTICAST |
#define | RTM_GETANYCAST RTM_GETANYCAST |
#define | RTM_NEWNEIGHTBL RTM_NEWNEIGHTBL |
#define | RTM_GETNEIGHTBL RTM_GETNEIGHTBL |
#define | RTM_SETNEIGHTBL RTM_SETNEIGHTBL |
#define | RTM_NEWNDUSEROPT RTM_NEWNDUSEROPT |
#define | RTM_NEWADDRLABEL RTM_NEWADDRLABEL |
#define | RTM_NEWADDRLABEL RTM_NEWADDRLABEL |
#define | RTM_GETADDRLABEL RTM_GETADDRLABEL |
#define | RTM_MAX (((__RTM_MAX + 3) & ~3) - 1) |
#define | RTM_NR_MSGTYPES (RTM_MAX + 1 - RTM_BASE) |
#define | RTM_NR_FAMILIES (RTM_NR_MSGTYPES >> 2) |
#define | RTM_FAM(cmd) (((cmd) - RTM_BASE) >> 2) |
#define | RTA_ALIGNTO 4 |
#define | RTA_ALIGN(len) ( ((len)+RTA_ALIGNTO-1) & ~(RTA_ALIGNTO-1) ) |
#define | RTA_OK(rta, len) |
#define | RTA_NEXT(rta, attrlen) |
#define | RTA_LENGTH(len) (RTA_ALIGN(sizeof(struct rtattr)) + (len)) |
#define | RTA_SPACE(len) RTA_ALIGN(RTA_LENGTH(len)) |
#define | RTA_DATA(rta) ((void*)(((char*)(rta)) + RTA_LENGTH(0))) |
#define | RTA_PAYLOAD(rta) ((int)((rta)->rta_len) - RTA_LENGTH(0)) |
#define | RTN_MAX (__RTN_MAX - 1) |
#define | RTPROT_UNSPEC 0 |
#define | RTPROT_REDIRECT |
#define | RTPROT_KERNEL 2 /* Route installed by kernel */ |
#define | RTPROT_BOOT 3 /* Route installed during boot */ |
#define | RTPROT_STATIC 4 /* Route installed by administrator */ |
#define | RTPROT_GATED 8 /* Apparently, GateD */ |
#define | RTPROT_RA 9 /* RDISC/ND router advertisements */ |
#define | RTPROT_MRT 10 /* Merit MRT */ |
#define | RTPROT_ZEBRA 11 /* Zebra */ |
#define | RTPROT_BIRD 12 /* BIRD */ |
#define | RTPROT_DNROUTED 13 /* DECnet routing daemon */ |
#define | RTPROT_XORP 14 /* XORP */ |
#define | RTPROT_NTK 15 /* Netsukuku */ |
#define | RTM_F_NOTIFY 0x100 /* Notify user of route change */ |
#define | RTM_F_CLONED 0x200 /* This route is cloned */ |
#define | RTM_F_EQUALIZE 0x400 /* Multipath equalizer: NI */ |
#define | RTM_F_PREFIX 0x800 /* Prefix addresses */ |
#define | RTA_MAX (__RTA_MAX - 1) |
#define | RTM_RTA(r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct rtmsg)))) |
#define | RTM_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct rtmsg)) |
#define | RTNH_F_DEAD 1 /* Nexthop is dead (used by multipath) */ |
#define | RTNH_F_PERVASIVE 2 /* Do recursive gateway lookup */ |
#define | RTNH_F_ONLINK 4 /* Gateway is forced on link */ |
#define | RTNH_ALIGNTO 4 |
#define | RTNH_ALIGN(len) ( ((len)+RTNH_ALIGNTO-1) & ~(RTNH_ALIGNTO-1) ) |
#define | RTNH_OK(rtnh, len) |
#define | RTNH_NEXT(rtnh) ((struct rtnexthop*)(((char*)(rtnh)) + RTNH_ALIGN((rtnh)->rtnh_len))) |
#define | RTNH_LENGTH(len) (RTNH_ALIGN(sizeof(struct rtnexthop)) + (len)) |
#define | RTNH_SPACE(len) RTNH_ALIGN(RTNH_LENGTH(len)) |
#define | RTNH_DATA(rtnh) ((struct rtattr*)(((char*)(rtnh)) + RTNH_LENGTH(0))) |
#define | RTNETLINK_HAVE_PEERINFO 1 |
#define | RTAX_UNSPEC RTAX_UNSPEC |
#define | RTAX_LOCK RTAX_LOCK |
#define | RTAX_MTU RTAX_MTU |
#define | RTAX_WINDOW RTAX_WINDOW |
#define | RTAX_RTT RTAX_RTT |
#define | RTAX_RTTVAR RTAX_RTTVAR |
#define | RTAX_SSTHRESH RTAX_SSTHRESH |
#define | RTAX_CWND RTAX_CWND |
#define | RTAX_ADVMSS RTAX_ADVMSS |
#define | RTAX_REORDERING RTAX_REORDERING |
#define | RTAX_HOPLIMIT RTAX_HOPLIMIT |
#define | RTAX_INITCWND RTAX_INITCWND |
#define | RTAX_FEATURES RTAX_FEATURES |
#define | RTAX_RTO_MIN RTAX_RTO_MIN |
#define | RTAX_MAX (__RTAX_MAX - 1) |
#define | RTAX_FEATURE_ECN 0x00000001 |
#define | RTAX_FEATURE_SACK 0x00000002 |
#define | RTAX_FEATURE_TIMESTAMP 0x00000004 |
#define | RTAX_FEATURE_ALLFRAG 0x00000008 |
#define | PREFIX_MAX (__PREFIX_MAX - 1) |
#define | TCA_MAX (__TCA_MAX - 1) |
#define | TCA_RTA(r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct tcmsg)))) |
#define | TCA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct tcmsg)) |
#define | NDUSEROPT_MAX (__NDUSEROPT_MAX - 1) |
#define | RTMGRP_LINK 1 |
#define | RTMGRP_NOTIFY 2 |
#define | RTMGRP_NEIGH 4 |
#define | RTMGRP_TC 8 |
#define | RTMGRP_IPV4_IFADDR 0x10 |
#define | RTMGRP_IPV4_MROUTE 0x20 |
#define | RTMGRP_IPV4_ROUTE 0x40 |
#define | RTMGRP_IPV4_RULE 0x80 |
#define | RTMGRP_IPV6_IFADDR 0x100 |
#define | RTMGRP_IPV6_MROUTE 0x200 |
#define | RTMGRP_IPV6_ROUTE 0x400 |
#define | RTMGRP_IPV6_IFINFO 0x800 |
#define | RTMGRP_DECnet_IFADDR 0x1000 |
#define | RTMGRP_DECnet_ROUTE 0x4000 |
#define | RTMGRP_IPV6_PREFIX 0x20000 |
#define | RTNLGRP_NONE RTNLGRP_NONE |
#define | RTNLGRP_LINK RTNLGRP_LINK |
#define | RTNLGRP_NOTIFY RTNLGRP_NOTIFY |
#define | RTNLGRP_NEIGH RTNLGRP_NEIGH |
#define | RTNLGRP_TC RTNLGRP_TC |
#define | RTNLGRP_IPV4_IFADDR RTNLGRP_IPV4_IFADDR |
#define | RTNLGRP_IPV4_MROUTE RTNLGRP_IPV4_MROUTE |
#define | RTNLGRP_IPV4_ROUTE RTNLGRP_IPV4_ROUTE |
#define | RTNLGRP_IPV4_RULE RTNLGRP_IPV4_RULE |
#define | RTNLGRP_IPV6_IFADDR RTNLGRP_IPV6_IFADDR |
#define | RTNLGRP_IPV6_MROUTE RTNLGRP_IPV6_MROUTE |
#define | RTNLGRP_IPV6_ROUTE RTNLGRP_IPV6_ROUTE |
#define | RTNLGRP_IPV6_IFINFO RTNLGRP_IPV6_IFINFO |
#define | RTNLGRP_DECnet_IFADDR RTNLGRP_DECnet_IFADDR |
#define | RTNLGRP_DECnet_ROUTE RTNLGRP_DECnet_ROUTE |
#define | RTNLGRP_DECnet_RULE RTNLGRP_DECnet_RULE |
#define | RTNLGRP_IPV6_PREFIX RTNLGRP_IPV6_PREFIX |
#define | RTNLGRP_IPV6_RULE RTNLGRP_IPV6_RULE |
#define | RTNLGRP_ND_USEROPT RTNLGRP_ND_USEROPT |
#define | RTNLGRP_MAX (__RTNLGRP_MAX - 1) |
#define | TA_RTA(r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct tcamsg)))) |
#define | TA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct tcamsg)) |
#define | TCA_ACT_TAB 1 /* attr type must be >=1 */ |
#define | TCAA_MAX 1 |
#define NDUSEROPT_MAX (__NDUSEROPT_MAX - 1) |
#define PREFIX_MAX (__PREFIX_MAX - 1) |
#define RTA_ALIGN | ( | len | ) | ( ((len)+RTA_ALIGNTO-1) & ~(RTA_ALIGNTO-1) ) |
#define RTA_ALIGNTO 4 |
#define RTA_DATA | ( | rta | ) | ((void*)(((char*)(rta)) + RTA_LENGTH(0))) |
#define RTA_MAX (__RTA_MAX - 1) |
Referenced by rtnl_route_parse().
#define RTA_NEXT | ( | rta, | |
attrlen | |||
) |
#define RTA_OK | ( | rta, | |
len | |||
) |
Referenced by rtnl_parse_rtattr().
#define RTA_PAYLOAD | ( | rta | ) | ((int)((rta)->rta_len) - RTA_LENGTH(0)) |
#define RTA_SPACE | ( | len | ) | RTA_ALIGN(RTA_LENGTH(len)) |
#define RTAX_ADVMSS RTAX_ADVMSS |
#define RTAX_CWND RTAX_CWND |
#define RTAX_FEATURE_ALLFRAG 0x00000008 |
#define RTAX_FEATURE_ECN 0x00000001 |
#define RTAX_FEATURE_SACK 0x00000002 |
#define RTAX_FEATURE_TIMESTAMP 0x00000004 |
#define RTAX_FEATURES RTAX_FEATURES |
#define RTAX_HOPLIMIT RTAX_HOPLIMIT |
#define RTAX_INITCWND RTAX_INITCWND |
#define RTAX_LOCK RTAX_LOCK |
#define RTAX_MAX (__RTAX_MAX - 1) |
Referenced by rtnl_route_build_msg(), and rtnl_route_parse().
#define RTAX_MTU RTAX_MTU |
#define RTAX_REORDERING RTAX_REORDERING |
#define RTAX_RTO_MIN RTAX_RTO_MIN |
#define RTAX_RTT RTAX_RTT |
#define RTAX_RTTVAR RTAX_RTTVAR |
#define RTAX_SSTHRESH RTAX_SSTHRESH |
#define RTAX_UNSPEC RTAX_UNSPEC |
#define RTAX_WINDOW RTAX_WINDOW |
#define RTM_BASE RTM_BASE |
#define RTM_DELACTION RTM_DELACTION |
#define RTM_DELADDR RTM_DELADDR |
#define RTM_DELLINK RTM_DELLINK |
#define RTM_DELNEIGH RTM_DELNEIGH |
#define RTM_DELQDISC RTM_DELQDISC |
#define RTM_DELROUTE RTM_DELROUTE |
#define RTM_DELRULE RTM_DELRULE |
#define RTM_DELTCLASS RTM_DELTCLASS |
#define RTM_DELTFILTER RTM_DELTFILTER |
#define RTM_F_CLONED 0x200 /* This route is cloned */ |
#define RTM_F_EQUALIZE 0x400 /* Multipath equalizer: NI */ |
#define RTM_F_NOTIFY 0x100 /* Notify user of route change */ |
#define RTM_F_PREFIX 0x800 /* Prefix addresses */ |
#define RTM_GETACTION RTM_GETACTION |
#define RTM_GETADDR RTM_GETADDR |
#define RTM_GETADDRLABEL RTM_GETADDRLABEL |
#define RTM_GETANYCAST RTM_GETANYCAST |
#define RTM_GETLINK RTM_GETLINK |
#define RTM_GETMULTICAST RTM_GETMULTICAST |
#define RTM_GETNEIGH RTM_GETNEIGH |
#define RTM_GETNEIGHTBL RTM_GETNEIGHTBL |
#define RTM_GETQDISC RTM_GETQDISC |
#define RTM_GETROUTE RTM_GETROUTE |
#define RTM_GETRULE RTM_GETRULE |
#define RTM_GETTCLASS RTM_GETTCLASS |
#define RTM_GETTFILTER RTM_GETTFILTER |
#define RTM_MAX (((__RTM_MAX + 3) & ~3) - 1) |
#define RTM_NEWACTION RTM_NEWACTION |
#define RTM_NEWADDR RTM_NEWADDR |
#define RTM_NEWADDRLABEL RTM_NEWADDRLABEL |
#define RTM_NEWADDRLABEL RTM_NEWADDRLABEL |
#define RTM_NEWLINK RTM_NEWLINK |
#define RTM_NEWNDUSEROPT RTM_NEWNDUSEROPT |
#define RTM_NEWNEIGH RTM_NEWNEIGH |
#define RTM_NEWNEIGHTBL RTM_NEWNEIGHTBL |
#define RTM_NEWPREFIX RTM_NEWPREFIX |
#define RTM_NEWQDISC RTM_NEWQDISC |
#define RTM_NEWROUTE RTM_NEWROUTE |
#define RTM_NEWRULE RTM_NEWRULE |
#define RTM_NEWTCLASS RTM_NEWTCLASS |
#define RTM_NEWTFILTER RTM_NEWTFILTER |
#define RTM_NR_FAMILIES (RTM_NR_MSGTYPES >> 2) |
#define RTM_PAYLOAD | ( | n | ) | NLMSG_PAYLOAD(n,sizeof(struct rtmsg)) |
#define RTM_RTA | ( | r | ) | ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct rtmsg)))) |
#define RTM_SETLINK RTM_SETLINK |
#define RTM_SETNEIGHTBL RTM_SETNEIGHTBL |
#define RTMGRP_DECnet_IFADDR 0x1000 |
#define RTMGRP_DECnet_ROUTE 0x4000 |
#define RTMGRP_IPV4_IFADDR 0x10 |
#define RTMGRP_IPV4_MROUTE 0x20 |
#define RTMGRP_IPV4_ROUTE 0x40 |
#define RTMGRP_IPV4_RULE 0x80 |
#define RTMGRP_IPV6_IFADDR 0x100 |
#define RTMGRP_IPV6_IFINFO 0x800 |
#define RTMGRP_IPV6_MROUTE 0x200 |
#define RTMGRP_IPV6_PREFIX 0x20000 |
#define RTMGRP_IPV6_ROUTE 0x400 |
#define RTMGRP_LINK 1 |
Referenced by rtnl_open().
#define RTMGRP_NEIGH 4 |
#define RTMGRP_NOTIFY 2 |
#define RTMGRP_TC 8 |
#define RTN_MAX (__RTN_MAX - 1) |
Referenced by rtnl_route_set_type().
#define RTNETLINK_HAVE_PEERINFO 1 |
#define RTNH_ALIGN | ( | len | ) | ( ((len)+RTNH_ALIGNTO-1) & ~(RTNH_ALIGNTO-1) ) |
#define RTNH_ALIGNTO 4 |
#define RTNH_DATA | ( | rtnh | ) | ((struct rtattr*)(((char*)(rtnh)) + RTNH_LENGTH(0))) |
#define RTNH_F_DEAD 1 /* Nexthop is dead (used by multipath) */ |
#define RTNH_F_ONLINK 4 /* Gateway is forced on link */ |
#define RTNH_F_PERVASIVE 2 /* Do recursive gateway lookup */ |
#define RTNH_LENGTH | ( | len | ) | (RTNH_ALIGN(sizeof(struct rtnexthop)) + (len)) |
#define RTNH_NEXT | ( | rtnh | ) | ((struct rtnexthop*)(((char*)(rtnh)) + RTNH_ALIGN((rtnh)->rtnh_len))) |
#define RTNH_OK | ( | rtnh, | |
len | |||
) |
#define RTNH_SPACE | ( | len | ) | RTNH_ALIGN(RTNH_LENGTH(len)) |
#define RTNLGRP_DECnet_IFADDR RTNLGRP_DECnet_IFADDR |
#define RTNLGRP_DECnet_ROUTE RTNLGRP_DECnet_ROUTE |
#define RTNLGRP_DECnet_RULE RTNLGRP_DECnet_RULE |
#define RTNLGRP_IPV4_IFADDR RTNLGRP_IPV4_IFADDR |
#define RTNLGRP_IPV4_MROUTE RTNLGRP_IPV4_MROUTE |
#define RTNLGRP_IPV4_ROUTE RTNLGRP_IPV4_ROUTE |
#define RTNLGRP_IPV4_RULE RTNLGRP_IPV4_RULE |
#define RTNLGRP_IPV6_IFADDR RTNLGRP_IPV6_IFADDR |
#define RTNLGRP_IPV6_IFINFO RTNLGRP_IPV6_IFINFO |
#define RTNLGRP_IPV6_MROUTE RTNLGRP_IPV6_MROUTE |
#define RTNLGRP_IPV6_PREFIX RTNLGRP_IPV6_PREFIX |
#define RTNLGRP_IPV6_ROUTE RTNLGRP_IPV6_ROUTE |
#define RTNLGRP_IPV6_RULE RTNLGRP_IPV6_RULE |
#define RTNLGRP_LINK RTNLGRP_LINK |
#define RTNLGRP_MAX (__RTNLGRP_MAX - 1) |
#define RTNLGRP_ND_USEROPT RTNLGRP_ND_USEROPT |
#define RTNLGRP_NEIGH RTNLGRP_NEIGH |
#define RTNLGRP_NONE RTNLGRP_NONE |
#define RTNLGRP_NOTIFY RTNLGRP_NOTIFY |
#define RTNLGRP_TC RTNLGRP_TC |
#define RTPROT_BIRD 12 /* BIRD */ |
#define RTPROT_BOOT 3 /* Route installed during boot */ |
#define RTPROT_DNROUTED 13 /* DECnet routing daemon */ |
#define RTPROT_GATED 8 /* Apparently, GateD */ |
#define RTPROT_KERNEL 2 /* Route installed by kernel */ |
#define RTPROT_MRT 10 /* Merit MRT */ |
#define RTPROT_NTK 15 /* Netsukuku */ |
#define RTPROT_RA 9 /* RDISC/ND router advertisements */ |
#define RTPROT_REDIRECT |
#define RTPROT_STATIC 4 /* Route installed by administrator */ |
#define RTPROT_UNSPEC 0 |
#define RTPROT_XORP 14 /* XORP */ |
#define RTPROT_ZEBRA 11 /* Zebra */ |
#define TA_PAYLOAD | ( | n | ) | NLMSG_PAYLOAD(n,sizeof(struct tcamsg)) |
#define TA_RTA | ( | r | ) | ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct tcamsg)))) |
#define TCA_ACT_TAB 1 /* attr type must be >=1 */ |
#define TCA_MAX (__TCA_MAX - 1) |
#define TCA_PAYLOAD | ( | n | ) | NLMSG_PAYLOAD(n,sizeof(struct tcmsg)) |
#define TCA_RTA | ( | r | ) | ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct tcmsg)))) |
#define TCAA_MAX 1 |
anonymous enum |
anonymous enum |
anonymous enum |
anonymous enum |
enum rt_class_t |
enum rt_scope_t |
enum rtattr_type_t |
enum rtnetlink_groups |