* rtnl_nsid.c (rtgenmsg_nla_decoders): New array. (decode_rtgenmsg): Use it. --- rtnl_nsid.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/rtnl_nsid.c b/rtnl_nsid.c index e3fe18b..51ce37b 100644 --- a/rtnl_nsid.c +++ b/rtnl_nsid.c @@ -37,6 +37,12 @@ #include "xlat/rtnl_nsid_attrs.h" +static const nla_decoder_t rtgenmsg_nla_decoders[] = { + [NETNSA_NSID] = decode_nla_s32, + [NETNSA_PID] = decode_nla_u32, + [NETNSA_FD] = decode_nla_u32 +}; + DECL_NETLINK_ROUTE_DECODER(decode_rtgenmsg) { struct rtgenmsg rtgenmsg = { .rtgen_family = family }; @@ -48,6 +54,8 @@ DECL_NETLINK_ROUTE_DECODER(decode_rtgenmsg) if (len > offset) { tprints(", "); decode_nlattr(tcp, addr + offset, len - offset, - rtnl_nsid_attrs, "NETNSA_???", NULL, 0, NULL); + rtnl_nsid_attrs, "NETNSA_???", + rtgenmsg_nla_decoders, + ARRAY_SIZE(rtgenmsg_nla_decoders), NULL); } } -- 2.7.4 ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Strace-devel mailing list Strace-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/strace-devel