• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 nftnl_chain	*nftnl;
13 };
14 
15 #define CHAIN_NAME_HSIZE	512
16 
17 struct nft_chain_list {
18 	struct list_head	list;
19 	struct hlist_head	names[CHAIN_NAME_HSIZE];
20 };
21 
22 struct nft_chain *nft_chain_alloc(struct nftnl_chain *nftnl);
23 void nft_chain_free(struct nft_chain *c);
24 
25 struct nft_chain_list *nft_chain_list_alloc(void);
26 void nft_chain_list_free(struct nft_chain_list *list);
27 void nft_chain_list_del(struct nft_chain *c);
28 
29 #endif /* _NFT_CHAIN_H_ */
30