diff options
-rw-r--r-- | gtk/gsm_map_summary.c | 2 | ||||
-rw-r--r-- | gtk/mtp3_summary.c | 2 | ||||
-rw-r--r-- | gtk/summary_dlg.c | 8 | ||||
-rw-r--r-- | summary.c | 3 | ||||
-rw-r--r-- | summary.h | 3 |
5 files changed, 12 insertions, 6 deletions
diff --git a/gtk/gsm_map_summary.c b/gtk/gsm_map_summary.c index c12a1cae37..e55750d8e9 100644 --- a/gtk/gsm_map_summary.c +++ b/gtk/gsm_map_summary.c @@ -121,7 +121,7 @@ gsm_map_stat_gtk_sum_cb(GtkWidget *w _U_, gpointer d _U_) add_string_to_box(string_buff, file_box); /* format */ - g_snprintf(string_buff, SUM_STR_MAX, "Format: %s", wtap_file_type_string(summary.encap_type)); + g_snprintf(string_buff, SUM_STR_MAX, "Format: %s", wtap_file_type_string(summary.file_type)); add_string_to_box(string_buff, file_box); if (summary.has_snap) { diff --git a/gtk/mtp3_summary.c b/gtk/mtp3_summary.c index 13519555b7..dcda2ab6c6 100644 --- a/gtk/mtp3_summary.c +++ b/gtk/mtp3_summary.c @@ -284,7 +284,7 @@ mtp3_sum_gtk_sum_cb(GtkWidget *w _U_, gpointer d _U_) add_string_to_box(string_buff, file_box); /* format */ - file_type = wtap_file_type_string(summary.encap_type); + file_type = wtap_file_type_string(summary.file_type); g_snprintf(string_buff, SUM_STR_MAX, "Format: %s", (file_type ? file_type : "N/A")); add_string_to_box(string_buff, file_box); diff --git a/gtk/summary_dlg.c b/gtk/summary_dlg.c index 6eb1b64ff2..d8cdd39588 100644 --- a/gtk/summary_dlg.c +++ b/gtk/summary_dlg.c @@ -158,9 +158,13 @@ summary_open_cb(GtkWidget *w _U_, gpointer d _U_) 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); @@ -384,7 +388,7 @@ summary_open_cb(GtkWidget *w _U_, gpointer d _U_) /* 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 { @@ -120,7 +120,8 @@ summary_fill_in(capture_file *cf, summary_tally *st) st->filename = cf->filename; st->file_length = cf->f_datalen; - st->encap_type = cf->cd_t; + st->file_type = cf->cd_t; + st->encap_type = cf->lnk_t; st->has_snap = cf->has_snap; st->snap = cf->snap; st->elapsed_time = nstime_to_sec(&cf->elapsed_time); @@ -47,6 +47,7 @@ typedef struct _summary_tally { double filtered_stop; /* time in seconds, with msec resolution */ const char *filename; gint64 file_length; /* file length in bytes */ + int file_type; /* wiretap file type */ int encap_type; /* wiretap encapsulation type */ gboolean has_snap; /* TRUE if maximum capture packet length is known */ int snap; /* Maximum captured packet length */ @@ -60,7 +61,7 @@ typedef struct _summary_tally { const char *iface_descr;/* descriptive interface name */ } summary_tally; -extern void +extern void summary_fill_in(capture_file *cf, summary_tally *st); #ifdef HAVE_LIBPCAP |