aboutsummaryrefslogtreecommitdiffstats
path: root/epan/epan.c
diff options
context:
space:
mode:
authorJoão Valverde <j@v6e.pt>2021-11-26 20:59:15 +0000
committerGuy Harris <gharris@sonic.net>2021-11-27 08:41:01 +0000
commitc15f2aadc1aef3f4855c682ff7f686d5f63088cb (patch)
treef0042090e6a0f7374e36b70da83ce3009dffd071 /epan/epan.c
parentba85d8ef4d657f3f852eb8ee7e0cc6c2141d086e (diff)
epan: Initialize wiretap
Clients of libwireshark should not be required to initialize explicitly wiretap, if they don't use it themselves.
Diffstat (limited to 'epan/epan.c')
-rw-r--r--epan/epan.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/epan/epan.c b/epan/epan.c
index 85a02ed4ac..9820a4327f 100644
--- a/epan/epan.c
+++ b/epan/epan.c
@@ -21,6 +21,7 @@
#include <wsutil/report_message.h>
+#include <wiretap/wtap.h>
#include <epan/exceptions.h>
#include "epan.h"
@@ -246,6 +247,8 @@ epan_init(register_cb cb, gpointer client_data, gboolean load_plugins)
wireshark_abort_on_too_many_items = FALSE;
}
+ wtap_init(load_plugins);
+
/*
* proto_init -> register_all_protocols -> g_async_queue_new which
* requires threads to be initialized. This happens automatically with
@@ -428,6 +431,8 @@ epan_cleanup(void)
}
wmem_cleanup_scopes();
+
+ wtap_cleanup();
}
struct epan_session {