Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 35552
b: refs/heads/master
c: 4fe5d5c
h: refs/heads/master
v: v3
  • Loading branch information
Paul Moore authored and David S. Miller committed Sep 25, 2006
1 parent 4ad4672 commit 8f3918d
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 22acb19a91d2b551ea37647747972e5286284b22
refs/heads/master: 4fe5d5c07ab615a52fd1b0ceba5aeed7c612821a
19 changes: 19 additions & 0 deletions trunk/include/net/netlink.h
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@
* nla_ok(nla, remaining) does nla fit into remaining bytes?
* nla_next(nla, remaining) get next netlink attribute
* nla_validate() validate a stream of attributes
* nla_validate_nested() validate a stream of nested attributes
* nla_find() find attribute in stream of attributes
* nla_find_nested() find attribute in nested attributes
* nla_parse() parse and validate stream of attrs
Expand Down Expand Up @@ -950,6 +951,24 @@ static inline int nla_nest_cancel(struct sk_buff *skb, struct nlattr *start)
return nlmsg_trim(skb, start);
}

/**
* nla_validate_nested - Validate a stream of nested attributes
* @start: container attribute
* @maxtype: maximum attribute type to be expected
* @policy: validation policy
*
* Validates all attributes in the nested attribute stream against the
* specified policy. Attributes with a type exceeding maxtype will be
* ignored. See documenation of struct nla_policy for more details.
*
* Returns 0 on success or a negative error code.
*/
static inline int nla_validate_nested(struct nlattr *start, int maxtype,
struct nla_policy *policy)
{
return nla_validate(nla_data(start), nla_len(start), maxtype, policy);
}

/**
* nla_for_each_attr - iterate over a stream of attributes
* @pos: loop counter, set to current attribute
Expand Down

0 comments on commit 8f3918d

Please sign in to comment.