Logo Search packages:      
Sourcecode: libnl version File versions  Download package

struct nlattr* nla_find ( struct nlattr head,
int  len,
int  attrtype 
) [read]

Find a specific attribute in a stream of attributes

  • head head of attribute stream
  • len length of attribute stream
  • attrtype type of attribute to look for
the first attribute in the stream matching the specified type.

Definition at line 346 of file attr.c.

References nla_for_each_attr, and nlattr::nla_type.

Referenced by nlmsg_find_attr().

      struct nlattr *nla;
      int rem;

      nla_for_each_attr(nla, head, len, rem)
            if (nla->nla_type == attrtype)
                  return nla;

      return NULL;

Generated by  Doxygen 1.6.0   Back to index