Linux kernel mirror (for testing)
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel
os
linux
1// SPDX-License-Identifier: GPL-2.0
2
3--mss=1000
4
5`./defaults.sh`
6
7 0 `nstat -n`
8
9// Establish a connection.
10 +0 socket(..., SOCK_STREAM, IPPROTO_TCP) = 3
11 +0 setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
12 +0 setsockopt(3, SOL_SOCKET, SO_RCVBUF, [20000], 4) = 0
13 +0 bind(3, ..., ...) = 0
14 +0 listen(3, 1) = 0
15
16 +0 < S 0:0(0) win 32792 <mss 1000,nop,wscale 7>
17 +0 > S. 0:0(0) ack 1 win 18980 <mss 1460,nop,wscale 0>
18 +.1 < . 1:1(0) ack 1 win 257
19
20 +0 accept(3, ..., ...) = 4
21
22 +0 < P. 1:20001(20000) ack 1 win 257
23 +.04 > . 1:1(0) ack 20001 win 18000
24
25 +0 setsockopt(4, SOL_SOCKET, SO_RCVBUF, [12000], 4) = 0
26 +0 < P. 20001:80001(60000) ack 1 win 257
27 +0 > . 1:1(0) ack 20001 win 18000
28
29 +0 read(4, ..., 20000) = 20000
30// A too big packet is accepted if the receive queue is empty
31 +0 < P. 20001:80001(60000) ack 1 win 257
32 +0 > . 1:1(0) ack 80001 win 0
33