tools: ynl: create local attribute helpers
authorJakub Kicinski <kuba@kernel.org>
Tue, 27 Feb 2024 22:30:19 +0000 (14:30 -0800)
committerJakub Kicinski <kuba@kernel.org>
Wed, 28 Feb 2024 23:25:42 +0000 (15:25 -0800)
commit5600c580383acb655f0fd8d4963cbea52f056938
tree077ae54bb64aa09c1c9bf66a2ba6515323806ff5
parent21f6986d19b01ecda3d8ae2e79780aa3603d4eeb
tools: ynl: create local attribute helpers

Don't use mnl attr helpers, we're trying to remove the libmnl
dependency. Create both signed and unsigned helpers, libmnl
had unsigned helpers, so code generator no longer needs
the mnl_type() hack.

The new helpers are written from first principles, but are
hopefully not too buggy.

Acked-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Link: https://lore.kernel.org/r/20240227223032.1835527-3-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/net/ynl/lib/ynl-priv.h
tools/net/ynl/lib/ynl.c
tools/net/ynl/ynl-gen-c.py