summaryrefslogtreecommitdiff
path: root/packet-irc.c
diff options
context:
space:
mode:
authorGilbert Ramirez <gram@alumni.rice.edu>2000-05-11 08:18:09 +0000
committerGilbert Ramirez <gram@alumni.rice.edu>2000-05-11 08:18:09 +0000
commit292e38e2c61edcd14bfa30ca3c72bacda1bcbe32 (patch)
treedb4edef02456a48d0f6d505166ac7d70f6c0f644 /packet-irc.c
parent162800efb308901e0c302517be01226130e39b19 (diff)
downloadwireshark-292e38e2c61edcd14bfa30ca3c72bacda1bcbe32.tar.gz
Add tvbuff class.
Add exceptions routines. Convert proto_tree_add_*() routines to require tvbuff_t* argument. Convert all dissectors to pass NULL argument ("NullTVB" macro == NULL) as the tvbuff_t* argument to proto_tree_add_*() routines. dissect_packet() creates a tvbuff_t, wraps the next dissect call in a TRY block, will print "Short Frame" on the proto_tree if a BoundsError exception is caught. The FDDI dissector is converted to use tvbuff's. svn path=/trunk/; revision=1939
Diffstat (limited to 'packet-irc.c')
-rw-r--r--packet-irc.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/packet-irc.c b/packet-irc.c
index e0c0bc9b13..e32454954d 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.4 2000/04/08 07:07:22 guy Exp $
+ * $Id: packet-irc.c,v 1.5 2000/05/11 08:15:15 gram Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -55,18 +55,18 @@ 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,
+ proto_tree_add_item_hidden(tree, hf_irc_request, NullTVB,
offset, len, TRUE);
- proto_tree_add_text(tree, offset,
+ proto_tree_add_text(tree, NullTVB, offset,
len, "Request Line: %s", line);
}
static void
dissect_irc_response(proto_tree *tree, char *line, int offset, int len)
{
- proto_tree_add_item_hidden(tree, hf_irc_response,
+ proto_tree_add_item_hidden(tree, hf_irc_response, NullTVB,
offset, len, TRUE);
- proto_tree_add_text(tree, offset,
+ 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, offset, END_OF_FRAME, NULL);
+ ti = proto_tree_add_item(tree, proto_irc, NullTVB, offset, END_OF_FRAME, NULL);
irc_tree = proto_item_add_subtree(ti, ett_irc);
tmpline = (char *)g_malloc( pi.captured_len );