Wireshark 4.7.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
prefs.h
Go to the documentation of this file.
1
11#ifndef __PREFS_H__
12#define __PREFS_H__
13
14#include <glib.h>
15
16#include <epan/params.h>
17#include <epan/range.h>
18
19#include <wsutil/color.h>
20
21#include "ws_symbol_export.h"
22
23#ifdef __cplusplus
24extern "C" {
25#endif /* __cplusplus */
26
27#define DEF_WIDTH 750
28#define DEF_HEIGHT 550
29
30#define MAX_VAL_LEN 1024
31
32#define TAP_UPDATE_DEFAULT_INTERVAL 3000
33#define ST_DEF_BURSTRES 5
34#define ST_DEF_BURSTLEN 100
35#define ST_MAX_BURSTRES 600000 /* somewhat arbitrary limit of 10 minutes */
36#define ST_MAX_BURSTBUCKETS 100 /* somewhat arbitrary limit - more buckets degrade performance */
37#define DEF_GUI_DECIMAL_PLACES1 2
38#define DEF_GUI_DECIMAL_PLACES2 4
39#define DEF_GUI_DECIMAL_PLACES3 6
40
41#define CONV_DEINT_KEY_CAPFILE 0x01 /* unused yet */
42#define CONV_DEINT_KEY_INTERFACE 0x02
43#define CONV_DEINT_KEY_MAC 0x04
44#define CONV_DEINT_KEY_VLAN 0x08
45
46/* Bitmask of flags for the effect of a preference in Wireshark */
47#define PREF_EFFECT_DISSECTION (1u << 0)
48#define PREF_EFFECT_CAPTURE (1u << 1)
49#define PREF_EFFECT_GUI_LAYOUT (1u << 2)
50#define PREF_EFFECT_FIELDS (1u << 3)
51#define PREF_EFFECT_GUI (1u << 4)
52#define PREF_EFFECT_GUI_COLOR (1u << 5)
53#define PREF_EFFECT_AGGREGATION (1u << 6)
54
55struct epan_uat;
56struct _e_addr_resolve;
57
69WS_DLL_PUBLIC
70char string_to_name_resolve(const char *string, struct _e_addr_resolve *name_resolve);
71
72/*
73 * Modes for the starting directory in File Open dialogs.
74 */
75#define FO_STYLE_LAST_OPENED 0 /* start in last directory we looked at */
76#define FO_STYLE_SPECIFIED 1 /* start in specified directory */
77#define FO_STYLE_CWD 2 /* start in current working directory at startup */
78
79/*
80 * Toolbar styles.
81 */
82#define TB_STYLE_ICONS 0
83#define TB_STYLE_TEXT 1
84#define TB_STYLE_BOTH 2
85
86/*
87 * Color styles.
88 */
89#define COLOR_STYLE_DEFAULT 0
90#define COLOR_STYLE_FLAT 1
91#define COLOR_STYLE_GRADIENT 2
92
93#define COLOR_STYLE_ALPHA 0.25
94
95#define COLOR_SCHEME_DEFAULT 0
96#define COLOR_SCHEME_LIGHT 1
97#define COLOR_SCHEME_DARK 2
98
99/*
100 * Types of layout of summary/details/hex panes.
101 */
102typedef enum {
103 layout_unused, /* entry currently unused */
104 layout_type_5,
105 layout_type_2,
106 layout_type_1,
107 layout_type_4,
108 layout_type_3,
109 layout_type_6,
110 layout_type_max
111} layout_type_e;
112
113/*
114 * Types of pane.
115 */
116typedef enum {
117 layout_pane_content_none,
118 layout_pane_content_plist,
119 layout_pane_content_pdetails,
120 layout_pane_content_pbytes,
121 layout_pane_content_pdiagram,
122} layout_pane_content_e;
123
124/*
125 * Places version information will show up
126 */
127typedef enum {
128 version_welcome_only,
129 version_title_only,
130 version_both,
131 version_neither
132} version_info_e;
133
134typedef enum {
135 layout_vertical,
136 layout_horizontal
137} splitter_layout_e;
138
139typedef enum {
140 pref_default,
141 pref_stashed,
142 pref_current
143} pref_source_t;
144
145typedef enum {
146 ELIDE_LEFT,
147 ELIDE_RIGHT,
148 ELIDE_MIDDLE,
149 ELIDE_NONE
150} elide_mode_e;
151
152typedef enum {
153 COPY_FORMAT_TEXT,
154 COPY_FORMAT_CSV,
155 COPY_FORMAT_YAML,
156 COPY_FORMAT_HTML
157} copy_format_e;
158
159typedef enum {
160 ABS_TIME_ASCII_NEVER,
161 ABS_TIME_ASCII_TREE,
162 ABS_TIME_ASCII_COLUMN,
163 ABS_TIME_ASCII_ALWAYS,
164} abs_time_format_e;
165
166/*
167 * Update channel.
168 */
169typedef enum {
170 UPDATE_CHANNEL_DEVELOPMENT,
171 UPDATE_CHANNEL_STABLE
172} software_update_channel_e;
173
174/*
175 * Packet list multi-color display mode.
176 */
177typedef enum {
178 PACKET_LIST_MULTI_COLOR_MODE_OFF = 0, /* Multi-color disabled */
179 PACKET_LIST_MULTI_COLOR_MODE_SCROLLBAR_ONLY, /* Scrollbar only, no row stripes */
180 PACKET_LIST_MULTI_COLOR_MODE_FULL, /* Full stripes in rows + scrollbar */
181 PACKET_LIST_MULTI_COLOR_MODE_SHIFT_RIGHT /* Shift right (configurable %) in rows + scrollbar */
182} gui_packet_list_multi_color_mode_e;
183
184/*
185 * Packet list multi-color separator style.
186 */
187typedef enum {
188 PACKET_LIST_MULTI_COLOR_SEPARATOR_VERTICAL = 0, /* Straight vertical separator */
189 PACKET_LIST_MULTI_COLOR_SEPARATOR_DIAGONAL, /* Diagonal / candy-cane separator */
190 PACKET_LIST_MULTI_COLOR_SEPARATOR_BUBBLE /* Bubble / half-moon separator */
191} gui_packet_list_multi_color_separator_e;
192
193typedef struct _e_prefs {
194 GList *col_list;
195 unsigned num_cols;
196 color_t st_client_fg, st_client_bg, st_server_fg, st_server_bg;
197 color_t gui_filter_valid_fg, gui_filter_invalid_fg, gui_filter_deprecated_fg;
198 color_t gui_filter_valid_bg, gui_filter_invalid_bg, gui_filter_deprecated_bg;
199 bool restore_filter_after_following_stream;
200 int gui_toolbar_main_style;
201 char *gui_font_name;
202 int gui_color_scheme;
203 color_t gui_active_fg;
204 color_t gui_active_bg;
205 int gui_active_style;
206 color_t gui_inactive_fg;
207 color_t gui_inactive_bg;
208 int gui_inactive_style;
209 color_t gui_marked_fg;
210 color_t gui_marked_bg;
211 color_t gui_ignored_fg;
212 color_t gui_ignored_bg;
213 char *gui_colorized_fg;
214 char *gui_colorized_bg;
215 bool gui_geometry_save_position;
216 bool gui_geometry_save_size;
217 bool gui_geometry_save_maximized;
218 unsigned gui_recent_df_entries_max;
219 unsigned gui_recent_files_count_max;
220 unsigned gui_fileopen_style;
221 char *gui_fileopen_dir;
222 unsigned gui_fileopen_preview;
223 char *gui_tlskeylog_command;
224 bool gui_ask_unsaved;
225 bool gui_autocomplete_filter;
226 bool gui_find_wrap;
227 char *gui_window_title;
228 char *gui_prepend_window_title;
229 char *gui_start_title;
230 version_info_e gui_version_placement;
231 unsigned gui_max_export_objects;
232 unsigned gui_max_tree_items;
233 unsigned gui_max_tree_depth;
234 bool gui_welcome_page_show_recent;
235 layout_type_e gui_layout_type;
236 layout_pane_content_e gui_layout_content_1;
237 layout_pane_content_e gui_layout_content_2;
238 layout_pane_content_e gui_layout_content_3;
239 splitter_layout_e gui_packet_dialog_layout;
240 char *gui_interfaces_hide_types;
241 bool gui_interfaces_show_hidden;
242 bool gui_interfaces_remote_display;
243 bool gui_io_graph_automatic_update;
244 bool gui_io_graph_enable_legend;
245 bool gui_plot_automatic_update;
246 bool gui_plot_enable_legend;
247 bool gui_plot_enable_auto_scroll;
248 bool gui_packet_details_show_byteview;
249 char *capture_device;
250 char *capture_devices_linktypes;
251 char *capture_devices_descr;
252 char *capture_devices_hide;
253 char *capture_devices_monitor_mode;
254 char *capture_devices_buffersize;
255 char *capture_devices_snaplen;
256 char *capture_devices_pmode;
257 char *capture_devices_filter; /* XXX - Mostly unused. Deprecate? */
258 bool capture_prom_mode;
259 bool capture_monitor_mode;
260 bool capture_pcap_ng;
261 bool capture_real_time;
262 unsigned capture_update_interval;
263 bool enable_aggregation;
264 GList* aggregation_fields;
265 int aggregation_fields_num;
266 bool capture_no_interface_load;
267 bool capture_no_extcap;
268 bool capture_show_info;
269 GList *capture_columns;
270 unsigned tap_update_interval;
271 bool display_hidden_proto_items;
272 bool display_byte_fields_with_spaces;
273 abs_time_format_e display_abs_time_ascii;
274 bool enable_incomplete_dissectors_check;
275 bool incomplete_dissectors_check_debug;
276 bool strict_conversation_tracking_heuristics;
277 int conversation_deinterlacing_key;
278 bool ignore_dup_frames;
279 unsigned ignore_dup_frames_cache_entries;
280 bool filter_expressions_old; /* true if old filter expressions preferences were loaded. */
281 bool cols_hide_new; /* true if the new (index-based) gui.column.hide preference was loaded. */
282 bool gui_update_enabled;
283 software_update_channel_e gui_update_channel;
284 unsigned gui_update_interval;
285 unsigned gui_debounce_timer;
286 char *saved_at_version;
287 bool gui_packet_list_separator;
288 bool gui_packet_header_column_definition;
289 bool gui_packet_list_hover_style; /* Enable/Disable mouse-over colorization */
290 bool gui_show_selected_packet;
291 bool gui_show_file_load_time;
292 elide_mode_e gui_packet_list_elide_mode;
293 copy_format_e gui_packet_list_copy_format_options_for_keyboard_shortcut;
294 bool gui_packet_list_copy_text_with_aligned_columns;
295 bool gui_packet_list_show_related;
296 bool gui_packet_list_show_minimap;
297 bool gui_packet_list_sortable;
298 unsigned gui_packet_list_cached_rows_max;
299 gui_packet_list_multi_color_mode_e gui_packet_list_multi_color_mode; /* Multi-color display mode */
300 unsigned gui_packet_list_multi_color_shift_percent; /* Shift Right primary color percentage (75-95) */
301 bool gui_packet_list_multi_color_details; /* Display all matching colors in packet details tree */
302 gui_packet_list_multi_color_separator_e gui_packet_list_multi_color_separator; /* Separator style between color stripes */
303 unsigned gui_decimal_places1; /* Used for type 1 calculations */
304 unsigned gui_decimal_places2; /* Used for type 2 calculations */
305 unsigned gui_decimal_places3; /* Used for type 3 calculations */
306 bool gui_rtp_player_use_disk1;
307 bool gui_rtp_player_use_disk2;
308 unsigned flow_graph_max_export_items;
309 bool st_enable_burstinfo;
310 bool st_burst_showcount;
311 unsigned st_burst_resolution;
312 unsigned st_burst_windowlen;
313 bool st_sort_casesensitve;
314 bool st_sort_rng_fixorder;
315 bool st_sort_rng_nameonly;
316 int st_sort_defcolflag;
317 bool st_sort_defdescending;
318 bool st_sort_showfullname;
319 int st_format;
320 bool conv_machine_readable;
321 bool extcap_save_on_start;
322} e_prefs;
323
324WS_DLL_PUBLIC e_prefs prefs;
325
326/*
327 * Routines to let modules that have preference settings register
328 * themselves by name, and to let them register preference settings
329 * by name.
330 */
331struct pref_module;
332
333struct pref_custom_cbs;
334
335typedef struct pref_module module_t;
336
338void prefs_init(const char** col_fmt, int num_cols);
339
341WS_DLL_PUBLIC void prefs_reset(const char* app_env_var_prefix, const char** col_fmt, int num_cols);
342
344void prefs_cleanup(void);
345
349WS_DLL_PUBLIC void prefs_set_gui_theme_is_dark(bool is_dark);
350
359WS_DLL_PUBLIC module_t *prefs_register_protocol(int id, void (*apply_cb)(void));
360
367WS_DLL_PUBLIC void prefs_register_module_alias(const char *name, module_t *module);
368
374void prefs_deregister_protocol(int id);
375
386WS_DLL_PUBLIC module_t *prefs_register_stat(const char *name, const char *title,
387 const char *description, void (*apply_cb)(void));
388
399WS_DLL_PUBLIC module_t *prefs_register_codec(const char *name, const char *title,
400 const char *description, void (*apply_cb)(void));
401
413WS_DLL_PUBLIC module_t *prefs_register_protocol_subtree(const char *subtree, int id,
414 void (*apply_cb)(void));
415
423WS_DLL_PUBLIC module_t *prefs_register_protocol_obsolete(int id);
424
425/*
426 * Register a module that will have preferences.
427 * Specify the module under which to register it, the name used for the
428 * module in the preferences file, the title used in the tab for it
429 * in a preferences dialog box, and a routine to call back when the
430 * preferences are applied.
431 *
432 * @param pref_tree "Parent" preference tree under which to register this module.
433 * @param master_pref_tree List of all preference modules.
434 * @param name is a name for the module to use on the command line with "-o"
435 * and in preference files.
436 * @param title the module title in the preferences UI
437 * @param description the description included in the preferences file
438 * and shown as tooltip in the GUI, or NULL
439 * @param help The help string associated with the module, or NULL
440 * @param apply_cb Callback routine that is called when preferences are
441 * applied. It may be NULL, which inhibits the callback.
442 * @return a preferences module which can be used to register a user 'preference'
443 */
444WS_DLL_PUBLIC module_t*
445prefs_register_module(wmem_tree_t* pref_tree, wmem_tree_t* master_pref_tree, const char* name, const char* title,
446 const char* description, const char* help, void (*apply_cb)(void),
447 const bool use_gui);
448
452typedef unsigned (*module_cb)(module_t *module, void *user_data);
453
459WS_DLL_PUBLIC bool prefs_module_has_submodules(module_t *module);
460
473WS_DLL_PUBLIC unsigned prefs_modules_foreach(const wmem_tree_t* module, module_cb callback, void *user_data);
474
489WS_DLL_PUBLIC unsigned prefs_modules_foreach_submodules(const wmem_tree_t* module, module_cb callback, void *user_data);
490
502WS_DLL_PUBLIC unsigned prefs_modules_for_all_modules(module_cb callback, void* user_data);
503
510WS_DLL_PUBLIC void prefs_apply_all(void);
511
519WS_DLL_PUBLIC void prefs_apply(module_t *module);
520
521
522struct preference;
523
524typedef struct preference pref_t;
525
531WS_DLL_PUBLIC bool prefs_is_registered_protocol(const char *name);
532
538WS_DLL_PUBLIC const char *prefs_get_title_by_name(const char *name);
539
548WS_DLL_PUBLIC module_t *prefs_find_module(const char *name);
549
559WS_DLL_PUBLIC pref_t *prefs_find_preference(module_t * module, const char *pref);
560
578WS_DLL_PUBLIC void prefs_register_uint_preference(module_t *module, const char *name,
579 const char *title, const char *description, unsigned base, unsigned *var);
580
597WS_DLL_PUBLIC void prefs_register_int_preference(module_t* module, const char* name,
598 const char* title, const char* description, int* var);
599
617WS_DLL_PUBLIC void prefs_register_float_preference(module_t* module, const char* name,
618 const char* title, const char* description, unsigned num_decimal, double* var);
619
620/*
621 * prefs_register_ callers must conform to the following:
622 *
623 * Names must be in lowercase letters only (underscore allowed).
624 * Titles and descriptions must be valid UTF-8 or NULL.
625 * Titles must be short (less than 80 characters)
626 * Titles must not contain newlines.
627 */
628
645WS_DLL_PUBLIC void prefs_register_bool_preference(module_t *module, const char *name,
646 const char *title, const char *description, bool *var);
647
668WS_DLL_PUBLIC void prefs_register_enum_preference(module_t *module, const char *name,
669 const char *title, const char *description, int *var,
670 const enum_val_t *enumvals, bool radio_buttons);
671
693WS_DLL_PUBLIC void prefs_register_string_preference(module_t *module, const char *name,
694 const char *title, const char *description, const char **var);
695
723WS_DLL_PUBLIC void prefs_register_filename_preference(module_t *module, const char *name,
724 const char *title, const char *description, const char **var, bool for_writing);
725
750WS_DLL_PUBLIC void prefs_register_directory_preference(module_t *module, const char *name,
751 const char *title, const char *description, const char **var);
752
777WS_DLL_PUBLIC void prefs_register_list_string_preference(module_t* module, const char* name,
778 const char* title, const char* description, wmem_list_t** var);
779
805WS_DLL_PUBLIC void prefs_register_multiple_string_preference(module_t* module, const char* name,
806 const char* title, const char* description, wmem_list_t** var);
807
825WS_DLL_PUBLIC void prefs_register_range_preference(module_t *module, const char *name,
826 const char *title, const char *description, range_t **var,
827 uint32_t max_value);
828
843WS_DLL_PUBLIC void prefs_register_static_text_preference(module_t *module, const char *name,
844 const char *title, const char *description);
845
863WS_DLL_PUBLIC void prefs_register_uat_preference(module_t *module,
864 const char *name, const char* title, const char *description, struct epan_uat* uat);
865
886void prefs_register_color_preference(module_t *module, const char *name,
887 const char *title, const char *description, color_t *color);
888
910 const char *title, const char *description, struct pref_custom_cbs* custom_cbs,
911 void** custom_data);
912
933 const char *title, const char *description, range_t **var,
934 uint32_t max_value, const char *dissector_table, const char *dissector_description);
935
952WS_DLL_PUBLIC void prefs_register_password_preference(module_t *module, const char *name,
953 const char *title, const char *description, const char **var);
954
976WS_DLL_PUBLIC void prefs_register_dissector_preference(module_t *module, const char *name,
977 const char *title, const char *description, const char **var);
978
995WS_DLL_PUBLIC void prefs_register_obsolete_preference(module_t *module,
996 const char *name);
997
1018WS_DLL_PUBLIC void prefs_register_custom_preference_TCP_Analysis(module_t *module, const char *name,
1019 const char *title, const char *description, int *var,
1020 const enum_val_t *enumvals, bool radio_buttons);
1021
1036WS_DLL_PUBLIC void prefs_set_preference_effect_fields(module_t *module,
1037 const char *name);
1038
1039WS_DLL_PUBLIC void prefs_set_preference_effect(module_t* module,
1040 const char* name, unsigned flags);
1041
1042typedef unsigned (*pref_cb)(pref_t *pref, void *user_data);
1043
1058WS_DLL_PUBLIC unsigned prefs_pref_foreach(module_t *module, pref_cb callback,
1059 void *user_data);
1060
1071WS_DLL_PUBLIC GList *prefs_get_string_list(const char *str);
1072
1077WS_DLL_PUBLIC void prefs_clear_string_list(GList *sl);
1078
1085WS_DLL_PUBLIC
1086const char *prefs_pref_type_name(pref_t *pref);
1087
1096WS_DLL_PUBLIC
1098
1106WS_DLL_PUBLIC
1107char *prefs_pref_to_str(pref_t *pref, pref_source_t source);
1108
1115WS_DLL_PUBLIC
1116int prefs_num_non_uat(module_t* module);
1117
1118
1125WS_DLL_PUBLIC
1127
1139extern e_prefs *read_prefs(const char* app_env_var_prefix);
1140
1151WS_DLL_PUBLIC int write_prefs(const char* app_env_var_prefix, char **pf_path_return);
1152
1159WS_DLL_PUBLIC void pref_write_individual(void* data, void* user_data);
1160
1167WS_DLL_PUBLIC void pref_free_individual(void* data, void* user_data);
1168
1172typedef enum {
1173 PREFS_SET_OK, /* succeeded */
1174 PREFS_SET_SYNTAX_ERR, /* syntax error in string */
1175 PREFS_SET_NO_SUCH_PREF, /* no such preference */
1176 PREFS_SET_OBSOLETE /* preference used to exist but no longer does */
1178
1192WS_DLL_PUBLIC prefs_set_pref_e prefs_set_pref(char *prefarg, char **errmsg);
1193
1203WS_DLL_PUBLIC range_t* prefs_get_range_value(const char *module_name, const char* pref_name);
1204
1210WS_DLL_PUBLIC bool prefs_is_capture_device_hidden(const char *name);
1211
1217WS_DLL_PUBLIC bool prefs_capture_device_monitor_mode(const char *name);
1218
1225WS_DLL_PUBLIC bool prefs_capture_options_dialog_column_is_visible(const char *column);
1226
1233WS_DLL_PUBLIC bool prefs_has_layout_pane_content (layout_pane_content_e layout_pane_content);
1234
1235#ifdef __cplusplus
1236}
1237#endif /* __cplusplus */
1238
1239#endif /* prefs.h */
1240
1241/*
1242 * Editor modelines - https://www.wireshark.org/tools/modelines.html
1243 *
1244 * Local variables:
1245 * c-basic-offset: 4
1246 * tab-width: 8
1247 * indent-tabs-mode: nil
1248 * End:
1249 *
1250 * vi: set shiftwidth=4 tabstop=8 expandtab:
1251 * :indentSize=4:tabSize=8:noTabs=true:
1252 */
WS_DLL_PUBLIC module_t * prefs_register_codec(const char *name, const char *title, const char *description, void(*apply_cb)(void))
Definition prefs.c:825
WS_DLL_PUBLIC void prefs_register_filename_preference(module_t *module, const char *name, const char *title, const char *description, const char **var, bool for_writing)
Definition prefs.c:1612
WS_DLL_PUBLIC bool prefs_is_preference_obsolete(pref_t *pref)
Definition prefs.c:2095
WS_DLL_PUBLIC module_t * prefs_register_protocol_subtree(const char *subtree, int id, void(*apply_cb)(void))
Definition prefs.c:726
WS_DLL_PUBLIC prefs_set_pref_e prefs_set_pref(char *prefarg, char **errmsg)
Definition prefs.c:5162
WS_DLL_PUBLIC void prefs_register_uat_preference(module_t *module, const char *name, const char *title, const char *description, struct epan_uat *uat)
Definition prefs.c:1851
WS_DLL_PUBLIC void prefs_clear_string_list(GList *sl)
Definition prefs.c:4303
void prefs_register_color_preference(module_t *module, const char *name, const char *title, const char *description, color_t *color)
Definition prefs.c:1869
WS_DLL_PUBLIC range_t * prefs_get_range_value(const char *module_name, const char *pref_name)
Definition prefs.c:1812
WS_DLL_PUBLIC bool prefs_capture_options_dialog_column_is_visible(const char *column)
Definition prefs.c:5550
WS_DLL_PUBLIC void prefs_register_directory_preference(module_t *module, const char *name, const char *title, const char *description, const char **var)
Definition prefs.c:1626
WS_DLL_PUBLIC void prefs_register_range_preference(module_t *module, const char *name, const char *title, const char *description, range_t **var, uint32_t max_value)
Definition prefs.c:1668
WS_DLL_PUBLIC char * prefs_pref_type_description(pref_t *pref)
Definition prefs.c:6505
WS_DLL_PUBLIC void prefs_register_obsolete_preference(module_t *module, const char *name)
Definition prefs.c:2089
WS_DLL_PUBLIC module_t * prefs_find_module(const char *name)
Definition prefs.c:833
e_prefs * read_prefs(const char *app_env_var_prefix)
Definition prefs.c:4808
WS_DLL_PUBLIC void prefs_register_multiple_string_preference(module_t *module, const char *name, const char *title, const char *description, wmem_list_t **var)
WS_DLL_PUBLIC void prefs_apply_all(void)
Definition prefs.c:961
WS_DLL_PUBLIC void prefs_register_string_preference(module_t *module, const char *name, const char *title, const char *description, const char **var)
Definition prefs.c:1598
void prefs_register_decode_as_range_preference(module_t *module, const char *name, const char *title, const char *description, range_t **var, uint32_t max_value, const char *dissector_table, const char *dissector_description)
Definition prefs.c:2003
WS_DLL_PUBLIC void prefs_register_float_preference(module_t *module, const char *name, const char *title, const char *description, unsigned num_decimal, double *var)
Definition prefs.c:1235
WS_DLL_PUBLIC bool prefs_has_layout_pane_content(layout_pane_content_e layout_pane_content)
Definition prefs.c:5565
unsigned(* module_cb)(module_t *module, void *user_data)
Definition prefs.h:452
WS_DLL_PUBLIC bool prefs_is_registered_protocol(const char *name)
Definition prefs.c:1176
WS_DLL_PUBLIC void prefs_register_static_text_preference(module_t *module, const char *name, const char *title, const char *description)
Definition prefs.c:1839
WS_DLL_PUBLIC void prefs_set_preference_effect_fields(module_t *module, const char *name)
Definition prefs.c:2101
WS_DLL_PUBLIC void pref_free_individual(void *data, void *user_data)
WS_DLL_PUBLIC const char * prefs_get_title_by_name(const char *name)
Definition prefs.c:1187
WS_DLL_PUBLIC void prefs_set_gui_theme_is_dark(bool is_dark)
Definition prefs.c:450
WS_DLL_PUBLIC unsigned prefs_pref_foreach(module_t *module, pref_cb callback, void *user_data)
Definition prefs.c:2467
WS_DLL_PUBLIC pref_t * prefs_find_preference(module_t *module, const char *pref)
Definition prefs.c:1167
WS_DLL_PUBLIC module_t * prefs_register_protocol_obsolete(int id)
Definition prefs.c:778
void prefs_deregister_protocol(int id)
Definition prefs.c:714
WS_DLL_PUBLIC bool prefs_capture_device_monitor_mode(const char *name)
Definition prefs.c:5526
WS_DLL_PUBLIC void prefs_register_module_alias(const char *name, module_t *module)
Definition prefs.c:659
prefs_set_pref_e
Definition prefs.h:1172
WS_DLL_PUBLIC void pref_write_individual(void *data, void *user_data)
Definition prefs.c:6848
WS_DLL_PUBLIC char * prefs_pref_to_str(pref_t *pref, pref_source_t source)
Definition prefs.c:6711
WS_DLL_PUBLIC const char * prefs_pref_type_name(pref_t *pref)
Definition prefs.c:6359
WS_DLL_PUBLIC unsigned prefs_modules_foreach(const wmem_tree_t *module, module_cb callback, void *user_data)
Definition prefs.c:910
WS_DLL_PUBLIC unsigned prefs_modules_for_all_modules(module_cb callback, void *user_data)
Definition prefs.c:932
void prefs_cleanup(void)
Definition prefs.c:430
WS_DLL_PUBLIC void prefs_register_uint_preference(module_t *module, const char *name, const char *title, const char *description, unsigned base, unsigned *var)
Definition prefs.c:1198
WS_DLL_PUBLIC void prefs_register_dissector_preference(module_t *module, const char *name, const char *title, const char *description, const char **var)
Definition prefs.c:2033
WS_DLL_PUBLIC int prefs_num_non_uat(module_t *module)
Definition prefs.c:6959
WS_DLL_PUBLIC int write_prefs(const char *app_env_var_prefix, char **pf_path_return)
Definition prefs.c:7042
WS_DLL_PUBLIC module_t * prefs_register_protocol(int id, void(*apply_cb)(void))
Definition prefs.c:702
void prefs_init(const char **col_fmt, int num_cols)
Definition prefs.c:335
WS_DLL_PUBLIC GList * prefs_get_string_list(const char *str)
Definition prefs.c:4174
WS_DLL_PUBLIC void prefs_apply(module_t *module)
Definition prefs.c:973
WS_DLL_PUBLIC void prefs_reset(const char *app_env_var_prefix, const char **col_fmt, int num_cols)
Definition prefs.c:4695
WS_DLL_PUBLIC void prefs_register_bool_preference(module_t *module, const char *name, const char *title, const char *description, bool *var)
Definition prefs.c:1272
WS_DLL_PUBLIC void prefs_register_list_string_preference(module_t *module, const char *name, const char *title, const char *description, wmem_list_t **var)
void prefs_register_custom_preference(module_t *module, const char *name, const char *title, const char *description, struct pref_custom_cbs *custom_cbs, void **custom_data)
WS_DLL_PUBLIC void prefs_register_enum_preference(module_t *module, const char *name, const char *title, const char *description, int *var, const enum_val_t *enumvals, bool radio_buttons)
Definition prefs.c:1361
WS_DLL_PUBLIC module_t * prefs_register_stat(const char *name, const char *title, const char *description, void(*apply_cb)(void))
Definition prefs.c:805
WS_DLL_PUBLIC void prefs_register_int_preference(module_t *module, const char *name, const char *title, const char *description, int *var)
Definition prefs.c:1221
WS_DLL_PUBLIC unsigned prefs_modules_foreach_submodules(const wmem_tree_t *module, module_cb callback, void *user_data)
Definition prefs.c:926
WS_DLL_PUBLIC bool prefs_module_has_submodules(module_t *module)
Definition prefs.c:888
WS_DLL_PUBLIC void prefs_register_custom_preference_TCP_Analysis(module_t *module, const char *name, const char *title, const char *description, int *var, const enum_val_t *enumvals, bool radio_buttons)
Definition prefs.c:1984
WS_DLL_PUBLIC bool prefs_is_capture_device_hidden(const char *name)
Definition prefs.c:5377
WS_DLL_PUBLIC char string_to_name_resolve(const char *string, struct _e_addr_resolve *name_resolve)
Definition prefs.c:5573
WS_DLL_PUBLIC void prefs_register_password_preference(module_t *module, const char *name, const char *title, const char *description, const char **var)
Definition prefs.c:2019
Flags to control name resolution.
Definition addr_resolv.h:52
Definition prefs.h:193
Definition wmem_list.c:23
Internal representation of a wmem balanced tree.
Definition wmem_tree-int.h:81
RGB color representation with 16-bit precision per channel.
Definition color.h:27
Definition packet.c:97
Definition params.h:23
Definition range.h:41
Definition uat-int.h:40
Definition prefs-int.h:70
Definition prefs-int.h:27
bool use_gui
Definition prefs-int.h:42
const char * description
Definition prefs-int.h:30
const char * name
Definition prefs-int.h:28
void(* apply_cb)(void)
Definition prefs-int.h:32
const char * title
Definition prefs-int.h:29
const char * help
Definition prefs-int.h:31
Definition prefs.c:216
unsigned base
Definition prefs.c:261
const char * description
Definition prefs.c:219
const char * title
Definition prefs.c:218
const char * name
Definition prefs.c:217
struct pref_custom_cbs custom_cbs
Definition prefs.c:271
uint32_t max_value
Definition prefs.c:262
const enum_val_t * enumvals
Definition prefs.c:264
bool radio_buttons
Definition prefs.c:265