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-ftp.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-ftp.c')
-rw-r--r-- | packet-ftp.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/packet-ftp.c b/packet-ftp.c index 73626931ba..53399885a0 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.14 2000/04/15 02:26:17 guy Exp $ + * $Id: packet-ftp.c,v 1.15 2000/05/11 08:15:08 gram Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -108,31 +108,31 @@ dissect_ftp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) if (tree) { - ti = proto_tree_add_item(tree, proto_ftp, offset, END_OF_FRAME, NULL); + ti = proto_tree_add_item(tree, proto_ftp, NullTVB, offset, END_OF_FRAME, NULL); 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, + proto_tree_add_item_hidden(ftp_tree, hf_ftp_request, NullTVB, offset, i1, TRUE); - proto_tree_add_item_hidden(ftp_tree, hf_ftp_response, + proto_tree_add_item_hidden(ftp_tree, hf_ftp_response, NullTVB, offset, i1, FALSE); - proto_tree_add_string_format(ftp_tree, hf_ftp_request_command, + proto_tree_add_string_format(ftp_tree, hf_ftp_request_command, NullTVB, offset, i1, rr, "Request: %s", rr); - proto_tree_add_string_format(ftp_tree, hf_ftp_request_data, + proto_tree_add_string_format(ftp_tree, hf_ftp_request_data, NullTVB, offset + i1 + 1, END_OF_FRAME, rd, "Request Arg: %s", rd); } else { - proto_tree_add_item_hidden(ftp_tree, hf_ftp_request, + proto_tree_add_item_hidden(ftp_tree, hf_ftp_request, NullTVB, offset, i1, FALSE); - proto_tree_add_item_hidden(ftp_tree, hf_ftp_response, + proto_tree_add_item_hidden(ftp_tree, hf_ftp_response, NullTVB, offset, i1, TRUE); - proto_tree_add_uint_format(ftp_tree, hf_ftp_response_code, + proto_tree_add_uint_format(ftp_tree, hf_ftp_response_code, NullTVB, offset, i1, atoi(rr), "Response: %s", rr); - proto_tree_add_string_format(ftp_tree, hf_ftp_response_data, + proto_tree_add_string_format(ftp_tree, hf_ftp_response_data, NullTVB, offset + i1 + 1, END_OF_FRAME, rd, "Response Arg: %s", rd); } @@ -156,7 +156,7 @@ dissect_ftpdata(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) if (tree) { - ti = proto_tree_add_text(tree, offset, END_OF_FRAME, + ti = proto_tree_add_text(tree, NullTVB, offset, END_OF_FRAME, "FTP Data: %s", format_text(&pd[offset], pi.captured_len - offset)); |