aboutsummaryrefslogtreecommitdiffstats
path: root/capchild
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 /capchild
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 'capchild')
-rw-r--r--capchild/capture_session.h6
-rw-r--r--capchild/capture_sync.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/capchild/capture_session.h b/capchild/capture_session.h
index cb4b3793bd..4579c762e9 100644
--- a/capchild/capture_session.h
+++ b/capchild/capture_session.h
@@ -44,7 +44,7 @@ typedef enum {
CAPTURE_RUNNING /**< capture child signalled ok, capture is running now */
} capture_state;
-struct _capture_file;
+#include "cfile.h"
struct _info_data;
/*
* State of a capture session.
@@ -63,12 +63,12 @@ typedef struct _capture_session {
gboolean session_started;
guint32 count; /**< Total number of frames captured */
capture_options *capture_opts; /**< options for this capture */
- struct _capture_file *cf; /**< handle to cfile */
+ capture_file *cf; /**< handle to cfile */
struct _info_data *cap_data_info; /**< stats for this capture */
} capture_session;
extern void
-capture_session_init(capture_session *cap_session, struct _capture_file *cf);
+capture_session_init(capture_session *cap_session, capture_file *cf);
#else
/* dummy is needed because clang throws the error: empty struct has size 0 in C, size 1 in C++ */
diff --git a/capchild/capture_sync.c b/capchild/capture_sync.c
index 1cc09d74cf..723449f701 100644
--- a/capchild/capture_sync.c
+++ b/capchild/capture_sync.c
@@ -122,7 +122,7 @@ static void (*fetch_dumpcap_pid)(ws_process_id) = NULL;
void
-capture_session_init(capture_session *cap_session, struct _capture_file *cf)
+capture_session_init(capture_session *cap_session, capture_file *cf)
{
cap_session->cf = cf;
cap_session->fork_child = WS_INVALID_PID; /* invalid process handle */