update epan/dissectors/pidl/drsuapi/drsuapi.idl from samba
[wireshark-sm.git] / ui / dissect_opts.h
blobd86aa0d22617a8cc83d0fea5d4d9199ce693977f
1 /** @file
3 * Dissection options (parameters that affect dissection)
5 * Wireshark - Network traffic analyzer
6 * By Gerald Combs <gerald@wireshark.org>
7 * Copyright 1998 Gerald Combs
9 * SPDX-License-Identifier: GPL-2.0-or-later
13 /** @file
15 * Dissection options (parameters that affect dissection)
19 #ifndef __DISSECT_OPTS_H__
20 #define __DISSECT_OPTS_H__
22 #ifdef __cplusplus
23 extern "C" {
24 #endif /* __cplusplus */
27 * Long options.
28 * We do not currently have long options corresponding to all short
29 * options; we should probably pick appropriate option names for them.
32 #define LONGOPT_DISABLE_PROTOCOL LONGOPT_BASE_DISSECTOR+1
33 #define LONGOPT_ENABLE_HEURISTIC LONGOPT_BASE_DISSECTOR+2
34 #define LONGOPT_DISABLE_HEURISTIC LONGOPT_BASE_DISSECTOR+3
35 #define LONGOPT_ENABLE_PROTOCOL LONGOPT_BASE_DISSECTOR+4
36 #define LONGOPT_ONLY_PROTOCOLS LONGOPT_BASE_DISSECTOR+5
37 #define LONGOPT_DISABLE_ALL_PROTOCOLS LONGOPT_BASE_DISSECTOR+6
40 * Options for dissecting common to all dissecting programs.
42 #define LONGOPT_DISSECT_COMMON \
43 {"disable-protocol", ws_required_argument, NULL, LONGOPT_DISABLE_PROTOCOL }, \
44 {"enable-heuristic", ws_required_argument, NULL, LONGOPT_ENABLE_HEURISTIC }, \
45 {"disable-heuristic", ws_required_argument, NULL, LONGOPT_DISABLE_HEURISTIC }, \
46 {"enable-protocol", ws_required_argument, NULL, LONGOPT_ENABLE_PROTOCOL }, \
47 {"only-protocols", ws_required_argument, NULL, LONGOPT_ONLY_PROTOCOLS }, \
48 {"disable-all-protocols", ws_no_argument, NULL, LONGOPT_DISABLE_ALL_PROTOCOLS }, \
49 {"read-filter", ws_required_argument, NULL, 'R' }, \
50 {"display-filter", ws_required_argument, NULL, 'Y' }, \
52 #define OPTSTRING_DISSECT_COMMON \
53 "d:K:nN:R:t:u:Y:"
55 /** Capture options coming from user interface */
56 typedef struct dissect_options_tag {
57 ts_type time_format;
58 ts_precision time_precision;
59 GSList *enable_protocol_slist; //enable protocols that are disabled by default
60 GSList *disable_protocol_slist;
61 GSList *enable_heur_slist;
62 GSList *disable_heur_slist;
63 } dissect_options;
65 extern dissect_options global_dissect_options;
68 * Handle a command line option.
69 * Returns true if the option is valid, false if not; an error message
70 * is reported with cmdarg_err() if it's not valid.
72 extern bool
73 dissect_opts_handle_opt(int opt, char *optarg_str_p);
76 * Set up disabled protocols and enabled/disabled heuristic protocols
77 * as per specified command-line options.
79 * Returns true if all specified heuristic protocols exist, false
80 * otherwise.
82 extern bool
83 setup_enabled_and_disabled_protocols(void);
85 #ifdef __cplusplus
87 #endif /* __cplusplus */
89 #endif /* dissect_opts.h */