netlink: add a start callback for starting a netlink dump
The start callback allows the caller to set up a context for the dump callbacks. Presumably, the context can then be destroyed in the done callback. Signed-off-by: Tom Herbert <tom@herbertland.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
3502cad73c
commit
fc9e50f5a5
@@ -131,6 +131,7 @@ netlink_skb_clone(struct sk_buff *skb, gfp_t gfp_mask)
|
||||
struct netlink_callback {
|
||||
struct sk_buff *skb;
|
||||
const struct nlmsghdr *nlh;
|
||||
int (*start)(struct netlink_callback *);
|
||||
int (*dump)(struct sk_buff * skb,
|
||||
struct netlink_callback *cb);
|
||||
int (*done)(struct netlink_callback *cb);
|
||||
@@ -153,6 +154,7 @@ struct nlmsghdr *
|
||||
__nlmsg_put(struct sk_buff *skb, u32 portid, u32 seq, int type, int len, int flags);
|
||||
|
||||
struct netlink_dump_control {
|
||||
int (*start)(struct netlink_callback *);
|
||||
int (*dump)(struct sk_buff *skb, struct netlink_callback *);
|
||||
int (*done)(struct netlink_callback *);
|
||||
void *data;
|
||||
|
Reference in New Issue
Block a user