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