Another very useful tool you may want to play around with is ethereal. What are good references for dealing with protocol headers?
• Unix Network Programming, Stevens • Network sorcery RFC source book • RFC 826 (ARP) • RFC 791 (IP) • RFC 792 (ICMP) • /usr/include/netinet/ip.h • /usr/include/netinet/ip_icmp.h • /usr/include/netinet/arp.h I tried running the skeleton code and then accessing one of the webservers, however it doesn’t work. Is there something wrong? No, that is how it should be .The skeleton code currently does pretty much nothing. It sits there, waits for packets and just drops them. With the skeleton code you can’t access any web page. You will see the ARP requests from the first hop, but since the stub code does not reply, the first hop does not know which hardware address to send the first TCP packet (SYN) to. To access the web pages you will have to write code. Actually if you can access a web page you have completed significant portions of the assignment! How do I write and test a function that calculates the IP Checksum The algorithm as well as sample source code is in Peterson & Davie, page 95.