summaryrefslogtreecommitdiff
path: root/dumpcap.c
diff options
context:
space:
mode:
authorUlf Lamping <ulf.lamping@web.de>2005-12-04 02:04:18 +0000
committerUlf Lamping <ulf.lamping@web.de>2005-12-04 02:04:18 +0000
commite829856c0c03666c5b9b917fba4716b88fd580e6 (patch)
treee287961aad0a7a10a11809797eec33b4c5fadd30 /dumpcap.c
parentf856dbafa830a562da34b1aaf636fb941aa5a7c9 (diff)
downloadwireshark-e829856c0c03666c5b9b917fba4716b88fd580e6.tar.gz
move the complete functionality of the capture info dialog from capture_loop.c to capture_info.c and call it from capture.c (instead of capture_loop.c).
This way, the capture child don't need to now any of the packet_counter things (no epan/packet.h and all alike). Currently the capture_info code will always open another wiretap file instance to build it's own counter values. This isn't optimized for now (next step: use data from cf_continue_tail() somehow). svn path=/trunk/; revision=16669
Diffstat (limited to 'dumpcap.c')
-rw-r--r--dumpcap.c42
1 files changed, 9 insertions, 33 deletions
diff --git a/dumpcap.c b/dumpcap.c
index 8c5ec096af..82241f404a 100644
--- a/dumpcap.c
+++ b/dumpcap.c
@@ -42,9 +42,7 @@
#include <conio.h>
#endif
-#include "simple_dialog.h"
#include "ringbuffer.h"
-#include "util.h"
#include "clopts_common.h"
#include "cmdarg_err.h"
#include "version_info.h"
@@ -52,15 +50,17 @@
#include <pcap.h>
#include "pcap-util.h"
-#include "capture.h"
-#include "capture_loop.h"
-#include "capture_info.h"
-
#ifdef _WIN32
#include "capture-wpcap.h"
#include "capture_wpcap_packet.h"
#endif
+#include "capture.h"
+#include "capture_loop.h"
+#include "capture_sync.h"
+
+#include "simple_dialog.h"
+#include "util.h"
#include "log.h"
#include "file_util.h"
@@ -601,19 +601,8 @@ console_log_handler(const char *log_domain, GLogLevelFlags log_level,
#endif
}
-
-/* Size of buffer to hold decimal representation of
- signed/unsigned 64-bit int */
-#define SP_DECISIZE 20
-
-/*
- * Indications sent out on the sync pipe.
- */
-#define SP_FILE 'F' /* the name of the recently opened file */
-#define SP_ERROR_MSG 'E' /* error message */
-#define SP_PACKET_COUNT 'P' /* count of packets captured since last message */
-#define SP_DROPS 'D' /* count of packets dropped in capture */
-#define SP_QUIT 'Q' /* capture quit message (from parent to child) */
+/****************************************************************************************************************/
+/* sync_pipe "dummies" */
static void
pipe_write_block(int pipe, char indicator, int len, const char *msg)
@@ -664,20 +653,7 @@ sync_pipe_drops_to_parent(int drops)
/****************************************************************************************************************/
-/* link "dummies" */
-
-
-void main_window_update(void) {}
-
-
-
-void capture_info_ui_create(capture_info *cinfo, gchar *iface) {}
-
-void capture_info_ui_update(capture_info *cinfo) {
- printf("Packets: %u\r", cinfo->counts->total);
-}
-
-void capture_info_ui_destroy(capture_info *cinfo) {}
+/* simple_dialog "dummies" */
static gpointer *