OK - So just to summarize, we need to:
- Short Term - Add a flag somewhere that can be set by a dissector, post-dissector or tap to request that a proto_tree is produced on the first pass
- Long Term – Add a facility that allows a dissector, post-dissector or tap to request a list of specific protocol field values values during the first pass
Is that right?
-----Original Message-----
From: wireshark-dev-bounces@xxxxxxxxxxxxx [mailto:wireshark-dev-bounces@xxxxxxxxxxxxx] On Behalf Of Guy Harris
Sent: 11 April 2017 04:25
To: Developer support list for Wireshark <wireshark-dev@xxxxxxxxxxxxx>
Subject: Re: [Wireshark-dev] Inconsistent availability of proto_tree values during the first of two passes
On Apr 10, 2017, at 3:04 PM, Paul Offord <Paul.Offord@xxxxxxxxxxxx> wrote:
>> If a tree isn't being generated, because it isn't necessary (e.g., if the code calling the dissectors is only trying to get the column contents) there's presumably no need for TRANSUM - or any other dissector or post-dissector - to
add anything to the non-existent tree.
>
> Agreed, except in the case of TRANSUM the user will probably want to add a TRANSUM-computed value as a column. For example, if you use tshark to just output the Packet List entries (summary lines) it's likely that TRANSUM-computed
values would be included in that listing.
That's not a TRANSUM-specific issue. If the user wants to use *any* custom columns, from *any* dissector or post-dissector field, the protocol tree currently has to be generated - and, given that custom columns work, we *already* arrange
to construct the protocol tree whenever we're asking for columns and at least one column is a custom column (see various calls to have_custom_cols()), so if the code calling the dissectors is only trying to get the column contents *but* at least one column
is a custom column, the tree will be constructed.
___________________________________________________________________________
Sent via: Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
Archives:
https://www.wireshark.org/lists/wireshark-dev
Unsubscribe:
https://www.wireshark.org/mailman/options/wireshark-dev
mailto:wireshark-dev-request@xxxxxxxxxxxxx?subject=unsubscribe