forked from rubenslte/android_kernel_samsung_msm8226
netlink: Add nla_put_be{16,32,64}() helpers.
Change-Id: I5be53c05582e77471fba08a58dbf1ea1871fd824 Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Kevin F. Haggerty <haggertk@lineageos.org>
This commit is contained in:
committed by
Francescodario Cuzzocrea
parent
4b5c8037f3
commit
a0380237c3
+34
-1
@@ -785,6 +785,17 @@ static inline int nla_put_u16(struct sk_buff *skb, int attrtype, u16 value)
|
||||
return nla_put(skb, attrtype, sizeof(u16), &value);
|
||||
}
|
||||
|
||||
/**
|
||||
* nla_put_be16 - Add a __be16 netlink attribute to a socket buffer
|
||||
* @skb: socket buffer to add attribute to
|
||||
* @attrtype: attribute type
|
||||
* @value: numeric value
|
||||
*/
|
||||
static inline int nla_put_be16(struct sk_buff *skb, int attrtype, __be16 value)
|
||||
{
|
||||
return nla_put(skb, attrtype, sizeof(__be16), &value);
|
||||
}
|
||||
|
||||
/**
|
||||
* nla_put_u32 - Add a u32 netlink attribute to a socket buffer
|
||||
* @skb: socket buffer to add attribute to
|
||||
@@ -797,7 +808,18 @@ static inline int nla_put_u32(struct sk_buff *skb, int attrtype, u32 value)
|
||||
}
|
||||
|
||||
/**
|
||||
* nla_put_64 - Add a u64 netlink attribute to a socket buffer
|
||||
* nla_put_be32 - Add a __be32 netlink attribute to a socket buffer
|
||||
* @skb: socket buffer to add attribute to
|
||||
* @attrtype: attribute type
|
||||
* @value: numeric value
|
||||
*/
|
||||
static inline int nla_put_be32(struct sk_buff *skb, int attrtype, __be32 value)
|
||||
{
|
||||
return nla_put(skb, attrtype, sizeof(__be32), &value);
|
||||
}
|
||||
|
||||
/**
|
||||
* nla_put_u64 - Add a u64 netlink attribute to a socket buffer
|
||||
* @skb: socket buffer to add attribute to
|
||||
* @attrtype: attribute type
|
||||
* @value: numeric value
|
||||
@@ -851,6 +873,17 @@ static inline int nla_put_s64(struct sk_buff *skb, int attrtype, s64 value)
|
||||
return nla_put(skb, attrtype, sizeof(s64), &value);
|
||||
}
|
||||
|
||||
/**
|
||||
* nla_put_be64 - Add a __be64 netlink attribute to a socket buffer
|
||||
* @skb: socket buffer to add attribute to
|
||||
* @attrtype: attribute type
|
||||
* @value: numeric value
|
||||
*/
|
||||
static inline int nla_put_be64(struct sk_buff *skb, int attrtype, __be64 value)
|
||||
{
|
||||
return nla_put(skb, attrtype, sizeof(__be64), &value);
|
||||
}
|
||||
|
||||
/**
|
||||
* nla_put_string - Add a string netlink attribute to a socket buffer
|
||||
* @skb: socket buffer to add attribute to
|
||||
|
||||
Reference in New Issue
Block a user