Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 2 Aug 2000 15:40:55 -0500 (CDT)
From:      Guy Helmer <ghelmer@cs.iastate.edu>
To:        Clinton Xavier Berni <xavier@cs.duke.edu>
Cc:        freebsd-net@FreeBSD.ORG
Subject:   Re: confused about th_ack
Message-ID:  <Pine.HPX.4.05.10008021533460.5902-100000@popeye.cs.iastate.edu>
In-Reply-To: <Pine.GSO.4.21.0008021450010.29950-100000@mackerel.cs.duke.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 2 Aug 2000, Clinton Xavier Berni wrote:

> 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_id    - the ip fragment id
> ip_off   - the offset of the fragment

The fragment offset must be 0 for you to decode a TCP header in the
packet.  Each of your decodes shows an ip_off of 64...

I'd suggest using "tcpdump tcp and port 80" to grab & decode the same
packets you are decoding in the kernel.  Compare the tcpdump results with
your own code to discover whether your code is working properly.  th_seq
and th_ack are most likely increasing as one would expect...

Hope this helps,
Guy

Guy Helmer, Ph.D. Candidate, Iowa State University Dept. of Computer Science 
Research Assistant, Dept. of Computer Science   ---   ghelmer@cs.iastate.edu
http://www.cs.iastate.edu/~ghelmer



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.HPX.4.05.10008021533460.5902-100000>