summaryrefslogtreecommitdiff
path: root/ui/dissect_opts.h
AgeCommit message (Collapse)AuthorFilesLines
2017-04-08Clean up handling of enabled/disabled protocols/heuristic dissectors.Guy Harris1-0/+10
Add a "report a warning message" routine to the "report_err" code in libwsutil, and rename files and routines appropriately, as they don't only handle errors any more. Have a routine read_enabled_and_disabled_protos() that reads all the files that enable or disable protocols or heuristic dissectors, enables and disables them based on the contents of those files, and reports errors itself (as warnings) using the new "report a warning message" routine. Fix that error reporting to report separately on the disabled protocols, enabled protocols, and heuristic dissectors files. Have a routine to set up the enabled and disabled protocols and heuristic dissectors from the command-line arguments, so it's done the same way in all programs. If we try to enable or disable an unknown heuristic dissector via a command-line argument, report an error. Update a bunch of comments. Update the name of disabled_protos_cleanup(), as it cleans up information for disabled *and* enabled protocols and for heuristic dissectors. Support the command-line flags to enable and disable protocols and heuristic dissectors in tfshark. Change-Id: I9b8bd29947cccdf6dc34a0540b5509ef941391df Reviewed-on: https://code.wireshark.org/review/20966 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-12-24Add enabled protocol list for dissectors who are disabled by defaultMichael Mann1-0/+3
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>
2016-10-31Handle -K, -n, -N, and -u in the common dissection option code.Guy Harris1-1/+1
Also update tfshark to use that code. Change-Id: Ic03fb8ff48c8bfc460298d180b436e53f0076cbe Reviewed-on: https://code.wireshark.org/review/18588 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>
2016-10-31Have the routine that handles dissection options not exit.Guy Harris1-3/+7
Have it return TRUE if the option is OK and FALSE if it isn't, and let its caller exit as appropriate. Also, rename it - it's not adding something to a collection, it's just handling the option. Change-Id: I41863cbb67b7c257d900d3011609891b9b4a7467 Reviewed-on: https://code.wireshark.org/review/18587 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-10-30Have routines for parsing options that affect dissection.Guy Harris1-0/+106
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>