Date: Thu, 12 Sep 2002 14:06:33 -0700 (PDT) From: John Polstra <jdp@polstra.com> To: net@freebsd.org Cc: soheil_h_y@hotmail.com Subject: Re: computing the Ack Seq. No. Message-ID: <200209122106.g8CL6XvX033841@vashon.polstra.com> In-Reply-To: <F129kqC5EtrUVYKkpLT000003bd@hotmail.com>
index | next in thread | previous in thread | raw e-mail
In article <F129kqC5EtrUVYKkpLT000003bd@hotmail.com>, soheil h <soheil_h_y@hotmail.com> wrote: > Hi list > accourding to my code > does anyone think that i must make the th_off ntohsed ????????? > NTOHS(th_off) ????????? > Please verify me > i know that i didn't do that > thanx No, th_off is not a multibyte field, so you don't have to byte swap it. But you do have to byte swap the sequence number (ntohl), the ack (ntohl), and the ip length (ntohs) before you do calculations on them. And then you have to swap the results back (htonl, htons) before you send them out the network. John -- John Polstra John D. Polstra & Co., Inc. Seattle, Washington USA "Disappointment is a good sign of basic intelligence." -- Chögyam Trungpa To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the messagehome | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200209122106.g8CL6XvX033841>
