Ip checksum, Computer Networking

This code properly implements the IP checksum function on a 32-bit machine: unsigned short cksum(unsigned short *buf, int count)
unsigned long sum = 0;
while (count--) {
sum += *buf++;
if (sum & 0xFFFF0000) {
sum &= 0xFFFF;
return ~(sum & 0xFFFF);
The if statement performs "wraparound" if the sum over?ows 16 bits. That is, it takes the 1 that over?owed into the 17th bit and adds it to the lower 16 bits of the sum.

Here's how to compute and check the checksum. The sender should perform these actions:

1. Completely ?ll in the IP header, with zero in the checksum ?eld.

2. Compute the checksum and store it in the checksum ?eld.

The receiver should perform these actions:

1. Copy the checksum ?eld's value into a variable.

2. Zero the IP header's checksum ?eld.

3. Compute the checksum over the IP header.

4. Compare the computed checksum value with the value in the variable.

Posted Date: 3/15/2013 1:10:27 AM | Location : United States

Related Discussions:- Ip checksum, Assignment Help, Ask Question on Ip checksum, Get Answer, Expert's Help, Ip checksum Discussions

Write discussion on Ip checksum
Your posts are moderated
Related Questions
Client Once the GUI application is loaded, it will send a request (instance/object of Commands class) to server for a list of files from the server's shared directory.Client wil

Question 1   This question concerns the main security goals (confidentiality, integrity, availability). Describe a situation which provides the goal of confidentiality but does not

Determine about the Complete and proper security Complete and proper security configuration and administration is indeed a complex issue. One should think carefully about the

Recognize the command to disable CDP on an interface Ans) Router(config-if)# no cdp enable

Root DNS Servers A root  server is a serve which  consists of the entire  hierarchy  of servers. A root  server  usually  does not  store any  information  about  domains  but

With an object server, the Client/Server application is taken as a set of communicating objects. Client object commune with server objects using an Object Request Broker (ORB). The

Question: (a) How can governments provide the mobile industry with the long-term clarity and certainty it needs to make substantial capital investments in new networks? (b)

Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4

Q. Explain about Bandwidth – delay product? Bandwidth - delay product - A measure of competence of ARQ system = bandwidth (bits per second) * round-trip delay (in seco

Question: (a) With mobile telecommunications providing an important engine for growth, continuing to stimulate growth and to ensure mobiles remain affordable for all, will re