Note: In this problem, you will need to integrate a lot of different kinds of knowledge, especially concerning the frame-buildup nature of the protocol stack, and file manipulation in C programs. Just understanding the layout of the data file will take some time. This homework is not hard, but it will take a lot of careful thought. Start early!
The goal of this assignment is to gain further understanding of the TCP/IP protocol stack. You will write a program to input the Ethernet records in ~matloff/Pub/PktTrc01.dat on the CSIF machines, and then analyze that data.
Your program will determine the following:
Read the data documentation for details on the format of the data file. Recall that Ethernet, IP and TCP frame formats are listed in the Introduction unit of our printed lecture notes.
Make sure to browse through the data file (using the Unix od command) "by hand" a bit to get a feeling for the layout of the data before you start., Check to see, for example, that there is always an 0x0800 IP code where it ought to be in the first two or three Ethernet frames.