The Linux Kernel Logo

Working with the development community

  • Development process
  • Submitting patches
  • Code of conduct
  • Maintainer handbook
  • All development-process docs

Internal API manuals

  • Core API
  • Driver APIs
  • Subsystems
    • Core subsystems
    • Human interfaces
    • Networking interfaces
      • Networking
        • AF_XDP
        • Bare UDP Tunnelling Module Documentation
        • batman-adv
        • SocketCAN - Controller Area Network
        • The UCAN Protocol
        • Hardware Device Drivers
        • Networking Diagnostics
        • Distributed Switch Architecture
        • Linux Devlink Documentation
        • Netlink interface for ethtool
        • IEEE 802.15.4 Developer’s Guide
        • ISO 15765-2 (ISO-TP)
        • J1939 Documentation
        • Linux Networking and Network Devices APIs
        • MSG_ZEROCOPY
        • FAILOVER
        • Net DIM - Generic Network Dynamic Interrupt Moderation
        • NET_FAILOVER
        • Page Pool API
        • PHY Abstraction Layer
        • phylink
        • IP-Aliasing
        • Ethernet Bridging
        • SNMP counter
        • Checksum Offloads
        • Segmentation Offloads
        • Scaling in the Linux Networking Stack
        • Kernel TLS
        • Kernel TLS offload
        • In-Kernel TLS Handshake
        • Linux NFC subsystem
        • Netdev private dataroom for 6lowpan interfaces
        • ARCnet Hardware
        • ARCnet
        • ATM
        • Linux Ethernet Bonding Driver HOWTO
        • cdc_mbim - Driver for CDC MBIM Mobile Broadband modems
        • DCTCP (DataCenter TCP)
        • Device Memory TCP
        • DNS Resolver Module
        • Softnet Driver Issues
        • EQL Driver: Serial IP Load Balancing HOWTO
        • LC-trie implementation notes
        • Linux Socket Filtering aka Berkeley Packet Filter (BPF)
        • Generic HDLC layer
        • Generic Netlink
        • Netlink Family Specifications
          • Family binder netlink specification
          • Family conntrack netlink specification
          • Family dev-energymodel netlink specification
          • Family devlink netlink specification
          • Family dpll netlink specification
          • Family drm-ras netlink specification
          • Family ethtool netlink specification
          • Family fou netlink specification
          • Family gtp netlink specification
          • Family handshake netlink specification
          • Family lockd netlink specification
          • Family mptcp_pm netlink specification
          • Family net-shaper netlink specification
          • Family netdev netlink specification
          • Family nfsd netlink specification
          • Family nftables netlink specification
          • Family nl80211 netlink specification
          • Family nlctrl netlink specification
          • Family ovpn netlink specification
          • Family ovs_datapath netlink specification
          • Family ovs_flow netlink specification
          • Family ovs_packet netlink specification
          • Family ovs_vport netlink specification
          • Family psp netlink specification
          • Family rt-addr netlink specification
          • Family rt-link netlink specification
          • Family rt-neigh netlink specification
          • Family rt-nexthop netlink specification
            • Summary
            • Operations
              • newnexthop
              • delnexthop
              • getnexthop
              • newnexthop-ntf
              • delnexthop-ntf
              • getnexthopbucket
              • newnexthopbucket-ntf
            • Multicast groups
            • Definitions
              • nhmsg
              • rtnh-f
              • nexthop-grp
              • nexthop-grp-type
              • encap-type
              • seg6-local-actions
              • seg6-local-flv-ops
              • nha-op-flag
              • nha-op-flag-resp-grp-resvd-0
            • Attribute sets
              • nexthop-attrs
                • id (u32)
                • group (binary)
                • group-type (u16)
                • blackhole (flag)
                • oif (u32)
                • gateway (binary)
                • encap-type (u16)
                • encap (sub-message)
                • groups (flag)
                • master (u32)
                • fdb (flag)
                • res-group (nest)
                • res-bucket (nest)
                • op-flags (u32)
                • group-stats (nest)
                • hw-stats-enable (u32)
                • hw-stats-used (u32)
                • dst-port (u16)
              • mpls-iptunnel
                • dst (binary)
                • ttl (u8)
              • lwtunnel-ip
                • id (u64)
                • dst (u32)
                • src (u32)
                • ttl (u8)
                • tos (u8)
                • flags (u16)
                • pad (pad)
                • opts (nest)
              • ila-attrs
                • locator (u64)
                • identifier (u64)
                • locator-match (u64)
                • ifindex (s32)
                • dir (u32)
                • pad (pad)
                • csum-mode (u8)
                • ident-type (u8)
                • hook-type (u8)
              • lwtunnel-ip6
                • id (u64)
                • dst (binary)
                • src (binary)
                • hoplimit (u8)
                • tc (u8)
                • flags (u16)
                • pad (pad)
                • opts (nest)
              • seg6-iptunnel
                • srh (binary)
                • src (binary)
                • table (u32)
              • lwt-bpf
                • in (nest)
                • out (nest)
                • xmit (nest)
                • xmit-headroom (u32)
              • seg6-local
                • action (u32)
                • srh (binary)
                • table (u32)
                • nh4 (u32)
                • nh6 (binary)
                • iif (u32)
                • oif (u32)
                • bpf (nest)
                • vrftable (u32)
                • counters (nest)
                • flavors (nest)
              • rpl-iptunnel
                • srh (binary)
              • ioam6-iptunnel
                • mode (u8)
                • dst (binary)
                • trace (binary)
                • freq-k (u32)
                • freq-n (u32)
                • src (binary)
              • lwt-xfrm
                • if-id (u32)
                • link (u32)
              • lwtunnel-ip-opts
                • geneve (binary)
                • vxlan (nest)
                • erspan (nest)
              • lwtunnel-ip-opt-vxlan
                • gbp (u32)
              • lwtunnel-ip-opt-erspan
                • ver (u8)
                • index (u32)
                • dir (u8)
                • hwid (u8)
              • lwt-bpf-prog
                • fd (u32)
                • name (string)
              • seg6-local-bpf
                • prog (u32)
                • prog-name (string)
              • seg6-local-cnt
                • pad (pad)
                • packets (u64)
                • bytes (u64)
                • errors (u64)
              • seg6-local-flv
                • operation (u32)
                • lcblock-bits (u8)
                • lcnode-fn-bits (u8)
              • res-group-attrs
                • pad (pad)
                • buckets (u16)
                • idle-timer (u32)
                • unbalanced-timer (u32)
                • unbalanced-time (u64)
              • res-bucket-attrs
                • pad (pad)
                • index (u16)
                • idle-time (u64)
                • nh-id (u32)
              • group-stats-attrs
                • entry (nest)
              • group-stats-entry-attrs
                • id (u32)
                • packets (uint)
                • packets-hw (uint)
            • Sub-messages
              • encap-data
          • Family rt-route netlink specification
          • Family rt-rule netlink specification
          • Family sunrpc netlink specification
          • Family tc netlink specification
          • Family tcp_metrics netlink specification
          • Family team netlink specification
          • Family wireguard netlink specification
        • Generic networking statistics for netlink users
        • The Linux kernel GTP tunneling module
        • Identifier Locator Addressing (ILA)
        • IOAM6 Sysfs variables
        • io_uring zero copy Rx
        • IP dynamic address hack-port v0.03
        • IPsec
        • IP Sysctl
        • IPv6
        • IPVLAN Driver HOWTO
        • IPvs-sysctl
        • Kernel Connection Multiplexor
        • L2TP
        • The Linux LAPB Module Interface
        • How to use packet injection with mac80211
        • Management Component Transport Protocol (MCTP)
        • MPLS Sysfs variables
        • Multipath TCP (MPTCP)
        • MPTCP Sysfs variables
        • HOWTO for multiqueue network device support
        • Multi-PF Netdev
        • NAPI
        • Common Networking Struct Cachelines
        • Netconsole
        • Netdev features mess and how to get out from it alive
        • Network Devices, the Kernel, and You!
        • Netfilter Sysfs variables
        • NETIF Msg Level
        • Netmem Support for Network Drivers
        • Resilient Next-hop Groups
        • Netfilter Conntrack Sysfs variables
        • Netfilter’s flowtable infrastructure
        • OPEN Alliance 10BASE-T1x MAC-PHY Serial Interface (TC6) Framework Support
        • Open vSwitch datapath developer documentation
        • Operational States
        • Packet MMAP
        • Linux Phonet protocol family
        • PHY link topology
        • Ethernet ports
        • HOWTO for the linux packet generator
        • PLIP: The Parallel Line Internet Protocol Device
        • PPP Generic Driver and Channel Interface
        • The proc/net/tcp and proc/net/tcp6 variables
        • Power Sourcing Equipment (PSE) Documentation
        • PSP Security Protocol
        • How to use radiotap headers
        • RDS
        • Linux wireless regulatory documentation
        • Network Function Representors
        • RxRPC Network Protocol
        • Linux Kernel SCTP
        • LSM/SeLinux secid
        • Seg6 Sysfs variables
        • struct sk_buff
        • SMC Sysctl
        • NIC SR-IOV APIs
        • Interface statistics
        • Stream Parser (strparser)
        • Ethernet switch device driver model (switchdev)
        • Sysfs tagging
        • TC Actions - Environmental Rules
        • TC queue based filtering
        • TCP Authentication Option Linux implementation (RFC5925)
        • Thin-streams and TCP
        • Team
        • Timestamping
        • Linux Kernel TIPC
        • Transparent proxy support
        • Universal TUN/TAP device driver
        • The UDP-Lite protocol (RFC 3828)
        • Virtual Routing and Forwarding (VRF)
        • Virtual eXtensible Local Area Networking documentation
        • Linux X.25 Project
        • X.25 Device Driver Interface
        • XFRM Framework
        • XDP RX Metadata
        • AF_XDP TX Metadata
      • NetLabel
      • InfiniBand
      • MHI
    • Storage interfaces
    • Other subsystems
  • Locking

Development tools and processes

  • Licensing rules
  • Writing documentation
  • Development tools
  • Testing guide
  • Hacking guide
  • Tracing
  • Fault injection
  • Livepatching
  • Rust

User-oriented documentation

  • Administration
  • Build system
  • Reporting issues
  • Userspace tools
  • Userspace API

Firmware-related documentation

  • Firmware
  • Firmware and Devicetree

Architecture-specific documentation

  • CPU architectures

Other documentation

  • Unsorted documentation

Translations

  • Translations
The Linux Kernel
  • Kernel subsystem documentation
  • Networking
  • Netlink Family Specifications
  • Family rt-nexthop netlink specification
  • View page source

Family rt-nexthop netlink specification¶

Contents

  • Family rt-nexthop netlink specification

    • Summary

    • Operations

      • newnexthop

      • delnexthop

      • getnexthop

      • newnexthop-ntf

      • delnexthop-ntf

      • getnexthopbucket

      • newnexthopbucket-ntf

    • Multicast groups

    • Definitions

      • nhmsg

      • rtnh-f

      • nexthop-grp

      • nexthop-grp-type

      • encap-type

      • seg6-local-actions

      • seg6-local-flv-ops

      • nha-op-flag

      • nha-op-flag-resp-grp-resvd-0

    • Attribute sets

      • nexthop-attrs

      • mpls-iptunnel

      • lwtunnel-ip

      • ila-attrs

      • lwtunnel-ip6

      • seg6-iptunnel

      • lwt-bpf

      • seg6-local

      • rpl-iptunnel

      • ioam6-iptunnel

      • lwt-xfrm

      • lwtunnel-ip-opts

      • lwtunnel-ip-opt-vxlan

      • lwtunnel-ip-opt-erspan

      • lwt-bpf-prog

      • seg6-local-bpf

      • seg6-local-cnt

      • seg6-local-flv

      • res-group-attrs

      • res-bucket-attrs

      • group-stats-attrs

      • group-stats-entry-attrs

    • Sub-messages

      • encap-data

Summary¶

Nexthop object management over rtnetlink.

Operations¶

newnexthop¶

Add new nexthop entry

attribute-set:

nexthop-attrs

do:
request
attributes:

[id, group, group-type, blackhole, oif, gateway, encap-type, encap, fdb, res-group, hw-stats-enable, dst-port]

delnexthop¶

Delete nexthop with given id.

attribute-set:

nexthop-attrs

do:
request
attributes:

[id]

getnexthop¶

Get or dump nexthop entries

attribute-set:

nexthop-attrs

do:
request
attributes:

[id, op-flags]

reply
attributes:

[id, group, group-type, blackhole, oif, gateway, encap-type, encap, fdb, res-group, op-flags, group-stats, hw-stats-enable, hw-stats-used, dst-port]

dump:
request
attributes:

[oif, groups, master, fdb, op-flags]

reply
attributes:

[id, group, group-type, blackhole, oif, gateway, encap-type, encap, fdb, res-group, op-flags, group-stats, hw-stats-enable, hw-stats-used, dst-port]

newnexthop-ntf¶

Notification about a created nexthop.

value:

104

notify:

getnexthop

delnexthop-ntf¶

Notification about a deleted nexthop.

value:

105

notify:

getnexthop

getnexthopbucket¶

Get or dump nexthop buckets

attribute-set:

nexthop-attrs

do:
request
attributes:

[id, res-bucket]

reply
attributes:

[id, res-bucket]

dump:
request
attributes:

[id, oif, master, res-bucket]

reply
attributes:

[id, res-bucket]

newnexthopbucket-ntf¶

Notification about a created nexthop bucket.

value:

116

notify:

getnexthopbucket

Multicast groups¶

  • rtnlgrp-nexthop

Definitions¶

nhmsg¶

type:

struct

members:
nh-family (u8):

nh-scope (u8):

nh-protocol (u8):

resvd (pad):

nh-flags (u32):

rtnh-f¶

type:

flags

name-prefix:

rtnh-f-

enum-name:

None

entries:
  • dead

  • pervasive

  • onlink

  • offload

  • linkdown

  • unresolved

  • trap

nexthop-grp¶

type:

struct

members:
id (u32):

weight (u8):

weight-high (u8):

resvd2 (pad):

nexthop-grp-type¶

type:

enum

name-prefix:

nexthop-grp-type-

enum-name:

None

entries:
  • mpath

  • res

encap-type¶

type:

enum

name-prefix:

lwtunnel-encap-

enum-name:

None

entries:
  • none

  • mpls

  • ip

  • ila

  • ip6

  • seg6

  • bpf

  • seg6-local

  • rpl

  • ioam6

  • xfrm

seg6-local-actions¶

type:

enum

name-prefix:

seg6-local-action-

enum-name:

None

entries:
  • unspec

  • end

  • end-x

  • end-t

  • end-dx2

  • end-dx6

  • end-dx4

  • end-dt6

  • end-dt4

  • end-b6

  • end-b6-encap

  • end-bm

  • end-s

  • end-as

  • end-am

  • end-bpf

  • end-dt46

seg6-local-flv-ops¶

type:

enum

name-prefix:

seg6-local-flv-op-

enum-name:

None

entries:
unspec:

psp:

usp:

usd:

next-csid:

nha-op-flag¶

type:

flags

name-prefix:

nha-op-flag-

enum-name:

None

entries:
  • dump-stats

  • dump-hw-stats

nha-op-flag-resp-grp-resvd-0¶

type:

const

value:

2147483648

Attribute sets¶

nexthop-attrs¶

id (u32)¶

group (binary)¶

group-type (u16)¶

enum:

nexthop-grp-type

blackhole (flag)¶

oif (u32)¶

gateway (binary)¶

display-hint:

ipv4-or-v6

encap-type (u16)¶

enum:

encap-type

encap (sub-message)¶

sub-message:

encap-data

selector:

encap-type

groups (flag)¶

master (u32)¶

fdb (flag)¶

res-group (nest)¶

nested-attributes:

res-group-attrs

res-bucket (nest)¶

nested-attributes:

res-bucket-attrs

op-flags (u32)¶

group-stats (nest)¶

nested-attributes:

group-stats-attrs

hw-stats-enable (u32)¶

hw-stats-used (u32)¶

dst-port (u16)¶

byte-order:

big-endian

mpls-iptunnel¶

dst (binary)¶

ttl (u8)¶

lwtunnel-ip¶

id (u64)¶

byte-order:

big-endian

dst (u32)¶

byte-order:

big-endian

display-hint:

ipv4

src (u32)¶

byte-order:

big-endian

display-hint:

ipv4

ttl (u8)¶

tos (u8)¶

flags (u16)¶

byte-order:

big-endian

pad (pad)¶

opts (nest)¶

nested-attributes:

lwtunnel-ip-opts

ila-attrs¶

locator (u64)¶

byte-order:

big-endian

identifier (u64)¶

locator-match (u64)¶

byte-order:

big-endian

ifindex (s32)¶

dir (u32)¶

pad (pad)¶

csum-mode (u8)¶

ident-type (u8)¶

hook-type (u8)¶

lwtunnel-ip6¶

id (u64)¶

byte-order:

big-endian

dst (binary)¶

display-hint:

ipv6

src (binary)¶

display-hint:

ipv6

hoplimit (u8)¶

tc (u8)¶

flags (u16)¶

byte-order:

big-endian

pad (pad)¶

opts (nest)¶

nested-attributes:

lwtunnel-ip-opts

seg6-iptunnel¶

srh (binary)¶

src (binary)¶

display-hint:

ipv6

table (u32)¶

lwt-bpf¶

in (nest)¶

nested-attributes:

lwt-bpf-prog

out (nest)¶

nested-attributes:

lwt-bpf-prog

xmit (nest)¶

nested-attributes:

lwt-bpf-prog

xmit-headroom (u32)¶

seg6-local¶

action (u32)¶

enum:

seg6-local-actions

srh (binary)¶

table (u32)¶

nh4 (u32)¶

byte-order:

big-endian

display-hint:

ipv4

nh6 (binary)¶

display-hint:

ipv6

iif (u32)¶

oif (u32)¶

bpf (nest)¶

nested-attributes:

seg6-local-bpf

vrftable (u32)¶

counters (nest)¶

nested-attributes:

seg6-local-cnt

flavors (nest)¶

nested-attributes:

seg6-local-flv

rpl-iptunnel¶

srh (binary)¶

ioam6-iptunnel¶

mode (u8)¶

dst (binary)¶

display-hint:

ipv6

trace (binary)¶

freq-k (u32)¶

freq-n (u32)¶

src (binary)¶

display-hint:

ipv6

lwt-xfrm¶

if-id (u32)¶

link (u32)¶

lwtunnel-ip-opts¶

geneve (binary)¶

vxlan (nest)¶

nested-attributes:

lwtunnel-ip-opt-vxlan

erspan (nest)¶

nested-attributes:

lwtunnel-ip-opt-erspan

lwtunnel-ip-opt-vxlan¶

gbp (u32)¶

lwtunnel-ip-opt-erspan¶

ver (u8)¶

index (u32)¶

byte-order:

big-endian

dir (u8)¶

hwid (u8)¶

lwt-bpf-prog¶

fd (u32)¶

name (string)¶

seg6-local-bpf¶

prog (u32)¶

prog-name (string)¶

seg6-local-cnt¶

pad (pad)¶

packets (u64)¶

bytes (u64)¶

errors (u64)¶

seg6-local-flv¶

operation (u32)¶

enum:

seg6-local-flv-ops

enum-as-flags:

True

lcblock-bits (u8)¶

lcnode-fn-bits (u8)¶

res-group-attrs¶

pad (pad)¶

value:

0

buckets (u16)¶

idle-timer (u32)¶

unbalanced-timer (u32)¶

unbalanced-time (u64)¶

res-bucket-attrs¶

pad (pad)¶

value:

0

index (u16)¶

idle-time (u64)¶

nh-id (u32)¶

group-stats-attrs¶

entry (nest)¶

nested-attributes:

group-stats-entry-attrs

multi-attr:

True

group-stats-entry-attrs¶

id (u32)¶

packets (uint)¶

packets-hw (uint)¶

Sub-messages¶

encap-data¶

  • mpls
    attribute-set:

    mpls-iptunnel

  • ip
    attribute-set:

    lwtunnel-ip

  • ila
    attribute-set:

    ila-attrs

  • ip6
    attribute-set:

    lwtunnel-ip6

  • seg6
    attribute-set:

    seg6-iptunnel

  • bpf
    attribute-set:

    lwt-bpf

  • seg6-local
    attribute-set:

    seg6-local

  • rpl
    attribute-set:

    rpl-iptunnel

  • ioam6
    attribute-set:

    ioam6-iptunnel

  • xfrm
    attribute-set:

    lwt-xfrm

Previous Next

© Copyright The kernel development community.

Built with Sphinx using a theme provided by Read the Docs.