xref: /linux/tools/testing/selftests/net/packetdrill/tcp_fastopen_server_basic-zero-payload.pkt (revision 8a5f956a9fb7d74fff681145082acfad5afa6bb8)
1// SPDX-License-Identifier: GPL-2.0
2//
3// Basic TFO server test
4//
5// Test zero-payload packet w/ valid TFO cookie - a TFO socket will
6// still be created and accepted but read() will not return until a
7// later pkt with 10 byte.
8
9`./defaults.sh`
10
11    0 socket(..., SOCK_STREAM|SOCK_NONBLOCK, IPPROTO_TCP) = 3
12   +0 setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
13   +0 bind(3, ..., ...) = 0
14   +0 listen(3, 1) = 0
15   +0 setsockopt(3, SOL_TCP, TCP_FASTOPEN, [1], 4) = 0
16
17   +0 < S 0:0(0) win 32792 <mss 1460,sackOK,nop,nop,FO TFO_COOKIE,nop,nop>
18   +0 > S. 0:0(0) ack 1 <mss 1460,nop,nop,sackOK>
19   +0 accept(3, ..., ...) = 4
20   +0 %{ assert (tcpi_options & TCPI_OPT_SYN_DATA) == 0, tcpi_options }%
21
22// A TFO socket is created and is writable.
23   +0 write(4, ..., 100) = 100
24   +0 > P. 1:101(100) ack 1
25   +0...0.300 read(4, ..., 512) = 10
26  +.3 < P. 1:11(10) ack 1 win 5840
27