Wireshark 4.7.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
Classes | Macros | Typedefs | Functions | Variables
dissect_opts.h File Reference

Go to the source code of this file.

Classes

struct  dissect_options_tag
 Capture options coming from user interface. More...
 

Macros

#define LONGOPT_DISABLE_PROTOCOL   LONGOPT_BASE_DISSECTOR+1
 Long option value for disabling a protocol.
 
#define LONGOPT_ENABLE_HEURISTIC   LONGOPT_BASE_DISSECTOR+2
 Long option value for enabling a heuristic.
 
#define LONGOPT_DISABLE_HEURISTIC   LONGOPT_BASE_DISSECTOR+3
 Long option value for disabling a heuristic.
 
#define LONGOPT_ENABLE_PROTOCOL   LONGOPT_BASE_DISSECTOR+4
 Long option value for enabling a protocol.
 
#define LONGOPT_ONLY_PROTOCOLS   LONGOPT_BASE_DISSECTOR+5
 Long option value for exclusively enabling specified protocols.
 
#define LONGOPT_DISABLE_ALL_PROTOCOLS   LONGOPT_BASE_DISSECTOR+6
 Long option value for disabling all protocols.
 
#define LONGOPT_DISSECT_COMMON
 Options for dissecting common to all dissecting programs.
 
#define OPTSTRING_DISSECT_COMMON    "d:K:nN:R:t:u:Y:"
 Short options string for dissecting common to all dissecting programs.
 

Typedefs

typedef struct dissect_options_tag dissect_options
 Capture options coming from user interface.
 

Functions

bool dissect_opts_handle_opt (int opt, char *optarg_str_p)
 Handle a command line option.
 
bool setup_enabled_and_disabled_protocols (void)
 Set up disabled protocols and enabled/disabled heuristic protocols as per specified command-line options.
 

Variables

dissect_options global_dissect_options
 Global dissection options instance.
 

Detailed Description

Dissection options (parameters that affect dissection)

Wireshark - Network traffic analyzer By Gerald Combs geral.nosp@m.d@wi.nosp@m.resha.nosp@m.rk.o.nosp@m.rg Copyright 1998 Gerald Combs

SPDX-License-Identifier: GPL-2.0-or-later

Dissection options (parameters that affect dissection)

Macro Definition Documentation

◆ LONGOPT_DISSECT_COMMON

#define LONGOPT_DISSECT_COMMON
Value:
{"disable-protocol", ws_required_argument, NULL, LONGOPT_DISABLE_PROTOCOL }, \
{"enable-heuristic", ws_required_argument, NULL, LONGOPT_ENABLE_HEURISTIC }, \
{"disable-heuristic", ws_required_argument, NULL, LONGOPT_DISABLE_HEURISTIC }, \
{"enable-protocol", ws_required_argument, NULL, LONGOPT_ENABLE_PROTOCOL }, \
{"only-protocols", ws_required_argument, NULL, LONGOPT_ONLY_PROTOCOLS }, \
{"disable-all-protocols", ws_no_argument, NULL, LONGOPT_DISABLE_ALL_PROTOCOLS }, \
{"read-filter", ws_required_argument, NULL, 'R' }, \
{"display-filter", ws_required_argument, NULL, 'Y' }, \
#define LONGOPT_ENABLE_HEURISTIC
Long option value for enabling a heuristic.
Definition dissect_opts.h:35
#define LONGOPT_DISABLE_PROTOCOL
Long option value for disabling a protocol.
Definition dissect_opts.h:33
#define LONGOPT_ONLY_PROTOCOLS
Long option value for exclusively enabling specified protocols.
Definition dissect_opts.h:41
#define LONGOPT_DISABLE_HEURISTIC
Long option value for disabling a heuristic.
Definition dissect_opts.h:37
#define LONGOPT_DISABLE_ALL_PROTOCOLS
Long option value for disabling all protocols.
Definition dissect_opts.h:43
#define LONGOPT_ENABLE_PROTOCOL
Long option value for enabling a protocol.
Definition dissect_opts.h:39

Options for dissecting common to all dissecting programs.

Function Documentation

◆ dissect_opts_handle_opt()

bool dissect_opts_handle_opt ( int  opt,
char *  optarg_str_p 
)
extern

Handle a command line option.

An error message is reported with cmdarg_err() if it's not valid.

Parameters
optThe option character or integer value.
optarg_str_pThe string argument provided with the option, if any.
Returns
True if the option is valid, false if not.

◆ setup_enabled_and_disabled_protocols()

bool setup_enabled_and_disabled_protocols ( void  )
extern

Set up disabled protocols and enabled/disabled heuristic protocols as per specified command-line options.

Returns
True if all specified heuristic protocols exist, false otherwise.