Wireshark 4.7.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
commandline.h
Go to the documentation of this file.
1
12#ifndef __COMMANDLINE_H__
13#define __COMMANDLINE_H__
14
15#include <epan/cfile.h> /* For search_direction */
16#include "ui/capture_opts.h"
17
18#ifdef __cplusplus
19extern "C" {
20#endif /* __cplusplus */
21
22typedef void (*commandline_usage_output_cb_t)(FILE* const output);
23
25{
26 const char* item_name;
27 const char* console_name;
28 const char* help_header;
29#ifdef HAVE_LIBPCAP
30 commandline_usage_output_cb_t capture_interface_options;
31 commandline_usage_output_cb_t list_interface_options;
32 commandline_usage_output_cb_t capture_output_options;
33#endif
34
36
45extern int commandline_early_options(int argc, char *argv[], commandline_usage_app_data_t* app_data);
46
52extern const struct ws_option* commandline_long_options(void);
53
59extern const char* commandline_optstring(void);
60
68extern void commandline_override_prefs(int argc, char *argv[], bool opt_reset);
69
82extern void commandline_other_options(capture_options* capture_opts, int argc, char *argv[], commandline_usage_app_data_t* app_data, bool opt_reset);
83
90extern void commandline_options_drop(const char *module_name, const char *pref_name);
91
98extern void commandline_options_reapply(void);
99
106extern void commandline_options_apply_extcap(void);
107
113extern void commandline_options_free(void);
114
120extern bool commandline_is_full_screen(void);
121
127extern char* commandline_get_cf_name(void);
128
134extern char* commandline_get_rfilter(void);
135
141extern char* commandline_get_dfilter(void);
142
148extern char* commandline_get_jfilter(void);
149
156extern search_direction commandline_get_jump_direction(void);
157
163extern uint32_t commandline_get_go_to_packet(void);
164
165#ifdef HAVE_LIBPCAP
171extern bool commandline_is_start_capture(void);
172
178extern bool commandline_is_quit_after_capture(void);
179
185extern char* commandline_get_first_capture_comment(void);
186
192extern int commandline_get_caps_queries(void);
193
199extern GPtrArray* commandline_get_capture_comments(void);
200
201#endif
202
203#ifdef __cplusplus
204}
205#endif /* __cplusplus */
206
207#endif /* __COMMANDLINE_H__ */
int commandline_early_options(int argc, char *argv[], commandline_usage_app_data_t *app_data)
Process early command-line options.
Definition commandline.c:251
void commandline_options_reapply(void)
Reapply user-supplied command line options.
Definition commandline.c:859
const struct ws_option * commandline_long_options(void)
Retrieve the array of long options for command-line parsing.
Definition commandline.c:234
const char * commandline_optstring(void)
Returns a string containing all valid command-line options.
Definition commandline.c:239
char * commandline_get_jfilter(void)
Get the current jump filter.
Definition commandline.c:941
uint32_t commandline_get_go_to_packet(void)
Retrieves the packet number to which the user wants to jump.
Definition commandline.c:951
char * commandline_get_cf_name(void)
Get the current capture file name.
Definition commandline.c:926
char * commandline_get_dfilter(void)
Get the display filter from the commandline.
Definition commandline.c:936
bool commandline_is_full_screen(void)
Checks if Wireshark is running in full screen mode.
Definition commandline.c:921
void commandline_other_options(capture_options *capture_opts, int argc, char *argv[], commandline_usage_app_data_t *app_data, bool opt_reset)
Process other command-line options.
void commandline_options_drop(const char *module_name, const char *pref_name)
Drop command line options for a specific module and preference.
Definition commandline.c:837
void commandline_options_free(void)
Free command line options.
Definition commandline.c:917
void commandline_override_prefs(int argc, char *argv[], bool opt_reset)
Override preferences from command line arguments.
Definition commandline.c:424
void commandline_options_apply_extcap(void)
Apply external capture options based on command line arguments.
Definition commandline.c:879
search_direction commandline_get_jump_direction(void)
Get the jump direction from command line.
Definition commandline.c:946
char * commandline_get_rfilter(void)
Get the current read filter.
Definition commandline.c:931
Definition capture_opts.h:236
Definition commandline.h:25
Structure representing a long-form command-line option.
Definition ws_getopt.h:64