aboutsummaryrefslogtreecommitdiffstats
path: root/packet-msproxy.c
diff options
context:
space:
mode:
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2000-11-18 10:38:33 +0000
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2000-11-18 10:38:33 +0000
commitf4fc5ac736a773f41e683e59d4431b1fbfa43c9d (patch)
tree5e117f446c6e233d14b642596d67c985e685f328 /packet-msproxy.c
parent92c209a221b63e9fd8b07684cec124efc0e01597 (diff)
Tvbuffify the IP, ICMP, TCP, UDP, OSI CLNP, OSI COTP, OSI CLTP, and OSI
ESIS dissectors. Register the IP dissector and have dissectors that call it directly (rather than through a port table) call it through a handle. Add a routine "tvb_set_reported_length()" which a dissector can use if it was handed a tvbuff that contains more data than is actually in its part of the packet - for example, handing a padded Ethernet frame to IP; the routine sets the reported length of the tvbuff (and also adjusts the actual length, as appropriate). Then use it in IP. Given that, "ethertype()" can determine how much of the Ethernet frame was actually part of an IP datagram (and can do the same for other protocols under Ethernet that use "tvb_set_reported_length()"; have it return the actual length, and have "dissect_eth()" and "dissect_vlan()" use that to mark trailer data in Ethernet II frames as well as in 802.3 frames. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2658 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'packet-msproxy.c')
-rw-r--r--packet-msproxy.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/packet-msproxy.c b/packet-msproxy.c
index 1f4506919b..1a94a76d41 100644
--- a/packet-msproxy.c
+++ b/packet-msproxy.c
@@ -2,7 +2,7 @@
* Routines for Microsoft Proxy packet dissection
* Copyright 2000, Jeffrey C. Foster <jfoste@woodward.com>
*
- * $Id: packet-msproxy.c,v 1.12 2000/10/21 05:52:21 guy Exp $
+ * $Id: packet-msproxy.c,v 1.13 2000/11/18 10:38:24 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -220,6 +220,7 @@ static void msproxy_sub_dissector( const u_char *pd, int offset, frame_data *fd,
conversation_t *conversation;
proto_tree *msp_tree;
proto_item *ti;
+ tvbuff_t *tvb;
conversation = find_conversation( &pi.src, &pi.dst, pi.ptype,
pi.srcport, pi.destport, 0);
@@ -259,10 +260,11 @@ static void msproxy_sub_dissector( const u_char *pd, int offset, frame_data *fd,
*ptr = redirect_info->remote_port;
+ tvb = tvb_create_from_top(0);
if ( redirect_info->proto == PT_TCP)
- decode_tcp_ports( pd, offset, fd, tree, pi.srcport, pi.destport);
+ decode_tcp_ports( tvb, offset, &pi, tree, pi.srcport, pi.destport);
else
- decode_udp_ports( pd, offset, fd, tree, pi.srcport, pi.destport);
+ decode_udp_ports( tvb, offset, &pi, tree, pi.srcport, pi.destport);
*ptr = redirect_info->server_int_port;
}