aboutsummaryrefslogtreecommitdiffstats
path: root/packet-irc.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-irc.c
parentaa553f63ecc7b9e310a05b743502c50f6dffb800 (diff)
downloadwireshark-283ce59938ad2be252a6232e40a958e177a40e1a.tar.gz
wireshark-283ce59938ad2be252a6232e40a958e177a40e1a.tar.bz2
wireshark-283ce59938ad2be252a6232e40a958e177a40e1a.zip
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-irc.c')
-rw-r--r--packet-irc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/packet-irc.c b/packet-irc.c
index e32454954d..4236e24d1b 100644
--- a/packet-irc.c
+++ b/packet-irc.c
@@ -1,7 +1,7 @@
/* packet-irc.c
* Routines for MSX irc packet dissection
*
- * $Id: packet-irc.c,v 1.5 2000/05/11 08:15:15 gram Exp $
+ * $Id: packet-irc.c,v 1.6 2000/05/31 05:07:11 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -55,7 +55,7 @@ static gint ett_irc = -1;
static void
dissect_irc_request(proto_tree *tree, char *line, int offset, int len)
{
- proto_tree_add_item_hidden(tree, hf_irc_request, NullTVB,
+ proto_tree_add_boolean_hidden(tree, hf_irc_request, NullTVB,
offset, len, TRUE);
proto_tree_add_text(tree, NullTVB, offset,
len, "Request Line: %s", line);
@@ -64,7 +64,7 @@ dissect_irc_request(proto_tree *tree, char *line, int offset, int len)
static void
dissect_irc_response(proto_tree *tree, char *line, int offset, int len)
{
- proto_tree_add_item_hidden(tree, hf_irc_response, NullTVB,
+ proto_tree_add_boolean_hidden(tree, hf_irc_response, NullTVB,
offset, len, TRUE);
proto_tree_add_text(tree, NullTVB, offset,
len, "Response Line: %s", line);
@@ -89,7 +89,7 @@ dissect_irc(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
if (tree)
{
- ti = proto_tree_add_item(tree, proto_irc, NullTVB, offset, END_OF_FRAME, NULL);
+ ti = proto_tree_add_item(tree, proto_irc, NullTVB, offset, END_OF_FRAME, FALSE);
irc_tree = proto_item_add_subtree(ti, ett_irc);
tmpline = (char *)g_malloc( pi.captured_len );