5 #ifndef _IPT_CONNTRACK_H
6 #define _IPT_CONNTRACK_H
9 #include <linux/netfilter_ipv4/ip_conntrack.h>
11 #include <linux/netfilter/nf_conntrack_common.h>
12 #include <linux/netfilter/nf_conntrack_tuple_common.h>
16 #include <linux/version.h>
17 #ifndef KERNEL_VERSION
18 #define KERNEL_VERSION(a,b,c) (((a) << 16) | ((b) << 8) | (c))
21 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,18)
22 #define IPS_EXPECTED (1 << 0)
23 #define IPS_SEEN_REPLY (1 << 1)
24 #define IPS_ASSURED (1 << 2)
25 #define IP_CT_DIR_ORIGINAL 0
26 #define IP_CT_DIR_REPLY 1
27 #define IP_CT_DIR_MAX 2
30 #define IPT_CONNTRACK_STATE_BIT(ctinfo) (1 << ((ctinfo)%IP_CT_IS_REPLY+1))
31 #define IPT_CONNTRACK_STATE_INVALID (1 << 0)
33 #define IPT_CONNTRACK_STATE_SNAT (1 << (IP_CT_NUMBER + 1))
34 #define IPT_CONNTRACK_STATE_DNAT (1 << (IP_CT_NUMBER + 2))
35 #define IPT_CONNTRACK_STATE_UNTRACKED (1 << (IP_CT_NUMBER + 3))
38 #define IPT_CONNTRACK_STATE 0x01
39 #define IPT_CONNTRACK_PROTO 0x02
40 #define IPT_CONNTRACK_ORIGSRC 0x04
41 #define IPT_CONNTRACK_ORIGDST 0x08
42 #define IPT_CONNTRACK_REPLSRC 0x10
43 #define IPT_CONNTRACK_REPLDST 0x20
44 #define IPT_CONNTRACK_STATUS 0x40
45 #define IPT_CONNTRACK_EXPIRES 0x80
75 #ifdef KERNEL_64_USERSPACE_32
struct in_addr sipmsk[2]
Definition: ipt_conntrack.h:73
struct in_addr dipmsk[2]
Definition: ipt_conntrack.h:73
u_int16_t protonum
Definition: ipt_conntrack.h:64
unsigned long expires_min
Definition: ipt_conntrack.h:78
struct ip_conntrack_old_tuple::@4 dst
u_int32_t ip
Definition: ipt_conntrack.h:51
Definition: ipt_conntrack.h:48
#define IP_CT_DIR_MAX
Definition: ipt_conntrack.h:27
u_int16_t all
Definition: ipt_conntrack.h:53
u_int8_t flags
Definition: ipt_conntrack.h:82
struct ip_conntrack_old_tuple tuple[2]
Definition: ipt_conntrack.h:72
unsigned int statusmask
Definition: ipt_conntrack.h:70
u_int8_t invflags
Definition: ipt_conntrack.h:84
Definition: ipt_conntrack.h:68
struct ip_conntrack_old_tuple::@3 src
unsigned int statemask
Definition: ipt_conntrack.h:70
union ip_conntrack_old_tuple::@3::@5 u
unsigned long expires_max
Definition: ipt_conntrack.h:78