aboutsummaryrefslogtreecommitdiffstats
path: root/packet-fddi.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2000-05-31 05:09:07 +0000
committerGuy Harris <guy@alum.mit.edu>2000-05-31 05:09:07 +0000
commit283ce59938ad2be252a6232e40a958e177a40e1a (patch)
treeb451d4a712d9b914022ba872296e70e55b8d9bc5 /packet-fddi.c
parentaa553f63ecc7b9e310a05b743502c50f6dffb800 (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-fddi.c')
-rw-r--r--packet-fddi.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/packet-fddi.c b/packet-fddi.c
index c19f3573bf..09fbdcd026 100644
--- a/packet-fddi.c
+++ b/packet-fddi.c
@@ -3,7 +3,7 @@
*
* Laurent Deniel <deniel@worldnet.fr>
*
- * $Id: packet-fddi.c,v 1.35 2000/05/28 22:02:16 guy Exp $
+ * $Id: packet-fddi.c,v 1.36 2000/05/31 05:07:03 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -279,7 +279,7 @@ dissect_fddi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
ti = proto_tree_add_protocol_format(tree, proto_fddi, tvb, 0, FDDI_HEADER_SIZE,
"Fiber Distributed Data Interface, %s", fc_str);
fh_tree = proto_item_add_subtree(ti, ett_fddi);
- proto_tree_add_item(fh_tree, hf_fddi_fc, tvb, FDDI_P_FC, 1, fc);
+ proto_tree_add_uint(fh_tree, hf_fddi_fc, tvb, FDDI_P_FC, 1, fc);
}
/* Extract the destination address, possibly bit-swapping it. */
@@ -295,12 +295,12 @@ dissect_fddi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
SET_ADDRESS(&pi.dst, AT_ETHER, 6, &dst[0]);
if (fh_tree) {
- proto_tree_add_item(fh_tree, hf_fddi_dst, tvb, FDDI_P_DHOST, 6, dst);
- proto_tree_add_item_hidden(fh_tree, hf_fddi_addr, tvb, FDDI_P_DHOST, 6, dst);
+ proto_tree_add_ether(fh_tree, hf_fddi_dst, tvb, FDDI_P_DHOST, 6, dst);
+ proto_tree_add_ether_hidden(fh_tree, hf_fddi_addr, tvb, FDDI_P_DHOST, 6, dst);
/* hide some bit-swapped mac address fields in the proto_tree, just in case */
- proto_tree_add_item_hidden(fh_tree, hf_fddi_dst, tvb, FDDI_P_DHOST, 6, dst_swapped);
- proto_tree_add_item_hidden(fh_tree, hf_fddi_addr, tvb, FDDI_P_DHOST, 6, dst_swapped);
+ proto_tree_add_ether_hidden(fh_tree, hf_fddi_dst, tvb, FDDI_P_DHOST, 6, dst_swapped);
+ proto_tree_add_ether_hidden(fh_tree, hf_fddi_addr, tvb, FDDI_P_DHOST, 6, dst_swapped);
}
/* Extract the source address, possibly bit-swapping it. */
@@ -316,12 +316,12 @@ dissect_fddi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
SET_ADDRESS(&pi.src, AT_ETHER, 6, &src[0]);
if (fh_tree) {
- proto_tree_add_item(fh_tree, hf_fddi_src, tvb, FDDI_P_SHOST, 6, src);
- proto_tree_add_item_hidden(fh_tree, hf_fddi_addr, tvb, FDDI_P_SHOST, 6, src);
+ proto_tree_add_ether(fh_tree, hf_fddi_src, tvb, FDDI_P_SHOST, 6, src);
+ proto_tree_add_ether_hidden(fh_tree, hf_fddi_addr, tvb, FDDI_P_SHOST, 6, src);
/* hide some bit-swapped mac address fields in the proto_tree, just in case */
- proto_tree_add_item_hidden(fh_tree, hf_fddi_src, tvb, FDDI_P_SHOST, 6, src_swapped);
- proto_tree_add_item_hidden(fh_tree, hf_fddi_addr, tvb, FDDI_P_SHOST, 6, src_swapped);
+ proto_tree_add_ether_hidden(fh_tree, hf_fddi_src, tvb, FDDI_P_SHOST, 6, src_swapped);
+ proto_tree_add_ether_hidden(fh_tree, hf_fddi_addr, tvb, FDDI_P_SHOST, 6, src_swapped);
}
next_tvb = tvb_new_subset(tvb, FDDI_HEADER_SIZE, -1, -1);