#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/skbuff.h>
#include <linux/udp.h>
#include <net/netfilter/nf_conntrack_helper.h>
#include <net/netfilter/nf_conntrack_expect.h>
#include <net/netfilter/nf_nat_helper.h>
#include <linux/netfilter/nf_conntrack_amanda.h>
#define NAT_HELPER_NAME …
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_ALIAS_NF_NAT_HELPER(…);
static struct nf_conntrack_nat_helper nat_helper_amanda = …;
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_amanda_fini(void)
{ … }
static int __init nf_nat_amanda_init(void)
{ … }
module_init(…) …;
module_exit(nf_nat_amanda_fini);