aboutsummaryrefslogtreecommitdiffstats
path: root/capture.h
diff options
context:
space:
mode:
authorUlf Lamping <ulf.lamping@web.de>2004-10-30 17:50:51 +0000
committerUlf Lamping <ulf.lamping@web.de>2004-10-30 17:50:51 +0000
commit7445ecfd0568693f1b4d6f13381cb118b7537e51 (patch)
treebf5f61e3b12f890c3a7ad8326e5dc14132d148bf /capture.h
parent7d4095d2af1df53a6938825a3e5c330495e7c1cb (diff)
split capture_loop from capture.c, some more code cleanup
svn path=/trunk/; revision=12451
Diffstat (limited to 'capture.h')
-rw-r--r--capture.h26
1 files changed, 16 insertions, 10 deletions
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 {