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