#include <linux/init.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/rculist.h>
#include <linux/rculist_nulls.h>
#include <linux/types.h>
#include <linux/timer.h>
#include <linux/security.h>
#include <linux/skbuff.h>
#include <linux/errno.h>
#include <linux/netlink.h>
#include <linux/spinlock.h>
#include <linux/interrupt.h>
#include <linux/slab.h>
#include <linux/netfilter.h>
#include <net/netlink.h>
#include <net/netns/generic.h>
#include <net/sock.h>
#include <net/netfilter/nf_conntrack.h>
#include <net/netfilter/nf_conntrack_core.h>
#include <net/netfilter/nf_conntrack_l4proto.h>
#include <net/netfilter/nf_conntrack_tuple.h>
#include <net/netfilter/nf_conntrack_timeout.h>
#include <linux/netfilter/nfnetlink.h>
#include <linux/netfilter/nfnetlink_cttimeout.h>
static unsigned int nfct_timeout_id __read_mostly;
struct ctnl_timeout { … };
struct nfct_timeout_pernet { … };
MODULE_LICENSE(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
static const struct nla_policy cttimeout_nla_policy[CTA_TIMEOUT_MAX+1] = …;
static struct nfct_timeout_pernet *nfct_timeout_pernet(struct net *net)
{ … }
static int
ctnl_timeout_parse_policy(void *timeout,
const struct nf_conntrack_l4proto *l4proto,
struct net *net, const struct nlattr *attr)
{ … }
static int cttimeout_new_timeout(struct sk_buff *skb,
const struct nfnl_info *info,
const struct nlattr * const cda[])
{ … }
static int
ctnl_timeout_fill_info(struct sk_buff *skb, u32 portid, u32 seq, u32 type,
int event, struct ctnl_timeout *timeout)
{ … }
static int
ctnl_timeout_dump(struct sk_buff *skb, struct netlink_callback *cb)
{ … }
static int cttimeout_get_timeout(struct sk_buff *skb,
const struct nfnl_info *info,
const struct nlattr * const cda[])
{ … }
static int ctnl_timeout_try_del(struct net *net, struct ctnl_timeout *timeout)
{ … }
static int cttimeout_del_timeout(struct sk_buff *skb,
const struct nfnl_info *info,
const struct nlattr * const cda[])
{ … }
static int cttimeout_default_set(struct sk_buff *skb,
const struct nfnl_info *info,
const struct nlattr * const cda[])
{ … }
static int
cttimeout_default_fill_info(struct net *net, struct sk_buff *skb, u32 portid,
u32 seq, u32 type, int event, u16 l3num,
const struct nf_conntrack_l4proto *l4proto,
const unsigned int *timeouts)
{ … }
static int cttimeout_default_get(struct sk_buff *skb,
const struct nfnl_info *info,
const struct nlattr * const cda[])
{ … }
static struct nf_ct_timeout *ctnl_timeout_find_get(struct net *net,
const char *name)
{ … }
static void ctnl_timeout_put(struct nf_ct_timeout *t)
{ … }
static const struct nfnl_callback cttimeout_cb[IPCTNL_MSG_TIMEOUT_MAX] = …;
static const struct nfnetlink_subsystem cttimeout_subsys = …;
MODULE_ALIAS_NFNL_SUBSYS(…);
static int __net_init cttimeout_net_init(struct net *net)
{ … }
static void __net_exit cttimeout_net_pre_exit(struct net *net)
{ … }
static void __net_exit cttimeout_net_exit(struct net *net)
{ … }
static struct pernet_operations cttimeout_ops = …;
static const struct nf_ct_timeout_hooks hooks = …;
static int __init cttimeout_init(void)
{ … }
static int untimeout(struct nf_conn *ct, void *timeout)
{ … }
static void __exit cttimeout_exit(void)
{ … }
module_init(…) …;
module_exit(cttimeout_exit);