]> git.ipfire.org Git - thirdparty/iproute2.git/commit
libnetlink: Add rta_getattr_uint()
authorPetr Machata <petrm@nvidia.com>
Thu, 14 Mar 2024 14:52:12 +0000 (15:52 +0100)
committerDavid Ahern <dsahern@kernel.org>
Fri, 15 Mar 2024 15:03:06 +0000 (15:03 +0000)
commit95836fbf35d352f7c031ddac2e6093a935308cc9
tree1609900537e226b662c96806590f3aebe2609c5b
parent8b3b71898d801e97ea9d098b314d4442c23f0e36
libnetlink: Add rta_getattr_uint()

NLA_UINT attributes have a 4-byte payload if possible, and an 8-byte one if
necessary. Add a function to extract these. Since we need to dispatch on
length anyway, make the getter truly universal by supporting also u8 and
u16.

Signed-off-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
include/libnetlink.h