aboutsummaryrefslogtreecommitdiffstats
path: root/packet-vlan.c
diff options
context:
space:
mode:
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2000-05-31 05:09:07 +0000
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2000-05-31 05:09:07 +0000
commite41a093685c520e2a86e4391a3e39168b13f7d24 (patch)
treeb451d4a712d9b914022ba872296e70e55b8d9bc5 /packet-vlan.c
parentd3cf6abccf0b2b9fbcac9e89a2c3a889c4289eb1 (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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2031 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'packet-vlan.c')
-rw-r--r--packet-vlan.c10
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() */