Find a single attribute in a stream of attributes.
- head Head of attributes stream.
- len Length of attributes stream.
- attrtype Attribute type to look for.
Iterates over the stream of attributes and compares each type with the type specified. Returns the first attribute which matches the type.
- Pointer to attribute found or NULL.
Definition at line 665 of file attr.c.
References nla_for_each_attr, and nla_type().
Referenced by nlmsg_find_attr().
struct nlattr *nla;
nla_for_each_attr(nla, head, len, rem)
if (nla_type(nla) == attrtype)