Ethereal-dev: Re: [Ethereal-dev] Am I insane?

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: David Frascone <dave@xxxxxxxxxxxx>
Date: Thu, 8 Feb 2001 14:43:14 -0600
On Thu, Feb 08, 2001 at 12:37:55PM -0800, Guy Harris wrote:
> > I'm sending and receiving TCP packets.  But, it seems that the tvbuffs are
> > truncating my packet.
> > 
> > The packet starts out with a length of 168 bytes, but when I do a 
> > tvb_length(tvb), it returns 92 bytes.  This is at the top level, before
> > any subsets are made.
> 
> I.e., you're doing a "tvb_length()" call in, say, "dissect_eth()", that
> being "the top level, before any subsets are made"?
> 
> If you're doing a "tvb_length()" call in, say, the DIAMETER dissector,
> the length will be the length of the captured part of the DIAMETER
> payload, i.e.  the length of the captured part of the packet *after the
> link-layer, IP, and TCP headers have been stripped off* - because, in
> that case, subsets *have* been made by all the dissectors above you.

Right.  And that's the part that's getting truncated to 92 bytes.  The
TCP payload is truncated.  (assuming that tvb_length is refering to the
payload at this point).