From owner-freebsd-net Tue Mar 12 17:27:34 2002 Delivered-To: freebsd-net@freebsd.org Received: from rwcrmhc51.attbi.com (rwcrmhc51.attbi.com [204.127.198.38]) by hub.freebsd.org (Postfix) with ESMTP id 8023A37B416 for ; Tue, 12 Mar 2002 17:27:32 -0800 (PST) Received: from blossom.cjclark.org ([12.234.91.48]) by rwcrmhc51.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20020313012732.ORWS2626.rwcrmhc51.attbi.com@blossom.cjclark.org>; Wed, 13 Mar 2002 01:27:32 +0000 Received: (from cjc@localhost) by blossom.cjclark.org (8.11.6/8.11.6) id g2D1RRS34399; Tue, 12 Mar 2002 17:27:27 -0800 (PST) (envelope-from cjc) Date: Tue, 12 Mar 2002 17:27:27 -0800 From: "Crist J. Clark" To: mark tinguely Cc: alpha_byte@centras.lt, ryan@sasknow.com, freebsd-net@FreeBSD.org Subject: Re: help with tcp checksum Message-ID: <20020312172727.I29705@blossom.cjclark.org> References: <003901c1c911$b5f90f30$a61b3bd4@alpha> <200203121538.g2CFcYA03380@web.cs.ndsu.nodak.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200203121538.g2CFcYA03380@web.cs.ndsu.nodak.edu>; from tinguely@web.cs.ndsu.nodak.edu on Tue, Mar 12, 2002 at 09:38:34AM -0600 X-URL: http://people.freebsd.org/~cjc/ 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 On Tue, Mar 12, 2002 at 09:38:34AM -0600, mark tinguely wrote: > > 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. Well... It depends. Due to the nature of the checksum algorithm, it really doesn't matter whether the data is in host order or network order provided all of the data is stored consistently. -- Crist J. Clark | cjclark@alum.mit.edu | cjclark@jhu.edu http://people.freebsd.org/~cjc/ | cjc@freebsd.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message