diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2021-06-21 14:27:29 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2021-06-21 14:27:29 +0000 |
commit | 534e6f9339b644ffac02190dd32257bb190e3356 (patch) | |
tree | d3b12fcc78b5ad0e8e25c7e3f068be047b461d91 /iptables/nft-chain.h | |
parent | 735bd681a5ee12a17c67917603467acaf4a58f33 (diff) | |
parent | fae46950c0c0818cac1b37a7042b86fb03a75511 (diff) | |
download | iptables-534e6f9339b644ffac02190dd32257bb190e3356.tar.gz |
Snap for 7478028 from fae46950c0c0818cac1b37a7042b86fb03a75511 to mainline-adbd-releaseandroid-mainline-12.0.0_r97android-mainline-12.0.0_r85android-mainline-12.0.0_r68android-mainline-12.0.0_r41android-mainline-12.0.0_r21android-mainline-12.0.0_r1android12-mainline-adbd-release
Change-Id: I9fc6994d9e9199c968ae3ec824b9d8e629c16169
Diffstat (limited to 'iptables/nft-chain.h')
-rw-r--r-- | iptables/nft-chain.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/iptables/nft-chain.h b/iptables/nft-chain.h new file mode 100644 index 00000000..137f4b7f --- /dev/null +++ b/iptables/nft-chain.h @@ -0,0 +1,29 @@ +#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 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_ */ |