| Wireshark 4.7.0 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
Classes | Macros | Typedefs | Functions
tvbuff.h File Reference
`#include <ws_symbol_export.h>`
`#include <ws_attributes.h>`
`#include <epan/guid-utils.h>`
`#include <wsutil/inet_addr.h>`
`#include <wsutil/nstime.h>`
`#include "wsutil/ws_mempbrk.h"`

Go to the source code of this file.

## Classes
struct | dgt_set_t
| Digit mapping table for BCD decoding. More...

## Macros
#define | tvb_get_h_uint16 tvb_get_letohs
| Fetch a 16-bit value in host byte order.
#define | tvb_get_h_uint32 tvb_get_letohl
| Fetch a 32-bit value in host byte order.

## Typedefs
typedef struct tvbuff | tvbuff_t
typedef void(* | tvbuff_free_cb_t) (void *)
typedef struct dgt_set_t | dgt_set_t
| Digit mapping table for BCD decoding.

## Functions
WS_DLL_PUBLIC tvbuff_t * | tvb_new_octet_aligned (tvbuff_t *tvb, uint32_t bit_offset, uint32_t no_of_bits)
| Extracts a specified number of bits starting at a given bit offset, aligning the result to octet boundaries.
WS_DLL_PUBLIC tvbuff_t * | tvb_new_octet_right_aligned (tvbuff_t *tvb, uint32_t bit_offset, uint32_t no_of_bits)
| Extracts a specified number of bits starting at a given bit offset, with bits counted from least significant bit (LSB = 0) to most significant bit (MSB = 7) within each octet.
WS_DLL_PUBLIC tvbuff_t * | tvb_new_chain (tvbuff_t *parent, tvbuff_t *backing)
| Create a new chained tvbuff from a parent and backing buffer.
WS_DLL_PUBLIC tvbuff_t * | tvb_clone (tvbuff_t *tvb)
| Creates a full clone of the given tvbuff.
WS_DLL_PUBLIC tvbuff_t * | tvb_clone_offset_len (tvbuff_t *tvb, unsigned offset, unsigned len)
| Clones a portion of the given tvbuff starting at a specific offset and length.
WS_DLL_PUBLIC void | tvb_free (tvbuff_t *tvb)
| Free a tvbuff_t and all tvbuffs chained from it.
WS_DLL_PUBLIC void | tvb_free_chain (tvbuff_t *tvb)
| Free the tvbuff_t and all tvbuffs chained from it.
WS_DLL_PUBLIC void | tvb_set_free_cb (tvbuff_t *tvb, const tvbuff_free_cb_t func)
| Set a callback function to be called when a tvbuff is actually freed.
WS_DLL_PUBLIC void | tvb_set_child_real_data_tvbuff (tvbuff_t *parent, tvbuff_t *child)
| Attach a "real" tvbuff to a parent tvbuff.
WS_DLL_PUBLIC tvbuff_t * | tvb_new_child_real_data (tvbuff_t *parent, const uint8_t *data, const unsigned length, const unsigned reported_length)
| Create a new child tvbuff with real data.
WS_DLL_PUBLIC tvbuff_t * | tvb_new_real_data (const uint8_t *data, const unsigned length, const unsigned reported_length)
| Create a tvbuff backed by existing data.
WS_DLL_PUBLIC tvbuff_t * | tvb_new_subset_length_caplen (tvbuff_t *backing, const unsigned backing_offset, const unsigned backing_length, const unsigned reported_length)
| Create a subset tvbuff with an explicitly limited captured length.
WS_DLL_PUBLIC tvbuff_t * | tvb_new_subset_length (tvbuff_t *backing, const unsigned backing_offset, const unsigned reported_length)
| Create a subset tvbuff with captured length fitting within backing and reported lengths.
WS_DLL_PUBLIC tvbuff_t * | tvb_new_subset_remaining (tvbuff_t *backing, const unsigned backing_offset)
| Create a subset tvbuff containing all the data starting at an offset into a backing tvbuff.
WS_DLL_PUBLIC void | tvb_composite_append (tvbuff_t *tvb, tvbuff_t *member)
| Append to the list of tvbuffs that make up this composite tvbuff.
WS_DLL_PUBLIC void | tvb_composite_prepend (tvbuff_t *tvb, tvbuff_t *member)
| Prepend to the list of tvbuffs that make up this composite tvbuff.
WS_DLL_PUBLIC tvbuff_t * | tvb_new_composite (void)
| Create an empty composite tvbuff.
WS_DLL_PUBLIC void | tvb_composite_finalize (tvbuff_t *tvb)
| Mark a composite tvbuff as finalized.
WS_DLL_PUBLIC unsigned | tvb_captured_length (const tvbuff_t *tvb)
| Get the amount of captured data in the buffer.
WS_DLL_PUBLIC unsigned | tvb_captured_length_remaining (const tvbuff_t *tvb, const unsigned offset)
| Computes bytes to end of buffer from the given offset.
WS_DLL_PUBLIC unsigned | tvb_ensure_captured_length_remaining (const tvbuff_t *tvb, const unsigned offset)
| Same as tvb_captured_length_remaining, but throws an exception if the offset is out of bounds.
WS_DLL_PUBLIC bool | tvb_bytes_exist (const tvbuff_t *tvb, const unsigned offset, const int length)
| Check that the specified bytes exist in the tvbuff without throwing an exception.
WS_DLL_PUBLIC void | tvb_ensure_bytes_exist64 (const tvbuff_t *tvb, const unsigned offset, const uint64_t length)
| Checks that the bytes referred to by 'offset' and 'length' actually exist in the buffer.
WS_DLL_PUBLIC void | tvb_ensure_bytes_exist (const tvbuff_t *tvb, const unsigned offset, const int length)
| Checks that the bytes referred to by 'offset' and 'length' actually exist in the buffer.
WS_DLL_PUBLIC bool | tvb_offset_exists (const tvbuff_t *tvb, const unsigned offset)
| Checks (without throwing an exception) whether the offset exists in the buffer.
WS_DLL_PUBLIC unsigned | tvb_reported_length (const tvbuff_t *tvb)
| Get reported length of buffer.
WS_DLL_PUBLIC unsigned | tvb_reported_length_remaining (const tvbuff_t *tvb, const unsigned offset)
| Computes bytes of reported packet data from the given offset to the end of buffer.
WS_DLL_PUBLIC unsigned | tvb_ensure_reported_length_remaining (const tvbuff_t *tvb, const unsigned offset)
| Same as tvb_reported_length_remaining but throws an exception if the offset is out of bounds.
WS_DLL_PUBLIC void | tvb_set_reported_length (tvbuff_t *tvb, const unsigned reported_length)
| Set a tvbuff's reported_length to a given value.
WS_DLL_PUBLIC void | tvb_fix_reported_length (tvbuff_t *tvb)
| Repair a tvbuff when captured length exceeds reported length.
WS_DLL_PUBLIC unsigned | tvb_offset_from_real_beginning (const tvbuff_t *tvb)
| Returns the offset from the beginning of the real (backing) buffer.
WS_DLL_PUBLIC unsigned | tvb_raw_offset (tvbuff_t *tvb)
| Returns the offset from the first byte of real data.
WS_DLL_PUBLIC void | tvb_set_fragment (tvbuff_t *tvb)
| Set the "this is a fragment" flag on a tvbuff.
WS_DLL_PUBLIC struct tvbuff * | tvb_get_ds_tvb (tvbuff_t *tvb)
| Retrieve the data source tvbuff from a given tvbuff.
WS_DLL_PUBLIC uint8_t | tvb_get_uint8 (tvbuff_t *tvb, const unsigned offset)
| Retrieve an 8-bit unsigned value from a tvbuff at the specified offset.
WS_DLL_PUBLIC int8_t | tvb_get_int8 (tvbuff_t *tvb, const unsigned offset)
| Retrieve an 8-bit signed value from a tvbuff at the specified offset.
WS_DLL_PUBLIC uint16_t | tvb_get_ntohs (tvbuff_t *tvb, const unsigned offset)
| Retrieve a 16-bit unsigned value in network byte order.
WS_DLL_PUBLIC int16_t | tvb_get_ntohis (tvbuff_t *tvb, const unsigned offset)
| Retrieve a 16-bit signed value in network byte order.
WS_DLL_PUBLIC uint32_t | tvb_get_ntoh24 (tvbuff_t *tvb, const unsigned offset)
| Retrieve a 24-bit unsigned value in network byte order.
WS_DLL_PUBLIC int32_t | tvb_get_ntohi24 (tvbuff_t *tvb, const unsigned offset)
| Retrieve a 24-bit signed value in network byte order.
WS_DLL_PUBLIC uint32_t | tvb_get_ntohl (tvbuff_t *tvb, const unsigned offset)
| Retrieve a 32-bit unsigned value in network byte order.
WS_DLL_PUBLIC int32_t | tvb_get_ntohil (tvbuff_t *tvb, const unsigned offset)
| Retrieve a 32-bit signed value in network byte order.
WS_DLL_PUBLIC uint64_t | tvb_get_ntoh40 (tvbuff_t *tvb, const unsigned offset)
| Retrieve a 40-bit unsigned value in network byte order.
WS_DLL_PUBLIC int64_t | tvb_get_ntohi40 (tvbuff_t *tvb, const unsigned offset)
| Retrieve a 40-bit signed value in network byte order.
WS_DLL_PUBLIC uint64_t | tvb_get_ntoh48 (tvbuff_t *tvb, const unsigned offset)
| Retrieve a 48-bit unsigned value in network byte order.
WS_DLL_PUBLIC int64_t | tvb_get_ntohi48 (tvbuff_t *tvb, const unsigned offset)
| Retrieve a 48-bit signed value in network byte order.
WS_DLL_PUBLIC uint64_t | tvb_get_ntoh56 (tvbuff_t *tvb, const unsigned offset)
| Retrieve a 56-bit unsigned value in network byte order.
WS_DLL_PUBLIC int64_t | tvb_get_ntohi56 (tvbuff_t *tvb, const unsigned offset)
| Retrieve a 56-bit signed value in network byte order.
WS_DLL_PUBLIC uint64_t | tvb_get_ntoh64 (tvbuff_t *tvb, const unsigned offset)
| Retrieve a 64-bit unsigned value in network byte order.
WS_DLL_PUBLIC int64_t | tvb_get_ntohi64 (tvbuff_t *tvb, const unsigned offset)
| Retrieve a 64-bit signed value in network byte order.
WS_DLL_PUBLIC float | tvb_get_ntohieee_float (tvbuff_t *tvb, const unsigned offset)
| Retrieve a 32-bit IEEE float in network byte order.
WS_DLL_PUBLIC double | tvb_get_ntohieee_double (tvbuff_t *tvb, const unsigned offset)
| Retrieve a 64-bit IEEE double in network byte order.
WS_DLL_PUBLIC uint16_t | tvb_get_letohs (tvbuff_t *tvb, const unsigned offset)
| Retrieve a 16-bit unsigned value in little-endian byte order.
WS_DLL_PUBLIC int16_t | tvb_get_letohis (tvbuff_t *tvb, const unsigned offset)
| Retrieve a 16-bit signed value in little-endian byte order.
WS_DLL_PUBLIC uint32_t | tvb_get_letoh24 (tvbuff_t *tvb, const unsigned offset)
| Retrieve a 24-bit unsigned value in little-endian byte order.
WS_DLL_PUBLIC int32_t | tvb_get_letohi24 (tvbuff_t *tvb, const unsigned offset)
| Retrieve a 24-bit signed value in little-endian byte order.
WS_DLL_PUBLIC uint32_t | tvb_get_letohl (tvbuff_t *tvb, const unsigned offset)
| Retrieve a 32-bit unsigned value in little-endian byte order.
WS_DLL_PUBLIC int32_t | tvb_get_letohil (tvbuff_t *tvb, const unsigned offset)
| Retrieve a 32-bit signed value in little-endian byte order.
WS_DLL_PUBLIC uint64_t | tvb_get_letoh40 (tvbuff_t *tvb, const unsigned offset)
| Retrieve a 40-bit unsigned value in little-endian byte order.
WS_DLL_PUBLIC int64_t | tvb_get_letohi40 (tvbuff_t *tvb, const unsigned offset)
| Retrieve a 40-bit signed value in little-endian byte order.
WS_DLL_PUBLIC uint64_t | tvb_get_letoh48 (tvbuff_t *tvb, const unsigned offset)
| Retrieve a 48-bit unsigned value in little-endian byte order.
WS_DLL_PUBLIC int64_t | tvb_get_letohi48 (tvbuff_t *tvb, const unsigned offset)
| Retrieve a 48-bit signed value in little-endian byte order.
WS_DLL_PUBLIC uint64_t | tvb_get_letoh56 (tvbuff_t *tvb, const unsigned offset)
| Retrieve a 56-bit unsigned value in little-endian byte order.
WS_DLL_PUBLIC int64_t | tvb_get_letohi56 (tvbuff_t *tvb, const unsigned offset)
| Retrieve a 56-bit signed value in little-endian byte order.
WS_DLL_PUBLIC uint64_t | tvb_get_letoh64 (tvbuff_t *tvb, const unsigned offset)
| Retrieve a 64-bit unsigned value in little-endian byte order.
WS_DLL_PUBLIC int64_t | tvb_get_letohi64 (tvbuff_t *tvb, const unsigned offset)
| Retrieve a 64-bit signed value in little-endian byte order.
WS_DLL_PUBLIC float | tvb_get_letohieee_float (tvbuff_t *tvb, const unsigned offset)
| Retrieve a 32-bit IEEE float in little-endian byte order.
WS_DLL_PUBLIC double | tvb_get_letohieee_double (tvbuff_t *tvb, const unsigned offset)
| Retrieve a 64-bit IEEE double in little-endian byte order.
WS_DLL_PUBLIC uint16_t | tvb_get_uint16 (tvbuff_t *tvb, const unsigned offset, const unsigned encoding)
| Retrieve a 16-bit unsigned value from a tvbuff using the specified encoding.
WS_DLL_PUBLIC int16_t | tvb_get_int16 (tvbuff_t *tvb, const unsigned offset, const unsigned encoding)
| Retrieve a 16-bit signed value from a tvbuff using the specified encoding.
WS_DLL_PUBLIC uint32_t | tvb_get_uint24 (tvbuff_t *tvb, const unsigned offset, const unsigned encoding)
| Retrieve a 24-bit unsigned value from a tvbuff using the specified encoding.
WS_DLL_PUBLIC int32_t | tvb_get_int24 (tvbuff_t *tvb, const unsigned offset, const unsigned encoding)
| Retrieve a 24-bit signed value from a tvbuff using the specified encoding.
WS_DLL_PUBLIC uint32_t | tvb_get_uint32 (tvbuff_t *tvb, const unsigned offset, const unsigned encoding)
| Retrieve a 32-bit unsigned value from a tvbuff using the specified encoding.
WS_DLL_PUBLIC int32_t | tvb_get_int32 (tvbuff_t *tvb, const unsigned offset, const unsigned encoding)
| Retrieve a 32-bit signed value from a tvbuff using the specified encoding.
WS_DLL_PUBLIC uint64_t | tvb_get_uint40 (tvbuff_t *tvb, const unsigned offset, const unsigned encoding)
| Retrieve a 40-bit unsigned value from a tvbuff using the specified encoding.
WS_DLL_PUBLIC int64_t | tvb_get_int40 (tvbuff_t *tvb, const unsigned offset, const unsigned encoding)
| Retrieve a 40-bit signed value from a tvbuff using the specified encoding.
WS_DLL_PUBLIC uint64_t | tvb_get_uint48 (tvbuff_t *tvb, const unsigned offset, const unsigned encoding)
| Retrieve a 48-bit unsigned value from a tvbuff using the specified encoding.
WS_DLL_PUBLIC int64_t | tvb_get_int48 (tvbuff_t *tvb, const unsigned offset, const unsigned encoding)
| Retrieve a 48-bit signed value from a tvbuff using the specified encoding.
WS_DLL_PUBLIC uint64_t | tvb_get_uint56 (tvbuff_t *tvb, const unsigned offset, const unsigned encoding)
| Retrieve a 56-bit unsigned value from a tvbuff using the specified encoding.
WS_DLL_PUBLIC int64_t | tvb_get_int56 (tvbuff_t *tvb, const unsigned offset, const unsigned encoding)
| Retrieve a 56-bit signed value from a tvbuff using the specified encoding.
WS_DLL_PUBLIC uint64_t | tvb_get_uint64 (tvbuff_t *tvb, const unsigned offset, const unsigned encoding)
| Retrieve a 64-bit unsigned value from a tvbuff using the specified encoding.
WS_DLL_PUBLIC uint64_t | tvb_get_uint64_with_length (tvbuff_t *tvb, const unsigned offset, unsigned length, const unsigned encoding)
| Retrieve a variable-length unsigned value (up to 64 bits) from a tvbuff using the specified encoding.
WS_DLL_PUBLIC int64_t | tvb_get_int64 (tvbuff_t *tvb, const unsigned offset, const unsigned encoding)
| Retrieve a 64-bit signed value from a tvbuff using the specified encoding.
WS_DLL_PUBLIC float | tvb_get_ieee_float (tvbuff_t *tvb, const unsigned offset, const unsigned encoding)
| Retrieve a 32-bit IEEE float from a tvbuff using the specified encoding.
WS_DLL_PUBLIC double | tvb_get_ieee_double (tvbuff_t *tvb, const unsigned offset, const unsigned encoding)
| Retrieve a 64-bit IEEE double from a tvbuff using the specified encoding.
WS_DLL_PUBLIC nstime_t * | tvb_get_string_time (tvbuff_t *tvb, const unsigned offset, const unsigned length, const unsigned encoding, nstime_t *ns, unsigned *endoff)
| Fetch a time value from an ASCII-style string in the tvbuff.
WS_DLL_PUBLIC GByteArray * | tvb_get_string_bytes (tvbuff_t *tvb, const unsigned offset, const unsigned length, const unsigned encoding, GByteArray *bytes, unsigned *endoff)
| Parse a case-insensitive hex string with optional separators into a byte array.
WS_DLL_PUBLIC bool | tvb_get_string_uint64 (tvbuff_t *tvb, const unsigned offset, const unsigned length, const unsigned encoding, uint64_t *value, unsigned *endoff)
| Parse a case-insensitive byte string into an unsigned 64-bit integer.
WS_DLL_PUBLIC bool | tvb_get_string_uint (tvbuff_t *tvb, const unsigned offset, const unsigned length, const unsigned encoding, uint32_t *value, unsigned *endoff)
| Parse a case-insensitive byte string into an unsigned 32-bit integer.
WS_DLL_PUBLIC bool | tvb_get_string_uint16 (tvbuff_t *tvb, const unsigned offset, const unsigned length, const unsigned encoding, uint16_t *value, unsigned *endoff)
| Parse a case-insensitive byte string into an unsigned 16-bit integer.
WS_DLL_PUBLIC bool | tvb_get_string_uint8 (tvbuff_t *tvb, const unsigned offset, const unsigned length, const unsigned encoding, uint8_t *value, unsigned *endoff)
| Parse a case-insensitive byte string into an unsigned 16-bit integer.
WS_DLL_PUBLIC uint32_t | tvb_get_ipv4 (tvbuff_t *tvb, const unsigned offset)
| Retrieve an IPv4 address from a tvbuff in network byte order.
WS_DLL_PUBLIC void | tvb_get_ipv6 (tvbuff_t *tvb, const unsigned offset, ws_in6_addr *addr)
| Retrieve an IPv6 address from a tvbuff.
WS_DLL_PUBLIC int | tvb_get_ipv4_addr_with_prefix_len (tvbuff_t *tvb, const unsigned offset, ws_in4_addr *addr, uint32_t prefix_len)
| Fetch an IPv4 address from a tvbuff and mask out bits not covered by a prefix length.
WS_DLL_PUBLIC int | tvb_get_ipv6_addr_with_prefix_len (tvbuff_t *tvb, const unsigned offset, ws_in6_addr *addr, uint32_t prefix_len)
| Fetch an IPv6 address from a tvbuff and mask out bits not covered by a prefix length.
WS_DLL_PUBLIC void | tvb_get_ntohguid (tvbuff_t *tvb, const unsigned offset, e_guid_t *guid)
| Retrieve a GUID from a tvbuff in network byte order.
WS_DLL_PUBLIC void | tvb_get_letohguid (tvbuff_t *tvb, const unsigned offset, e_guid_t *guid)
| Retrieve a GUID from a tvbuff in little-endian byte order.
WS_DLL_PUBLIC void | tvb_get_guid (tvbuff_t *tvb, const unsigned offset, e_guid_t *guid, const unsigned encoding)
| Retrieve a GUID from a tvbuff using the specified encoding.
WS_DLL_PUBLIC uint8_t * | tvb_get_bits_array (wmem_allocator_t *scope, tvbuff_t *tvb, const unsigned offset, size_t length, size_t *data_length, const unsigned encoding)
| Retrieve a byte array from a tvbuff using a bit-level offset and encoding.
WS_DLL_PUBLIC uint8_t | tvb_get_bits8 (tvbuff_t *tvb, unsigned bit_offset, const unsigned no_of_bits)
| Retrieve 1–8 bits from a tvbuff and return them as a uint8_t.
WS_DLL_PUBLIC uint16_t | tvb_get_bits16 (tvbuff_t *tvb, unsigned bit_offset, const unsigned no_of_bits, const unsigned encoding)
| Retrieve 1–16 bits from a tvbuff and return them as a uint16_t.
WS_DLL_PUBLIC uint32_t | tvb_get_bits32 (tvbuff_t *tvb, unsigned bit_offset, const unsigned no_of_bits, const unsigned encoding)
| Retrieve 1–32 bits from a tvbuff and return them as a uint32_t.
WS_DLL_PUBLIC uint64_t | tvb_get_bits64 (tvbuff_t *tvb, unsigned bit_offset, const unsigned no_of_bits, const unsigned encoding)
| Retrieve 1–64 bits from a tvbuff and return them as a uint64_t.
WS_DLL_PUBLIC uint32_t | tvb_get_bits (tvbuff_t *tvb, const unsigned bit_offset, const unsigned no_of_bits, const unsigned encoding)
| Deprecated accessor for extracting bits from a tvbuff.
WS_DLL_PUBLIC void * | tvb_memcpy (tvbuff_t *tvb, void *target, const unsigned offset, size_t length)
| Copy a range of bytes from a tvbuff into a pre-allocated target buffer.
WS_DLL_PUBLIC void * | tvb_memdup (wmem_allocator_t *scope, tvbuff_t *tvb, const unsigned offset, size_t length)
| Duplicate a block of data from a tvbuff into a newly allocated buffer.
WS_DLL_PUBLIC const uint8_t * | tvb_get_ptr (tvbuff_t *tvb, const unsigned offset, const unsigned length)
| Returns a raw pointer to tvbuff data. Use with extreme caution.
WS_DLL_PUBLIC bool | tvb_find_uint8_remaining (tvbuff_t *tvb, const unsigned offset, const uint8_t needle, unsigned *found_offset)
| Find the first occurrence of a byte value in a tvbuff.
WS_DLL_PUBLIC bool | tvb_find_uint8_length (tvbuff_t *tvb, const unsigned offset, const unsigned maxlength, const uint8_t needle, unsigned *found_offset)
| Find the first occurrence of a byte value in a tvbuff up to a limit.
WS_DLL_PUBLIC bool | tvb_find_uint16_remaining (tvbuff_t *tvb, const unsigned offset, const uint16_t needle, unsigned *found_offset)
| Find the first occurrence of a 16-bit value in a tvbuff.
WS_DLL_PUBLIC bool | tvb_find_uint16_length (tvbuff_t *tvb, const unsigned offset, const unsigned maxlength, const uint16_t needle, unsigned *found_offset)
| Find the first occurrence of a 16-bit value in a tvbuff up to a limit.
WS_DLL_PUBLIC bool | tvb_ws_mempbrk_uint8_remaining (tvbuff_t *tvb, const unsigned offset, const ws_mempbrk_pattern *pattern, unsigned *found_offset, unsigned char *found_needle)
| Find the first occurrence of any needle from a pre-compiled pattern in a tvbuff.
WS_DLL_PUBLIC bool | tvb_ws_mempbrk_uint8_length (tvbuff_t *tvb, const unsigned offset, const unsigned maxlength, const ws_mempbrk_pattern *pattern, unsigned *found_offset, unsigned char *found_needle)
| Find the first occurrence of any needle from a pre-compiled pattern in a tvbuff up to a maximum search length.
WS_DLL_PUBLIC unsigned | tvb_strsize (tvbuff_t *tvb, const unsigned offset)
| Determine the size of a NUL-terminated string in a tvbuff.
WS_DLL_PUBLIC unsigned | tvb_unicode_strsize (tvbuff_t *tvb, const unsigned offset)
| Determine the size of a UCS-2 or UTF-16 NUL-terminated string in a tvbuff.
WS_DLL_PUBLIC unsigned | tvb_strsize_enc (tvbuff_t *tvb, const unsigned offset, const unsigned encoding)
| Determine the size of a NUL-terminated string in a given encoding in a tvbuff.
WS_DLL_PUBLIC int | tvb_strnlen (tvbuff_t *tvb, const unsigned offset, const unsigned maxlength)
| Find the length of a NUL-terminated string in a tvbuff, up to a maximum limit.
WS_DLL_PUBLIC char * | tvb_format_text (wmem_allocator_t *scope, tvbuff_t *tvb, const unsigned offset, const unsigned size)
| Format a block of tvbuff data as printable text.
WS_DLL_PUBLIC char * | tvb_format_text_wsp (wmem_allocator_t *allocator, tvbuff_t *tvb, const unsigned offset, const unsigned size)
| Format tvbuff data as printable text, omitting C-style escapes.
WS_DLL_PUBLIC char * | tvb_format_stringzpad (wmem_allocator_t *scope, tvbuff_t *tvb, const unsigned offset, const unsigned size)
| Format a null-padded string from a tvbuff as printable text.
WS_DLL_PUBLIC char * | tvb_format_stringzpad_wsp (wmem_allocator_t *allocator, tvbuff_t *tvb, const unsigned offset, const unsigned size)
| Format a null-padded string from a tvbuff as printable text, preserving whitespace.
WS_DLL_PUBLIC uint8_t * | tvb_get_string_enc (wmem_allocator_t *scope, tvbuff_t *tvb, const unsigned offset, const unsigned length, const unsigned encoding)
| Extract and convert a string from a tvbuff to UTF-8 using the specified encoding.
WS_DLL_PUBLIC char * | tvb_get_ts_23_038_7bits_string_packed (wmem_allocator_t *scope, tvbuff_t *tvb, const unsigned bit_offset, unsigned no_of_chars)
| Extract and convert a 3GPP TS 23.038 7-bit packed string from a tvbuff to UTF-8.
WS_DLL_PUBLIC char * | tvb_get_ts_23_038_7bits_string_unpacked (wmem_allocator_t *scope, tvbuff_t *tvb, const unsigned offset, unsigned length)
| Extract and convert a 3GPP TS 23.038 7-bit unpacked string from a tvbuff to UTF-8.
WS_DLL_PUBLIC char * | tvb_get_etsi_ts_102_221_annex_a_string (wmem_allocator_t *scope, tvbuff_t *tvb, const unsigned offset, unsigned length)
| Extract and convert a string encoded per ETSI TS 102 221 Annex A from a tvbuff to UTF-8.
WS_DLL_PUBLIC char * | tvb_get_ascii_7bits_string (wmem_allocator_t *scope, tvbuff_t *tvb, const unsigned bit_offset, unsigned no_of_chars)
| Extract and convert an ASCII 7-bit encoded string from a tvbuff to UTF-8.
WS_DLL_PUBLIC uint8_t * | tvb_get_stringzpad (wmem_allocator_t *scope, tvbuff_t *tvb, const unsigned offset, const unsigned length, const unsigned encoding)
| Extract and convert a null-padded string from a tvbuff to UTF-8.
WS_DLL_PUBLIC uint8_t * | tvb_get_stringz_enc (wmem_allocator_t *scope, tvbuff_t *tvb, const unsigned offset, unsigned *lengthp, const unsigned encoding)
| Extract and convert a null-terminated string from a tvbuff to UTF-8 using the specified encoding.
WS_DLL_PUBLIC const uint8_t * | tvb_get_const_stringz (tvbuff_t *tvb, const unsigned offset, unsigned *lengthp)
| Deprecated function to retrieve a raw, unmodifiable null-terminated string from a tvbuff.
WS_DLL_PUBLIC unsigned | tvb_get_raw_bytes_as_stringz (tvbuff_t *tvb, const unsigned offset, const unsigned bufsize, uint8_t *buffer)
| Copy up to a specified number of bytes from a tvbuff into a buffer as a NUL-terminated string.
WS_DLL_PUBLIC unsigned | tvb_get_raw_bytes_as_string (tvbuff_t *tvb, const unsigned offset, char *buffer, size_t bufsize)
| Extract raw bytes from a tvbuff into a buffer as a NUL-terminated string.
WS_DLL_PUBLIC bool | tvb_ascii_isprint (tvbuff_t *tvb, const unsigned offset, const unsigned length)
| Check whether all bytes in a tvbuff range are ASCII printable characters.
WS_DLL_PUBLIC bool | tvb_ascii_isprint_remaining (tvbuff_t *tvb, const unsigned offset)
| Check whether all bytes in a tvbuff starting at an offset are ASCII printable characters.
WS_DLL_PUBLIC bool | tvb_utf_8_isprint (tvbuff_t *tvb, const unsigned offset, const unsigned length)
| Check if a portion of a tvbuff contains only valid, printable UTF-8 characters.
WS_DLL_PUBLIC bool | tvb_utf_8_isprint_remaining (tvbuff_t *tvb, const unsigned offset)
| Check if a tvbuff contains only valid, printable UTF-8 characters.
WS_DLL_PUBLIC bool | tvb_ascii_isdigit (tvbuff_t *tvb, const unsigned offset, const unsigned length)
| Check if all bytes in a tvbuff range are ASCII digits.
WS_DLL_PUBLIC bool | tvb_find_line_end_remaining (tvbuff_t *tvb, const unsigned offset, unsigned *linelen, unsigned *next_offset)
| Locate the end of a line in a tvbuff.
WS_DLL_PUBLIC bool | tvb_find_line_end_length (tvbuff_t *tvb, const unsigned offset, const unsigned maxlength, unsigned *linelen, unsigned *next_offset)
| Locate the end of a line in a tvbuff, scanning up to a certain length.
WS_DLL_PUBLIC int | tvb_find_line_end_unquoted (tvbuff_t *tvb, const unsigned offset, int len, int *next_offset)
| Locate the end of a line in a tvbuff, ignoring newlines inside quoted strings.
WS_DLL_PUBLIC bool | tvb_find_line_end_unquoted_remaining (tvbuff_t *tvb, const unsigned offset, unsigned *linelen, unsigned *next_offset)
| Locate the end of a line in a tvbuff, ignoring newlines within quoted strings.
WS_DLL_PUBLIC bool | tvb_find_line_end_unquoted_length (tvbuff_t *tvb, const unsigned offset, const unsigned maxlength, unsigned *linelen, unsigned *next_offset)
| Locate the end of a line in a tvbuff, scanning up to a certain length and ignoring newlines within quoted strings.
WS_DLL_PUBLIC unsigned | tvb_skip_wsp (tvbuff_t *tvb, const unsigned offset, const unsigned maxlength)
| Skip ASCII whitespace in a tvbuff and return the offset of the first non-whitespace byte.
WS_DLL_PUBLIC unsigned | tvb_skip_wsp_return (tvbuff_t *tvb, const unsigned offset)
| Go backwards to find the offset after a token followed by optional ASCII whitespace.
WS_DLL_PUBLIC unsigned | tvb_skip_uint8 (tvbuff_t *tvb, unsigned offset, const unsigned maxlength, const uint8_t ch)
| Skip consecutive occurrences of a specific byte value in a tvbuff.
WS_DLL_PUBLIC int | tvb_get_token_len (tvbuff_t *tvb, const unsigned offset, int len, int *next_offset, const bool desegment)
| Determine the length of a token in a tvbuff, optionally desegmenting.
WS_DLL_PUBLIC bool | tvb_get_token_len_remaining (tvbuff_t *tvb, const unsigned offset, unsigned *tokenlen, unsigned *next_offset)
| Determine the length of a token in a tvbuff.
WS_DLL_PUBLIC bool | tvb_get_token_len_length (tvbuff_t *tvb, const unsigned offset, unsigned maxlength, unsigned *tokenlen, unsigned *next_offset)
| Determine the length of a token in a tvbuff.
WS_DLL_PUBLIC int | tvb_strneql (tvbuff_t *tvb, const unsigned offset, const char *str, const size_t size)
| Compare a string in a tvbuff to a reference string using strncmp semantics.
WS_DLL_PUBLIC int | tvb_strncaseeql (tvbuff_t *tvb, const unsigned offset, const char *str, const size_t size)
| Case-insensitive comparison of tvbuff bytes against a reference string.
WS_DLL_PUBLIC int | tvb_memeql (tvbuff_t *tvb, const unsigned offset, const uint8_t *str, size_t size)
| Compare raw bytes in a tvbuff to a reference buffer using memcmp semantics.
WS_DLL_PUBLIC char * | tvb_bytes_to_str_punct (wmem_allocator_t *scope, tvbuff_t *tvb, const unsigned offset, const unsigned len, const char punct)
| Format a sequence of bytes from a tvbuff as a string with a custom separator.
WS_DLL_PUBLIC char * | tvb_bytes_to_str (wmem_allocator_t *allocator, tvbuff_t *tvb, const unsigned offset, const unsigned len)
| Format a sequence of bytes from a tvbuff as a hexadecimal string.
WS_DLL_PUBLIC const char * | tvb_bcd_dig_to_str (wmem_allocator_t *scope, tvbuff_t *tvb, const unsigned offset, const unsigned len, const dgt_set_t *dgt, bool skip_first)
| Convert BCD-encoded digits from a tvbuff into a formatted string.
WS_DLL_PUBLIC const char * | tvb_bcd_dig_to_str_be (wmem_allocator_t *scope, tvbuff_t *tvb, const unsigned offset, const unsigned len, const dgt_set_t *dgt, bool skip_first)
| Convert BCD-encoded digits from a tvbuff to a formatted string (big-endian nibble order).
WS_DLL_PUBLIC char * | tvb_get_bcd_string (wmem_allocator_t *scope, tvbuff_t *tvb, const unsigned offset, unsigned len, const dgt_set_t *dgt, bool skip_first, bool odd, bool bigendian)
| Convert BCD-encoded digits from a tvbuff to a UTF-8 string with flexible nibble handling.
WS_DLL_PUBLIC int | tvb_find_tvb (tvbuff_t *haystack_tvb, tvbuff_t *needle_tvb, const int haystack_offset)
| Search for a sub-tvbuff within another tvbuff starting at a given offset.
WS_DLL_PUBLIC bool | tvb_find_tvb_remaining (tvbuff_t *haystack_tvb, tvbuff_t *needle_tvb, const unsigned haystack_offset, unsigned *found_offset)
| Search for a sub-tvbuff within another tvbuff starting at a given offset.
WS_DLL_PUBLIC tvbuff_t * | tvb_uncompress (tvbuff_t *tvb, const unsigned offset, unsigned comprlen)
| Deprecated interface for uncompressing data from a tvbuff using zlib.
WS_DLL_PUBLIC tvbuff_t * | tvb_uncompress_zlib (tvbuff_t *tvb, const unsigned offset, unsigned comprlen)
| Uncompress zlib-compressed data from a tvbuff.
WS_DLL_PUBLIC tvbuff_t * | tvb_child_uncompress (tvbuff_t *parent, tvbuff_t *tvb, const unsigned offset, unsigned comprlen)
| Deprecated interface for uncompressing data and chaining the result to a parent tvbuff.
WS_DLL_PUBLIC tvbuff_t * | tvb_child_uncompress_zlib (tvbuff_t *parent, tvbuff_t *tvb, const unsigned offset, unsigned comprlen)
| Uncompress a zlib-compressed packet inside a tvbuff and attach the result to a parent tvbuff.
WS_DLL_PUBLIC tvbuff_t * | tvb_uncompress_brotli (tvbuff_t *tvb, const unsigned offset, unsigned comprlen)
| Uncompress Brotli-compressed data from a tvbuff.
WS_DLL_PUBLIC tvbuff_t * | tvb_child_uncompress_brotli (tvbuff_t *parent, tvbuff_t *tvb, const unsigned offset, unsigned comprlen)
| Uncompress Brotli-compressed data from a tvbuff and attach the result to a parent tvbuff.
WS_DLL_PUBLIC tvbuff_t * | tvb_uncompress_snappy (tvbuff_t *tvb, const unsigned offset, unsigned comprlen)
| Uncompress Snappy-compressed data from a tvbuff.
WS_DLL_PUBLIC tvbuff_t * | tvb_child_uncompress_snappy (tvbuff_t *parent, tvbuff_t *tvb, const unsigned offset, unsigned comprlen)
| Uncompress Snappy-compressed data from a tvbuff and attach the result to a parent tvbuff.
WS_DLL_PUBLIC tvbuff_t * | tvb_uncompress_lz77 (tvbuff_t *tvb, const unsigned offset, unsigned comprlen)
| Uncompress Microsoft Plain LZ77-compressed data from a tvbuff.
WS_DLL_PUBLIC tvbuff_t * | tvb_child_uncompress_lz77 (tvbuff_t *parent, tvbuff_t *tvb, const unsigned offset, unsigned comprlen)
| Uncompress Microsoft Plain LZ77-compressed data from a tvbuff and attach the result to a parent tvbuff.
WS_DLL_PUBLIC tvbuff_t * | tvb_uncompress_lz77huff (tvbuff_t *tvb, const unsigned offset, unsigned comprlen)
| Uncompress Microsoft LZ77+Huffman-compressed data from a tvbuff.
WS_DLL_PUBLIC tvbuff_t * | tvb_child_uncompress_lz77huff (tvbuff_t *parent, tvbuff_t *tvb, const unsigned offset, unsigned comprlen)
| Uncompress Microsoft LZ77+Huffman-compressed data from a tvbuff and attach the result to a parent tvbuff.
WS_DLL_PUBLIC tvbuff_t * | tvb_uncompress_lznt1 (tvbuff_t *tvb, const unsigned offset, unsigned comprlen)
| Uncompress Microsoft LZNT1-compressed data from a tvbuff.
WS_DLL_PUBLIC tvbuff_t * | tvb_child_uncompress_lznt1 (tvbuff_t *parent, tvbuff_t *tvb, const unsigned offset, unsigned comprlen)
| Uncompress Microsoft LZNT1-compressed data from a tvbuff and attach the result to a parent tvbuff.
WS_DLL_PUBLIC tvbuff_t * | tvb_uncompress_zstd (tvbuff_t *tvb, const unsigned offset, unsigned comprlen)
| Uncompress Zstandard (ZSTD)-compressed data from a tvbuff.
WS_DLL_PUBLIC tvbuff_t * | tvb_child_uncompress_zstd (tvbuff_t *parent, tvbuff_t *tvb, const unsigned offset, unsigned comprlen)
| Uncompress Zstandard (ZSTD)-compressed data from a tvbuff and attach the result to a parent tvbuff.
WS_DLL_PUBLIC tvbuff_t * | base64_to_tvb (tvbuff_t *parent, const char *base64)
| Decode a base64-encoded string into a tvbuff and attach it to a parent tvbuff.
WS_DLL_PUBLIC tvbuff_t * | base64_tvb_to_new_tvb (tvbuff_t *parent, unsigned offset, unsigned length)
| Decode a base64-encoded string from a tvbuff region and attach the result to a parent tvbuff.
WS_DLL_PUBLIC tvbuff_t * | base64uri_tvb_to_new_tvb (tvbuff_t *parent, unsigned offset, unsigned length)
| Decode a base64url-encoded string from a tvbuff region and attach the result to a parent tvbuff.
WS_DLL_PUBLIC wmem_strbuf_t * | tvb_get_hpack_huffman_strbuf (wmem_allocator_t *scope, tvbuff_t *tvb, const unsigned offset, const unsigned len)
| Decode HPACK Huffman-encoded data from a tvbuff into a string buffer.
WS_DLL_PUBLIC tvbuff_t * | tvb_child_uncompress_hpack_huff (tvbuff_t *parent, unsigned offset, unsigned length)
| Decode HPACK Huffman-encoded data from a tvbuff region and attach the result to a parent tvbuff.
WS_DLL_PUBLIC unsigned | tvb_get_varint (tvbuff_t *tvb, unsigned offset, unsigned maxlen, uint64_t *value, const unsigned encoding)
| Extract a variable-length integer from a tvbuff using the specified encoding.

## Detailed Description

Testy, Virtual(-izable) Buffer of uint8_t*'s

"Testy" – the buffer gets mad when an attempt is made to access data beyond the bounds of the buffer. An exception is thrown.

"Virtual" – the buffer can have its own data, can use a subset of the data of a backing tvbuff, or can be a composite of other tvbuffs.

Copyright (c) 2000 by Gilbert Ramirez gram@.nosp@m.alum.nosp@m.ni.ri.nosp@m.ce.e.nosp@m.du

Wireshark - Network traffic analyzer By Gerald Combs geral.nosp@m.d@wi.nosp@m.resha.nosp@m.rk.o.nosp@m.rg Copyright 1998 Gerald Combs

SPDX-License-Identifier: GPL-2.0-or-later