2008-10-08 17:35:02 +08:00
|
|
|
#ifndef __NETNS_CONNTRACK_H
|
|
|
|
#define __NETNS_CONNTRACK_H
|
|
|
|
|
2008-10-08 17:35:04 +08:00
|
|
|
#include <linux/list.h>
|
2009-03-26 04:05:46 +08:00
|
|
|
#include <linux/list_nulls.h>
|
2011-07-27 07:09:06 +08:00
|
|
|
#include <linux/atomic.h>
|
2012-05-29 05:04:12 +08:00
|
|
|
#include <linux/netfilter/nf_conntrack_tcp.h>
|
2014-03-03 21:46:13 +08:00
|
|
|
#include <linux/seqlock.h>
|
2008-10-08 17:35:03 +08:00
|
|
|
|
2008-10-08 17:35:08 +08:00
|
|
|
struct ctl_table_header;
|
2008-10-08 17:35:07 +08:00
|
|
|
struct nf_conntrack_ecache;
|
|
|
|
|
2012-05-29 05:04:09 +08:00
|
|
|
struct nf_proto_net {
|
|
|
|
#ifdef CONFIG_SYSCTL
|
|
|
|
struct ctl_table_header *ctl_table_header;
|
|
|
|
struct ctl_table *ctl_table;
|
|
|
|
#ifdef CONFIG_NF_CONNTRACK_PROC_COMPAT
|
|
|
|
struct ctl_table_header *ctl_compat_header;
|
|
|
|
struct ctl_table *ctl_compat_table;
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
unsigned int users;
|
|
|
|
};
|
|
|
|
|
2012-05-29 05:04:11 +08:00
|
|
|
struct nf_generic_net {
|
|
|
|
struct nf_proto_net pn;
|
|
|
|
unsigned int timeout;
|
|
|
|
};
|
|
|
|
|
2012-05-29 05:04:12 +08:00
|
|
|
struct nf_tcp_net {
|
|
|
|
struct nf_proto_net pn;
|
|
|
|
unsigned int timeouts[TCP_CONNTRACK_TIMEOUT_MAX];
|
|
|
|
unsigned int tcp_loose;
|
|
|
|
unsigned int tcp_be_liberal;
|
|
|
|
unsigned int tcp_max_retrans;
|
|
|
|
};
|
|
|
|
|
2012-05-29 05:04:13 +08:00
|
|
|
enum udp_conntrack {
|
|
|
|
UDP_CT_UNREPLIED,
|
|
|
|
UDP_CT_REPLIED,
|
|
|
|
UDP_CT_MAX
|
|
|
|
};
|
|
|
|
|
|
|
|
struct nf_udp_net {
|
|
|
|
struct nf_proto_net pn;
|
|
|
|
unsigned int timeouts[UDP_CT_MAX];
|
|
|
|
};
|
|
|
|
|
2012-05-29 05:04:14 +08:00
|
|
|
struct nf_icmp_net {
|
|
|
|
struct nf_proto_net pn;
|
|
|
|
unsigned int timeout;
|
|
|
|
};
|
|
|
|
|
2012-05-29 05:04:10 +08:00
|
|
|
struct nf_ip_net {
|
2012-05-29 05:04:11 +08:00
|
|
|
struct nf_generic_net generic;
|
2012-05-29 05:04:12 +08:00
|
|
|
struct nf_tcp_net tcp;
|
2012-05-29 05:04:13 +08:00
|
|
|
struct nf_udp_net udp;
|
2012-05-29 05:04:14 +08:00
|
|
|
struct nf_icmp_net icmp;
|
2012-05-29 05:04:15 +08:00
|
|
|
struct nf_icmp_net icmpv6;
|
2012-05-29 05:04:10 +08:00
|
|
|
#if defined(CONFIG_SYSCTL) && defined(CONFIG_NF_CONNTRACK_PROC_COMPAT)
|
|
|
|
struct ctl_table_header *ctl_table_header;
|
|
|
|
struct ctl_table *ctl_table;
|
|
|
|
#endif
|
|
|
|
};
|
|
|
|
|
2014-03-03 21:45:20 +08:00
|
|
|
struct ct_pcpu {
|
|
|
|
spinlock_t lock;
|
|
|
|
struct hlist_nulls_head unconfirmed;
|
|
|
|
struct hlist_nulls_head dying;
|
|
|
|
struct hlist_nulls_head tmpl;
|
|
|
|
};
|
|
|
|
|
2008-10-08 17:35:02 +08:00
|
|
|
struct netns_ct {
|
2008-10-08 17:35:03 +08:00
|
|
|
atomic_t count;
|
2008-10-08 17:35:03 +08:00
|
|
|
unsigned int expect_count;
|
2013-11-15 22:57:53 +08:00
|
|
|
#ifdef CONFIG_SYSCTL
|
|
|
|
struct ctl_table_header *sysctl_header;
|
|
|
|
struct ctl_table_header *acct_sysctl_header;
|
|
|
|
struct ctl_table_header *tstamp_sysctl_header;
|
|
|
|
struct ctl_table_header *event_sysctl_header;
|
|
|
|
struct ctl_table_header *helper_sysctl_header;
|
|
|
|
#endif
|
|
|
|
char *slabname;
|
|
|
|
unsigned int sysctl_log_invalid; /* Log invalid packets */
|
|
|
|
unsigned int sysctl_events_retry_timeout;
|
|
|
|
int sysctl_events;
|
|
|
|
int sysctl_acct;
|
|
|
|
int sysctl_auto_assign_helper;
|
|
|
|
bool auto_assign_helper_warned;
|
|
|
|
int sysctl_tstamp;
|
|
|
|
int sysctl_checksum;
|
|
|
|
|
2010-02-09 03:18:07 +08:00
|
|
|
unsigned int htable_size;
|
2014-03-03 21:46:13 +08:00
|
|
|
seqcount_t generation;
|
2010-02-09 03:16:56 +08:00
|
|
|
struct kmem_cache *nf_conntrack_cachep;
|
2009-03-26 04:05:46 +08:00
|
|
|
struct hlist_nulls_head *hash;
|
2008-10-08 17:35:03 +08:00
|
|
|
struct hlist_head *expect_hash;
|
2014-03-03 21:45:20 +08:00
|
|
|
struct ct_pcpu __percpu *pcpu_lists;
|
2010-02-16 23:20:26 +08:00
|
|
|
struct ip_conntrack_stat __percpu *stat;
|
2011-11-22 07:16:51 +08:00
|
|
|
struct nf_ct_event_notifier __rcu *nf_conntrack_event_cb;
|
|
|
|
struct nf_exp_event_notifier __rcu *nf_expect_event_cb;
|
2012-05-29 05:04:10 +08:00
|
|
|
struct nf_ip_net nf_ct_proto;
|
2013-01-11 14:30:44 +08:00
|
|
|
#if defined(CONFIG_NF_CONNTRACK_LABELS)
|
|
|
|
unsigned int labels_used;
|
|
|
|
u8 label_words;
|
|
|
|
#endif
|
2012-08-27 01:14:06 +08:00
|
|
|
#ifdef CONFIG_NF_NAT_NEEDED
|
|
|
|
struct hlist_head *nat_bysource;
|
|
|
|
unsigned int nat_htable_size;
|
|
|
|
#endif
|
2008-10-08 17:35:02 +08:00
|
|
|
};
|
|
|
|
#endif
|