CS 268 - Assignment 4: TFTP Server


Given: March 24, 1998
Due: April 9, 1998
Language Options: C, C++, or Java
OS Options: It must run on Solaris 2.5.1

After DODS was completed, a number of choices for how to retrieve dynamic objects have been discussed. The engineering team has decided to implement a version of Trivial File Transfer Protocol (TFTP) that should provide all the necesary functionality for transferring binary data stored in files.

The task of building this TFTP server has fallen to you as your assignment. You must only honor Read Requests (RRQs) from clients. You must also only honor octet the mode of transfer. And you must only honor files that you have access to. You must also provide error returns on access violations, misunderstood opcodes, and non-existent files. You must use retransmissions to ensure delivery of an ACK or a timeout. Your server must be able to handle multiple concurrent transfers. Appropriate errors messages should be generated for transfer failures. Your server must take a port number argument and print out information about requests and state of a transfer.

Example


$ ./tftpd 2600
should produce output similar to this:

Connect from 157.182.194.28.64357 asking for /tftpboot/MyGUIJ.class
Sending to 157.182.194.28.64357 /tftpboot/MyGUIJ.class on port 32078
Successfully sent to 157.182.194.28.64357 /tftpboot/MyGUIJ.class on port 32078

Extra Credit

Value: up to +3% onto final grade

For extra credit, provide a simple TFTP client that takes a hostname, port, path, and local filename to put the object into. You must provide information for all TFTP errors.

Value: up to +2% onto final grade

For extra credit, tie a DODS client into the TFTP client. In other words, the input would be the input to a DODS client and the output would be a file. You will need to first use DODS to find the location of an object and then use TFTP to retrieve it. Notice that to do this, you need to do a TFTP client as well.


Todd L. Montgomery (revised 03.24.1998)