diff options
author | Thomas Graf <tgraf@suug.ch> | 2007-09-12 08:44:36 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-10-10 19:49:16 -0400 |
commit | 8f4c1f9b049df3be11090f1c2c4738700302acae (patch) | |
tree | 51271d32096e4419173072d120176b4428e52a11 /include/net/netlink.h | |
parent | 9d5010db7ecfd6ec00119d3b185c4c0cd3265167 (diff) |
[NETLINK]: Introduce nested and byteorder flag to netlink attribute
This change allows the generic attribute interface to be used within
the netfilter subsystem where this flag was initially introduced.
The byte-order flag is yet unused, it's intended use is to
allow automatic byte order convertions for all atomic types.
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.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/net/netlink.h b/include/net/netlink.h index d7b824be5422..695e613a207b 100644 --- a/include/net/netlink.h +++ b/include/net/netlink.h | |||
@@ -667,6 +667,15 @@ static inline int nla_padlen(int payload) | |||
667 | } | 667 | } |
668 | 668 | ||
669 | /** | 669 | /** |
670 | * nla_type - attribute type | ||
671 | * @nla: netlink attribute | ||
672 | */ | ||
673 | static inline int nla_type(const struct nlattr *nla) | ||
674 | { | ||
675 | return nla->nla_type & NLA_TYPE_MASK; | ||
676 | } | ||
677 | |||
678 | /** | ||
670 | * nla_data - head of payload | 679 | * nla_data - head of payload |
671 | * @nla: netlink attribute | 680 | * @nla: netlink attribute |
672 | */ | 681 | */ |