diff options
author | Pascal Quantin <pascal.quantin@gmail.com> | 2014-01-01 14:33:19 +0000 |
---|---|---|
committer | Pascal Quantin <pascal.quantin@gmail.com> | 2014-01-01 14:33:19 +0000 |
commit | 6ebc058f473085a2fa9884fe2fd7f4a9959be915 (patch) | |
tree | f514e3d9eadd1c89ad434cc00d5d20fda6168ef1 /epan/tvbuff.h | |
parent | e504cf945bb54c3c73efbaee51acaa968179586a (diff) | |
download | wireshark-6ebc058f473085a2fa9884fe2fd7f4a9959be915.tar.gz |
Add proto_tree_add_ts_23_038_7bits_item() / tvb_get_ts_23_038_7bits_string() functions and update dissectors to use it.
Remove gsm_sms_char_7bit_unpack() / gsm_sms_chars_to_utf8() functions.
Update documentation a bit.
svn path=/trunk/; revision=54534
Diffstat (limited to 'epan/tvbuff.h')
-rw-r--r-- | epan/tvbuff.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/epan/tvbuff.h b/epan/tvbuff.h index 424469130c..97e38efb1a 100644 --- a/epan/tvbuff.h +++ b/epan/tvbuff.h @@ -499,6 +499,19 @@ WS_DLL_PUBLIC guint8 *tvb_get_string(wmem_allocator_t *scope, tvbuff_t *tvb, WS_DLL_PUBLIC guint8 *tvb_get_string_enc(wmem_allocator_t *scope, tvbuff_t *tvb, const gint offset, const gint length, const guint encoding); +/** + * Given a tvbuff, a bit offset, and a number of characters, allocate + * a buffer big enough to hold a non-null-terminated string of no_of_chars + * encoded according to 3GPP TS 23.038 7bits encoding at that offset, + * plus a trailing zero, copy the string into it, and return a pointer + * to the string. + * + * If scope is set to NULL it is the user's responsibility to g_free() + * the memory allocated by tvb_memdup(). Otherwise memory is + * automatically freed when the scope lifetime is reached. + */ +WS_DLL_PUBLIC gchar *tvb_get_ts_23_038_7bits_string(wmem_allocator_t *scope, + tvbuff_t *tvb, const gint bit_offset, gint no_of_chars); /** * Given a tvbuff and an offset, with the offset assumed to refer to |