aboutsummaryrefslogtreecommitdiffstats
path: root/epan/packet.h
diff options
context:
space:
mode:
authorDario Lombardo <lomato@gmail.com>2016-12-13 12:40:22 +0100
committerMichael Mann <mmann78@netscape.net>2017-01-19 21:40:46 +0000
commit07541f1f680c2dbbfe8a33f81102c711d768ac63 (patch)
tree7de5f44b63b8f9ef048fd5c725514c205999b8e9 /epan/packet.h
parent86c4808518b4a3929f2bdc4b6bab59b87b67b6bd (diff)
epan: add shutdown function for dissectors.
Dissectors can register shutdown functions, that will be called just before program exit. Those function will free the memory allocated during the init function. Change-Id: Id88228af2cc916bfb316fe7b36d46499f6e4f8d4 Reviewed-on: https://code.wireshark.org/review/19282 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/packet.h')
-rw-r--r--epan/packet.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/epan/packet.h b/epan/packet.h
index 496501b27b..5c128d5f4c 100644
--- a/epan/packet.h
+++ b/epan/packet.h
@@ -647,6 +647,11 @@ WS_DLL_PUBLIC void register_init_routine(void (*func)(void));
*/
WS_DLL_PUBLIC void register_cleanup_routine(void (*func)(void));
+/*
+ * Register a shutdown routine to call once just before program exit
+ */
+WS_DLL_PUBLIC void register_shutdown_routine(void (*func)(void));
+
/* Initialize all data structures used for dissection. */
void init_dissection(void);
@@ -685,7 +690,6 @@ WS_DLL_PUBLIC void add_new_data_source(packet_info *pinfo, tvbuff_t *tvb,
/* Removes the last-added data source, if it turns out it wasn't needed */
WS_DLL_PUBLIC void remove_last_data_source(packet_info *pinfo);
-
/*
* Return the data source name, tvb.
*/