ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
April 17th, 2024 | 14:30-16:00 SGT (UTC+8) | Online

Wireshark-dev: Re: [Wireshark-dev] Gaining access to ff_pa_action_codes_ext from other protocol

From: Peter Wu <peter@xxxxxxxxxxxxx>
Date: Thu, 4 Jun 2020 12:07:51 +0200
On Wed, Jun 03, 2020 at 11:17:01AM -0700, Richard Sharpe wrote:
> Hi folks,
> 
> Some protocols define status values etc in terms of 802.11.
> 
> I am trying to get the latest changes for IEEE1905 into Wireshark and
> have an issue where one or more dissector functions needs access to
> ff_pa_action_codes_ext.
> 
> What is the best way to handle this?
> 
> 1. Make it non static and allow the linker to deal with it?

This is common. If it is just within the libwireshark (epan/) library,
you do not even need WS_DLL_PUBLIC or similar. Either declare it through
a header, or use 'extern value_string_ext ff_pa_action_codes_ext;' in
both the user and provider.

Kind regards,
Peter

> 2. Provide a function that retrieves a pointer to it?
> 
> 3. Some other mechanism?