From owner-freebsd-net Tue Mar 12 18:41:51 2002 Delivered-To: freebsd-net@freebsd.org Received: from whizzo.transsys.com (whizzo.TransSys.COM [144.202.42.10]) by hub.freebsd.org (Postfix) with ESMTP id 51E2B37B405 for ; Tue, 12 Mar 2002 18:41:49 -0800 (PST) Received: from whizzo.transsys.com (#6@localhost.transsys.com [127.0.0.1]) by whizzo.transsys.com (8.11.6/8.11.6) with ESMTP id g2D2fgY28844; Tue, 12 Mar 2002 21:41:42 -0500 (EST) (envelope-from louie@whizzo.transsys.com) Message-Id: <200203130241.g2D2fgY28844@whizzo.transsys.com> X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4 To: mark tinguely Cc: alpha_byte@centras.lt, ryan@sasknow.com, freebsd-net@FreeBSD.ORG X-Image-URL: http://www.transsys.com/louie/images/louie-mail.jpg From: "Louis A. Mamakos" Subject: Re: help with tcp checksum References: <200203121538.g2CFcYA03380@web.cs.ndsu.nodak.edu> In-reply-to: Your message of "Tue, 12 Mar 2002 09:38:34 CST." <200203121538.g2CFcYA03380@web.cs.ndsu.nodak.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 12 Mar 2002 21:41:42 -0500 Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org > > 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