aboutsummaryrefslogtreecommitdiffstats
path: root/capture_opts.c
diff options
context:
space:
mode:
authorDario Lombardo <lomato@gmail.com>2018-01-06 21:39:26 +0100
committerAnders Broman <a.broman58@gmail.com>2018-01-08 05:50:15 +0000
commite80b40adbe823be084fb49cd84336939916120bb (patch)
treed712734b953f7df6f1f79519c7abc73029152e1d /capture_opts.c
parent6f93baced0fba7d07425e14ea698f4607964c6ed (diff)
extcap: remove conditional compilation.
Change-Id: Ia54bba388755cf27a343fe6d69d244bf1ab897f9 Reviewed-on: https://code.wireshark.org/review/25186 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'capture_opts.c')
-rw-r--r--capture_opts.c28
1 files changed, 0 insertions, 28 deletions
diff --git a/capture_opts.c b/capture_opts.c
index f7eb768082..2cd8ed71f6 100644
--- a/capture_opts.c
+++ b/capture_opts.c
@@ -50,7 +50,6 @@ capture_opts_init(capture_options *capture_opts)
capture_opts->default_options.linktype = -1; /* use interface default */
capture_opts->default_options.promisc_mode = TRUE;
capture_opts->default_options.if_type = IF_WIRED;
-#ifdef HAVE_EXTCAP
capture_opts->default_options.extcap = NULL;
capture_opts->default_options.extcap_fifo = NULL;
capture_opts->default_options.extcap_args = NULL;
@@ -63,7 +62,6 @@ capture_opts_init(capture_options *capture_opts)
#endif
capture_opts->default_options.extcap_control_in = NULL;
capture_opts->default_options.extcap_control_out = NULL;
-#endif
#ifdef CAN_SET_CAPTURE_BUFFER_SIZE
capture_opts->default_options.buffer_size = DEFAULT_CAPTURE_BUFFER_SIZE;
#endif
@@ -161,11 +159,9 @@ capture_opts_log(const char *log_domain, GLogLevelFlags log_level, capture_optio
g_log(log_domain, log_level, "Snap length[%02d] (%u) : %d", i, interface_opts->has_snaplen, interface_opts->snaplen);
g_log(log_domain, log_level, "Link Type[%02d] : %d", i, interface_opts->linktype);
g_log(log_domain, log_level, "Promiscuous Mode[%02d]: %s", i, interface_opts->promisc_mode?"TRUE":"FALSE");
-#ifdef HAVE_EXTCAP
g_log(log_domain, log_level, "Extcap[%02d] : %s", i, interface_opts->extcap ? interface_opts->extcap : "(unspecified)");
g_log(log_domain, log_level, "Extcap FIFO[%02d] : %s", i, interface_opts->extcap_fifo ? interface_opts->extcap_fifo : "(unspecified)");
g_log(log_domain, log_level, "Extcap PID[%02d] : %d", i, interface_opts->extcap_pid);
-#endif
#ifdef CAN_SET_CAPTURE_BUFFER_SIZE
g_log(log_domain, log_level, "Buffer size[%02d] : %d (MB)", i, interface_opts->buffer_size);
#endif
@@ -203,10 +199,8 @@ capture_opts_log(const char *log_domain, GLogLevelFlags log_level, capture_optio
g_log(log_domain, log_level, "Snap length[df] (%u) : %d", capture_opts->default_options.has_snaplen, capture_opts->default_options.snaplen);
g_log(log_domain, log_level, "Link Type[df] : %d", capture_opts->default_options.linktype);
g_log(log_domain, log_level, "Promiscuous Mode[df]: %s", capture_opts->default_options.promisc_mode?"TRUE":"FALSE");
-#ifdef HAVE_EXTCAP
g_log(log_domain, log_level, "Extcap[df] : %s", capture_opts->default_options.extcap ? capture_opts->default_options.extcap : "(unspecified)");
g_log(log_domain, log_level, "Extcap FIFO[df] : %s", capture_opts->default_options.extcap_fifo ? capture_opts->default_options.extcap_fifo : "(unspecified)");
-#endif
#ifdef CAN_SET_CAPTURE_BUFFER_SIZE
g_log(log_domain, log_level, "Buffer size[df] : %d (MB)", capture_opts->default_options.buffer_size);
#endif
@@ -568,9 +562,7 @@ capture_opts_add_iface_opt(capture_options *capture_opts, const char *optarg_str
interface_opts.console_display_name = g_strdup(if_info->name);
}
interface_opts.if_type = if_info->type;
-#ifdef HAVE_EXTCAP
interface_opts.extcap = g_strdup(if_info->extcap);
-#endif
free_interface_list(if_list);
} else if (capture_opts->capture_child) {
/* In Wireshark capture child mode, thus proper device name is supplied. */
@@ -578,9 +570,7 @@ capture_opts_add_iface_opt(capture_options *capture_opts, const char *optarg_str
interface_opts.name = g_strdup(optarg_str_p);
interface_opts.console_display_name = g_strdup(optarg_str_p);
interface_opts.if_type = capture_opts->default_options.if_type;
-#ifdef HAVE_EXTCAP
interface_opts.extcap = g_strdup(capture_opts->default_options.extcap);
-#endif
} else {
/*
* Retrieve the interface list so that we can search for the
@@ -619,9 +609,7 @@ capture_opts_add_iface_opt(capture_options *capture_opts, const char *optarg_str
interface_opts.console_display_name = g_strdup(if_info->name);
}
interface_opts.if_type = if_info->type;
-#ifdef HAVE_EXTCAP
interface_opts.extcap = g_strdup(if_info->extcap);
-#endif
matched = TRUE;
break;
}
@@ -633,9 +621,7 @@ capture_opts_add_iface_opt(capture_options *capture_opts, const char *optarg_str
interface_opts.name = g_strdup(if_info->name);
interface_opts.console_display_name = g_strdup(if_info->friendly_name);
interface_opts.if_type = if_info->type;
-#ifdef HAVE_EXTCAP
interface_opts.extcap = g_strdup(if_info->extcap);
-#endif
matched = TRUE;
break;
}
@@ -657,9 +643,7 @@ capture_opts_add_iface_opt(capture_options *capture_opts, const char *optarg_str
interface_opts.name = g_strdup(if_info->name);
interface_opts.console_display_name = g_strdup(if_info->friendly_name);
interface_opts.if_type = if_info->type;
-#ifdef HAVE_EXTCAP
interface_opts.extcap = g_strdup(if_info->extcap);
-#endif
matched = TRUE;
break;
}
@@ -676,18 +660,14 @@ capture_opts_add_iface_opt(capture_options *capture_opts, const char *optarg_str
interface_opts.name = g_strdup(optarg_str_p);
interface_opts.console_display_name = g_strdup(optarg_str_p);
interface_opts.if_type = capture_opts->default_options.if_type;
-#ifdef HAVE_EXTCAP
interface_opts.extcap = g_strdup(capture_opts->default_options.extcap);
-#endif
}
free_interface_list(if_list);
} else {
interface_opts.name = g_strdup(optarg_str_p);
interface_opts.console_display_name = g_strdup(optarg_str_p);
interface_opts.if_type = capture_opts->default_options.if_type;
-#ifdef HAVE_EXTCAP
interface_opts.extcap = g_strdup(capture_opts->default_options.extcap);
-#endif
}
}
@@ -701,7 +681,6 @@ capture_opts_add_iface_opt(capture_options *capture_opts, const char *optarg_str
interface_opts.has_snaplen = capture_opts->default_options.has_snaplen;
interface_opts.linktype = capture_opts->default_options.linktype;
interface_opts.promisc_mode = capture_opts->default_options.promisc_mode;
-#ifdef HAVE_EXTCAP
interface_opts.extcap_fifo = g_strdup(capture_opts->default_options.extcap_fifo);
interface_opts.extcap_args = NULL;
interface_opts.extcap_pid = INVALID_EXTCAP_PID;
@@ -713,7 +692,6 @@ capture_opts_add_iface_opt(capture_options *capture_opts, const char *optarg_str
#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);
-#endif
#ifdef CAN_SET_CAPTURE_BUFFER_SIZE
interface_opts.buffer_size = capture_opts->default_options.buffer_size;
#endif
@@ -1143,7 +1121,6 @@ capture_opts_del_iface(capture_options *capture_opts, guint if_index)
g_free(interface_opts->console_display_name);
g_free(interface_opts->cfilter);
g_free(interface_opts->timestamp_type);
-#ifdef HAVE_EXTCAP
g_free(interface_opts->extcap);
g_free(interface_opts->extcap_fifo);
if (interface_opts->extcap_args)
@@ -1153,7 +1130,6 @@ capture_opts_del_iface(capture_options *capture_opts, guint if_index)
g_free(interface_opts->extcap_userdata);
g_free(interface_opts->extcap_control_in);
g_free(interface_opts->extcap_control_out);
-#endif
#ifdef HAVE_PCAP_REMOTE
if (interface_opts->src_type == CAPTURE_IFREMOTE) {
g_free(interface_opts->remote_host);
@@ -1196,7 +1172,6 @@ collect_ifaces(capture_options *capture_opts)
interface_opts.has_snaplen = device->has_snaplen;
interface_opts.promisc_mode = device->pmode;
interface_opts.if_type = device->if_info.type;
-#ifdef HAVE_EXTCAP
interface_opts.extcap = g_strdup(device->if_info.extcap);
interface_opts.extcap_fifo = NULL;
interface_opts.extcap_userdata = NULL;
@@ -1212,7 +1187,6 @@ collect_ifaces(capture_options *capture_opts)
#endif
interface_opts.extcap_control_in = NULL;
interface_opts.extcap_control_out = NULL;
-#endif
#ifdef CAN_SET_CAPTURE_BUFFER_SIZE
interface_opts.buffer_size = device->buffer;
#endif
@@ -1281,9 +1255,7 @@ capture_opts_free_interface_t(interface_t *device)
g_slist_foreach(device->if_info.addrs,
capture_opts_free_interface_t_addrs, NULL);
g_slist_free(device->if_info.addrs);
-#ifdef HAVE_EXTCAP
g_free(device->if_info.extcap);
-#endif
}
}