aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt6
-rw-r--r--Makefile.am6
-rw-r--r--Makefile.common15
-rw-r--r--Makefile.nmake3
-rw-r--r--configure.ac155
-rw-r--r--doc/Makefile.am23
-rw-r--r--extcap.c3
-rw-r--r--extcap.h4
-rw-r--r--ui/gtk/Makefile.am5
-rw-r--r--ui/gtk/Makefile.common2
-rw-r--r--ui/gtk/Makefile.nmake3
-rw-r--r--ui/help_url.c2
-rw-r--r--ui/help_url.h2
-rw-r--r--ui/qt/Makefile.am20
-rw-r--r--ui/qt/Makefile.common10
-rw-r--r--ui/qt/about_dialog.cpp2
-rw-r--r--ui/qt/interface_tree.cpp6
-rw-r--r--ui/qt/interface_tree.h2
-rw-r--r--ui/qt/main_welcome.cpp10
-rw-r--r--ui/qt/main_welcome.h4
-rw-r--r--ui/qt/main_window.cpp2
-rw-r--r--ui/qt/main_window.h2
-rw-r--r--ui/qt/main_window_slots.cpp2
23 files changed, 170 insertions, 119 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4230191aaf..f609b8e045 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2328,7 +2328,7 @@ if (WIN32)
endif()
endif()
-if(BUILD_androiddump)
+if(ENABLE_EXTCAP AND BUILD_androiddump)
if(EXTCAP_ANDROIDDUMP_LIBPCAP)
if(HAVE_LIBPCAP)
set(androiddump_LIBS
@@ -2357,7 +2357,7 @@ if(BUILD_androiddump)
install(TARGETS androiddump RUNTIME DESTINATION ${EXTCAP_DIR})
endif()
-if(BUILD_sshdump AND LIBSSH_FOUND)
+if(ENABLE_EXTCAP AND BUILD_sshdump AND LIBSSH_FOUND)
set(sshdump_LIBS
wsutil
${GLIB2_LIBRARIES}
@@ -2382,7 +2382,7 @@ elseif (BUILD_sshdump)
#message( WARNING "Cannot find libssh, cannot build sshdump" )
endif()
-if(BUILD_randpktdump)
+if(ENABLE_EXTCAP AND BUILD_randpktdump)
set(randpktdump_LIBS
randpkt_core
wiretap
diff --git a/Makefile.am b/Makefile.am
index 1a70f64973..5bc155e581 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -362,6 +362,10 @@ endif # HAVE_PLUGINS
include Makefile.common
+if HAVE_EXTCAP
+SHARK_COMMON_SRC += $(EXTCAP_COMMON_SRC)
+endif
+
if ENABLE_STATIC
EXTRALINKFLAGS = -Wl,-static -all-static
else
@@ -1391,7 +1395,7 @@ SUBDIRS = \
@wireshark_SUBDIRS@ \
ui/cli \
randpkt_core \
- extcap \
+ @extcap_subdir@ \
. \
doc
diff --git a/Makefile.common b/Makefile.common
index a9fa08e269..06236d09d0 100644
--- a/Makefile.common
+++ b/Makefile.common
@@ -40,19 +40,23 @@ GENERATED_C_FILES =
# All the generated files.
GENERATED_FILES = $(GENERATED_C_FILES) $(GENERATED_HEADER_FILES)
+EXTCAP_COMMON_SRC = \
+ extcap.c \
+ extcap_parser.c
+
+EXTCAP_COMMON_INCLUDES = \
+ extcap.h \
+ extcap_parser.h
+
# sources common for wireshark, tshark, and rawshark
SHARK_COMMON_SRC = \
cfile.c \
frame_tvbuff.c \
- sync_pipe_write.c \
- extcap.c \
- extcap_parser.c
+ sync_pipe_write.c
# corresponding headers
SHARK_COMMON_INCLUDES = \
cfile.h \
- extcap.h \
- extcap_parser.h \
file.h \
fileset.h \
frame_tvbuff.h \
@@ -166,5 +170,6 @@ dumpcap_INCLUDES = \
# this target needed for distribution only
noinst_HEADERS = \
$(SHARK_COMMON_INCLUDES) \
+ $(EXTCAP_COMMON_INCLUDES) \
$(WIRESHARK_COMMON_INCLUDES) \
$(dumpcap_INCLUDES)
diff --git a/Makefile.nmake b/Makefile.nmake
index 720019aa45..110d96624d 100644
--- a/Makefile.nmake
+++ b/Makefile.nmake
@@ -51,7 +51,7 @@ CFLAGS=$(WARNINGS_ARE_ERRORS) $(GENERATED_CFLAGS)
include Makefile.common
-wireshark_gtk_OBJECTS = $(WIRESHARK_COMMON_SRC:.c=.obj)
+wireshark_gtk_OBJECTS = $(WIRESHARK_COMMON_SRC:.c=.obj) $(EXTCAP_COMMON_SRC:.c=.obj)
tshark_OBJECTS = $(tshark_SOURCES:.c=.obj)
tfshark_OBJECTS = $(tfshark_SOURCES:.c=.obj)
rawshark_OBJECTS = $(rawshark_SOURCES:.c=.obj)
@@ -1502,6 +1502,7 @@ install-all: install-generated-files
checkapi_local:
$(PERL) tools/checkAPIs.pl -build \
$(WIRESHARK_COMMON_SRC) \
+ $(EXTCAP_COMMON_SRC) \
$(TSHARK_TAP_SRC) \
# $(EXTRA_wireshark_SOURCES)
diff --git a/configure.ac b/configure.ac
index 3438dcb315..1d50639bb8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2300,77 +2300,6 @@ fi
AC_SUBST(rawshark_bin)
AC_SUBST(rawshark_man)
-dnl androiddump check
-AC_MSG_CHECKING(whether to build androiddump)
-
-AC_ARG_ENABLE(androiddump,
- AC_HELP_STRING( [--enable-androiddump],
- [build androiddump @<:@default=yes@:>@]),
- androiddump=$enableval,enable_androiddump=yes)
-
-if test "x$enable_androiddump" = "xyes" ; then
- AC_MSG_RESULT(yes)
-else
- AC_MSG_RESULT(no)
-fi
-
-AC_ARG_ENABLE(androiddump_use_libpcap,
- AC_HELP_STRING( [--enable-androiddump-use-libpcap],
- [build androiddump using libpcap @<:@default=no@:>@]),
- androiddump_use_libpcap=$enableval,enable_androiddump_use_libpcap=no)
-
-if test "x$enable_androiddump_use_libpcap" = "xyes" ; then
- AC_DEFINE(ANDROIDDUMP_USE_LIBPCAP, 1, [Androiddump will use Libpcap])
-fi
-
-if test "x$enable_androiddump" = "xyes" ; then
- androiddump_bin="androiddump\$(EXEEXT)"
- androiddump_man=""
-else
- androiddump_bin=""
- androiddump_man=""
-fi
-AC_SUBST(androiddump_bin)
-AC_SUBST(androiddump_man)
-
-dnl sshdump check
-AC_MSG_CHECKING(whether to build sshdump)
-
-AC_ARG_ENABLE(sshdump,
- AC_HELP_STRING( [--enable-sshdump],
- [build sshdump @<:@default=yes@:>@]),
- sshdump=$enableval,enable_sshdump=yes)
-
-if test "x$enable_sshdump" = "xyes" ; then
- AC_MSG_RESULT(yes)
-else
- AC_MSG_RESULT(no)
-fi
-
-dnl randpktdump check
-AC_MSG_CHECKING(whether to build randpktdump)
-
-AC_ARG_ENABLE(randpktdump,
- AC_HELP_STRING( [--enable-randpktdump],
- [build androiddump @<:@default=yes@:>@]),
- randpktdump=$enableval,enable_randpktdump=yes)
-
-if test "x$enable_randpktdump" = "xyes" ; then
- AC_MSG_RESULT(yes)
-else
- AC_MSG_RESULT(no)
-fi
-
-if test "x$enable_randpktdump" = "xyes" ; then
- randpktdump_bin="randpktdump\$(EXEEXT)"
- randpktdump_man=""
-else
- randpktdump_bin=""
- randpktdump_man=""
-fi
-AC_SUBST(randpktdump_bin)
-AC_SUBST(randpktdump_man)
-
# Enable/disable echld
AC_ARG_ENABLE(echld,
AC_HELP_STRING( [--enable-echld],
@@ -3097,9 +3026,66 @@ AM_CONDITIONAL(HAVE_EXTCAP, test "x$have_extcap" = "xyes")
if test "x$have_extcap" = "xyes"
then
AC_DEFINE(HAVE_EXTCAP, 1, [Define if external capture sources should be enabled])
+ extcap_subdir="extcap"
+ extcap_man="extcap.4"
fi
+AC_SUBST(extcap_subdir)
+AC_SUBST(extcap_man)
AC_SUBST(extcapdir)
+dnl androiddump check
+AC_MSG_CHECKING(whether to build androiddump)
+
+AC_ARG_ENABLE(androiddump,
+ AC_HELP_STRING( [--enable-androiddump],
+ [build androiddump @<:@default=yes@:>@]),
+ androiddump=$enableval,enable_androiddump=yes)
+
+if test "x$have_extcap" != xyes; then
+ AC_MSG_RESULT(no, extcap disabled)
+ enable_androiddump=no
+elif test "x$enable_androiddump" = "xyes" ; then
+ AC_MSG_RESULT(yes)
+else
+ AC_MSG_RESULT(no)
+fi
+
+AC_ARG_ENABLE(androiddump_use_libpcap,
+ AC_HELP_STRING( [--enable-androiddump-use-libpcap],
+ [build androiddump using libpcap @<:@default=no@:>@]),
+ androiddump_use_libpcap=$enableval,enable_androiddump_use_libpcap=no)
+
+if test "x$enable_androiddump" = "xyes" -a "x$enable_androiddump_use_libpcap" = "xyes" ; then
+ AC_DEFINE(ANDROIDDUMP_USE_LIBPCAP, 1, [Androiddump will use Libpcap])
+fi
+
+if test "x$enable_androiddump" = "xyes" ; then
+ androiddump_bin="androiddump\$(EXEEXT)"
+ androiddump_man=""
+else
+ androiddump_bin=""
+ androiddump_man=""
+fi
+AC_SUBST(androiddump_bin)
+AC_SUBST(androiddump_man)
+
+dnl sshdump check
+AC_MSG_CHECKING(whether to build sshdump)
+
+AC_ARG_ENABLE(sshdump,
+ AC_HELP_STRING( [--enable-sshdump],
+ [build sshdump @<:@default=yes@:>@]),
+ sshdump=$enableval,enable_sshdump=yes)
+
+if test "x$have_extcap" != xyes; then
+ AC_MSG_RESULT(no, extcap disabled)
+ enable_sshdump=no
+elif test "x$enable_sshdump" = "xyes" ; then
+ AC_MSG_RESULT(yes)
+else
+ AC_MSG_RESULT(no)
+fi
+
if test "x$enable_sshdump" = "xyes" ; then
if test "x$have_good_libssh" = "xyes" ; then
sshdump_bin="sshdump\$(EXEEXT)"
@@ -3117,6 +3103,33 @@ fi
AC_SUBST(sshdump_bin)
AC_SUBST(sshdump_man)
+dnl randpktdump check
+AC_MSG_CHECKING(whether to build randpktdump)
+
+AC_ARG_ENABLE(randpktdump,
+ AC_HELP_STRING( [--enable-randpktdump],
+ [build androiddump @<:@default=yes@:>@]),
+ randpktdump=$enableval,enable_randpktdump=yes)
+
+if test "x$have_extcap" != xyes; then
+ AC_MSG_RESULT(no, extcap disabled)
+ enable_randpktdump=no
+elif test "x$enable_randpktdump" = "xyes" ; then
+ AC_MSG_RESULT(yes)
+else
+ AC_MSG_RESULT(no)
+fi
+
+if test "x$enable_randpktdump" = "xyes" ; then
+ randpktdump_bin="randpktdump\$(EXEEXT)"
+ randpktdump_man=""
+else
+ randpktdump_bin=""
+ randpktdump_man=""
+fi
+AC_SUBST(randpktdump_bin)
+AC_SUBST(randpktdump_man)
+
dnl libtool defs
#
# Yes, AM_PROG_LIBTOOL is redundant with newer version(s) of some tool(s)
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 66ad3335cb..d26a5fb0c5 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -75,7 +75,9 @@ man1_MANS = \
@sshdump_man@ \
@randpktdump_man@
-man4_MANS = @wiresharkfilter_man@
+man4_MANS = \
+ @extcap_man@ \
+ @wiresharkfilter_man@
man_MANS =
# Build these in case a developer wants to read them and for the Debian
@@ -86,7 +88,8 @@ noinst_DATA = asn2deb.1 asn2deb.html idl2deb.1 idl2deb.html idl2wrs.1 idl2wrs.ht
pkgdata_DATA = AUTHORS-SHORT $(top_srcdir)/docbook/ws.css wireshark.html \
tshark.html wireshark-filter.html capinfos.html editcap.html \
mergecap.html reordercap.html text2pcap.html dumpcap.html androiddump.html \
- sshdump.html randpktdump.html rawshark.html dftest.html randpkt.html
+ sshdump.html randpktdump.html rawshark.html dftest.html randpkt.html \
+ extcap.html
#
# Build the short version of the authors file for the about dialog
@@ -134,7 +137,7 @@ POD_CSS_URL ?= $(top_srcdir)/docbook/ws.css
--noindex \
$< > $@
-# This rule needs to stay separate because of the --section option.
+# These rules need to stay separate because of the --section option.
wireshark-filter.4: wireshark-filter.pod ../config.h
$(AM_V_POD2MAN)$(POD2MAN) \
--section=4 \
@@ -142,6 +145,13 @@ wireshark-filter.4: wireshark-filter.pod ../config.h
--release=$(VERSION) \
$(srcdir)/wireshark-filter.pod > wireshark-filter.4
+extcap.4: extcap.pod ../config.h
+ $(AM_V_POD2MAN)$(POD2MAN) \
+ --section=4 \
+ --center="The Wireshark Network Analyzer" \
+ --release=$(VERSION) \
+ $(srcdir)/extcap.pod > extcap.4
+
# These rules need to stay separate because each man page has a separate
# title. Using GNU make's pattern rules would allow these to be removed
# but at the cost of portability.
@@ -159,6 +169,13 @@ wireshark-filter.html: wireshark-filter.pod ../config.h $(top_srcdir)/docbook/ws
--noindex \
$(srcdir)/wireshark-filter.pod > wireshark-filter.html
+extcap.html: extcap.pod ../config.h $(top_srcdir)/docbook/ws.css
+ $(AM_V_POD2HTML)$(POD2HTML) \
+ --title="extcap - The Wireshark Network Analyzer $(VERSION)" \
+ --css=$(POD_CSS_URL) \
+ --noindex \
+ $(srcdir)/extcap.pod > extcap.html
+
capinfos.html: capinfos.pod ../config.h $(top_srcdir)/docbook/ws.css
$(AM_V_POD2HTML)$(POD2HTML) \
--title="capinfos - The Wireshark Network Analyzer $(VERSION)" \
diff --git a/extcap.c b/extcap.c
index d60d6aa0b5..a04faea01d 100644
--- a/extcap.c
+++ b/extcap.c
@@ -49,8 +49,6 @@
#include "capture_opts.h"
-#ifdef HAVE_EXTCAP
-
#include "extcap.h"
#include "extcap_parser.h"
@@ -1064,7 +1062,6 @@ void extcap_debug_arguments ( extcap_arg *arg_iter )
}
}
#endif
-#endif
/*
* Editor modelines - http://www.wireshark.org/tools/modelines.html
diff --git a/extcap.h b/extcap.h
index 9701ae52e3..509e007a5e 100644
--- a/extcap.h
+++ b/extcap.h
@@ -35,8 +35,6 @@
#include <ui/capture_ui_utils.h>
-#ifdef HAVE_EXTCAP
-
/* As boolean flags will be allowed any form of yes, true or any number != 0 (or starting with 0)
* The regex will be matched case-insensitive, so only the lower-case is defined here. */
#define EXTCAP_BOOLEAN_REGEX "^.*([yt1-9])"
@@ -110,8 +108,6 @@ extcap_cleanup(capture_options * capture_opts _U_);
#endif
-#endif
-
/*
* Editor modelines - http://www.wireshark.org/tools/modelines.html
*
diff --git a/ui/gtk/Makefile.am b/ui/gtk/Makefile.am
index 7a97c0afaa..a2fab6fc5b 100644
--- a/ui/gtk/Makefile.am
+++ b/ui/gtk/Makefile.am
@@ -32,6 +32,11 @@ BUILD_PIXBUF_CSOURCE = \
pixbuf-csource.c
endif
+if HAVE_EXTCAP
+WIRESHARK_COMMON_GTK_SRC += extcap_gtk.c
+WIRESHARK_COMMON_GTK_HDRS += extcap_gtk.h
+endif
+
AM_CPPFLAGS = $(INCLUDEDIRS) $(WS_CPPFLAGS) $(GTK_CFLAGS) \
$(PORTAUDIO_INCLUDES)
diff --git a/ui/gtk/Makefile.common b/ui/gtk/Makefile.common
index c33c1d88ff..248b249f3e 100644
--- a/ui/gtk/Makefile.common
+++ b/ui/gtk/Makefile.common
@@ -57,7 +57,6 @@ WIRESHARK_COMMON_GTK_SRC = \
expert_comp_table.c \
export_object_dlg.c \
export_sslkeys.c \
- extcap_gtk.c \
filter_autocomplete.c \
file_dlg.c \
file_import_dlg.c \
@@ -181,7 +180,6 @@ WIRESHARK_COMMON_GTK_HDRS = \
export_object_dlg.h \
export_pdu_dlg.h \
export_sslkeys.h \
- extcap_gtk.h \
file_dlg.h \
file_import_dlg.h \
fileset_dlg.h \
diff --git a/ui/gtk/Makefile.nmake b/ui/gtk/Makefile.nmake
index 8d8f2ce73f..f2cf3968ee 100644
--- a/ui/gtk/Makefile.nmake
+++ b/ui/gtk/Makefile.nmake
@@ -36,7 +36,8 @@ WIRESHARK_CLEAN_LIBGTKUI_SRC = \
airpcap_gui_utils.c \
capture_if_details_dlg_win32.c \
main_airpcap_toolbar.c \
- pixbuf-csource.c
+ pixbuf-csource.c \
+ extcap_gtk.c
WIRESHARK_LIBGTKUI_SRC = \
$(WIRESHARK_CLEAN_LIBGTKUI_SRC)
diff --git a/ui/help_url.c b/ui/help_url.c
index 2120c24143..0a10666afc 100644
--- a/ui/help_url.c
+++ b/ui/help_url.c
@@ -268,9 +268,11 @@ topic_action_url(topic_action_e action)
case(HELP_EXPERT_INFO_DIALOG):
url = user_guide_url("ChAdvExpert.html");
break;
+#ifdef HAVE_EXTCAP
case(HELP_EXTCAP_OPTIONS_DIALOG):
url = user_guide_url("ChExtcapOptions.html");
break;
+#endif
case(HELP_STATS_SUMMARY_DIALOG):
url = user_guide_url("ChStatSummary.html");
break;
diff --git a/ui/help_url.h b/ui/help_url.h
index cd5db0d08f..b88b560357 100644
--- a/ui/help_url.h
+++ b/ui/help_url.h
@@ -86,7 +86,7 @@ typedef enum {
HELP_FOLLOW_STREAM_DIALOG,
HELP_SHOW_PACKET_BYTES_DIALOG,
HELP_EXPERT_INFO_DIALOG,
-#if HAVE_EXTCAP
+#ifdef HAVE_EXTCAP
HELP_EXTCAP_OPTIONS_DIALOG,
#endif
HELP_STATS_SUMMARY_DIALOG,
diff --git a/ui/qt/Makefile.am b/ui/qt/Makefile.am
index 33c0231ef4..9940f270f8 100644
--- a/ui/qt/Makefile.am
+++ b/ui/qt/Makefile.am
@@ -43,6 +43,26 @@ MAINTAINERCLEANFILES = \
$(NODIST_GENERATED_FILES) \
Makefile.in
+if HAVE_EXTCAP
+NODIST_GENERATED_HEADER_FILES += \
+ ui_extcap_options_dialog.h
+
+MOC_HDRS += \
+ extcap_argument.h \
+ extcap_argument_file.h \
+ extcap_argument_multiselect.h \
+ extcap_options_dialog.h
+
+UI_FILES += \
+ extcap_options_dialog.ui
+
+WIRESHARK_QT_SRC += \
+ extcap_argument.cpp \
+ extcap_argument_file.cpp \
+ extcap_argument_multiselect.cpp \
+ extcap_options_dialog.cpp
+endif
+
#
# Build "wireshark-tap-register.c", which contains a function
# "register_all_tap_listeners()"
diff --git a/ui/qt/Makefile.common b/ui/qt/Makefile.common
index 24428a020f..469850ca1e 100644
--- a/ui/qt/Makefile.common
+++ b/ui/qt/Makefile.common
@@ -49,7 +49,6 @@ NODIST_GENERATED_HEADER_FILES = \
ui_expert_info_dialog.h \
ui_export_object_dialog.h \
ui_export_pdu_dialog.h \
- ui_extcap_options_dialog.h \
ui_file_set_dialog.h \
ui_filter_dialog.h \
ui_filter_expression_frame.h \
@@ -180,10 +179,6 @@ MOC_HDRS = \
export_dissection_dialog.h \
export_object_dialog.h \
export_pdu_dialog.h \
- extcap_argument.h \
- extcap_argument_file.h \
- extcap_argument_multiselect.h \
- extcap_options_dialog.h \
file_set_dialog.h \
filter_action.h \
filter_dialog.h \
@@ -302,7 +297,6 @@ UI_FILES = \
expert_info_dialog.ui \
export_object_dialog.ui \
export_pdu_dialog.ui \
- extcap_options_dialog.ui \
file_set_dialog.ui \
filter_dialog.ui \
filter_expression_frame.ui \
@@ -451,10 +445,6 @@ WIRESHARK_QT_SRC = \
export_dissection_dialog.cpp \
export_object_dialog.cpp \
export_pdu_dialog.cpp \
- extcap_argument.cpp \
- extcap_argument_file.cpp \
- extcap_argument_multiselect.cpp \
- extcap_options_dialog.cpp \
file_set_dialog.cpp \
filter_action.cpp \
filter_dialog.cpp \
diff --git a/ui/qt/about_dialog.cpp b/ui/qt/about_dialog.cpp
index 5e9258b9df..8752e385f3 100644
--- a/ui/qt/about_dialog.cpp
+++ b/ui/qt/about_dialog.cpp
@@ -119,6 +119,7 @@ const QString AboutDialog::plugins_scan()
.arg(short_file);
}
+#ifdef HAVE_EXTCAP
GHashTable * tools = extcap_tools_list();
if (tools && g_hash_table_size(tools) > 0) {
QString short_file;
@@ -136,6 +137,7 @@ const QString AboutDialog::plugins_scan()
walker = g_list_next(walker);
}
}
+#endif
return plugin_table;
}
diff --git a/ui/qt/interface_tree.cpp b/ui/qt/interface_tree.cpp
index b696e09df9..5095a984f0 100644
--- a/ui/qt/interface_tree.cpp
+++ b/ui/qt/interface_tree.cpp
@@ -159,7 +159,7 @@ void InterfaceTree::display()
{
#ifdef HAVE_LIBPCAP
interface_t device;
-#if HAVE_EXTCAP
+#ifdef HAVE_EXTCAP
QIcon extcap_icon(StockIcon("x-capture-options"));
#endif
@@ -209,7 +209,7 @@ void InterfaceTree::display()
ti->setData(IFTREE_COL_NAME, Qt::UserRole, QString(device.name));
ti->setData(IFTREE_COL_STATS, Qt::UserRole, qVariantFromValue(&ti->points));
-#if HAVE_EXTCAP
+#ifdef HAVE_EXTCAP
if (device.if_info.type == IF_EXTCAP) {
if (extcap_has_configuration((const char *)(device.name), FALSE)) {
ti->setIcon(IFTREE_COL_EXTCAP, extcap_icon);
@@ -248,7 +248,7 @@ void InterfaceTree::display()
resizeColumnToContents(IFTREE_COL_NAME);
resizeColumnToContents(IFTREE_COL_STATS);
-#if HAVE_EXTCAP
+#ifdef HAVE_EXTCAP
resizeColumnToContents(IFTREE_COL_EXTCAP);
#endif
diff --git a/ui/qt/interface_tree.h b/ui/qt/interface_tree.h
index decba6a929..62c76d90fd 100644
--- a/ui/qt/interface_tree.h
+++ b/ui/qt/interface_tree.h
@@ -41,7 +41,7 @@ typedef QList<int> PointList;
enum InterfaceTreeColumns
{
-#if HAVE_EXTCAP
+#ifdef HAVE_EXTCAP
IFTREE_COL_EXTCAP,
#endif
IFTREE_COL_NAME,
diff --git a/ui/qt/main_welcome.cpp b/ui/qt/main_welcome.cpp
index 263fde5f49..696f681204 100644
--- a/ui/qt/main_welcome.cpp
+++ b/ui/qt/main_welcome.cpp
@@ -53,7 +53,7 @@
#define VERSION_FLAVOR ""
#endif
-#if HAVE_EXTCAP
+#ifdef HAVE_EXTCAP
#include <extcap.h>
#endif
@@ -165,7 +165,7 @@ MainWelcome::MainWelcome(QWidget *parent) :
connect(wsApp, SIGNAL(appInitialized()), this, SLOT(appInitialized()));
connect(welcome_ui_->interfaceTree, SIGNAL(itemDoubleClicked(QTreeWidgetItem*,int)),
this, SLOT(interfaceDoubleClicked(QTreeWidgetItem*,int)));
-#if HAVE_EXTCAP
+#ifdef HAVE_EXTCAP
connect(welcome_ui_->interfaceTree, SIGNAL(itemClicked(QTreeWidgetItem*,int)),
this, SLOT(interfaceClicked(QTreeWidgetItem*,int)));
#endif
@@ -306,7 +306,7 @@ void MainWelcome::interfaceSelected()
void MainWelcome::interfaceDoubleClicked(QTreeWidgetItem *item, int)
{
if (item) {
-#if HAVE_EXTCAP
+#ifdef HAVE_EXTCAP
QString extcap_string = QVariant(item->data(IFTREE_COL_EXTCAP, Qt::UserRole)).toString();
/* We trust the string here. If this interface is really extcap, the string is
* being checked immediatly before the dialog is being generated */
@@ -323,9 +323,9 @@ void MainWelcome::interfaceDoubleClicked(QTreeWidgetItem *item, int)
}
}
+#ifdef HAVE_EXTCAP
void MainWelcome::interfaceClicked(QTreeWidgetItem *item, int column)
{
-#if HAVE_EXTCAP
if (column == IFTREE_COL_EXTCAP) {
QString extcap_string = QVariant(item->data(IFTREE_COL_EXTCAP, Qt::UserRole)).toString();
/* We trust the string here. If this interface is really extcap, the string is
@@ -335,8 +335,8 @@ void MainWelcome::interfaceClicked(QTreeWidgetItem *item, int column)
emit showExtcapOptions(device_name);
}
}
-#endif
}
+#endif
void MainWelcome::updateRecentFiles() {
QString itemLabel;
diff --git a/ui/qt/main_welcome.h b/ui/qt/main_welcome.h
index d6d7f13c84..1c142cc1eb 100644
--- a/ui/qt/main_welcome.h
+++ b/ui/qt/main_welcome.h
@@ -68,7 +68,7 @@ signals:
void pushFilterSyntaxStatus(const QString&);
void popFilterSyntaxStatus();
void captureFilterSyntaxChanged(bool valid);
-#if HAVE_EXTCAP
+#ifdef HAVE_EXTCAP
void showExtcapOptions(QString &device_name);
#endif
@@ -78,7 +78,7 @@ public slots:
private slots:
void appInitialized();
void captureFilterTextEdited(const QString capture_filter);
-#if HAVE_EXTCAP
+#ifdef HAVE_EXTCAP
void interfaceClicked(QTreeWidgetItem *item, int column);
#endif
void interfaceDoubleClicked(QTreeWidgetItem *item, int column);
diff --git a/ui/qt/main_window.cpp b/ui/qt/main_window.cpp
index e604c5c708..8789776c2c 100644
--- a/ui/qt/main_window.cpp
+++ b/ui/qt/main_window.cpp
@@ -646,7 +646,7 @@ MainWindow::MainWindow(QWidget *parent) :
connect(main_ui_->welcomePage, SIGNAL(captureFilterSyntaxChanged(bool)),
this, SLOT(captureFilterSyntaxChanged(bool)));
-#if HAVE_EXTCAP
+#ifdef HAVE_EXTCAP
connect(this->main_welcome_, SIGNAL(showExtcapOptions(QString&)),
this, SLOT(showExtcapOptionsDialog(QString&)));
#endif
diff --git a/ui/qt/main_window.h b/ui/qt/main_window.h
index c13dab5cc4..88f0c074e6 100644
--- a/ui/qt/main_window.h
+++ b/ui/qt/main_window.h
@@ -608,7 +608,7 @@ private slots:
void changeEvent(QEvent* event);
-#if HAVE_EXTCAP
+#ifdef HAVE_EXTCAP
void extcap_options_finished(int result);
void showExtcapOptionsDialog(QString & device_name);
#endif
diff --git a/ui/qt/main_window_slots.cpp b/ui/qt/main_window_slots.cpp
index ba179977f9..7bed427c2b 100644
--- a/ui/qt/main_window_slots.cpp
+++ b/ui/qt/main_window_slots.cpp
@@ -96,7 +96,7 @@
#include "expert_info_dialog.h"
#include "export_object_dialog.h"
#include "export_pdu_dialog.h"
-#if HAVE_EXTCAP
+#ifdef HAVE_EXTCAP
#include "extcap_options_dialog.h"
#endif
#include "filter_action.h"