aboutsummaryrefslogtreecommitdiffstats
path: root/epan/proto.h
diff options
context:
space:
mode:
authorJoão Valverde <joao.valverde@tecnico.ulisboa.pt>2017-08-29 15:34:31 +0100
committerJoão Valverde <j@v6e.pt>2017-12-14 22:12:38 +0000
commitcebb8ea20ec2d4c1c1c000304c6cc6e7e9ccb8ad (patch)
tree7f1dfc10f5d802be657a6dcd6d3194b6e723bb9e /epan/proto.h
parent629596ebefa34a2677c341ab899e51cecbe254f0 (diff)
Add new plugin type for libwireshark
Allow epan itself to be extended by plugins. Adds the following new plugin interfaces: void plugin_epan_init() void plugin_epan_dissect_init(epan_dissect_t *) void plugin_epan_dissect_cleanup(epan_dissect_t *) void plugin_epan_cleanup() void plugin_epan_register_all_protocols(register_cb, gointer) [OPTIONAL] void plugin_epan_register_all_handoffs(register_cb, gointer) [OPTIONAL] Any one of these can be an empty function but the first four must be present. The motivation for the change is a better way to implement a language binding other than registering a fake protocol and stuffing everything into a single dissector call (and maybe require an extra packet_info field) but I expect there would be other interesting use cases. Change-Id: I215d50750ac7561fe25fdcdcfbc6a3f351984785 Reviewed-on: https://code.wireshark.org/review/24813 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot Reviewed-by: João Valverde <j@v6e.pt>
Diffstat (limited to 'epan/proto.h')
-rw-r--r--epan/proto.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/epan/proto.h b/epan/proto.h
index 914ee5c7b8..2e6ae3e127 100644
--- a/epan/proto.h
+++ b/epan/proto.h
@@ -921,8 +921,7 @@ WS_DLL_PUBLIC void proto_register_plugin(const proto_plugin *plugin);
#endif
/** Sets up memory used by proto routines. Called at program startup */
-void proto_init(void (register_all_protocols_func)(register_cb cb, gpointer client_data),
- void (register_all_handoffs_func)(register_cb cb, gpointer client_data),
+void proto_init(GSList *register_all_protocols_list, GSList *register_all_handoffs_list,
register_cb cb, void *client_data);