path: root/iptables/nft-cache.h
diff options
authorPhil Sutter <>2020-07-10 21:37:38 +0200
committerPhil Sutter <>2020-12-21 18:33:21 +0100
commite8d48d7b41ec09eb67f69a2bed04628870ec85c3 (patch)
treee008ac6439da40555b3c749a8108b495efa0a5f8 /iptables/nft-cache.h
parent694612adf87fb614f16a2b678f32745d5c9d7876 (diff)
nft: cache: Introduce nft_cache_add_chain()
This is a convenience function for adding a chain to cache, for now just a simple wrapper around nftnl_chain_list_add_tail(). Signed-off-by: Phil Sutter <>
Diffstat (limited to 'iptables/nft-cache.h')
1 files changed, 3 insertions, 0 deletions
diff --git a/iptables/nft-cache.h b/iptables/nft-cache.h
index 76f9fbb6..d97f8de2 100644
--- a/iptables/nft-cache.h
+++ b/iptables/nft-cache.h
@@ -3,6 +3,7 @@
struct nft_handle;
struct nft_cmd;
+struct builtin_table;
void nft_cache_level_set(struct nft_handle *h, int level,
const struct nft_cmd *cmd);
@@ -12,6 +13,8 @@ void flush_chain_cache(struct nft_handle *h, const char *tablename);
int flush_rule_cache(struct nft_handle *h, const char *table,
struct nftnl_chain *c);
void nft_cache_build(struct nft_handle *h);
+int nft_cache_add_chain(struct nft_handle *h, const struct builtin_table *t,
+ struct nftnl_chain *c);
struct nftnl_chain_list *
nft_chain_list_get(struct nft_handle *h, const char *table, const char *chain);