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-yhoo.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-yhoo.c')
-rw-r--r-- | packet-yhoo.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/packet-yhoo.c b/packet-yhoo.c index 5f6361b694..ad291fa3e5 100644 --- a/packet-yhoo.c +++ b/packet-yhoo.c @@ -2,7 +2,7 @@ * Routines for yahoo messenger packet dissection * Copyright 1999, Nathan Neulinger <nneul@umr.edu> * - * $Id: packet-yhoo.c,v 1.6 2000/05/05 09:32:06 guy Exp $ + * $Id: packet-yhoo.c,v 1.7 2000/05/11 08:15:57 gram Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -143,28 +143,28 @@ dissect_yhoo(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) ); if (tree) { - ti = proto_tree_add_item(tree, proto_yhoo, offset, END_OF_FRAME, NULL); + ti = proto_tree_add_item(tree, proto_yhoo, NullTVB, offset, END_OF_FRAME, NULL); yhoo_tree = proto_item_add_subtree(ti, ett_yhoo); - proto_tree_add_item(yhoo_tree, hf_yhoo_version, + proto_tree_add_item(yhoo_tree, hf_yhoo_version, NullTVB, offset, 8, pkt->version); - proto_tree_add_item(yhoo_tree, hf_yhoo_len, + proto_tree_add_item(yhoo_tree, hf_yhoo_len, NullTVB, offset+8, 4, pletohl(pkt->len)); - proto_tree_add_item(yhoo_tree, hf_yhoo_service, + proto_tree_add_item(yhoo_tree, hf_yhoo_service, NullTVB, offset+12, 4, pletohl(pkt->service)); - proto_tree_add_item(yhoo_tree, hf_yhoo_connection_id, + proto_tree_add_item(yhoo_tree, hf_yhoo_connection_id, NullTVB, offset+16, 4, pletohl(pkt->connection_id)); - proto_tree_add_item(yhoo_tree, hf_yhoo_magic_id, + proto_tree_add_item(yhoo_tree, hf_yhoo_magic_id, NullTVB, offset+20, 4, pletohl(pkt->magic_id)); - proto_tree_add_item(yhoo_tree, hf_yhoo_unknown1, + proto_tree_add_item(yhoo_tree, hf_yhoo_unknown1, NullTVB, offset+24, 4, pletohl(pkt->unknown1)); - proto_tree_add_item(yhoo_tree, hf_yhoo_msgtype, + proto_tree_add_item(yhoo_tree, hf_yhoo_msgtype, NullTVB, offset+28, 4, pletohl(pkt->msgtype)); - proto_tree_add_item(yhoo_tree, hf_yhoo_nick1, + proto_tree_add_item(yhoo_tree, hf_yhoo_nick1, NullTVB, offset+32, 36, pkt->nick1); - proto_tree_add_item(yhoo_tree, hf_yhoo_nick2, + proto_tree_add_item(yhoo_tree, hf_yhoo_nick2, NullTVB, offset+68, 36, pkt->nick2); - proto_tree_add_item(yhoo_tree, hf_yhoo_content, + proto_tree_add_item(yhoo_tree, hf_yhoo_content, NullTVB, offset+104, END_OF_FRAME, pkt->content); } |