Hi,

without haven't checked this particular case i know that these things often
work this way:

The checksum is included in the data that the checksum is being generated 
on. You initially set this to some fixed number (e.g. ffff) and then calculate
the checksum over the entire data including this preset checksum value. You
replace this fake checksum with the real value you get from this calculation.

The receiver again computes the checksum over everything incl. the checksum
field. The result must be a fixed value (e.g. the initial 0xffff). If it 
differs from this value the checksum verification failed.

I hope this was understandeable. As i said: I didn't check if uip works this 
way but these things often work this way.

Regards,
  Till


Am Donnerstag, 30. November 2006 09:19 schrieb Rajesh N R:
> Hi,
> I am going through the uIP code.  In the uip.c file the IP header checksum
> is compared with 0xFFFF.
>
> if(uip_ipchksum() != 0xffff) { /* Compute and check the IP header
>         checksum. */
>     UIP_STAT(++uip_stat.ip.drop);
>     UIP_STAT(++uip_stat.ip.chkerr);
>     UIP_LOG("ip: bad checksum.");
>     goto drop;
>   }
>
> Here if the checksum is not equal to 0xffff, the packet is dropped.
> That means the IP header checksum value is always 0xffff.
>
> Please comment. I am not able to understand the concept.  Thanks a lot.
>
>
> with regards,
>
>
> Rajesh NR
> CDAC-T
>
>
> ______________________________________
> Scanned and protected by Email scanner

-- 
Dr. Till Harbaum <[EMAIL PROTECTED]>

Reply via email to