aboutsummaryrefslogtreecommitdiffstats
path: root/packet-tacacs.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-tacacs.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-tacacs.c')
-rw-r--r--packet-tacacs.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/packet-tacacs.c b/packet-tacacs.c
index d070d6984d..a748cb19eb 100644
--- a/packet-tacacs.c
+++ b/packet-tacacs.c
@@ -1,7 +1,7 @@
/* packet-tacacs.c
* Routines for cisco tacacs/tacplus/AAA packet dissection
*
- * $Id: packet-tacacs.c,v 1.4 2000/05/11 08:15:52 gram Exp $
+ * $Id: packet-tacacs.c,v 1.5 2000/05/31 05:07:49 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -68,21 +68,21 @@ dissect_tacacs(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
if (tree)
{
- ti = proto_tree_add_item(tree, proto_tacacs, NullTVB, offset, END_OF_FRAME, NULL);
+ ti = proto_tree_add_item(tree, proto_tacacs, NullTVB, offset, END_OF_FRAME, FALSE);
tacacs_tree = proto_item_add_subtree(ti, ett_tacacs);
- proto_tree_add_item(tacacs_tree, hf_tacacs_version, NullTVB, 0, 0, "XTacacs");
+ proto_tree_add_string(tacacs_tree, hf_tacacs_version, NullTVB, 0, 0, "XTacacs");
if (pi.match_port == pi.destport)
{
- proto_tree_add_item_hidden(tacacs_tree, hf_tacacs_request, NullTVB,
+ proto_tree_add_boolean_hidden(tacacs_tree, hf_tacacs_request, NullTVB,
offset, END_OF_FRAME, TRUE);
proto_tree_add_text(tacacs_tree, NullTVB, offset,
END_OF_FRAME, "Request: <opaque data>" );
}
else
{
- proto_tree_add_item_hidden(tacacs_tree, hf_tacacs_response, NullTVB,
+ proto_tree_add_boolean_hidden(tacacs_tree, hf_tacacs_response, NullTVB,
offset, END_OF_FRAME, TRUE);
proto_tree_add_text(tacacs_tree, NullTVB, offset,
END_OF_FRAME, "Response: <opaque data>");
@@ -106,21 +106,21 @@ dissect_tacplus(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
if (tree)
{
- ti = proto_tree_add_item(tree, proto_tacacs, NullTVB, offset, END_OF_FRAME, NULL);
+ ti = proto_tree_add_item(tree, proto_tacacs, NullTVB, offset, END_OF_FRAME, FALSE);
tacacs_tree = proto_item_add_subtree(ti, ett_tacacs);
- proto_tree_add_item(tacacs_tree, hf_tacacs_version, NullTVB, 0, 0, "Tacacs+");
+ proto_tree_add_string(tacacs_tree, hf_tacacs_version, NullTVB, 0, 0, "Tacacs+");
if (pi.match_port == pi.destport)
{
- proto_tree_add_item_hidden(tacacs_tree, hf_tacacs_request, NullTVB,
+ proto_tree_add_boolean_hidden(tacacs_tree, hf_tacacs_request, NullTVB,
offset, END_OF_FRAME, TRUE);
proto_tree_add_text(tacacs_tree, NullTVB, offset,
END_OF_FRAME, "Request: <opaque data>" );
}
else
{
- proto_tree_add_item_hidden(tacacs_tree, hf_tacacs_response, NullTVB,
+ proto_tree_add_boolean_hidden(tacacs_tree, hf_tacacs_response, NullTVB,
offset, END_OF_FRAME, TRUE);
proto_tree_add_text(tacacs_tree, NullTVB, offset,
END_OF_FRAME, "Response: <opaque data>");