#define pr_fmt(fmt) …
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/tcp.h>
#include <linux/kernel.h>
#include <net/netfilter/nf_nat.h>
#include <net/netfilter/nf_nat_helper.h>
#include <net/netfilter/nf_conntrack_helper.h>
#include <net/netfilter/nf_conntrack_expect.h>
#include <linux/netfilter/nf_conntrack_irc.h>
#define NAT_HELPER_NAME …
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_ALIAS_NF_NAT_HELPER(…);
static struct nf_conntrack_nat_helper nat_helper_irc = …;
static unsigned int help(struct sk_buff *skb,
enum ip_conntrack_info ctinfo,
unsigned int protoff,
unsigned int matchoff,
unsigned int matchlen,
struct nf_conntrack_expect *exp)
{ … }
static void __exit nf_nat_irc_fini(void)
{ … }
static int __init nf_nat_irc_init(void)
{ … }
static int warn_set(const char *val, const struct kernel_param *kp)
{ … }
module_param_call(…);
module_init(…) …;
module_exit(nf_nat_irc_fini);