aboutsummaryrefslogtreecommitdiffstats
path: root/doc/README.plugins
diff options
context:
space:
mode:
authorRoland Knall <roland.knall@br-automation.com>2015-06-05 11:19:37 +0200
committerAnders Broman <a.broman58@gmail.com>2015-06-25 16:23:08 +0000
commitacc581081e84c93e878a678fbb3655aba253607a (patch)
tree10ad9f0c0195475d01f42d64509e0c6ef53abb79 /doc/README.plugins
parentd4aa1a1c24e984339806c4ddb000ea9f9b352659 (diff)
Plugin Interface: Add GUI callbacks
Rename ext_menubar to a more appropriate plugin_if. External menus can be implemented by plugins to present additional menus for deep-packet analysis. One side-effect of such menus being implemented as plugins is, that they are being executed in different threads and therefore can only use limited access to the main GUI. Also, there is no safe cross-gui (GTK and Qt) way for many features. This patch implements a first functionality, by which a plugin implemented using ext_menubar can apply a display filter to the main view. For now the implementation supports filtering, as well as saving a preference. Change-Id: Iffe4caa954bbeb8ce356352de4dae348a50efba9 Reviewed-on: https://code.wireshark.org/review/8773 Reviewed-by: Roland Knall <rknall@gmail.com> Petri-Dish: Anders Broman <a.broman58@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'doc/README.plugins')
-rw-r--r--doc/README.plugins26
1 files changed, 23 insertions, 3 deletions
diff --git a/doc/README.plugins b/doc/README.plugins
index eca52da251..e8cac10246 100644
--- a/doc/README.plugins
+++ b/doc/README.plugins
@@ -321,12 +321,14 @@ is encouraged to update their plugins as outlined below:
the DOCSIS plugin.
-6 How to implement a plugin related menu
+6 How to plugin related interface options
+
+6.1 Implement a plugin GUI menu
A plugin (as well as built-in dissectors) may implement a menu within
Wireshark to be used to trigger options, start tools, open Websites, ...
-This menu structure is built using the ext_menubar.h interface and it's
+This menu structure is built using the plugin_if.h interface and it's
corresponding functions.
The menu items all call a callback provided by the plugin, which takes
@@ -365,7 +367,25 @@ Using the Gtk Version and a Mac OSX operating system, this will not work, and
the Gtk interface is currently not supported on this plattform. The Qt interface
on Mac provides the menu.
-For a more detailed information, please refer to ext_menubar.h
+For a more detailed information, please refer to plugin_if.h
+
+6.2 Implement interactions with the main interface
+
+Due to memory constraints on most plattforms, plugin functionality cannot be
+called directly from a DLL context. Instead special functions will be used, which
+will implement certain options for plugins to utilize.
+
+The following methods exist so far:
+
+ /* Applies the given filter string as display filter */
+ WS_DLL_PUBLIC void plugin_if_apply_filter
+ (const char * filter_string, gboolean force);
+
+ /* Saves the given preference to the main preference storage */
+ WS_DLL_PUBLIC void plugin_if_save_preference
+ (const char * pref_module, const char * pref_key, const char * pref_value);
+
+
----------------