diff options
author | David S. Miller <davem@davemloft.net> | 2012-04-01 20:14:27 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-04-02 04:33:42 -0400 |
commit | 24c410dce335dba6ad9f1abab833fa4cd32f7f7f (patch) | |
tree | f9630952c72247a359f3d338dc012716396bc3de /include/net/netlink.h | |
parent | a6574349d068cb393ae547ee556e682e5fdb2ff3 (diff) |
netlink: Add nla_put_le{16,32,64}() helpers.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/netlink.h')
-rw-r--r-- | include/net/netlink.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/include/net/netlink.h b/include/net/netlink.h index 73656aa8faaa..efbd2c1f4cde 100644 --- a/include/net/netlink.h +++ b/include/net/netlink.h | |||
@@ -794,6 +794,17 @@ static inline int nla_put_net16(struct sk_buff *skb, int attrtype, __be16 value) | |||
794 | } | 794 | } |
795 | 795 | ||
796 | /** | 796 | /** |
797 | * nla_put_le16 - Add a __le16 netlink attribute to a socket buffer | ||
798 | * @skb: socket buffer to add attribute to | ||
799 | * @attrtype: attribute type | ||
800 | * @value: numeric value | ||
801 | */ | ||
802 | static inline int nla_put_le16(struct sk_buff *skb, int attrtype, __le16 value) | ||
803 | { | ||
804 | return nla_put(skb, attrtype, sizeof(__le16), &value); | ||
805 | } | ||
806 | |||
807 | /** | ||
797 | * nla_put_u32 - Add a u32 netlink attribute to a socket buffer | 808 | * nla_put_u32 - Add a u32 netlink attribute to a socket buffer |
798 | * @skb: socket buffer to add attribute to | 809 | * @skb: socket buffer to add attribute to |
799 | * @attrtype: attribute type | 810 | * @attrtype: attribute type |
@@ -827,6 +838,17 @@ static inline int nla_put_net32(struct sk_buff *skb, int attrtype, __be32 value) | |||
827 | } | 838 | } |
828 | 839 | ||
829 | /** | 840 | /** |
841 | * nla_put_le32 - Add a __le32 netlink attribute to a socket buffer | ||
842 | * @skb: socket buffer to add attribute to | ||
843 | * @attrtype: attribute type | ||
844 | * @value: numeric value | ||
845 | */ | ||
846 | static inline int nla_put_le32(struct sk_buff *skb, int attrtype, __le32 value) | ||
847 | { | ||
848 | return nla_put(skb, attrtype, sizeof(__le32), &value); | ||
849 | } | ||
850 | |||
851 | /** | ||
830 | * nla_put_u64 - Add a u64 netlink attribute to a socket buffer | 852 | * nla_put_u64 - Add a u64 netlink attribute to a socket buffer |
831 | * @skb: socket buffer to add attribute to | 853 | * @skb: socket buffer to add attribute to |
832 | * @attrtype: attribute type | 854 | * @attrtype: attribute type |
@@ -860,6 +882,17 @@ static inline int nla_put_net64(struct sk_buff *skb, int attrtype, __be64 value) | |||
860 | } | 882 | } |
861 | 883 | ||
862 | /** | 884 | /** |
885 | * nla_put_le64 - Add a __le64 netlink attribute to a socket buffer | ||
886 | * @skb: socket buffer to add attribute to | ||
887 | * @attrtype: attribute type | ||
888 | * @value: numeric value | ||
889 | */ | ||
890 | static inline int nla_put_le64(struct sk_buff *skb, int attrtype, __le64 value) | ||
891 | { | ||
892 | return nla_put(skb, attrtype, sizeof(__le64), &value); | ||
893 | } | ||
894 | |||
895 | /** | ||
863 | * nla_put_string - Add a string netlink attribute to a socket buffer | 896 | * nla_put_string - Add a string netlink attribute to a socket buffer |
864 | * @skb: socket buffer to add attribute to | 897 | * @skb: socket buffer to add attribute to |
865 | * @attrtype: attribute type | 898 | * @attrtype: attribute type |