/* capture.h
* Definitions for packet capture windows
*
- * $Id: capture.h,v 1.8 1999/07/09 04:18:33 gram Exp $
+ * $Id: capture.h,v 1.26 2001/04/13 14:59:28 jfoster Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
#ifdef HAVE_LIBPCAP
-#ifndef lib_pcap_h
-#include <pcap.h>
-#endif
+/* Name we give to the child process when doing a "-S" capture. */
+#define CHILD_NAME "ethereal-capture"
-typedef struct _loop_data {
- gint go;
- gint max;
- gint linktype;
- gint signal_sent;
- time_t sync_time;
- packet_counts counts;
- pcap_dumper_t *pdh;
-} loop_data;
+extern int sync_pipe[2]; /* used to sync father */
+extern int quit_after_cap; /* Makes a "capture only mode". Implies -k */
+extern gboolean capture_child; /* if this is the child for "-S" */
-void capture_prep_cb(GtkWidget *, gpointer);
-void capture(void);
+/* Open a specified file, or create a temporary file, and start a capture
+ to the file in question. */
+void do_capture(char *capfile_name);
+
+/* Do the low-level work of a capture. */
+int capture(gboolean *stats_known, struct pcap_stat *stats);
+
+/* Stop a capture from a menu item. */
+void capture_stop(void);
#endif /* HAVE_LIBPCAP */
+
+#define EMPTY_FILTER ""
#endif /* capture.h */