conntrack.h 1.7 KB
Newer Older
1 2 3
#ifndef __NETNS_CONNTRACK_H
#define __NETNS_CONNTRACK_H

4
#include <linux/list.h>
5
#include <linux/list_nulls.h>
A
Arun Sharma 已提交
6
#include <linux/atomic.h>
7

8
struct ctl_table_header;
9 10
struct nf_conntrack_ecache;

11 12 13 14 15 16 17 18 19 20 21 22
struct nf_proto_net {
#ifdef CONFIG_SYSCTL
	struct ctl_table_header *ctl_table_header;
	struct ctl_table        *ctl_table;
#ifdef CONFIG_NF_CONNTRACK_PROC_COMPAT
	struct ctl_table_header *ctl_compat_header;
	struct ctl_table        *ctl_compat_table;
#endif
#endif
	unsigned int		users;
};

23 24 25 26 27
struct nf_generic_net {
	struct nf_proto_net pn;
	unsigned int timeout;
};

28
struct nf_ip_net {
29
	struct nf_generic_net   generic;
30 31 32 33 34 35
#if defined(CONFIG_SYSCTL) && defined(CONFIG_NF_CONNTRACK_PROC_COMPAT)
	struct ctl_table_header *ctl_table_header;
	struct ctl_table	*ctl_table;
#endif
};

36
struct netns_ct {
37
	atomic_t		count;
38
	unsigned int		expect_count;
39
	unsigned int		htable_size;
40
	struct kmem_cache	*nf_conntrack_cachep;
41
	struct hlist_nulls_head	*hash;
42
	struct hlist_head	*expect_hash;
43
	struct hlist_nulls_head	unconfirmed;
44
	struct hlist_nulls_head	dying;
45
	struct ip_conntrack_stat __percpu *stat;
46 47
	struct nf_ct_event_notifier __rcu *nf_conntrack_event_cb;
	struct nf_exp_event_notifier __rcu *nf_expect_event_cb;
48
	int			sysctl_events;
49
	unsigned int		sysctl_events_retry_timeout;
50
	int			sysctl_acct;
51
	int			sysctl_tstamp;
52
	int			sysctl_checksum;
53
	unsigned int		sysctl_log_invalid; /* Log invalid packets */
54 55
	int			sysctl_auto_assign_helper;
	bool			auto_assign_helper_warned;
56
	struct nf_ip_net	nf_ct_proto;
57 58
#ifdef CONFIG_SYSCTL
	struct ctl_table_header	*sysctl_header;
59
	struct ctl_table_header	*acct_sysctl_header;
60
	struct ctl_table_header	*tstamp_sysctl_header;
61
	struct ctl_table_header	*event_sysctl_header;
62
	struct ctl_table_header	*helper_sysctl_header;
63
#endif
64
	char			*slabname;
65 66
};
#endif