Wireshark mailing list archives

Re: Parameter passing when using a dissector table to call a sub-dissector


From: Anders Broman <anders.broman () ericsson com>
Date: Thu, 19 Oct 2017 07:35:42 +0000


-----Original Message-----
From: Wireshark-dev [mailto:wireshark-dev-bounces () wireshark org] On Behalf Of Richard Sharpe
Sent: den 18 oktober 2017 19:15
To: Developer support list for Wireshark <wireshark-dev () wireshark org>
Subject: [Wireshark-dev] Parameter passing when using a dissector table to call a sub-dissector

Hi folks,

During the review of a new protocol dissector it was suggested that I add a dissector table for the TLVs that are in 
the protocol so that other dissectors can use them.

This raises an issue, however. The filter expressions for such dissected results will always be those of the dissector 
was written for, however, if you are using another dissectors sub-dissectors you would like to be able to override 
their search strings.

For example, consider the following hf initialization:

        { &hf_ieee1905_beacon_metrics_response_status,
          { "Response status", "ieee1905.beacon_metrics.status",
            FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},

If the dissector using this was called from another dissector, say blah, it would probably want to override the string 
"ieee1905" with "blah" ...

There is the obvious solution, I guess, of dividing the filter expression into two fields.

Are there any good suggestions?


The function called from the dissector table could take a struct including the hf to use as input data. Similar to the 
BER dissector.
Regards
Anders
_____________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev () wireshark org>
Archives:    https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request () wireshark org?subject=unsubscribe
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev () wireshark org>
Archives:    https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request () wireshark org?subject=unsubscribe

Current thread: