diff options
author | Guy Harris <guy@alum.mit.edu> | 2016-10-30 14:07:33 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2016-10-30 22:57:16 +0000 |
commit | 03c6937e62b9b35960b65d573399d64b7a8fd147 (patch) | |
tree | 1be6af646ca3e97004344962a5225cd18e3f11d5 /ui/gtk | |
parent | e3b2b2fdc3e6f2c4f1fd659bc6d045f237527036 (diff) |
Have routines for parsing options that affect dissection.
Have them handle -d, -t, --disable-protocol, --disable-heuristic, and
--enable-heuristic for TShark and both flavors of Wireshark.
Change-Id: I612c276b1f9df8a2092202d23ab3d48be7857e85
Reviewed-on: https://code.wireshark.org/review/18583
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'ui/gtk')
-rw-r--r-- | ui/gtk/main.c | 13 | ||||
-rw-r--r-- | ui/gtk/main_menubar.c | 9 |
2 files changed, 12 insertions, 10 deletions
diff --git a/ui/gtk/main.c b/ui/gtk/main.c index 94b1b623e8..f42f98dbb8 100644 --- a/ui/gtk/main.c +++ b/ui/gtk/main.c @@ -110,6 +110,7 @@ #include "ui/software_update.h" #include "ui/ui_util.h" #include "ui/util.h" +#include "ui/dissect_opts.h" #include "ui/commandline.h" #ifdef HAVE_LIBPCAP @@ -2462,25 +2463,25 @@ main(int argc, char *argv[]) set_disabled_heur_dissector_list(); } - if(global_commandline_info.disable_protocol_slist) { + if(global_dissect_options.disable_protocol_slist) { GSList *proto_disable; - for (proto_disable = global_commandline_info.disable_protocol_slist; proto_disable != NULL; proto_disable = g_slist_next(proto_disable)) + for (proto_disable = global_dissect_options.disable_protocol_slist; proto_disable != NULL; proto_disable = g_slist_next(proto_disable)) { proto_disable_proto_by_name((char*)proto_disable->data); } } - if(global_commandline_info.enable_heur_slist) { + if(global_dissect_options.disable_heur_slist) { GSList *heur_enable; - for (heur_enable = global_commandline_info.enable_heur_slist; heur_enable != NULL; heur_enable = g_slist_next(heur_enable)) + for (heur_enable = global_dissect_options.disable_heur_slist; heur_enable != NULL; heur_enable = g_slist_next(heur_enable)) { proto_enable_heuristic_by_name((char*)heur_enable->data, TRUE); } } - if(global_commandline_info.disable_heur_slist) { + if(global_dissect_options.disable_heur_slist) { GSList *heur_disable; - for (heur_disable = global_commandline_info.disable_heur_slist; heur_disable != NULL; heur_disable = g_slist_next(heur_disable)) + for (heur_disable = global_dissect_options.disable_heur_slist; heur_disable != NULL; heur_disable = g_slist_next(heur_disable)) { proto_enable_heuristic_by_name((char*)heur_disable->data, FALSE); } diff --git a/ui/gtk/main_menubar.c b/ui/gtk/main_menubar.c index 3b6035e519..0b8aeacc60 100644 --- a/ui/gtk/main_menubar.c +++ b/ui/gtk/main_menubar.c @@ -39,6 +39,7 @@ #include <epan/color_filters.h> #include "ui/commandline.h" +#include "ui/dissect_opts.h" #include "ui/main_statusbar.h" #include "ui/preference_utils.h" #include "ui/recent.h" @@ -3174,8 +3175,8 @@ menus_init(void) G_N_ELEMENTS(main_menu_bar_toggle_action_entries), /* the number of entries */ NULL); /* data to pass to the action callbacks */ - if (global_commandline_info.time_format != TS_NOT_SET) { - recent.gui_time_format = global_commandline_info.time_format; + if (global_dissect_options.time_format != TS_NOT_SET) { + recent.gui_time_format = global_dissect_options.time_format; } gtk_action_group_add_radio_actions (main_menu_bar_action_group, /* the action group */ main_menu_bar_radio_view_time_entries, /* an array of radio action descriptions */ @@ -4253,8 +4254,8 @@ menu_recent_read_finished(void) main_widgets_rearrange(); /* Update the time format if we had a command line value. */ - if (global_commandline_info.time_format != TS_NOT_SET) { - recent.gui_time_format = global_commandline_info.time_format; + if (global_dissect_options.time_format != TS_NOT_SET) { + recent.gui_time_format = global_dissect_options.time_format; } /* XXX Fix me */ |