diff options
author | Ed Warnicke <hagbard@physics.rutgers.edu> | 2001-11-26 05:41:15 +0000 |
---|---|---|
committer | Ed Warnicke <hagbard@physics.rutgers.edu> | 2001-11-26 05:41:15 +0000 |
commit | 89babba2232f716fce7e3f0080d0c60525350e82 (patch) | |
tree | 3518f3e52998c1626afade0ce58338dda8f43882 /epan | |
parent | 4877553530fc356888edb95332b24eaeaadeee80 (diff) |
This should be the final bit of removing the dissect_data symbol
from being required by anyone other than packet-data.c.
It can now be accessed with call_dissector() with the name "data".
dissect_data is now also of dissect_t.
svn path=/trunk/; revision=4271
Diffstat (limited to 'epan')
-rw-r--r-- | epan/packet.c | 8 | ||||
-rw-r--r-- | epan/packet.h | 5 | ||||
-rw-r--r-- | epan/plugins.c | 4 | ||||
-rw-r--r-- | epan/proto.h | 10 |
4 files changed, 9 insertions, 18 deletions
diff --git a/epan/packet.c b/epan/packet.c index 3c5fcd7ff9..a1701bb38e 100644 --- a/epan/packet.c +++ b/epan/packet.c @@ -1,7 +1,7 @@ /* packet.c * Routines for packet disassembly * - * $Id: packet.c,v 1.41 2001/11/21 23:16:23 gram Exp $ + * $Id: packet.c,v 1.42 2001/11/26 05:41:12 hagbard Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -82,11 +82,13 @@ static gint proto_malformed = -1; static dissector_handle_t frame_handle = NULL; +static dissector_handle_t data_handle = NULL; void packet_init(void) { frame_handle = find_dissector("frame"); + data_handle = find_dissector("data"); proto_malformed = proto_get_id_by_filter_name("malformed"); } @@ -824,7 +826,9 @@ call_dissector(dissector_handle_t handle, tvbuff_t *tvb, /* * No - just dissect this packet as data. */ - dissect_data(tvb, 0, pinfo, tree); + g_assert(data_handle != NULL); + g_assert(data_handle->proto_index != -1); + call_dissector(data_handle,tvb, pinfo, tree); return; } diff --git a/epan/packet.h b/epan/packet.h index ce27cbc4a8..c9cfc5bca6 100644 --- a/epan/packet.h +++ b/epan/packet.h @@ -1,7 +1,7 @@ /* packet.h * Definitions for packet disassembly structures and routines * - * $Id: packet.h,v 1.40 2001/11/21 23:16:23 gram Exp $ + * $Id: packet.h,v 1.41 2001/11/26 05:41:13 hagbard Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -227,9 +227,6 @@ extern void init_all_protocols(void); extern void dissect_packet(struct _epan_dissect_t *edt, union wtap_pseudo_header *pseudo_header, const u_char *pd, frame_data *fd); -extern void dissect_data(tvbuff_t *tvb, int, packet_info *pinfo, - proto_tree *tree); - /* These functions are in packet-ethertype.c */ extern void capture_ethertype(guint16 etype, const u_char *pd, int offset, diff --git a/epan/plugins.c b/epan/plugins.c index c4e58374ca..da0509d939 100644 --- a/epan/plugins.c +++ b/epan/plugins.c @@ -1,7 +1,7 @@ /* plugins.c * plugin routines * - * $Id: plugins.c,v 1.41 2001/11/21 23:34:08 gram Exp $ + * $Id: plugins.c,v 1.42 2001/11/26 05:41:13 hagbard Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -312,8 +312,6 @@ init_plugins(const char *plugin_dir) patable.p_find_dissector = find_dissector; patable.p_call_dissector = call_dissector; - patable.p_dissect_data = dissect_data; - patable.p_proto_is_protocol_enabled = proto_is_protocol_enabled; patable.p_proto_item_get_len = proto_item_get_len; diff --git a/epan/proto.h b/epan/proto.h index 60699f413a..9e23889b29 100644 --- a/epan/proto.h +++ b/epan/proto.h @@ -1,7 +1,7 @@ /* proto.h * Definitions for protocol display * - * $Id: proto.h,v 1.21 2001/11/26 05:13:14 hagbard Exp $ + * $Id: proto.h,v 1.22 2001/11/26 05:41:13 hagbard Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -55,14 +55,6 @@ struct value_string; #define TFS(x) (struct true_false_string*)(x) /* check protocol activation */ -#define CHECK_DISPLAY_AS_DATA(index, tvb, pinfo, tree) { \ - if (!proto_is_protocol_enabled(index)) { \ - dissect_data(tvb, 0, pinfo, tree); \ - return; \ - } \ - } - -/* check protocol activation */ #define CHECK_DISPLAY_AS_X(x_handle,index, tvb, pinfo, tree) { \ if (!proto_is_protocol_enabled(index)) { \ call_dissector(x_handle,tvb, pinfo, tree); \ |