path: root/ui/dissect_opts.c
diff options
authorMichael Mann <mmann78@netscape.net>2016-12-23 15:20:31 -0500
committerMichael Mann <mmann78@netscape.net>2016-12-24 02:30:21 +0000
commitc302812566373c5ac7383b825bea830b716778a5 (patch)
tree28bd309d9392e366bafe4ab7126615a9a0d3e7db /ui/dissect_opts.c
parentfb9a4d7413e7cf10cfce432e0d19e60c2f3acfe5 (diff)
Add enabled protocol list for dissectors who are disabled by default
We save a list of dissectors that are disabled through the Enabled Protocols dialog. This is because we assume dissectors are enabled by default. For dissectors that are disabled by default, we have no way to keep them enabled through the Enabled Protocols dialog. A dissector that defaults to being disabled has to be reset to enabled each time Wireshark is launched. Add a list similar to the disabled list for enabling dissectors that are disabled by default. This mostly applies to post-dissectors. Change-Id: I31a8d97a9fdbc472fe2a8666384e0f8786bb8e9f Reviewed-on: https://code.wireshark.org/review/19405 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'ui/dissect_opts.c')
1 files changed, 4 insertions, 0 deletions
diff --git a/ui/dissect_opts.c b/ui/dissect_opts.c
index 267b363669..65afd245c1 100644
--- a/ui/dissect_opts.c
+++ b/ui/dissect_opts.c
@@ -54,6 +54,7 @@ dissect_opts_init(void)
global_dissect_options.time_format = TS_NOT_SET;
global_dissect_options.disable_protocol_slist = NULL;
+ global_dissect_options.enable_protocol_slist = NULL;
global_dissect_options.enable_heur_slist = NULL;
global_dissect_options.disable_heur_slist = NULL;
@@ -150,6 +151,9 @@ dissect_opts_handle_opt(int opt, char *optarg_str_p)
case LONGOPT_DISABLE_HEURISTIC: /* disable heuristic dissection of protocol */
global_dissect_options.disable_heur_slist = g_slist_append(global_dissect_options.disable_heur_slist, optarg_str_p);
+ case LONGOPT_ENABLE_PROTOCOL: /* enable dissection of protocol (that is disableed by default) */
+ global_dissect_options.enable_protocol_slist = g_slist_append(global_dissect_options.enable_protocol_slist, optarg_str_p);
+ break;
/* the caller is responsible to send us only the right opt's */