package/libs/libnl-tiny/src/attr.c
/**
 * Find a single attribute in a stream of attributes.
 * @arg head		Head of attributes stream.
 * @arg len		Length of attributes stream.
 * @arg 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.
 *
 * @return Pointer to attribute found or NULL.
 */
Find a single attribute in a stream of attributes.
@arg head            Head of attributes stream.
@arg len             Length of attributes stream.
@arg 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.

@return Pointer to attribute found or NULL.
Find a single attribute in a stream of attributes . @arg head Head of attributes stream . @arg len Length of attributes stream . @arg 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 . @return Pointer to attribute found or NULL .
struct nlattr *nla_find(struct nlattr *head, int len, int attrtype)
{
	struct nlattr *nla;
	int rem;
	nla_for_each_attr(nla, head, len, rem)
		if (nla_type(nla) == attrtype)
			return nla;
	return NULL;
}
struct nlattr * nla_find ( struct nlattr * head , int len , int attrtype ) { struct nlattr * nla ; int rem ; nla_for_each_attr ( nla , head , len , rem ) if ( nla_type ( nla ) == attrtype ) return nla ; return NULL ; }
Find a single attribute in a stream of attributes.
Find a single attribute in a stream of attributes .