1 #ifndef __NETNS_CONNTRACK_H
2 #define __NETNS_CONNTRACK_H
4 #include <linux/list.h>
5 #include <linux/list_nulls.h>
6 #include <linux/atomic.h>
7 #include <linux/workqueue.h>
8 #include <linux/netfilter/nf_conntrack_tcp.h>
9 #include <linux/seqlock.h>
11 struct ctl_table_header;
12 struct nf_conntrack_ecache;
16 struct ctl_table_header *ctl_table_header;
17 struct ctl_table *ctl_table;
18 #ifdef CONFIG_NF_CONNTRACK_PROC_COMPAT
19 struct ctl_table_header *ctl_compat_header;
20 struct ctl_table *ctl_compat_table;
26 struct nf_generic_net {
27 struct nf_proto_net pn;
32 struct nf_proto_net pn;
33 unsigned int timeouts[TCP_CONNTRACK_TIMEOUT_MAX];
34 unsigned int tcp_loose;
35 unsigned int tcp_be_liberal;
36 unsigned int tcp_max_retrans;
46 struct nf_proto_net pn;
47 unsigned int timeouts[UDP_CT_MAX];
51 struct nf_proto_net pn;
56 struct nf_generic_net generic;
57 struct nf_tcp_net tcp;
58 struct nf_udp_net udp;
59 struct nf_icmp_net icmp;
60 struct nf_icmp_net icmpv6;
61 #if defined(CONFIG_SYSCTL) && defined(CONFIG_NF_CONNTRACK_PROC_COMPAT)
62 struct ctl_table_header *ctl_table_header;
63 struct ctl_table *ctl_table;
69 struct hlist_nulls_head unconfirmed;
70 struct hlist_nulls_head dying;
75 unsigned int expect_count;
76 #ifdef CONFIG_NF_CONNTRACK_EVENTS
77 struct delayed_work ecache_dwork;
78 bool ecache_dwork_pending;
81 struct ctl_table_header *sysctl_header;
82 struct ctl_table_header *acct_sysctl_header;
83 struct ctl_table_header *tstamp_sysctl_header;
84 struct ctl_table_header *event_sysctl_header;
85 struct ctl_table_header *helper_sysctl_header;
88 unsigned int sysctl_log_invalid; /* Log invalid packets */
91 int sysctl_auto_assign_helper;
92 bool auto_assign_helper_warned;
96 unsigned int htable_size;
97 seqcount_t generation;
98 struct kmem_cache *nf_conntrack_cachep;
99 struct hlist_nulls_head *hash;
100 struct hlist_head *expect_hash;
101 struct ct_pcpu __percpu *pcpu_lists;
102 struct ip_conntrack_stat __percpu *stat;
103 struct nf_ct_event_notifier __rcu *nf_conntrack_event_cb;
104 struct nf_exp_event_notifier __rcu *nf_expect_event_cb;
105 struct nf_ip_net nf_ct_proto;
106 #if defined(CONFIG_NF_CONNTRACK_LABELS)
107 unsigned int labels_used;
110 #ifdef CONFIG_NF_NAT_NEEDED
111 struct hlist_head *nat_bysource;
112 unsigned int nat_htable_size;