|
Packit |
7cfc04 |
'\" t
|
|
Packit |
7cfc04 |
.\" This man page is Copyright (C) 1999 Andi Kleen <ak@muc.de>.
|
|
Packit |
7cfc04 |
.\"
|
|
Packit |
7cfc04 |
.\" %%%LICENSE_START(VERBATIM_ONE_PARA)
|
|
Packit |
7cfc04 |
.\" Permission is granted to distribute possibly modified copies
|
|
Packit |
7cfc04 |
.\" of this page provided the header is included verbatim,
|
|
Packit |
7cfc04 |
.\" and in case of nontrivial modification author and date
|
|
Packit |
7cfc04 |
.\" of the modification is added to the header.
|
|
Packit |
7cfc04 |
.\" %%%LICENSE_END
|
|
Packit |
7cfc04 |
.\"
|
|
Packit |
7cfc04 |
.\" Based on the original comments from Alexey Kuznetsov, written with
|
|
Packit |
7cfc04 |
.\" help from Matthew Wilcox.
|
|
Packit |
7cfc04 |
.\" $Id: rtnetlink.7,v 1.8 2000/01/22 01:55:04 freitag Exp $
|
|
Packit |
7cfc04 |
.\"
|
|
Packit |
7cfc04 |
.TH RTNETLINK 7 2017-09-15 "Linux" "Linux Programmer's Manual"
|
|
Packit |
7cfc04 |
.SH NAME
|
|
Packit |
7cfc04 |
rtnetlink \- Linux IPv4 routing socket
|
|
Packit |
7cfc04 |
.SH SYNOPSIS
|
|
Packit |
7cfc04 |
.B #include <asm/types.h>
|
|
Packit |
7cfc04 |
.br
|
|
Packit |
7cfc04 |
.B #include <linux/netlink.h>
|
|
Packit |
7cfc04 |
.br
|
|
Packit |
7cfc04 |
.B #include <linux/rtnetlink.h>
|
|
Packit |
7cfc04 |
.br
|
|
Packit |
7cfc04 |
.B #include <sys/socket.h>
|
|
Packit |
7cfc04 |
.PP
|
|
Packit |
7cfc04 |
.BI "rtnetlink_socket = socket(AF_NETLINK, int " socket_type ", NETLINK_ROUTE);"
|
|
Packit |
7cfc04 |
.SH DESCRIPTION
|
|
Packit |
7cfc04 |
Rtnetlink allows the kernel's routing tables to be read and altered.
|
|
Packit |
7cfc04 |
It is used within the kernel to communicate between
|
|
Packit |
7cfc04 |
various subsystems, though this usage is not documented here, and for
|
|
Packit |
7cfc04 |
communication with user-space programs.
|
|
Packit |
7cfc04 |
Network routes, IP addresses, link parameters, neighbor setups, queueing
|
|
Packit |
7cfc04 |
disciplines, traffic classes and packet classifiers may all be controlled
|
|
Packit |
7cfc04 |
through
|
|
Packit |
7cfc04 |
.B NETLINK_ROUTE
|
|
Packit |
7cfc04 |
sockets.
|
|
Packit |
7cfc04 |
It is based on netlink messages; see
|
|
Packit |
7cfc04 |
.BR netlink (7)
|
|
Packit |
7cfc04 |
for more information.
|
|
Packit |
7cfc04 |
.\" FIXME . ? all these macros could be moved to rtnetlink(3)
|
|
Packit |
7cfc04 |
.SS Routing attributes
|
|
Packit |
7cfc04 |
Some rtnetlink messages have optional attributes after the initial header:
|
|
Packit |
7cfc04 |
.PP
|
|
Packit |
7cfc04 |
.in +4n
|
|
Packit |
7cfc04 |
.EX
|
|
Packit |
7cfc04 |
struct rtattr {
|
|
Packit |
7cfc04 |
unsigned short rta_len; /* Length of option */
|
|
Packit |
7cfc04 |
unsigned short rta_type; /* Type of option */
|
|
Packit |
7cfc04 |
/* Data follows */
|
|
Packit |
7cfc04 |
};
|
|
Packit |
7cfc04 |
.EE
|
|
Packit |
7cfc04 |
.in
|
|
Packit |
7cfc04 |
.PP
|
|
Packit |
7cfc04 |
These attributes should be manipulated using only the RTA_* macros
|
|
Packit |
7cfc04 |
or libnetlink, see
|
|
Packit |
7cfc04 |
.BR rtnetlink (3).
|
|
Packit |
7cfc04 |
.SS Messages
|
|
Packit |
7cfc04 |
Rtnetlink consists of these message types
|
|
Packit |
7cfc04 |
(in addition to standard netlink messages):
|
|
Packit |
7cfc04 |
.TP
|
|
Packit |
7cfc04 |
.BR RTM_NEWLINK ", " RTM_DELLINK ", " RTM_GETLINK
|
|
Packit |
7cfc04 |
Create, remove or get information about a specific network interface.
|
|
Packit |
7cfc04 |
These messages contain an
|
|
Packit |
7cfc04 |
.I ifinfomsg
|
|
Packit |
7cfc04 |
structure followed by a series of
|
|
Packit |
7cfc04 |
.I rtattr
|
|
Packit |
7cfc04 |
structures.
|
|
Packit |
7cfc04 |
.IP
|
|
Packit |
7cfc04 |
.EX
|
|
Packit |
7cfc04 |
struct ifinfomsg {
|
|
Packit |
7cfc04 |
unsigned char ifi_family; /* AF_UNSPEC */
|
|
Packit |
7cfc04 |
unsigned short ifi_type; /* Device type */
|
|
Packit |
7cfc04 |
int ifi_index; /* Interface index */
|
|
Packit |
7cfc04 |
unsigned int ifi_flags; /* Device flags */
|
|
Packit |
7cfc04 |
unsigned int ifi_change; /* change mask */
|
|
Packit |
7cfc04 |
};
|
|
Packit |
7cfc04 |
.EE
|
|
Packit |
7cfc04 |
.IP
|
|
Packit |
7cfc04 |
.\" FIXME Document ifinfomsg.ifi_type
|
|
Packit |
7cfc04 |
.I ifi_flags
|
|
Packit |
7cfc04 |
contains the device flags, see
|
|
Packit |
7cfc04 |
.BR netdevice (7);
|
|
Packit |
7cfc04 |
.I ifi_index
|
|
Packit |
7cfc04 |
is the unique interface index
|
|
Packit |
7cfc04 |
(since Linux 3.7, it is possible to feed a nonzero value with the
|
|
Packit |
7cfc04 |
.B RTM_NEWLINK
|
|
Packit |
7cfc04 |
message, thus creating a link with the given
|
|
Packit |
7cfc04 |
.IR ifindex );
|
|
Packit |
7cfc04 |
.I ifi_change
|
|
Packit |
7cfc04 |
is reserved for future use and should be always set to 0xFFFFFFFF.
|
|
Packit |
7cfc04 |
.TS
|
|
Packit |
7cfc04 |
tab(:);
|
|
Packit |
7cfc04 |
c s s
|
|
Packit |
7cfc04 |
l l l.
|
|
Packit |
7cfc04 |
Routing attributes
|
|
Packit |
7cfc04 |
rta_type:value type:description
|
|
Packit |
7cfc04 |
_
|
|
Packit |
7cfc04 |
IFLA_UNSPEC:-:unspecified.
|
|
Packit |
7cfc04 |
IFLA_ADDRESS:hardware address:interface L2 address
|
|
Packit |
7cfc04 |
IFLA_BROADCAST:hardware address:L2 broadcast address.
|
|
Packit |
7cfc04 |
IFLA_IFNAME:asciiz string:Device name.
|
|
Packit |
7cfc04 |
IFLA_MTU:unsigned int:MTU of the device.
|
|
Packit |
7cfc04 |
IFLA_LINK:int:Link type.
|
|
Packit |
7cfc04 |
IFLA_QDISC:asciiz string:Queueing discipline.
|
|
Packit |
7cfc04 |
IFLA_STATS:T{
|
|
Packit |
7cfc04 |
see below
|
|
Packit |
7cfc04 |
T}:Interface Statistics.
|
|
Packit |
7cfc04 |
.TE
|
|
Packit |
7cfc04 |
.PP
|
|
Packit |
7cfc04 |
The value type for
|
|
Packit |
7cfc04 |
.B IFLA_STATS
|
|
Packit |
7cfc04 |
is
|
|
Packit |
7cfc04 |
.IR "struct rtnl_link_stats"
|
|
Packit |
7cfc04 |
.RI ( "struct net_device_stats"
|
|
Packit |
7cfc04 |
in Linux 2.4 and earlier).
|
|
Packit |
7cfc04 |
.TP
|
|
Packit |
7cfc04 |
.BR RTM_NEWADDR ", " RTM_DELADDR ", " RTM_GETADDR
|
|
Packit |
7cfc04 |
Add, remove or receive information about an IP address associated with
|
|
Packit |
7cfc04 |
an interface.
|
|
Packit |
7cfc04 |
In Linux 2.2, an interface can carry multiple IP addresses,
|
|
Packit |
7cfc04 |
this replaces the alias device concept in 2.0.
|
|
Packit |
7cfc04 |
In Linux 2.2, these messages
|
|
Packit |
7cfc04 |
support IPv4 and IPv6 addresses.
|
|
Packit |
7cfc04 |
They contain an
|
|
Packit |
7cfc04 |
.I ifaddrmsg
|
|
Packit |
7cfc04 |
structure, optionally followed by
|
|
Packit |
7cfc04 |
.I rtattr
|
|
Packit |
7cfc04 |
routing attributes.
|
|
Packit |
7cfc04 |
.IP
|
|
Packit |
7cfc04 |
.EX
|
|
Packit |
7cfc04 |
struct ifaddrmsg {
|
|
Packit |
7cfc04 |
unsigned char ifa_family; /* Address type */
|
|
Packit |
7cfc04 |
unsigned char ifa_prefixlen; /* Prefixlength of address */
|
|
Packit |
7cfc04 |
unsigned char ifa_flags; /* Address flags */
|
|
Packit |
7cfc04 |
unsigned char ifa_scope; /* Address scope */
|
|
Packit |
7cfc04 |
int ifa_index; /* Interface index */
|
|
Packit |
7cfc04 |
};
|
|
Packit |
7cfc04 |
.EE
|
|
Packit |
7cfc04 |
.IP
|
|
Packit |
7cfc04 |
.I ifa_family
|
|
Packit |
7cfc04 |
is the address family type (currently
|
|
Packit |
7cfc04 |
.B AF_INET
|
|
Packit |
7cfc04 |
or
|
|
Packit |
7cfc04 |
.BR AF_INET6 ),
|
|
Packit |
7cfc04 |
.I ifa_prefixlen
|
|
Packit |
7cfc04 |
is the length of the address mask of the address if defined for the
|
|
Packit |
7cfc04 |
family (like for IPv4),
|
|
Packit |
7cfc04 |
.I ifa_scope
|
|
Packit |
7cfc04 |
is the address scope,
|
|
Packit |
7cfc04 |
.I ifa_index
|
|
Packit |
7cfc04 |
is the interface index of the interface the address is associated with.
|
|
Packit |
7cfc04 |
.I ifa_flags
|
|
Packit |
7cfc04 |
is a flag word of
|
|
Packit |
7cfc04 |
.B IFA_F_SECONDARY
|
|
Packit |
7cfc04 |
for secondary address (old alias interface),
|
|
Packit |
7cfc04 |
.B IFA_F_PERMANENT
|
|
Packit |
7cfc04 |
for a permanent address set by the user and other undocumented flags.
|
|
Packit |
7cfc04 |
.TS
|
|
Packit |
7cfc04 |
tab(:);
|
|
Packit |
7cfc04 |
c s s
|
|
Packit |
7cfc04 |
l l l.
|
|
Packit |
7cfc04 |
Attributes
|
|
Packit |
7cfc04 |
rta_type:value type:description
|
|
Packit |
7cfc04 |
_
|
|
Packit |
7cfc04 |
IFA_UNSPEC:-:unspecified.
|
|
Packit |
7cfc04 |
IFA_ADDRESS:raw protocol address:interface address
|
|
Packit |
7cfc04 |
IFA_LOCAL:raw protocol address:local address
|
|
Packit |
7cfc04 |
IFA_LABEL:asciiz string:name of the interface
|
|
Packit |
7cfc04 |
IFA_BROADCAST:raw protocol address:broadcast address.
|
|
Packit |
7cfc04 |
IFA_ANYCAST:raw protocol address:anycast address
|
|
Packit |
7cfc04 |
IFA_CACHEINFO:struct ifa_cacheinfo:Address information.
|
|
Packit |
7cfc04 |
.TE
|
|
Packit |
7cfc04 |
.\" FIXME Document struct ifa_cacheinfo
|
|
Packit |
7cfc04 |
.TP
|
|
Packit |
7cfc04 |
.BR RTM_NEWROUTE ", " RTM_DELROUTE ", " RTM_GETROUTE
|
|
Packit |
7cfc04 |
Create, remove or receive information about a network route.
|
|
Packit |
7cfc04 |
These messages contain an
|
|
Packit |
7cfc04 |
.I rtmsg
|
|
Packit |
7cfc04 |
structure with an optional sequence of
|
|
Packit |
7cfc04 |
.I rtattr
|
|
Packit |
7cfc04 |
structures following.
|
|
Packit |
7cfc04 |
For
|
|
Packit |
7cfc04 |
.BR RTM_GETROUTE ,
|
|
Packit |
7cfc04 |
setting
|
|
Packit |
7cfc04 |
.I rtm_dst_len
|
|
Packit |
7cfc04 |
and
|
|
Packit |
7cfc04 |
.I rtm_src_len
|
|
Packit |
7cfc04 |
to 0 means you get all entries for the specified routing table.
|
|
Packit |
7cfc04 |
For the other fields, except
|
|
Packit |
7cfc04 |
.I rtm_table
|
|
Packit |
7cfc04 |
and
|
|
Packit |
7cfc04 |
.IR rtm_protocol ,
|
|
Packit |
7cfc04 |
0 is the wildcard.
|
|
Packit |
7cfc04 |
.IP
|
|
Packit |
7cfc04 |
.EX
|
|
Packit |
7cfc04 |
struct rtmsg {
|
|
Packit |
7cfc04 |
unsigned char rtm_family; /* Address family of route */
|
|
Packit |
7cfc04 |
unsigned char rtm_dst_len; /* Length of destination */
|
|
Packit |
7cfc04 |
unsigned char rtm_src_len; /* Length of source */
|
|
Packit |
7cfc04 |
unsigned char rtm_tos; /* TOS filter */
|
|
Packit |
7cfc04 |
|
|
Packit |
7cfc04 |
unsigned char rtm_table; /* Routing table ID */
|
|
Packit |
7cfc04 |
unsigned char rtm_protocol; /* Routing protocol; see below */
|
|
Packit |
7cfc04 |
unsigned char rtm_scope; /* See below */
|
|
Packit |
7cfc04 |
unsigned char rtm_type; /* See below */
|
|
Packit |
7cfc04 |
|
|
Packit |
7cfc04 |
unsigned int rtm_flags;
|
|
Packit |
7cfc04 |
};
|
|
Packit |
7cfc04 |
.EE
|
|
Packit |
7cfc04 |
.TS
|
|
Packit |
7cfc04 |
tab(:);
|
|
Packit |
7cfc04 |
l l.
|
|
Packit |
7cfc04 |
rtm_type:Route type
|
|
Packit |
7cfc04 |
_
|
|
Packit |
7cfc04 |
RTN_UNSPEC:unknown route
|
|
Packit |
7cfc04 |
RTN_UNICAST:a gateway or direct route
|
|
Packit |
7cfc04 |
RTN_LOCAL:a local interface route
|
|
Packit |
7cfc04 |
RTN_BROADCAST:T{
|
|
Packit |
7cfc04 |
a local broadcast route (sent as a broadcast)
|
|
Packit |
7cfc04 |
T}
|
|
Packit |
7cfc04 |
RTN_ANYCAST:T{
|
|
Packit |
7cfc04 |
a local broadcast route (sent as a unicast)
|
|
Packit |
7cfc04 |
T}
|
|
Packit |
7cfc04 |
RTN_MULTICAST:a multicast route
|
|
Packit |
7cfc04 |
RTN_BLACKHOLE:a packet dropping route
|
|
Packit |
7cfc04 |
RTN_UNREACHABLE:an unreachable destination
|
|
Packit |
7cfc04 |
RTN_PROHIBIT:a packet rejection route
|
|
Packit |
7cfc04 |
RTN_THROW:continue routing lookup in another table
|
|
Packit |
7cfc04 |
RTN_NAT:a network address translation rule
|
|
Packit |
7cfc04 |
RTN_XRESOLVE:T{
|
|
Packit |
7cfc04 |
refer to an external resolver (not implemented)
|
|
Packit |
7cfc04 |
T}
|
|
Packit |
7cfc04 |
.TE
|
|
Packit |
7cfc04 |
.TS
|
|
Packit |
7cfc04 |
tab(:);
|
|
Packit |
7cfc04 |
l l.
|
|
Packit |
7cfc04 |
rtm_protocol:Route origin.
|
|
Packit |
7cfc04 |
_
|
|
Packit |
7cfc04 |
RTPROT_UNSPEC:unknown
|
|
Packit |
7cfc04 |
RTPROT_REDIRECT:T{
|
|
Packit |
7cfc04 |
by an ICMP redirect (currently unused)
|
|
Packit |
7cfc04 |
T}
|
|
Packit |
7cfc04 |
RTPROT_KERNEL:by the kernel
|
|
Packit |
7cfc04 |
RTPROT_BOOT:during boot
|
|
Packit |
7cfc04 |
RTPROT_STATIC:by the administrator
|
|
Packit |
7cfc04 |
.TE
|
|
Packit |
7cfc04 |
.sp 1
|
|
Packit |
7cfc04 |
Values larger than
|
|
Packit |
7cfc04 |
.B RTPROT_STATIC
|
|
Packit |
7cfc04 |
are not interpreted by the kernel, they are just for user information.
|
|
Packit |
7cfc04 |
They may be used to tag the source of a routing information or to
|
|
Packit |
7cfc04 |
distinguish between multiple routing daemons.
|
|
Packit |
7cfc04 |
See
|
|
Packit |
7cfc04 |
.I <linux/rtnetlink.h>
|
|
Packit |
7cfc04 |
for the routing daemon identifiers which are already assigned.
|
|
Packit |
7cfc04 |
.IP
|
|
Packit |
7cfc04 |
.I rtm_scope
|
|
Packit |
7cfc04 |
is the distance to the destination:
|
|
Packit |
7cfc04 |
.TS
|
|
Packit |
7cfc04 |
tab(:);
|
|
Packit |
7cfc04 |
l l.
|
|
Packit |
7cfc04 |
RT_SCOPE_UNIVERSE:global route
|
|
Packit |
7cfc04 |
RT_SCOPE_SITE:T{
|
|
Packit |
7cfc04 |
interior route in the local autonomous system
|
|
Packit |
7cfc04 |
T}
|
|
Packit |
7cfc04 |
RT_SCOPE_LINK:route on this link
|
|
Packit |
7cfc04 |
RT_SCOPE_HOST:route on the local host
|
|
Packit |
7cfc04 |
RT_SCOPE_NOWHERE:destination doesn't exist
|
|
Packit |
7cfc04 |
.TE
|
|
Packit |
7cfc04 |
.sp 1
|
|
Packit |
7cfc04 |
The values between
|
|
Packit |
7cfc04 |
.B RT_SCOPE_UNIVERSE
|
|
Packit |
7cfc04 |
and
|
|
Packit |
7cfc04 |
.B RT_SCOPE_SITE
|
|
Packit |
7cfc04 |
are available to the user.
|
|
Packit |
7cfc04 |
.IP
|
|
Packit |
7cfc04 |
The
|
|
Packit |
7cfc04 |
.I rtm_flags
|
|
Packit |
7cfc04 |
have the following meanings:
|
|
Packit |
7cfc04 |
.TS
|
|
Packit |
7cfc04 |
tab(:);
|
|
Packit |
7cfc04 |
l l.
|
|
Packit |
7cfc04 |
RTM_F_NOTIFY:T{
|
|
Packit |
7cfc04 |
if the route changes, notify the user via rtnetlink
|
|
Packit |
7cfc04 |
T}
|
|
Packit |
7cfc04 |
RTM_F_CLONED:route is cloned from another route
|
|
Packit |
7cfc04 |
RTM_F_EQUALIZE:a multipath equalizer (not yet implemented)
|
|
Packit |
7cfc04 |
.TE
|
|
Packit |
7cfc04 |
.sp 1
|
|
Packit |
7cfc04 |
.I rtm_table
|
|
Packit |
7cfc04 |
specifies the routing table
|
|
Packit |
7cfc04 |
.TS
|
|
Packit |
7cfc04 |
tab(:);
|
|
Packit |
7cfc04 |
l l.
|
|
Packit |
7cfc04 |
RT_TABLE_UNSPEC:an unspecified routing table
|
|
Packit |
7cfc04 |
RT_TABLE_DEFAULT:the default table
|
|
Packit |
7cfc04 |
RT_TABLE_MAIN:the main table
|
|
Packit |
7cfc04 |
RT_TABLE_LOCAL:the local table
|
|
Packit |
7cfc04 |
.TE
|
|
Packit |
7cfc04 |
.sp 1
|
|
Packit |
7cfc04 |
The user may assign arbitrary values between
|
|
Packit |
7cfc04 |
.B RT_TABLE_UNSPEC
|
|
Packit |
7cfc04 |
and
|
|
Packit |
7cfc04 |
.BR RT_TABLE_DEFAULT .
|
|
Packit |
7cfc04 |
.\" Keep table on same page
|
|
Packit |
7cfc04 |
.bp +1
|
|
Packit |
7cfc04 |
.TS
|
|
Packit |
7cfc04 |
tab(:);
|
|
Packit |
7cfc04 |
c s s
|
|
Packit |
7cfc04 |
l l l.
|
|
Packit |
7cfc04 |
Attributes
|
|
Packit |
7cfc04 |
rta_type:value type:description
|
|
Packit |
7cfc04 |
_
|
|
Packit |
7cfc04 |
RTA_UNSPEC:-:ignored.
|
|
Packit |
7cfc04 |
RTA_DST:protocol address:Route destination address.
|
|
Packit |
7cfc04 |
RTA_SRC:protocol address:Route source address.
|
|
Packit |
7cfc04 |
RTA_IIF:int:Input interface index.
|
|
Packit |
7cfc04 |
RTA_OIF:int:Output interface index.
|
|
Packit |
7cfc04 |
RTA_GATEWAY:protocol address:The gateway of the route
|
|
Packit |
7cfc04 |
RTA_PRIORITY:int:Priority of route.
|
|
Packit |
7cfc04 |
RTA_PREFSRC::
|
|
Packit |
7cfc04 |
RTA_METRICS:int:Route metric
|
|
Packit |
7cfc04 |
RTA_MULTIPATH::
|
|
Packit |
7cfc04 |
RTA_PROTOINFO::
|
|
Packit |
7cfc04 |
RTA_FLOW::
|
|
Packit |
7cfc04 |
RTA_CACHEINFO::
|
|
Packit |
7cfc04 |
.TE
|
|
Packit |
7cfc04 |
.sp 1
|
|
Packit |
7cfc04 |
.B Fill these values in!
|
|
Packit |
7cfc04 |
.TP
|
|
Packit |
7cfc04 |
.BR RTM_NEWNEIGH ", " RTM_DELNEIGH ", " RTM_GETNEIGH
|
|
Packit |
7cfc04 |
Add, remove or receive information about a neighbor table
|
|
Packit |
7cfc04 |
entry (e.g., an ARP entry).
|
|
Packit |
7cfc04 |
The message contains an
|
|
Packit |
7cfc04 |
.I ndmsg
|
|
Packit |
7cfc04 |
structure.
|
|
Packit |
7cfc04 |
.IP
|
|
Packit |
7cfc04 |
.EX
|
|
Packit |
7cfc04 |
struct ndmsg {
|
|
Packit |
7cfc04 |
unsigned char ndm_family;
|
|
Packit |
7cfc04 |
int ndm_ifindex; /* Interface index */
|
|
Packit |
7cfc04 |
__u16 ndm_state; /* State */
|
|
Packit |
7cfc04 |
__u8 ndm_flags; /* Flags */
|
|
Packit |
7cfc04 |
__u8 ndm_type;
|
|
Packit |
7cfc04 |
};
|
|
Packit |
7cfc04 |
|
|
Packit |
7cfc04 |
struct nda_cacheinfo {
|
|
Packit |
7cfc04 |
__u32 ndm_confirmed;
|
|
Packit |
7cfc04 |
__u32 ndm_used;
|
|
Packit |
7cfc04 |
__u32 ndm_updated;
|
|
Packit |
7cfc04 |
__u32 ndm_refcnt;
|
|
Packit |
7cfc04 |
};
|
|
Packit |
7cfc04 |
.EE
|
|
Packit |
7cfc04 |
.IP
|
|
Packit |
7cfc04 |
.I ndm_state
|
|
Packit |
7cfc04 |
is a bit mask of the following states:
|
|
Packit |
7cfc04 |
.TS
|
|
Packit |
7cfc04 |
tab(:);
|
|
Packit |
7cfc04 |
l l.
|
|
Packit |
7cfc04 |
NUD_INCOMPLETE:a currently resolving cache entry
|
|
Packit |
7cfc04 |
NUD_REACHABLE:a confirmed working cache entry
|
|
Packit |
7cfc04 |
NUD_STALE:an expired cache entry
|
|
Packit |
7cfc04 |
NUD_DELAY:an entry waiting for a timer
|
|
Packit |
7cfc04 |
NUD_PROBE:a cache entry that is currently reprobed
|
|
Packit |
7cfc04 |
NUD_FAILED:an invalid cache entry
|
|
Packit |
7cfc04 |
NUD_NOARP:a device with no destination cache
|
|
Packit |
7cfc04 |
NUD_PERMANENT:a static entry
|
|
Packit |
7cfc04 |
.TE
|
|
Packit |
7cfc04 |
.sp 1
|
|
Packit |
7cfc04 |
Valid
|
|
Packit |
7cfc04 |
.I ndm_flags
|
|
Packit |
7cfc04 |
are:
|
|
Packit |
7cfc04 |
.TS
|
|
Packit |
7cfc04 |
tab(:);
|
|
Packit |
7cfc04 |
l l.
|
|
Packit |
7cfc04 |
NTF_PROXY:a proxy arp entry
|
|
Packit |
7cfc04 |
NTF_ROUTER:an IPv6 router
|
|
Packit |
7cfc04 |
.TE
|
|
Packit |
7cfc04 |
.sp 1
|
|
Packit |
7cfc04 |
.\" FIXME .
|
|
Packit |
7cfc04 |
.\" document the members of the struct better
|
|
Packit |
7cfc04 |
The
|
|
Packit |
7cfc04 |
.I rtattr
|
|
Packit |
7cfc04 |
struct has the following meanings for the
|
|
Packit |
7cfc04 |
.I rta_type
|
|
Packit |
7cfc04 |
field:
|
|
Packit |
7cfc04 |
.TS
|
|
Packit |
7cfc04 |
tab(:);
|
|
Packit |
7cfc04 |
l l.
|
|
Packit |
7cfc04 |
NDA_UNSPEC:unknown type
|
|
Packit |
7cfc04 |
NDA_DST:a neighbor cache n/w layer destination address
|
|
Packit |
7cfc04 |
NDA_LLADDR:a neighbor cache link layer address
|
|
Packit |
7cfc04 |
NDA_CACHEINFO:cache statistics.
|
|
Packit |
7cfc04 |
.TE
|
|
Packit |
7cfc04 |
.sp 1
|
|
Packit |
7cfc04 |
If the
|
|
Packit |
7cfc04 |
.I rta_type
|
|
Packit |
7cfc04 |
field is
|
|
Packit |
7cfc04 |
.BR NDA_CACHEINFO ,
|
|
Packit |
7cfc04 |
then a
|
|
Packit |
7cfc04 |
.I struct nda_cacheinfo
|
|
Packit |
7cfc04 |
header follows
|
|
Packit |
7cfc04 |
.TP
|
|
Packit |
7cfc04 |
.BR RTM_NEWRULE ", " RTM_DELRULE ", " RTM_GETRULE
|
|
Packit |
7cfc04 |
Add, delete or retrieve a routing rule.
|
|
Packit |
7cfc04 |
Carries a
|
|
Packit |
7cfc04 |
.I struct rtmsg
|
|
Packit |
7cfc04 |
.TP
|
|
Packit |
7cfc04 |
.BR RTM_NEWQDISC ", " RTM_DELQDISC ", " RTM_GETQDISC
|
|
Packit |
7cfc04 |
Add, remove or get a queueing discipline.
|
|
Packit |
7cfc04 |
The message contains a
|
|
Packit |
7cfc04 |
.I struct tcmsg
|
|
Packit |
7cfc04 |
and may be followed by a series of
|
|
Packit |
7cfc04 |
attributes.
|
|
Packit |
7cfc04 |
.IP
|
|
Packit |
7cfc04 |
.EX
|
|
Packit |
7cfc04 |
struct tcmsg {
|
|
Packit |
7cfc04 |
unsigned char tcm_family;
|
|
Packit |
7cfc04 |
int tcm_ifindex; /* interface index */
|
|
Packit |
7cfc04 |
__u32 tcm_handle; /* Qdisc handle */
|
|
Packit |
7cfc04 |
__u32 tcm_parent; /* Parent qdisc */
|
|
Packit |
7cfc04 |
__u32 tcm_info;
|
|
Packit |
7cfc04 |
};
|
|
Packit |
7cfc04 |
.EE
|
|
Packit |
7cfc04 |
.TS
|
|
Packit |
7cfc04 |
tab(:);
|
|
Packit |
7cfc04 |
c s s
|
|
Packit |
7cfc04 |
l2 l2 l.
|
|
Packit |
7cfc04 |
Attributes
|
|
Packit |
7cfc04 |
rta_type:value type:Description
|
|
Packit |
7cfc04 |
_
|
|
Packit |
7cfc04 |
TCA_UNSPEC:-:unspecified
|
|
Packit |
7cfc04 |
TCA_KIND:asciiz string:Name of queueing discipline
|
|
Packit |
7cfc04 |
TCA_OPTIONS:byte sequence:Qdisc-specific options follow
|
|
Packit |
7cfc04 |
TCA_STATS:struct tc_stats:Qdisc statistics.
|
|
Packit |
7cfc04 |
TCA_XSTATS:qdisc-specific:Module-specific statistics.
|
|
Packit |
7cfc04 |
TCA_RATE:struct tc_estimator:Rate limit.
|
|
Packit |
7cfc04 |
.TE
|
|
Packit |
7cfc04 |
.sp 1
|
|
Packit |
7cfc04 |
In addition, various other qdisc-module-specific attributes are allowed.
|
|
Packit |
7cfc04 |
For more information see the appropriate include files.
|
|
Packit |
7cfc04 |
.TP
|
|
Packit |
7cfc04 |
.BR RTM_NEWTCLASS ", " RTM_DELTCLASS ", " RTM_GETTCLASS
|
|
Packit |
7cfc04 |
Add, remove or get a traffic class.
|
|
Packit |
7cfc04 |
These messages contain a
|
|
Packit |
7cfc04 |
.I struct tcmsg
|
|
Packit |
7cfc04 |
as described above.
|
|
Packit |
7cfc04 |
.TP
|
|
Packit |
7cfc04 |
.BR RTM_NEWTFILTER ", " RTM_DELTFILTER ", " RTM_GETTFILTER
|
|
Packit |
7cfc04 |
Add, remove or receive information about a traffic filter.
|
|
Packit |
7cfc04 |
These messages contain a
|
|
Packit |
7cfc04 |
.I struct tcmsg
|
|
Packit |
7cfc04 |
as described above.
|
|
Packit |
7cfc04 |
.SH VERSIONS
|
|
Packit |
7cfc04 |
.B rtnetlink
|
|
Packit |
7cfc04 |
is a new feature of Linux 2.2.
|
|
Packit |
7cfc04 |
.SH BUGS
|
|
Packit |
7cfc04 |
This manual page is incomplete.
|
|
Packit |
7cfc04 |
.SH SEE ALSO
|
|
Packit |
7cfc04 |
.BR cmsg (3),
|
|
Packit |
7cfc04 |
.BR rtnetlink (3),
|
|
Packit |
7cfc04 |
.BR ip (7),
|
|
Packit |
7cfc04 |
.BR netlink (7)
|
|
Packit |
7cfc04 |
.SH COLOPHON
|
|
Packit |
7cfc04 |
This page is part of release 4.15 of the Linux
|
|
Packit |
7cfc04 |
.I man-pages
|
|
Packit |
7cfc04 |
project.
|
|
Packit |
7cfc04 |
A description of the project,
|
|
Packit |
7cfc04 |
information about reporting bugs,
|
|
Packit |
7cfc04 |
and the latest version of this page,
|
|
Packit |
7cfc04 |
can be found at
|
|
Packit |
7cfc04 |
\%https://www.kernel.org/doc/man\-pages/.
|