release/src-ra-4300/linux/linux-2.6.36.x/lib/nlattr.c
/**
 * nla_find - 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
 *
 * Returns the first attribute in the stream matching the specified type.
 */
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

Returns the first attribute in the stream matching the specified type.
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 Returns the first attribute in the stream matching the specified type .
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 ; }
nla_find - 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
nla_find - 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