aboutsummaryrefslogtreecommitdiffstats
path: root/capture_opts.c
diff options
context:
space:
mode:
authorHåkon Øye Amundsen <haakon.amundsen@nordicsemi.no>2017-08-25 11:28:34 +0200
committerAnders Broman <a.broman58@gmail.com>2017-08-28 05:48:01 +0000
commit018f6bff18785a1c3971a1ccfe3b1b5243d4d154 (patch)
treeaa4d61e478e39f628000dd6cf7bbbccc2e745a7d /capture_opts.c
parent7aeff4fb904e67ce8f81053f595b8a8b0340cb52 (diff)
extcap: Interface Toolbar support on Windows
Add support for extcap control pipes on Windows. Improved read loop in InterfaceToolbarReader. Delay opening control pipes until extcap has opened the fifo pipe. Make extcap_example.py work on Windows. Bug: 13833 Change-Id: I4b47d25452637759b8a3be53be48eee5365bc0e4 Reviewed-on: https://code.wireshark.org/review/23211 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'capture_opts.c')
-rw-r--r--capture_opts.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/capture_opts.c b/capture_opts.c
index 0f7a88ee3f..4d63ba4d12 100644
--- a/capture_opts.c
+++ b/capture_opts.c
@@ -70,6 +70,8 @@ capture_opts_init(capture_options *capture_opts)
capture_opts->default_options.extcap_pid = INVALID_EXTCAP_PID;
#ifdef _WIN32
capture_opts->default_options.extcap_pipe_h = INVALID_HANDLE_VALUE;
+ capture_opts->default_options.extcap_control_in_h = INVALID_HANDLE_VALUE;
+ capture_opts->default_options.extcap_control_out_h = INVALID_HANDLE_VALUE;
#endif
capture_opts->default_options.extcap_control_in = NULL;
capture_opts->default_options.extcap_control_out = NULL;
@@ -718,6 +720,8 @@ capture_opts_add_iface_opt(capture_options *capture_opts, const char *optarg_str
interface_opts.extcap_userdata = NULL;
#ifdef _WIN32
interface_opts.extcap_pipe_h = INVALID_HANDLE_VALUE;
+ interface_opts.extcap_control_in_h = INVALID_HANDLE_VALUE;
+ interface_opts.extcap_control_out_h = INVALID_HANDLE_VALUE;
#endif
interface_opts.extcap_control_in = g_strdup(capture_opts->default_options.extcap_control_in);
interface_opts.extcap_control_out = g_strdup(capture_opts->default_options.extcap_control_out);
@@ -1234,6 +1238,8 @@ collect_ifaces(capture_options *capture_opts)
interface_opts.extcap_userdata = NULL;
#ifdef _WIN32
interface_opts.extcap_pipe_h = INVALID_HANDLE_VALUE;
+ interface_opts.extcap_control_in_h = INVALID_HANDLE_VALUE;
+ interface_opts.extcap_control_out_h = INVALID_HANDLE_VALUE;
#endif
interface_opts.extcap_control_in = NULL;
interface_opts.extcap_control_out = NULL;