mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
netlink: add mmap'ed netlink helper functions
Add helper functions for looking up mmap'ed frame headers, reading and writing their status, allocating skbs with mmap'ed data areas and a poll function. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
ccdfcc3985
commit
9652e931e7
2 changed files with 190 additions and 2 deletions
|
@ -15,10 +15,17 @@ static inline struct nlmsghdr *nlmsg_hdr(const struct sk_buff *skb)
|
|||
return (struct nlmsghdr *)skb->data;
|
||||
}
|
||||
|
||||
enum netlink_skb_flags {
|
||||
NETLINK_SKB_MMAPED = 0x1, /* Packet data is mmaped */
|
||||
NETLINK_SKB_TX = 0x2, /* Packet was sent by userspace */
|
||||
NETLINK_SKB_DELIVERED = 0x4, /* Packet was delivered */
|
||||
};
|
||||
|
||||
struct netlink_skb_parms {
|
||||
struct scm_creds creds; /* Skb credentials */
|
||||
__u32 portid;
|
||||
__u32 dst_group;
|
||||
__u32 flags;
|
||||
struct sock *sk;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue