Wireshark-dev: Re: [Wireshark-dev] fetching numbers < 8 bits (functions notin libwireshark.def
Date: Fri, 26 Sep 2008 17:35:17 +0200
Hi Jaap, Thanks for the link. I'll file a bug report and upload the updated libwireshark.def file as a patch. I'm unfortunately not on expert on svn or branches, thanks for the documentation link. Hopefully if and when the bug / patch is integrated it will remain in future releases (at least that's what I would expect). I guess it's the wireshark release version that applies, i.e. if ok in 1.0.5 will work with all version above i.e. 1.0.6, 1.0.7 (one branch?) or 1.2.0 etc. (another branch?) provided functions are not removed etc. etc. I'll have a go next week. I must admit being able to "drop" a plugin into a release version and having it work is always nice. If you're lucky I might be able to contribute the plugin, but the internal approval process is unfortunately slow. Thanks, David -----Message d'origine----- De : wireshark-dev-bounces@xxxxxxxxxxxxx [mailto:wireshark-dev-bounces@xxxxxxxxxxxxx] De la part de Jaap Keuter Envoyé : vendredi 26 septembre 2008 16:27 À : Developer support list for Wireshark Objet : Re: [Wireshark-dev] fetching numbers < 8 bits (functions notin libwireshark.def and not available for plugins) Hi, Have a look here http://www.wireshark.org/docs/wsdg_html/#ChSrcSend Furthermore, watch out with statements like "as long as a lower svn version has the functions available in libwireshark.def ... the compiled plugin dll will work correctly on anyone's release of that version or above." This is only true for releases in the same branch. SVN is simple in that respect: one incrementing revision number for everything (files and directories alike). So when an improvement is made in the development tree, it's not automatically available in a earlier release branch even though new maintenance releases in the release branch do have a higher SVN revision number. Have a look at the SVN documentation and http://wiki.wireshark.org/Development/ReleaseNumbers as well. Thanx, Jaap david.castleford@xxxxxxxxxxxxxxxxxx wrote: > Hi everyone, > > I've used the following functions in my own plugin: > > tvb_get_bits8 > tvb_get_bits16 > tvb_get_bits32 > tvb_get_bits64 > > Also > > proto_tree_add_bits_item > proto_tree_add_bits_ret_val > > I've had to add those functions in libwireshark.def (and recompile for > my plugin to work). > > I've looked at svn revision 26134 which corresponds I believe to > release version 1.0.3 and, unless my use of tortoisesvn is wrong, it > seems none of the above functions are in the libwireshark.def file. > > This means that when I move my plugin.dll file to \plugins\1.0.3 > folder and run wireshark (windows xp) I get the following error upon > launch of > wireshark: > "Couldn't load module C:\Program > Files\Wireshark\plugins\1.0.3\plugin.dll: La procédure spécifiée > est introuvable" > i.e. Can't find specified procedure translated from french. > > Experience shows this is due to the above functions being used by my > plugin but not being available to my dll as they are not declared in > libwireshark.def and hence not in the compiled / executable release > version 1.0.3. > > My understanding is that as long as a lower svn version has the > functions available in libwireshark.def and presumably functions are > not changed, the compiled plugin dll will work correctly on anyone's > release of that version or above. e.g. if it works for version 1.0.0 > it should work for all above (though I realise you recommend being > version specific for stability purposes). > > My question is simple enough: could someone please add the above > functions to libwireshark.def? > > I'm not familiar with the bug submission or request procedure and > would greatly appreciate one of the active developers taking this on > board, otherwise I guess I'll have to wait for a future fix and in the > meantime package my own specific wireshark version (kinda defeats the > purpose of wireshark). Not quite sure why all functions aren't > exported in libwireshark.def, is this simply oversight when adding new functions? > > Thanks for your help, > > David > > ---------------------------------------------------------------------- > -- *De :* wireshark-dev-bounces@xxxxxxxxxxxxx > [mailto:wireshark-dev-bounces@xxxxxxxxxxxxx] *De la part de* Martin > Corraine (mcorrain) *Envoyé :* jeudi 21 août 2008 15:03 *À :* > Developer support list for Wireshark *Objet :* Re: [Wireshark-dev] > fetching numbers < 8 bits > > ahh... I had an older version of the readme that didn't have it. sorry. > > Thanks! > > ---------------------------------------------------------------------- > -- > *From:* wireshark-dev-bounces@xxxxxxxxxxxxx > [mailto:wireshark-dev-bounces@xxxxxxxxxxxxx] *On Behalf Of *Anders > Broman > *Sent:* Thursday, August 21, 2008 8:56 AM > *To:* Developer support list for Wireshark > *Subject:* Re: [Wireshark-dev] fetching numbers < 8 bits > > From /doc/readme.developer > > Bit accessors for a maximum of 8-bits, 16-bits 32-bits and 64-bits: > > guint8 tvb_get_bits8(tvbuff_t *tvb, gint bit_offset, gint no_of_bits); > > guint16 tvb_get_bits16(tvbuff_t *tvb, gint bit_offset, gint > no_of_bits,gboolean little_endian); > > guint32 tvb_get_bits32(tvbuff_t *tvb, gint bit_offset, gint > no_of_bits,gboolean little_endian); > > guint64 tvb_get_bits64(tvbuff_t *tvb, gint bit_offset, gint > no_of_bits,gboolean little_endian); > > : > > proto_item* > > proto_tree_add_bits_item(tree, id, tvb, bit_offset, no_of_bits, > little_endian); > > proto_item * > > proto_tree_add_bits_ret_val(tree, id, tvb, bit_offset, no_of_bits, > return_value, little_endian); > > : > > proto_tree_add_bits_item() > > -------------------------- > > Adds a number of bits to the protocol tree which does not have to be > byte aligned. > > The offset and length is in bits. > > Output format: > > ..10 1010 10.. .... "value" (formated as FT_ indicates). > > proto_tree_add_bits_ret_val() > > ----------------------------- > > Works in the same way but alo returns the value of the read bits. > > /Regards > > Anders > > > ---------------------------------------------------------------------- > -- > *From:* wireshark-dev-bounces@xxxxxxxxxxxxx > [mailto:wireshark-dev-bounces@xxxxxxxxxxxxx] *On Behalf Of *Martin > Corraine (mcorrain) > *Sent:* den 21 augusti 2008 14:47 > *To:* Developer support list for Wireshark > *Subject:* [Wireshark-dev] fetching numbers < 8 bits > > Hello, > > I need to read in a number that's 3 bits long. Is this possible? > > Thanks!, > martin > > > ---------------------------------------------------------------------- > -- > > _______________________________________________ > Wireshark-dev mailing list > Wireshark-dev@xxxxxxxxxxxxx > https://wireshark.org/mailman/listinfo/wireshark-dev _______________________________________________ Wireshark-dev mailing list Wireshark-dev@xxxxxxxxxxxxx https://wireshark.org/mailman/listinfo/wireshark-dev
- Follow-Ups:
- References:
- Prev by Date: Re: [Wireshark-dev] fetching numbers < 8 bits (functions not in libwireshark.def and not available for plugins)
- Next by Date: Re: [Wireshark-dev] New IEC60870-5-104 dissector
- Previous by thread: Re: [Wireshark-dev] fetching numbers < 8 bits (functions not in libwireshark.def and not available for plugins)
- Next by thread: Re: [Wireshark-dev] fetching numbers < 8 bits (functionsnotin libwireshark.def and not available for plugins)
- Index(es):