Wireshark-dev: Re: [Wireshark-dev] [Wireshark-commits] rev 44860: /trunk/ /trunk/asn1/camel/: c
From: Jeff Morriss <jeff.morriss.ws@xxxxxxxxx>
Date: Tue, 18 Sep 2012 16:23:46 -0400
Bill Meier wrote:
On 9/18/2012 3:35 PM, Jeff Morriss wrote:
darkjames@xxxxxxxxxxxxx wrote:
http://anonsvn.wireshark.org/viewvc/viewvc.cgi?view=rev&revision=44860

User: darkjames
Date: 2012/09/10 02:40 PM

Log:
 Initial commit to support yet another method of passing data between
dissectors.

 Add new parameter 'data' to heur_dissector_t and new_dissector_t, for
now it's always NULL

Does anybody have an idea of how to handle this in custom dissectors
which need to be compiled in both 1.8 and trunk (without branching said
dissectors--something I really would like to avoid)?

I'm contemplating putting a macro in packet.h like
DISSECTORS_HAVE_DATA_PARAM and adding the appropriate #ifdef/#else logic
in my custom dissectors.  Any objections?  Any better ideas?
___________________________________________________________________________

I haven't paid any attention to this change
("yet another ... passing data ...").

I gather that it's not backwards compatible ?

Um, that would seem to mean that many private custom dissectors will need to change (with a macro or whatever) when 1.10 is released (if not bfore).

Yes, builds of old-style dissectors now fail with:

error: passing argument 2 of 'heur_dissector_add' from incompatible pointer type



Following Evan's idea/bug 6134 I'm looking at adding VERSION_XXX macros. It looks like the bug already has it for Windows and the autofoo stuff was easy enough; now I just have to see about getting it to work with cmake (my current autofoo patch would, from the looks of it, break cmake).