xref: /aosp_15_r20/external/iptables/iptables/nft-cache.h (revision a71a954618bbadd4a345637e5edcf36eec826889)
1 #ifndef _NFT_CACHE_H_
2 #define _NFT_CACHE_H_
3 
4 #include <libnftnl/chain.h>
5 
6 struct nft_handle;
7 struct nft_chain;
8 struct nft_cmd;
9 struct builtin_table;
10 
11 void nft_cache_level_set(struct nft_handle *h, int level,
12 			 const struct nft_cmd *cmd);
13 void nft_rebuild_cache(struct nft_handle *h);
14 void nft_release_cache(struct nft_handle *h);
15 void flush_chain_cache(struct nft_handle *h, const char *tablename);
16 int flush_rule_cache(struct nft_handle *h, const char *table,
17 		     struct nft_chain *c);
18 void nft_cache_build(struct nft_handle *h);
19 int nft_cache_add_chain(struct nft_handle *h, const struct builtin_table *t,
20 			struct nftnl_chain *c);
21 int nft_cache_sort_chains(struct nft_handle *h, const char *table);
22 
23 struct nft_chain *
24 nft_chain_find(struct nft_handle *h, const char *table, const char *chain);
25 
26 struct nftnl_set_list *
27 nft_set_list_get(struct nft_handle *h, const char *table, const char *set);
28 
29 #endif /* _NFT_CACHE_H_ */
30