Wireshark mailing list archives
Re: [Wireshark-commits] rev 44860: /trunk/ /trunk/asn1/camel/: camel.cnf /trunk/asn1/charging_ase/: packet-charging_ase-template.c /trunk/asn1/cmp/: packet-cmp-template.c /trunk/asn1/credssp/: ...
From: Jeff Morriss <jeff.morriss.ws () gmail com>
Date: Tue, 18 Sep 2012 18:00:59 -0400
Evan Huus wrote:
On Tue, Sep 18, 2012 at 3:35 PM, Jeff Morriss <jeff.morriss.ws () gmail com> wrote:darkjames () wireshark org 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 NULLDoes 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 filed something similar as a bug long before I was a core dev: https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6134 I still don't know enough about the build system to feel comfortable fixing it myself once and for all (especially given the mix of autotools, cmake, nmake) but I still think that a general version macro would be a much better way than manually adding a macro for every API change.
OK, I liked that idea too so I checked in some changes to expose VERSION_{MAJOR,MINOR,MACRO} macros.
My private (heuristic) dissector source now looks like: #if defined(VERSION_MAJOR) && (VERSION_MAJOR > 1 || VERSION_MINOR > 8)dissect_FOO(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
#else dissect_FOO(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) #endif which should solve my (and others') build problems nicely enough. :-) ___________________________________________________________________________ Sent via: Wireshark-dev mailing list <wireshark-dev () wireshark org> Archives: http://www.wireshark.org/lists/wireshark-dev Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev mailto:wireshark-dev-request () wireshark org?subject=unsubscribe
Current thread:
- Re: [Wireshark-commits] rev 44860: /trunk/ /trunk/asn1/camel/: camel.cnf /trunk/asn1/charging_ase/: packet-charging_ase-template.c /trunk/asn1/cmp/: packet-cmp-template.c /trunk/asn1/credssp/: ... Jeff Morriss (Sep 18)
- Re: [Wireshark-commits] rev 44860: /trunk/ /trunk/asn1/camel/: camel.cnf /trunk/asn1/charging_ase/: packet-charging_ase-template.c /trunk/asn1/cmp/: packet-cmp-template.c /trunk/asn1/credssp/: ... Evan Huus (Sep 18)
- Re: [Wireshark-commits] rev 44860: /trunk/ /trunk/asn1/camel/: camel.cnf /trunk/asn1/charging_ase/: packet-charging_ase-template.c /trunk/asn1/cmp/: packet-cmp-template.c /trunk/asn1/credssp/: ... Jeff Morriss (Sep 18)
- Re: [Wireshark-commits] rev 44860: /trunk/ /trunk/asn1/camel/: camel.cnf /trunk/asn1/charging_ase/: packet-charging_ase-template.c /trunk/asn1/cmp/: packet-cmp-template.c /trunk/asn1/credssp/: ... Bill Meier (Sep 18)
- Re: [Wireshark-commits] rev 44860: /trunk/ /trunk/asn1/camel/: camel.cnf /trunk/asn1/charging_ase/: packet-charging_ase-template.c /trunk/asn1/cmp/: packet-cmp-template.c /trunk/asn1/credssp/: ... Jeff Morriss (Sep 18)
- Re: [Wireshark-commits] rev 44860: /trunk/ /trunk/asn1/camel/: camel.cnf /trunk/asn1/charging_ase/: packet-charging_ase-template.c /trunk/asn1/cmp/: packet-cmp-template.c /trunk/asn1/credssp/: ... Jakub Zawadzki (Sep 18)
- Re: [Wireshark-commits] rev 44860: /trunk/ /trunk/asn1/camel/: camel.cnf /trunk/asn1/charging_ase/: packet-charging_ase-template.c /trunk/asn1/cmp/: packet-cmp-template.c /trunk/asn1/credssp/: ... Evan Huus (Sep 18)