From 7445ecfd0568693f1b4d6f13381cb118b7537e51 Mon Sep 17 00:00:00 2001 From: Ulf Lamping Date: Sat, 30 Oct 2004 17:50:51 +0000 Subject: split capture_loop from capture.c, some more code cleanup svn path=/trunk/; revision=12451 --- capture.h | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) (limited to 'capture.h') diff --git a/capture.h b/capture.h index 1462ad2bf5..d9707a9fd5 100644 --- a/capture.h +++ b/capture.h @@ -83,23 +83,29 @@ extern capture_options capture_opts; /** True if this is the child for "-S" */ extern gboolean capture_child; + /** Open a specified file, or create a temporary file, and start a capture - to the file in question. Returns TRUE if the capture starts - successfully, FALSE otherwise. */ -gboolean do_capture(const char *save_file); + * to the file in question. + * + * @return TRUE if the capture starts successfully, FALSE otherwise. */ +extern gboolean do_capture(const char *save_file); -/** Do the low-level work of a capture. */ -int capture(gboolean *stats_known, struct pcap_stat *stats); +/** Do the low-level work of a capture (start the capture child). */ +extern int capture_start(gboolean *stats_known, struct pcap_stat *stats); /** Stop a capture from a menu item. */ -void capture_stop(void); +extern void capture_stop(void); /** Terminate the capture child cleanly when exiting. */ -void kill_capture_child(void); +extern void kill_capture_child(void); + +/** Do the low-level work of a capture. */ +extern int capture_loop_start(gboolean *stats_known, struct pcap_stat *stats); + +/** Stop a low-level capture. */ +extern void capture_loop_stop(void); + -/** Number of packet counts. - * @todo improve this macro (put something like this into epan/packet.h?) */ -#define CAPTURE_PACKET_COUNTS sizeof(packet_counts) / sizeof (gint) /** Current Capture info. */ typedef struct { -- cgit v1.2.1