xref: /linux/Documentation/netlink/specs/rt-addr.yaml (revision 23ca32e4ead48f68e37000f2552b973ef1439acb)
1# SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)
2---
3name: rt-addr
4protocol: netlink-raw
5uapi-header: linux/rtnetlink.h
6protonum: 0
7
8doc:
9  Address configuration over rtnetlink.
10
11definitions:
12  -
13    name: ifaddrmsg
14    type: struct
15    members:
16      -
17        name: ifa-family
18        type: u8
19      -
20        name: ifa-prefixlen
21        type: u8
22      -
23        name: ifa-flags
24        type: u8
25        enum: ifa-flags
26        enum-as-flags: true
27      -
28        name: ifa-scope
29        type: u8
30      -
31        name: ifa-index
32        type: u32
33  -
34    name: ifa-cacheinfo
35    type: struct
36    members:
37      -
38        name: ifa-prefered
39        type: u32
40      -
41        name: ifa-valid
42        type: u32
43      -
44        name: cstamp
45        type: u32
46      -
47        name: tstamp
48        type: u32
49
50  -
51    name: ifa-flags
52    type: flags
53    name-prefix: ifa-f-
54    enum-name:
55    entries:
56      -
57        name: secondary
58      -
59        name: nodad
60      -
61        name: optimistic
62      -
63        name: dadfailed
64      -
65        name: homeaddress
66      -
67        name: deprecated
68      -
69        name: tentative
70      -
71        name: permanent
72      -
73        name: managetempaddr
74      -
75        name: noprefixroute
76      -
77        name: mcautojoin
78      -
79        name: stable-privacy
80
81attribute-sets:
82  -
83    name: addr-attrs
84    name-prefix: ifa-
85    attributes:
86      -
87        name: address
88        type: binary
89        display-hint: ipv4
90      -
91        name: local
92        type: binary
93        display-hint: ipv4
94      -
95        name: label
96        type: string
97      -
98        name: broadcast
99        type: binary
100        display-hint: ipv4
101      -
102        name: anycast
103        type: binary
104      -
105        name: cacheinfo
106        type: binary
107        struct: ifa-cacheinfo
108      -
109        name: multicast
110        type: binary
111      -
112        name: flags
113        type: u32
114        enum: ifa-flags
115        enum-as-flags: true
116      -
117        name: rt-priority
118        type: u32
119      -
120        name: target-netnsid
121        type: binary
122      -
123        name: proto
124        type: u8
125
126
127operations:
128  fixed-header: ifaddrmsg
129  enum-model: directional
130  name-prefix: rtm-
131  list:
132    -
133      name: newaddr
134      doc: Add new address
135      attribute-set: addr-attrs
136      do:
137        request:
138          value: 20
139          attributes: &ifaddr-all
140            - address
141            - label
142            - local
143            - cacheinfo
144    -
145      name: deladdr
146      doc: Remove address
147      attribute-set: addr-attrs
148      do:
149        request:
150          value: 21
151          attributes:
152            - address
153            - local
154    -
155      name: getaddr
156      doc: Dump address information.
157      attribute-set: addr-attrs
158      dump:
159        request:
160          value: 22
161          attributes: []
162        reply:
163          value: 20
164          attributes: *ifaddr-all
165    -
166      name: getmulticast
167      doc: Get / dump IPv4/IPv6 multicast addresses.
168      attribute-set: addr-attrs
169      fixed-header: ifaddrmsg
170      do:
171        request:
172          value: 58
173          attributes: []
174        reply:
175          value: 58
176          attributes: &mcaddr-attrs
177            - multicast
178            - cacheinfo
179      dump:
180        request:
181          value: 58
182          attributes: []
183        reply:
184          value: 58
185          attributes: *mcaddr-attrs
186
187mcast-groups:
188  list:
189    -
190      name: rtnlgrp-ipv4-ifaddr
191      value: 5
192    -
193      name: rtnlgrp-ipv6-ifaddr
194      value: 9
195