]>
Commit | Line | Data |
---|---|---|
2e4e6a17 HW |
1 | /* Header file for kernel module to match connection tracking information. |
2 | * GPL (C) 2001 Marc Boucher (marc@mbsi.ca). | |
3 | */ | |
4 | ||
5 | #ifndef _XT_CONNTRACK_H | |
6 | #define _XT_CONNTRACK_H | |
7 | ||
9df27bab | 8 | #include <linux/types.h> |
2e4e6a17 | 9 | #include <linux/netfilter/nf_conntrack_tuple_common.h> |
2e4e6a17 HW |
10 | |
11 | #define XT_CONNTRACK_STATE_BIT(ctinfo) (1 << ((ctinfo)%IP_CT_IS_REPLY+1)) | |
12 | #define XT_CONNTRACK_STATE_INVALID (1 << 0) | |
13 | ||
14 | #define XT_CONNTRACK_STATE_SNAT (1 << (IP_CT_NUMBER + 1)) | |
15 | #define XT_CONNTRACK_STATE_DNAT (1 << (IP_CT_NUMBER + 2)) | |
16 | #define XT_CONNTRACK_STATE_UNTRACKED (1 << (IP_CT_NUMBER + 3)) | |
17 | ||
18 | /* flags, invflags: */ | |
b4164998 JE |
19 | enum { |
20 | XT_CONNTRACK_STATE = 1 << 0, | |
21 | XT_CONNTRACK_PROTO = 1 << 1, | |
22 | XT_CONNTRACK_ORIGSRC = 1 << 2, | |
23 | XT_CONNTRACK_ORIGDST = 1 << 3, | |
24 | XT_CONNTRACK_REPLSRC = 1 << 4, | |
25 | XT_CONNTRACK_REPLDST = 1 << 5, | |
26 | XT_CONNTRACK_STATUS = 1 << 6, | |
27 | XT_CONNTRACK_EXPIRES = 1 << 7, | |
28 | XT_CONNTRACK_ORIGSRC_PORT = 1 << 8, | |
29 | XT_CONNTRACK_ORIGDST_PORT = 1 << 9, | |
30 | XT_CONNTRACK_REPLSRC_PORT = 1 << 10, | |
31 | XT_CONNTRACK_REPLDST_PORT = 1 << 11, | |
32 | XT_CONNTRACK_DIRECTION = 1 << 12, | |
33 | }; | |
2e4e6a17 | 34 | |
64eb12f9 JE |
35 | struct xt_conntrack_mtinfo1 { |
36 | union nf_inet_addr origsrc_addr, origsrc_mask; | |
37 | union nf_inet_addr origdst_addr, origdst_mask; | |
38 | union nf_inet_addr replsrc_addr, replsrc_mask; | |
39 | union nf_inet_addr repldst_addr, repldst_mask; | |
60c195c7 AB |
40 | __u32 expires_min, expires_max; |
41 | __u16 l4proto; | |
b4164998 JE |
42 | __be16 origsrc_port, origdst_port; |
43 | __be16 replsrc_port, repldst_port; | |
60c195c7 AB |
44 | __u16 match_flags, invert_flags; |
45 | __u8 state_mask, status_mask; | |
64eb12f9 JE |
46 | }; |
47 | ||
d6d3f08b JE |
48 | struct xt_conntrack_mtinfo2 { |
49 | union nf_inet_addr origsrc_addr, origsrc_mask; | |
50 | union nf_inet_addr origdst_addr, origdst_mask; | |
51 | union nf_inet_addr replsrc_addr, replsrc_mask; | |
52 | union nf_inet_addr repldst_addr, repldst_mask; | |
53 | __u32 expires_min, expires_max; | |
54 | __u16 l4proto; | |
55 | __be16 origsrc_port, origdst_port; | |
56 | __be16 replsrc_port, repldst_port; | |
57 | __u16 match_flags, invert_flags; | |
58 | __u16 state_mask, status_mask; | |
59 | }; | |
60 | ||
2e4e6a17 | 61 | #endif /*_XT_CONNTRACK_H*/ |