diff options
author | Gilbert Ramirez <gram@alumni.rice.edu> | 2000-05-11 08:18:09 +0000 |
---|---|---|
committer | Gilbert Ramirez <gram@alumni.rice.edu> | 2000-05-11 08:18:09 +0000 |
commit | 292e38e2c61edcd14bfa30ca3c72bacda1bcbe32 (patch) | |
tree | db4edef02456a48d0f6d505166ac7d70f6c0f644 /packet-imap.c | |
parent | 162800efb308901e0c302517be01226130e39b19 (diff) | |
download | wireshark-292e38e2c61edcd14bfa30ca3c72bacda1bcbe32.tar.gz wireshark-292e38e2c61edcd14bfa30ca3c72bacda1bcbe32.tar.bz2 wireshark-292e38e2c61edcd14bfa30ca3c72bacda1bcbe32.zip |
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-imap.c')
-rw-r--r-- | packet-imap.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/packet-imap.c b/packet-imap.c index d7f1155f1b..b4957237d0 100644 --- a/packet-imap.c +++ b/packet-imap.c @@ -2,7 +2,7 @@ * Routines for imap packet dissection * Copyright 1999, Richard Sharpe <rsharpe@ns.aus.com> * - * $Id: packet-imap.c,v 1.5 2000/04/08 07:07:19 guy Exp $ + * $Id: packet-imap.c,v 1.6 2000/05/11 08:15:11 gram Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -91,23 +91,23 @@ dissect_imap(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) if (tree) { - ti = proto_tree_add_item(tree, proto_imap, offset, END_OF_FRAME, NULL); + ti = proto_tree_add_item(tree, proto_imap, NullTVB, offset, END_OF_FRAME, NULL); imap_tree = proto_item_add_subtree(ti, ett_imap); if (pi.match_port == pi.destport) { /* Request */ - proto_tree_add_item_hidden(imap_tree, hf_imap_request, offset, i1, TRUE); - proto_tree_add_text(imap_tree, offset, i1, "Request Tag: %s", rr); + proto_tree_add_item_hidden(imap_tree, hf_imap_request, NullTVB, offset, i1, TRUE); + proto_tree_add_text(imap_tree, NullTVB, offset, i1, "Request Tag: %s", rr); - proto_tree_add_text(imap_tree, offset + i1 + 1, END_OF_FRAME, "Request: %s", rd); + proto_tree_add_text(imap_tree, NullTVB, offset + i1 + 1, END_OF_FRAME, "Request: %s", rd); } else { - proto_tree_add_item_hidden(imap_tree, hf_imap_response, offset, i1, TRUE); - proto_tree_add_text(imap_tree, offset, i1, "Response Tag: %s", rr); + proto_tree_add_item_hidden(imap_tree, hf_imap_response, NullTVB, offset, i1, TRUE); + proto_tree_add_text(imap_tree, NullTVB, offset, i1, "Response Tag: %s", rr); - proto_tree_add_text(imap_tree, offset + i1 + 1, END_OF_FRAME, "Response: %s", rd); + proto_tree_add_text(imap_tree, NullTVB, offset + i1 + 1, END_OF_FRAME, "Response: %s", rd); } } |