Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 2 Aug 2000 15:50:23 -0400 (EDT)
From:      Clinton Xavier Berni <xavier@cs.duke.edu>
To:        freebsd-net@FreeBSD.org
Subject:   confused about th_ack
Message-ID:  <Pine.GSO.4.21.0008021450010.29950-100000@mackerel.cs.duke.edu>

next in thread | raw e-mail | index | archive | help

Hi,

I'm confused about the values for th_ack and th_seq in the tcp header.

First let me provide some background. I'm working at the ip layer, not
tcp. Therefore in order to obtain tcp header information I use the mtod()
and mpullup() routines. If I have a tcp header and source or dest. port is
80 then I print out the following packet header information:

ip_src   - the source ip
ip_dst   - the destination ip
src_port - the source port
dst_port - the destination port
th_ack   - the ack sequence number
th_seq   - the sequence id
ip_id    - the ip fragment id
ip_off   - the offset of the fragment
 
I downloaded a large text file using http. Many of the packets exhibit the
same value for th_ack and th_seq (100s of packets). Is there something
wrong or are there really that many duplicated packets sent and dropped?
Maybe I'm misinterpreting the meaning of th_ack and th_seq?

Here is an example of the packet output:

SYN packet: ip_src 949027736, ip_dst 93062040, src_port 2241, dst_port 80,
th_ack 0, th_seq 31122, ip_id 50254, ip_off 64

SYN packet: ip_src 93062040, ip_dst 949027736, src_port 80, dst_port 2241,
th_ack 31122, th_seq 44343, ip_id 48929, ip_off 64

packet: ip_src 949027736, ip_dst 93062040, src_port 2241, dst_port 80,
th_ack 44343, th_seq 31122, ip_id 50256, ip_off 64

packet: ip_src 949027736, ip_dst 93062040, src_port 2241, dst_port 80,
th_ack 44343, th_seq 31122, ip_id 50261, ip_off 64

packet: ip_src 93062040, ip_dst 949027736, src_port 80, dst_port 2241,
th_ack 31122, th_seq 44343, ip_id 49185, ip_off 64

packet: ip_src 93062040, ip_dst 949027736, src_port 80, dst_port 2241,
th_ack 31122, th_seq 44343, ip_id 49441, ip_off 64

packet: ip_src 93062040, ip_dst 949027736, src_port 80, dst_port 2241,
th_ack 31122, th_seq 44343, ip_id 49697, ip_off 64

packet: ip_src 949027736, ip_dst 93062040, src_port 2241, dst_port 80,
th_ack 44343, th_seq 31122, ip_id 50355, ip_off 64

...

It goes on like this (~120 packets) with ip_id being the only field that
changes.

Any help or explanation would be appreciated.

thanks,
  Xavier 



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?Pine.GSO.4.21.0008021450010.29950-100000>