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-pop.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-pop.c')
-rw-r--r-- | packet-pop.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/packet-pop.c b/packet-pop.c index ff93456b7c..47b4a303c8 100644 --- a/packet-pop.c +++ b/packet-pop.c @@ -2,7 +2,7 @@ * Routines for pop packet dissection * Copyright 1999, Richard Sharpe <rsharpe@ns.aus.com> * - * $Id: packet-pop.c,v 1.14 2000/05/11 08:15:33 gram Exp $ + * $Id: packet-pop.c,v 1.15 2000/05/31 05:07:29 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -101,11 +101,11 @@ dissect_pop(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) if (tree) { - ti = proto_tree_add_item(tree, proto_pop, NullTVB, offset, END_OF_FRAME, NULL); + ti = proto_tree_add_item(tree, proto_pop, NullTVB, offset, END_OF_FRAME, FALSE); pop_tree = proto_item_add_subtree(ti, ett_pop); if (pi.match_port == pi.destport) { /* Request */ - proto_tree_add_item_hidden(pop_tree, hf_pop_request, NullTVB, offset, i1, TRUE); + proto_tree_add_boolean_hidden(pop_tree, hf_pop_request, NullTVB, offset, i1, TRUE); proto_tree_add_text(pop_tree, NullTVB, offset, i1, "Request: %s", rr); if (strlen(rd) != 0) @@ -113,7 +113,7 @@ dissect_pop(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) } else { - proto_tree_add_item_hidden(pop_tree, hf_pop_response, NullTVB, offset, i1, TRUE); + proto_tree_add_boolean_hidden(pop_tree, hf_pop_response, NullTVB, offset, i1, TRUE); if (is_continuation(pd+offset)) dissect_data(pd, offset, fd, pop_tree); |