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 #ifdef CONFIG_NF_CT_PROTO_DCCP
10 #include <linux/netfilter/nf_conntrack_dccp.h>
12 #ifdef CONFIG_NF_CT_PROTO_SCTP
13 #include <linux/netfilter/nf_conntrack_sctp.h>
15 #include <linux/seqlock.h>
17 struct ctl_table_header;
18 struct nf_conntrack_ecache;
22 struct ctl_table_header *ctl_table_header;
23 struct ctl_table *ctl_table;
28 struct nf_generic_net {
29 struct nf_proto_net pn;
34 struct nf_proto_net pn;
35 unsigned int timeouts[TCP_CONNTRACK_TIMEOUT_MAX];
36 unsigned int tcp_loose;
37 unsigned int tcp_be_liberal;
38 unsigned int tcp_max_retrans;
48 struct nf_proto_net pn;
49 unsigned int timeouts[UDP_CT_MAX];
53 struct nf_proto_net pn;
57 #ifdef CONFIG_NF_CT_PROTO_DCCP
59 struct nf_proto_net pn;
61 unsigned int dccp_timeout[CT_DCCP_MAX + 1];
65 #ifdef CONFIG_NF_CT_PROTO_SCTP
67 struct nf_proto_net pn;
68 unsigned int timeouts[SCTP_CONNTRACK_MAX];
72 #ifdef CONFIG_NF_CT_PROTO_UDPLITE
73 enum udplite_conntrack {
79 struct nf_udplite_net {
80 struct nf_proto_net pn;
81 unsigned int timeouts[UDPLITE_CT_MAX];
86 struct nf_generic_net generic;
87 struct nf_tcp_net tcp;
88 struct nf_udp_net udp;
89 struct nf_icmp_net icmp;
90 struct nf_icmp_net icmpv6;
91 #ifdef CONFIG_NF_CT_PROTO_DCCP
92 struct nf_dccp_net dccp;
94 #ifdef CONFIG_NF_CT_PROTO_SCTP
95 struct nf_sctp_net sctp;
97 #ifdef CONFIG_NF_CT_PROTO_UDPLITE
98 struct nf_udplite_net udplite;
104 struct hlist_nulls_head unconfirmed;
105 struct hlist_nulls_head dying;
110 unsigned int expect_count;
111 #ifdef CONFIG_NF_CONNTRACK_EVENTS
112 struct delayed_work ecache_dwork;
113 bool ecache_dwork_pending;
116 struct ctl_table_header *sysctl_header;
117 struct ctl_table_header *acct_sysctl_header;
118 struct ctl_table_header *tstamp_sysctl_header;
119 struct ctl_table_header *event_sysctl_header;
120 struct ctl_table_header *helper_sysctl_header;
122 unsigned int sysctl_log_invalid; /* Log invalid packets */
125 int sysctl_auto_assign_helper;
126 bool auto_assign_helper_warned;
130 struct ct_pcpu __percpu *pcpu_lists;
131 struct ip_conntrack_stat __percpu *stat;
132 struct nf_ct_event_notifier __rcu *nf_conntrack_event_cb;
133 struct nf_exp_event_notifier __rcu *nf_expect_event_cb;
134 struct nf_ip_net nf_ct_proto;
135 #if defined(CONFIG_NF_CONNTRACK_LABELS)
136 unsigned int labels_used;