Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: [Wireshark-dev] Multible Dissectors creating the same Dissector Table

From: Andreas Wilkes <wilkesan@xxxxxxxxxxxxxxxxx>
Date: Thu, 21 Feb 2013 11:29:02 +0100
Hello,

I am currently working on a protocol stack which is not fully standardized and still under development.
The Protocol stack is: Ethernet > ProtocolA > ProtocolB,C or D
My Problem is There are multiple Versions of Protocol A and multiple Dissectors for Protocol A.
I since my focus is on the following protocols I want to write a Dissector for A which works on all Protocol Versions and therefore registers all Dissector Tables which get registered by the existing Dissectors for A.
The Problem is, you can't register a dissector Table that is already registered. Therefore my dissector will crash wireshark if any other dissector for A is present.

Is there a way to avoid double registration but still register the missing dissector tables of the Protocol Versions where no dissector is present?

Maybe there is a possibility that some code of my dissector can be executed between the register and the register_handout method where i can check which dissector tables has been created and which has not.

with kind regards

Andreas Wilkes