<<On Tue, 16 Nov 1999 15:17:43 +1100 (EST), Bruce Evans <[EMAIL PROTECTED]> said:

> Perhaps the above should be written as:

>               sum += ntohs(*(u_char *)w << 8);

> to avoid the undefined union access (answer.us).

No.  The IP checksum is defined in a manner which is
endian-independent.  Adding calls to ntohs() would only confuse
matters further.

-GAWollman

--
Garrett A. Wollman   | O Siem / We are all family / O Siem / We're all the same
[EMAIL PROTECTED]  | O Siem / The fires of freedom 
Opinions not those of| Dance in the burning flame
MIT, LCS, CRS, or NSA|                     - Susan Aglukark and Chad Irschick


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to