column-utils: add space to improve readability.
[metze/wireshark/wip.git] / epan / dissector_filters.h
1 /* dissector_filters.h
2  * Routines for dissector-generated conversation filters for use as
3  * display and color filters
4  *
5  * Wireshark - Network traffic analyzer
6  * By Gerald Combs <gerald@wireshark.org>
7  * Copyright 1998 Gerald Combs
8  *
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.
13  *
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.
18  *
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.
22  */
23
24 #ifndef __DISSECTOR_FILTERS_H__
25 #define __DISSECTOR_FILTERS_H__
26
27 #include "ws_symbol_export.h"
28
29 #ifdef __cplusplus
30 extern "C" {
31 #endif /* __cplusplus */
32
33 /** @file
34  */
35
36 /** callback function definition: is a filter available for this packet? */
37 typedef gboolean (*is_filter_valid_func)(struct _packet_info *pinfo);
38
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);
42
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);
46
47 WS_DLL_PUBLIC struct conversation_filter_s* find_conversation_filter(const char *proto_name);
48
49 /*** THE FOLLOWING SHOULD NOT BE USED BY ANY DISSECTORS!!! ***/
50
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;
57
58 WS_DLL_PUBLIC GList *conv_filter_list;
59
60 #ifdef __cplusplus
61 }
62 #endif /* __cplusplus */
63
64 #endif /* dissector_filters.h */