]> git.ipfire.org Git - thirdparty/kernel/linux.git/blame - include/linux/netfilter/nf_conntrack_tcp.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
[thirdparty/kernel/linux.git] / include / linux / netfilter / nf_conntrack_tcp.h
CommitLineData
b2441318 1/* SPDX-License-Identifier: GPL-2.0 */
9fb9cbb1
YK
2#ifndef _NF_CONNTRACK_TCP_H
3#define _NF_CONNTRACK_TCP_H
9fb9cbb1 4
94d0ec58 5#include <uapi/linux/netfilter/nf_conntrack_tcp.h>
60c195c7 6
9fb9cbb1
YK
7
8struct ip_ct_tcp_state {
9 u_int32_t td_end; /* max of seq + len */
10 u_int32_t td_maxend; /* max of ack + max(win, 1) */
11 u_int32_t td_maxwin; /* max(win) */
bfcaa502 12 u_int32_t td_maxack; /* max of ack */
9fb9cbb1 13 u_int8_t td_scale; /* window scale factor */
9fb9cbb1
YK
14 u_int8_t flags; /* per direction options */
15};
16
d94d9fee 17struct ip_ct_tcp {
9fb9cbb1
YK
18 struct ip_ct_tcp_state seen[2]; /* connection parameters per direction */
19 u_int8_t state; /* state of the connection (enum tcp_conntrack) */
20 /* For detecting stale connections */
21 u_int8_t last_dir; /* Direction of the last packet (enum ip_conntrack_dir) */
22 u_int8_t retrans; /* Number of retransmitted packets */
23 u_int8_t last_index; /* Index of the last packet */
24 u_int32_t last_seq; /* Last sequence number seen in dir */
25 u_int32_t last_ack; /* Last sequence number seen in opposite dir */
26 u_int32_t last_end; /* Last seq + len */
c1fe3ca5 27 u_int16_t last_win; /* Last window advertisement seen in dir */
c4832c7b
PNA
28 /* For SYN packets while we may be out-of-sync */
29 u_int8_t last_wscale; /* Last window scaling factor seen */
30 u_int8_t last_flags; /* Last flags set */
9fb9cbb1
YK
31};
32
9fb9cbb1 33#endif /* _NF_CONNTRACK_TCP_H */