Date: Tue, 12 Mar 2002 21:41:42 -0500 From: "Louis A. Mamakos" <louie@TransSys.COM> To: mark tinguely <tinguely@web.cs.ndsu.nodak.edu> Cc: alpha_byte@centras.lt, ryan@sasknow.com, freebsd-net@FreeBSD.ORG Subject: Re: help with tcp checksum Message-ID: <200203130241.g2D2fgY28844@whizzo.transsys.com> In-Reply-To: Your message of "Tue, 12 Mar 2002 09:38:34 CST." <200203121538.g2CFcYA03380@web.cs.ndsu.nodak.edu> References: <200203121538.g2CFcYA03380@web.cs.ndsu.nodak.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
> > just a PS reminder that you need to put the IP/ports in network byte > order. appropriate htonl() and htons() must be used if the the values > are not already in network byte order. You may get away with not doing > this on a Sparc (or Alpha?) because of their endian is network byte > order. This actually isn't necessary, as long as you do all the math on the fields in the same byte order. Since 1's complement arithmetic used to compute the Internet checksum includes end-around carry, it just works out. louie To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200203130241.g2D2fgY28844>