summaryrefslogtreecommitdiff
path: root/packet-ripng.c
diff options
context:
space:
mode:
authorGilbert Ramirez <gram@alumni.rice.edu>2000-03-12 04:48:32 +0000
committerGilbert Ramirez <gram@alumni.rice.edu>2000-03-12 04:48:32 +0000
commitf6e92a9e939a28327eea49b5931715ba97a62970 (patch)
tree0b5f52ee7613baacc77f73697eb895592aa6a137 /packet-ripng.c
parent3d6cb57256c889b2f1ba51e89886d9bb9ea812fb (diff)
downloadwireshark-f6e92a9e939a28327eea49b5931715ba97a62970.tar.gz
Break proto_tree_add_item_format() into multiple functions:
proto_tree_add_protocol_format() proto_tree_add_uint_format() proto_tree_add_ipxnet_format() proto_tree_add_ipv4_format() proto_tree_add_ipv6_format() proto_tree_add_bytes_format() proto_tree_add_string_format() proto_tree_add_ether_format() proto_tree_add_time_format() proto_tree_add_double_format() proto_tree_add_boolean_format() If using GCC 2.x, we can check the print-format against the variable args passed in. Regardless of compiler, we can now check at run-time that the field type passed into the function corresponds to what that function expects (FT_UINT, FT_BOOLEAN, etc.) Note that proto_tree_add_protocol_format() does not require a value field, since the value of a protocol is always NULL. It's more intuitive w/o the vestigial argument. Fixed a proto_tree_add_item_format-related bug in packet-isis-hello.c Fixed a variable usage bug in packet-v120.c. (ett_* was used instead of hf_*) Checked in Guy's fix for the function declearation for proto_tree_add_text() and proto_tree_add_notext(). svn path=/trunk/; revision=1713
Diffstat (limited to 'packet-ripng.c')
-rw-r--r--packet-ripng.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/packet-ripng.c b/packet-ripng.c
index dc7b00d019..e6243c81ba 100644
--- a/packet-ripng.c
+++ b/packet-ripng.c
@@ -3,7 +3,7 @@
* (c) Copyright Jun-ichiro itojun Hagino <itojun@itojun.org>
* derived from packet-rip.c
*
- * $Id: packet-ripng.c,v 1.7 2000/03/07 05:28:39 guy Exp $
+ * $Id: packet-ripng.c,v 1.8 2000/03/12 04:47:48 gram Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -79,7 +79,7 @@ dissect_ripng(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
ti = proto_tree_add_item(tree, proto_ripng, offset, END_OF_FRAME, NULL);
ripng_tree = proto_item_add_subtree(ti, ett_ripng);
- proto_tree_add_item_format(ripng_tree, hf_ripng_cmd, offset, 1,
+ proto_tree_add_uint_format(ripng_tree, hf_ripng_cmd, offset, 1,
rip6.rip6_cmd,
"Command: %s (%u)", cmd, rip6.rip6_cmd);
proto_tree_add_item(ripng_tree, hf_ripng_version, offset + 1, 1,