path: root/iptables/nft-cache.h
diff options
authorPablo Neira Ayuso <>2020-07-23 14:15:53 +0200
committerPablo Neira Ayuso <>2020-07-27 16:01:58 +0200
commitcf3e9100eedce518e42dfb6933c7871d041a7d18 (patch)
treeea3ecb2e72d0079576a927f2f88b157b569288f4 /iptables/nft-cache.h
parent67bef1540ebdbd64f7d9dc65b76505d161536759 (diff)
iptables: replace libnftnl table list by linux list
This patch removes the libnftnl table list by linux list. This comes with an extra memory allocation to store the nft_table object. Probably, there is no need to cache the entire nftnl_table in the near future. Signed-off-by: Pablo Neira Ayuso <>
Diffstat (limited to 'iptables/nft-cache.h')
1 files changed, 9 insertions, 1 deletions
diff --git a/iptables/nft-cache.h b/iptables/nft-cache.h
index f4291180..aeab4bde 100644
--- a/iptables/nft-cache.h
+++ b/iptables/nft-cache.h
@@ -1,6 +1,8 @@
#ifndef _NFT_CACHE_H_
#define _NFT_CACHE_H_
+#include <libiptc/linux_list.h>
struct nft_handle;
struct nft_cmd;
@@ -17,6 +19,12 @@ struct nftnl_chain_list *
nft_chain_list_get(struct nft_handle *h, const char *table, const char *chain);
struct nftnl_set_list *
nft_set_list_get(struct nft_handle *h, const char *table, const char *set);
-struct nftnl_table_list *nftnl_table_list_get(struct nft_handle *h);
+struct list_head *nft_table_list_get(struct nft_handle *h);
+struct nft_table {
+ struct list_head list;
+ struct nftnl_table *nftnl;
#endif /* _NFT_CACHE_H_ */