aboutsummaryrefslogtreecommitdiffstats
path: root/summary.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2016-06-05 17:21:23 -0700
committerGuy Harris <guy@alum.mit.edu>2016-06-06 00:22:21 +0000
commitadee6850898a5469850a157c5816996691855ed2 (patch)
tree099a9d5fb77c490b5b6b05fc539e1208223327d3 /summary.c
parent56e33a549f54038e9155c781bb2097fe30d4b2dc (diff)
Directly use wtap_opttypes calls to fetch SHB options.
Don't put them in the summary structure; the summary routines should calculate summary statistics, not dig up every bit of information that *could* appear in a summary. Instead, have the GUI code call wtap_file_get_shb() to get the SHB information and call wtap_optionblock_get_option_string() to fetch the option values. Move the option code definitions into wtap_opttypes.h, as they're used by the API. Change-Id: Icef11f5fb30fdc3df1bb0208aae9ed0aebaf0182 Reviewed-on: https://code.wireshark.org/review/15748 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'summary.c')
-rw-r--r--summary.c15
1 files changed, 0 insertions, 15 deletions
diff --git a/summary.c b/summary.c
index cf9026e..77cd388 100644
--- a/summary.c
+++ b/summary.c
@@ -107,7 +107,6 @@ summary_fill_in(capture_file *cf, summary_tally *st)
{
frame_data *first_frame, *cur_frame;
guint32 framenum;
- wtap_optionblock_t shb_inf;
iface_options iface;
guint i;
wtapng_iface_descriptions_t* idb_info;
@@ -161,20 +160,6 @@ 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(cf->wth);
- if(shb_inf == NULL){
- st->opt_comment = NULL;
- st->shb_hardware = NULL;
- st->shb_os = NULL;
- st->shb_user_appl = NULL;
- }else{
- wtap_optionblock_get_option_string(shb_inf, OPT_COMMENT, &st->opt_comment);
- wtap_optionblock_get_option_string(shb_inf, OPT_SHB_HARDWARE, &st->shb_hardware);
- wtap_optionblock_get_option_string(shb_inf, OPT_SHB_OS, &st->shb_os);
- wtap_optionblock_get_option_string(shb_inf, OPT_SHB_USERAPPL, (char**)&st->shb_user_appl);
- }
-
st->ifaces = g_array_new(FALSE, FALSE, sizeof(iface_options));
idb_info = wtap_file_get_idb_info(cf->wth);
for (i = 0; i < idb_info->interface_data->len; i++) {