| 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} recent_settings_t;
182
184 extern recent_settings_t recent;
185
187 extern void recent_init(void);
188
190 extern void recent_cleanup(void);
191
196 extern bool write_recent(void);
197
202 extern bool write_profile_recent(void);
203
210 extern bool recent_read_static(char **rf_path_return, int *rf_errno_return);
211
218 extern bool recent_read_profile_static(char **rf_path_return, int *rf_errno_return);
219
226 extern bool recent_read_dynamic(char **rf_path_return, int *rf_errno_return);
227
237 extern int recent_set_arg(char *prefarg);
238
243 extern void recent_free_column_width_info(recent_settings_t *rs);
244
251 extern void recent_insert_column(int col);
252
259 extern void recent_remove_column(int col);
260
265 extern int recent_get_column_width(int col);
266
272 extern void recent_set_column_width(int col, int width);
273
278 extern char recent_get_column_xalign(int col);
279
285 extern void recent_set_column_xalign(int col, char xalign);
286
287/* save the window and its current geometry into the geometry hashtable */
288 extern void window_geom_save(const char *name, window_geometry_t *geom);
289
290/* load the desired geometry for this window from the geometry hashtable */
291 extern bool window_geom_load(const char *name, window_geometry_t *geom);
292
293 extern void window_splitter_save(const char *name, const char *splitter_state);
294
295 extern const char * window_splitter_load(const char *name);
296
302 extern GList *recent_get_cfilter_list(const char *ifname);
303
311 extern void recent_add_cfilter(const char *ifname, const char *s);
312
320 extern struct remote_host *recent_get_remote_host(const char *host);
321
327 extern int recent_get_remote_host_list_size(void);
328
336 extern void recent_remote_host_list_foreach(GFunc func, void *user_data);
337
341 extern void recent_free_remote_host_list(void);
342
349 extern void recent_add_remote_host(char *host, struct remote_host *rh);
350
351#ifdef __cplusplus
352}
353#endif /* __cplusplus */
354
355#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:1869
recent_read_static
bool recent_read_static(char **rf_path_return, int *rf_errno_return)
Definition recent.c:1611
recent_set_arg
int recent_set_arg(char *prefarg)
Definition recent.c:1574
recent_get_cfilter_list
GList * recent_get_cfilter_list(const char *ifname)
Definition recent.c:477
recent_set_column_xalign
void recent_set_column_xalign(int col, char xalign)
Definition recent.c:1911
recent_insert_column
void recent_insert_column(int col)
Definition recent.c:1821
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:496
write_profile_recent
bool write_profile_recent(void)
Definition recent.c:991
recent_read_dynamic
bool recent_read_dynamic(char **rf_path_return, int *rf_errno_return)
Definition recent.c:1775
recent_get_column_width
int recent_get_column_width(int col)
Definition recent.c:1849
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:1891
recent_init
void recent_init(void)
Definition recent.c:1933
recent_remove_column
void recent_remove_column(int col)
Definition recent.c:1832
recent
recent_settings_t recent
Definition recent.c:101
recent_read_profile_static
bool recent_read_profile_static(char **rf_path_return, int *rf_errno_return)
Definition recent.c:1663
recent_cleanup
void recent_cleanup(void)
Definition recent.c:1939
recent_free_column_width_info
void recent_free_column_width_info(recent_settings_t *rs)
Definition recent.c:225
write_recent
bool write_recent(void)
Definition recent.c:846
_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