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
int nla_validate(const struct nlattr* head, int len, int maxtype,
                 const struct nla_policy* policy)
{
    const struct nlattr* nla;
    int rem, err;

    nla_for_each_attr(nla, head, len, rem)
    {
        err = validate_nla(nla, maxtype, policy);
        if (err < 0)
            goto errout;
    }

    err = 0;
errout:
    return err;
}
/**
 * Validate a stream of attributes.
 * @arg head		Head of attributes stream.
 * @arg len		Length of attributes stream.
 * @arg maxtype		Maximum attribute type expected and accepted.
 * @arg policy		Validation policy.
 *
 * Iterates over the stream of attributes and validates each attribute
 * one by one using the specified policy. Attributes with a type greater
 * than the maximum type specified will be silently ignored in order to
 * maintain backwards compatibility.
 *
 * See section @core_doc{core_attr_parse,Attribute Parsing} for more details.
 *
 * @return 0 on success or a negative error code.
 */
Validate a stream of attributes.
@arg head            Head of attributes stream.
@arg len             Length of attributes stream.
@arg maxtype         Maximum attribute type expected and accepted.
@arg policy          Validation policy.

Iterates over the stream of attributes and validates each attribute
one by one using the specified policy. Attributes with a type greater
than the maximum type specified will be silently ignored in order to
maintain backwards compatibility.

See section @core_doc{core_attr_parse,Attribute Parsing} for more details.

@return 0 on success or a negative error code.
Validate a stream of attributes . @arg head Head of attributes stream . @arg len Length of attributes stream . @arg maxtype Maximum attribute type expected and accepted . @arg policy Validation policy . Iterates over the stream of attributes and validates each attribute one by one using the specified policy . Attributes with a type greater than the maximum type specified will be silently ignored in order to maintain backwards compatibility . See section @core_doc { core_attr_parse Attribute Parsing } for more details . @return 0 on success or a negative error code .
int nla_validate(const struct nlattr* head, int len, int maxtype,
                 const struct nla_policy* policy)
{
    const struct nlattr* nla;
    int rem, err;
    nla_for_each_attr(nla, head, len, rem)
    {
        err = validate_nla(nla, maxtype, policy);
        if (err < 0)
            goto errout;
    }
    err = 0;
errout:
    return err;
}
int nla_validate ( const struct nlattr * head , int len , int maxtype , const struct nla_policy * policy ) { const struct nlattr * nla ; int rem , err ; nla_for_each_attr ( nla , head , len , rem ) { err = validate_nla ( nla , maxtype , policy ) ; if ( err < 0 ) goto errout ; } err = 0 ; errout : return err ; }
Validate a stream of attributes.
Validate a stream of attributes .