forked from osmocom/wireshark
parent
a062fb34bd
commit
b5a2ba98be
12
summary.c
12
summary.c
|
@ -93,6 +93,7 @@ summary_fill_in(capture_file *cf, summary_tally *st)
|
|||
|
||||
frame_data *first_frame, *cur_frame;
|
||||
guint32 framenum;
|
||||
wtapng_section_t* shb_inf;
|
||||
|
||||
st->start_time = 0;
|
||||
st->stop_time = 0;
|
||||
|
@ -132,6 +133,16 @@ summary_fill_in(capture_file *cf, summary_tally *st)
|
|||
st->drops = cf->drops;
|
||||
st->dfilter = cf->dfilter;
|
||||
|
||||
/* Get info from SHB */
|
||||
shb_inf = wtap_file_get_shb_info(cf->wth);
|
||||
|
||||
shb_inf = wtap_file_get_shb_info(cf->wth);
|
||||
st->opt_comment = shb_inf->opt_comment;
|
||||
st->shb_hardware = shb_inf->shb_hardware;
|
||||
st->shb_os = shb_inf->shb_os;
|
||||
st->shb_user_appl = shb_inf->shb_user_appl;
|
||||
g_free(shb_inf);
|
||||
|
||||
st->ifaces = g_array_new(FALSE, FALSE, sizeof(iface_options));
|
||||
}
|
||||
|
||||
|
@ -180,6 +191,7 @@ summary_fill_in_capture(capture_file *cf,capture_options *capture_opts, summary_
|
|||
iface.linktype = wtapng_if_descr.link_type;
|
||||
g_array_append_val(st->ifaces, iface);
|
||||
}
|
||||
g_free(idb_info);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -67,6 +67,11 @@ typedef struct _summary_tally {
|
|||
guint64 drops; /**< number of packet drops */
|
||||
const char *dfilter; /**< display filter */
|
||||
gboolean is_tempfile;
|
||||
/* from SHB, use summary_fill_shb_inf() to get values */
|
||||
gchar *opt_comment; /**< comment from SHB block */
|
||||
gchar *shb_hardware; /**< Capture HW from SHB block */
|
||||
gchar *shb_os; /**< The OS the capture was made on from SHB block */
|
||||
gchar *shb_user_appl; /**< The application that made the capture from SHB block */
|
||||
/* capture related, use summary_fill_in_capture() to get values */
|
||||
GArray *ifaces;
|
||||
gboolean legacy;
|
||||
|
|
|
@ -55,6 +55,7 @@
|
|||
|
||||
#define SUM_STR_MAX 1024
|
||||
#define FILTER_SNIP_LEN 50
|
||||
#define SHB_STR_SNIP_LEN 50
|
||||
|
||||
|
||||
static void
|
||||
|
@ -241,6 +242,21 @@ summary_open_cb(GtkWidget *w _U_, gpointer d _U_)
|
|||
/* Capture */
|
||||
add_string_to_table(table, &row, "", "");
|
||||
add_string_to_table_sensitive(table, &row, "Capture", "", (summary.ifaces->len > 0));
|
||||
if(summary.shb_hardware){
|
||||
/* trucate the string to a reasonable length */
|
||||
g_snprintf(string_buff, SHB_STR_SNIP_LEN, "%s",summary.shb_hardware);
|
||||
add_string_to_table(table, &row, "Capture HW:",string_buff);
|
||||
}
|
||||
if(summary.shb_os){
|
||||
/* trucate the strings to a reasonable length */
|
||||
g_snprintf(string_buff, SHB_STR_SNIP_LEN, "%s",summary.shb_os);
|
||||
add_string_to_table(table, &row, "OS:", string_buff);
|
||||
}
|
||||
if(summary.shb_user_appl){
|
||||
/* trucate the string to a reasonable length */
|
||||
g_snprintf(string_buff, SHB_STR_SNIP_LEN, "%s",summary.shb_user_appl);
|
||||
add_string_to_table(table, &row, "Capture application:", string_buff);
|
||||
}
|
||||
scrolled_window = gtk_scrolled_window_new (NULL, NULL);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (scrolled_window), 5);
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window),
|
||||
|
|
Loading…
Reference in New Issue