mirror-linux/tools/net/ynl/lib
Hangbin Liu a7408b56e5 ynl: support binary and integer sub-type for indexed-array
Add binary and integer sub-type support for indexed-array to display bond
arp and ns targets. Here is what the result looks like:

 # ip link add bond0 type bond mode 1 \
   arp_ip_target 192.168.1.1,192.168.1.2 ns_ip6_target 2001::1,2001::2
 # ./tools/net/ynl/cli.py --spec Documentation/netlink/specs/rt_link.yaml \
   --do getlink --json '{"ifname": "bond0"}' --output-json | jq '.linkinfo'

    "arp-ip-target": [
      "192.168.1.1",
      "192.168.1.2"
    ],
    [...]
    "ns-ip6-target": [
      "2001::1",
      "2001::2"
    ],

Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Link: https://lore.kernel.org/r/20240404063114.1221532-3-liuhangbin@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-04-05 22:32:49 -07:00
..
.gitignore tools: net: add __pycache__ to gitignore 2023-02-24 11:55:47 -08:00
Makefile tools: ynl: remove __pycache__ during clean 2024-03-06 12:05:10 +00:00
__init__.py tools/net/ynl: Report netlink errors without stacktrace 2024-03-07 20:28:26 -08:00
nlspec.py netlink: specs: support generating code for genl socket priv 2024-03-11 15:15:42 -07:00
ynl-priv.h tools: ynl: check for overflow of constructed messages 2024-03-07 11:01:31 -08:00
ynl.c tools: ynl: Fix spelling mistake "Constructred" -> "Constructed" 2024-03-08 19:58:13 -08:00
ynl.h tools: ynl: add ynl_dump_empty() helper 2024-04-02 18:01:58 -07:00
ynl.py ynl: support binary and integer sub-type for indexed-array 2024-04-05 22:32:49 -07:00