Family rt-link
netlink specification¶
Contents
Operations¶
newlink¶
Create a new link.
- attribute-set
link-attrs
- fixed-header
ifinfomsg
- do
- request
- attributes
[
ifi-index
,ifname
,net-ns-pid
,net-ns-fd
,target-netnsid
,link-netnsid
,linkinfo
,group
,num-tx-queues
,num-rx-queues
,address
,broadcast
,mtu
,txqlen
,operstate
,linkmode
,group
,gso-max-size
,gso-max-segs
,gro-max-size
,gso-ipv4-max-size
,gro-ipv4-max-size
,af-spec
]
dellink¶
Delete an existing link.
- attribute-set
link-attrs
- fixed-header
ifinfomsg
- do
- request
- attributes
[
ifi-index
,ifname
]
getlink¶
Get / dump information about a link.
- attribute-set
link-attrs
- fixed-header
ifinfomsg
- do
- request
- attributes
[
ifi-index
,ifname
,alt-ifname
,ext-mask
,target-netnsid
]
- reply
- attributes
[
ifi-family
,ifi-type
,ifi-index
,ifi-flags
,ifi-change
,address
,broadcast
,ifname
,mtu
,link
,qdisc
,stats
,cost
,priority
,master
,wireless
,protinfo
,txqlen
,map
,weight
,operstate
,linkmode
,linkinfo
,net-ns-pid
,ifalias
,num-vf
,vfinfo-list
,stats64
,vf-ports
,port-self
,af-spec
,group
,net-ns-fd
,ext-mask
,promiscuity
,num-tx-queues
,num-rx-queues
,carrier
,phys-port-id
,carrier-changes
,phys-switch-id
,link-netnsid
,phys-port-name
,proto-down
,gso-max-segs
,gso-max-size
,pad
,xdp
,event
,new-netnsid
,if-netnsid
,target-netnsid
,carrier-up-count
,carrier-down-count
,new-ifindex
,min-mtu
,max-mtu
,prop-list
,alt-ifname
,perm-address
,proto-down-reason
,parent-dev-name
,parent-dev-bus-name
,gro-max-size
,tso-max-size
,tso-max-segs
,allmulti
,devlink-port
,gso-ipv4-max-size
,gro-ipv4-max-size
]
- dump
- request
- attributes
[
target-netnsid
,ext-mask
,master
,linkinfo
]
- reply
- attributes
[
ifi-family
,ifi-type
,ifi-index
,ifi-flags
,ifi-change
,address
,broadcast
,ifname
,mtu
,link
,qdisc
,stats
,cost
,priority
,master
,wireless
,protinfo
,txqlen
,map
,weight
,operstate
,linkmode
,linkinfo
,net-ns-pid
,ifalias
,num-vf
,vfinfo-list
,stats64
,vf-ports
,port-self
,af-spec
,group
,net-ns-fd
,ext-mask
,promiscuity
,num-tx-queues
,num-rx-queues
,carrier
,phys-port-id
,carrier-changes
,phys-switch-id
,link-netnsid
,phys-port-name
,proto-down
,gso-max-segs
,gso-max-size
,pad
,xdp
,event
,new-netnsid
,if-netnsid
,target-netnsid
,carrier-up-count
,carrier-down-count
,new-ifindex
,min-mtu
,max-mtu
,prop-list
,alt-ifname
,perm-address
,proto-down-reason
,parent-dev-name
,parent-dev-bus-name
,gro-max-size
,tso-max-size
,tso-max-segs
,allmulti
,devlink-port
,gso-ipv4-max-size
,gro-ipv4-max-size
]
setlink¶
Set information about a link.
- attribute-set
link-attrs
- fixed-header
ifinfomsg
- do
- request
- attributes
[
ifi-family
,ifi-type
,ifi-index
,ifi-flags
,ifi-change
,address
,broadcast
,ifname
,mtu
,link
,qdisc
,stats
,cost
,priority
,master
,wireless
,protinfo
,txqlen
,map
,weight
,operstate
,linkmode
,linkinfo
,net-ns-pid
,ifalias
,num-vf
,vfinfo-list
,stats64
,vf-ports
,port-self
,af-spec
,group
,net-ns-fd
,ext-mask
,promiscuity
,num-tx-queues
,num-rx-queues
,carrier
,phys-port-id
,carrier-changes
,phys-switch-id
,link-netnsid
,phys-port-name
,proto-down
,gso-max-segs
,gso-max-size
,pad
,xdp
,event
,new-netnsid
,if-netnsid
,target-netnsid
,carrier-up-count
,carrier-down-count
,new-ifindex
,min-mtu
,max-mtu
,prop-list
,alt-ifname
,perm-address
,proto-down-reason
,parent-dev-name
,parent-dev-bus-name
,gro-max-size
,tso-max-size
,tso-max-segs
,allmulti
,devlink-port
,gso-ipv4-max-size
,gro-ipv4-max-size
]
getstats¶
Get / dump link stats.
- attribute-set
stats-attrs
- fixed-header
if_stats_msg
- do
- request
- attributes
[
ifindex
]
- reply
- attributes
[
family
,ifindex
,filter-mask
,link-64
,link-xstats
,link-xstats-slave
,link-offload-xstats
,af-spec
]
- dump
request
- reply
- attributes
[
family
,ifindex
,filter-mask
,link-64
,link-xstats
,link-xstats-slave
,link-offload-xstats
,af-spec
]
Multicast groups¶
rtnlgrp-link
rtnlgrp-stats
Definitions¶
ifinfo-flags¶
- type
flags
- entries
- up
- broadcast
- debug
- loopback
- point-to-point
- no-trailers
- running
- no-arp
- promisc
- all-multi
- master
- slave
- multicast
- portsel
- auto-media
- dynamic
- lower-up
- dormant
- echo
ifinfomsg¶
- type
struct
- members
- ifi-family (
u8
) - ifi-type (
u16
) - ifi-index (
s32
) - ifi-flags (
u32
) - ifi-change (
u32
)
- ifi-family (
ifla-bridge-id¶
- type
struct
- members
- prio (
u16
) - addr (
binary
)
- prio (
ifla-cacheinfo¶
- type
struct
- members
- max-reasm-len (
u32
) - tstamp (
u32
) - reachable-time (
s32
) - retrans-time (
u32
)
- max-reasm-len (
rtnl-link-stats¶
- type
struct
- members
- rx-packets (
u32
) - tx-packets (
u32
) - rx-bytes (
u32
) - tx-bytes (
u32
) - rx-errors (
u32
) - tx-errors (
u32
) - rx-dropped (
u32
) - tx-dropped (
u32
) - multicast (
u32
) - collisions (
u32
) - rx-length-errors (
u32
) - rx-over-errors (
u32
) - rx-crc-errors (
u32
) - rx-frame-errors (
u32
) - rx-fifo-errors (
u32
) - rx-missed-errors (
u32
) - tx-aborted-errors (
u32
) - tx-carrier-errors (
u32
) - tx-fifo-errors (
u32
) - tx-heartbeat-errors (
u32
) - tx-window-errors (
u32
) - rx-compressed (
u32
) - tx-compressed (
u32
) - rx-nohandler (
u32
)
- rx-packets (
rtnl-link-stats64¶
- type
struct
- members
- rx-packets (
u64
) - tx-packets (
u64
) - rx-bytes (
u64
) - tx-bytes (
u64
) - rx-errors (
u64
) - tx-errors (
u64
) - rx-dropped (
u64
) - tx-dropped (
u64
) - multicast (
u64
) - collisions (
u64
) - rx-length-errors (
u64
) - rx-over-errors (
u64
) - rx-crc-errors (
u64
) - rx-frame-errors (
u64
) - rx-fifo-errors (
u64
) - rx-missed-errors (
u64
) - tx-aborted-errors (
u64
) - tx-carrier-errors (
u64
) - tx-fifo-errors (
u64
) - tx-heartbeat-errors (
u64
) - tx-window-errors (
u64
) - rx-compressed (
u64
) - tx-compressed (
u64
) - rx-nohandler (
u64
) - rx-otherhost-dropped (
u64
)
- rx-packets (
rtnl-link-ifmap¶
- type
struct
- members
- mem-start (
u64
) - mem-end (
u64
) - base-addr (
u64
) - irq (
u16
) - dma (
u8
) - port (
u8
)
- mem-start (
ipv4-devconf¶
- type
struct
- members
- forwarding (
u32
) - mc-forwarding (
u32
) - proxy-arp (
u32
) - accept-redirects (
u32
) - secure-redirects (
u32
) - send-redirects (
u32
) - shared-media (
u32
) - rp-filter (
u32
) - accept-source-route (
u32
) - bootp-relay (
u32
) - log-martians (
u32
) - tag (
u32
) - arpfilter (
u32
) - medium-id (
u32
) - noxfrm (
u32
) - nopolicy (
u32
) - force-igmp-version (
u32
) - arp-announce (
u32
) - arp-ignore (
u32
) - promote-secondaries (
u32
) - arp-accept (
u32
) - arp-notify (
u32
) - accept-local (
u32
) - src-vmark (
u32
) - proxy-arp-pvlan (
u32
) - route-localnet (
u32
) - igmpv2-unsolicited-report-interval (
u32
) - igmpv3-unsolicited-report-interval (
u32
) - ignore-routes-with-linkdown (
u32
) - drop-unicast-in-l2-multicast (
u32
) - drop-gratuitous-arp (
u32
) - bc-forwarding (
u32
) - arp-evict-nocarrier (
u32
)
- forwarding (
ipv6-devconf¶
- type
struct
- members
- forwarding (
u32
) - hoplimit (
u32
) - mtu6 (
u32
) - accept-ra (
u32
) - accept-redirects (
u32
) - autoconf (
u32
) - dad-transmits (
u32
) - rtr-solicits (
u32
) - rtr-solicit-interval (
u32
) - rtr-solicit-delay (
u32
) - use-tempaddr (
u32
) - temp-valid-lft (
u32
) - temp-prefered-lft (
u32
) - regen-max-retry (
u32
) - max-desync-factor (
u32
) - max-addresses (
u32
) - force-mld-version (
u32
) - accept-ra-defrtr (
u32
) - accept-ra-pinfo (
u32
) - accept-ra-rtr-pref (
u32
) - rtr-probe-interval (
u32
) - accept-ra-rt-info-max-plen (
u32
) - proxy-ndp (
u32
) - optimistic-dad (
u32
) - accept-source-route (
u32
) - mc-forwarding (
u32
) - disable-ipv6 (
u32
) - accept-dad (
u32
) - force-tllao (
u32
) - ndisc-notify (
u32
) - mldv1-unsolicited-report-interval (
u32
) - mldv2-unsolicited-report-interval (
u32
) - suppress-frag-ndisc (
u32
) - accept-ra-from-local (
u32
) - use-optimistic (
u32
) - accept-ra-mtu (
u32
) - stable-secret (
u32
) - use-oif-addrs-only (
u32
) - accept-ra-min-hop-limit (
u32
) - ignore-routes-with-linkdown (
u32
) - drop-unicast-in-l2-multicast (
u32
) - drop-unsolicited-na (
u32
) - keep-addr-on-down (
u32
) - rtr-solicit-max-interval (
u32
) - seg6-enabled (
u32
) - seg6-require-hmac (
u32
) - enhanced-dad (
u32
) - addr-gen-mode (
u8
) - disable-policy (
u32
) - accept-ra-rt-info-min-plen (
u32
) - ndisc-tclass (
u32
) - rpl-seg-enabled (
u32
) - ra-defrtr-metric (
u32
) - ioam6-enabled (
u32
) - ioam6-id (
u32
) - ioam6-id-wide (
u32
) - ndisc-evict-nocarrier (
u32
) - accept-untracked-na (
u32
)
- forwarding (
ifla-icmp6-stats¶
- type
struct
- members
- inmsgs (
u64
) - inerrors (
u64
) - outmsgs (
u64
) - outerrors (
u64
) - csumerrors (
u64
) - ratelimithost (
u64
)
- inmsgs (
ifla-inet6-stats¶
- type
struct
- members
- inpkts (
u64
) - inoctets (
u64
) - indelivers (
u64
) - outforwdatagrams (
u64
) - outpkts (
u64
) - outoctets (
u64
) - inhdrerrors (
u64
) - intoobigerrors (
u64
) - innoroutes (
u64
) - inaddrerrors (
u64
) - inunknownprotos (
u64
) - intruncatedpkts (
u64
) - indiscards (
u64
) - outdiscards (
u64
) - outnoroutes (
u64
) - reasmtimeout (
u64
) - reasmreqds (
u64
) - reasmoks (
u64
) - reasmfails (
u64
) - fragoks (
u64
) - fragfails (
u64
) - fragcreates (
u64
) - inmcastpkts (
u64
) - outmcastpkts (
u64
) - inbcastpkts (
u64
) - outbcastpkts (
u64
) - inmcastoctets (
u64
) - outmcastoctets (
u64
) - inbcastoctets (
u64
) - outbcastoctets (
u64
) - csumerrors (
u64
) - noectpkts (
u64
) - ect1-pkts (
u64
) - ect0-pkts (
u64
) - cepkts (
u64
) - reasm-overlaps (
u64
)
- inpkts (
br-boolopt-multi¶
- type
struct
- members
- optval (
u32
) - optmask (
u32
)
- optval (
if_stats_msg¶
- type
struct
- members
- family (
u8
) - ifindex (
u32
) - filter-mask (
u32
)
- family (
Attribute sets¶
link-attrs¶
address (binary
)¶
- display-hint
mac
broadcast (binary
)¶
- display-hint
mac
stats (binary
)¶
- struct
rtnl-link-stats
map (binary
)¶
- struct
rtnl-link-ifmap
linkinfo (nest
)¶
- nested-attributes
linkinfo-attrs
vfinfo-list (nest
)¶
- nested-attributes
vfinfo-attrs
stats64 (binary
)¶
- struct
rtnl-link-stats64
vf-ports (nest
)¶
- nested-attributes
vf-ports-attrs
port-self (nest
)¶
- nested-attributes
port-self-attrs
af-spec (nest
)¶
- nested-attributes
af-spec-attrs
xdp (nest
)¶
- nested-attributes
xdp-attrs
prop-list (nest
)¶
- nested-attributes
link-attrs
alt-ifname (string
)¶
- multi-attr
True
perm-address (binary
)¶
- display-hint
mac
dpll-pin (nest
)¶
- nested-attributes
link-dpll-pin-attrs
af-spec-attrs¶
inet (nest
)¶
- value
2
- nested-attributes
ifla-attrs
inet6 (nest
)¶
- value
10
- nested-attributes
ifla6-attrs
mctp (nest
)¶
- value
45
- nested-attributes
mctp-attrs
linkinfo-attrs¶
data (sub-message
)¶
- sub-message
linkinfo-data-msg
- selector
kind
slave-data (sub-message
)¶
- sub-message
linkinfo-member-data-msg
- selector
slave-kind
linkinfo-bridge-attrs¶
root-id (binary
)¶
- struct
ifla-bridge-id
bridge-id (binary
)¶
- struct
ifla-bridge-id
group-addr (binary
)¶
- display-hint
mac
multi-boolopt (binary
)¶
- struct
br-boolopt-multi
linkinfo-brport-attrs¶
root-id (binary
)¶
- struct
ifla-bridge-id
bridge-id (binary
)¶
- struct
ifla-bridge-id
linkinfo-iptun-attrs¶
local (binary
)¶
- display-hint
ipv4
remote (binary
)¶
- display-hint
ipv4
6rd-prefix (binary
)¶
- display-hint
ipv6
6rd-relay-prefix (binary
)¶
- display-hint
ipv4
ifla-attrs¶
conf (binary
)¶
- struct
ipv4-devconf
ifla6-attrs¶
conf (binary
)¶
- struct
ipv6-devconf
stats (binary
)¶
- struct
ifla-inet6-stats
cacheinfo (binary
)¶
- struct
ifla-cacheinfo
icmp6-stats (binary
)¶
- struct
ifla-icmp6-stats
stats-attrs¶
link-64 (binary
)¶
- struct
rtnl-link-stats64
link-offload-xstats (nest
)¶
- nested-attributes
link-offload-xstats
link-offload-xstats¶
hw-s-info (array-nest
)¶
- nested-attributes
hw-s-info-one
Sub-messages¶
linkinfo-data-msg¶
- bridge
- attribute-set
linkinfo-bridge-attrs
- erspan
- attribute-set
linkinfo-gre-attrs
- gre
- attribute-set
linkinfo-gre-attrs
- gretap
- attribute-set
linkinfo-gre-attrs
- geneve
- attribute-set
linkinfo-geneve-attrs
- ipip
- attribute-set
linkinfo-iptun-attrs
- sit
- attribute-set
linkinfo-iptun-attrs
- tun
- attribute-set
linkinfo-tun-attrs
- vrf
- attribute-set
linkinfo-vrf-attrs
linkinfo-member-data-msg¶
- bridge
- attribute-set
linkinfo-brport-attrs
bond