Ethereal-dev: Re: [Ethereal-dev] what is tvb_set_reported_length for??

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, 24 Mar 2006 10:28:45 -0800
david martinez wrote:
Hi, i'm developing a dissector but i don`t know what
is command tvb-set_reported_length for;

It's for protocols that have their own length field, which specifies the packet's real length. IPv4, for example, has this - a short IPv4 packet transmitted over Ethernet would be padded to the minimum Ethernet packet length, but, from the point of view of IP and protocols running on top of IP, the length is as specified in the IP total length field, not the length as transmitted on the Ethernet.

it's necessary
that it exists always, becouse,in my dissector,when i
deleted that line the dissector works but if i put
that line it doesn't work.

Does your protocol have a length field like that? What "doesn't work" in your dissector if you don't use tvb_set_reported_length()? Most protocols *don't* need it.