On Mon, 2007-10-22 at 17:35 -0700, David Miller wrote:
> Your code is rotating bit 15 down by one bit and bits 0-14 up by one
> bit.

Yes, a 16 bit rotate left.

There was a discussion a few years ago:
http://oss.sgi.com/archives/netdev/2003-10/msg00734.html

>From the spec:

Implementers of DDP should treat generating the checksum as an optional
feature. The 16-bit DDP checksum is computed as follows:

CkSum := 0 ;
FOR each datagram byte starting with the byte immediately following this
Checksum field
REPEAT the following algorithm:
          CkSum := CkSum + byte; (unsigned addition)
          Rotate CkSum left one bit, rotating the
              most significant bit in least significant bit;
IF, at the end, CkSum = 0 THEN
          CkSum := $FFFF (all ones).

Reception of a datagram with CkSum equal to 0 implies that a checksum is
not performed.



-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to