]>
Commit | Line | Data |
---|---|---|
dfdb8d79 AD |
1 | #ifndef __NETNS_CONNTRACK_H |
2 | #define __NETNS_CONNTRACK_H | |
3 | ||
63c9a262 | 4 | #include <linux/list.h> |
ea781f19 | 5 | #include <linux/list_nulls.h> |
60063497 | 6 | #include <linux/atomic.h> |
9500507c | 7 | #include <linux/workqueue.h> |
d2ba1fde | 8 | #include <linux/netfilter/nf_conntrack_tcp.h> |
c51d3901 DC |
9 | #ifdef CONFIG_NF_CT_PROTO_DCCP |
10 | #include <linux/netfilter/nf_conntrack_dccp.h> | |
11 | #endif | |
a85406af DC |
12 | #ifdef CONFIG_NF_CT_PROTO_SCTP |
13 | #include <linux/netfilter/nf_conntrack_sctp.h> | |
14 | #endif | |
93bb0ceb | 15 | #include <linux/seqlock.h> |
49ac8713 | 16 | |
80250707 | 17 | struct ctl_table_header; |
6058fa6b AD |
18 | struct nf_conntrack_ecache; |
19 | ||
2c352f44 G |
20 | struct nf_proto_net { |
21 | #ifdef CONFIG_SYSCTL | |
22 | struct ctl_table_header *ctl_table_header; | |
23 | struct ctl_table *ctl_table; | |
2c352f44 G |
24 | #endif |
25 | unsigned int users; | |
26 | }; | |
27 | ||
15f585bd G |
28 | struct nf_generic_net { |
29 | struct nf_proto_net pn; | |
30 | unsigned int timeout; | |
31 | }; | |
32 | ||
d2ba1fde G |
33 | struct nf_tcp_net { |
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; | |
39 | }; | |
40 | ||
0ce490ad G |
41 | enum udp_conntrack { |
42 | UDP_CT_UNREPLIED, | |
43 | UDP_CT_REPLIED, | |
44 | UDP_CT_MAX | |
45 | }; | |
46 | ||
47 | struct nf_udp_net { | |
48 | struct nf_proto_net pn; | |
49 | unsigned int timeouts[UDP_CT_MAX]; | |
50 | }; | |
51 | ||
4b626b9c G |
52 | struct nf_icmp_net { |
53 | struct nf_proto_net pn; | |
54 | unsigned int timeout; | |
55 | }; | |
56 | ||
c51d3901 DC |
57 | #ifdef CONFIG_NF_CT_PROTO_DCCP |
58 | struct nf_dccp_net { | |
59 | struct nf_proto_net pn; | |
60 | int dccp_loose; | |
61 | unsigned int dccp_timeout[CT_DCCP_MAX + 1]; | |
62 | }; | |
63 | #endif | |
64 | ||
a85406af DC |
65 | #ifdef CONFIG_NF_CT_PROTO_SCTP |
66 | struct nf_sctp_net { | |
67 | struct nf_proto_net pn; | |
68 | unsigned int timeouts[SCTP_CONNTRACK_MAX]; | |
69 | }; | |
70 | #endif | |
71 | ||
524a53e5 | 72 | struct nf_ip_net { |
15f585bd | 73 | struct nf_generic_net generic; |
d2ba1fde | 74 | struct nf_tcp_net tcp; |
0ce490ad | 75 | struct nf_udp_net udp; |
4b626b9c | 76 | struct nf_icmp_net icmp; |
7080ba09 | 77 | struct nf_icmp_net icmpv6; |
c51d3901 DC |
78 | #ifdef CONFIG_NF_CT_PROTO_DCCP |
79 | struct nf_dccp_net dccp; | |
80 | #endif | |
a85406af DC |
81 | #ifdef CONFIG_NF_CT_PROTO_SCTP |
82 | struct nf_sctp_net sctp; | |
83 | #endif | |
524a53e5 G |
84 | }; |
85 | ||
b7779d06 JDB |
86 | struct ct_pcpu { |
87 | spinlock_t lock; | |
88 | struct hlist_nulls_head unconfirmed; | |
89 | struct hlist_nulls_head dying; | |
b7779d06 JDB |
90 | }; |
91 | ||
dfdb8d79 | 92 | struct netns_ct { |
49ac8713 | 93 | atomic_t count; |
9b03f38d | 94 | unsigned int expect_count; |
9500507c FW |
95 | #ifdef CONFIG_NF_CONNTRACK_EVENTS |
96 | struct delayed_work ecache_dwork; | |
97 | bool ecache_dwork_pending; | |
98 | #endif | |
8cf4d6a2 JDB |
99 | #ifdef CONFIG_SYSCTL |
100 | struct ctl_table_header *sysctl_header; | |
101 | struct ctl_table_header *acct_sysctl_header; | |
102 | struct ctl_table_header *tstamp_sysctl_header; | |
103 | struct ctl_table_header *event_sysctl_header; | |
104 | struct ctl_table_header *helper_sysctl_header; | |
105 | #endif | |
8cf4d6a2 | 106 | unsigned int sysctl_log_invalid; /* Log invalid packets */ |
8cf4d6a2 JDB |
107 | int sysctl_events; |
108 | int sysctl_acct; | |
109 | int sysctl_auto_assign_helper; | |
110 | bool auto_assign_helper_warned; | |
111 | int sysctl_tstamp; | |
112 | int sysctl_checksum; | |
113 | ||
b7779d06 | 114 | struct ct_pcpu __percpu *pcpu_lists; |
7d720c3e | 115 | struct ip_conntrack_stat __percpu *stat; |
70e9942f PNA |
116 | struct nf_ct_event_notifier __rcu *nf_conntrack_event_cb; |
117 | struct nf_exp_event_notifier __rcu *nf_expect_event_cb; | |
524a53e5 | 118 | struct nf_ip_net nf_ct_proto; |
c539f017 FW |
119 | #if defined(CONFIG_NF_CONNTRACK_LABELS) |
120 | unsigned int labels_used; | |
c539f017 | 121 | #endif |
dfdb8d79 AD |
122 | }; |
123 | #endif |