aboutsummaryrefslogtreecommitdiffstats
path: root/packet-gmrp.c
diff options
context:
space:
mode:
authorEd Warnicke <hagbard@physics.rutgers.edu>2001-11-26 04:52:51 +0000
committerEd Warnicke <hagbard@physics.rutgers.edu>2001-11-26 04:52:51 +0000
commitfcd5b352af60e034a4b63601272b43b6644029cd (patch)
treeb423f343624fa9219216fac49dd6a23b2c4d5586 /packet-gmrp.c
parent7537283cc691e6370db67fd5b0e393583074bf7f (diff)
Moved from using dissect_data() to using call_dissector()
svn path=/trunk/; revision=4269
Diffstat (limited to 'packet-gmrp.c')
-rw-r--r--packet-gmrp.c23
1 files changed, 15 insertions, 8 deletions
diff --git a/packet-gmrp.c b/packet-gmrp.c
index 5b5fad3133..d4794fc2b7 100644
--- a/packet-gmrp.c
+++ b/packet-gmrp.c
@@ -65,6 +65,8 @@ static gint ett_gmrp = -1;
static gint ett_gmrp_attribute_list = -1;
static gint ett_gmrp_attribute = -1;*/
+static dissector_handle_t data_handle;
+
/* Constant definitions */
#define GARP_DEFAULT_PROTOCOL_ID 0x0001
#define GARP_END_OF_MARK 0x00
@@ -157,7 +159,7 @@ dissect_gmrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
proto_tree_add_text(gmrp_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;
}
@@ -187,7 +189,7 @@ dissect_gmrp(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;
}
}
@@ -204,7 +206,7 @@ dissect_gmrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* GMRP supports Group Membership and Service Requirement as attribute types */
if ( (octet != GMRP_ATTRIBUTE_TYPE_GROUP_MEMBERSHIP) && (octet != GMRP_ATTRIBUTE_TYPE_SERVICE_REQUIREMENT) )
{
- 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;
}
@@ -237,7 +239,7 @@ dissect_gmrp(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;
}
}
@@ -268,7 +270,7 @@ dissect_gmrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
case GMRP_EVENT_LEAVEALL:
if (octet != GMRP_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;
@@ -280,7 +282,7 @@ dissect_gmrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
case GMRP_EVENT_EMPTY:
if ( (octet != GMRP_GROUP_MEMBERSHIP_NON_LEAVEALL) && (octet != GMRP_SERVICE_REQUIREMENT_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;
}
@@ -307,14 +309,14 @@ dissect_gmrp(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;
}
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;
}
}
@@ -384,3 +386,8 @@ proto_register_gmrp(void)
register_dissector("gmrp", dissect_gmrp, proto_gmrp);
}
+
+void
+proto_reg_handoff_gmrp(void){
+ data_handle = find_dissector("data");
+}