aboutsummaryrefslogtreecommitdiffstats
path: root/capture_sync.c
diff options
context:
space:
mode:
authorUlf Lamping <ulf.lamping@web.de>2006-02-17 02:18:48 +0000
committerUlf Lamping <ulf.lamping@web.de>2006-02-17 02:18:48 +0000
commit79053183c54a7e0efc29b656a47deff19f0dee2c (patch)
tree8dd5dd504a3c13ed7cd5cd018bca2736e2bb1467 /capture_sync.c
parent58d9f6c3b1e8ed8cc914e6f3d5af87c3e12a2ff3 (diff)
remove dependencies to pcap.h, so getting an idea what needs to be done by dumpcap in addition to the things already done now
various dumpcap related code cleanup: mainly #include's and capture engine related stuff svn path=/trunk/; revision=17327
Diffstat (limited to 'capture_sync.c')
-rw-r--r--capture_sync.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/capture_sync.c b/capture_sync.c
index e013f699ea..6cb53e8ae7 100644
--- a/capture_sync.c
+++ b/capture_sync.c
@@ -28,8 +28,6 @@
#ifdef HAVE_LIBPCAP
-#include <pcap.h>
-
#include <glib.h>
#include <stdio.h>
#include <ctype.h>
@@ -41,10 +39,16 @@
#include <signal.h>
+#ifdef _WIN32
+#include <fcntl.h>
+#endif
+
#ifdef HAVE_SYS_WAIT_H
# include <sys/wait.h>
#endif
+#include "capture-pcap-util.h"
+
#ifndef _WIN32
/*
* Define various POSIX macros (and, in the case of WCOREDUMP, non-POSIX
@@ -353,7 +357,7 @@ sync_pipe_start(capture_options *capture_opts) {
if (capture_opts->linktype != -1) {
argv = sync_pipe_add_arg(argv, &argc, "-y");
#ifdef HAVE_PCAP_DATALINK_VAL_TO_NAME
- g_snprintf(ssnap, ARGV_NUMBER_LEN, "%s",pcap_datalink_val_to_name(capture_opts->linktype));
+ g_snprintf(ssnap, ARGV_NUMBER_LEN, "%s",linktype_val_to_name(capture_opts->linktype));
#else
/* XXX - just treat it as a number */
g_snprintf(ssnap, ARGV_NUMBER_LEN, "%d",capture_opts->linktype);
@@ -472,6 +476,7 @@ sync_pipe_start(capture_options *capture_opts) {
si.hStdInput = signal_pipe_read;
si.hStdOutput = sync_pipe_write;
si.hStdError = sync_pipe_write;
+ /*si.hStdError = (HANDLE) _get_osfhandle(2);*/
#endif
g_string_append(args, exename);