Yasuyuki Kozakai | 9fb9cbb | 2005-11-09 16:38:16 -0800 | [diff] [blame] | 1 | #ifndef _NF_CONNTRACK_TCP_H |
| 2 | #define _NF_CONNTRACK_TCP_H |
Yasuyuki Kozakai | 9fb9cbb | 2005-11-09 16:38:16 -0800 | [diff] [blame] | 3 | |
David Howells | 94d0ec5 | 2012-10-09 09:48:54 +0100 | [diff] [blame] | 4 | #include <uapi/linux/netfilter/nf_conntrack_tcp.h> |
Arnd Bergmann | 60c195c | 2009-02-26 00:51:43 +0100 | [diff] [blame] | 5 | |
Yasuyuki Kozakai | 9fb9cbb | 2005-11-09 16:38:16 -0800 | [diff] [blame] | 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) */ |
Jozsef Kadlecsik | bfcaa502 | 2009-05-25 17:23:15 +0200 | [diff] [blame] | 11 | u_int32_t td_maxack; /* max of ack */ |
Yasuyuki Kozakai | 9fb9cbb | 2005-11-09 16:38:16 -0800 | [diff] [blame] | 12 | u_int8_t td_scale; /* window scale factor */ |
Yasuyuki Kozakai | 9fb9cbb | 2005-11-09 16:38:16 -0800 | [diff] [blame] | 13 | u_int8_t flags; /* per direction options */ |
| 14 | }; |
| 15 | |
Eric Dumazet | d94d9fe | 2009-11-04 09:50:58 -0800 | [diff] [blame] | 16 | struct ip_ct_tcp { |
Yasuyuki Kozakai | 9fb9cbb | 2005-11-09 16:38:16 -0800 | [diff] [blame] | 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 */ |
George Hansper | c1fe3ca | 2006-09-20 12:03:23 -0700 | [diff] [blame] | 26 | u_int16_t last_win; /* Last window advertisement seen in dir */ |
Pablo Neira Ayuso | c4832c7 | 2009-11-23 10:34:39 +0100 | [diff] [blame] | 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 */ |
Yasuyuki Kozakai | 9fb9cbb | 2005-11-09 16:38:16 -0800 | [diff] [blame] | 30 | }; |
| 31 | |
Yasuyuki Kozakai | 9fb9cbb | 2005-11-09 16:38:16 -0800 | [diff] [blame] | 32 | #endif /* _NF_CONNTRACK_TCP_H */ |