summaryrefslogtreecommitdiff
path: root/capture_sync.h
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2013-05-22 19:14:52 +0000
committerGuy Harris <guy@alum.mit.edu>2013-05-22 19:14:52 +0000
commit9ac21fd6cc55bc9bcfe71dcb696097b33b2664ed (patch)
treed0f7db92d950cc72aa4fa284e492ed212460de64 /capture_sync.h
parent491b512399e16bf727e94d2368dc05bc914a4733 (diff)
downloadwireshark-9ac21fd6cc55bc9bcfe71dcb696097b33b2664ed.tar.gz
AAAAAArgh. The capture_input_new_XXX routines are called from
capture_sync.c, not from capture.c, so they should be declared in capture_sync.h, so callers that use the capture_sync.c stuff but not the capture.c stuff - such as TShark - get the declarations and get their implementations compared with the signatures that they should have. Doing so points out that some of them in TShark *don't*, so fix that. svn path=/trunk/; revision=49517
Diffstat (limited to 'capture_sync.h')
-rw-r--r--capture_sync.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/capture_sync.h b/capture_sync.h
index f8e6f63e6d..337abc5819 100644
--- a/capture_sync.h
+++ b/capture_sync.h
@@ -86,5 +86,51 @@ sync_interface_stats_close(int *read_fd, int *fork_child, gchar **msg);
extern int
sync_pipe_gets_nonblock(int pipe_fd, char *bytes, int max);
+/*
+ * Routines supplied by our caller; we call them back to notify them
+ * of various events.
+ *
+ * XXX - this is *really* ugly. We should do this better.
+ */
+
+/**
+ * Capture child told us we have a new (or the first) capture file.
+ */
+extern gboolean
+capture_input_new_file(capture_session *cap_session, gchar *new_file);
+
+/**
+ * Capture child told us we have new packets to read.
+ */
+extern void
+capture_input_new_packets(capture_session *cap_session, int to_read);
+
+/**
+ * Capture child told us how many dropped packets it counted.
+ */
+extern void
+capture_input_drops(capture_session *cap_session, guint32 dropped);
+
+/**
+ * Capture child told us that an error has occurred while starting the capture.
+ */
+extern void
+capture_input_error_message(capture_session *cap_session, char *error_message,
+ char *secondary_error_msg);
+
+/**
+ * Capture child told us that an error has occurred while parsing a
+ * capture filter when starting/running the capture.
+ */
+extern void
+capture_input_cfilter_error_message(capture_session *cap_session, guint i,
+ char *error_message);
+
+/**
+ * Capture child closed its side of the pipe, report any error and
+ * do the required cleanup.
+ */
+extern void
+capture_input_closed(capture_session *cap_session, gchar *msg);
#endif /* capture_sync.h */