aboutsummaryrefslogtreecommitdiffstats
path: root/packet-cgmp.c
diff options
context:
space:
mode:
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2000-05-31 05:09:07 +0000
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2000-05-31 05:09:07 +0000
commite41a093685c520e2a86e4391a3e39168b13f7d24 (patch)
treeb451d4a712d9b914022ba872296e70e55b8d9bc5 /packet-cgmp.c
parentd3cf6abccf0b2b9fbcac9e89a2c3a889c4289eb1 (diff)
Add routines for adding items to a protocol tree that take arguments of
a particular type, rather than taking a varargs list, along the lines of the "proto_tree_add_XXX_format()" routines. Replace most calls to "proto_tree_add_item()" and "proto_tree_add_item_hidden()" with calls to those routines. Rename "proto_tree_add_item()" and "proto_tree_add_item_hidden()" to "proto_tree_add_item_old()" and "proto_tree_add_item_hidden_old()", and add new "proto_tree_add_item()" and "proto_tree_add_item_hidden()" routines that don't take the item to be added as an argument - instead, they fetch the argument from the packet whose tvbuff was handed to them, from the offset handed to them. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2031 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'packet-cgmp.c')
-rw-r--r--packet-cgmp.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/packet-cgmp.c b/packet-cgmp.c
index 9155aeb682..65333f055b 100644
--- a/packet-cgmp.c
+++ b/packet-cgmp.c
@@ -1,7 +1,7 @@
/* packet-cgmp.c
* Routines for the disassembly of the Cisco Group Management Protocol
*
- * $Id: packet-cgmp.c,v 1.2 2000/05/11 08:15:04 gram Exp $
+ * $Id: packet-cgmp.c,v 1.3 2000/05/31 05:06:58 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -71,32 +71,32 @@ dissect_cgmp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
col_add_str(fd, COL_INFO, "Cisco Group Management Protocol");
if (tree) {
- ti = proto_tree_add_item(tree, proto_cgmp, NullTVB, offset, END_OF_FRAME, NULL);
+ ti = proto_tree_add_item(tree, proto_cgmp, NullTVB, offset, END_OF_FRAME, FALSE);
cgmp_tree = proto_item_add_subtree(ti, ett_cgmp);
- proto_tree_add_item(cgmp_tree, hf_cgmp_version, NullTVB, offset, 1,
+ proto_tree_add_uint(cgmp_tree, hf_cgmp_version, NullTVB, offset, 1,
pd[offset]);
- proto_tree_add_item(cgmp_tree, hf_cgmp_type, NullTVB, offset, 1,
+ proto_tree_add_uint(cgmp_tree, hf_cgmp_type, NullTVB, offset, 1,
pd[offset]);
offset += 1;
offset += 2; /* skip reserved field */
count = pd[offset];
- proto_tree_add_item(cgmp_tree, hf_cgmp_count, NullTVB, offset, 1,
+ proto_tree_add_uint(cgmp_tree, hf_cgmp_count, NullTVB, offset, 1,
count);
offset += 1;
while (count != 0) {
if (!BYTES_ARE_IN_FRAME(offset, 6))
break;
- proto_tree_add_item(cgmp_tree, hf_cgmp_gda, NullTVB, offset, 6,
+ proto_tree_add_ether(cgmp_tree, hf_cgmp_gda, NullTVB, offset, 6,
&pd[offset]);
offset += 6;
if (!BYTES_ARE_IN_FRAME(offset, 6))
break;
- proto_tree_add_item(cgmp_tree, hf_cgmp_usa, NullTVB, offset, 6,
+ proto_tree_add_ether(cgmp_tree, hf_cgmp_usa, NullTVB, offset, 6,
&pd[offset]);
offset += 6;