The Trivial File Transfer Protocol
TFTP was first defined in 1981 by RFC 783, although the RFC does refer to an earlier "IEN", so it is really the second definition. Currently RFC 1350 is the best reference. What is defined is a truly simple protocol for transferring files using the UDP protocol. Studying the protocol you will learn about achieving reliability by using a positive acknowledgement with retry scheme; and will see some of the pitfalls of even a simple protocol. You will also learn to construct and parse databuffers that become packets.
Instructions
Please look at the proto-man page for mytftp.
Your program should that options, and should use getopt to parse the option string. Getopt is a standard C library call that makes command line options easy, and will also insure that your command line tool follows the same conventions as every other command line tool in the unix tool set. It will implement even rules you don't know about!
Please work in groups of two. One person writes the server code and other the client code. You might consider writing mytftp-server.c and mytftp-client.c and finally linking them together with mytftp.c to get a combination of you and your partner's code
Ports 3000-3999 are open on the AWS machines. Two programs cannot bind to the same port, so the well known port for your tftp server must be adjustable, to avoid other people's ports.
Make a single threaded server at first. For extra-credit make a server capable of simultaneously handling multiple requests.
Steps
Submitting
Create a proj2 directory and put your files there. There should be a Makefile and a mytftp product. Show your test suite with a test target in your Makefile. Your Makefile should contain a clean target. Commit only the sources and test input files. Do not commit binaries.
Author: Burton Rosenberg
Created: January 18, 2014
Last Update: January 18, 2014