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; | |
2c352f44 G |
18 | #endif |
19 | unsigned int users; | |
20 | }; | |
21 | ||
15f585bd G |
22 | struct nf_generic_net { |
23 | struct nf_proto_net pn; | |
24 | unsigned int timeout; | |
25 | }; | |
26 | ||
d2ba1fde G |
27 | struct nf_tcp_net { |
28 | struct nf_proto_net pn; | |
29 | unsigned int timeouts[TCP_CONNTRACK_TIMEOUT_MAX]; | |
30 | unsigned int tcp_loose; | |
31 | unsigned int tcp_be_liberal; | |
32 | unsigned int tcp_max_retrans; | |
33 | }; | |
34 | ||
0ce490ad G |
35 | enum udp_conntrack { |
36 | UDP_CT_UNREPLIED, | |
37 | UDP_CT_REPLIED, | |
38 | UDP_CT_MAX | |
39 | }; | |
40 | ||
41 | struct nf_udp_net { | |
42 | struct nf_proto_net pn; | |
43 | unsigned int timeouts[UDP_CT_MAX]; | |
44 | }; | |
45 | ||
4b626b9c G |
46 | struct nf_icmp_net { |
47 | struct nf_proto_net pn; | |
48 | unsigned int timeout; | |
49 | }; | |
50 | ||
524a53e5 | 51 | struct nf_ip_net { |
15f585bd | 52 | struct nf_generic_net generic; |
d2ba1fde | 53 | struct nf_tcp_net tcp; |
0ce490ad | 54 | struct nf_udp_net udp; |
4b626b9c | 55 | struct nf_icmp_net icmp; |
7080ba09 | 56 | struct nf_icmp_net icmpv6; |
524a53e5 G |
57 | }; |
58 | ||
b7779d06 JDB |
59 | struct ct_pcpu { |
60 | spinlock_t lock; | |
61 | struct hlist_nulls_head unconfirmed; | |
62 | struct hlist_nulls_head dying; | |
b7779d06 JDB |
63 | }; |
64 | ||
dfdb8d79 | 65 | struct netns_ct { |
49ac8713 | 66 | atomic_t count; |
9b03f38d | 67 | unsigned int expect_count; |
9500507c FW |
68 | #ifdef CONFIG_NF_CONNTRACK_EVENTS |
69 | struct delayed_work ecache_dwork; | |
70 | bool ecache_dwork_pending; | |
71 | #endif | |
8cf4d6a2 JDB |
72 | #ifdef CONFIG_SYSCTL |
73 | struct ctl_table_header *sysctl_header; | |
74 | struct ctl_table_header *acct_sysctl_header; | |
75 | struct ctl_table_header *tstamp_sysctl_header; | |
76 | struct ctl_table_header *event_sysctl_header; | |
77 | struct ctl_table_header *helper_sysctl_header; | |
78 | #endif | |
8cf4d6a2 | 79 | unsigned int sysctl_log_invalid; /* Log invalid packets */ |
8cf4d6a2 JDB |
80 | int sysctl_events; |
81 | int sysctl_acct; | |
82 | int sysctl_auto_assign_helper; | |
83 | bool auto_assign_helper_warned; | |
84 | int sysctl_tstamp; | |
85 | int sysctl_checksum; | |
86 | ||
b7779d06 | 87 | struct ct_pcpu __percpu *pcpu_lists; |
7d720c3e | 88 | struct ip_conntrack_stat __percpu *stat; |
70e9942f PNA |
89 | struct nf_ct_event_notifier __rcu *nf_conntrack_event_cb; |
90 | struct nf_exp_event_notifier __rcu *nf_expect_event_cb; | |
524a53e5 | 91 | struct nf_ip_net nf_ct_proto; |
c539f017 FW |
92 | #if defined(CONFIG_NF_CONNTRACK_LABELS) |
93 | unsigned int labels_used; | |
94 | u8 label_words; | |
95 | #endif | |
dfdb8d79 AD |
96 | }; |
97 | #endif |