Results 1 to 2 of 2
I want to write a program to generate udp checksum to validate my progra, I need some real data. I send a udp packet from one machine to another machine, ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 03-19-2013 #1
- Join Date
- May 2012
UDP checksum inconsistency between sender and receiver
I want to write a program to generate udp checksum
to validate my progra, I need some real data.
I send a udp packet from one machine to another machine, the packet can be correctly received by the udp server.
I captured the packet using tcp dump on both machines
from the udp client machine, the udp packet and pseudo IPV4 header bytes are(HEX format):
pseudo header src dst ip: 8a60c948 8a60c96d proto_num len: 0011 0016 UDP header: 83d87d000016 a79e data: 49276d206e6f 742068657265210a
pseudo header src dst ip: 8a60c948 8a60c96d proto_num and len: 0011 0016 UDP header: 83d87d000016 c2c5 data: 49276d206e6f 742068657265210a
where the checksum field is replaced by 0x0000
but we see that the checksum is changed from 0xa79e on the client to 0xc2c5 on the server side. why this change happens? and which is the correct udp header checksum?
- 03-21-2013 #2
- Join Date
- Sep 2003
Have you tried sending different UDP packets to see what happens? Maybe you can detect a pattern.
From the wikipedia page for UDP, the checksum is optional. So it's possible that one or both of the machines you're using is not actually calculating a checksum, and is instead just putting junk in the checksum field.