COSC 4300 Networks and Internets
Fall 2012
Homework Assignment #3
Address Resolution Protocol
"Soon silence will have passed into legend.
Man has turned his back on silence.
Day after day he invents machines and devices that increase noise
and distract humanity from the essence of life, contemplation,
meditation."
-- Jean Arp
Due: Wednesday, September 24th, 11:59pm CDT
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.
Address Resolution Protocol
Building upon your Embedded Xinu kernel from the previous assignment,
implement a basic ARP component for the system.
Your new component should go in a network/arp subdirectory,
and should feature the following:
A statically allocated table of discovered mappings from IP addresses to
MAC addresses. Since this is a global data structure shared potentially
by multiple processes, you will want to use a semaphore lock to prevent
any race conditions while updating the table.
A shell command "arp" that can be used to display the current
table, to request a new mapping, or to eliminate an existing mapping.
An "ARP Daemon" process that replies to ARP requests destined for your
router, and handles replies from your requests.
An arpResolve(uchar *ipaddr, uchar *mac) function that takes
an IP address as the first argument, and returns the resolved MAC via the
second argument. This function should return OK if ARP resolution is
successful, and SYSERR otherwise. This is the function that higher layers
of your stack will depend upon. If a previously unknown IP address is
requested, this function should block while a helper process makes up to
three attempts to ARP resolve, at 1 second intervals.
Note the documentation for the current Embedded Xinu Network Playground API.
[Revised 2014 Sep 16 13:50 DWB]