summaryrefslogtreecommitdiffstats
path: root/include/net/netlink.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2007-03-23 19:37:48 +0100
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-26 07:28:05 +0200
commitd30045a0bcf144753869175dd9d840f7ceaf4aba (patch)
treea5f5b5f7073fbd733a7c5ac877161018f43cf1fc /include/net/netlink.h
parent[SCTP]: Implement SCTP_MAX_BURST socket option. (diff)
downloadlinux-d30045a0bcf144753869175dd9d840f7ceaf4aba.tar.xz
linux-d30045a0bcf144753869175dd9d840f7ceaf4aba.zip
[NETLINK]: introduce NLA_BINARY type
This patch introduces a new NLA_BINARY attribute policy type with the verification of simply checking the maximum length of the payload. It also fixes a small typo in the example. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/netlink.h')
-rw-r--r--include/net/netlink.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/net/netlink.h b/include/net/netlink.h
index 1c11518fc822..2e4c90a98a7f 100644
--- a/include/net/netlink.h
+++ b/include/net/netlink.h
@@ -171,6 +171,7 @@ enum {
NLA_MSECS,
NLA_NESTED,
NLA_NUL_STRING,
+ NLA_BINARY,
__NLA_TYPE_MAX,
};
@@ -188,12 +189,13 @@ enum {
* NLA_STRING Maximum length of string
* NLA_NUL_STRING Maximum length of string (excluding NUL)
* NLA_FLAG Unused
+ * NLA_BINARY Maximum length of attribute payload
* All other Exact length of attribute payload
*
* Example:
* static struct nla_policy my_policy[ATTR_MAX+1] __read_mostly = {
* [ATTR_FOO] = { .type = NLA_U16 },
- * [ATTR_BAR] = { .type = NLA_STRING, len = BARSIZ },
+ * [ATTR_BAR] = { .type = NLA_STRING, .len = BARSIZ },
* [ATTR_BAZ] = { .len = sizeof(struct mystruct) },
* };
*/