From 4e8dff2cb4da818a937f8c0efa1a0d73b632297e Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Sat, 24 Jul 2021 12:07:27 +0200 Subject: 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 --- include/nftables/libnftables.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') 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); -- cgit v1.2.3