Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Ethereal-dev: Re: [Ethereal-dev] Handling of TVBs

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

From: Guy Harris <gharris@xxxxxxxxx>
Date: Fri, 27 Dec 2002 13:53:30 -0800
On Fri, Dec 27, 2002 at 05:01:42PM +0100, Michael Tuexen wrote:
> But should not the case reported length <> length also raise an 
> exception?

No, it should not necessarily do so.  That will often be the case, for
example, if you have captured with a snapshot length less than the
maximum packet length, as the reported length will be the length of the
packet as delivered to the machine running Ethereal and the length will
be the length of the packet after trimming the packet to the snapshot
length.

If by "<>" you meant "<", then, at least in the case of packets from the
link layer, that "should not happen", and probably means a corrupt
capture file or a bug in the capture mechanism or libpcap.  The correct
fix for that might just be to have Wiretap reduce the length so that
it's <= the reported length.