aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/netlink.h
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2007-12-18 01:29:26 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 17:58:53 -0500
commit838965ba22066c7fcdbacfc543c387d0eb76c14c (patch)
tree6b3f6a6f60bc1797fee5873ee108a0595d5052bb /include/net/netlink.h
parentc7212e9d3938258abe3fd17d15bb0d5c1856b8df (diff)
[NETLINK]: Add NLA_PUT_BE16/nla_get_be16()
Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/netlink.h')
-rw-r--r--include/net/netlink.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/net/netlink.h b/include/net/netlink.h
index db4b935b6c7..a52d0360175 100644
--- a/include/net/netlink.h
+++ b/include/net/netlink.h
@@ -881,6 +881,9 @@ static inline int nla_put_msecs(struct sk_buff *skb, int attrtype,
881#define NLA_PUT_LE16(skb, attrtype, value) \ 881#define NLA_PUT_LE16(skb, attrtype, value) \
882 NLA_PUT_TYPE(skb, __le16, attrtype, value) 882 NLA_PUT_TYPE(skb, __le16, attrtype, value)
883 883
884#define NLA_PUT_BE16(skb, attrtype, value) \
885 NLA_PUT_TYPE(skb, __be16, attrtype, value)
886
884#define NLA_PUT_U32(skb, attrtype, value) \ 887#define NLA_PUT_U32(skb, attrtype, value) \
885 NLA_PUT_TYPE(skb, u32, attrtype, value) 888 NLA_PUT_TYPE(skb, u32, attrtype, value)
886 889
@@ -927,6 +930,15 @@ static inline u16 nla_get_u16(struct nlattr *nla)
927} 930}
928 931
929/** 932/**
933 * nla_get_be16 - return payload of __be16 attribute
934 * @nla: __be16 netlink attribute
935 */
936static inline __be16 nla_get_be16(struct nlattr *nla)
937{
938 return *(__be16 *) nla_data(nla);
939}
940
941/**
930 * nla_get_le16 - return payload of __le16 attribute 942 * nla_get_le16 - return payload of __le16 attribute
931 * @nla: __le16 netlink attribute 943 * @nla: __le16 netlink attribute
932 */ 944 */