| Wireshark 4.7.3 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
commandline.h
Go to the documentation of this file.
1
11
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
19 extern "C" {
20#endif /* __cplusplus */
21
22 typedef void (*commandline_usage_output_cb_t)(FILE* const output);
23
27 typedef struct commandline_usage_app_data
28{
29 const char *item_name;
30 const char *console_name;
31 const char *help_header;
32#ifdef HAVE_LIBPCAP
33 commandline_usage_output_cb_t capture_interface_options;
34 commandline_usage_output_cb_t list_interface_options;
35 commandline_usage_output_cb_t capture_output_options;
36#endif
37} commandline_usage_app_data_t;
38
39 extern capture_options global_capture_opts;
40
49 extern int commandline_early_options(int argc, char *argv[], commandline_usage_app_data_t* app_data);
50
56 extern const struct ws_option* commandline_long_options(void);
57
63 extern const char* commandline_optstring(void);
64
72 extern void commandline_override_prefs(int argc, char *argv[], bool opt_reset);
73
86 extern void commandline_other_options(capture_options* capture_opts, int argc, char *argv[], commandline_usage_app_data_t* app_data, bool opt_reset);
87
94 extern void commandline_options_drop(const char *module_name, const char *pref_name);
95
102 extern void commandline_options_reapply(void);
103
110 extern void commandline_options_apply_extcap(void);
111
117 extern void commandline_options_free(void);
118
124 extern bool commandline_is_full_screen(void);
125
131 extern char* commandline_get_cf_name(void);
132
138 extern char* commandline_get_rfilter(void);
139
145 extern char* commandline_get_dfilter(void);
146
152 extern char* commandline_get_jfilter(void);
153
159
160 extern search_direction commandline_get_jump_direction(void);
161
167 extern uint32_t commandline_get_go_to_packet(void);
168
169#ifdef HAVE_LIBPCAP
175 extern bool commandline_is_start_capture(void);
176
182 extern bool commandline_is_quit_after_capture(void);
183
189 extern char* commandline_get_first_capture_comment(void);
190
196 extern int commandline_get_caps_queries(void);
197
203 extern GPtrArray* commandline_get_capture_comments(void);
204
205#endif
206
207#ifdef __cplusplus
208}
209#endif /* __cplusplus */
210
211#endif /* __COMMANDLINE_H__ */
capture_opts.h
cfile.h
search_direction
search_direction
Direction of a packet search through the capture.
Definition cfile.h:63
commandline_early_options
int commandline_early_options(int argc, char *argv[], commandline_usage_app_data_t *app_data)
Process early command-line options.
Definition commandline.c:251
commandline_options_reapply
void commandline_options_reapply(void)
Reapply user-supplied command line options.
Definition commandline.c:859
commandline_long_options
const struct ws_option * commandline_long_options(void)
Retrieve the array of long options for command-line parsing.
Definition commandline.c:234
commandline_optstring
const char * commandline_optstring(void)
Returns a string containing all valid command-line options.
Definition commandline.c:239
commandline_get_jfilter
char * commandline_get_jfilter(void)
Get the current jump filter.
Definition commandline.c:941
commandline_get_go_to_packet
uint32_t commandline_get_go_to_packet(void)
Retrieves the packet number to which the user wants to jump.
Definition commandline.c:951
commandline_get_cf_name
char * commandline_get_cf_name(void)
Get the current capture file name.
Definition commandline.c:926
commandline_get_dfilter
char * commandline_get_dfilter(void)
Get the display filter from the commandline.
Definition commandline.c:936
commandline_is_full_screen
bool commandline_is_full_screen(void)
Checks if Wireshark is running in full screen mode.
Definition commandline.c:921
commandline_other_options
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.
commandline_options_drop
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
commandline_options_free
void commandline_options_free(void)
Free command line options.
Definition commandline.c:917
commandline_override_prefs
void commandline_override_prefs(int argc, char *argv[], bool opt_reset)
Override preferences from command line arguments.
Definition commandline.c:424
commandline_options_apply_extcap
void commandline_options_apply_extcap(void)
Apply external capture options based on command line arguments.
Definition commandline.c:879
commandline_usage_app_data_t
struct commandline_usage_app_data commandline_usage_app_data_t
Holds application-specific strings and callbacks used to render command-line usage/help output.
commandline_get_jump_direction
search_direction commandline_get_jump_direction(void)
Get the jump direction from command line.
Definition commandline.c:946
commandline_get_rfilter
char * commandline_get_rfilter(void)
Get the current read filter.
Definition commandline.c:931
commandline_usage_app_data
Holds application-specific strings and callbacks used to render command-line usage/help output.
Definition commandline.h:28
commandline_usage_app_data::item_name
const char * item_name
Definition commandline.h:29
commandline_usage_app_data::console_name
const char * console_name
Definition commandline.h:30
commandline_usage_app_data::help_header
const char * help_header
Definition commandline.h:31
ws_option
Structure representing a long-form command-line option.
Definition ws_getopt.h:64