Relative Content

Tag Archive for rustudp

UDP header calculation

I need to write a loopless version of UDP header calculation for a fixed length packet. My packet has always exactly 13 bytes of payload. I made the following test program for it, but for some reason I can’t get the right answer from reading the UDP checksum spec. Any ideas where the problem is?