From 03c6937e62b9b35960b65d573399d64b7a8fd147 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Sun, 30 Oct 2016 14:07:33 -0700 Subject: 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 Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris --- wireshark-qt.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'wireshark-qt.cpp') diff --git a/wireshark-qt.cpp b/wireshark-qt.cpp index e86b83a1aa..d2c045acde 100644 --- a/wireshark-qt.cpp +++ b/wireshark-qt.cpp @@ -87,6 +87,7 @@ #include "ui/recent.h" #include "ui/simple_dialog.h" #include "ui/util.h" +#include "ui/dissect_opts.h" #include "ui/commandline.h" #include "ui/capture_ui_utils.h" @@ -715,25 +716,25 @@ int main(int argc, char *qt_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.enable_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.enable_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); } -- cgit v1.2.3