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-rtsp.c | |
parent | aa553f63ecc7b9e310a05b743502c50f6dffb800 (diff) | |
download | wireshark-283ce59938ad2be252a6232e40a958e177a40e1a.tar.gz wireshark-283ce59938ad2be252a6232e40a958e177a40e1a.tar.bz2 wireshark-283ce59938ad2be252a6232e40a958e177a40e1a.zip |
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-rtsp.c')
-rw-r--r-- | packet-rtsp.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/packet-rtsp.c b/packet-rtsp.c index 1c929c32e4..f250e9e341 100644 --- a/packet-rtsp.c +++ b/packet-rtsp.c @@ -4,7 +4,7 @@ * Jason Lango <jal@netapp.com> * Liberally copied from packet-http.c, by Guy Harris <guy@alum.mit.edu> * - * $Id: packet-rtsp.c,v 1.13 2000/05/11 08:15:43 gram Exp $ + * $Id: packet-rtsp.c,v 1.14 2000/05/31 05:07:37 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -154,7 +154,7 @@ static void dissect_rtsp(const u_char *pd, int offset, frame_data *fd, rtsp_tree = NULL; if (tree) { ti = proto_tree_add_item(tree, proto_rtsp, NullTVB, offset, - END_OF_FRAME, NULL); + END_OF_FRAME, FALSE); rtsp_tree = proto_item_add_subtree(ti, ett_rtsp); } @@ -318,7 +318,7 @@ process_rtsp_request_or_reply(const u_char *data, int offset, int linelen, status_start = status; while (status < lineend && isdigit(*status)) status_i = status_i * 10 + *status++ - '0'; - proto_tree_add_item_hidden(tree, hf_rtsp_status, NullTVB, + proto_tree_add_uint_hidden(tree, hf_rtsp_status, NullTVB, offset + (status_start - data), status - status_start, status_i); } @@ -340,7 +340,7 @@ process_rtsp_request_or_reply(const u_char *data, int offset, int linelen, u_char *tmp_url; /* method name */ - proto_tree_add_item_hidden(tree, hf_rtsp_method, NullTVB, offset, + proto_tree_add_string_hidden(tree, hf_rtsp_method, NullTVB, offset, strlen(rtsp_methods[ii]), rtsp_methods[ii]); /* URL */ @@ -355,7 +355,7 @@ process_rtsp_request_or_reply(const u_char *data, int offset, int linelen, tmp_url = g_malloc(url - url_start + 1); memcpy(tmp_url, url_start, url - url_start); tmp_url[url - url_start] = 0; - proto_tree_add_item_hidden(tree, hf_rtsp_url, NullTVB, + proto_tree_add_string_hidden(tree, hf_rtsp_url, NullTVB, offset + (url_start - data), url - url_start, tmp_url); g_free(tmp_url); } |