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-vlan.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-vlan.c')
-rw-r--r-- | packet-vlan.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/packet-vlan.c b/packet-vlan.c index 8bd1b12238..7945ad06c4 100644 --- a/packet-vlan.c +++ b/packet-vlan.c @@ -1,7 +1,7 @@ /* packet-vlan.c * Routines for VLAN 802.1Q ethernet header disassembly * - * $Id: packet-vlan.c,v 1.15 2000/05/19 04:54:34 gram Exp $ + * $Id: packet-vlan.c,v 1.16 2000/05/31 05:07:53 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -90,12 +90,12 @@ dissect_vlan(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) { } if (tree) { - ti = proto_tree_add_item(tree, proto_vlan, NullTVB, offset, 4); + ti = proto_tree_add_item(tree, proto_vlan, NullTVB, offset, 4, FALSE); vlan_tree = proto_item_add_subtree(ti, ett_vlan); - proto_tree_add_item(vlan_tree, hf_vlan_priority, NullTVB, offset, 2, tci); - proto_tree_add_item(vlan_tree, hf_vlan_cfi, NullTVB, offset, 2, tci); - proto_tree_add_item(vlan_tree, hf_vlan_id, NullTVB, offset, 2, tci); + proto_tree_add_uint(vlan_tree, hf_vlan_priority, NullTVB, offset, 2, tci); + proto_tree_add_uint(vlan_tree, hf_vlan_cfi, NullTVB, offset, 2, tci); + proto_tree_add_uint(vlan_tree, hf_vlan_id, NullTVB, offset, 2, tci); } next_tvb = tvb_new_subset(pi.compat_top_tvb, offset+4, -1, -1); /* XXX - should TRY() like dissect_eth() */ |