Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Sep 2002 21:39:21 +0430
From:      "soheil h" <soheil_h_y@hotmail.com>
To:        freebsd-net@FreeBSD.ORG
Subject:   computing the Ack Seq. No.
Message-ID:  <F6467yRLVbNDN4CxpAO000022f6@hotmail.com>

next in thread | raw e-mail | index | archive | help
hi list
I wrote the code below and it doesn't work correctly
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 */
....

_________________________________________________________________
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx


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?F6467yRLVbNDN4CxpAO000022f6>