xref: /linux/Documentation/netlink/specs/rt-addr.yaml (revision a50eba1e778ad4da5b6f9ddbbf57dabbea59bc05)
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-or-v6
90      -
91        name: local
92        type: binary
93        display-hint: ipv4-or-v6
94      -
95        name: label
96        type: string
97      -
98        name: broadcast
99        type: u32
100        byte-order: big-endian
101        display-hint: ipv4
102      -
103        name: anycast
104        type: binary
105      -
106        name: cacheinfo
107        type: binary
108        struct: ifa-cacheinfo
109      -
110        name: multicast
111        type: binary
112      -
113        name: flags
114        type: u32
115        enum: ifa-flags
116        enum-as-flags: true
117      -
118        name: rt-priority
119        type: u32
120      -
121        name: target-netnsid
122        type: binary
123      -
124        name: proto
125        type: u8
126      -
127        name: mc-users
128        type: u32
129
130
131operations:
132  fixed-header: ifaddrmsg
133  enum-model: directional
134  name-prefix: rtm-
135  list:
136    -
137      name: newaddr
138      doc: Add new address
139      attribute-set: addr-attrs
140      do:
141        request:
142          value: 20
143          attributes: &ifaddr-all
144            - address
145            - label
146            - local
147            - cacheinfo
148    -
149      name: deladdr
150      doc: Remove address
151      attribute-set: addr-attrs
152      do:
153        request:
154          value: 21
155          attributes:
156            - address
157            - local
158    -
159      name: getaddr
160      doc: Dump address information.
161      attribute-set: addr-attrs
162      dump:
163        request:
164          value: 22
165          attributes: []
166        reply:
167          value: 20
168          attributes: *ifaddr-all
169    -
170      name: getmulticast
171      doc: Get / dump IPv4/IPv6 multicast addresses.
172      attribute-set: addr-attrs
173      fixed-header: ifaddrmsg
174      do:
175        request:
176          value: 58
177          attributes: []
178        reply:
179          value: 58
180          attributes: &mcaddr-attrs
181            - multicast
182            - mc-users
183            - cacheinfo
184      dump:
185        request:
186          value: 58
187          attributes: []
188        reply:
189          value: 58
190          attributes: *mcaddr-attrs
191
192mcast-groups:
193  list:
194    -
195      name: rtnlgrp-ipv4-ifaddr
196      value: 5
197    -
198      name: rtnlgrp-ipv6-ifaddr
199      value: 9
200