Jakub Kicinski 0c8e30252d netlink: specs: rt_addr: pull the ifa- prefix out of the names
YAML specs don't normally include the C prefix name in the name
of the YAML attr. Remove the ifa- prefix from all attributes
in addr-attrs and specify name-prefix instead.

This is a bit risky, hopefully there aren't many users out there.

Fixes: dfb0f7d9d979 ("doc/netlink: Add spec for rt addr messages")
Reviewed-by: Donald Hunter <donald.hunter@gmail.com>
Link: https://patch.msgid.link/20250403013706.2828322-4-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2025-04-04 07:36:06 -07:00

205 lines
3.7 KiB
YAML

# SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)
name: rt-addr
protocol: netlink-raw
protonum: 0
doc:
Address configuration over rtnetlink.
definitions:
-
name: ifaddrmsg
type: struct
members:
-
name: ifa-family
type: u8
-
name: ifa-prefixlen
type: u8
-
name: ifa-flags
type: u8
enum: ifa-flags
enum-as-flags: true
-
name: ifa-scope
type: u8
-
name: ifa-index
type: u32
-
name: ifa-cacheinfo
type: struct
members:
-
name: ifa-prefered
type: u32
-
name: ifa-valid
type: u32
-
name: cstamp
type: u32
-
name: tstamp
type: u32
-
name: ifa-flags
type: flags
entries:
-
name: secondary
-
name: nodad
-
name: optimistic
-
name: dadfailed
-
name: homeaddress
-
name: deprecated
-
name: tentative
-
name: permanent
-
name: managetempaddr
-
name: noprefixroute
-
name: mcautojoin
-
name: stable-privacy
attribute-sets:
-
name: addr-attrs
name-prefix: ifa-
attributes:
-
name: address
type: binary
display-hint: ipv4
-
name: local
type: binary
display-hint: ipv4
-
name: label
type: string
-
name: broadcast
type: binary
display-hint: ipv4
-
name: anycast
type: binary
-
name: cacheinfo
type: binary
struct: ifa-cacheinfo
-
name: multicast
type: binary
-
name: flags
type: u32
enum: ifa-flags
enum-as-flags: true
-
name: rt-priority
type: u32
-
name: target-netnsid
type: binary
-
name: proto
type: u8
operations:
fixed-header: ifaddrmsg
enum-model: directional
list:
-
name: newaddr
doc: Add new address
attribute-set: addr-attrs
do:
request:
value: 20
attributes: &ifaddr-all
- ifa-family
- ifa-flags
- ifa-prefixlen
- ifa-scope
- ifa-index
- address
- label
- local
- cacheinfo
-
name: deladdr
doc: Remove address
attribute-set: addr-attrs
do:
request:
value: 21
attributes:
- ifa-family
- ifa-flags
- ifa-prefixlen
- ifa-scope
- ifa-index
- address
- local
-
name: getaddr
doc: Dump address information.
attribute-set: addr-attrs
dump:
request:
value: 22
attributes:
- ifa-index
reply:
value: 20
attributes: *ifaddr-all
-
name: getmulticast
doc: Get / dump IPv4/IPv6 multicast addresses.
attribute-set: addr-attrs
fixed-header: ifaddrmsg
do:
request:
value: 58
attributes:
- ifa-family
- ifa-index
reply:
value: 58
attributes: &mcaddr-attrs
- multicast
- cacheinfo
dump:
request:
value: 58
attributes:
- ifa-family
reply:
value: 58
attributes: *mcaddr-attrs
mcast-groups:
list:
-
name: rtnlgrp-ipv4-ifaddr
value: 5
-
name: rtnlgrp-ipv6-ifaddr
value: 9