aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/netfilter_ipv4/ipt_conntrack.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /include/linux/netfilter_ipv4/ipt_conntrack.h
Linux-2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'include/linux/netfilter_ipv4/ipt_conntrack.h')
-rw-r--r--include/linux/netfilter_ipv4/ipt_conntrack.h60
1 files changed, 60 insertions, 0 deletions
diff --git a/include/linux/netfilter_ipv4/ipt_conntrack.h b/include/linux/netfilter_ipv4/ipt_conntrack.h
new file mode 100644
index 00000000000..413c5658bd3
--- /dev/null
+++ b/include/linux/netfilter_ipv4/ipt_conntrack.h
@@ -0,0 +1,60 @@
1/* Header file for kernel module to match connection tracking information.
2 * GPL (C) 2001 Marc Boucher (marc@mbsi.ca).
3 */
4
5#ifndef _IPT_CONNTRACK_H
6#define _IPT_CONNTRACK_H
7
8#define IPT_CONNTRACK_STATE_BIT(ctinfo) (1 << ((ctinfo)%IP_CT_IS_REPLY+1))
9#define IPT_CONNTRACK_STATE_INVALID (1 << 0)
10
11#define IPT_CONNTRACK_STATE_SNAT (1 << (IP_CT_NUMBER + 1))
12#define IPT_CONNTRACK_STATE_DNAT (1 << (IP_CT_NUMBER + 2))
13#define IPT_CONNTRACK_STATE_UNTRACKED (1 << (IP_CT_NUMBER + 3))
14
15/* flags, invflags: */
16#define IPT_CONNTRACK_STATE 0x01
17#define IPT_CONNTRACK_PROTO 0x02
18#define IPT_CONNTRACK_ORIGSRC 0x04
19#define IPT_CONNTRACK_ORIGDST 0x08
20#define IPT_CONNTRACK_REPLSRC 0x10
21#define IPT_CONNTRACK_REPLDST 0x20
22#define IPT_CONNTRACK_STATUS 0x40
23#define IPT_CONNTRACK_EXPIRES 0x80
24
25/* This is exposed to userspace, so remains frozen in time. */
26struct ip_conntrack_old_tuple
27{
28 struct {
29 __u32 ip;
30 union {
31 __u16 all;
32 } u;
33 } src;
34
35 struct {
36 __u32 ip;
37 union {
38 __u16 all;
39 } u;
40
41 /* The protocol. */
42 u16 protonum;
43 } dst;
44};
45
46struct ipt_conntrack_info
47{
48 unsigned int statemask, statusmask;
49
50 struct ip_conntrack_old_tuple tuple[IP_CT_DIR_MAX];
51 struct in_addr sipmsk[IP_CT_DIR_MAX], dipmsk[IP_CT_DIR_MAX];
52
53 unsigned long expires_min, expires_max;
54
55 /* Flags word */
56 u_int8_t flags;
57 /* Inverse flags */
58 u_int8_t invflags;
59};
60#endif /*_IPT_CONNTRACK_H*/