Calculating UDP Checksum - HOW?

Henderieckx Filip Filip.Henderieckx at siemens.atea.be
Tue Jul 23 20:44:56 EDT 2002


Hello,

Thank you for your answer.

I understand now the fact that SetTCPChecksum corrupts the UDP/RTP packet.
But what I still don't understand is that after this SetTCPChecksum
operation the UDP Checksum seems to be correct (i.e. this is what a tool
like Ethereal tells me... but of course, it can also be a tool problem)
although the UDP Checksum hasn't changed (See also the example I posted
before). Is this explainable from what you know from TCP and/or UDP
checksums?

kind regards

Filip

-----Original Message-----
From: Eddie Kohler [mailto:kohler at icir.org]
Sent: dinsdag 23 juli 2002 19:34
To: Henderieckx Filip
Cc: click at amsterdam.lcs.mit.edu
Subject: Re: Calculating UDP Checksum - HOW? 


> This seems very strange to me and in fact this can't be a coïncidence.
> 
> Do you have any explanation for this fact? Is it logical to you?

Yes, it makes perfect sense. SetTCPChecksum doesn't check to make sure that
its packet is TCP. (This is by design. Many Click elements do minimal
checking to avoid redundant computation.) Therefore it treated your packet
like a TCP packet and modified the TCP checksum, which occurs at offsets
16-17 past the end of the IP header. This is in the middle of your RTP
header, I'd guess. The UDP checksum occurs at offsets 6-7.

Eddie




More information about the click mailing list