]> granicus.if.org Git - strace/commit
rtnl_link: add basic IFLA_INFO_* handling
authorEugene Syromyatnikov <evgsyr@gmail.com>
Fri, 18 May 2018 15:42:18 +0000 (17:42 +0200)
committerDmitry V. Levin <ldv@altlinux.org>
Wed, 6 Jun 2018 15:10:37 +0000 (15:10 +0000)
commit7503a0f9e41d28ce046cd4fda4042d2978e4508e
tree1ebe6ae66e8e85c5a6fe91c8110350a881dfef6a
parent97eb4367e46bfe871b0c0ec653bc25800d2a0fb4
rtnl_link: add basic IFLA_INFO_* handling

Dispatch for IFLA_INFO_* attributes should be performed based on the
string provided in a IFLA_INFO_KIND attribute.

* nlattr.h (struct ifla_linkinfo_ctx): New type definition.
* rtnl_link.c (decode_nla_linkinfo_kind): New function.
(ifla_linkinfo_nla_decoders) <IFLA_INFO_KIND>: Use
decode_nla_linkinfo_kind as decoder.
(decode_ifla_linkinfo): Add struct ifla_linkinfo_ctx context, pass it to
the decode_nlattr call as opaque data.
nlattr.h
rtnl_link.c