<<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
- Re: egcs -O breaks ping.c:in_cksum() Pierre Beyssac
- Re: egcs -O breaks ping.c:in_cksum() Sheldon Hearn
- Re: egcs -O breaks ping.c:in_cksum() Dmitrij Tejblum
- Re: egcs -O breaks ping.c:in_cksum() Garrett Wollman
- Re: egcs -O breaks ping.c:in_cksum() Pierre Beyssac
- Re: egcs -O breaks ping.c:in_cksum() Bruce Evans
- Re: egcs -O breaks ping.c:in_cksum... Pierre Beyssac
- Re: egcs -O breaks ping.c:in_c... Sheldon Hearn
- Re: egcs -O breaks ping.c:in_c... Pierre Beyssac
- Re: egcs -O breaks ping.c:in_c... Bruce Evans
- Re: egcs -O breaks ping.c:in_cksum... Garrett Wollman
- Re: egcs -O breaks ping.c:in_cksum() Matthew Dillon
- Re: egcs -O breaks ping.c:in_cksum() Pierre Beyssac
- Re: egcs -O breaks ping.c:in_cksum() Pierre Beyssac
- Re: egcs -O breaks ping.c:in_cksum... Kris Kennaway
- Re: egcs -O breaks ping.c:in_c... Pierre Beyssac
- Re: egcs -O breaks ping.c:in_c... Poul-Henning Kamp
- Re: egcs -O breaks ping.c:in_c... Pierre Beyssac
- Re: egcs -O breaks ping.c:in_cksum() Andrew Reilly