aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2017-12-07 20:33:22 -0800
committerGuy Harris <guy@alum.mit.edu>2017-12-08 04:33:55 +0000
commit48e65c4af4e35c90d7cbc9fb789ecc6e740b300b (patch)
tree2f6e56d3734bb626584c7bdefeb5c7dce6b066c1 /tools
parent797d2f6a87607b146a2ef62e1ff501031dce8212 (diff)
Hand the packet provider functions to epan_new().
Have separate packet_provider_data structures and packet_provider_funcs structures; the latter holds a table of functions that libwireshark can call for information about packets, the latter holds the data that those functions use. This means we no longer need to expose the structure of an epan_t outside epan/epan.c; get rid of epan/epan-int.h. Change-Id: I381b88993aa19e55720ce02c42ad33738e3f51f4 Reviewed-on: https://code.wireshark.org/review/24732 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'tools')
-rw-r--r--tools/oss-fuzzshark/fuzzshark.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/tools/oss-fuzzshark/fuzzshark.c b/tools/oss-fuzzshark/fuzzshark.c
index 56e816b12b..9c623efbf2 100644
--- a/tools/oss-fuzzshark/fuzzshark.c
+++ b/tools/oss-fuzzshark/fuzzshark.c
@@ -30,7 +30,6 @@
#include <glib.h>
-#include <epan/epan-int.h>
#include <epan/epan.h>
#include <wsutil/cmdarg_err.h>
@@ -111,7 +110,7 @@ failure_message_cont(const char *msg_format, va_list ap)
}
static const nstime_t *
-fuzzshark_get_frame_ts(struct packet_provider *prov _U_, guint32 frame_num _U_)
+fuzzshark_get_frame_ts(struct packet_provider_data *prov _U_, guint32 frame_num _U_)
{
static nstime_t empty;
@@ -121,14 +120,14 @@ fuzzshark_get_frame_ts(struct packet_provider *prov _U_, guint32 frame_num _U_)
static epan_t *
fuzzshark_epan_new(void)
{
- epan_t *epan = epan_new(NULL);
-
- epan->get_frame_ts = fuzzshark_get_frame_ts;
- epan->get_interface_name = NULL;
- epan->get_interface_description = NULL;
- epan->get_user_comment = NULL;
-
- return epan;
+ static const struct packet_provider_funcs funcs = {
+ fuzzshark_get_frame_ts,
+ NULL,
+ NULL,
+ NULL
+ };
+
+ return epan_new(NULL, &funcs);
}
static dissector_handle_t