kernels/linux-2.4.0/arch/ia64/lib/checksum.c
/*
 * computes the checksum of a memory block at buff, length len,
 * and adds in "sum" (32-bit)
 *
 * returns a 32-bit number suitable for feeding into itself
 * or csum_tcpudp_magic
 *
 * this function must be called with even lengths, except
 * for the last fragment, which may be odd
 *
 * it's best to have buff aligned on a 32-bit boundary
 */
computes the checksum of a memory block at buff, length len,
and adds in "sum" (32-bit)

returns a 32-bit number suitable for feeding into itself
or csum_tcpudp_magic

this function must be called with even lengths, except
for the last fragment, which may be odd

it's best to have buff aligned on a 32-bit boundary
computes the checksum of a memory block at buff length len and adds in " sum " ( 32 - bit ) returns a 32 - bit number suitable for feeding into itself or csum_tcpudp_magic this function must be called with even lengths except for the last fragment which may be odd it ' s best to have buff aligned on a 32 - bit boundary
unsigned int csum_partial(const unsigned char * buff, int len, unsigned int sum)
{
	unsigned long result = do_csum(buff, len, 0);
	result += sum;
	result = (result & 0xffffffff) + (result >> 32);
	return result;
}
unsigned int csum_partial ( const unsigned char * buff , int len , unsigned int sum ) { unsigned long result = do_csum ( buff , len , 0 ) ; result += sum ; result = ( result & 0xffffffff ) + ( result >> 32 ) ; return result ; }
computes the checksum of a memory block at buff, length len,
 and adds in "sum" (32-bit)
computes the checksum of a memory block at buff length len and adds in " sum " ( 32 - bit )
/* add in old sum, and carry.. */ /* 32+c bits -> 32 bits */