Wireshark 4.5.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
54typedef enum {
55 BYTES_HEX,
56 BYTES_BITS,
57 BYTES_DEC,
58 BYTES_OCT
59} bytes_view_type;
60
61typedef enum {
62 BYTES_ENC_FROM_PACKET, // frame_data packet_char_enc
63 BYTES_ENC_ASCII,
64 BYTES_ENC_EBCDIC
65} bytes_encoding_type;
66
67typedef enum {
68 SEARCH_IN_PACKET_LIST,
69 SEARCH_IN_PACKET_DETAILS,
70 SEARCH_IN_PACKET_BYTES
71} search_in_type;
72
73typedef enum {
74 SEARCH_CHAR_SET_NARROW_AND_WIDE,
75 SEARCH_CHAR_SET_NARROW,
76 SEARCH_CHAR_SET_WIDE
77} search_char_set_type;
78
79typedef enum {
80 SEARCH_TYPE_DISPLAY_FILTER,
81 SEARCH_TYPE_HEX_VALUE,
82 SEARCH_TYPE_STRING,
83 SEARCH_TYPE_REGEX
84} search_type_type;
85
86typedef enum {
87 SHOW_ASCII,
88 SHOW_ASCII_CONTROL,
89 SHOW_CARRAY,
90 SHOW_EBCDIC,
91 SHOW_HEXDUMP,
92 SHOW_HTML,
93 SHOW_IMAGE,
94 SHOW_JSON,
95 SHOW_RAW,
96 SHOW_RUSTARRAY,
97 SHOW_CODEC, // Will map to UTF-8 in the combobox (other codecs
98 // are generated at runtime).
99 SHOW_YAML
100} bytes_show_type;
101
102typedef enum {
103 FOLLOW_DELTA_NONE,
104 FOLLOW_DELTA_TURN,
105 FOLLOW_DELTA_ALL
106} follow_delta_type;
107
108typedef enum {
109 DecodeAsNone,
110 DecodeAsBASE64,
111 DecodeAsCompressed,
112 DecodeAsHexDigits,
113 DecodeAsPercentEncoding,
114 DecodeAsQuotedPrintable,
115 DecodeAsROT13
116} bytes_decode_type;
117
119typedef struct recent_settings_tag {
120 bool main_toolbar_show;
121 bool filter_toolbar_show;
122 bool wireless_toolbar_show;
123 bool packet_list_show;
124 bool tree_view_show;
125 bool byte_view_show;
126 bool packet_diagram_show;
127 bool statusbar_show;
128 bool packet_list_colorize;
129 bool capture_auto_scroll;
130 ts_type gui_time_format;
131 int gui_time_precision;
132 ts_seconds_type gui_seconds_format;
133 int gui_zoom_level;
134 bytes_view_type gui_bytes_view;
135 bytes_encoding_type gui_bytes_encoding;
136 bool gui_packet_diagram_field_values;
137 bool gui_allow_hover_selection;
138
139 search_in_type gui_search_in;
140 search_char_set_type gui_search_char_set;
141 bool gui_search_case_sensitive;
142 bool gui_search_reverse_dir;
143 bool gui_search_multiple_occurs;
144 search_type_type gui_search_type;
145 bytes_show_type gui_follow_show;
146 follow_delta_type gui_follow_delta;
147 bytes_decode_type gui_show_bytes_decode;
148 bytes_show_type gui_show_bytes_show;
149
150 int gui_geometry_main_x;
151 int gui_geometry_main_y;
152 int gui_geometry_main_width;
153 int gui_geometry_main_height;
154
155 bool gui_geometry_main_maximized;
156 bool gui_geometry_leftalign_actions;
157
158 int gui_geometry_main_upper_pane;
159 int gui_geometry_main_lower_pane;
160 char *gui_geometry_main;
161 char *gui_geometry_main_master_split;
162 char *gui_geometry_main_extra_split;
163 bool privs_warn_if_elevated;
164 bool sys_warn_if_no_capture;
165 GList *col_width_list; /* column widths */
166 GList *conversation_tabs; /* enabled conversation dialog tabs */
167 GList *conversation_tabs_columns; /* save the columns for conversation dialogs */
168 GList *endpoint_tabs; /* enabled endpoint dialog tabs */
169 GList *endpoint_tabs_columns; /* save the columns for endpoint dialogs */
170 int gui_profile_switch_check_count; /* number of packets / events to check for automatic profile switching */
171 char *gui_fileopen_remembered_dir; /* folder of last capture loaded in File Open dialog */
172 bool gui_rlc_use_pdus_from_mac;
173 GList *custom_colors;
174 GList *gui_additional_toolbars;
175 GList *interface_toolbars;
177
180
182extern void recent_init(void);
183
185extern void recent_cleanup(void);
186
191extern bool write_recent(void);
192
197extern bool write_profile_recent(void);
198
205extern bool recent_read_static(char **rf_path_return, int *rf_errno_return);
206
213extern bool recent_read_profile_static(char **rf_path_return, int *rf_errno_return);
214
221extern bool recent_read_dynamic(char **rf_path_return, int *rf_errno_return);
222
232extern int recent_set_arg(char *prefarg);
233
239
246extern void recent_insert_column(int col);
247
254extern void recent_remove_column(int col);
255
260extern int recent_get_column_width(int col);
261
267extern void recent_set_column_width(int col, int width);
268
273extern char recent_get_column_xalign(int col);
274
280extern void recent_set_column_xalign(int col, char xalign);
281
282/* save the window and its current geometry into the geometry hashtable */
283extern void window_geom_save(const char *name, window_geometry_t *geom);
284
285/* load the desired geometry for this window from the geometry hashtable */
286extern bool window_geom_load(const char *name, window_geometry_t *geom);
287
288extern void window_splitter_save(const char *name, const char *splitter_state);
289
290extern const char * window_splitter_load(const char *name);
291
297extern GList *recent_get_cfilter_list(const char *ifname);
298
306extern void recent_add_cfilter(const char *ifname, const char *s);
307
315extern struct remote_host *recent_get_remote_host(const char *host);
316
323
331extern void recent_remote_host_list_foreach(GFunc func, void *user_data);
332
337
344extern void recent_add_remote_host(char *host, struct remote_host *rh);
345
346#ifdef __cplusplus
347}
348#endif /* __cplusplus */
349
350#endif /* recent.h */
struct recent_settings_tag recent_settings_t
void recent_remote_host_list_foreach(GFunc func, void *user_data)
void recent_set_column_width(int col, int width)
Definition recent.c:1819
bool recent_read_static(char **rf_path_return, int *rf_errno_return)
Definition recent.c:1566
int recent_set_arg(char *prefarg)
Definition recent.c:1529
GList * recent_get_cfilter_list(const char *ifname)
Definition recent.c:471
void recent_set_column_xalign(int col, char xalign)
Definition recent.c:1861
void recent_insert_column(int col)
Definition recent.c:1771
int recent_get_remote_host_list_size(void)
void recent_add_cfilter(const char *ifname, const char *s)
Definition recent.c:490
bool write_profile_recent(void)
Definition recent.c:976
bool recent_read_dynamic(char **rf_path_return, int *rf_errno_return)
Definition recent.c:1725
int recent_get_column_width(int col)
Definition recent.c:1799
void recent_add_remote_host(char *host, struct remote_host *rh)
struct remote_host * recent_get_remote_host(const char *host)
void recent_free_remote_host_list(void)
char recent_get_column_xalign(int col)
Definition recent.c:1841
void recent_init(void)
Definition recent.c:1883
void recent_remove_column(int col)
Definition recent.c:1782
recent_settings_t recent
Definition recent.c:96
bool recent_read_profile_static(char **rf_path_return, int *rf_errno_return)
Definition recent.c:1618
void recent_cleanup(void)
Definition recent.c:1889
void recent_free_column_width_info(recent_settings_t *rs)
Definition recent.c:219
bool write_recent(void)
Definition recent.c:831
Definition recent.h:43
Definition recent.h:119
Definition ws_ui_util.h:30