From 87cce1cc4e1edfa03e56a2f9c72ee3cb3485f52b Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Wed, 29 Jul 2020 14:33:33 +0200 Subject: nft: Introduce struct nft_chain Preparing for ordered output of user-defined chains, introduce a local datatype wrapping nftnl_chain. In order to maintain the chain name hash table, introduce nft_chain_list as well and use it instead of nftnl_chain_list. Signed-off-by: Phil Sutter --- iptables/nft-cache.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'iptables/nft-cache.h') diff --git a/iptables/nft-cache.h b/iptables/nft-cache.h index 085594c2..20d96bee 100644 --- a/iptables/nft-cache.h +++ b/iptables/nft-cache.h @@ -2,6 +2,7 @@ #define _NFT_CACHE_H_ struct nft_handle; +struct nft_chain; struct nft_cmd; struct builtin_table; @@ -11,12 +12,12 @@ void nft_rebuild_cache(struct nft_handle *h); void nft_release_cache(struct nft_handle *h); 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); + struct nft_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 * +struct nft_chain * nft_chain_find(struct nft_handle *h, const char *table, const char *chain); struct nftnl_set_list * -- cgit v1.2.3