2008-10-08 16:35:02 +07:00
|
|
|
#ifndef __NETNS_CONNTRACK_H
|
|
|
|
#define __NETNS_CONNTRACK_H
|
|
|
|
|
2008-10-08 16:35:04 +07:00
|
|
|
#include <linux/list.h>
|
2009-03-26 03:05:46 +07:00
|
|
|
#include <linux/list_nulls.h>
|
2011-07-27 06:09:06 +07:00
|
|
|
#include <linux/atomic.h>
|
2014-06-11 04:12:56 +07:00
|
|
|
#include <linux/workqueue.h>
|
2012-05-29 04:04:12 +07:00
|
|
|
#include <linux/netfilter/nf_conntrack_tcp.h>
|
2016-11-15 21:08:25 +07:00
|
|
|
#ifdef CONFIG_NF_CT_PROTO_DCCP
|
|
|
|
#include <linux/netfilter/nf_conntrack_dccp.h>
|
|
|
|
#endif
|
2014-03-03 20:46:13 +07:00
|
|
|
#include <linux/seqlock.h>
|
2008-10-08 16:35:03 +07:00
|
|
|
|
2008-10-08 16:35:08 +07:00
|
|
|
struct ctl_table_header;
|
2008-10-08 16:35:07 +07:00
|
|
|
struct nf_conntrack_ecache;
|
|
|
|
|
2012-05-29 04:04:09 +07:00
|
|
|
struct nf_proto_net {
|
|
|
|
#ifdef CONFIG_SYSCTL
|
|
|
|
struct ctl_table_header *ctl_table_header;
|
|
|
|
struct ctl_table *ctl_table;
|
|
|
|
#endif
|
|
|
|
unsigned int users;
|
|
|
|
};
|
|
|
|
|
2012-05-29 04:04:11 +07:00
|
|
|
struct nf_generic_net {
|
|
|
|
struct nf_proto_net pn;
|
|
|
|
unsigned int timeout;
|
|
|
|
};
|
|
|
|
|
2012-05-29 04:04:12 +07: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 04:04:13 +07: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 04:04:14 +07:00
|
|
|
struct nf_icmp_net {
|
|
|
|
struct nf_proto_net pn;
|
|
|
|
unsigned int timeout;
|
|
|
|
};
|
|
|
|
|
2016-11-15 21:08:25 +07:00
|
|
|
#ifdef CONFIG_NF_CT_PROTO_DCCP
|
|
|
|
struct nf_dccp_net {
|
|
|
|
struct nf_proto_net pn;
|
|
|
|
int dccp_loose;
|
|
|
|
unsigned int dccp_timeout[CT_DCCP_MAX + 1];
|
|
|
|
};
|
|
|
|
#endif
|
|
|
|
|
2012-05-29 04:04:10 +07:00
|
|
|
struct nf_ip_net {
|
2012-05-29 04:04:11 +07:00
|
|
|
struct nf_generic_net generic;
|
2012-05-29 04:04:12 +07:00
|
|
|
struct nf_tcp_net tcp;
|
2012-05-29 04:04:13 +07:00
|
|
|
struct nf_udp_net udp;
|
2012-05-29 04:04:14 +07:00
|
|
|
struct nf_icmp_net icmp;
|
2012-05-29 04:04:15 +07:00
|
|
|
struct nf_icmp_net icmpv6;
|
2016-11-15 21:08:25 +07:00
|
|
|
#ifdef CONFIG_NF_CT_PROTO_DCCP
|
|
|
|
struct nf_dccp_net dccp;
|
|
|
|
#endif
|
2012-05-29 04:04:10 +07:00
|
|
|
};
|
|
|
|
|
2014-03-03 20:45:20 +07:00
|
|
|
struct ct_pcpu {
|
|
|
|
spinlock_t lock;
|
|
|
|
struct hlist_nulls_head unconfirmed;
|
|
|
|
struct hlist_nulls_head dying;
|
|
|
|
};
|
|
|
|
|
2008-10-08 16:35:02 +07:00
|
|
|
struct netns_ct {
|
2008-10-08 16:35:03 +07:00
|
|
|
atomic_t count;
|
2008-10-08 16:35:03 +07:00
|
|
|
unsigned int expect_count;
|
2014-06-11 04:12:56 +07:00
|
|
|
#ifdef CONFIG_NF_CONNTRACK_EVENTS
|
|
|
|
struct delayed_work ecache_dwork;
|
|
|
|
bool ecache_dwork_pending;
|
|
|
|
#endif
|
2013-11-15 21:57:53 +07: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
|
|
|
|
unsigned int sysctl_log_invalid; /* Log invalid packets */
|
|
|
|
int sysctl_events;
|
|
|
|
int sysctl_acct;
|
|
|
|
int sysctl_auto_assign_helper;
|
|
|
|
bool auto_assign_helper_warned;
|
|
|
|
int sysctl_tstamp;
|
|
|
|
int sysctl_checksum;
|
|
|
|
|
2014-03-03 20:45:20 +07:00
|
|
|
struct ct_pcpu __percpu *pcpu_lists;
|
2010-02-16 22:20:26 +07:00
|
|
|
struct ip_conntrack_stat __percpu *stat;
|
2011-11-22 06:16:51 +07:00
|
|
|
struct nf_ct_event_notifier __rcu *nf_conntrack_event_cb;
|
|
|
|
struct nf_exp_event_notifier __rcu *nf_expect_event_cb;
|
2012-05-29 04:04:10 +07:00
|
|
|
struct nf_ip_net nf_ct_proto;
|
2013-01-11 13:30:44 +07:00
|
|
|
#if defined(CONFIG_NF_CONNTRACK_LABELS)
|
|
|
|
unsigned int labels_used;
|
|
|
|
#endif
|
2008-10-08 16:35:02 +07:00
|
|
|
};
|
|
|
|
#endif
|