diff options
Diffstat (limited to 'epan')
-rw-r--r-- | epan/CMakeLists.txt | 1 | ||||
-rw-r--r-- | epan/Makefile.common | 2 | ||||
-rw-r--r-- | epan/dissector_filters.c | 57 | ||||
-rw-r--r-- | epan/dissector_filters.h | 61 | ||||
-rw-r--r-- | epan/dissectors/packet-enip.c | 10 |
5 files changed, 5 insertions, 126 deletions
diff --git a/epan/CMakeLists.txt b/epan/CMakeLists.txt index 29785efa9a..66c0f948f5 100644 --- a/epan/CMakeLists.txt +++ b/epan/CMakeLists.txt @@ -1604,7 +1604,6 @@ set(LIBWIRESHARK_FILES crc8-tvb.c decode_as.c disabled_protos.c - dissector_filters.c dvb_chartbl.c dwarf.c epan.c diff --git a/epan/Makefile.common b/epan/Makefile.common index fe81b1c7ea..f6b6b92277 100644 --- a/epan/Makefile.common +++ b/epan/Makefile.common @@ -43,7 +43,6 @@ LIBWIRESHARK_SRC = \ crc8-tvb.c \ decode_as.c \ disabled_protos.c \ - dissector_filters.c \ dvb_chartbl.c \ dwarf.c \ epan.c \ @@ -176,7 +175,6 @@ LIBWIRESHARK_INCLUDES = \ decode_as.h \ diam_dict.h \ disabled_protos.h \ - dissector_filters.h \ dtd.h \ dtd_parse.h \ dvb_chartbl.h \ diff --git a/epan/dissector_filters.c b/epan/dissector_filters.c deleted file mode 100644 index 04ab235119..0000000000 --- a/epan/dissector_filters.c +++ /dev/null @@ -1,57 +0,0 @@ -/* dissector_filters.c - * Routines for dissector generated 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. - */ - -#include "config.h" - -#include <glib.h> -#include "packet.h" - -#include "dissector_filters.h" - - -GList *dissector_filter_list = NULL; - - -void register_dissector_filter(const char *name, is_filter_valid_func is_filter_valid, build_filter_string_func build_filter_string) { - dissector_filter_t *entry; - - entry = (dissector_filter_t *)g_malloc(sizeof(dissector_filter_t)); - - entry->name = name; - entry->is_filter_valid = is_filter_valid; - entry->build_filter_string = build_filter_string; - - dissector_filter_list = g_list_append(dissector_filter_list, entry); -} - -/* - * Editor modelines - http://www.wireshark.org/tools/modelines.html - * - * Local variables: - * c-basic-offset: 4 - * tab-width: 8 - * indent-tabs-mode: nil - * End: - * - * vi: set shiftwidth=4 tabstop=8 expandtab: - * :indentSize=4:tabSize=8:noTabs=true: - */ diff --git a/epan/dissector_filters.h b/epan/dissector_filters.h deleted file mode 100644 index 020fb107ed..0000000000 --- a/epan/dissector_filters.h +++ /dev/null @@ -1,61 +0,0 @@ -/* dissector_filters.h - * Routines for dissector generated 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_filter_valid_func)(packet_info *pinfo); - -/** callback function definition: return the available filter for this packet or NULL if no filter is available */ -typedef const gchar* (*build_filter_string_func)(packet_info *pinfo); - - -/** register a dissector filter */ -WS_DLL_PUBLIC void register_dissector_filter(const char *name, is_filter_valid_func is_filter_valid, build_filter_string_func build_filter_string); - - - -/*** THE FOLLOWING SHOULD NOT BE USED BY ANY DISSECTORS!!! ***/ - -typedef struct dissector_filter_s { - const char * name; - is_filter_valid_func is_filter_valid; - build_filter_string_func build_filter_string; -} dissector_filter_t; - -WS_DLL_PUBLIC GList *dissector_filter_list; - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* dissector_filters.h */ diff --git a/epan/dissectors/packet-enip.c b/epan/dissectors/packet-enip.c index 2f5c444341..409c601682 100644 --- a/epan/dissectors/packet-enip.c +++ b/epan/dissectors/packet-enip.c @@ -36,7 +36,7 @@ #include "config.h" #include <epan/packet.h> -#include <epan/dissector_filters.h> +#include <epan/color_dissector_filters.h> #include <epan/prefs.h> #include <epan/etypes.h> #include <epan/expert.h> @@ -848,7 +848,7 @@ enip_io_conv_valid(packet_info *pinfo) ((conn->TransportClass_trigger & CI_TRANSPORT_CLASS_MASK) == 1)); } -static const gchar * +static gchar * enip_io_conv_filter(packet_info *pinfo) { char *buf; @@ -894,7 +894,7 @@ enip_exp_conv_valid(packet_info *pinfo) ((conn->TransportClass_trigger & CI_TRANSPORT_CLASS_MASK) == 3)); } -static const gchar * +static gchar * enip_exp_conv_filter(packet_info *pinfo) { char *buf; @@ -3736,8 +3736,8 @@ proto_register_enip(void) proto_register_field_array(proto_dlr, hfdlr, array_length(hfdlr)); proto_register_subtree_array(ettdlr, array_length(ettdlr)); - register_dissector_filter("ENIP IO", enip_io_conv_valid, enip_io_conv_filter); - register_dissector_filter("ENIP Explicit", enip_exp_conv_valid, enip_exp_conv_filter); + register_color_conversation_filter("enip", "ENIP IO", enip_io_conv_valid, enip_io_conv_filter); + register_color_conversation_filter("enip", "ENIP Explicit", enip_exp_conv_valid, enip_exp_conv_filter); register_decode_as(&enip_da); |