2 * Routines for dissector-generated conversation filters for use as
3 * display and color filters
5 * Wireshark - Network traffic analyzer
6 * By Gerald Combs <gerald@wireshark.org>
7 * Copyright 1998 Gerald Combs
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * as published by the Free Software Foundation; either version 2
12 * of the License, or (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
29 #include "dissector_filters.h"
32 GList *conv_filter_list = NULL;
35 void register_conversation_filter(const char *proto_name, const char *display_name,
36 is_filter_valid_func is_filter_valid, build_filter_string_func build_filter_string) {
37 conversation_filter_t *entry;
39 entry = (conversation_filter_t *)g_malloc(sizeof(conversation_filter_t));
41 entry->proto_name = proto_name;
42 entry->display_name = display_name;
43 entry->is_filter_valid = is_filter_valid;
44 entry->build_filter_string = build_filter_string;
46 conv_filter_list = g_list_append(conv_filter_list, entry);
49 struct conversation_filter_s* find_conversation_filter(const char *name)
51 GList *list_entry = conv_filter_list;
52 conversation_filter_t* filter;
54 while (list_entry != NULL) {
55 filter = (conversation_filter_t*)list_entry->data;
56 if (!strcmp(filter->proto_name, name))
59 list_entry = g_list_next(list_entry);
66 * Editor modelines - http://www.wireshark.org/tools/modelines.html
71 * indent-tabs-mode: nil
74 * vi: set shiftwidth=4 tabstop=8 expandtab:
75 * :indentSize=4:tabSize=8:noTabs=true: