#include <linux/module.h>
#include <linux/netfilter/nf_tables.h>
#include <net/netfilter/nf_nat.h>
#include <net/netfilter/nf_tables.h>
#include <net/netfilter/nf_tables_ipv4.h>
#include <net/netfilter/nf_tables_ipv6.h>
static unsigned int nft_nat_do_chain(void *priv, struct sk_buff *skb,
const struct nf_hook_state *state)
{ … }
#ifdef CONFIG_NF_TABLES_IPV4
static const struct nft_chain_type nft_chain_nat_ipv4 = …;
#endif
#ifdef CONFIG_NF_TABLES_IPV6
static const struct nft_chain_type nft_chain_nat_ipv6 = …;
#endif
#ifdef CONFIG_NF_TABLES_INET
static int nft_nat_inet_reg(struct net *net, const struct nf_hook_ops *ops)
{ … }
static void nft_nat_inet_unreg(struct net *net, const struct nf_hook_ops *ops)
{ … }
static const struct nft_chain_type nft_chain_nat_inet = …;
#endif
static int __init nft_chain_nat_init(void)
{ … }
static void __exit nft_chain_nat_exit(void)
{ … }
module_init(…) …;
module_exit(nft_chain_nat_exit);
MODULE_LICENSE(…) …;
MODULE_DESCRIPTION(…) …;
#ifdef CONFIG_NF_TABLES_IPV4
MODULE_ALIAS_NFT_CHAIN(…) …;
#endif
#ifdef CONFIG_NF_TABLES_IPV6
MODULE_ALIAS_NFT_CHAIN(…) …;
#endif
#ifdef CONFIG_NF_TABLES_INET
MODULE_ALIAS_NFT_CHAIN(…) …;
#endif