diff options
author | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2000-05-31 05:09:07 +0000 |
---|---|---|
committer | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2000-05-31 05:09:07 +0000 |
commit | e41a093685c520e2a86e4391a3e39168b13f7d24 (patch) | |
tree | b451d4a712d9b914022ba872296e70e55b8d9bc5 /packet-yhoo.c | |
parent | d3cf6abccf0b2b9fbcac9e89a2c3a889c4289eb1 (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-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 ad291fa3e5..2299985bf8 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.7 2000/05/11 08:15:57 gram Exp $ + * $Id: packet-yhoo.c,v 1.8 2000/05/31 05:07:55 guy 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, NullTVB, offset, END_OF_FRAME, NULL); + ti = proto_tree_add_item(tree, proto_yhoo, NullTVB, offset, END_OF_FRAME, FALSE); yhoo_tree = proto_item_add_subtree(ti, ett_yhoo); - proto_tree_add_item(yhoo_tree, hf_yhoo_version, NullTVB, + proto_tree_add_string(yhoo_tree, hf_yhoo_version, NullTVB, offset, 8, pkt->version); - proto_tree_add_item(yhoo_tree, hf_yhoo_len, NullTVB, + proto_tree_add_uint(yhoo_tree, hf_yhoo_len, NullTVB, offset+8, 4, pletohl(pkt->len)); - proto_tree_add_item(yhoo_tree, hf_yhoo_service, NullTVB, + proto_tree_add_uint(yhoo_tree, hf_yhoo_service, NullTVB, offset+12, 4, pletohl(pkt->service)); - proto_tree_add_item(yhoo_tree, hf_yhoo_connection_id, NullTVB, + proto_tree_add_uint(yhoo_tree, hf_yhoo_connection_id, NullTVB, offset+16, 4, pletohl(pkt->connection_id)); - proto_tree_add_item(yhoo_tree, hf_yhoo_magic_id, NullTVB, + proto_tree_add_uint(yhoo_tree, hf_yhoo_magic_id, NullTVB, offset+20, 4, pletohl(pkt->magic_id)); - proto_tree_add_item(yhoo_tree, hf_yhoo_unknown1, NullTVB, + proto_tree_add_uint(yhoo_tree, hf_yhoo_unknown1, NullTVB, offset+24, 4, pletohl(pkt->unknown1)); - proto_tree_add_item(yhoo_tree, hf_yhoo_msgtype, NullTVB, + proto_tree_add_uint(yhoo_tree, hf_yhoo_msgtype, NullTVB, offset+28, 4, pletohl(pkt->msgtype)); - proto_tree_add_item(yhoo_tree, hf_yhoo_nick1, NullTVB, + proto_tree_add_string(yhoo_tree, hf_yhoo_nick1, NullTVB, offset+32, 36, pkt->nick1); - proto_tree_add_item(yhoo_tree, hf_yhoo_nick2, NullTVB, + proto_tree_add_string(yhoo_tree, hf_yhoo_nick2, NullTVB, offset+68, 36, pkt->nick2); - proto_tree_add_item(yhoo_tree, hf_yhoo_content, NullTVB, + proto_tree_add_string(yhoo_tree, hf_yhoo_content, NullTVB, offset+104, END_OF_FRAME, pkt->content); } |