From 283ce59938ad2be252a6232e40a958e177a40e1a Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Wed, 31 May 2000 05:09:07 +0000 Subject: 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 --- packet-lapd.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'packet-lapd.c') 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 * - * $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 @@ -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; -- cgit v1.2.3