Family rt-route netlink specificationΒΆ
SummaryΒΆ
Route configuration over rtnetlink.
OperationsΒΆ
getrouteΒΆ
Dump route information.
- attribute-set:
- do:
- request
- attributes:
[
src,dst,iif,oif,ip-proto,sport,dport,mark,uid,flowlabel]
- reply
- attributes:
[
dst,src,iif,oif,gateway,priority,prefsrc,metrics,multipath,flow,cacheinfo,table,mark,mfc-stats,via,newdst,pref,encap-type,encap,expires,pad,uid,ttl-propagate,ip-proto,sport,dport,nh-id,flowlabel,del-reason]
- dump:
- request
- attributes:
[]
- reply
- attributes:
[
dst,src,iif,oif,gateway,priority,prefsrc,metrics,multipath,flow,cacheinfo,table,mark,mfc-stats,via,newdst,pref,encap-type,encap,expires,pad,uid,ttl-propagate,ip-proto,sport,dport,nh-id,flowlabel,del-reason]
newrouteΒΆ
Create a new route
- attribute-set:
- do:
- request
- attributes:
[
dst,src,iif,oif,gateway,priority,prefsrc,metrics,multipath,flow,cacheinfo,table,mark,mfc-stats,via,newdst,pref,encap-type,encap,expires,pad,uid,ttl-propagate,ip-proto,sport,dport,nh-id,flowlabel]
delrouteΒΆ
Delete an existing route
- attribute-set:
- do:
- request
- attributes:
[
dst,src,iif,oif,gateway,priority,prefsrc,metrics,multipath,flow,cacheinfo,table,mark,mfc-stats,via,newdst,pref,encap-type,encap,expires,pad,uid,ttl-propagate,ip-proto,sport,dport,nh-id,flowlabel]
newroute-ntfΒΆ
Notification about a created route.
- value:
24
- notify:
getroute
delroute-ntfΒΆ
Notification about a deleted route.
- value:
25
- notify:
getroute
Multicast groupsΒΆ
rtnlgrp-ipv4-route
rtnlgrp-ipv6-route
DefinitionsΒΆ
rtm-typeΒΆ
- name-prefix:
rtn-
- enum-name:
None
- type:
enum
- entries:
unspecunicastlocalbroadcastanycastmulticastblackholeunreachableprohibitthrownatxresolve
rtmsgΒΆ
- type:
struct
- members:
- rtm-family (
u8): - rtm-dst-len (
u8): - rtm-src-len (
u8): - rtm-tos (
u8): - rtm-table (
u8): - rtm-protocol (
u8): - rtm-scope (
u8): - rtm-type (
u8): - rtm-flags (
u32):
- rtm-family (
rta-cacheinfoΒΆ
- type:
struct
- members:
- rta-clntref (
u32): - rta-lastuse (
u32): - rta-expires (
u32): - rta-error (
u32): - rta-used (
u32):
- rta-clntref (
del-reasonΒΆ
- type:
enum
- name-prefix:
rt-del-reason-
- enum-name:
rt-del-reason
- doc:
Why the kernel deleted a route. New causes may be appended. The value space is family-agnostic, a value is never reinterpreted per address family.
- entries:
- unspec:
The deletion path does not record a cause.
- expired:
The RTF_EXPIRES lifetime ran out and the route was garbage collected.
- ra-withdrawn:
A Router Advertisement withdrew the route with a zero lifetime.
Attribute setsΒΆ
route-attrsΒΆ
dst (binary)ΒΆ
- display-hint:
ipv4-or-v6
src (binary)ΒΆ
- display-hint:
ipv4-or-v6
iif (u32)ΒΆ
oif (u32)ΒΆ
gateway (binary)ΒΆ
- display-hint:
ipv4-or-v6
priority (u32)ΒΆ
prefsrc (binary)ΒΆ
- display-hint:
ipv4-or-v6
metrics (nest)ΒΆ
- nested-attributes:
multipath (binary)ΒΆ
protoinfo (binary)ΒΆ
flow (u32)ΒΆ
cacheinfo (binary)ΒΆ
- struct:
session (binary)ΒΆ
mp-algo (binary)ΒΆ
table (u32)ΒΆ
mark (u32)ΒΆ
mfc-stats (binary)ΒΆ
via (binary)ΒΆ
newdst (binary)ΒΆ
pref (u8)ΒΆ
encap-type (u16)ΒΆ
encap (binary)ΒΆ
expires (u32)ΒΆ
pad (binary)ΒΆ
uid (u32)ΒΆ
ttl-propagate (u8)ΒΆ
ip-proto (u8)ΒΆ
sport (u16)ΒΆ
dport (u16)ΒΆ
nh-id (u32)ΒΆ
flowlabel (u32)ΒΆ
- byte-order:
big-endian
- display-hint:
hex
del-reason (u32)ΒΆ
- enum:
- doc:
Emitted only on RTM_DELROUTE notifications, and only when the deletion path records a cause. An absent attribute means either an older kernel or a deletion path that does not record its cause, consumers must treat absent and unspec identically. Currently only IPv6 deletion paths record a cause. The attribute is notification-only, the kernel rejects it in requests.
metricsΒΆ
unspec (unused)ΒΆ
- value:
0