diff options
author | Holger Eitzenberger <holger@eitzenberger.org> | 2009-03-25 13:26:30 -0400 |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2009-03-25 13:26:30 -0400 |
commit | e487eb99cf9381a4f8254fa01747a85818da612b (patch) | |
tree | 2381e552d88063982bea03a16db942ebcc295fc2 /include/net | |
parent | d0dba7255b541f1651a88e75ebdb20dd45509c2f (diff) |
netlink: add nla_policy_len()
It calculates the max. length of a Netlink policy, which is usefull
for allocating Netlink buffers roughly the size of the actual
message.
Signed-off-by: Holger Eitzenberger <holger@eitzenberger.org>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/netlink.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/net/netlink.h b/include/net/netlink.h index 8a6150a3f4c7..eddb50289d6d 100644 --- a/include/net/netlink.h +++ b/include/net/netlink.h | |||
@@ -230,6 +230,7 @@ extern int nla_validate(struct nlattr *head, int len, int maxtype, | |||
230 | extern int nla_parse(struct nlattr *tb[], int maxtype, | 230 | extern int nla_parse(struct nlattr *tb[], int maxtype, |
231 | struct nlattr *head, int len, | 231 | struct nlattr *head, int len, |
232 | const struct nla_policy *policy); | 232 | const struct nla_policy *policy); |
233 | extern int nla_policy_len(const struct nla_policy *, int); | ||
233 | extern struct nlattr * nla_find(struct nlattr *head, int len, int attrtype); | 234 | extern struct nlattr * nla_find(struct nlattr *head, int len, int attrtype); |
234 | extern size_t nla_strlcpy(char *dst, const struct nlattr *nla, | 235 | extern size_t nla_strlcpy(char *dst, const struct nlattr *nla, |
235 | size_t dstsize); | 236 | size_t dstsize); |