• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #ifndef _NF_CONNTRACK_TCP_H
2 #define _NF_CONNTRACK_TCP_H
3 
4 #include <uapi/linux/netfilter/nf_conntrack_tcp.h>
5 
6 
7 struct ip_ct_tcp_state {
8 	u_int32_t	td_end;		/* max of seq + len */
9 	u_int32_t	td_maxend;	/* max of ack + max(win, 1) */
10 	u_int32_t	td_maxwin;	/* max(win) */
11 	u_int32_t	td_maxack;	/* max of ack */
12 	u_int8_t	td_scale;	/* window scale factor */
13 	u_int8_t	flags;		/* per direction options */
14 };
15 
16 struct ip_ct_tcp {
17 	struct ip_ct_tcp_state seen[2];	/* connection parameters per direction */
18 	u_int8_t	state;		/* state of the connection (enum tcp_conntrack) */
19 	/* For detecting stale connections */
20 	u_int8_t	last_dir;	/* Direction of the last packet (enum ip_conntrack_dir) */
21 	u_int8_t	retrans;	/* Number of retransmitted packets */
22 	u_int8_t	last_index;	/* Index of the last packet */
23 	u_int32_t	last_seq;	/* Last sequence number seen in dir */
24 	u_int32_t	last_ack;	/* Last sequence number seen in opposite dir */
25 	u_int32_t	last_end;	/* Last seq + len */
26 	u_int16_t	last_win;	/* Last window advertisement seen in dir */
27 	/* For SYN packets while we may be out-of-sync */
28 	u_int8_t	last_wscale;	/* Last window scaling factor seen */
29 	u_int8_t	last_flags;	/* Last flags set */
30 };
31 
32 #endif /* _NF_CONNTRACK_TCP_H */
33