diff options
author | Phil Sutter <phil@nwl.cc> | 2020-07-29 14:33:33 +0200 |
---|---|---|
committer | Phil Sutter <phil@nwl.cc> | 2020-12-21 18:33:21 +0100 |
commit | 87cce1cc4e1edfa03e56a2f9c72ee3cb3485f52b (patch) | |
tree | fdb705dfbf4842246a8a15b1a4f0ab5c037782ce /iptables/nft-cache.h | |
parent | 9189d1898f2f6c10689e1147e97f3a382d272e41 (diff) |
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 <phil@nwl.cc>
Diffstat (limited to 'iptables/nft-cache.h')
-rw-r--r-- | iptables/nft-cache.h | 5 |
1 files changed, 3 insertions, 2 deletions
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 * |