Wireshark 4.7.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
recent.h
Go to the documentation of this file.
1
13#ifndef __RECENT_H__
14#define __RECENT_H__
15
16#include <glib.h>
17
18#include <stdio.h>
19#include "epan/timestamp.h"
20#include "ui/ws_ui_util.h"
21
22#ifdef __cplusplus
23extern "C" {
24#endif /* __cplusplus */
25
32#define RECENT_KEY_CAPTURE_FILE "recent.capture_file"
33
35#define RECENT_KEY_DISPLAY_FILTER "recent.display_filter"
36
37#define RECENT_KEY_COL_WIDTH "column.width"
38
39#define RECENT_KEY_CAPTURE_FILTER "recent.capture_filter"
40
41#define RECENT_KEY_REMOTE_HOST "recent.remote_host"
42
43typedef struct _col_width_data {
44 int width;
45 char xalign;
47
49#define COLUMN_XALIGN_DEFAULT 0
50#define COLUMN_XALIGN_LEFT 'L'
51#define COLUMN_XALIGN_CENTER 'C'
52#define COLUMN_XALIGN_RIGHT 'R'
53
63
64
73
74
83
84
93
94
104
105
123
124
133
134
147
148
152typedef struct recent_settings_tag {
153
154 /* --- Toolbar and pane visibility --- */
164 /* --- Packet list behaviour --- */
169 /* --- Time display --- */
174 /* --- Zoom and bytes display --- */
181 /* --- Find Packet settings --- */
189 /* --- Follow Stream settings --- */
193 /* --- Show Packet Bytes settings --- */
197 /* --- Main window geometry --- */
205 /* --- Splitter positions --- */
212 /* --- Privilege and system warnings --- */
216 /* --- Column and dialog tab state --- */
223 /* --- Miscellaneous --- */
231 /* --- TCP Stream Graph dialog --- */
236 /* --- Welcome page sidebar / banner slides --- */
256
259
263extern void recent_init(void);
264
270extern void recent_cleanup(void);
271
277extern bool write_recent(void);
278
284extern bool write_profile_recent(void);
285
293extern bool recent_read_static(char **rf_path_return, int *rf_errno_return);
294
302extern bool recent_read_profile_static(char **rf_path_return, int *rf_errno_return);
303
311extern bool recent_read_dynamic(char **rf_path_return, int *rf_errno_return);
312
322extern int recent_set_arg(char *prefarg);
323
330
338extern void recent_insert_column(int col);
339
347extern void recent_remove_column(int col);
348
354extern int recent_get_column_width(int col);
355
362extern void recent_set_column_width(int col, int width);
363
369extern char recent_get_column_xalign(int col);
370
377extern void recent_set_column_xalign(int col, char xalign);
378
385extern void window_geom_save(const char *name, window_geometry_t *geom);
386
394extern bool window_geom_load(const char *name, window_geometry_t *geom);
395
402extern void window_splitter_save(const char *name, const char *splitter_state);
403
410extern const char * window_splitter_load(const char *name);
411
418extern GList *recent_get_cfilter_list(const char *ifname);
419
427extern void recent_add_cfilter(const char *ifname, const char *s);
428
435extern struct remote_host *recent_get_remote_host(const char *host);
436
443
451extern void recent_remote_host_list_foreach(GFunc func, void *user_data);
452
457
464extern void recent_add_remote_host(char *host, struct remote_host *rh);
465
466#ifdef __cplusplus
467}
468#endif /* __cplusplus */
469
470#endif /* recent.h */
struct recent_settings_tag recent_settings_t
Persisted GUI state and preferences restored across Wireshark sessions.
void recent_remote_host_list_foreach(GFunc func, void *user_data)
Iterate over all items in the remote host list, calling a function for each member.
bool window_geom_load(const char *name, window_geometry_t *geom)
Load the desired geometry for this window from the geometry hashtable.
Definition recent.c:307
bytes_show_type
Selects the presentation format for payload data in the Follow Stream and Show Packet Bytes dialogs.
Definition recent.h:109
@ SHOW_EBCDIC
Definition recent.h:113
@ SHOW_CARRAY
Definition recent.h:112
@ SHOW_CODEC
Definition recent.h:120
@ SHOW_ASCII_CONTROL
Definition recent.h:111
@ SHOW_ASCII
Definition recent.h:110
@ SHOW_IMAGE
Definition recent.h:116
@ SHOW_YAML
Definition recent.h:121
@ SHOW_RUSTARRAY
Definition recent.h:119
@ SHOW_HEXDUMP
Definition recent.h:114
@ SHOW_RAW
Definition recent.h:118
@ SHOW_HTML
Definition recent.h:115
@ SHOW_JSON
Definition recent.h:117
void recent_set_column_width(int col, int width)
Set the column width for the given column.
Definition recent.c:1949
bool recent_read_static(char **rf_path_return, int *rf_errno_return)
Read recent settings file (static part).
Definition recent.c:1681
const char * window_splitter_load(const char *name)
Load the splitter state for a given interface.
Definition recent.c:340
int recent_set_arg(char *prefarg)
Given a -o command line string, parse it and set the recent value in question. Return an indication o...
Definition recent.c:1644
void window_splitter_save(const char *name, const char *splitter_state)
Save the splitter state for a given interface.
Definition recent.c:328
GList * recent_get_cfilter_list(const char *ifname)
Returns a list of recent capture filters.
Definition recent.c:486
void recent_set_column_xalign(int col, char xalign)
Set the column xalign for the given column.
Definition recent.c:1991
void recent_insert_column(int col)
Insert an entry in the recent column width setting for the given column, which should have been just ...
Definition recent.c:1901
int recent_get_remote_host_list_size(void)
Get the number of entries of the remote host list.
bytes_encoding_type
Character encoding used to render the ASCII side-panel in the Packet Bytes pane.
Definition recent.h:68
@ BYTES_ENC_FROM_PACKET
Definition recent.h:69
@ BYTES_ENC_EBCDIC
Definition recent.h:71
@ BYTES_ENC_ASCII
Definition recent.h:70
void recent_add_cfilter(const char *ifname, const char *s)
Add a capture filter to the global recent capture filter list or the recent capture filter list for a...
Definition recent.c:505
bool write_profile_recent(void)
Write profile recent settings file.
Definition recent.c:1039
bool recent_read_dynamic(char **rf_path_return, int *rf_errno_return)
Read recent settings file (dynamic part).
Definition recent.c:1855
bytes_decode_type
Secondary decode transformation applied to raw bytes before display in the Show Packet Bytes dialog.
Definition recent.h:138
@ DecodeAsPercentEncoding
Definition recent.h:143
@ DecodeAsHexDigits
Definition recent.h:142
@ DecodeAsCompressed
Definition recent.h:141
@ DecodeAsNone
Definition recent.h:139
@ DecodeAsROT13
Definition recent.h:145
@ DecodeAsBASE64
Definition recent.h:140
@ DecodeAsQuotedPrintable
Definition recent.h:144
int recent_get_column_width(int col)
Get the column width for the given column.
Definition recent.c:1929
void window_geom_save(const char *name, window_geometry_t *geom)
save the window and its current geometry into the geometry hashtable.
Definition recent.c:287
void recent_add_remote_host(char *host, struct remote_host *rh)
Add an entry to the remote_host_list.
struct remote_host * recent_get_remote_host(const char *host)
Get the value of an entry for a remote host from the remote host list.
search_char_set_type
Controls whether string searches match narrow (single-byte), wide (two-byte), or both character encod...
Definition recent.h:88
@ SEARCH_CHAR_SET_NARROW_AND_WIDE
Definition recent.h:89
@ SEARCH_CHAR_SET_WIDE
Definition recent.h:91
@ SEARCH_CHAR_SET_NARROW
Definition recent.h:90
void recent_free_remote_host_list(void)
Free all entries of the remote host list.
search_in_type
Selects which packet pane the Find Packet search operates on.
Definition recent.h:78
@ SEARCH_IN_PACKET_DETAILS
Definition recent.h:80
@ SEARCH_IN_PACKET_BYTES
Definition recent.h:81
@ SEARCH_IN_PACKET_LIST
Definition recent.h:79
char recent_get_column_xalign(int col)
Get the column xalign for the given column.
Definition recent.c:1971
follow_delta_type
Controls display of inter-segment timing deltas in the Follow Stream dialog.
Definition recent.h:128
@ FOLLOW_DELTA_ALL
Definition recent.h:131
@ FOLLOW_DELTA_NONE
Definition recent.h:129
@ FOLLOW_DELTA_TURN
Definition recent.h:130
void recent_init(void)
Initialize recent settings module (done at startup).
Definition recent.c:2013
void recent_remove_column(int col)
Remove an entry in the recent column width setting for the given column, which should have been just ...
Definition recent.c:1912
recent_settings_t recent
Definition recent.c:110
bytes_view_type
Numeric base used to render byte values in the Packet Bytes pane.
Definition recent.h:57
@ BYTES_OCT
Definition recent.h:61
@ BYTES_BITS
Definition recent.h:59
@ BYTES_DEC
Definition recent.h:60
@ BYTES_HEX
Definition recent.h:58
bool recent_read_profile_static(char **rf_path_return, int *rf_errno_return)
Read profile recent settings file (static part).
Definition recent.c:1743
void recent_cleanup(void)
Cleans up recent settings and frees allocated memory.
Definition recent.c:2019
void recent_free_column_width_info(recent_settings_t *rs)
Free the recent settings list of column width information.
Definition recent.c:234
bool write_recent(void)
Write recent_common settings file.
Definition recent.c:858
search_type_type
Specifies the matching method used by the Find Packet dialog.
Definition recent.h:98
@ SEARCH_TYPE_HEX_VALUE
Definition recent.h:100
@ SEARCH_TYPE_STRING
Definition recent.h:101
@ SEARCH_TYPE_DISPLAY_FILTER
Definition recent.h:99
@ SEARCH_TYPE_REGEX
Definition recent.h:102
Definition recent.h:43
Persisted GUI state and preferences restored across Wireshark sessions.
Definition recent.h:152
int gui_zoom_level
Definition recent.h:175
bytes_show_type gui_follow_show
Definition recent.h:190
bool gui_welcome_page_sidebar_tips_sponsorship
Definition recent.h:240
bool gui_search_multiple_occurs
Definition recent.h:186
bool tree_view_show
Definition recent.h:159
bool gui_welcome_page_sidebar_tips_tips
Definition recent.h:241
char * gui_geometry_main
Definition recent.h:208
search_type_type gui_search_type
Definition recent.h:187
bytes_decode_type gui_show_bytes_decode
Definition recent.h:194
bool gui_geometry_leftalign_actions
Definition recent.h:203
GList * gui_additional_toolbars
Definition recent.h:228
bytes_show_type gui_show_bytes_show
Definition recent.h:195
char * gui_theme_name
Definition recent.h:252
ts_type gui_time_format
Definition recent.h:170
bool byte_view_show
Definition recent.h:160
int gui_geometry_main_y
Definition recent.h:199
bool gui_search_reverse_dir
Definition recent.h:185
bool gui_allow_hover_selection
Definition recent.h:179
char * gui_fileopen_remembered_dir
Definition recent.h:225
bool gui_geometry_main_maximized
Definition recent.h:202
bool packet_list_show
Definition recent.h:158
int gui_time_precision
Definition recent.h:171
int gui_geometry_main_height
Definition recent.h:201
int gui_geometry_main_width
Definition recent.h:200
GList * interface_toolbars
Definition recent.h:229
bool capture_auto_scroll
Definition recent.h:166
bool gui_welcome_page_sidebar_tips_visible
Definition recent.h:238
bool aggregation_view
Definition recent.h:167
bool filter_toolbar_show
Definition recent.h:156
bool gui_welcome_page_sidebar_learn_visible
Definition recent.h:237
GList * custom_colors
Definition recent.h:227
unsigned gui_welcome_page_sidebar_tips_interval
Definition recent.h:243
int gui_geometry_main_lower_pane
Definition recent.h:207
follow_delta_type gui_follow_delta
Definition recent.h:191
bool gui_welcome_page_sidebar_tips_slides_test
Definition recent.h:253
int gui_geometry_main_x
Definition recent.h:198
int gui_geometry_main_upper_pane
Definition recent.h:206
bool wireless_toolbar_show
Definition recent.h:157
GList * col_width_list
Definition recent.h:217
int gui_profile_switch_check_count
Definition recent.h:224
bool gui_rlc_use_pdus_from_mac
Definition recent.h:226
bool packet_diagram_show
Definition recent.h:161
bytes_encoding_type gui_bytes_encoding
Definition recent.h:177
bool gui_welcome_page_sidebar_tips_auto_advance
Definition recent.h:242
bool gui_tsgd_goodput_show
Definition recent.h:233
bytes_view_type gui_bytes_view
Definition recent.h:176
GList * conversation_tabs
Definition recent.h:218
GList * endpoint_tabs_columns
Definition recent.h:221
bool gui_welcome_page_sidebar_tips_events
Definition recent.h:239
GList * endpoint_tabs
Definition recent.h:220
char * gui_geometry_main_master_split
Definition recent.h:209
bool privs_warn_if_elevated
Definition recent.h:213
bool main_toolbar_show
Definition recent.h:155
bool gui_search_case_sensitive
Definition recent.h:184
bool statusbar_show
Definition recent.h:162
double gui_tsgd_ma_window_size
Definition recent.h:234
char * gui_geometry_main_extra_split
Definition recent.h:210
ts_seconds_type gui_seconds_format
Definition recent.h:172
GList * conversation_tabs_columns
Definition recent.h:219
bool packet_list_colorize
Definition recent.h:165
bool gui_packet_diagram_field_values
Definition recent.h:178
bool gui_tsgd_throughput_show
Definition recent.h:232
bool sys_warn_if_no_capture
Definition recent.h:214
search_in_type gui_search_in
Definition recent.h:182
search_char_set_type gui_search_char_set
Definition recent.h:183
Definition ws_ui_util.h:30
ts_seconds_type
Controls how the seconds component of a timestamp is formatted for display.
Definition timestamp.h:64
ts_type
Format used to display packet timestamps in the summary packet list.
Definition timestamp.h:22