From fcd5b352af60e034a4b63601272b43b6644029cd Mon Sep 17 00:00:00 2001 From: Ed Warnicke Date: Mon, 26 Nov 2001 04:52:51 +0000 Subject: Moved from using dissect_data() to using call_dissector() svn path=/trunk/; revision=4269 --- packet-gvrp.c | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) (limited to 'packet-gvrp.c') diff --git a/packet-gvrp.c b/packet-gvrp.c index 470f557795..302200fdb4 100644 --- a/packet-gvrp.c +++ b/packet-gvrp.c @@ -2,7 +2,7 @@ * Routines for GVRP (GARP VLAN Registration Protocol) dissection * Copyright 2000, Kevin Shi * - * $Id: packet-gvrp.c,v 1.6 2001/06/18 02:17:46 guy Exp $ + * $Id: packet-gvrp.c,v 1.7 2001/11/26 04:52:49 hagbard Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs @@ -63,6 +63,8 @@ static gint ett_gvrp = -1; static gint ett_gvrp_attribute_list = -1; static gint ett_gvrp_attribute = -1;*/ +static dissector_handle_t data_handle; + /* Constant definitions */ #define GARP_DEFAULT_PROTOCOL_ID 0x0001 #define GARP_END_OF_MARK 0x00 @@ -143,7 +145,7 @@ dissect_gvrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { proto_tree_add_text(gvrp_tree, tvb, GARP_PROTOCOL_ID, sizeof(guint16), " (Warning: this version of Ethereal only knows about protocol id = 1)"); - dissect_data(tvb, GARP_PROTOCOL_ID + sizeof(guint16), pinfo, tree); + call_dissector(data_handle,tvb_new_subset(tvb, GARP_PROTOCOL_ID + sizeof(guint16), -1,tvb_reported_length_remaining(tvb,GARP_PROTOCOL_ID + sizeof(guint16))), pinfo, tree); return; } @@ -173,7 +175,7 @@ dissect_gvrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } else { - dissect_data(tvb, offset, pinfo, tree); + call_dissector(data_handle,tvb_new_subset(tvb, offset, -1,tvb_reported_length_remaining(tvb,offset)),pinfo, tree); return; } } @@ -190,7 +192,7 @@ dissect_gvrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) /* GVRP only supports one attribute type. */ if (octet != GVRP_ATTRIBUTE_TYPE) { - dissect_data(tvb, offset, pinfo, tree); + call_dissector(data_handle,tvb_new_subset(tvb, offset,-1,tvb_reported_length_remaining(tvb,offset)), pinfo, tree); return; } @@ -223,7 +225,7 @@ dissect_gvrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } else { - dissect_data(tvb, offset, pinfo, tree); + call_dissector(data_handle,tvb_new_subset(tvb, offset,-1,tvb_reported_length_remaining(tvb,offset)), pinfo, tree); return; } } @@ -254,7 +256,7 @@ dissect_gvrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) case GVRP_EVENT_LEAVEALL: if (octet != GVRP_LENGTH_LEAVEALL) { - dissect_data(tvb, offset, pinfo, tree); + call_dissector(data_handle,tvb_new_subset(tvb, offset, -1,tvb_reported_length_remaining(tvb,offset)),pinfo, tree); return; } break; @@ -266,7 +268,7 @@ dissect_gvrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) case GVRP_EVENT_EMPTY: if (octet != GVRP_LENGTH_NON_LEAVEALL) { - dissect_data(tvb, offset, pinfo, tree); + call_dissector(data_handle,tvb_new_subset(tvb, offset, -1,tvb_reported_length_remaining(tvb,offset)),pinfo, tree); return; } @@ -279,7 +281,7 @@ dissect_gvrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) break; default: - dissect_data(tvb, offset, pinfo, tree); + call_dissector(data_handle,tvb_new_subset(tvb, offset, -1,tvb_reported_length_remaining(tvb,offset)),pinfo, tree); return; } } @@ -342,3 +344,8 @@ proto_register_gvrp(void) register_dissector("gvrp", dissect_gvrp, proto_gvrp); } + +void +proto_reg_handoff_gvrp(void){ + data_handle = find_dissector("data"); +} -- cgit v1.2.3