summaryrefslogtreecommitdiff
path: root/include/linux/netlink.h
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2012-02-24 18:30:15 +0400
committerDavid S. Miller <davem@davemloft.net>2012-02-26 23:10:06 +0400
commit80d326fab534a5380e8f6e509a0b9076655a9670 (patch)
tree57c636de934b3f8abb7db9bcde64360ecc4eaf66 /include/linux/netlink.h
parent48e316bc2e045206248c6c75c0d5bbc0c9ddc32c (diff)
downloadlinux-80d326fab534a5380e8f6e509a0b9076655a9670.tar.xz
netlink: add netlink_dump_control structure for netlink_dump_start()
Davem considers that the argument list of this interface is getting out of control. This patch tries to address this issue following his proposal: struct netlink_dump_control c = { .dump = dump, .done = done, ... }; netlink_dump_start(..., &c); Suggested by David S. Miller. 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.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/include/linux/netlink.h b/include/linux/netlink.h
index a390e9d54827..1f8c1a95f57c 100644
--- a/include/linux/netlink.h
+++ b/include/linux/netlink.h
@@ -248,11 +248,15 @@ __nlmsg_put(struct sk_buff *skb, u32 pid, u32 seq, int type, int len, int flags)
#define NLMSG_PUT(skb, pid, seq, type, len) \
NLMSG_NEW(skb, pid, seq, type, len, 0)
+struct netlink_dump_control {
+ int (*dump)(struct sk_buff *skb, struct netlink_callback *);
+ int (*done)(struct netlink_callback*);
+ u16 min_dump_alloc;
+};
+
extern int netlink_dump_start(struct sock *ssk, struct sk_buff *skb,
const struct nlmsghdr *nlh,
- int (*dump)(struct sk_buff *skb, struct netlink_callback*),
- int (*done)(struct netlink_callback*),
- u16 min_dump_alloc);
+ struct netlink_dump_control *control);
#define NL_NONROOT_RECV 0x1