diff options
author | Guy Harris <guy@alum.mit.edu> | 2016-09-18 18:48:50 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2016-09-19 02:51:13 +0000 |
commit | d7fe514fc05e95e3a99fd211768de5abdc3f6486 (patch) | |
tree | 68b3e2a24ee11c7dd223089bc9a21ac9ccae302b /epan/to_str.h | |
parent | 630b64613567c268b2b08966707c81d3ec8661a5 (diff) |
Improve support for single-character fields and filter expressions.
Add an FT_CHAR type, which is like FT_UINT8 except that the value is
displayed as a C-style character constant.
Allow use of C-style character constants in filter expressions; they can
be used in comparisons with all integral types, and in "contains"
operators.
Use that type for some fields that appear (based on the way they're
displayed, or on the use of C-style character constants in their
value_string tables) to be 1-byte characters rather than 8-bit numbers.
Change-Id: I39a9f0dda0bd7f4fa02a9ca8373216206f4d7135
Reviewed-on: https://code.wireshark.org/review/17787
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/to_str.h')
-rw-r--r-- | epan/to_str.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/epan/to_str.h b/epan/to_str.h index 2377dde425..8d53ee9141 100644 --- a/epan/to_str.h +++ b/epan/to_str.h @@ -145,6 +145,17 @@ WS_DLL_PUBLIC gchar* tvb_address_to_str(wmem_allocator_t *scope, tvbuff_t *tvb, WS_DLL_PUBLIC gchar* tvb_address_var_to_str(wmem_allocator_t *scope, tvbuff_t *tvb, address_type type, const gint offset, int length); /** + * guint8_to_hex() + * + * Output guint8 hex represetation to 'out', and return pointer after last character (out + 4). + * It always output full representation (padded with 0). + * + * String is not NUL terminated by this routine. + * There needs to be at least 2 bytes in the buffer. + */ +WS_DLL_PUBLIC char *guint8_to_hex(char *out, guint8 val); + +/** * word_to_hex() * * Output guint16 hex represetation to 'out', and return pointer after last character (out + 4). |