summaryrefslogtreecommitdiff
path: root/packet-bootparams.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2000-05-31 05:09:07 +0000
committerGuy Harris <guy@alum.mit.edu>2000-05-31 05:09:07 +0000
commit283ce59938ad2be252a6232e40a958e177a40e1a (patch)
treeb451d4a712d9b914022ba872296e70e55b8d9bc5 /packet-bootparams.c
parentaa553f63ecc7b9e310a05b743502c50f6dffb800 (diff)
downloadwireshark-283ce59938ad2be252a6232e40a958e177a40e1a.tar.gz
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. svn path=/trunk/; revision=2031
Diffstat (limited to 'packet-bootparams.c')
-rw-r--r--packet-bootparams.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/packet-bootparams.c b/packet-bootparams.c
index d644f05cad..7ae6c8f33b 100644
--- a/packet-bootparams.c
+++ b/packet-bootparams.c
@@ -1,7 +1,7 @@
/* packet-bootparams.c
* Routines for bootparams dissection
*
- * $Id: packet-bootparams.c,v 1.10 2000/05/11 08:15:03 gram Exp $
+ * $Id: packet-bootparams.c,v 1.11 2000/05/31 05:06:55 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -61,10 +61,11 @@ int dissect_bp_address(const u_char *pd, int offset, frame_data *fd,
/* get the address type */
if ( !BYTES_ARE_IN_FRAME(offset, 1)) return offset;
type = pntohl(&pd[offset]); /* type of address */
-#if 0
+/*
+ZZZZZZZZZZZZZZZZZZZ Check type:
proto_tree_add_item(tree, hf_bootparams_addresstype, NullTVB,
offset, 4, type);
-#endif
+*/
offset += 4;
if ( type != 1 ) /* only know how to handle this type of address */
@@ -76,7 +77,7 @@ int dissect_bp_address(const u_char *pd, int offset, frame_data *fd,
if ( ! BYTES_ARE_IN_FRAME(offset, 16)) return offset;
ipaddr = (pd[offset+3]<<24) + (pd[offset+7]<<16) +
(pd[offset+11]<<8) + (pd[offset+15]);
- proto_tree_add_item(tree, hfindex, NullTVB,
+ proto_tree_add_ipv4(tree, hfindex, NullTVB,
offset, 16, ntohl(ipaddr));
offset += 16;