blob: 1f53038b0d1b64d3446cf4e41c70c0f678693a4d [file] [log] [blame]
Alexey Dobriyandfdb8d72008-10-08 11:35:02 +02001#ifndef __NETNS_CONNTRACK_H
2#define __NETNS_CONNTRACK_H
3
Alexey Dobriyan63c9a262008-10-08 11:35:04 +02004#include <linux/list.h>
Eric Dumazetea781f12009-03-25 21:05:46 +01005#include <linux/list_nulls.h>
Arun Sharma600634972011-07-26 16:09:06 -07006#include <linux/atomic.h>
Alexey Dobriyan49ac8712008-10-08 11:35:03 +02007
Alexey Dobriyan80250702008-10-08 11:35:08 +02008struct ctl_table_header;
Alexey Dobriyan6058fa62008-10-08 11:35:07 +02009struct nf_conntrack_ecache;
10
Gao feng2c352f42012-05-28 21:04:09 +000011struct nf_proto_net {
12#ifdef CONFIG_SYSCTL
13 struct ctl_table_header *ctl_table_header;
14 struct ctl_table *ctl_table;
15#ifdef CONFIG_NF_CONNTRACK_PROC_COMPAT
16 struct ctl_table_header *ctl_compat_header;
17 struct ctl_table *ctl_compat_table;
18#endif
19#endif
20 unsigned int users;
21};
22
Alexey Dobriyandfdb8d72008-10-08 11:35:02 +020023struct netns_ct {
Alexey Dobriyan49ac8712008-10-08 11:35:03 +020024 atomic_t count;
Alexey Dobriyan9b03f382008-10-08 11:35:03 +020025 unsigned int expect_count;
Patrick McHardyd696c7b2010-02-08 11:18:07 -080026 unsigned int htable_size;
Eric Dumazet5b3501f2010-02-08 11:16:56 -080027 struct kmem_cache *nf_conntrack_cachep;
Eric Dumazetea781f12009-03-25 21:05:46 +010028 struct hlist_nulls_head *hash;
Alexey Dobriyan9b03f382008-10-08 11:35:03 +020029 struct hlist_head *expect_hash;
Eric Dumazetea781f12009-03-25 21:05:46 +010030 struct hlist_nulls_head unconfirmed;
Pablo Neira Ayusodd7669a2009-06-13 12:30:52 +020031 struct hlist_nulls_head dying;
Tejun Heo7d720c32010-02-16 15:20:26 +000032 struct ip_conntrack_stat __percpu *stat;
Pablo Neira Ayuso70e99422011-11-22 00:16:51 +010033 struct nf_ct_event_notifier __rcu *nf_conntrack_event_cb;
34 struct nf_exp_event_notifier __rcu *nf_expect_event_cb;
Pablo Neira Ayusoa0891aa2009-06-13 12:26:29 +020035 int sysctl_events;
Pablo Neira Ayusodd7669a2009-06-13 12:30:52 +020036 unsigned int sysctl_events_retry_timeout;
Alexey Dobriyand716a4d2008-10-08 11:35:09 +020037 int sysctl_acct;
Pablo Neira Ayusoa992ca22011-01-19 16:00:07 +010038 int sysctl_tstamp;
Alexey Dobriyanc04d0552008-10-08 11:35:08 +020039 int sysctl_checksum;
Alexey Dobriyanc2a2c7e2008-10-08 11:35:08 +020040 unsigned int sysctl_log_invalid; /* Log invalid packets */
Eric Leblonda9006892012-04-18 11:20:41 +020041 int sysctl_auto_assign_helper;
42 bool auto_assign_helper_warned;
Alexey Dobriyan80250702008-10-08 11:35:08 +020043#ifdef CONFIG_SYSCTL
44 struct ctl_table_header *sysctl_header;
Alexey Dobriyand716a4d2008-10-08 11:35:09 +020045 struct ctl_table_header *acct_sysctl_header;
Pablo Neira Ayusoa992ca22011-01-19 16:00:07 +010046 struct ctl_table_header *tstamp_sysctl_header;
Pablo Neira Ayusoa0891aa2009-06-13 12:26:29 +020047 struct ctl_table_header *event_sysctl_header;
Eric Leblonda9006892012-04-18 11:20:41 +020048 struct ctl_table_header *helper_sysctl_header;
Alexey Dobriyan80250702008-10-08 11:35:08 +020049#endif
Eric Dumazet5b3501f2010-02-08 11:16:56 -080050 char *slabname;
Alexey Dobriyandfdb8d72008-10-08 11:35:02 +020051};
52#endif