Wireshark 2.9.0-477-g68ec514b The Wireshark network protocol analyzer

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

filter_files.h
1 /* filter_filess.h
2 * Declarations of routines for reading and writing the filters file.
3 *
4 * Wireshark - Network traffic analyzer
5 * By Gerald Combs <gerald@wireshark.org>
6 * Copyright 1998 Gerald Combs
7 *
8 * SPDX-License-Identifier: GPL-2.0-or-later
9 */
10
11 #ifndef __UI_FILTERS_H__
12 #define __UI_FILTERS_H__
13
14 #ifdef __cplusplus
15 extern "C" {
16 #endif /* __cplusplus */
17
18 /*
19 * Filter lists.
20 */
21 typedef enum {
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. */
26 } filter_list_type_t;
27
28 /*
29 * Item in a list of filters.
30 */
31 typedef struct {
32 char *name; /* filter name */
33 char *strval; /* filter expression */
34 } filter_def;
35
36 /*
37 * Read in a list of filters.
38 *
39 * On error, report the error via the UI.
40 */
41 void read_filter_list(filter_list_type_t list_type);
42
43 /*
44 * Get a pointer to the first entry in a filter list.
45 */
46 GList *get_filter_list_first(filter_list_type_t list);
47
48 /*
49 * Add a new filter to the end of a list.
50 * Returns a pointer to the newly-added entry.
51 */
52 GList *add_to_filter_list(filter_list_type_t list, const char *name,
53 const char *expression);
54
55 /*
56 * Remove a filter from a list.
57 */
58 void remove_from_filter_list(filter_list_type_t list, GList *fl_entry);
59
60 /*
61 * Write out a list of filters.
62 *
63 * On error, report the error via the UI.
64 */
65 void save_filter_list(filter_list_type_t list_type);
66
67 /*
68 * Clone the filter list so it can be edited. GTK+ only.
69 */
70 void copy_filter_list(filter_list_type_t dest_type, filter_list_type_t src_type);
71
72 /*
73 * Free all filter lists
74 */
75 void free_filter_lists(void);
76
77 #ifdef __cplusplus
78 }
79 #endif /* __cplusplus */
80
81 #endif /* __UI_FILTERS_H__ */
82
83 /*
84 * Editor modelines - http://www.wireshark.org/tools/modelines.html
85 *
86 * Local Variables:
87 * c-basic-offset: 2
88 * tab-width: 8
89 * indent-tabs-mode: nil
90 * End:
91 *
92 * vi: set shiftwidth=2 tabstop=8 expandtab:
93 * :indentSize=2:tabSize=8:noTabs=true:
94 */
filter_def
Definition: filter_files.h:31