aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2005-08-10 14:25:59 +0000
committerRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2005-08-10 14:25:59 +0000
commit9599cf9e3b88e57f22f149c2db2956b779ba864f (patch)
treebd6dc25e40e463e67fe7b295e144b027909a62cc /doc
parentefa1f430059f40d054d9f85fb0869583ffb76d2b (diff)
add new function tvb_get_ephemeral_stringz()
svn path=/trunk/; revision=15273
Diffstat (limited to 'doc')
-rw-r--r--doc/README.developer9
1 files changed, 9 insertions, 0 deletions
diff --git a/doc/README.developer b/doc/README.developer
index d3a5258e9d..b1f1fcf61f 100644
--- a/doc/README.developer
+++ b/doc/README.developer
@@ -906,6 +906,7 @@ dissected.
guint8 *tvb_get_stringz(tvbuff_t *tvb, gint offset, gint *lengthp);
+guint8 *tvb_get_ephemeral_stringz(tvbuff_t *tvb, gint offset, gint *lengthp);
Returns a null-terminated buffer, allocated with "g_malloc()",
containing data from the specified tvbuff, starting with at the
@@ -913,6 +914,14 @@ specified offset, and containing all characters from the tvbuff up to
and including a terminating null character in the tvbuff. "*lengthp"
will be set to the length of the string, including the terminating null.
+tvb_get_stringz() returns a buffer allocated by g_malloc() so you must
+g_free() it when you are finished with the string. Failure to g_free() this
+buffer will lead to memory leaks.
+tvb_get_ephemeral_stringz() returns a buffer allocated from a special heap
+with a lifetime until the next packet is dissected. You do not need to
+free() this buffer, it will happen automatically once the next packet is
+dissected.
+
guint8 *tvb_fake_unicode(tvbuff_t*, gint offset, gint length);
guint8 *tvb_get_ephemeral_faked_unicode(tvbuff_t*, gint offset, gint length);