summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2021-07-24 12:07:27 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2021-07-24 13:55:58 +0200
commit4e8dff2cb4da818a937f8c0efa1a0d73b632297e (patch)
tree66dae88164660e7d151ef883d231aa613c580dbd /include
parentc89fbc25102d126aa957e8a99d9ceb6ceaaf0193 (diff)
src: expose nft_ctx_clear_vars as API
This function might be useful to recycle the existing nft_ctx to use it with different external variable definitions. Moreover, reset ctx->num_vars to zero. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include')
-rw-r--r--include/nftables/libnftables.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/nftables/libnftables.h b/include/nftables/libnftables.h
index aaf7388e..8e7151a3 100644
--- a/include/nftables/libnftables.h
+++ b/include/nftables/libnftables.h
@@ -79,6 +79,7 @@ int nft_ctx_add_include_path(struct nft_ctx *ctx, const char *path);
void nft_ctx_clear_include_paths(struct nft_ctx *ctx);
int nft_ctx_add_var(struct nft_ctx *ctx, const char *var);
+void nft_ctx_clear_vars(struct nft_ctx *ctx);
int nft_run_cmd_from_buffer(struct nft_ctx *nft, const char *buf);
int nft_run_cmd_from_filename(struct nft_ctx *nft, const char *filename);