Attribute type nests
New Netlink families should use
multi-attr to define arrays.
Older families (e.g.
genetlink control family) attempted to
define array types reusing attribute type to carry information.
For reference the
multi-attr array may look like this:
ARRAY-ATTR is the array entry type.
array-nest creates the following structure:
It wraps the entire array in an extra attribute (hence limiting its size
to 64kB). The
ENTRY nests are special and have the index of the entry
as their type instead of normal attribute type.
type-value is a construct which uses attribute types to carry
information about a single object (often used when array is dumped
type-value can have multiple levels of nesting, for example
genetlink's policy dumps create the following structures:
Where the first level of nest has the policy index as it's attribute
type, it contains a single nest which has the attribute index as its
type. Inside the attr-index nest are the policy attributes. Modern
Netlink families should have instead defined this as a flat structure,
the nesting serves no good purpose here.