On Wed, Mar 15, 2000 at 10:32:38AM -0800, Guy Harris wrote:
> > It is important to see the padded area because in this way you could
> > troubleshoot more easily the dissectors (among other things).
> > This implies that every dissector should make a call in the end to
> > dissect_data(...) routine.
>
> ...or provide a "dissect_padding()" routine, and have them all call
> that.
>
> I'm somewhat inclined to see if that could be done in the Ethernet
> dissector,
It can, although...
> However, not all layers above Ethernet necessarily have a simple length
> field that's used to update "pi.len" or "pi.captured_len", as far as I
> know, so that might require the dissectors to update that field
> themselves, or otherwise indicate how much they've dissected.
...dissectors also need to let the Ethernet dissector know how much of
the packet they're processing.
That's now done with "tvb_set_reported_length()", as per my recent mail.
Right now, only the IP dissector sets it, but other dissectors called
from the Ethernet dissector should do so as well. That's all they have
to do - they don't have to take responsibility for actually displaying
the trailer information.
The trailer stuff shows up in the Ethernet section of the protocol tree,
rather than at the end, just as happens with IEEE 802.3 packets.