Assignment 3

Due Friday, April 19, 2002 (extension)

Implement the connection establishment and termination phases of TCP. Your implementation should be built on top of the IP module you wrote for Assignment 2, and it should interoperate with the standard Linux implementation of TCP.

Your implementation should support the relevant socket calls: socket, bind, listen, connect, accept, and close. Each of these calls needs to support only TCP; parameters and flags required by UDP, Unix pipes, and so on, are not required. We will evaluate your solution by running a test program that measures how many connections it can open and close per second.

The specific interface that your code must support can be found in cs461_socket.h. Your Makefile should compile your code into an object file called cs461_socket.o. This object file will then be linked against the test program. Note that your object file will not contain a main() function; you should initialize your protocol stack the first time a socket is created. Click here for a sample Makefile that shows how to build the required object file, along with an extremely basic test program.

You may assume that no data segments will be exchanged during the ESTABLISHED state of TCP's state transition diagram. In additon, your implementation is not required to support the following:

Watch this space for additional simplifications.

Turn in a written report (postscript or PDF) that briefly describes your design, and reports how many connections your implementation can open/close per second. Also turn in the source code for your implementation, any test programs you have developed, a Makefile, and a README that describes your program files.