math - Why UDP checksum contains the UDP length twice? -


i trying understand udp checksum mechanism. using packet. saw example in summation of field, udp length included twice. why need include udp length twice in checksum ?

this example saw

ip header: source ip address c0a8 … 0291 ip header: destination ip address c0a8 … 0101 ip header: protocol number(zero padded on left) 0011 16 bit udp length 0032 udp header: source port 0618 udp header: destination port 0035 udp header: length 0032 udp data  0001 0100 0001 0000 0000 0000 0131 0131 0331 3638 0331 3932 0769 6e2d 6164 6472 0461 7270 6100 000c 0001 
  • sum hex values 181e
  • carry 4
  • add in carry 1822
  • 1s complement = checksum! e7dd

because that's says in rfc 768. no other answer possible.


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -