Plugin2 can be compiled. I tried it only with a range_t but I'll try it in few weeks with an entire UAT table. This probably works only for
 Windows because "__declspec(dllexport)" is Windows-specific.
De : Jeff Morriss <jeff.morriss.ws@xxxxxxxxx>
À : Developer support list for Wireshark <wireshark-dev@xxxxxxxxxxxxx>
Envoyé le : Jeudi, 23 Avril 2009, 17h50mn 36s
Objet : Re: [Wireshark-dev] Tr : Dissector preferences reuse
yvanmmailbox-web@xxxxxxxx wrote:
> I 'm working on 2 plugin dissectors, and I wish to know if it's possible 
> (and if yes, how) to reuse preferences from one plugin to
 another. I 
> need to reuse only a part of the preferences (which is an UAT table, so 
> pretty long and boring to define) from plugin1 to plugin2, considering 
> that protocol2 is included in plugin1 like this:
> plugin1
>     IP struct
>         UDP struct
>             plugin2
> Can the copy_prefs() function be useful? How must I define the 
> preferences in plugin1 to divide it in 2 parts? How to integrate a 
> separated part into preferences of plugin2?
Well, the plugins could simply share the variable that stores the 
preference.  Basically: make the variable not 'static' (so it is visible 
to other modules), put it in a header file (properly 'extern'd), and 
have both plugins include the header file and use the variable.
For an example, see the mtp3_standard preference in
 packet-mtp3.{h,c}.
Note: I know this works for regular dissectors but I don't know if the 
rules are different for plugins--especially on Windows.
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <
wireshark-dev@xxxxxxxxxxxxx>
Archives:    
http://www.wireshark.org/lists/wireshark-devUnsubscribe: 
https://wireshark.org/mailman/options/wireshark-dev             mailto:
wireshark-dev-request@xxxxxxxxxxxxx?subject=unsubscribe