Home | History | Annotate | Download | only in lib

Lines Matching refs:nested

34  * Special nested attributes allow for more complex data structures to
216 * @par Nested Attribute (NLA_NESTED)
217 * Attributes can be nested and put into a container to create groups, lists
218 * or to construct trees of attributes. Nested attributes are often used to
224 * level of nested attributes must be validated seperately using
233 * // Nested attributes are constructed by enclosing the attributes
234 * // to be nested with calls to nla_nest_start() respetively nla_nest_end().
240 * // Various methods exist to parse nested attributes, the easiest being
243 * struct nlattr *nested[ATTR_MAX+1];
245 * nla_parse_nested(nested, ATTR_MAX, attrs[ATTR_OPTS], &policy);
247 * if (nested[ATTR_FOO])
248 * uint32_t foo = nla_get_u32(nested[ATTR_FOO]);
300 * // Append a container for nested attributes to carry link information
334 * // for nested attributes.
357 * struct nlattr *nested[NESTED_MAX+1];
359 * // Attributes nested in a container can be parsed the same way
361 * if ((err = nla_parse_nested(nested, NESTED_MAX, attrs[ATTR_BAR],
365 * // Process nested attributes here.
1092 * @name Nested Attribute
1096 * Add nested attributes to netlink message.
1099 * @arg nested Message containing attributes to be nested.
1101 * Takes the attributes found in the \a nested message and appends them
1102 * to the message \a msg nested in a container of the type \a attrtype.
1103 * The \a nested message may not have a family specific header.
1108 int nla_put_nested(struct nl_msg *msg, int attrtype, struct nl_msg *nested)
1110 return nla_put(msg, attrtype, nlmsg_len(nested->nm_nlh),
1111 nlmsg_data(nested->nm_nlh));
1116 * Start a new level of nested attributes.
1149 * Create attribute index based on nested attribute
1152 * @arg nla Nested Attribute.
1155 * Feeds the stream of attributes nested into the specified attribute