2 * Declarations of routines for reading and writing the filters file.
4 * Wireshark - Network traffic analyzer
5 * By Gerald Combs <gerald@wireshark.org>
6 * Copyright 1998 Gerald Combs
8 * SPDX-License-Identifier: GPL-2.0-or-later
11 #ifndef __UI_FILTERS_H__
12 #define __UI_FILTERS_H__
16 #endif /* __cplusplus */
22 CFILTER_LIST, /* capture filter list - saved */
23 DFILTER_LIST, /* display filter list - saved */
24 CFILTER_EDITED_LIST, /* capture filter list - currently edited. GTK+ only. */
25 DFILTER_EDITED_LIST /* display filter list - currently edited. GTK+ only. */
29 * Item in a list of filters.
32 char *name; /* filter name */
33 char *strval; /* filter expression */
37 * Read in a list of filters.
39 * On error, report the error via the UI.
41 void read_filter_list(filter_list_type_t list_type);
44 * Get a pointer to the first entry in a filter list.
46 GList *get_filter_list_first(filter_list_type_t list);
49 * Add a new filter to the end of a list.
50 * Returns a pointer to the newly-added entry.
52 GList *add_to_filter_list(filter_list_type_t list, const char *name,
53 const char *expression);
56 * Remove a filter from a list.
58 void remove_from_filter_list(filter_list_type_t list, GList *fl_entry);
61 * Write out a list of filters.
63 * On error, report the error via the UI.
65 void save_filter_list(filter_list_type_t list_type);
68 * Clone the filter list so it can be edited. GTK+ only.
70 void copy_filter_list(filter_list_type_t dest_type, filter_list_type_t src_type);
73 * Free all filter lists
75 void free_filter_lists(void);
79 #endif /* __cplusplus */
81 #endif /* __UI_FILTERS_H__ */
84 * Editor modelines - http://www.wireshark.org/tools/modelines.html
89 * indent-tabs-mode: nil
92 * vi: set shiftwidth=2 tabstop=8 expandtab:
93 * :indentSize=2:tabSize=8:noTabs=true: