diff options
author | hagbard <hagbard@f5534014-38df-0310-8fa8-9805f1628bb7> | 2001-11-26 04:52:51 +0000 |
---|---|---|
committer | hagbard <hagbard@f5534014-38df-0310-8fa8-9805f1628bb7> | 2001-11-26 04:52:51 +0000 |
commit | a90f625bec257a54bc43f9c352378bc4ee91495d (patch) | |
tree | b423f343624fa9219216fac49dd6a23b2c4d5586 /packet-gmrp.c | |
parent | 7b8d96ee2ccdb3be61d045d60dd9773742ce4455 (diff) |
Moved from using dissect_data() to using call_dissector()
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@4269 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'packet-gmrp.c')
-rw-r--r-- | packet-gmrp.c | 23 |
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"); +} |