1 #ifndef _NFT_CHAIN_H_ 2 #define _NFT_CHAIN_H_ 3 4 #include <libnftnl/chain.h> 5 #include <libiptc/linux_list.h> 6 7 struct nft_handle; 8 9 struct nft_chain { 10 struct list_head head; 11 struct hlist_node hnode; 12 struct nft_chain **base_slot; 13 struct nftnl_chain *nftnl; 14 }; 15 16 #define CHAIN_NAME_HSIZE 512 17 18 struct nft_chain_list { 19 struct list_head list; 20 struct hlist_head names[CHAIN_NAME_HSIZE]; 21 }; 22 23 struct nft_chain *nft_chain_alloc(struct nftnl_chain *nftnl); 24 void nft_chain_free(struct nft_chain *c); 25 26 struct nft_chain_list *nft_chain_list_alloc(void); 27 void nft_chain_list_free(struct nft_chain_list *list); 28 void nft_chain_list_del(struct nft_chain *c); 29 30 #endif /* _NFT_CHAIN_H_ */ 31