COSC 4300 Networks and Internets

Fall 2014

Homework Assignment #7

User Datagram Protocol
"Gain a modest reputation for being unreliable
and you will never be asked to do a thing."
-- Unknown
Due: Wednesday, November 5th, 11:59pm CST
Submit: Turn in your entire kernel source code using the turnin command on the Systems Lab machines.
Please run "make clean" in your compile/ subdirectory before submitting. Work is to be completed in teams. Only one team member should turnin, but it would be courteous to notify your teammate(s) when you do this. Names of authors should be included in all work. You may submit multiple times, but only the last turnin will be kept. The automatic submission system will not accept work after the deadline.

User Datagram Protocol

Building upon your Embedded Xinu kernel from the previous assignment, implement a basic UDP socket interface that allows network applications to send and receive datagrams.

Your new component should feature the following:

When you have this working, add two simple shell commands to test out your UDP sockets: echo and rdate.

The echo command should take an IP address and a port number as arguments. UDP port 7 is the standard assignment for the "echo" server. Most Internet hosts now shut this port down for security purposes, but Morbius will answer traffic on this port from within MSCS and the XinuNet. UDP messages sent to port 7 on Morbius will be echoed back to the sender.

You can test how this should respond on Linux clients with the command: telnet host 7.

The rdate command should take an IP address and a port number as arguments. UDP port 37 is the well-known port for the "time" service. Sending a packet to port 37 will result in the server replying with a 4-byte response that is the number of seconds since midnight, January 1st, 1900 GMT. There are standard algorithms for converting this into the current clock time.

You can test how this should respond on Linux clients with the command: rdate -p host. Morbius and Zen will both respond to rdate requests.

If your routing component is working correctly, you should be able to test both of these services using destination address on both the private XinuNet and the public Systems Lab network.


[Revised 2012 Oct 12 13:19 DWB]