diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2012-02-24 09:30:16 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-02-26 14:10:44 -0500 |
commit | 7175c883071515f0d4c1cece2646203b8a5a7415 (patch) | |
tree | f9dfa5be72432611f63f659fbe07ef4fbd6052bd /include/linux/netlink.h | |
parent | 80d326fab534a5380e8f6e509a0b9076655a9670 (diff) |
netlink: allow to pass data pointer to netlink_dump_start() callback
This patch allows you to pass a data pointer that can be
accessed from the dump callback.
Netfilter is going to use this patch to provide filtered dumps
to user-space. This is specifically interesting in ctnetlink that
may handle lots of conntrack entries. We can save precious
cycles by skipping the conversion to TLV format of conntrack
entries that are not interesting for user-space.
More specifically, ctnetlink will include one operation to allow
to filter the dumping of conntrack entries by ctmark values.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/netlink.h')
-rw-r--r-- | include/linux/netlink.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/netlink.h b/include/linux/netlink.h index 1f8c1a95f57c..a2092f582a78 100644 --- a/include/linux/netlink.h +++ b/include/linux/netlink.h | |||
@@ -225,6 +225,7 @@ struct netlink_callback { | |||
225 | int (*dump)(struct sk_buff * skb, | 225 | int (*dump)(struct sk_buff * skb, |
226 | struct netlink_callback *cb); | 226 | struct netlink_callback *cb); |
227 | int (*done)(struct netlink_callback *cb); | 227 | int (*done)(struct netlink_callback *cb); |
228 | void *data; | ||
228 | u16 family; | 229 | u16 family; |
229 | u16 min_dump_alloc; | 230 | u16 min_dump_alloc; |
230 | unsigned int prev_seq, seq; | 231 | unsigned int prev_seq, seq; |
@@ -251,6 +252,7 @@ __nlmsg_put(struct sk_buff *skb, u32 pid, u32 seq, int type, int len, int flags) | |||
251 | struct netlink_dump_control { | 252 | struct netlink_dump_control { |
252 | int (*dump)(struct sk_buff *skb, struct netlink_callback *); | 253 | int (*dump)(struct sk_buff *skb, struct netlink_callback *); |
253 | int (*done)(struct netlink_callback*); | 254 | int (*done)(struct netlink_callback*); |
255 | void *data; | ||
254 | u16 min_dump_alloc; | 256 | u16 min_dump_alloc; |
255 | }; | 257 | }; |
256 | 258 | ||