diff options
Diffstat (limited to 'net/netlink/af_netlink.h')
-rw-r--r-- | net/netlink/af_netlink.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/net/netlink/af_netlink.h b/net/netlink/af_netlink.h index d9acb2a1d855..ed8522265f4e 100644 --- a/net/netlink/af_netlink.h +++ b/net/netlink/af_netlink.h | |||
@@ -6,6 +6,20 @@ | |||
6 | #define NLGRPSZ(x) (ALIGN(x, sizeof(unsigned long) * 8) / 8) | 6 | #define NLGRPSZ(x) (ALIGN(x, sizeof(unsigned long) * 8) / 8) |
7 | #define NLGRPLONGS(x) (NLGRPSZ(x)/sizeof(unsigned long)) | 7 | #define NLGRPLONGS(x) (NLGRPSZ(x)/sizeof(unsigned long)) |
8 | 8 | ||
9 | struct netlink_ring { | ||
10 | void **pg_vec; | ||
11 | unsigned int head; | ||
12 | unsigned int frames_per_block; | ||
13 | unsigned int frame_size; | ||
14 | unsigned int frame_max; | ||
15 | |||
16 | unsigned int pg_vec_order; | ||
17 | unsigned int pg_vec_pages; | ||
18 | unsigned int pg_vec_len; | ||
19 | |||
20 | atomic_t pending; | ||
21 | }; | ||
22 | |||
9 | struct netlink_sock { | 23 | struct netlink_sock { |
10 | /* struct sock has to be the first member of netlink_sock */ | 24 | /* struct sock has to be the first member of netlink_sock */ |
11 | struct sock sk; | 25 | struct sock sk; |
@@ -24,6 +38,12 @@ struct netlink_sock { | |||
24 | void (*netlink_rcv)(struct sk_buff *skb); | 38 | void (*netlink_rcv)(struct sk_buff *skb); |
25 | void (*netlink_bind)(int group); | 39 | void (*netlink_bind)(int group); |
26 | struct module *module; | 40 | struct module *module; |
41 | #ifdef CONFIG_NETLINK_MMAP | ||
42 | struct mutex pg_vec_lock; | ||
43 | struct netlink_ring rx_ring; | ||
44 | struct netlink_ring tx_ring; | ||
45 | atomic_t mapped; | ||
46 | #endif /* CONFIG_NETLINK_MMAP */ | ||
27 | }; | 47 | }; |
28 | 48 | ||
29 | static inline struct netlink_sock *nlk_sk(struct sock *sk) | 49 | static inline struct netlink_sock *nlk_sk(struct sock *sk) |