From f3d90d30a49382db3955b9ece00d71fe12d54c49 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Thu, 18 May 2000 09:09:50 +0000 Subject: Remove the "union pseudo_header" from the "frame_data" structure; there's no need to keep it around in memory - when the frame data is read in when handing a frame, read in the information, if any, necessary to reconstruct the frame header, and reconstruct it. This saves some memory. This requires that the seek-and-read function be implemented inside Wiretap, and that the Wiretap handle remain open even after we've finished reading the file sequentially. This also points out that we can't really do X.25-over-Ethernet correctly, as we don't know where the direction (DTE->DCE or DCE->DTE) flag is stored; it's not clear how the Ethernet type 0x0805 for X.25 Layer 3 is supposed to be handled in any case. We eliminate X.25-over-Ethernet support (until we find out what we're supposed to do). svn path=/trunk/; revision=1975 --- packet-ascend.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'packet-ascend.c') diff --git a/packet-ascend.c b/packet-ascend.c index c53c3da26c..11eeb80d21 100644 --- a/packet-ascend.c +++ b/packet-ascend.c @@ -1,7 +1,7 @@ /* packet-ascend.c * Routines for decoding Lucent/Ascend packet traces * - * $Id: packet-ascend.c,v 1.12 2000/05/16 06:21:31 gram Exp $ + * $Id: packet-ascend.c,v 1.13 2000/05/18 09:05:38 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs @@ -32,6 +32,7 @@ #include #include #include "packet.h" +#include "packet-ascend.h" #include "packet-eth.h" #include "packet-ppp.h" @@ -52,7 +53,8 @@ static const value_string encaps_vals[] = { {0, NULL } }; void -dissect_ascend( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +dissect_ascend( tvbuff_t *tvb, const union pseudo_header *pseudo_header, + packet_info *pinfo, proto_tree *tree) { proto_tree *fh_tree; proto_item *ti; @@ -78,24 +80,24 @@ dissect_ascend( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) ti = proto_tree_add_text(tree, tvb, 0, 0, "Lucent/Ascend packet trace" ); fh_tree = proto_item_add_subtree(ti, ett_raw); proto_tree_add_item(fh_tree, hf_link_type, tvb, 0, 0, - pinfo->fd->pseudo_header.ascend.type); - if (pinfo->fd->pseudo_header.ascend.type == ASCEND_PFX_WDD) { + pseudo_header->ascend.type); + if (pseudo_header->ascend.type == ASCEND_PFX_WDD) { proto_tree_add_item(fh_tree, hf_called_number, tvb, 0, 0, - pinfo->fd->pseudo_header.ascend.call_num); + pseudo_header->ascend.call_num); proto_tree_add_item(fh_tree, hf_chunk, tvb, 0, 0, - pinfo->fd->pseudo_header.ascend.chunk); + pseudo_header->ascend.chunk); proto_tree_add_item_hidden(fh_tree, hf_session_id, tvb, 0, 0, 0); } else { /* It's wandsession data */ proto_tree_add_item(fh_tree, hf_user_name, tvb, 0, 0, - pinfo->fd->pseudo_header.ascend.user); + pseudo_header->ascend.user); proto_tree_add_item(fh_tree, hf_session_id, tvb, 0, 0, - pinfo->fd->pseudo_header.ascend.sess); + pseudo_header->ascend.sess); proto_tree_add_item_hidden(fh_tree, hf_chunk, tvb, 0, 0, 0); } - proto_tree_add_item(fh_tree, hf_task, tvb, 0, 0, pinfo->fd->pseudo_header.ascend.task); + proto_tree_add_item(fh_tree, hf_task, tvb, 0, 0, pseudo_header->ascend.task); } - switch (pinfo->fd->pseudo_header.ascend.type) { + switch (pseudo_header->ascend.type) { case ASCEND_PFX_WDS_X: case ASCEND_PFX_WDS_R: tvb_compat(tvb, &pd, &offset); -- cgit v1.2.3