diff options
Diffstat (limited to 'include/net/netlink.h')
-rw-r--r-- | include/net/netlink.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/net/netlink.h b/include/net/netlink.h index 30021339157c..fd75fd65d59e 100644 --- a/include/net/netlink.h +++ b/include/net/netlink.h | |||
@@ -829,6 +829,9 @@ static inline int nla_put_msecs(struct sk_buff *skb, int attrtype, | |||
829 | #define NLA_PUT_U16(skb, attrtype, value) \ | 829 | #define NLA_PUT_U16(skb, attrtype, value) \ |
830 | NLA_PUT_TYPE(skb, u16, attrtype, value) | 830 | NLA_PUT_TYPE(skb, u16, attrtype, value) |
831 | 831 | ||
832 | #define NLA_PUT_LE16(skb, attrtype, value) \ | ||
833 | NLA_PUT_TYPE(skb, __le16, attrtype, value) | ||
834 | |||
832 | #define NLA_PUT_U32(skb, attrtype, value) \ | 835 | #define NLA_PUT_U32(skb, attrtype, value) \ |
833 | NLA_PUT_TYPE(skb, u32, attrtype, value) | 836 | NLA_PUT_TYPE(skb, u32, attrtype, value) |
834 | 837 | ||
@@ -875,6 +878,15 @@ static inline u16 nla_get_u16(struct nlattr *nla) | |||
875 | } | 878 | } |
876 | 879 | ||
877 | /** | 880 | /** |
881 | * nla_get_le16 - return payload of __le16 attribute | ||
882 | * @nla: __le16 netlink attribute | ||
883 | */ | ||
884 | static inline __le16 nla_get_le16(struct nlattr *nla) | ||
885 | { | ||
886 | return *(__le16 *) nla_data(nla); | ||
887 | } | ||
888 | |||
889 | /** | ||
878 | * nla_get_u8 - return payload of u8 attribute | 890 | * nla_get_u8 - return payload of u8 attribute |
879 | * @nla: u8 netlink attribute | 891 | * @nla: u8 netlink attribute |
880 | */ | 892 | */ |