summaryrefslogtreecommitdiff
path: root/Documentation/netlink/genetlink-legacy.yaml
diff options
context:
space:
mode:
authorDonald Hunter <donald.hunter@gmail.com>2023-06-23 23:19:26 +0300
committerJakub Kicinski <kuba@kernel.org>2023-06-25 01:45:49 +0300
commit737eab775d367b0ba6575d8aa2073c607a9bcf9e (patch)
tree5e700a1a32ede4d9cf119929d2634e1007145e96 /Documentation/netlink/genetlink-legacy.yaml
parent2ffecf1a42ccd67e4b2fec7a613e375014869d60 (diff)
downloadlinux-737eab775d367b0ba6575d8aa2073c607a9bcf9e.tar.xz
netlink: specs: add display-hint to schema definitions
Add a display-hint property to the netlink schema that is for providing optional hints to generic netlink clients about how to display attribute values. A display-hint on an attribute definition is intended for letting a client such as ynl know that, for example, a u32 should be rendered as an ipv4 address. The display-hint enumeration includes a small number of networking domain-specific value types. Signed-off-by: Donald Hunter <donald.hunter@gmail.com> Link: https://lore.kernel.org/r/20230623201928.14275-2-donald.hunter@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'Documentation/netlink/genetlink-legacy.yaml')
-rw-r--r--Documentation/netlink/genetlink-legacy.yaml11
1 files changed, 10 insertions, 1 deletions
diff --git a/Documentation/netlink/genetlink-legacy.yaml b/Documentation/netlink/genetlink-legacy.yaml
index b474889b49ff..43b769c98fb2 100644
--- a/Documentation/netlink/genetlink-legacy.yaml
+++ b/Documentation/netlink/genetlink-legacy.yaml
@@ -119,7 +119,8 @@ properties:
name:
type: string
type:
- enum: [ u8, u16, u32, u64, s8, s16, s32, s64, string ]
+ description: The netlink attribute type
+ enum: [ u8, u16, u32, u64, s8, s16, s32, s64, string, binary ]
len:
$ref: '#/$defs/len-or-define'
byte-order:
@@ -130,6 +131,12 @@ properties:
enum:
description: Name of the enum type used for the attribute.
type: string
+ display-hint: &display-hint
+ description: |
+ Optional format indicator that is intended only for choosing
+ the right formatting mechanism when displaying values of this
+ type.
+ enum: [ hex, mac, fddi, ipv4, ipv6, uuid ]
# End genetlink-legacy
attribute-sets:
@@ -179,6 +186,7 @@ properties:
name:
type: string
type: &attr-type
+ description: The netlink attribute type
enum: [ unused, pad, flag, binary, u8, u16, u32, u64, s32, s64,
string, nest, array-nest, nest-type-value ]
doc:
@@ -226,6 +234,7 @@ properties:
description: Max length for a string or a binary attribute.
$ref: '#/$defs/len-or-define'
sub-type: *attr-type
+ display-hint: *display-hint
# Start genetlink-c
name-prefix:
type: string