aboutsummaryrefslogtreecommitdiffstats
path: root/doc/README.developer
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2001-08-29 00:51:10 +0000
committerGuy Harris <guy@alum.mit.edu>2001-08-29 00:51:10 +0000
commitfbe8da33f5813f07f94594c0e285c843c28d3618 (patch)
treec2d7f081d77aba8081c231a31755adf32170df26 /doc/README.developer
parentaa4cd01b9bcd64fc3785668692f2be0f19f69bb8 (diff)
Add a "proto_item_append_text()" routine, which is like
"proto_item_set_text()" except that it appends the result of the formatting to the item's current text, rather than replacing the item's current text. Use it in the DNS dissector. svn path=/trunk/; revision=3880
Diffstat (limited to 'doc/README.developer')
-rw-r--r--doc/README.developer22
1 files changed, 15 insertions, 7 deletions
diff --git a/doc/README.developer b/doc/README.developer
index ac97c56962..5f4028c0d7 100644
--- a/doc/README.developer
+++ b/doc/README.developer
@@ -1,4 +1,4 @@
-$Id: README.developer,v 1.33 2001/08/28 08:28:16 guy Exp $
+$Id: README.developer,v 1.34 2001/08/29 00:51:07 guy Exp $
This file is a HOWTO for Ethereal developers. It describes how to start coding
a Ethereal protocol dissector and the use some of the important functions and
@@ -85,7 +85,7 @@ code inside
is needed only if you are using the "snprintf()" function.
-The "$Id: README.developer,v 1.33 2001/08/28 08:28:16 guy Exp $"
+The "$Id: README.developer,v 1.34 2001/08/29 00:51:07 guy Exp $"
in the comment will be updated by CVS when the file is
checked in; it will allow the RCS "ident" command to report which
version of the file is currently checked out.
@@ -95,7 +95,7 @@ version of the file is currently checked out.
* Routines for PROTONAME dissection
* Copyright 2000, YOUR_NAME <YOUR_EMAIL_ADDRESS>
*
- * $Id: README.developer,v 1.33 2001/08/28 08:28:16 guy Exp $
+ * $Id: README.developer,v 1.34 2001/08/29 00:51:07 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -1119,15 +1119,23 @@ themselves - the items in the subtree are the ones with values.
For a subtree, the label on the subtree might reflect some of the items
in the subtree. This means the label can't be set until at least some
of the items in the subtree have been dissected. To do this, use
-'proto_item_set_text()':
+'proto_item_set_text()' or 'proto_item_append_text()':
void
proto_tree_set_text(proto_item *ti, ...);
-which takes as an argument the value returned by
+ void
+ proto_tree_append_text(proto_item *ti, ...);
+
+'proto_item_set_text()' takes as an argument the value returned by
'proto_tree_add_text()', a 'printf'-style format string, and a set of
-arguments corresponding to '%' format items in that string. For
-example, early in the dissection, one might do:
+arguments corresponding to '%' format items in that string, and replaces
+the text for the item created by 'proto_tree_add_text()' with the result
+of applying the arguments to the format string.
+'proto_item_append_text()' is similar, but it appends to the text for
+the item the result of applying the arguments to the format string.
+
+For example, early in the dissection, one might do:
ti = proto_tree_add_text(tree, offset, length, <label>);