mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
[NETLINK]: Introduce nlmsg_hdr() helper
For the common "(struct nlmsghdr *)skb->data" sequence, so that we reduce the number of direct accesses to skb->data and for consistency with all the other cast skb member helpers. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
965ffea43d
commit
b529ccf279
15 changed files with 23 additions and 18 deletions
|
@ -138,6 +138,11 @@ struct nlattr
|
|||
#include <linux/capability.h>
|
||||
#include <linux/skbuff.h>
|
||||
|
||||
static inline struct nlmsghdr *nlmsg_hdr(const struct sk_buff *skb)
|
||||
{
|
||||
return (struct nlmsghdr *)skb->data;
|
||||
}
|
||||
|
||||
struct netlink_skb_parms
|
||||
{
|
||||
struct ucred creds; /* Skb credentials */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue