diff options
author | Guy Harris <guy@alum.mit.edu> | 2000-05-31 05:09:07 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2000-05-31 05:09:07 +0000 |
commit | 283ce59938ad2be252a6232e40a958e177a40e1a (patch) | |
tree | b451d4a712d9b914022ba872296e70e55b8d9bc5 /packet-null.c | |
parent | aa553f63ecc7b9e310a05b743502c50f6dffb800 (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.
svn path=/trunk/; revision=2031
Diffstat (limited to 'packet-null.c')
-rw-r--r-- | packet-null.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/packet-null.c b/packet-null.c index ac910d9105..39f4253ec0 100644 --- a/packet-null.c +++ b/packet-null.c @@ -1,7 +1,7 @@ /* packet-null.c * Routines for null packet disassembly * - * $Id: packet-null.c,v 1.24 2000/05/25 07:42:24 gram Exp $ + * $Id: packet-null.c,v 1.25 2000/05/31 05:07:27 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -272,7 +272,7 @@ dissect_null(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) */ if (null_header > IEEE_802_3_MAX_LEN) { if (tree) { - ti = proto_tree_add_item(tree, proto_null, tvb, 0, 4, NULL); + ti = proto_tree_add_item(tree, proto_null, tvb, 0, 4, FALSE); fh_tree = proto_item_add_subtree(ti, ett_null); } else fh_tree = NULL; @@ -281,9 +281,9 @@ dissect_null(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) /* populate a tree in the second pane with the status of the link layer (ie none) */ if (tree) { - ti = proto_tree_add_item(tree, proto_null, tvb, 0, 4, NULL); + ti = proto_tree_add_item(tree, proto_null, tvb, 0, 4, FALSE); fh_tree = proto_item_add_subtree(ti, ett_null); - proto_tree_add_item(fh_tree, hf_null_family, tvb, 0, 4, null_header); + proto_tree_add_uint(fh_tree, hf_null_family, tvb, 0, 4, null_header); } next_tvb = tvb_new_subset(tvb, 4, -1, -1); |