From ad82dfd5547e460359eb3597ddb6760a29c40439 Mon Sep 17 00:00:00 2001 From: Jim Young Date: Tue, 14 Jul 2015 00:28:49 -0400 Subject: Add new long options to GUIs to allow arbitrary protocols and heuristics to be disabled via command-line Future: Allow multiple protocols to be disabled in one option statement (perhaps using a comma or colon delmited set of names in ) instead of having to specify --disable-protocol multiple times. Change-Id: I9b8f960acf75298ebb098d9b667fca49dca52306 Reviewed-on: https://code.wireshark.org/review/9631 Petri-Dish: Michael Mann Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann --- capture_opts.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'capture_opts.h') diff --git a/capture_opts.h b/capture_opts.h index 4ace0bf974..4d99cc759c 100644 --- a/capture_opts.h +++ b/capture_opts.h @@ -63,7 +63,10 @@ extern "C" { * Non-capture long-only options should start here, to avoid collision * with capture options. */ -#define MIN_NON_CAPTURE_LONGOPT 129 +#define MIN_NON_CAPTURE_LONGOPT 129 +#define LONGOPT_DISABLE_PROTOCOL 130 +#define LONGOPT_ENABLE_HEURISTIC 131 +#define LONGOPT_DISABLE_HEURISTIC 132 /* * Options for capturing common to all capturing programs. @@ -102,7 +105,10 @@ extern "C" { {(char *)"list-data-link-types", no_argument, NULL, 'L'}, \ {(char *)"no-promiscuous-mode", no_argument, NULL, 'p'}, \ {(char *)"snapshot-length", required_argument, NULL, 's'}, \ - {(char *)"linktype", required_argument, NULL, 'y'}, + {(char *)"linktype", required_argument, NULL, 'y'}, \ + {(char *)"disable-protocol", required_argument, NULL, LONGOPT_DISABLE_PROTOCOL }, \ + {(char *)"enable-heuristic", required_argument, NULL, LONGOPT_ENABLE_HEURISTIC }, \ + {(char *)"disable-heuristic", required_argument, NULL, LONGOPT_DISABLE_HEURISTIC }, #define OPTSTRING_CAPTURE_COMMON \ "a:" OPTSTRING_A "b:" OPTSTRING_B "c:Df:i:" OPTSTRING_I "Lps:y:" -- cgit v1.2.3