summaryrefslogtreecommitdiffstats
path: root/include/netlink.h
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2017-05-29 19:04:26 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2017-05-29 19:26:03 +0200
commit4cb962e4e447dd9ebd13177fca040dd1ff9b8632 (patch)
treeb212c19a8fa2441c3937d6d2422ed2c73ff80456 /include/netlink.h
parent73ee6f7f4d76c442fb7a3ba3087061b4eef604e3 (diff)
src: remove global nftnl_batch structure in mnl layer
The underlying mnl layer uses a global nftnl_batch structure. Instead, pass pointer as parameter to the functions that need this. The netlink layer stores a reference to this structure in struct netlink_ctx. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/netlink.h')
-rw-r--r--include/netlink.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/netlink.h b/include/netlink.h
index d3fb8c5d..81538fff 100644
--- a/include/netlink.h
+++ b/include/netlink.h
@@ -45,6 +45,7 @@ struct netlink_ctx {
struct set *set;
const void *data;
uint32_t seqnum;
+ struct nftnl_batch *batch;
bool batch_supported;
};
@@ -186,7 +187,7 @@ extern void netlink_dump_expr(const struct nftnl_expr *nle);
extern void netlink_dump_set(const struct nftnl_set *nls);
extern void netlink_dump_obj(struct nftnl_obj *nlo);
-extern int netlink_batch_send(struct list_head *err_list);
+extern int netlink_batch_send(struct netlink_ctx *ctx, struct list_head *err_list);
extern void netlink_genid_get(void);
extern void netlink_restart(void);