#ifdef HAVE_LIBPCAP
#include "../capture.h"
#include "gtk/main.h"
+#include "gtk/capture_globals.h"
#endif
#include "gtk/summary_dlg.h"
indent = g_strdup(title);
}
label = gtk_label_new(indent);
+ if (strlen(value) == 0) {
+ gchar *message = g_strdup_printf("<span weight=\"bold\">%s</span>", title);
+ gtk_label_set_markup(GTK_LABEL(label), message);
+ g_free (message);
+ }
g_free(indent);
- gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5);
+ gtk_misc_set_alignment(GTK_MISC(label), 0.0f, 0.5f);
gtk_widget_set_sensitive(label, sensitive);
gtk_table_attach_defaults(GTK_TABLE(list), label, 0, 1, *row, *row+1);
label = gtk_label_new(value);
- gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5);
+ gtk_misc_set_alignment(GTK_MISC(label), 0.0f, 0.5f);
gtk_widget_set_sensitive(label, sensitive);
gtk_table_attach_defaults(GTK_TABLE(list), label, 1, 2, *row, *row+1);
/* initial computations */
summary_fill_in(&cfile, &summary);
#ifdef HAVE_LIBPCAP
- summary_fill_in_capture(capture_opts, &summary);
+ summary_fill_in_capture(&global_capture_opts, &summary);
#endif
seconds = summary.stop_time - summary.start_time;
disp_seconds = summary.filtered_stop - summary.filtered_start;
/* Container for each row of widgets */
main_vb = gtk_vbox_new(FALSE, 12);
- gtk_container_border_width(GTK_CONTAINER(main_vb), 12);
+ gtk_container_set_border_width(GTK_CONTAINER(main_vb), 12);
gtk_container_add(GTK_CONTAINER(sum_open_w), main_vb);
/* table */
add_string_to_table(table, &row, "Length:", string_buff);
/* format */
- g_snprintf(string_buff, SUM_STR_MAX, "%s", wtap_file_type_string(summary.encap_type));
+ g_snprintf(string_buff, SUM_STR_MAX, "%s", wtap_file_type_string(summary.file_type));
add_string_to_table(table, &row, "Format:", string_buff);
+ /* encapsulation */
+ g_snprintf(string_buff, SUM_STR_MAX, "%s", wtap_encap_string(summary.encap_type));
+ add_string_to_table(table, &row, "Encapsulation:", string_buff);
+
if (summary.has_snap) {
/* snapshot length */
g_snprintf(string_buff, SUM_STR_MAX, "%u bytes", summary.snap);
add_string_to_table(table, &row, "Display filter:", "none");
}
+ /* Ignored packet count */
+ g_snprintf(string_buff, SUM_STR_MAX, "%i", summary.ignored_count);
+ add_string_to_table(table, &row, "Ignored packets:", string_buff);
+
/* Traffic */
list = simple_list_new(4, titles);
gtk_container_add(GTK_CONTAINER(main_vb), list);
/* MBit per second */
if (seconds > 0) {
- g_snprintf(string_buff, SUM_STR_MAX, "%.3f",
+ g_snprintf(string_buff, SUM_STR_MAX, "%.3f",
/* MSVC cannot convert from unsigned __int64 to float, so first convert to signed __int64 */
((gint64) summary.bytes) * 8.0 / (seconds * 1000.0 * 1000.0));
} else {