diff --git a/gtests/net/packetdrill/tests/bsd/tcp/close/close-fin.pkt b/gtests/net/packetdrill/tests/bsd/tcp/close/close-fin.pkt new file mode 100644 index 0000000000000000000000000000000000000000..09f2d505e0416e6de567f403ed2964b5eefcb001 --- /dev/null +++ b/gtests/net/packetdrill/tests/bsd/tcp/close/close-fin.pkt @@ -0,0 +1,20 @@ +// Test for checking if the client generates a FIN +// after we close an established connection. + +0.000 socket(..., SOCK_STREAM, IPPROTO_TCP) = 3 +0.000 setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0 +0.000 bind(3, ..., ...) = 0 +0.000 listen(3, 1) = 0 + +0.100 < S 0:0(0) win 65535 <mss 1460,sackOK,nop,nop,nop,wscale 7> +0.100 > S. 0:0(0) ack 1 <...> +0.200 < . 1:1(0) ack 1 win 65535 +0.200 accept(3, ..., ...) = 4 + +// Client closes the connection +0.300 < F. 1:1(0) ack 1 win 65535 +0.300 > . 1:1(0) ack 2 win 1026 + +// We close the connection +0.400 close(4) = 0 +0.400 > F. 1:1(0) ack 2 win 1026