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> |
93bb0ceb | 9 | #include <linux/seqlock.h> |
49ac8713 | 10 | |
80250707 | 11 | struct ctl_table_header; |
6058fa6b AD |
12 | struct nf_conntrack_ecache; |
13 | ||
2c352f44 G |
14 | struct nf_proto_net { |
15 | #ifdef CONFIG_SYSCTL | |
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; | |
21 | #endif | |
22 | #endif | |
23 | unsigned int users; | |
24 | }; | |
25 | ||
15f585bd G |
26 | struct nf_generic_net { |
27 | struct nf_proto_net pn; | |
28 | unsigned int timeout; | |
29 | }; | |
30 | ||
d2ba1fde G |
31 | struct nf_tcp_net { |
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; | |
37 | }; | |
38 | ||
0ce490ad G |
39 | enum udp_conntrack { |
40 | UDP_CT_UNREPLIED, | |
41 | UDP_CT_REPLIED, | |
42 | UDP_CT_MAX | |
43 | }; | |
44 | ||
45 | struct nf_udp_net { | |
46 | struct nf_proto_net pn; | |
47 | unsigned int timeouts[UDP_CT_MAX]; | |
48 | }; | |
49 | ||
4b626b9c G |
50 | struct nf_icmp_net { |
51 | struct nf_proto_net pn; | |
52 | unsigned int timeout; | |
53 | }; | |
54 | ||
524a53e5 | 55 | struct nf_ip_net { |
15f585bd | 56 | struct nf_generic_net generic; |
d2ba1fde | 57 | struct nf_tcp_net tcp; |
0ce490ad | 58 | struct nf_udp_net udp; |
4b626b9c | 59 | struct nf_icmp_net icmp; |
7080ba09 | 60 | struct nf_icmp_net icmpv6; |
524a53e5 G |
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; | |
64 | #endif | |
65 | }; | |
66 | ||
b7779d06 JDB |
67 | struct ct_pcpu { |
68 | spinlock_t lock; | |
69 | struct hlist_nulls_head unconfirmed; | |
70 | struct hlist_nulls_head dying; | |
b7779d06 JDB |
71 | }; |
72 | ||
dfdb8d79 | 73 | struct netns_ct { |
49ac8713 | 74 | atomic_t count; |
9b03f38d | 75 | unsigned int expect_count; |
9500507c FW |
76 | #ifdef CONFIG_NF_CONNTRACK_EVENTS |
77 | struct delayed_work ecache_dwork; | |
78 | bool ecache_dwork_pending; | |
79 | #endif | |
8cf4d6a2 JDB |
80 | #ifdef CONFIG_SYSCTL |
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; | |
86 | #endif | |
8cf4d6a2 | 87 | unsigned int sysctl_log_invalid; /* Log invalid packets */ |
8cf4d6a2 JDB |
88 | int sysctl_events; |
89 | int sysctl_acct; | |
90 | int sysctl_auto_assign_helper; | |
91 | bool auto_assign_helper_warned; | |
92 | int sysctl_tstamp; | |
93 | int sysctl_checksum; | |
94 | ||
b7779d06 | 95 | struct ct_pcpu __percpu *pcpu_lists; |
7d720c3e | 96 | struct ip_conntrack_stat __percpu *stat; |
70e9942f PNA |
97 | struct nf_ct_event_notifier __rcu *nf_conntrack_event_cb; |
98 | struct nf_exp_event_notifier __rcu *nf_expect_event_cb; | |
524a53e5 | 99 | struct nf_ip_net nf_ct_proto; |
c539f017 FW |
100 | #if defined(CONFIG_NF_CONNTRACK_LABELS) |
101 | unsigned int labels_used; | |
102 | u8 label_words; | |
103 | #endif | |
dfdb8d79 AD |
104 | }; |
105 | #endif |