NetProg 2002 HW3

Homework 3: TFTP Server
Due Date for Local and live remote students: Fri, March 1st (by 11:59PM)
Due Date for Tape and Videostream Delay students: Fri, March 8th

Late Penalty: 10 points per day (out of 100)

Submit to netprog-submit@cs.rpi.edu with the subject line "3"
Complete Submission instructions are here


Your assignment is to write a UDP based TFTP Server. Your server must be able to handle Read Requests that use transfer mode "octet". The focus of this project is UDP programming, including timeouts and retransmissions, not on supporting all of TFTP. Your server must work with standard TFTP clients (such as the program tftp found on the CS Solaris machines). Refer to RFC 1350 for a description of the TFTP protocol.

What is and is not required:

Server Output

Your server should emulate the "trace" functionality of TFTP clients, that is - you should print one line to stdout every time a TFTP message is received or sent by your server. An example (just to give you an idea of the kind of info expected):

> hw3 1234 
RRQ received from 128.213.8.240, filename: foo
DATA message sent to 128.213.8.240, block #0
ACK received from 128.213.8.240, block #0 
DATA message sent to 128.213.8.240, block #1
Timeout
DATA message sent to 128.213.8.240, block #1
ACK received from 128.213.8.240, block #1

Deliverables

You should submit all source code files necessary to build your server. If you use a Makefile please include it, if not, you need to include instructions on how to build your server. Your submission must also include a file named README that includes the following:

Grading

Your server will be tested to make sure it works properly. We will use a test client that will do it's best to mess up your server by sending nonsense, occasionally ignoring DATA messages (simulating a lost datagram), responding with inappropriate ACKS, quitting in the middle of a transaction, etc. We will compare the file received by the client to the original file to make sure the transfer worked properly (size and content must match!).

Your testing should include using a tftp client. You can use ^Z to suspend the client in the middle of a (long) file transfer - this can simulate what would happen if a datagram was lost (your server should timeout waiting for an ACK and resend data).

Points will be awarded as follows (partial credit is available for each item):

File transfer works properly with a single, polite client. 30%
Server works properly with multiple (concurrent) polite clients. 15%
Server works properly (resumes a transfer properly) when a few datagrams are lost. 15%
Server works properly with clients that send garbage (server doesn't crash, recovers ongoing transfers when possible) 15%
Style/readability 25%

IMPORTANT NOTES ON GRADING:

  • We will deduct points for memory leaks and zombies!

  • Submitting your files

    Submission of your homework is via email, the general idea is to send an email message with all your files as attachments. There is an automated email submission system that will respond to your submission right away, so you will have a record that we got your files.

    All projects must be submitted via email to netprog-submit@cs.rpi.edu. The subject line of the submission message should contain a single number indicating the project number (3 for HW2). You must include your files as attachments, feel free to send a zip-file or a tar file.

    Don't send compiled code!

    You can expect a return email indicating receipt of your project submission immediately. This receipt will include a list of all the files that were successfully extracted by the submission script - please look over the receipt carefully to make sure your submission worked.

    Multiple Submissions: You can resubmit up to 10 times for each project, we will always grade the last submission received unless you tell us otherwise.

    Notes, Hints and Links