Assignment 3

Due: April 12, 2001

Implement the connection establishment and termination phases of TCP. You may safely assume that no data segments will be exchanged during the ESTABLISHED state of TCP's state transition diagram. 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. Your program should support a single -cheat command-line option that allows TCP to reuse a connection without waiting the requisite 2xMSL delay.

Your implementation may make the following simplifications. First, it need not support URGENT data. Second, it need not support the "Send/ACK" transition out of the LISTEN state. Third, it need not support any TCP options, including the "big windows" extensions. Watch this space for additional simplifications.

Turn in a hardcopy report that briefly describes your design, and reports how many connections your implementation can open/close per second, both with and without the -cheat option. Also turn in the source code for your implementation.