*< set this field because doing so
*< requires too many dependencies.
*< Readers of this field should use
- *< GET_IFACE_DESCR to access it. */
+ *< get_iface_description() from
+ *< "capture_ui_utils.h" to access it. */
#ifdef _WIN32
int buffer_size; /**< the capture buffer size (MB) */
gboolean output_to_pipe; /**< save_file is a pipe (named or stdout) */
} capture_options;
-/* Get iface_descr (and set it if it's not set already).
- * It is assumed the caller includes capture_ui_utils.h (ugh, but what else
- * can we do?)
- */
-#define GET_IFACE_DESCR(capture_opts) capture_opts->iface_descr ? \
- capture_opts->iface_descr : \
- capture_opts->iface_descr = get_interface_descriptive_name(capture_opts->iface)
-
-
/* initialize the capture_options with some reasonable values */
extern void
capture_opts_init(capture_options *capture_opts, void *cfile);
#include "../epan/emem.h"
#include "file_util.h"
#if GTK_MAJOR_VERSION >= 2
+#ifdef HAVE_LIBPCAP
#include "../image/wsicon16.xpm"
#include "../image/wsicon32.xpm"
#include "../image/wsicon48.xpm"
#include "../image/wsiconcap32.xpm"
#include "../image/wsiconcap48.xpm"
#endif
+#endif
#ifdef SHOW_WELCOME_PAGE
#include "../image/wssplash.xpm"
#endif
if(capture_opts->iface) {
title = g_strdup_printf("%s: Capturing - Wireshark",
- GET_IFACE_DESCR(capture_opts));
+ get_iface_description(capture_opts));
} else {
title = g_strdup_printf("Capturing - Wireshark");
}
switching to the next multiple file. */
if(capture_opts->iface) {
title = g_strdup_printf("%s: Capturing - Wireshark",
- GET_IFACE_DESCR(capture_opts));
+ get_iface_description(capture_opts));
} else {
title = g_strdup_printf("Capturing - Wireshark");
}
if(capture_opts->iface) {
capture_msg = g_strdup_printf(" %s: <live capture in progress> to file: %s",
- GET_IFACE_DESCR(capture_opts),
+ get_iface_description(capture_opts),
(capture_opts->save_file) ? capture_opts->save_file : "");
} else {
capture_msg = g_strdup_printf(" <live capture in progress> to file: %s",
/* XXX - don't show the highest expert level unless the TCP checksum offloading is "solved" */
if (cf->f_datalen/1024/1024 > 10) {
capture_msg = g_strdup_printf(" %s: <live capture in progress> File: %s %lld MB [Expert: %s]",
- GET_IFACE_DESCR(capture_opts),
+ get_iface_description(capture_opts),
capture_opts->save_file,
cf->f_datalen/1024/1024,
val_to_str(expert_get_highest_severity(),
"Unknown (%u)"));
} else if (cf->f_datalen/1024 > 10) {
capture_msg = g_strdup_printf(" %s: <live capture in progress> File: %s %lld KB [Expert: %s]",
- GET_IFACE_DESCR(capture_opts),
+ get_iface_description(capture_opts),
capture_opts->save_file,
cf->f_datalen/1024,
val_to_str(expert_get_highest_severity(),
"Unknown (%u)"));
} else {
capture_msg = g_strdup_printf(" %s: <live capture in progress> File: %s %lld Bytes [Expert: %s]",
- GET_IFACE_DESCR(capture_opts),
+ get_iface_description(capture_opts),
capture_opts->save_file,
cf->f_datalen,
val_to_str(expert_get_highest_severity(),
#endif
if (cf->f_datalen/1024/1024 > 10) {
capture_msg = g_strdup_printf(" %s: <live capture in progress> File: %s %" G_GINT64_MODIFIER "d MB",
- GET_IFACE_DESCR(capture_opts),
+ get_iface_description(capture_opts),
capture_opts->save_file,
cf->f_datalen/1024/1024);
} else if (cf->f_datalen/1024 > 10) {
capture_msg = g_strdup_printf(" %s: <live capture in progress> File: %s %" G_GINT64_MODIFIER "d KB",
- GET_IFACE_DESCR(capture_opts),
+ get_iface_description(capture_opts),
capture_opts->save_file,
cf->f_datalen/1024);
} else {
capture_msg = g_strdup_printf(" %s: <live capture in progress> File: %s %" G_GINT64_MODIFIER "d Bytes",
- GET_IFACE_DESCR(capture_opts),
+ get_iface_description(capture_opts),
capture_opts->save_file,
cf->f_datalen);
}
statusbar_pop_file_msg();
capture_msg = g_strdup_printf(" %s: <live capture in progress> to file: %s",
- GET_IFACE_DESCR(capture_opts),
+ get_iface_description(capture_opts),
(capture_opts->save_file) ? capture_opts->save_file : "");
statusbar_push_file_msg(capture_msg);