openbmc/build/tmp/deploy/sdk/witherspoon-2019-08-08/sysroots/armv6-openbmc-linux-gnueabi/usr/src/debug/libnl/1_3.4.0-r0/libnl-3.4.0/lib/attr.c
struct nlattr* nla_find(const struct nlattr* head, int len, int attrtype)
{
    const struct nlattr* nla;
    int rem;

    nla_for_each_attr(nla, head, len,
                      rem) if (nla_type(nla) ==
                               attrtype) return (struct nlattr*)nla;

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