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
37extern capture_options global_capture_opts;
38
47extern int commandline_early_options(int argc, char *argv[], commandline_usage_app_data_t* app_data);
48
54extern const struct ws_option* commandline_long_options(void);
55
61extern const char* commandline_optstring(void);
62
70extern void commandline_override_prefs(int argc, char *argv[], bool opt_reset);
71
84extern void commandline_other_options(capture_options* capture_opts, int argc, char *argv[], commandline_usage_app_data_t* app_data, bool opt_reset);
85
92extern void commandline_options_drop(const char *module_name, const char *pref_name);
93
100extern void commandline_options_reapply(void);
101
108extern void commandline_options_apply_extcap(void);
109
115extern void commandline_options_free(void);
116
122extern bool commandline_is_full_screen(void);
123
129extern char* commandline_get_cf_name(void);
130
136extern char* commandline_get_rfilter(void);
137
143extern char* commandline_get_dfilter(void);
144
150extern char* commandline_get_jfilter(void);
151
159
165extern uint32_t commandline_get_go_to_packet(void);
166
167#ifdef HAVE_LIBPCAP
173extern bool commandline_is_start_capture(void);
174
180extern bool commandline_is_quit_after_capture(void);
181
187extern char* commandline_get_first_capture_comment(void);
188
194extern int commandline_get_caps_queries(void);
195
201extern GPtrArray* commandline_get_capture_comments(void);
202
203#endif
204
205#ifdef __cplusplus
206}
207#endif /* __cplusplus */
208
209#endif /* __COMMANDLINE_H__ */
search_direction
Direction of a packet search through the capture.
Definition cfile.h:63
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