Date: Wed, 11 Sep 2002 21:40:03 +0430 From: "soheil h" <soheil_h_y@hotmail.com> To: freebsd-net@FreeBSD.ORG Subject: computing the Ack Seq. No. Message-ID: <F150NQptgFrYILoygXL0000047f@hotmail.com>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?F150NQptgFrYILoygXL0000047f>