Wireshark-dev: Re: [Wireshark-dev] tvb_reported_length vs tvb_captured_length

From: Jaap Keuter <jaap.keuter@xxxxxxxxx>
Date: Tue, 4 Jun 2019 22:22:38 +0200
Hi,

When a dissector returns an integer value it returns the amount of packet data it has dissected to its calling dissector. Therefore, if a dissector intends to dissect all data it can return the length of the captured data it is handed. Therefore it uses tvb_captured_length.


On 4 Jun 2019, at 11:51, Bruno Verstuyft <bruno.verstuyft@xxxxxxxxxxxx> wrote:


However, in the developer documentation "Adding a basic dissector" (https://www.wireshark.org/docs/wsdg_html_chunked/ChDissectAdd.html), the dissect_foo function returns tvb_captured_length.