netlink: add helper for dissecting an array of attributes
authorPeter Wu <peter@lekensteyn.nl>
Tue, 4 Apr 2017 11:13:59 +0000 (13:13 +0200)
committerMichael Mann <mmann78@netscape.net>
Sun, 9 Apr 2017 01:37:20 +0000 (01:37 +0000)
commit0add542dbfc6d0467d14ebb2abbde0ebd1427ce1
tree940b0297be51e4935b9259b20b8bb5169afc7ec0
parent802479d23798c6d180fad50e95555b49b3d337cb
netlink: add helper for dissecting an array of attributes

From https://wiki.linuxfoundation.org/networking/generic_netlink_howto
"Arrays can be represented by using a single nested attribute as a
container with several of the same attribute type inside each
representing a spot in the array."

This patch adds a helper function to dissect such a type (it will be
used by Generic Netlink for CTRL_ATTR_OPS and CTRL_ATTR_MCAST_GROUPS).

Change-Id: I60537712f7fb0f9d4fb8850c6c8eef590635f49f
Reviewed-on: https://code.wireshark.org/review/20903
Petri-Dish: Jaap Keuter <jaap.keuter@xs4all.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
epan/dissectors/packet-netlink.c
epan/dissectors/packet-netlink.h