| 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
23 extern "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
43 typedef struct _col_width_data {
44 int width;
45 char xalign;
46} col_width_data;
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
54 typedef enum {
55 BYTES_HEX,
56 BYTES_BITS,
57 BYTES_DEC,
58 BYTES_OCT
59} bytes_view_type;
60
61 typedef enum {
62 BYTES_ENC_FROM_PACKET, // frame_data packet_char_enc
63 BYTES_ENC_ASCII,
64 BYTES_ENC_EBCDIC
65} bytes_encoding_type;
66
67 typedef enum {
68 SEARCH_IN_PACKET_LIST,
69 SEARCH_IN_PACKET_DETAILS,
70 SEARCH_IN_PACKET_BYTES
71} search_in_type;
72
73 typedef enum {
74 SEARCH_CHAR_SET_NARROW_AND_WIDE,
75 SEARCH_CHAR_SET_NARROW,
76 SEARCH_CHAR_SET_WIDE
77} search_char_set_type;
78
79 typedef enum {
80 SEARCH_TYPE_DISPLAY_FILTER,
81 SEARCH_TYPE_HEX_VALUE,
82 SEARCH_TYPE_STRING,
83 SEARCH_TYPE_REGEX
84} search_type_type;
85
86 typedef 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
102 typedef enum {
103 FOLLOW_DELTA_NONE,
104 FOLLOW_DELTA_TURN,
105 FOLLOW_DELTA_ALL
106} follow_delta_type;
107
108 typedef enum {
109 DecodeAsNone,
110 DecodeAsBASE64,
111 DecodeAsCompressed,
112 DecodeAsHexDigits,
113 DecodeAsPercentEncoding,
114 DecodeAsQuotedPrintable,
115 DecodeAsROT13
116} bytes_decode_type;
117
119 typedef 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 bool aggregation_view;
131 ts_type gui_time_format;
132 int gui_time_precision;
133 ts_seconds_type gui_seconds_format;
134 int gui_zoom_level;
135 bytes_view_type gui_bytes_view;
136 bytes_encoding_type gui_bytes_encoding;
137 bool gui_packet_diagram_field_values;
138 bool gui_allow_hover_selection;
139
140 search_in_type gui_search_in;
141 search_char_set_type gui_search_char_set;
142 bool gui_search_case_sensitive;
143 bool gui_search_reverse_dir;
144 bool gui_search_multiple_occurs;
145 search_type_type gui_search_type;
146 bytes_show_type gui_follow_show;
147 follow_delta_type gui_follow_delta;
148 bytes_decode_type gui_show_bytes_decode;
149 bytes_show_type gui_show_bytes_show;
150
151 int gui_geometry_main_x;
152 int gui_geometry_main_y;
153 int gui_geometry_main_width;
154 int gui_geometry_main_height;
155
156 bool gui_geometry_main_maximized;
157 bool gui_geometry_leftalign_actions;
158
159 int gui_geometry_main_upper_pane;
160 int gui_geometry_main_lower_pane;
161 char *gui_geometry_main;
162 char *gui_geometry_main_master_split;
163 char *gui_geometry_main_extra_split;
164 bool privs_warn_if_elevated;
165 bool sys_warn_if_no_capture;
166 GList *col_width_list; /* column widths */
167 GList *conversation_tabs; /* enabled conversation dialog tabs */
168 GList *conversation_tabs_columns; /* save the columns for conversation dialogs */
169 GList *endpoint_tabs; /* enabled endpoint dialog tabs */
170 GList *endpoint_tabs_columns; /* save the columns for endpoint dialogs */
171 int gui_profile_switch_check_count; /* number of packets / events to check for automatic profile switching */
172 char *gui_fileopen_remembered_dir; /* folder of last capture loaded in File Open dialog */
173 bool gui_rlc_use_pdus_from_mac;
174 GList *custom_colors;
175 GList *gui_additional_toolbars;
176 GList *interface_toolbars;
177
178 bool gui_tsgd_throughput_show; /* tcp_stream_dialog throughput checkbox */
179 bool gui_tsgd_goodput_show; /* tcp_stream_dialog goodput checkbox */
180 double gui_tsgd_ma_window_size; /* tcp_stream_dialog ma_window_size */
181
182 bool gui_welcome_page_sidebar_learn_visible;
183 bool gui_welcome_page_sidebar_tips_visible;
184 bool gui_welcome_page_sidebar_tips_events;
185 bool gui_welcome_page_sidebar_tips_sponsorship;
186 bool gui_welcome_page_sidebar_tips_tips;
187 unsigned gui_welcome_page_sidebar_tips_interval;
188} recent_settings_t;
189
191 extern recent_settings_t recent;
192
194 extern void recent_init(void);
195
197 extern void recent_cleanup(void);
198
203 extern bool write_recent(void);
204
209 extern bool write_profile_recent(void);
210
217 extern bool recent_read_static(char **rf_path_return, int *rf_errno_return);
218
225 extern bool recent_read_profile_static(char **rf_path_return, int *rf_errno_return);
226
233 extern bool recent_read_dynamic(char **rf_path_return, int *rf_errno_return);
234
244 extern int recent_set_arg(char *prefarg);
245
250 extern void recent_free_column_width_info(recent_settings_t *rs);
251
258 extern void recent_insert_column(int col);
259
266 extern void recent_remove_column(int col);
267
272 extern int recent_get_column_width(int col);
273
279 extern void recent_set_column_width(int col, int width);
280
285 extern char recent_get_column_xalign(int col);
286
292 extern void recent_set_column_xalign(int col, char xalign);
293
294/* save the window and its current geometry into the geometry hashtable */
295 extern void window_geom_save(const char *name, window_geometry_t *geom);
296
297/* load the desired geometry for this window from the geometry hashtable */
298 extern bool window_geom_load(const char *name, window_geometry_t *geom);
299
300 extern void window_splitter_save(const char *name, const char *splitter_state);
301
302 extern const char * window_splitter_load(const char *name);
303
309 extern GList *recent_get_cfilter_list(const char *ifname);
310
318 extern void recent_add_cfilter(const char *ifname, const char *s);
319
327 extern struct remote_host *recent_get_remote_host(const char *host);
328
334 extern int recent_get_remote_host_list_size(void);
335
343 extern void recent_remote_host_list_foreach(GFunc func, void *user_data);
344
348 extern void recent_free_remote_host_list(void);
349
356 extern void recent_add_remote_host(char *host, struct remote_host *rh);
357
358#ifdef __cplusplus
359}
360#endif /* __cplusplus */
361
362#endif /* recent.h */
recent_settings_t
struct recent_settings_tag recent_settings_t
recent_remote_host_list_foreach
void recent_remote_host_list_foreach(GFunc func, void *user_data)
recent_set_column_width
void recent_set_column_width(int col, int width)
Definition recent.c:1925
recent_read_static
bool recent_read_static(char **rf_path_return, int *rf_errno_return)
Definition recent.c:1659
recent_set_arg
int recent_set_arg(char *prefarg)
Definition recent.c:1622
recent_get_cfilter_list
GList * recent_get_cfilter_list(const char *ifname)
Definition recent.c:483
recent_set_column_xalign
void recent_set_column_xalign(int col, char xalign)
Definition recent.c:1967
recent_insert_column
void recent_insert_column(int col)
Definition recent.c:1877
recent_get_remote_host_list_size
int recent_get_remote_host_list_size(void)
recent_add_cfilter
void recent_add_cfilter(const char *ifname, const char *s)
Definition recent.c:502
write_profile_recent
bool write_profile_recent(void)
Definition recent.c:1024
recent_read_dynamic
bool recent_read_dynamic(char **rf_path_return, int *rf_errno_return)
Definition recent.c:1831
recent_get_column_width
int recent_get_column_width(int col)
Definition recent.c:1905
recent_add_remote_host
void recent_add_remote_host(char *host, struct remote_host *rh)
recent_get_remote_host
struct remote_host * recent_get_remote_host(const char *host)
recent_free_remote_host_list
void recent_free_remote_host_list(void)
recent_get_column_xalign
char recent_get_column_xalign(int col)
Definition recent.c:1947
recent_init
void recent_init(void)
Definition recent.c:1989
recent_remove_column
void recent_remove_column(int col)
Definition recent.c:1888
recent
recent_settings_t recent
Definition recent.c:107
recent_read_profile_static
bool recent_read_profile_static(char **rf_path_return, int *rf_errno_return)
Definition recent.c:1719
recent_cleanup
void recent_cleanup(void)
Definition recent.c:1995
recent_free_column_width_info
void recent_free_column_width_info(recent_settings_t *rs)
Definition recent.c:231
write_recent
bool write_recent(void)
Definition recent.c:855
_col_width_data
Definition recent.h:43
recent_settings_tag
Definition recent.h:119
window_geometry_s
Definition ws_ui_util.h:30
timestamp.h
ws_ui_util.h