Commit 838965ba authored by Patrick McHardy's avatar Patrick McHardy Committed by David S. Miller

[NETLINK]: Add NLA_PUT_BE16/nla_get_be16()

Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c7212e9d
...@@ -881,6 +881,9 @@ static inline int nla_put_msecs(struct sk_buff *skb, int attrtype, ...@@ -881,6 +881,9 @@ static inline int nla_put_msecs(struct sk_buff *skb, int attrtype,
#define NLA_PUT_LE16(skb, attrtype, value) \ #define NLA_PUT_LE16(skb, attrtype, value) \
NLA_PUT_TYPE(skb, __le16, attrtype, value) NLA_PUT_TYPE(skb, __le16, attrtype, value)
#define NLA_PUT_BE16(skb, attrtype, value) \
NLA_PUT_TYPE(skb, __be16, attrtype, value)
#define NLA_PUT_U32(skb, attrtype, value) \ #define NLA_PUT_U32(skb, attrtype, value) \
NLA_PUT_TYPE(skb, u32, attrtype, value) NLA_PUT_TYPE(skb, u32, attrtype, value)
...@@ -926,6 +929,15 @@ static inline u16 nla_get_u16(struct nlattr *nla) ...@@ -926,6 +929,15 @@ static inline u16 nla_get_u16(struct nlattr *nla)
return *(u16 *) nla_data(nla); return *(u16 *) nla_data(nla);
} }
/**
* nla_get_be16 - return payload of __be16 attribute
* @nla: __be16 netlink attribute
*/
static inline __be16 nla_get_be16(struct nlattr *nla)
{
return *(__be16 *) nla_data(nla);
}
/** /**
* nla_get_le16 - return payload of __le16 attribute * nla_get_le16 - return payload of __le16 attribute
* @nla: __le16 netlink attribute * @nla: __le16 netlink attribute
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment