diff options
author | Guy Harris <guy@alum.mit.edu> | 2015-10-28 20:30:55 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2015-10-29 03:33:09 +0000 |
commit | 0594bfdf7eb4b14e1d042a1799b5fff0284ba071 (patch) | |
tree | 9b4972d1080e7476d8caa2b73e0f608645a105de /epan/dissector_filters.h | |
parent | 11843b50e558294529272c4980801073d5956838 (diff) | |
download | wireshark-0594bfdf7eb4b14e1d042a1799b5fff0284ba071.tar.gz |
"Color dissector filters" are just filters.
Rename the color_dissector_filters.[ch] files to just
dissector_filters.[ch], and rename the routines not to include the
string "color_", as those filters can be used as color filters *or*
display filters.
Remove "color_" from other places where we're not doing colorization.
In the GTK+ code, combine the two loops that add menu items for filters
in the dissector-provided filters list into one.
Change-Id: I08ecccc6b1b1be675e4129a0589f36c9f240407c
Reviewed-on: https://code.wireshark.org/review/11379
Reviewed-by: Guy Harris <guy@alum.mit.edu>
(cherry picked from commit a8a4098e12b1b60548ce1a1887b2a18a54ef790f)
Reviewed-on: https://code.wireshark.org/review/11380
Diffstat (limited to 'epan/dissector_filters.h')
-rw-r--r-- | epan/dissector_filters.h | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/epan/dissector_filters.h b/epan/dissector_filters.h new file mode 100644 index 0000000000..9d1ac83489 --- /dev/null +++ b/epan/dissector_filters.h @@ -0,0 +1,65 @@ +/* dissector_filters.h + * Routines for dissector-generated conversation display filters + * + * Wireshark - Network traffic analyzer + * By Gerald Combs <gerald@wireshark.org> + * Copyright 1998 Gerald Combs + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +#ifndef __DISSECTOR_FILTERS_H__ +#define __DISSECTOR_FILTERS_H__ + +#include "ws_symbol_export.h" + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +/** @file + */ + +/** callback function definition: is a filter available for this packet? */ +typedef gboolean (*is_conv_valid_func)(packet_info *pinfo); + +/** callback function definition: return the available filter for this packet or NULL if no filter is available, + Filter needs to be freed after use */ +typedef gchar* (*build_conv_string_func)(packet_info *pinfo); + +#define MAX_NUM_COLOR_CONVERSATION_COLORS 10 + +/** register a dissector filter */ +WS_DLL_PUBLIC void register_conversation_filter(const char *proto_name, const char *display_name, + is_conv_valid_func is_filter_valid, build_conv_string_func build_filter_string); + +WS_DLL_PUBLIC struct conversation_filter_s* find_conversation_filter(const char *proto_name); + +/*** THE FOLLOWING SHOULD NOT BE USED BY ANY DISSECTORS!!! ***/ + +typedef struct conversation_filter_s { + const char * proto_name; + const char * display_name; + is_conv_valid_func is_filter_valid; + build_conv_string_func build_filter_string; +} conversation_filter_t; + +WS_DLL_PUBLIC GList *conv_filter_list; + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif /* dissector_filters.h */ |