diff options
author | Guy Harris <guy@alum.mit.edu> | 2000-05-31 05:09:07 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2000-05-31 05:09:07 +0000 |
commit | 283ce59938ad2be252a6232e40a958e177a40e1a (patch) | |
tree | b451d4a712d9b914022ba872296e70e55b8d9bc5 /packet-ftp.c | |
parent | aa553f63ecc7b9e310a05b743502c50f6dffb800 (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.
svn path=/trunk/; revision=2031
Diffstat (limited to 'packet-ftp.c')
-rw-r--r-- | packet-ftp.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/packet-ftp.c b/packet-ftp.c index 53399885a0..8f436d8db7 100644 --- a/packet-ftp.c +++ b/packet-ftp.c @@ -2,7 +2,7 @@ * Routines for ftp packet dissection * Copyright 1999, Richard Sharpe <rsharpe@ns.aus.com> * - * $Id: packet-ftp.c,v 1.15 2000/05/11 08:15:08 gram Exp $ + * $Id: packet-ftp.c,v 1.16 2000/05/31 05:07:04 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -108,14 +108,14 @@ dissect_ftp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) if (tree) { - ti = proto_tree_add_item(tree, proto_ftp, NullTVB, offset, END_OF_FRAME, NULL); + ti = proto_tree_add_item(tree, proto_ftp, NullTVB, offset, END_OF_FRAME, FALSE); ftp_tree = proto_item_add_subtree(ti, ett_ftp); if (pi.match_port == pi.destport) { /* Request */ - proto_tree_add_item_hidden(ftp_tree, hf_ftp_request, NullTVB, + proto_tree_add_boolean_hidden(ftp_tree, hf_ftp_request, NullTVB, offset, i1, TRUE); - proto_tree_add_item_hidden(ftp_tree, hf_ftp_response, NullTVB, + proto_tree_add_boolean_hidden(ftp_tree, hf_ftp_response, NullTVB, offset, i1, FALSE); proto_tree_add_string_format(ftp_tree, hf_ftp_request_command, NullTVB, offset, i1, rr, "Request: %s", rr); @@ -125,9 +125,9 @@ dissect_ftp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) } else { - proto_tree_add_item_hidden(ftp_tree, hf_ftp_request, NullTVB, + proto_tree_add_boolean_hidden(ftp_tree, hf_ftp_request, NullTVB, offset, i1, FALSE); - proto_tree_add_item_hidden(ftp_tree, hf_ftp_response, NullTVB, + proto_tree_add_boolean_hidden(ftp_tree, hf_ftp_response, NullTVB, offset, i1, TRUE); proto_tree_add_uint_format(ftp_tree, hf_ftp_response_code, NullTVB, offset, i1, |