aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2017-12-03 10:53:58 -0800
committerGuy Harris <guy@alum.mit.edu>2017-12-03 18:54:37 +0000
commiteb8ffb74e27523492855268abf5cb45927ffdb04 (patch)
tree3c6eb1e8a931a146a70e3dfe7836884b10c17d2c /epan
parent114c989fb37b25671d8886458b206f11471b3277 (diff)
Use cfile.h to define the capture_file type.
Have cfile-int.h declare the structure, and use it in files that directly access the structure. Have cfile.h just incompletely declare the structure and include it rather than explicitly declaring it in source files or other header files. Never directly refer to struct _capture_file except when typedeffing capture_file. Add #includes as necessary, now that cfile.h doesn't drag in a ton of Change-Id: I7931c8039d75ff7c980b0f2a6e221f20e602a556 Reviewed-on: https://code.wireshark.org/review/24686 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan')
-rw-r--r--epan/epan-int.h20
-rw-r--r--epan/frame_data.h3
-rw-r--r--epan/tap.h1
3 files changed, 17 insertions, 7 deletions
diff --git a/epan/epan-int.h b/epan/epan-int.h
index 05ae6407cb..97a621c35f 100644
--- a/epan/epan-int.h
+++ b/epan/epan-int.h
@@ -25,15 +25,23 @@
#include <epan/frame_data.h>
#include <wsutil/nstime.h>
-struct _capture_file;
+/*
+ * XXX - this isn't part of libwireshark; using it in the API indicates
+ * that perhaps it should be, in some fashion.
+ *
+ * Whether the structure definition of a capture_file should be part
+ * of libwireshark, or part of the code that uses libwireshark, is
+ * another matter.
+ */
+#include "cfile.h"
struct epan_session {
- struct _capture_file *cf;
+ capture_file *cf;
- const nstime_t *(*get_frame_ts)(struct _capture_file *cf, guint32 frame_num);
- const char *(*get_interface_name)(struct _capture_file *cf, guint32 interface_id);
- const char *(*get_interface_description)(struct _capture_file *cf, guint32 interface_id);
- const char *(*get_user_comment)(struct _capture_file *cf, const frame_data *fd);
+ const nstime_t *(*get_frame_ts)(capture_file *cf, guint32 frame_num);
+ const char *(*get_interface_name)(capture_file *cf, guint32 interface_id);
+ const char *(*get_interface_description)(capture_file *cf, guint32 interface_id);
+ const char *(*get_user_comment)(capture_file *cf, const frame_data *fd);
};
#endif
diff --git a/epan/frame_data.h b/epan/frame_data.h
index 7dd6cce1a6..44de9de4cb 100644
--- a/epan/frame_data.h
+++ b/epan/frame_data.h
@@ -31,9 +31,10 @@ extern "C" {
#include <ws_symbol_export.h>
#include <wsutil/nstime.h>
+#include <wiretap/wtap.h>
+
struct _packet_info;
struct epan_session;
-struct wtap_pkthdr;
#define PINFO_FD_VISITED(pinfo) ((pinfo)->fd->flags.visited)
diff --git a/epan/tap.h b/epan/tap.h
index edaaa31474..395bf19ce8 100644
--- a/epan/tap.h
+++ b/epan/tap.h
@@ -24,6 +24,7 @@
#define __TAP_H__
#include <epan/epan.h>
+#include <epan/packet_info.h>
#include "ws_symbol_export.h"
#ifdef __cplusplus