Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
nf_conntrack_common.h
Go to the documentation of this file.
1 #ifndef _UAPI_NF_CONNTRACK_COMMON_H
2 #define _UAPI_NF_CONNTRACK_COMMON_H
3 /* Connection state tracking for netfilter. This is separated from,
4  but required by, the NAT layer; it can also be used by an iptables
5  extension. */
7  /* Part of an established connection (either direction). */
9 
10  /* Like NEW, but related to an existing connection, or ICMP error
11  (in either direction). */
13 
14  /* Started a new connection to track (only
15  IP_CT_DIR_ORIGINAL); may be a retransmission. */
17 
18  /* >= this indicates reply direction */
20 
24  /* Number of distinct IP_CT types (no NEW in reply dirn). */
25  IP_CT_NUMBER = IP_CT_IS_REPLY * 2 - 1
26 };
27 
28 /* Bitset representing status of connection. */
30  /* It's an expected connection: bit 0 set. This bit never changed */
33 
34  /* We've seen packets both ways: bit 1 set. Can be set, not unset. */
37 
38  /* Conntrack should never be early-expired. */
41 
42  /* Connection is confirmed: originating packet has left box */
45 
46  /* Connection needs src nat in orig dir. This bit never changed. */
49 
50  /* Connection needs dst nat in orig dir. This bit never changed. */
53 
54  /* Both together. */
56 
57  /* Connection needs TCP sequence adjusted. */
60 
61  /* NAT initialization bits. */
64 
67 
68  /* Both together */
70 
71  /* Connection is dying (removed from lists), can not be unset. */
74 
75  /* Connection has fixed timeout. */
78 
79  /* Conntrack is a template */
82 
83  /* Conntrack is a fake untracked entry */
86 
87  /* Conntrack got a helper explicitly attached via CT target. */
90 };
91 
92 /* Connection tracking event types */
94  IPCT_NEW, /* new conntrack */
95  IPCT_RELATED, /* related conntrack */
96  IPCT_DESTROY, /* destroyed conntrack */
97  IPCT_REPLY, /* connection has seen two-way traffic */
98  IPCT_ASSURED, /* connection status has changed to assured */
99  IPCT_PROTOINFO, /* protocol information has changed */
100  IPCT_HELPER, /* new helper has been set */
101  IPCT_MARK, /* new mark has been set */
102  IPCT_NATSEQADJ, /* NAT is doing sequence adjustment */
103  IPCT_SECMARK, /* new security mark has been set */
104 };
105 
107  IPEXP_NEW, /* new expectation */
108  IPEXP_DESTROY, /* destroyed expectation */
109 };
110 
111 /* expectation flags */
112 #define NF_CT_EXPECT_PERMANENT 0x1
113 #define NF_CT_EXPECT_INACTIVE 0x2
114 #define NF_CT_EXPECT_USERSPACE 0x4
115 
116 
117 #endif /* _UAPI_NF_CONNTRACK_COMMON_H */