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> |
d2ba1fde | 7 | #include <linux/netfilter/nf_conntrack_tcp.h> |
49ac8713 | 8 | |
80250707 | 9 | struct ctl_table_header; |
6058fa6b AD |
10 | struct nf_conntrack_ecache; |
11 | ||
2c352f44 G |
12 | struct nf_proto_net { |
13 | #ifdef CONFIG_SYSCTL | |
14 | struct ctl_table_header *ctl_table_header; | |
15 | struct ctl_table *ctl_table; | |
16 | #ifdef CONFIG_NF_CONNTRACK_PROC_COMPAT | |
17 | struct ctl_table_header *ctl_compat_header; | |
18 | struct ctl_table *ctl_compat_table; | |
19 | #endif | |
20 | #endif | |
21 | unsigned int users; | |
22 | }; | |
23 | ||
15f585bd G |
24 | struct nf_generic_net { |
25 | struct nf_proto_net pn; | |
26 | unsigned int timeout; | |
27 | }; | |
28 | ||
d2ba1fde G |
29 | struct nf_tcp_net { |
30 | struct nf_proto_net pn; | |
31 | unsigned int timeouts[TCP_CONNTRACK_TIMEOUT_MAX]; | |
32 | unsigned int tcp_loose; | |
33 | unsigned int tcp_be_liberal; | |
34 | unsigned int tcp_max_retrans; | |
35 | }; | |
36 | ||
0ce490ad G |
37 | enum udp_conntrack { |
38 | UDP_CT_UNREPLIED, | |
39 | UDP_CT_REPLIED, | |
40 | UDP_CT_MAX | |
41 | }; | |
42 | ||
43 | struct nf_udp_net { | |
44 | struct nf_proto_net pn; | |
45 | unsigned int timeouts[UDP_CT_MAX]; | |
46 | }; | |
47 | ||
4b626b9c G |
48 | struct nf_icmp_net { |
49 | struct nf_proto_net pn; | |
50 | unsigned int timeout; | |
51 | }; | |
52 | ||
524a53e5 | 53 | struct nf_ip_net { |
15f585bd | 54 | struct nf_generic_net generic; |
d2ba1fde | 55 | struct nf_tcp_net tcp; |
0ce490ad | 56 | struct nf_udp_net udp; |
4b626b9c | 57 | struct nf_icmp_net icmp; |
7080ba09 | 58 | struct nf_icmp_net icmpv6; |
524a53e5 G |
59 | #if defined(CONFIG_SYSCTL) && defined(CONFIG_NF_CONNTRACK_PROC_COMPAT) |
60 | struct ctl_table_header *ctl_table_header; | |
61 | struct ctl_table *ctl_table; | |
62 | #endif | |
63 | }; | |
64 | ||
dfdb8d79 | 65 | struct netns_ct { |
49ac8713 | 66 | atomic_t count; |
9b03f38d | 67 | unsigned int expect_count; |
d696c7bd | 68 | unsigned int htable_size; |
5b3501fa | 69 | struct kmem_cache *nf_conntrack_cachep; |
ea781f19 | 70 | struct hlist_nulls_head *hash; |
9b03f38d | 71 | struct hlist_head *expect_hash; |
ea781f19 | 72 | struct hlist_nulls_head unconfirmed; |
dd7669a9 | 73 | struct hlist_nulls_head dying; |
252b3e8c | 74 | struct hlist_nulls_head tmpl; |
7d720c3e | 75 | struct ip_conntrack_stat __percpu *stat; |
70e9942f PNA |
76 | struct nf_ct_event_notifier __rcu *nf_conntrack_event_cb; |
77 | struct nf_exp_event_notifier __rcu *nf_expect_event_cb; | |
a0891aa6 | 78 | int sysctl_events; |
dd7669a9 | 79 | unsigned int sysctl_events_retry_timeout; |
d716a4df | 80 | int sysctl_acct; |
a992ca2a | 81 | int sysctl_tstamp; |
c04d0552 | 82 | int sysctl_checksum; |
c2a2c7e0 | 83 | unsigned int sysctl_log_invalid; /* Log invalid packets */ |
a9006892 EL |
84 | int sysctl_auto_assign_helper; |
85 | bool auto_assign_helper_warned; | |
524a53e5 | 86 | struct nf_ip_net nf_ct_proto; |
c539f017 FW |
87 | #if defined(CONFIG_NF_CONNTRACK_LABELS) |
88 | unsigned int labels_used; | |
89 | u8 label_words; | |
90 | #endif | |
c7232c99 PM |
91 | #ifdef CONFIG_NF_NAT_NEEDED |
92 | struct hlist_head *nat_bysource; | |
93 | unsigned int nat_htable_size; | |
94 | #endif | |
80250707 AD |
95 | #ifdef CONFIG_SYSCTL |
96 | struct ctl_table_header *sysctl_header; | |
d716a4df | 97 | struct ctl_table_header *acct_sysctl_header; |
a992ca2a | 98 | struct ctl_table_header *tstamp_sysctl_header; |
a0891aa6 | 99 | struct ctl_table_header *event_sysctl_header; |
a9006892 | 100 | struct ctl_table_header *helper_sysctl_header; |
6058fa6b | 101 | #endif |
5b3501fa | 102 | char *slabname; |
dfdb8d79 AD |
103 | }; |
104 | #endif |