# Family rt-neigh netlink specification

_Peios Kernel / Internals / Netlink / specs_

> Protocol reference for the rt-neigh Netlink family, generated from the Peios kernel specification.

<!-- SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) -->


<a id="rst-family-rt-neigh-netlink-specification"></a>
<a id="rst-netlink-rt-neigh"></a>

<!-- SPDX-License-Identifier: GPL-2.0 -->

<a id="rst-summary"></a>



## Summary



IP neighbour management over rtnetlink.

<a id="rst-operations"></a>



## Operations

<a id="rst-newneigh"></a>
<a id="rst-rt-neigh-operation-newneigh"></a>



### newneigh



Add new neighbour entry

- **fixed-header**:

  [ndmsg](#rst-rt-neigh-definition-ndmsg)

- **attribute-set**:

  [neighbour-attrs](#rst-rt-neigh-attribute-set-neighbour-attrs)

- **do**:

  **request**

  - **attributes**:

    \[`dst`, `lladdr`, `probes`, `vlan`, `port`, `vni`, `ifindex`, `master`, `protocol`, `nh-id`, `flags-ext`, `fdb-ext-attrs`\]

<a id="rst-delneigh"></a>
<a id="rst-rt-neigh-operation-delneigh"></a>



### delneigh



Remove an existing neighbour entry

- **fixed-header**:

  [ndmsg](#rst-rt-neigh-definition-ndmsg)

- **attribute-set**:

  [neighbour-attrs](#rst-rt-neigh-attribute-set-neighbour-attrs)

- **do**:

  **request**

  - **attributes**:

    \[`dst`, `ifindex`\]

<a id="rst-delneigh-ntf"></a>
<a id="rst-rt-neigh-operation-delneigh-ntf"></a>



### delneigh-ntf



Notify a neighbour deletion

- **value**:

  29

- **notify**:

  getneigh

- **fixed-header**:

  [ndmsg](#rst-rt-neigh-definition-ndmsg)

<a id="rst-getneigh"></a>
<a id="rst-rt-neigh-operation-getneigh"></a>



### getneigh



Get or dump neighbour entries

- **fixed-header**:

  [ndmsg](#rst-rt-neigh-definition-ndmsg)

- **attribute-set**:

  [neighbour-attrs](#rst-rt-neigh-attribute-set-neighbour-attrs)

- **do**:

  **request**

  - **attributes**:

    \[`dst`\]

  **reply**

  - **attributes**:

    \[`dst`, `lladdr`, `probes`, `vlan`, `port`, `vni`, `ifindex`, `master`, `protocol`, `nh-id`, `flags-ext`, `fdb-ext-attrs`\]

- **dump**:

  **request**

  - **attributes**:

    \[`ifindex`, `master`\]

  **reply**

  - **attributes**:

    \[`dst`, `lladdr`, `probes`, `vlan`, `port`, `vni`, `ifindex`, `master`, `protocol`, `nh-id`, `flags-ext`, `fdb-ext-attrs`\]

<a id="rst-newneigh-ntf"></a>
<a id="rst-rt-neigh-operation-newneigh-ntf"></a>



### newneigh-ntf



Notify a neighbour creation

- **value**:

  28

- **notify**:

  getneigh

- **fixed-header**:

  [ndmsg](#rst-rt-neigh-definition-ndmsg)

<a id="rst-getneightbl"></a>
<a id="rst-rt-neigh-operation-getneightbl"></a>



### getneightbl



Get or dump neighbour tables

- **fixed-header**:

  [ndtmsg](#rst-rt-neigh-definition-ndtmsg)

- **attribute-set**:

  [ndt-attrs](#rst-rt-neigh-attribute-set-ndt-attrs)

- **dump**:

  **request**

  **reply**

  - **attributes**:

    \[`name`, `thresh1`, `thresh2`, `thresh3`, `config`, `parms`, `stats`, `gc-interval`\]

<a id="rst-setneightbl"></a>
<a id="rst-rt-neigh-operation-setneightbl"></a>



### setneightbl



Set neighbour tables

- **fixed-header**:

  [ndtmsg](#rst-rt-neigh-definition-ndtmsg)

- **attribute-set**:

  [ndt-attrs](#rst-rt-neigh-attribute-set-ndt-attrs)

- **do**:

  **request**

  - **attributes**:

    \[`name`, `thresh1`, `thresh2`, `thresh3`, `parms`, `gc-interval`\]

<a id="rst-multicast-groups"></a>



## Multicast groups

- rtnlgrp-neigh


<a id="rst-definitions"></a>



## Definitions

<a id="rst-ndmsg"></a>
<a id="rst-rt-neigh-definition-ndmsg"></a>



### ndmsg

- **type**:

  struct

- **members**:

  - **ndm-family (`u8`)**

  - **ndm-pad (`pad`)**

  - **ndm-ifindex (`s32`)**

  - **ndm-state (`u16`)**

  - **ndm-flags (`u8`)**

  - **ndm-type (`u8`)**

<a id="rst-ndtmsg"></a>
<a id="rst-rt-neigh-definition-ndtmsg"></a>



### ndtmsg

- **type**:

  struct

- **members**:

  - **family (`u8`)**

<a id="rst-nud-state"></a>
<a id="rst-rt-neigh-definition-nud-state"></a>



### nud-state

- **type**:

  flags

- **enum-name**:

  None

- **entries**:

  - `incomplete`


  - `reachable`


  - `stale`


  - `delay`


  - `probe`


  - `failed`


  - `noarp`


  - `permanent`

<a id="rst-ntf-flags"></a>
<a id="rst-rt-neigh-definition-ntf-flags"></a>



### ntf-flags

- **type**:

  flags

- **enum-name**:

  None

- **entries**:

  - `use`


  - `self`


  - `master`


  - `proxy`


  - `ext-learned`


  - `offloaded`


  - `sticky`


  - `router`

<a id="rst-ntf-ext-flags"></a>
<a id="rst-rt-neigh-definition-ntf-ext-flags"></a>



### ntf-ext-flags

- **type**:

  flags

- **enum-name**:

  None

- **entries**:

  - `managed`


  - `locked`


  - `ext-validated`

<a id="rst-rtm-type"></a>
<a id="rst-rt-neigh-definition-rtm-type"></a>



### rtm-type

- **type**:

  enum

- **enum-name**:

  None

- **entries**:

  - `unspec`


  - `unicast`


  - `local`


  - `broadcast`


  - `anycast`


  - `multicast`


  - `blackhole`


  - `unreachable`


  - `prohibit`


  - `throw`


  - `nat`


  - `xresolve`

<a id="rst-nda-cacheinfo"></a>
<a id="rst-rt-neigh-definition-nda-cacheinfo"></a>



### nda-cacheinfo

- **type**:

  struct

- **members**:

  - **confirmed (`u32`)**

  - **used (`u32`)**

  - **updated (`u32`)**

  - **refcnt (`u32`)**

<a id="rst-ndt-config"></a>
<a id="rst-rt-neigh-definition-ndt-config"></a>



### ndt-config

- **type**:

  struct

- **members**:

  - **key-len (`u16`)**

  - **entry-size (`u16`)**

  - **entries (`u32`)**

  - **last-flush (`u32`)**

  - **last-rand (`u32`)**

  - **hash-rnd (`u32`)**

  - **hash-mask (`u32`)**

  - **hash-chain-gc (`u32`)**

  - **proxy-qlen (`u32`)**

<a id="rst-ndt-stats"></a>
<a id="rst-rt-neigh-definition-ndt-stats"></a>



### ndt-stats

- **type**:

  struct

- **members**:

  - **allocs (`u64`)**

  - **destroys (`u64`)**

  - **hash-grows (`u64`)**

  - **res-failed (`u64`)**

  - **lookups (`u64`)**

  - **hits (`u64`)**

  - **rcv-probes-mcast (`u64`)**

  - **rcv-probes-ucast (`u64`)**

  - **periodic-gc-runs (`u64`)**

  - **forced-gc-runs (`u64`)**

  - **table-fulls (`u64`)**

<a id="rst-attribute-sets"></a>



## Attribute sets

<a id="rst-neighbour-attrs"></a>
<a id="rst-rt-neigh-attribute-set-neighbour-attrs"></a>



### neighbour-attrs

<a id="rst-unspec-binary"></a>



#### unspec (`binary`)

- **value**:

  0

<a id="rst-dst-binary"></a>



#### dst (`binary`)

- **display-hint**:

  ipv4-or-v6

<a id="rst-lladdr-binary"></a>



#### lladdr (`binary`)

- **display-hint**:

  mac

<a id="rst-cacheinfo-binary"></a>



#### cacheinfo (`binary`)

- **struct**:

  [nda-cacheinfo](#rst-rt-neigh-definition-nda-cacheinfo)

<a id="rst-probes-u32"></a>



#### probes (`u32`)

<a id="rst-vlan-u16"></a>



#### vlan (`u16`)

<a id="rst-port-u16"></a>



#### port (`u16`)

<a id="rst-vni-u32"></a>



#### vni (`u32`)

<a id="rst-ifindex-u32"></a>



#### ifindex (`u32`)

<a id="rst-master-u32"></a>



#### master (`u32`)

<a id="rst-link-netnsid-s32"></a>



#### link-netnsid (`s32`)

<a id="rst-src-vni-u32"></a>



#### src-vni (`u32`)

<a id="rst-protocol-u8"></a>



#### protocol (`u8`)

<a id="rst-nh-id-u32"></a>



#### nh-id (`u32`)

<a id="rst-fdb-ext-attrs-binary"></a>



#### fdb-ext-attrs (`binary`)

<a id="rst-flags-ext-u32"></a>



#### flags-ext (`u32`)

- **enum**:

  [ntf-ext-flags](#rst-rt-neigh-definition-ntf-ext-flags)

<a id="rst-ndm-state-mask-u16"></a>



#### ndm-state-mask (`u16`)

<a id="rst-ndm-flags-mask-u8"></a>



#### ndm-flags-mask (`u8`)

<a id="rst-ndt-attrs"></a>
<a id="rst-rt-neigh-attribute-set-ndt-attrs"></a>



### ndt-attrs

<a id="rst-name-string"></a>



#### name (`string`)

<a id="rst-thresh1-u32"></a>



#### thresh1 (`u32`)

<a id="rst-thresh2-u32"></a>



#### thresh2 (`u32`)

<a id="rst-thresh3-u32"></a>



#### thresh3 (`u32`)

<a id="rst-config-binary"></a>



#### config (`binary`)

- **struct**:

  [ndt-config](#rst-rt-neigh-definition-ndt-config)

<a id="rst-parms-nest"></a>



#### parms (`nest`)

- **nested-attributes**:

  [ndtpa-attrs](#rst-rt-neigh-attribute-set-ndtpa-attrs)

<a id="rst-stats-binary"></a>



#### stats (`binary`)

- **struct**:

  [ndt-stats](#rst-rt-neigh-definition-ndt-stats)

<a id="rst-gc-interval-u64"></a>



#### gc-interval (`u64`)

<a id="rst-pad-pad"></a>



#### pad (`pad`)

<a id="rst-ndtpa-attrs"></a>
<a id="rst-rt-neigh-attribute-set-ndtpa-attrs"></a>



### ndtpa-attrs

<a id="rst-ifindex-u32-1"></a>



#### ifindex (`u32`)

<a id="rst-refcnt-u32"></a>



#### refcnt (`u32`)

<a id="rst-reachable-time-u64"></a>



#### reachable-time (`u64`)

<a id="rst-base-reachable-time-u64"></a>



#### base-reachable-time (`u64`)

<a id="rst-retrans-time-u64"></a>



#### retrans-time (`u64`)

<a id="rst-gc-staletime-u64"></a>



#### gc-staletime (`u64`)

<a id="rst-delay-probe-time-u64"></a>



#### delay-probe-time (`u64`)

<a id="rst-queue-len-u32"></a>



#### queue-len (`u32`)

<a id="rst-app-probes-u32"></a>



#### app-probes (`u32`)

<a id="rst-ucast-probes-u32"></a>



#### ucast-probes (`u32`)

<a id="rst-mcast-probes-u32"></a>



#### mcast-probes (`u32`)

<a id="rst-anycast-delay-u64"></a>



#### anycast-delay (`u64`)

<a id="rst-proxy-delay-u64"></a>



#### proxy-delay (`u64`)

<a id="rst-proxy-qlen-u32"></a>



#### proxy-qlen (`u32`)

<a id="rst-locktime-u64"></a>



#### locktime (`u64`)

<a id="rst-queue-lenbytes-u32"></a>



#### queue-lenbytes (`u32`)

<a id="rst-mcast-reprobes-u32"></a>



#### mcast-reprobes (`u32`)

<a id="rst-pad-pad-1"></a>



#### pad (`pad`)

<a id="rst-interval-probe-time-ms-u64"></a>



#### interval-probe-time-ms (`u64`)
