From 2a3f699d99898c50c51987f8fb64cd5b11ad0dd6 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Mon, 23 Oct 2017 17:33:17 +0200 Subject: libnftables: Introduce nft_ctx_flush_cache() This allows an application to explicitly flush caches associated with a given nft context, as seen in cli_complete(). Note that this is a bit inconsistent in that it releases the global interface cache, but nft_ctx_free() does the same so at least it's not a regression. Note that there is no need for explicit cache update routine since cache is populated during command execution depending on whether it is needed or not. Signed-off-by: Phil Sutter Signed-off-by: Pablo Neira Ayuso --- include/nftables/nftables.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/nftables/nftables.h b/include/nftables/nftables.h index 44d3e95d..1207f10c 100644 --- a/include/nftables/nftables.h +++ b/include/nftables/nftables.h @@ -51,6 +51,7 @@ enum nftables_exit_codes { struct nft_ctx *nft_ctx_new(uint32_t flags); void nft_ctx_free(struct nft_ctx *ctx); FILE *nft_ctx_set_output(struct nft_ctx *ctx, FILE *fp); +void nft_ctx_flush_cache(struct nft_ctx *ctx); int nft_run_cmd_from_buffer(struct nft_ctx *nft, char *buf, size_t buflen); int nft_run_cmd_from_filename(struct nft_ctx *nft, const char *filename); -- cgit v1.2.3