diff options
Diffstat (limited to 'epan/tvbuff.h')
-rw-r--r-- | epan/tvbuff.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/epan/tvbuff.h b/epan/tvbuff.h index 233608a285..22ffa05114 100644 --- a/epan/tvbuff.h +++ b/epan/tvbuff.h @@ -889,6 +889,22 @@ WS_DLL_PUBLIC const gchar *tvb_bcd_dig_to_wmem_packet_str(tvbuff_t *tvb, const gint offset, const gint len, const dgt_set_t *dgt, gboolean skip_first); +/** + * Given a wmem scope, a tvbuff, an offset, a length, an input digit + * set, and a boolean indicator, fetch BCD-encoded digits from a + * tvbuff starting from either the low or high half byte of the + * first byte depending on the boolean indicator (TRUE means "start + * with the high half byte, ignoring the low half byte", and FALSE + * means "start with the low half byte and proceed to the high half + * byte), formating the digits into characters according to the + * input digit set, and return a pointer to a UTF-8 string, allocated + * using the wmem scope. A high-order nibble of 0xf is considered a + * 'filler' and will end the conversion. + */ +WS_DLL_PUBLIC gchar *tvb_get_bcd_string(wmem_allocator_t *scope, tvbuff_t *tvb, + const gint offset, gint len, const dgt_set_t *dgt, + gboolean skip_first); + /** Locate a sub-tvbuff within another tvbuff, starting at position * 'haystack_offset'. Returns the index of the beginning of 'needle' within * 'haystack', or -1 if 'needle' is not found. The index is relative |