2 * Declarations of routines for reading and writing the filters file.
4 * $Id: filters.h,v 1.2 2001/01/28 09:13:07 guy Exp $
6 * Ethereal - Network traffic analyzer
7 * By Gerald Combs <gerald@zing.org>
8 * Copyright 1998 Gerald Combs
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License
13 * as published by the Free Software Foundation; either version 2
14 * of the License, or (at your option) any later version.
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
30 CFILTER_LIST, /* capture filter list */
31 DFILTER_LIST /* display filter list */
35 * Item in a list of filters.
38 char *name; /* filter name */
39 char *strval; /* filter expression */
43 * Read in a list of filters.
45 * On success, "*pref_path_return" is set to NULL.
46 * On error, "*pref_path_return" is set to point to the pathname of
47 * the file we tried to read - it should be freed by our caller -
48 * and "*errno_return" is set to the error.
50 void read_filter_list(filter_list_type_t list, char **pref_path_return,
54 * Get a pointer to the first entry in a filter list.
56 GList *get_filter_list_first(filter_list_type_t list);
59 * Add a new filter to the end of a list.
60 * Returns a pointer to the newly-added entry.
62 GList *add_to_filter_list(filter_list_type_t list, char *name,
66 * Remove a filter from a list.
68 void remove_from_filter_list(filter_list_type_t list, GList *fl_entry);
71 * Write out a list of filters.
73 * On success, "*pref_path_return" is set to NULL.
74 * On error, "*pref_path_return" is set to point to the pathname of
75 * the file we tried to read - it should be freed by our caller -
76 * and "*errno_return" is set to the error.
78 void save_filter_list(filter_list_type_t list, char **pref_path_return,