Okay so I have this assignment for my Internet Protocols class to write a software router in C. Working wonderfully actually, learning a whole lot. I have a question though based on the checksum that hopefully someone can answer. All of my IP packets that are forwarded have a decremented TTL and a checksum calculated by a function that was written in the text and when I open them in say ethereal, it says checksum correct. IF there is an error my router is to generate the ICMP error message. This is the encapsulated ICMP error inside an IP packet inside an ethernet packet. The checksum in the ICMP protion is calculated by this function and ethereal says it is wrong. The IP checksum is perfectly fine however. Can anyone think of a reason why this is so? Am I overlooking something in the ICMP checksum. I know ICMP takes a checksum over the entire packet where as IP takes it only over the header. I am still passing into the functin the entire ICMP packet (as a uint16_t as the function needs) and saving the checksum to a member of the ICMP struct, and yes it is the right one. Everything else in the ICMP packet is fine and all other parts of the other packets are fine. Any ideas?