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-lapd.c | |
parent | aa553f63ecc7b9e310a05b743502c50f6dffb800 (diff) | |
download | wireshark-283ce59938ad2be252a6232e40a958e177a40e1a.tar.gz wireshark-283ce59938ad2be252a6232e40a958e177a40e1a.tar.bz2 wireshark-283ce59938ad2be252a6232e40a958e177a40e1a.zip |
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-lapd.c')
-rw-r--r-- | packet-lapd.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/packet-lapd.c b/packet-lapd.c index 75959b5c39..9808d7f57c 100644 --- a/packet-lapd.c +++ b/packet-lapd.c @@ -2,7 +2,7 @@ * Routines for LAPD frame disassembly * Gilbert Ramirez <gram@xiexie.org> * - * $Id: packet-lapd.c,v 1.10 2000/05/31 03:58:54 gram Exp $ + * $Id: packet-lapd.c,v 1.11 2000/05/31 05:07:16 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -121,17 +121,17 @@ dissect_lapd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) if (tree) { - ti = proto_tree_add_item(tree, proto_lapd, tvb, 0, 3, NULL); + ti = proto_tree_add_item(tree, proto_lapd, tvb, 0, 3, FALSE); lapd_tree = proto_item_add_subtree(ti, ett_lapd); - ti = proto_tree_add_item(lapd_tree, hf_lapd_address, tvb, 0, 2, address); + ti = proto_tree_add_uint(lapd_tree, hf_lapd_address, tvb, 0, 2, address); addr_tree = proto_item_add_subtree(ti, ett_lapd_address); - proto_tree_add_item(addr_tree, hf_lapd_sapi,tvb, 0, 1, address); - proto_tree_add_item(addr_tree, hf_lapd_cr, tvb, 0, 1, address); - proto_tree_add_item(addr_tree, hf_lapd_ea1, tvb, 0, 1, address); - proto_tree_add_item(addr_tree, hf_lapd_tei, tvb, 1, 1, address); - proto_tree_add_item(addr_tree, hf_lapd_ea2, tvb, 1, 1, address); + proto_tree_add_uint(addr_tree, hf_lapd_sapi,tvb, 0, 1, address); + proto_tree_add_uint(addr_tree, hf_lapd_cr, tvb, 0, 1, address); + proto_tree_add_uint(addr_tree, hf_lapd_ea1, tvb, 0, 1, address); + proto_tree_add_uint(addr_tree, hf_lapd_tei, tvb, 1, 1, address); + proto_tree_add_uint(addr_tree, hf_lapd_ea2, tvb, 1, 1, address); } else { lapd_tree = NULL; |