From owner-freebsd-net Wed Sep 11 10:10: 8 2002 Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 22A3837B405 for ; Wed, 11 Sep 2002 10:10:04 -0700 (PDT) Received: from hotmail.com (f150.law9.hotmail.com [64.4.9.150]) by mx1.FreeBSD.org (Postfix) with ESMTP id DF1AD43E4A for ; Wed, 11 Sep 2002 10:10:03 -0700 (PDT) (envelope-from soheil_h_y@hotmail.com) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Wed, 11 Sep 2002 10:10:03 -0700 Received: from 80.75.12.10 by lw9fd.law9.hotmail.msn.com with HTTP; Wed, 11 Sep 2002 17:10:03 GMT X-Originating-IP: [80.75.12.10] From: "soheil h" To: freebsd-net@FreeBSD.ORG Subject: computing the Ack Seq. No. Date: Wed, 11 Sep 2002 21:40:03 +0430 Mime-Version: 1.0 Content-Type: text/plain; format=flowed Message-ID: X-OriginalArrivalTime: 11 Sep 2002 17:10:03.0851 (UTC) FILETIME=[11DE81B0:01C259B6] 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 hi list I wrote the code below and it doesn't work correctly for computing the th->th_ack ( the ack seq. no.) please tell me what is wrong int len, tlen; tcpiphdr ti, ti_send; int hlen; int acklen; /* the hlen is ip header hlen */ .... /* the ip->ip_len is ntohs'ed by NTOHS in io_input() */ len = ti->ti_len; tlen = ti->ti_off << 2; acklen = len - hlen - tlen; ti_send->ti_ack = htonl(ntohl(ti->ti_seq) + acklen ); /* this field is incorrect and i don't know why */ .... thanx _________________________________________________________________ Join the world’s largest e-mail service with MSN Hotmail. http://www.hotmail.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message