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

Ethereal-dev: Re: [Ethereal-dev] Sharing code between two dissectors

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Guy Harris <gharris@xxxxxxxxx>
Date: Sat, 13 Mar 2004 01:38:02 -0800
On Fri, Mar 12, 2004 at 02:55:17PM -0800, Michael Lum wrote:
> What is the best/correct way to share some code between two dissectors ?
> 
> I want to share some #defines and routines for dissecting GSM Supplemenatary
> Services.
> 
> The code will need to execute in GSM MAP and GSM A interface dissectors.
> 
> Or maybe I should write a dedicated dissector ?

If you could argue that the GSM Supplementary Services are a protocol,
then you could argue that it should have its own dissector.

If not, you might still want to have a "packet-gsm_ss.c" or whatever
with the routines, and a "packet-gsm_ss.h" or whatever with the #defines
and declarations of the routines.