aboutsummaryrefslogtreecommitdiffstats
path: root/packet-gvrp.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2002-05-30 05:26:05 +0000
committerGuy Harris <guy@alum.mit.edu>2002-05-30 05:26:05 +0000
commitca03167c44822e04c15878bdd3563df757cfed23 (patch)
treefdc3b8c438ea29a573800ff2527762d60df25231 /packet-gvrp.c
parent8ec09e1441fc74bb72b69449c4c6704ea0784da8 (diff)
downloadwireshark-ca03167c44822e04c15878bdd3563df757cfed23.tar.gz
wireshark-ca03167c44822e04c15878bdd3563df757cfed23.tar.bz2
wireshark-ca03167c44822e04c15878bdd3563df757cfed23.zip
Don't pass "tvb_reported_length_remaining(tvb, offset)" as the fourth
argument to "tvb_new_subset()" - just use -1 if the subset tvbuff is to run to the end of the parent tvbuff. svn path=/trunk/; revision=5599
Diffstat (limited to 'packet-gvrp.c')
-rw-r--r--packet-gvrp.c26
1 files changed, 18 insertions, 8 deletions
diff --git a/packet-gvrp.c b/packet-gvrp.c
index 2ea834eaae..793eb05f60 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 <techishi@ms22.hinet.net>
*
- * $Id: packet-gvrp.c,v 1.10 2002/01/21 07:36:34 guy Exp $
+ * $Id: packet-gvrp.c,v 1.11 2002/05/30 05:26:05 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -145,7 +145,9 @@ 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)");
- 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);
+ call_dissector(data_handle,
+ tvb_new_subset(tvb, GARP_PROTOCOL_ID + sizeof(guint16), -1, -1),
+ pinfo, tree);
return;
}
@@ -175,7 +177,8 @@ dissect_gvrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
else
{
- call_dissector(data_handle,tvb_new_subset(tvb, offset, -1,tvb_reported_length_remaining(tvb,offset)),pinfo, tree);
+ call_dissector(data_handle,
+ tvb_new_subset(tvb, offset, -1, -1), pinfo, tree);
return;
}
}
@@ -192,7 +195,8 @@ dissect_gvrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* GVRP only supports one attribute type. */
if (octet != GVRP_ATTRIBUTE_TYPE)
{
- call_dissector(data_handle,tvb_new_subset(tvb, offset,-1,tvb_reported_length_remaining(tvb,offset)), pinfo, tree);
+ call_dissector(data_handle, tvb_new_subset(tvb, offset,-1, -1),
+ pinfo, tree);
return;
}
@@ -225,7 +229,8 @@ dissect_gvrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
else
{
- call_dissector(data_handle,tvb_new_subset(tvb, offset,-1,tvb_reported_length_remaining(tvb,offset)), pinfo, tree);
+ call_dissector(data_handle,
+ tvb_new_subset(tvb, offset, -1, -1), pinfo, tree);
return;
}
}
@@ -256,7 +261,9 @@ dissect_gvrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
case GVRP_EVENT_LEAVEALL:
if (octet != GVRP_LENGTH_LEAVEALL)
{
- call_dissector(data_handle,tvb_new_subset(tvb, offset, -1,tvb_reported_length_remaining(tvb,offset)),pinfo, tree);
+ call_dissector(data_handle,
+ tvb_new_subset(tvb, offset, -1, -1), pinfo,
+ tree);
return;
}
break;
@@ -268,7 +275,9 @@ dissect_gvrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
case GVRP_EVENT_EMPTY:
if (octet != GVRP_LENGTH_NON_LEAVEALL)
{
- call_dissector(data_handle,tvb_new_subset(tvb, offset, -1,tvb_reported_length_remaining(tvb,offset)),pinfo, tree);
+ call_dissector(data_handle,
+ tvb_new_subset(tvb, offset, -1, -1),pinfo,
+ tree);
return;
}
@@ -281,7 +290,8 @@ dissect_gvrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
break;
default:
- call_dissector(data_handle,tvb_new_subset(tvb, offset, -1,tvb_reported_length_remaining(tvb,offset)),pinfo, tree);
+ call_dissector(data_handle,
+ tvb_new_subset(tvb, offset, -1, -1), pinfo, tree);
return;
}
}