TCP/IP Lean: Web Servers for Embedded Systems, Second Edition

In the previous chapter, I used the Datagram utility to fetch a date and time string from a UDP server. You can now use Telnet to fetch the same string over a TCP connection, since most Daytime servers support both UDP and TCP connections.
Assuming the server is at address 10.1.1.1, the command
telnet 10.1.1.1 daytime
may return the following response.
TELNET vx.xxIP 10.1.1.11 mask 255.0.0.0 gate 10.1.1.111 Ethernet 00:c0:26:b0:0a:93Press ESC or ctrl-C to exitTue May 23 09:48:12 2000
You can use the diagnostic capabilities of Telnet to show how the transfer works. The following lines show the same transfer and the response with the state display, TCP segment display, and verbose options enabled.
telnet -s -t -v 10.1.1.1 daytimeTELNET vx.xxIP 10.1.1.11 mask 255.0.0.0 gate 10.1.1.111 Ethernet 00:c0:26:b0:0a:93Press ESC or ctrl-C to exit (1) new state 'active open' (1) new state 'ARP sent'Tx0 /len 42 ----BROADCAST---- ARP 10.1.1.11 -<span class="unicode">></span> 10.1.1.1Rx0 \len 60 00:c0:f0:09:bd:c3 ARP 10.1.1.1 -<span class="unicode">></span> 10.1.1.11 (1) new state 'ARP rcvd' (1) new state 'SYN sent' /ack 00000000 seq d34de133 port 1025-<span class="unicode">></span>13 <span class="unicode"><</span>SYN<span class="unicode">></span> MSS 1460 dlen 0hTx0 /len 58 00:c0:f0:09:bd:c3 IP 10.1.1.11 -<span class="unicode">></span> 10.1.1.1 TCPRx0 \len 60 00:c0:f0:09:bd:c3 IP 10.1.1.1 -<span class="unicode">></span> 10.1.1.11 TCP \seq 4edb0dlb ack d34de134 port 1025<span class="unicode"><</span>-13 <span class="unicode"><</span>SYN<span class="unicode">></span><span class="unicode"><</span>ACK<span class="unicode">></span> MSS 1460 dlen 0h (1) new state 'established' /ack...