12 #ifndef _NF_CONNTRACK_H
13 #define _NF_CONNTRACK_H
15 #include <linux/netfilter/nf_conntrack_common.h>
17 #include <linux/bitops.h>
18 #include <linux/compiler.h>
21 #include <linux/netfilter/nf_conntrack_tcp.h>
42 #include <linux/types.h>
46 #ifdef CONFIG_NETFILTER_DEBUG
47 #define NF_CT_ASSERT(x) WARN_ON(!(x))
49 #define NF_CT_ASSERT(x)
55 #define NF_CT_MAX_EXPECT_CLASSES 4
94 #if defined(CONFIG_NF_CONNTRACK_MARK)
98 #ifdef CONFIG_NF_CONNTRACK_SECMARK
129 #define nf_ct_tuple(ct, dir) (&(ct)->tuplehash[dir].tuple)
132 #define master_ct(conntr) (conntr->master)
136 static inline struct net *nf_ct_net(
const struct nf_conn *
ct)
150 const struct nf_conn *ignored_conntrack);
157 return (
struct nf_conn *)skb->nfct;
161 static inline void nf_ct_put(
struct nf_conn *
ct)
198 unsigned long extra_jiffies,
202 static inline void nf_ct_refresh_acct(
struct nf_conn *
ct,
205 unsigned long extra_jiffies)
211 static inline void nf_ct_refresh(
struct nf_conn *
ct,
213 unsigned long extra_jiffies)
224 static inline bool nf_ct_kill_acct(
struct nf_conn *
ct,
232 static inline bool nf_ct_kill(
struct nf_conn *
ct)
244 static inline struct nf_conn *nf_ct_untracked_get(
void)
260 static inline int nf_ct_is_template(
const struct nf_conn *ct)
266 static inline int nf_ct_is_confirmed(
struct nf_conn *ct)
271 static inline int nf_ct_is_dying(
struct nf_conn *ct)
276 static inline int nf_ct_is_untracked(
const struct nf_conn *ct)
282 static inline bool nf_is_loopback_packet(
const struct sk_buff *skb)
295 #define NF_CT_STAT_INC(net, count) __this_cpu_inc((net)->ct.stat->count)
296 #define NF_CT_STAT_INC_ATOMIC(net, count) this_cpu_inc((net)->ct.stat->count)
298 #define MODULE_ALIAS_NFCT_HELPER(helper) \
299 MODULE_ALIAS("nfct-helper-" helper)