diff options
author | Stephen Fisher <steve@stephen-fisher.com> | 2011-01-03 18:29:29 +0000 |
---|---|---|
committer | Stephen Fisher <steve@stephen-fisher.com> | 2011-01-03 18:29:29 +0000 |
commit | 55e08f007e5525350fc4ee07c92ee7faf58f1cf5 (patch) | |
tree | 14f544bc3eabeeaa4ff3f7647d4240a3fb80d4bf /epan/tvbuff.h | |
parent | 2250767f8adb5cf18a449696661ab32197075db1 (diff) | |
download | wireshark-55e08f007e5525350fc4ee07c92ee7faf58f1cf5.tar.gz |
Introduce two new functions for Unicode (UTF-16) string handling:
tvb_get_unicode_string()
tvb_get_ephemeral_unicode_string()
These function like their counterparts, tvb_get_string and
tvb_get_epemeral_string, for standard strings.
Also update comment on what the first such function,
tvb_get_ephemeral_unicode_stringz does regarding updating lengthp.
svn path=/trunk/; revision=35344
Diffstat (limited to 'epan/tvbuff.h')
-rw-r--r-- | epan/tvbuff.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/epan/tvbuff.h b/epan/tvbuff.h index 55a688bc91..62189e2228 100644 --- a/epan/tvbuff.h +++ b/epan/tvbuff.h @@ -486,16 +486,22 @@ extern gchar *tvb_format_stringzpad_wsp(tvbuff_t *tvb, const gint offset, const * MUST be g_free() by the caller in order not to leak * memory. * + * tvb_get_unicode_string() Unicode (UTF-16) version of above + * * tvb_get_ephemeral_string() returns a string that does not need to be freed, * instead it will automatically be freed once the next * packet is dissected. * + * tvb_get_ephemeral_unicode_string() Unicode (UTF-16) version of above + * * tvb_get_seasonal_string() returns a string that does not need to be freed, * instead it will automatically be freed when a new capture * or file is opened. */ extern guint8 *tvb_get_string(tvbuff_t *tvb, const gint offset, const gint length); +extern gchar *tvb_get_unicode_string(tvbuff_t *tvb, const gint offset, gint length, const guint encoding); extern guint8 *tvb_get_ephemeral_string(tvbuff_t *tvb, const gint offset, const gint length); +extern gchar *tvb_get_ephemeral_unicode_string(tvbuff_t *tvb, const gint offset, gint length, const guint encoding); extern guint8 *tvb_get_seasonal_string(tvbuff_t *tvb, const gint offset, const gint length); |