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
174typedef struct _e_prefs {
175 GList *col_list;
176 unsigned num_cols;
177 color_t st_client_fg, st_client_bg, st_server_fg, st_server_bg;
178 color_t gui_filter_valid_fg, gui_filter_invalid_fg, gui_filter_deprecated_fg;
179 color_t gui_filter_valid_bg, gui_filter_invalid_bg, gui_filter_deprecated_bg;
180 bool restore_filter_after_following_stream;
181 int gui_toolbar_main_style;
182 char *gui_font_name;
183 int gui_color_scheme;
184 color_t gui_active_fg;
185 color_t gui_active_bg;
186 int gui_active_style;
187 color_t gui_inactive_fg;
188 color_t gui_inactive_bg;
189 int gui_inactive_style;
190 color_t gui_marked_fg;
191 color_t gui_marked_bg;
192 color_t gui_ignored_fg;
193 color_t gui_ignored_bg;
194 char *gui_colorized_fg;
195 char *gui_colorized_bg;
196 bool gui_geometry_save_position;
197 bool gui_geometry_save_size;
198 bool gui_geometry_save_maximized;
199 unsigned gui_recent_df_entries_max;
200 unsigned gui_recent_files_count_max;
201 unsigned gui_fileopen_style;
202 char *gui_fileopen_dir;
203 unsigned gui_fileopen_preview;
204 char *gui_tlskeylog_command;
205 bool gui_ask_unsaved;
206 bool gui_autocomplete_filter;
207 bool gui_find_wrap;
208 char *gui_window_title;
209 char *gui_prepend_window_title;
210 char *gui_start_title;
211 version_info_e gui_version_placement;
212 unsigned gui_max_export_objects;
213 unsigned gui_max_tree_items;
214 unsigned gui_max_tree_depth;
215 bool gui_welcome_page_show_recent;
216 layout_type_e gui_layout_type;
217 layout_pane_content_e gui_layout_content_1;
218 layout_pane_content_e gui_layout_content_2;
219 layout_pane_content_e gui_layout_content_3;
220 splitter_layout_e gui_packet_dialog_layout;
221 char *gui_interfaces_hide_types;
222 bool gui_interfaces_show_hidden;
223 bool gui_interfaces_remote_display;
224 bool gui_io_graph_automatic_update;
225 bool gui_io_graph_enable_legend;
226 bool gui_plot_automatic_update;
227 bool gui_plot_enable_legend;
228 bool gui_plot_enable_auto_scroll;
229 bool gui_packet_details_show_byteview;
230 char *capture_device;
231 char *capture_devices_linktypes;
232 char *capture_devices_descr;
233 char *capture_devices_hide;
234 char *capture_devices_monitor_mode;
235 char *capture_devices_buffersize;
236 char *capture_devices_snaplen;
237 char *capture_devices_pmode;
238 char *capture_devices_filter; /* XXX - Mostly unused. Deprecate? */
239 bool capture_prom_mode;
240 bool capture_monitor_mode;
241 bool capture_pcap_ng;
242 bool capture_real_time;
243 unsigned capture_update_interval;
244 bool enable_aggregation;
245 GList* aggregation_fields;
246 int aggregation_fields_num;
247 bool capture_no_interface_load;
248 bool capture_no_extcap;
249 bool capture_show_info;
250 GList *capture_columns;
251 unsigned tap_update_interval;
252 bool display_hidden_proto_items;
253 bool display_byte_fields_with_spaces;
254 abs_time_format_e display_abs_time_ascii;
255 bool enable_incomplete_dissectors_check;
256 bool incomplete_dissectors_check_debug;
257 bool strict_conversation_tracking_heuristics;
258 int conversation_deinterlacing_key;
259 bool ignore_dup_frames;
260 unsigned ignore_dup_frames_cache_entries;
261 bool filter_expressions_old; /* true if old filter expressions preferences were loaded. */
262 bool cols_hide_new; /* true if the new (index-based) gui.column.hide preference was loaded. */
263 bool gui_update_enabled;
264 software_update_channel_e gui_update_channel;
265 unsigned gui_update_interval;
266 unsigned gui_debounce_timer;
267 char *saved_at_version;
268 bool gui_packet_list_separator;
269 bool gui_packet_header_column_definition;
270 bool gui_packet_list_hover_style; /* Enable/Disable mouse-over colorization */
271 bool gui_show_selected_packet;
272 bool gui_show_file_load_time;
273 elide_mode_e gui_packet_list_elide_mode;
274 copy_format_e gui_packet_list_copy_format_options_for_keyboard_shortcut;
275 bool gui_packet_list_copy_text_with_aligned_columns;
276 bool gui_packet_list_show_related;
277 bool gui_packet_list_show_minimap;
278 bool gui_packet_list_sortable;
279 unsigned gui_packet_list_cached_rows_max;
280 unsigned gui_decimal_places1; /* Used for type 1 calculations */
281 unsigned gui_decimal_places2; /* Used for type 2 calculations */
282 unsigned gui_decimal_places3; /* Used for type 3 calculations */
283 bool gui_rtp_player_use_disk1;
284 bool gui_rtp_player_use_disk2;
285 unsigned flow_graph_max_export_items;
286 bool st_enable_burstinfo;
287 bool st_burst_showcount;
288 unsigned st_burst_resolution;
289 unsigned st_burst_windowlen;
290 bool st_sort_casesensitve;
291 bool st_sort_rng_fixorder;
292 bool st_sort_rng_nameonly;
293 int st_sort_defcolflag;
294 bool st_sort_defdescending;
295 bool st_sort_showfullname;
296 int st_format;
297 bool conv_machine_readable;
298 bool extcap_save_on_start;
299} e_prefs;
300
301WS_DLL_PUBLIC e_prefs prefs;
302
303/*
304 * Routines to let modules that have preference settings register
305 * themselves by name, and to let them register preference settings
306 * by name.
307 */
308struct pref_module;
309
310struct pref_custom_cbs;
311
312typedef struct pref_module module_t;
313
315void prefs_init(const char** col_fmt, int num_cols);
316
318WS_DLL_PUBLIC void prefs_reset(const char* app_env_var_prefix, const char** col_fmt, int num_cols);
319
321void prefs_cleanup(void);
322
326WS_DLL_PUBLIC void prefs_set_gui_theme_is_dark(bool is_dark);
327
336WS_DLL_PUBLIC module_t *prefs_register_protocol(int id, void (*apply_cb)(void));
337
344WS_DLL_PUBLIC void prefs_register_module_alias(const char *name, module_t *module);
345
351void prefs_deregister_protocol(int id);
352
363WS_DLL_PUBLIC module_t *prefs_register_stat(const char *name, const char *title,
364 const char *description, void (*apply_cb)(void));
365
376WS_DLL_PUBLIC module_t *prefs_register_codec(const char *name, const char *title,
377 const char *description, void (*apply_cb)(void));
378
390WS_DLL_PUBLIC module_t *prefs_register_protocol_subtree(const char *subtree, int id,
391 void (*apply_cb)(void));
392
400WS_DLL_PUBLIC module_t *prefs_register_protocol_obsolete(int id);
401
402/*
403 * Register a module that will have preferences.
404 * Specify the module under which to register it, the name used for the
405 * module in the preferences file, the title used in the tab for it
406 * in a preferences dialog box, and a routine to call back when the
407 * preferences are applied.
408 *
409 * @param pref_tree "Parent" preference tree under which to register this module.
410 * @param master_pref_tree List of all preference modules.
411 * @param name is a name for the module to use on the command line with "-o"
412 * and in preference files.
413 * @param title the module title in the preferences UI
414 * @param description the description included in the preferences file
415 * and shown as tooltip in the GUI, or NULL
416 * @param help The help string associated with the module, or NULL
417 * @param apply_cb Callback routine that is called when preferences are
418 * applied. It may be NULL, which inhibits the callback.
419 * @return a preferences module which can be used to register a user 'preference'
420 */
421WS_DLL_PUBLIC module_t*
422prefs_register_module(wmem_tree_t* pref_tree, wmem_tree_t* master_pref_tree, const char* name, const char* title,
423 const char* description, const char* help, void (*apply_cb)(void),
424 const bool use_gui);
425
429typedef unsigned (*module_cb)(module_t *module, void *user_data);
430
436WS_DLL_PUBLIC bool prefs_module_has_submodules(module_t *module);
437
450WS_DLL_PUBLIC unsigned prefs_modules_foreach(const wmem_tree_t* module, module_cb callback, void *user_data);
451
466WS_DLL_PUBLIC unsigned prefs_modules_foreach_submodules(const wmem_tree_t* module, module_cb callback, void *user_data);
467
479WS_DLL_PUBLIC unsigned prefs_modules_for_all_modules(module_cb callback, void* user_data);
480
487WS_DLL_PUBLIC void prefs_apply_all(void);
488
496WS_DLL_PUBLIC void prefs_apply(module_t *module);
497
498
499struct preference;
500
501typedef struct preference pref_t;
502
508WS_DLL_PUBLIC bool prefs_is_registered_protocol(const char *name);
509
515WS_DLL_PUBLIC const char *prefs_get_title_by_name(const char *name);
516
525WS_DLL_PUBLIC module_t *prefs_find_module(const char *name);
526
536WS_DLL_PUBLIC pref_t *prefs_find_preference(module_t * module, const char *pref);
537
555WS_DLL_PUBLIC void prefs_register_uint_preference(module_t *module, const char *name,
556 const char *title, const char *description, unsigned base, unsigned *var);
557
574WS_DLL_PUBLIC void prefs_register_int_preference(module_t* module, const char* name,
575 const char* title, const char* description, int* var);
576
594WS_DLL_PUBLIC void prefs_register_float_preference(module_t* module, const char* name,
595 const char* title, const char* description, unsigned num_decimal, double* var);
596
597/*
598 * prefs_register_ callers must conform to the following:
599 *
600 * Names must be in lowercase letters only (underscore allowed).
601 * Titles and descriptions must be valid UTF-8 or NULL.
602 * Titles must be short (less than 80 characters)
603 * Titles must not contain newlines.
604 */
605
622WS_DLL_PUBLIC void prefs_register_bool_preference(module_t *module, const char *name,
623 const char *title, const char *description, bool *var);
624
645WS_DLL_PUBLIC void prefs_register_enum_preference(module_t *module, const char *name,
646 const char *title, const char *description, int *var,
647 const enum_val_t *enumvals, bool radio_buttons);
648
670WS_DLL_PUBLIC void prefs_register_string_preference(module_t *module, const char *name,
671 const char *title, const char *description, const char **var);
672
700WS_DLL_PUBLIC void prefs_register_filename_preference(module_t *module, const char *name,
701 const char *title, const char *description, const char **var, bool for_writing);
702
727WS_DLL_PUBLIC void prefs_register_directory_preference(module_t *module, const char *name,
728 const char *title, const char *description, const char **var);
729
754WS_DLL_PUBLIC void prefs_register_list_string_preference(module_t* module, const char* name,
755 const char* title, const char* description, wmem_list_t** var);
756
782WS_DLL_PUBLIC void prefs_register_multiple_string_preference(module_t* module, const char* name,
783 const char* title, const char* description, wmem_list_t** var);
784
802WS_DLL_PUBLIC void prefs_register_range_preference(module_t *module, const char *name,
803 const char *title, const char *description, range_t **var,
804 uint32_t max_value);
805
820WS_DLL_PUBLIC void prefs_register_static_text_preference(module_t *module, const char *name,
821 const char *title, const char *description);
822
840WS_DLL_PUBLIC void prefs_register_uat_preference(module_t *module,
841 const char *name, const char* title, const char *description, struct epan_uat* uat);
842
863void prefs_register_color_preference(module_t *module, const char *name,
864 const char *title, const char *description, color_t *color);
865
887 const char *title, const char *description, struct pref_custom_cbs* custom_cbs,
888 void** custom_data);
889
910 const char *title, const char *description, range_t **var,
911 uint32_t max_value, const char *dissector_table, const char *dissector_description);
912
929WS_DLL_PUBLIC void prefs_register_password_preference(module_t *module, const char *name,
930 const char *title, const char *description, const char **var);
931
953WS_DLL_PUBLIC void prefs_register_dissector_preference(module_t *module, const char *name,
954 const char *title, const char *description, const char **var);
955
972WS_DLL_PUBLIC void prefs_register_obsolete_preference(module_t *module,
973 const char *name);
974
995WS_DLL_PUBLIC void prefs_register_custom_preference_TCP_Analysis(module_t *module, const char *name,
996 const char *title, const char *description, int *var,
997 const enum_val_t *enumvals, bool radio_buttons);
998
1013WS_DLL_PUBLIC void prefs_set_preference_effect_fields(module_t *module,
1014 const char *name);
1015
1016WS_DLL_PUBLIC void prefs_set_preference_effect(module_t* module,
1017 const char* name, unsigned flags);
1018
1019typedef unsigned (*pref_cb)(pref_t *pref, void *user_data);
1020
1035WS_DLL_PUBLIC unsigned prefs_pref_foreach(module_t *module, pref_cb callback,
1036 void *user_data);
1037
1048WS_DLL_PUBLIC GList *prefs_get_string_list(const char *str);
1049
1054WS_DLL_PUBLIC void prefs_clear_string_list(GList *sl);
1055
1062WS_DLL_PUBLIC
1063const char *prefs_pref_type_name(pref_t *pref);
1064
1073WS_DLL_PUBLIC
1075
1083WS_DLL_PUBLIC
1084char *prefs_pref_to_str(pref_t *pref, pref_source_t source);
1085
1092WS_DLL_PUBLIC
1093int prefs_num_non_uat(module_t* module);
1094
1095
1102WS_DLL_PUBLIC
1104
1116extern e_prefs *read_prefs(const char* app_env_var_prefix);
1117
1128WS_DLL_PUBLIC int write_prefs(const char* app_env_var_prefix, char **pf_path_return);
1129
1136WS_DLL_PUBLIC void pref_write_individual(void* data, void* user_data);
1137
1144WS_DLL_PUBLIC void pref_free_individual(void* data, void* user_data);
1145
1149typedef enum {
1150 PREFS_SET_OK, /* succeeded */
1151 PREFS_SET_SYNTAX_ERR, /* syntax error in string */
1152 PREFS_SET_NO_SUCH_PREF, /* no such preference */
1153 PREFS_SET_OBSOLETE /* preference used to exist but no longer does */
1155
1169WS_DLL_PUBLIC prefs_set_pref_e prefs_set_pref(char *prefarg, char **errmsg);
1170
1180WS_DLL_PUBLIC range_t* prefs_get_range_value(const char *module_name, const char* pref_name);
1181
1187WS_DLL_PUBLIC bool prefs_is_capture_device_hidden(const char *name);
1188
1194WS_DLL_PUBLIC bool prefs_capture_device_monitor_mode(const char *name);
1195
1202WS_DLL_PUBLIC bool prefs_capture_options_dialog_column_is_visible(const char *column);
1203
1210WS_DLL_PUBLIC bool prefs_has_layout_pane_content (layout_pane_content_e layout_pane_content);
1211
1212#ifdef __cplusplus
1213}
1214#endif /* __cplusplus */
1215
1216#endif /* prefs.h */
1217
1218/*
1219 * Editor modelines - https://www.wireshark.org/tools/modelines.html
1220 *
1221 * Local variables:
1222 * c-basic-offset: 4
1223 * tab-width: 8
1224 * indent-tabs-mode: nil
1225 * End:
1226 *
1227 * vi: set shiftwidth=4 tabstop=8 expandtab:
1228 * :indentSize=4:tabSize=8:noTabs=true:
1229 */
WS_DLL_PUBLIC module_t * prefs_register_codec(const char *name, const char *title, const char *description, void(*apply_cb)(void))
Definition prefs.c:799
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:1586
WS_DLL_PUBLIC bool prefs_is_preference_obsolete(pref_t *pref)
Definition prefs.c:2069
WS_DLL_PUBLIC module_t * prefs_register_protocol_subtree(const char *subtree, int id, void(*apply_cb)(void))
Definition prefs.c:700
WS_DLL_PUBLIC prefs_set_pref_e prefs_set_pref(char *prefarg, char **errmsg)
Definition prefs.c:5088
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:1825
WS_DLL_PUBLIC void prefs_clear_string_list(GList *sl)
Definition prefs.c:4248
void prefs_register_color_preference(module_t *module, const char *name, const char *title, const char *description, color_t *color)
Definition prefs.c:1843
WS_DLL_PUBLIC range_t * prefs_get_range_value(const char *module_name, const char *pref_name)
Definition prefs.c:1786
WS_DLL_PUBLIC bool prefs_capture_options_dialog_column_is_visible(const char *column)
Definition prefs.c:5473
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:1600
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:1642
WS_DLL_PUBLIC char * prefs_pref_type_description(pref_t *pref)
Definition prefs.c:6427
WS_DLL_PUBLIC void prefs_register_obsolete_preference(module_t *module, const char *name)
Definition prefs.c:2063
WS_DLL_PUBLIC module_t * prefs_find_module(const char *name)
Definition prefs.c:807
e_prefs * read_prefs(const char *app_env_var_prefix)
Definition prefs.c:4749
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:935
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:1572
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:1977
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:1209
WS_DLL_PUBLIC bool prefs_has_layout_pane_content(layout_pane_content_e layout_pane_content)
Definition prefs.c:5488
unsigned(* module_cb)(module_t *module, void *user_data)
Definition prefs.h:429
WS_DLL_PUBLIC bool prefs_is_registered_protocol(const char *name)
Definition prefs.c:1150
WS_DLL_PUBLIC void prefs_register_static_text_preference(module_t *module, const char *name, const char *title, const char *description)
Definition prefs.c:1813
WS_DLL_PUBLIC void prefs_set_preference_effect_fields(module_t *module, const char *name)
Definition prefs.c:2075
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:1161
WS_DLL_PUBLIC void prefs_set_gui_theme_is_dark(bool is_dark)
Definition prefs.c:424
WS_DLL_PUBLIC unsigned prefs_pref_foreach(module_t *module, pref_cb callback, void *user_data)
Definition prefs.c:2441
WS_DLL_PUBLIC pref_t * prefs_find_preference(module_t *module, const char *pref)
Definition prefs.c:1141
WS_DLL_PUBLIC module_t * prefs_register_protocol_obsolete(int id)
Definition prefs.c:752
void prefs_deregister_protocol(int id)
Definition prefs.c:688
WS_DLL_PUBLIC bool prefs_capture_device_monitor_mode(const char *name)
Definition prefs.c:5449
WS_DLL_PUBLIC void prefs_register_module_alias(const char *name, module_t *module)
Definition prefs.c:633
prefs_set_pref_e
Definition prefs.h:1149
WS_DLL_PUBLIC void pref_write_individual(void *data, void *user_data)
Definition prefs.c:6770
WS_DLL_PUBLIC char * prefs_pref_to_str(pref_t *pref, pref_source_t source)
Definition prefs.c:6633
WS_DLL_PUBLIC const char * prefs_pref_type_name(pref_t *pref)
Definition prefs.c:6281
WS_DLL_PUBLIC unsigned prefs_modules_foreach(const wmem_tree_t *module, module_cb callback, void *user_data)
Definition prefs.c:884
WS_DLL_PUBLIC unsigned prefs_modules_for_all_modules(module_cb callback, void *user_data)
Definition prefs.c:906
void prefs_cleanup(void)
Definition prefs.c:406
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:1172
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:2007
WS_DLL_PUBLIC int prefs_num_non_uat(module_t *module)
Definition prefs.c:6881
WS_DLL_PUBLIC int write_prefs(const char *app_env_var_prefix, char **pf_path_return)
Definition prefs.c:6964
WS_DLL_PUBLIC module_t * prefs_register_protocol(int id, void(*apply_cb)(void))
Definition prefs.c:676
void prefs_init(const char **col_fmt, int num_cols)
Definition prefs.c:314
WS_DLL_PUBLIC GList * prefs_get_string_list(const char *str)
Definition prefs.c:4119
WS_DLL_PUBLIC void prefs_apply(module_t *module)
Definition prefs.c:947
WS_DLL_PUBLIC void prefs_reset(const char *app_env_var_prefix, const char **col_fmt, int num_cols)
Definition prefs.c:4636
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:1246
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:1335
WS_DLL_PUBLIC module_t * prefs_register_stat(const char *name, const char *title, const char *description, void(*apply_cb)(void))
Definition prefs.c:779
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:1195
WS_DLL_PUBLIC unsigned prefs_modules_foreach_submodules(const wmem_tree_t *module, module_cb callback, void *user_data)
Definition prefs.c:900
WS_DLL_PUBLIC bool prefs_module_has_submodules(module_t *module)
Definition prefs.c:862
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:1958
WS_DLL_PUBLIC bool prefs_is_capture_device_hidden(const char *name)
Definition prefs.c:5300
WS_DLL_PUBLIC char string_to_name_resolve(const char *string, struct _e_addr_resolve *name_resolve)
Definition prefs.c:5496
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:1993
Flags to control name resolution.
Definition addr_resolv.h:52
Definition prefs.h:174
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:201
unsigned base
Definition prefs.c:246
const char * description
Definition prefs.c:204
const char * title
Definition prefs.c:203
const char * name
Definition prefs.c:202
struct pref_custom_cbs custom_cbs
Definition prefs.c:256
uint32_t max_value
Definition prefs.c:247
const enum_val_t * enumvals
Definition prefs.c:249
bool radio_buttons
Definition prefs.c:250