#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/in.h>
#include <net/netfilter/nf_conntrack.h>
#include <net/netfilter/nf_conntrack_helper.h>
#include <net/netfilter/nf_conntrack_expect.h>
#include <linux/netfilter/nf_conntrack_snmp.h>
#define SNMP_PORT …
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_ALIAS_NFCT_HELPER(…) …;
static unsigned int timeout __read_mostly = …;
module_param(timeout, uint, 0400);
MODULE_PARM_DESC(…) …;
int (*nf_nat_snmp_hook)(struct sk_buff *skb,
unsigned int protoff,
struct nf_conn *ct,
enum ip_conntrack_info ctinfo);
EXPORT_SYMBOL_GPL(…);
static int snmp_conntrack_help(struct sk_buff *skb, unsigned int protoff,
struct nf_conn *ct,
enum ip_conntrack_info ctinfo)
{ … }
static struct nf_conntrack_expect_policy exp_policy = …;
static struct nf_conntrack_helper helper __read_mostly = …;
static int __init nf_conntrack_snmp_init(void)
{ … }
static void __exit nf_conntrack_snmp_fini(void)
{ … }
module_init(…) …;
module_exit(nf_conntrack_snmp_fini);