Wireshark mailing list archives
Re: Call register_stat_menu_item from a plugin
From: Stephen Fisher <steve () stephen-fisher com>
Date: Wed, 17 Nov 2010 21:15:33 -0700
On Thu, Nov 18, 2010 at 12:21:36AM -0000, Alistair Evans wrote:
After looking through some of the code in wireshark, I can see that I need to call register_stat_menu_item in order to create that menu item. With this in, the code compiles, but does not link.
In case you're not aware: there is functionality in Wireshark to build a basic statistics tree with information from a dissector (including plugins). You can read about it in README.stats_tree in the doc directory of the source code. The register_stat_menu_item() function is currently only called from code in the gtk directory, which can listen for tapped data from a dissector (for example, export_object_http.c). Other plugins call gtk code, but not the stats menu. Is it a requirement that you make your code a plugin? You can write generic GTK code in a plugin, but not functions in our libui. I suppose you could modify the plugin makefiles sufficiently to link in everything you need. For example, look at the Wireshark libraries that are linked in to build Wireshark itself with automake (Unix): wireshark_LDADD = \ gtk/libui.a \ codecs/libcodec.a \ wiretap/libwiretap.la \ epan/libwireshark.la \ wsutil/libwsutil.la \ That should satisfy the dependencies that libui has for other Wireshark functions. Someone else may have other ideas.. ___________________________________________________________________________ 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:
- Call register_stat_menu_item from a plugin Alistair Evans (Nov 17)
- Re: Call register_stat_menu_item from a plugin Stephen Fisher (Nov 17)
- Re: Call register_stat_menu_item from a plugin Guy Harris (Nov 17)
- <Possible follow-ups>
- Re: Call register_stat_menu_item from a plugin Alistair Evans (Nov 18)
- Re: Call register_stat_menu_item from a plugin Stephen Fisher (Nov 17)