CS 268 - Assignment 3: TFTP Server


Given: October 21, 1999
Due: November 18, 1999
Language Options: C, C++, or Java
OS Options: It must run on Solaris 2.5.1

You are working for a handheld device company. You are asked to develop a method of updating the devices operating systems remotely.The engineering team has decided to use a version of the Trivial File Transfer Protocol (TFTP) that should provide all the necesary functionality for transferring binary data stored in files and be small enough not to take up too much memory in the firmware.

The task of building the TFTP server has fallen to you as your assignment. You must only honor Read Requests (RRQs) from clients. You must also only honor the octet 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. 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.

To test your program you can use the TFTP client, tftp, on many machines.

Example


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

Connect from 157.182.194.28.64357 asking for HandOS7.5.2.bin
Sending to 157.182.194.28.64357 HandOS7.5.2.bin on port 32078
Successfully sent to 157.182.194.28.64357 HandOS7.5.2.bin on port 32078

Extra Credit

Value: up to +7% onto final grade

For extra credit your server must be able to handle multiple concurrent transfers, [+2%] and/or provide support in your previous retrieval programs for TFTP URLs (tftp://hostname[:port]/filename). [+2%] Additionally, your asked to support WriteReQuests (WRQs) so that old OSs can be transferred in from the clients and stored for billing. [+3%].


Todd L. Montgomery (revised 10.20.1999)