The assignment is due Monday, February 11, 6.59 pm EDT, to be submitted via CourseWorks.
Some of the questions below are research questions, where you are asked to find information about a particular issue. You may use the Engineering Library, any text books you have, one of the paper from the class readings, or the web to come up with answers. Be sure to cite your sources. Generally, a paragraph or two should be sufficient to answer the question. There is no need to write a tutorial.
Readings: RFC 1287, RFC 2775, Jerome H. Saltzer, David P. Reed, and David D. Clark. End-to-end arguments in system design. ACM Transactions on Computer Systems 2, 4 (November 1984) pages 277-288
Build a "ping-pong" application that uses threads,
select() or poll() to receive UDP packets sent
to port 5000. Upon receiving the packet, your application should return
it to the sender, after waiting for 500 ms. The packet contains a text
string with a counter, which is incremented on each transmission, e.g.,
a node that receives a packet with counter value 17 would return one
with counter 18.
You can use any port number you like, but 5000 is recommended. (That port number has been unblocked on the MRL machines.)
The cycle repeats, so that an observer would see packets echoing back and forth between the two systems.
To get things started automatically, each system should start a timer when waiting for a packet. The timer value should be chosen randomly, i.e., differently for each invocation of your client, and range between 2 and 5 seconds. If there is no packet within that interval, the client initiates the ping-pong. There is a slight chance that both sides will start transmiting, but this should be rare.
Each side should print out the counter (sequence number) in the packet and the timestamp when the packet was received and the answer was sent.
The destination address for the packets is specified as a commandline argument -d, as in
(berlin)$ pingpong -d chicago.cs.columbia.edu (chicago)$ pingpong -d berlin.cs.columbia.eduif you want the two machines, berlin and chicago, to play ping-poing with each other.
The application can be written in C, C++, C# or Java. You may choose either Linux, Solaris or Windows (XP). The programming style guidelines apply.
You should also capture the exchange for about 10 packets, including the start-up, using Ethereal or tcpdump. Include the dump, as a text file or dump file, with your assignment.