diff options
author | Stephen Fisher <steve@stephen-fisher.com> | 2010-12-23 17:59:34 +0000 |
---|---|---|
committer | Stephen Fisher <steve@stephen-fisher.com> | 2010-12-23 17:59:34 +0000 |
commit | 4f5ccc00f8a8e6d8daecb77b61e3cb76ac79e695 (patch) | |
tree | 185bbbb284a0fb9210ab319505838271e7fe18fb /doc | |
parent | 48784e79a4b1eb92149891d19328c5e8a88ba8a7 (diff) |
Introduce new function called tvb_get_ephemeral_unicode_stringz(), which
is a unicode (UTF-16) version of tvb_get_ephemeral_stringz(). It scans
a tvbuff for a UTF-16 string and converts it to UTF-8 upon return.
svn path=/trunk/; revision=35253
Diffstat (limited to 'doc')
-rw-r--r-- | doc/README.developer | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/doc/README.developer b/doc/README.developer index 8f6c99d788..ed1c2ad921 100644 --- a/doc/README.developer +++ b/doc/README.developer @@ -1266,6 +1266,7 @@ file is opened. guint8 *tvb_get_stringz(tvbuff_t *tvb, gint offset, gint *lengthp); guint8 *tvb_get_ephemeral_stringz(tvbuff_t *tvb, gint offset, gint *lengthp); +gchar *tvb_get_ephemeral_unicode_stringz(tvbuff_t *tvb, const gint offset, gint *lengthp, const guint encoding); guint8 *tvb_get_seasonal_stringz(tvbuff_t *tvb, gint offset, gint *lengthp); Returns a null-terminated buffer, allocated with "g_malloc()", @@ -1277,11 +1278,17 @@ 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. +tvb_get_ephemeral_unicode_stringz() is a unicode (UTF-16) version of +above. This is intended for reading UTF-16 unicode strings out of a tvbuff +and returning them as a UTF-8 string for use in Wireshark. The offset and +returned length pointer are in bytes, not UTF-16 characters. + tvb_get_seasonal_stringz() returns a buffer allocated from a special heap with a lifetime of the current capture session. You do not need to free() this buffer, it will happen automatically once the a new capture or |