Princeton University |
Computer Science 461 |
|
The programming component of the class will be to implement the Internet's TCP/IP protocol suite as a user-level library on Linux. You will accomplish this through a sequence of four assignments, each adding a new feature to your implementation. The expectation is that by the end of the semester you will have a complete TCP/IP protocol stack that is able to interoperate with other TCP/IP implementations.
The specifications for these two protocols are available as RFC 791 (IP) and RFC 793 (TCP). You'll also need to implement a subset of ICMP, which is specified in RFC 792. Additional information will be provided in the lectures.
Code that will help you interface to the raw networking facilities of Linux can be found in interface.c and interface.h. See test.c for an example program that uses this interface.
With the exception of the first assignment, students may work on the programming assignments in teams of two.
Students that would like to work on a different problem may propose an alternative project at any point in the semester. The project must be well-defined, approved by Professor Pai, and involve roughly the same amount of work as the remaining assignments.
The assignments will be implemented on the Linux machines in Friend 010. You will have root access to these machines since your assignments will require direct access to the ethernet device. One consequence of having root access is that you will not be able to NSF-mount the department's file server. Your files on the department server can be accessed via Samba, however.
Submit your solutions to the programming assignments electronically on the CIT Sparc machines using the following command.
/u/cos461/bin/submit number fileswhere number is the assignment number and files is the list of files for that assignment. For example,
/u/cos461/bin/submit 31 readme makefile main.c strings.csubmits the files readme, makefile, main.c, and strings.c for a fictitious assignment 31.
The submit command copies your files to the directory /u/cos461/submit/login/number and lists all the files that you have submitted for assignment number. login is your user account name. If you execute submit after the assignment deadline, your files are placed in directory number-late. You can run submit more than once, and you can submit partial lists of files.
There's also an unsubmit command that allows you to undo a submit of one or more files. For example,
/u/cos461/bin/unsubmit 31 main.cremoves main.c from the submission directory.
Programming, like composition, is an individual creative process. Individuals must reach their own understanding of the problem and discover a path to its solution. During this time, discussions with friends are encouraged. However, when the time comes to write the code that solves the problem, such discussions are no longer appropriate; the program must be your own work.
Do not, under any circumstances, copy another person's program. This includes relevant Linux source. Writing code for use by another or using another's code in any form is academic fraud and will be dealt with harshly. You are also responsible for ensuring that the code you write for the assignments is not readable by others.
Assignment 1: measuring performance
Assignment 2: implement IP and ICMP
Assignment 3: TCP connection setup/teardown
Assignment 4: TCP sliding window
Assignment 5 (Extra Credit): congestion control