xref: /linux/Documentation/netlink/specs/rt-neigh.yaml (revision d9a0788093565c300f7c8dd034dbfa6ac4da9aa6)
1# SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)
2
3name: rt-neigh
4protocol: netlink-raw
5uapi-header: linux/rtnetlink.h
6protonum: 0
7
8doc:
9  IP neighbour management over rtnetlink.
10
11definitions:
12  -
13    name: ndmsg
14    type: struct
15    members:
16      -
17        name: ndm-family
18        type: u8
19      -
20        name: ndm-pad
21        type: pad
22        len: 3
23      -
24        name: ndm-ifindex
25        type: s32
26      -
27        name: ndm-state
28        type: u16
29        enum: nud-state
30      -
31        name: ndm-flags
32        type: u8
33        enum: ntf-flags
34      -
35        name: ndm-type
36        type: u8
37        enum: rtm-type
38  -
39    name: ndtmsg
40    type: struct
41    members:
42      -
43        name: family
44        type: u8
45      -
46        name: pad
47        type: pad
48        len: 3
49  -
50    name: nud-state
51    type: flags
52    enum-name:
53    entries:
54      - incomplete
55      - reachable
56      - stale
57      - delay
58      - probe
59      - failed
60      - noarp
61      - permanent
62  -
63    name: ntf-flags
64    type: flags
65    enum-name:
66    entries:
67      - use
68      - self
69      - master
70      - proxy
71      - ext-learned
72      - offloaded
73      - sticky
74      - router
75  -
76    name: ntf-ext-flags
77    type: flags
78    enum-name:
79    entries:
80      - managed
81      - locked
82  -
83    name: rtm-type
84    type: enum
85    enum-name:
86    entries:
87      - unspec
88      - unicast
89      - local
90      - broadcast
91      - anycast
92      - multicast
93      - blackhole
94      - unreachable
95      - prohibit
96      - throw
97      - nat
98      - xresolve
99  -
100    name: nda-cacheinfo
101    type: struct
102    members:
103      -
104        name: confirmed
105        type: u32
106      -
107        name: used
108        type: u32
109      -
110        name: updated
111        type: u32
112      -
113        name: refcnt
114        type: u32
115  -
116    name: ndt-config
117    type: struct
118    members:
119      -
120        name: key-len
121        type: u16
122      -
123        name: entry-size
124        type: u16
125      -
126        name: entries
127        type: u32
128      -
129        name: last-flush
130        type: u32
131      -
132        name: last-rand
133        type: u32
134      -
135        name: hash-rnd
136        type: u32
137      -
138        name: hash-mask
139        type: u32
140      -
141        name: hash-chain-gc
142        type: u32
143      -
144        name: proxy-qlen
145        type: u32
146  -
147    name: ndt-stats
148    type: struct
149    members:
150      -
151        name: allocs
152        type: u64
153      -
154        name: destroys
155        type: u64
156      -
157        name: hash-grows
158        type: u64
159      -
160        name: res-failed
161        type: u64
162      -
163        name: lookups
164        type: u64
165      -
166        name: hits
167        type: u64
168      -
169        name: rcv-probes-mcast
170        type: u64
171      -
172        name: rcv-probes-ucast
173        type: u64
174      -
175        name: periodic-gc-runs
176        type: u64
177      -
178        name: forced-gc-runs
179        type: u64
180      -
181        name: table-fulls
182        type: u64
183
184attribute-sets:
185  -
186    name: neighbour-attrs
187    name-prefix: nda-
188    attributes:
189      -
190        name: unspec
191        type: binary
192        value: 0
193      -
194        name: dst
195        type: binary
196        display-hint: ipv4
197      -
198        name: lladdr
199        type: binary
200        display-hint: mac
201      -
202        name: cacheinfo
203        type: binary
204        struct: nda-cacheinfo
205      -
206        name: probes
207        type: u32
208      -
209        name: vlan
210        type: u16
211      -
212        name: port
213        type: u16
214      -
215        name: vni
216        type: u32
217      -
218        name: ifindex
219        type: u32
220      -
221        name: master
222        type: u32
223      -
224        name: link-netnsid
225        type: s32
226      -
227        name: src-vni
228        type: u32
229      -
230        name: protocol
231        type: u8
232      -
233        name: nh-id
234        type: u32
235      -
236        name: fdb-ext-attrs
237        type: binary
238      -
239        name: flags-ext
240        type: u32
241        enum: ntf-ext-flags
242      -
243        name: ndm-state-mask
244        type: u16
245      -
246        name: ndm-flags-mask
247        type: u8
248  -
249    name: ndt-attrs
250    name-prefix: ndta-
251    attributes:
252      -
253        name: name
254        type: string
255      -
256        name: thresh1
257        type: u32
258      -
259        name: thresh2
260        type: u32
261      -
262        name: thresh3
263        type: u32
264      -
265        name: config
266        type: binary
267        struct: ndt-config
268      -
269        name: parms
270        type: nest
271        nested-attributes: ndtpa-attrs
272      -
273        name: stats
274        type: binary
275        struct: ndt-stats
276      -
277        name: gc-interval
278        type: u64
279      -
280        name: pad
281        type: pad
282  -
283    name: ndtpa-attrs
284    name-prefix: ndtpa-
285    attributes:
286      -
287        name: ifindex
288        type: u32
289      -
290        name: refcnt
291        type: u32
292      -
293        name: reachable-time
294        type: u64
295      -
296        name: base-reachable-time
297        type: u64
298      -
299        name: retrans-time
300        type: u64
301      -
302        name: gc-staletime
303        type: u64
304      -
305        name: delay-probe-time
306        type: u64
307      -
308        name: queue-len
309        type: u32
310      -
311        name: app-probes
312        type: u32
313      -
314        name: ucast-probes
315        type: u32
316      -
317        name: mcast-probes
318        type: u32
319      -
320        name: anycast-delay
321        type: u64
322      -
323        name: proxy-delay
324        type: u64
325      -
326        name: proxy-qlen
327        type: u32
328      -
329        name: locktime
330        type: u64
331      -
332        name: queue-lenbytes
333        type: u32
334      -
335        name: mcast-reprobes
336        type: u32
337      -
338        name: pad
339        type: pad
340      -
341        name: interval-probe-time-ms
342        type: u64
343
344operations:
345  enum-model: directional
346  name-prefix: rtm-
347  list:
348    -
349      name: newneigh
350      doc: Add new neighbour entry
351      fixed-header: ndmsg
352      attribute-set: neighbour-attrs
353      do:
354        request:
355          value: 28
356          attributes: &neighbour-all
357            - dst
358            - lladdr
359            - probes
360            - vlan
361            - port
362            - vni
363            - ifindex
364            - master
365            - protocol
366            - nh-id
367            - flags-ext
368            - fdb-ext-attrs
369    -
370      name: delneigh
371      doc: Remove an existing neighbour entry
372      fixed-header: ndmsg
373      attribute-set: neighbour-attrs
374      do:
375        request:
376          value: 29
377          attributes:
378            - dst
379            - ifindex
380    -
381      name: delneigh-ntf
382      doc: Notify a neighbour deletion
383      value: 29
384      notify: getneigh
385      fixed-header: ndmsg
386    -
387      name: getneigh
388      doc: Get or dump neighbour entries
389      fixed-header: ndmsg
390      attribute-set: neighbour-attrs
391      do:
392        request:
393          value: 30
394          attributes:
395            - dst
396        reply:
397          value: 28
398          attributes: *neighbour-all
399      dump:
400        request:
401          attributes:
402            - ifindex
403            - master
404        reply:
405          value: 28
406          attributes: *neighbour-all
407    -
408      name: newneigh-ntf
409      doc: Notify a neighbour creation
410      value: 28
411      notify: getneigh
412      fixed-header: ndmsg
413    -
414      name: getneightbl
415      doc: Get or dump neighbour tables
416      fixed-header: ndtmsg
417      attribute-set: ndt-attrs
418      dump:
419        request:
420          value: 66
421        reply:
422          value: 64
423          attributes:
424            - name
425            - thresh1
426            - thresh2
427            - thresh3
428            - config
429            - parms
430            - stats
431            - gc-interval
432    -
433      name: setneightbl
434      doc: Set neighbour tables
435      fixed-header: ndtmsg
436      attribute-set: ndt-attrs
437      do:
438        request:
439          value: 67
440          attributes:
441            - name
442            - thresh1
443            - thresh2
444            - thresh3
445            - parms
446            - gc-interval
447
448mcast-groups:
449  list:
450    -
451      name: rtnlgrp-neigh
452      value: 3
453