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.
24 #ifndef __DISSECTOR_FILTERS_H__
25 #define __DISSECTOR_FILTERS_H__
27 #include "ws_symbol_export.h"
31 #endif /* __cplusplus */
36 /** callback function definition: is a filter available for this packet? */
37 typedef gboolean (*is_filter_valid_func)(struct _packet_info *pinfo);
39 /** callback function definition: return the available filter for this packet or NULL if no filter is available,
40 Filter needs to be freed after use */
41 typedef gchar* (*build_filter_string_func)(struct _packet_info *pinfo);
43 /** register a dissector filter */
44 WS_DLL_PUBLIC void register_conversation_filter(const char *proto_name, const char *display_name,
45 is_filter_valid_func is_filter_valid, build_filter_string_func build_filter_string);
47 WS_DLL_PUBLIC struct conversation_filter_s* find_conversation_filter(const char *proto_name);
49 /*** THE FOLLOWING SHOULD NOT BE USED BY ANY DISSECTORS!!! ***/
51 typedef struct conversation_filter_s {
52 const char * proto_name;
53 const char * display_name;
54 is_filter_valid_func is_filter_valid;
55 build_filter_string_func build_filter_string;
56 } conversation_filter_t;
58 WS_DLL_PUBLIC GList *conv_filter_list;
62 #endif /* __cplusplus */
64 #endif /* dissector_filters.h */