1 #ifndef _IP_CONNTRACK_TCP_H
2 #define _IP_CONNTRACK_TCP_H
7 TCP_CONNTRACK_SYN_SENT
,
8 TCP_CONNTRACK_SYN_RECV
,
9 TCP_CONNTRACK_ESTABLISHED
,
10 TCP_CONNTRACK_FIN_WAIT
,
11 TCP_CONNTRACK_CLOSE_WAIT
,
12 TCP_CONNTRACK_LAST_ACK
,
13 TCP_CONNTRACK_TIME_WAIT
,
20 /* Window scaling is advertised by the sender */
21 #define IP_CT_TCP_FLAG_WINDOW_SCALE 0x01
23 /* SACK is permitted by the sender */
24 #define IP_CT_TCP_FLAG_SACK_PERM 0x02
26 /* This sender sent FIN first */
27 #define IP_CT_TCP_FLAG_CLOSE_INIT 0x03
29 struct ip_ct_tcp_state
{
30 u_int32_t td_end
; /* max of seq + len */
31 u_int32_t td_maxend
; /* max of ack + max(win, 1) */
32 u_int32_t td_maxwin
; /* max(win) */
33 u_int8_t td_scale
; /* window scale factor */
34 u_int8_t loose
; /* used when connection picked up from the middle */
35 u_int8_t flags
; /* per direction options */
40 struct ip_ct_tcp_state seen
[2]; /* connection parameters per direction */
41 u_int8_t state
; /* state of the connection (enum tcp_conntrack) */
42 /* For detecting stale connections */
43 u_int8_t last_dir
; /* Direction of the last packet (enum ip_conntrack_dir) */
44 u_int8_t retrans
; /* Number of retransmitted packets */
45 u_int8_t last_index
; /* Index of the last packet */
46 u_int32_t last_seq
; /* Last sequence number seen in dir */
47 u_int32_t last_ack
; /* Last sequence number seen in opposite dir */
48 u_int32_t last_end
; /* Last seq + len */
51 #endif /* _IP_CONNTRACK_TCP_H */