Thread (28 messages) 28 messages, 3 authors, 2025-09-13

Re: [PATCH net-next v3 12/13] tools: ynl: decode hex input

From: Donald Hunter <donald.hunter@gmail.com>
Date: 2025-09-12 12:08:58
Also in: lkml

Asbjørn Sloth Tønnesen [off-list ref] writes:
This patch adds support for decoding hex input, so
that binary attributes can be read through --json.

Example (using future wireguard.yaml):
 $ sudo ./tools/net/ynl/pyynl/cli.py --family wireguard \
   --do set-device --json '{"ifindex":3,
     "private-key":"2a ae 6c 35 c9 4f cf <... to 32 bytes>"}'

In order to somewhat mirror what is done in _formatted_string(),
then for non-binary attributes attempt to convert it to an int.

Signed-off-by: Asbjørn Sloth Tønnesen <redacted>
Reviewed-by: Donald Hunter <donald.hunter@gmail.com>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help