]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/blob - include/net/netns/conntrack.h
netfilter: nf_ct_tcp: add namespace support
[mirror_ubuntu-hirsute-kernel.git] / include / net / netns / conntrack.h
1 #ifndef __NETNS_CONNTRACK_H
2 #define __NETNS_CONNTRACK_H
3
4 #include <linux/list.h>
5 #include <linux/list_nulls.h>
6 #include <linux/atomic.h>
7 #include <linux/netfilter/nf_conntrack_tcp.h>
8
9 struct ctl_table_header;
10 struct nf_conntrack_ecache;
11
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
24 struct nf_generic_net {
25 struct nf_proto_net pn;
26 unsigned int timeout;
27 };
28
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
37 struct nf_ip_net {
38 struct nf_generic_net generic;
39 struct nf_tcp_net tcp;
40 #if defined(CONFIG_SYSCTL) && defined(CONFIG_NF_CONNTRACK_PROC_COMPAT)
41 struct ctl_table_header *ctl_table_header;
42 struct ctl_table *ctl_table;
43 #endif
44 };
45
46 struct netns_ct {
47 atomic_t count;
48 unsigned int expect_count;
49 unsigned int htable_size;
50 struct kmem_cache *nf_conntrack_cachep;
51 struct hlist_nulls_head *hash;
52 struct hlist_head *expect_hash;
53 struct hlist_nulls_head unconfirmed;
54 struct hlist_nulls_head dying;
55 struct ip_conntrack_stat __percpu *stat;
56 struct nf_ct_event_notifier __rcu *nf_conntrack_event_cb;
57 struct nf_exp_event_notifier __rcu *nf_expect_event_cb;
58 int sysctl_events;
59 unsigned int sysctl_events_retry_timeout;
60 int sysctl_acct;
61 int sysctl_tstamp;
62 int sysctl_checksum;
63 unsigned int sysctl_log_invalid; /* Log invalid packets */
64 int sysctl_auto_assign_helper;
65 bool auto_assign_helper_warned;
66 struct nf_ip_net nf_ct_proto;
67 #ifdef CONFIG_SYSCTL
68 struct ctl_table_header *sysctl_header;
69 struct ctl_table_header *acct_sysctl_header;
70 struct ctl_table_header *tstamp_sysctl_header;
71 struct ctl_table_header *event_sysctl_header;
72 struct ctl_table_header *helper_sysctl_header;
73 #endif
74 char *slabname;
75 };
76 #endif