]> git.ipfire.org Git - thirdparty/linux.git/commit
tools: ynl: support creating non-genl sockets
authorJakub Kicinski <kuba@kernel.org>
Thu, 10 Apr 2025 01:46:52 +0000 (18:46 -0700)
committerJakub Kicinski <kuba@kernel.org>
Fri, 11 Apr 2025 03:14:41 +0000 (20:14 -0700)
commit17b3ce292dcbf1aaface3d42859cff0e1dfd3bb6
treeb5ae6430d6ecfc0b5384718e9cb46430a22b34cc
parent1652e1f35dfb434862a595224ab2c4aa0244951f
tools: ynl: support creating non-genl sockets

Classic netlink has static family IDs specified in YAML,
there is no family name -> ID lookup. Support providing
the ID info to the library via the generated struct and
make library use it. Since NETLINK_ROUTE is ID 0 we need
an extra boolean to indicate classic_id is to be used.

Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Reviewed-by: Donald Hunter <donald.hunter@gmail.com>
Link: https://patch.msgid.link/20250410014658.782120-8-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/net/ynl/lib/ynl.c
tools/net/ynl/lib/ynl.h
tools/net/ynl/pyynl/ynl_gen_c.py