summaryrefslogtreecommitdiff
path: root/AUTHORS
diff options
context:
space:
mode:
authorEugene Syromyatnikov <evgsyr@gmail.com>2021-10-14 20:04:17 +0200
committerDmitry V. Levin <ldv@strace.io>2021-11-07 08:00:00 +0000
commit1f724b7b14421051c17d8a00bb89f9216282fd27 (patch)
tree9be22723f92b07b81916d4758d93c6dd09a34459 /AUTHORS
parent832827a9560d167a0e57ad146ca2c9c8d416e864 (diff)
downloadstrace-1f724b7b14421051c17d8a00bb89f9216282fd27.tar.gz
nlattr: factor out AF_SPEC-typed netlink attribute decoding
decode_ifstats_af and decode_ifla_af do about the same thing, except the latter employs AF-indexed array and the former uses a list. This is going to change with the addition of AF_MCTP protocol IFLA_AF_SPEC decoding support, as its address family number (45) necessitates the switch from AF-indexed array to a list as well, so these two decoders are going to have exactly the same logic, and that is a reason for factoring it out in a separate function. * src/nlattr.h (struct af_spec_decoder_desc): New type definition. (decode_nla_af_spec): New declaration. * src/nlattr.c (decode_nla_af_spec): New function. * src/rtnl_link.c (ifla_af_spec_protos): Move inside decode_ifla_af, rename to protos, change type to struct af_spec_decoder_desc[], initialise af fields of each item. (decode_ifla_af): Call decode_nla_af_spec. (decode_ifstats_af): Change type of the protos local variable to struct af_spec_decoder_desc[], replace the body with a call to decode_nla_af_spec.
Diffstat (limited to 'AUTHORS')
0 files changed, 0 insertions, 0 deletions