TCP socket creation which is investigated by tcpdump

This investigation has been conducted if 3-way handshake occurs in order to establish tcp connection.
I made two simple program, server slide program and client side program. Server side program is run in Linux machine (130.69.250.35) and client side program is run in FreeBSD machine (130.69.250.34).

Click here to see Server side program
Click here to see Client side program
Here is header file


Here is the result of tcpdump:

--- when tcp connection is established ---
16:09:17.669870 130.69.250.34.2948 > 130.69.250.35.6998: S 3994976936:3994976936(0) win 16384  (DF)
16:09:17.670042 130.69.250.35.6998 > 130.69.250.34.2948: S 1064532771:1064532771(0) ack 3994976937 win 32736 
16:09:17.670085 130.69.250.34.2948 > 130.69.250.35.6998: . ack 1 win 17520 (DF)


--- when tcp connection is terminated ---
16:09:27.672583 130.69.250.34.2948 > 130.69.250.35.6998: F 1:1(0) ack 1 win 17520 (DF)
16:09:27.672736 130.69.250.35.6998 > 130.69.250.34.2948: . ack 2 win 32735 (DF)
hm ...

nobu@icnet.ne.jp