Hi expert, I\'m not looking for someone to do this problem for me. Rather, pleas
ID: 3593810 • Letter: H
Question
Hi expert,
I'm not looking for someone to do this problem for me. Rather, please treat this like I've come to visit you in your office hours. Have a look at my answer, tell me if I'm on the right track, and if I'm not please give me a hint to get going in the right direction. Thanks!
Question preamble: UDP and TCP use 1s complement for their checksums.
My answer:
If UDP sent the sum instead of the checksum, the recipient would need to compare the sum it received to the sum it computes (i.e. it would have to check two bit sequences for equality). This would certainly be slower than checking whether a sequence of bits is all ones or not, as happens when we send a checksum.
Explanation / Answer
You are right about speed but its not on comparison front.
Main point to focus is checksum is endian independent.
There are various kind of machines (big endian and little endian) and to compute sum you need to swap bytes received to compute sum.
Also one more thing: checksum is not compared
receiver compute checksum of entire packet and that checksum should be 0.
So using this technique it never have to bother on whether checksum was computed on a big endian or a little endian machine.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.