mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-02-17 23:00:26 -05:00
Since commit 1b255e1bea ("tools: ynl: add ipv4-or-v6 display hint"), we
can display either IPv4 or IPv6 addresses for a single field based on the
address family. However, most dual-stack fields still use the ipv4 display
hint. This update changes them to use the new ipv4-or-v6 display hint and
converts IPv4-only fields to use the u32 type.
Field changes:
- v4-or-v6
- IFA_ADDRESS, IFA_LOCAL
- IFLA_GRE_LOCAL, IFLA_GRE_REMOTE
- IFLA_VTI_LOCAL, IFLA_VTI_REMOTE
- IFLA_IPTUN_LOCAL, IFLA_IPTUN_REMOTE
- NDA_DST
- RTA_DST, RTA_SRC, RTA_GATEWAY, RTA_PREFSRC
- FRA_SRC, FRA_DST
- ipv4
- IFA_BROADCAST
- IFLA_GENEVE_REMOTE
- IFLA_IPTUN_6RD_RELAY_PREFIX
Reviewed-by: Asbjørn Sloth Tønnesen <ast@fiberby.net>
Reviewed-by: Donald Hunter <donald.hunter@gmail.com>
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Link: https://patch.msgid.link/20251117024457.3034-3-liuhangbin@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
195 lines
3.4 KiB
YAML
195 lines
3.4 KiB
YAML
# SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)
|
|
---
|
|
name: rt-addr
|
|
protocol: netlink-raw
|
|
uapi-header: linux/rtnetlink.h
|
|
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
|
|
name-prefix: ifa-f-
|
|
enum-name:
|
|
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-or-v6
|
|
-
|
|
name: local
|
|
type: binary
|
|
display-hint: ipv4-or-v6
|
|
-
|
|
name: label
|
|
type: string
|
|
-
|
|
name: broadcast
|
|
type: u32
|
|
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
|
|
name-prefix: rtm-
|
|
list:
|
|
-
|
|
name: newaddr
|
|
doc: Add new address
|
|
attribute-set: addr-attrs
|
|
do:
|
|
request:
|
|
value: 20
|
|
attributes: &ifaddr-all
|
|
- address
|
|
- label
|
|
- local
|
|
- cacheinfo
|
|
-
|
|
name: deladdr
|
|
doc: Remove address
|
|
attribute-set: addr-attrs
|
|
do:
|
|
request:
|
|
value: 21
|
|
attributes:
|
|
- address
|
|
- local
|
|
-
|
|
name: getaddr
|
|
doc: Dump address information.
|
|
attribute-set: addr-attrs
|
|
dump:
|
|
request:
|
|
value: 22
|
|
attributes: []
|
|
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: []
|
|
reply:
|
|
value: 58
|
|
attributes: &mcaddr-attrs
|
|
- multicast
|
|
- cacheinfo
|
|
dump:
|
|
request:
|
|
value: 58
|
|
attributes: []
|
|
reply:
|
|
value: 58
|
|
attributes: *mcaddr-attrs
|
|
|
|
mcast-groups:
|
|
list:
|
|
-
|
|
name: rtnlgrp-ipv4-ifaddr
|
|
value: 5
|
|
-
|
|
name: rtnlgrp-ipv6-ifaddr
|
|
value: 9
|