24#include <ws_symbol_export.h>
25#include <ws_attributes.h>
120 uint32_t bit_offset, int32_t no_of_bits);
134 uint32_t bit_offset, int32_t no_of_bits);
267 const int backing_offset,
const int backing_length,
296 const int backing_offset);
372WS_DLL_PUBLIC
bool tvb_bytes_exist(
const tvbuff_t *tvb,
const int offset,
388 const int offset,
const uint64_t
length);
402 const int offset,
const int length);
471WS_DLL_PUBLIC
void tvb_fix_reported_length(
tvbuff_t *tvb);
473WS_DLL_PUBLIC
unsigned tvb_offset_from_real_beginning(
const tvbuff_t *tvb);
476WS_DLL_PUBLIC
int tvb_raw_offset(
tvbuff_t *tvb);
489WS_DLL_PUBLIC uint8_t tvb_get_uint8(
tvbuff_t *tvb,
const int offset);
490WS_DEPRECATED_X(
"Use tvb_get_uint8 instead")
491static inline uint8_t tvb_get_guint8(
tvbuff_t *tvb, const
int offset) {
return tvb_get_uint8(tvb, offset); }
492WS_DLL_PUBLIC int8_t tvb_get_int8(
tvbuff_t *tvb,
const int offset);
493WS_DEPRECATED_X(
"Use tvb_get_int8 instead")
494static inline int8_t tvb_get_gint8(
tvbuff_t *tvb, const
int offset) {
return tvb_get_int8(tvb, offset); }
496WS_DLL_PUBLIC uint16_t tvb_get_ntohs(
tvbuff_t *tvb,
const int offset);
497WS_DLL_PUBLIC int16_t tvb_get_ntohis(
tvbuff_t *tvb,
const int offset);
498WS_DLL_PUBLIC uint32_t tvb_get_ntoh24(
tvbuff_t *tvb,
const int offset);
499WS_DLL_PUBLIC int32_t tvb_get_ntohi24(
tvbuff_t *tvb,
const int offset);
500WS_DLL_PUBLIC uint32_t tvb_get_ntohl(
tvbuff_t *tvb,
const int offset);
501WS_DLL_PUBLIC int32_t tvb_get_ntohil(
tvbuff_t *tvb,
const int offset);
502WS_DLL_PUBLIC uint64_t tvb_get_ntoh40(
tvbuff_t *tvb,
const int offset);
503WS_DLL_PUBLIC int64_t tvb_get_ntohi40(
tvbuff_t *tvb,
const int offset);
504WS_DLL_PUBLIC uint64_t tvb_get_ntoh48(
tvbuff_t *tvb,
const int offset);
505WS_DLL_PUBLIC int64_t tvb_get_ntohi48(
tvbuff_t *tvb,
const int offset);
506WS_DLL_PUBLIC uint64_t tvb_get_ntoh56(
tvbuff_t *tvb,
const int offset);
507WS_DLL_PUBLIC int64_t tvb_get_ntohi56(
tvbuff_t *tvb,
const int offset);
508WS_DLL_PUBLIC uint64_t tvb_get_ntoh64(
tvbuff_t *tvb,
const int offset);
509WS_DLL_PUBLIC int64_t tvb_get_ntohi64(
tvbuff_t *tvb,
const int offset);
510WS_DLL_PUBLIC
float tvb_get_ntohieee_float(
tvbuff_t *tvb,
const int offset);
511WS_DLL_PUBLIC
double tvb_get_ntohieee_double(
tvbuff_t *tvb,
514WS_DLL_PUBLIC uint16_t tvb_get_letohs(
tvbuff_t *tvb,
const int offset);
515WS_DLL_PUBLIC int16_t tvb_get_letohis(
tvbuff_t *tvb,
const int offset);
516WS_DLL_PUBLIC uint32_t tvb_get_letoh24(
tvbuff_t *tvb,
const int offset);
517WS_DLL_PUBLIC int32_t tvb_get_letohi24(
tvbuff_t *tvb,
const int offset);
518WS_DLL_PUBLIC uint32_t tvb_get_letohl(
tvbuff_t *tvb,
const int offset);
519WS_DLL_PUBLIC int32_t tvb_get_letohil(
tvbuff_t *tvb,
const int offset);
520WS_DLL_PUBLIC uint64_t tvb_get_letoh40(
tvbuff_t *tvb,
const int offset);
521WS_DLL_PUBLIC int64_t tvb_get_letohi40(
tvbuff_t *tvb,
const int offset);
522WS_DLL_PUBLIC uint64_t tvb_get_letoh48(
tvbuff_t *tvb,
const int offset);
523WS_DLL_PUBLIC int64_t tvb_get_letohi48(
tvbuff_t *tvb,
const int offset);
524WS_DLL_PUBLIC uint64_t tvb_get_letoh56(
tvbuff_t *tvb,
const int offset);
525WS_DLL_PUBLIC int64_t tvb_get_letohi56(
tvbuff_t *tvb,
const int offset);
526WS_DLL_PUBLIC uint64_t tvb_get_letoh64(
tvbuff_t *tvb,
const int offset);
527WS_DLL_PUBLIC int64_t tvb_get_letohi64(
tvbuff_t *tvb,
const int offset);
528WS_DLL_PUBLIC
float tvb_get_letohieee_float(
tvbuff_t *tvb,
const int offset);
529WS_DLL_PUBLIC
double tvb_get_letohieee_double(
tvbuff_t *tvb,
532WS_DLL_PUBLIC uint16_t tvb_get_uint16(
tvbuff_t *tvb,
const int offset,
const unsigned encoding);
533WS_DEPRECATED_X(
"Use tvb_get_uint16 instead")
534static inline uint16_t tvb_get_guint16(
tvbuff_t *tvb, const
int offset, const
unsigned encoding) {
return tvb_get_uint16(tvb, offset, encoding); }
535WS_DLL_PUBLIC int16_t tvb_get_int16(
tvbuff_t *tvb,
const int offset,
const unsigned encoding);
536WS_DEPRECATED_X(
"Use tvb_get_int16 instead")
537static inline int16_t tvb_get_gint16(
tvbuff_t *tvb, const
int offset, const
unsigned encoding) {
return tvb_get_int16(tvb, offset, encoding); }
538WS_DLL_PUBLIC uint32_t tvb_get_uint24(
tvbuff_t *tvb,
const int offset,
const unsigned encoding);
539WS_DEPRECATED_X(
"Use tvb_get_uint24 instead")
540static inline uint32_t tvb_get_guint24(
tvbuff_t *tvb, const
int offset, const
unsigned encoding) {
return tvb_get_uint24(tvb, offset, encoding); }
541WS_DLL_PUBLIC int32_t tvb_get_int24(
tvbuff_t *tvb,
const int offset,
const unsigned encoding);
542WS_DEPRECATED_X(
"Use tvb_get_int24 instead")
543static inline int32_t tvb_get_gint24(
tvbuff_t *tvb, const
int offset, const
unsigned encoding) {
return tvb_get_int24(tvb, offset, encoding); }
544WS_DLL_PUBLIC uint32_t tvb_get_uint32(
tvbuff_t *tvb,
const int offset,
const unsigned encoding);
545WS_DEPRECATED_X(
"Use tvb_get_uint32 instead")
546static inline uint32_t tvb_get_guint32(
tvbuff_t *tvb, const
int offset, const
unsigned encoding) {
return tvb_get_uint32(tvb, offset, encoding); }
547WS_DLL_PUBLIC int32_t tvb_get_int32(
tvbuff_t *tvb,
const int offset,
const unsigned encoding);
548WS_DEPRECATED_X(
"Use tvb_get_int32 instead")
549static inline int32_t tvb_get_gint32(
tvbuff_t *tvb, const
int offset, const
unsigned encoding) {
return tvb_get_int32(tvb, offset, encoding); }
550WS_DLL_PUBLIC uint64_t tvb_get_uint40(
tvbuff_t *tvb,
const int offset,
const unsigned encoding);
551WS_DEPRECATED_X(
"Use tvb_get_uint40 instead")
552static inline uint64_t tvb_get_guint40(
tvbuff_t *tvb, const
int offset, const
unsigned encoding) {
return tvb_get_uint40(tvb, offset, encoding); }
553WS_DLL_PUBLIC int64_t tvb_get_int40(
tvbuff_t *tvb,
const int offset,
const unsigned encoding);
554WS_DEPRECATED_X(
"Use tvb_get_int40 instead")
555static inline int64_t tvb_get_gint40(
tvbuff_t *tvb, const
int offset, const
unsigned encoding) {
return tvb_get_int40(tvb, offset, encoding); }
556WS_DLL_PUBLIC uint64_t tvb_get_uint48(
tvbuff_t *tvb,
const int offset,
const unsigned encoding);
557WS_DEPRECATED_X(
"Use tvb_get_uint48 instead")
558static inline uint64_t tvb_get_guint48(
tvbuff_t *tvb, const
int offset, const
unsigned encoding) {
return tvb_get_uint48(tvb, offset, encoding); }
559WS_DLL_PUBLIC int64_t tvb_get_int48(
tvbuff_t *tvb,
const int offset,
const unsigned encoding);
560WS_DEPRECATED_X(
"Use tvb_get_int48 instead")
561static inline int64_t tvb_get_gint48(
tvbuff_t *tvb, const
int offset, const
unsigned encoding) {
return tvb_get_int48(tvb, offset, encoding); }
562WS_DLL_PUBLIC uint64_t tvb_get_uint56(
tvbuff_t *tvb,
const int offset,
const unsigned encoding);
563WS_DEPRECATED_X(
"Use tvb_get_uint56 instead")
564static inline uint64_t tvb_get_guint56(
tvbuff_t *tvb, const
int offset, const
unsigned encoding) {
return tvb_get_uint56(tvb, offset, encoding); }
565WS_DLL_PUBLIC int64_t tvb_get_int56(
tvbuff_t *tvb,
const int offset,
const unsigned encoding);
566WS_DEPRECATED_X(
"Use tvb_get_int56 instead")
567static inline int64_t tvb_get_gint56(
tvbuff_t *tvb, const
int offset, const
unsigned encoding) {
return tvb_get_int56(tvb, offset, encoding); }
568WS_DLL_PUBLIC uint64_t tvb_get_uint64(
tvbuff_t *tvb,
const int offset,
const unsigned encoding);
569WS_DLL_PUBLIC uint64_t tvb_get_uint64_with_length(
tvbuff_t *tvb,
const int offset,
unsigned length,
const unsigned encoding);
570WS_DEPRECATED_X(
"Use tvb_get_uint64 instead")
571static inline uint64_t tvb_get_guint64(
tvbuff_t *tvb, const
int offset, const
unsigned encoding) {
return tvb_get_uint64(tvb, offset, encoding); }
572WS_DLL_PUBLIC int64_t tvb_get_int64(
tvbuff_t *tvb,
const int offset,
const unsigned encoding);
573WS_DEPRECATED_X(
"Use tvb_get_int64 instead")
574static inline int64_t tvb_get_gint64(
tvbuff_t *tvb, const
int offset, const
unsigned encoding) {
return tvb_get_int64(tvb, offset, encoding); }
575WS_DLL_PUBLIC
float tvb_get_ieee_float(
tvbuff_t *tvb,
const int offset,
const unsigned encoding);
576WS_DLL_PUBLIC
double tvb_get_ieee_double(
tvbuff_t *tvb,
const int offset,
const unsigned encoding);
585#if G_BYTE_ORDER == G_LITTLE_ENDIAN
586#define tvb_get_h_uint16 tvb_get_letohs
587#define tvb_get_h_uint32 tvb_get_letohl
588#elif G_BYTE_ORDER == G_BIG_ENDIAN
589#define tvb_get_h_uint16 tvb_get_ntohs
590#define tvb_get_h_uint32 tvb_get_ntohl
592#error "Unsupported byte order"
624 const unsigned encoding,
nstime_t* ns,
int *endoff);
635GByteArray* tvb_get_string_bytes(
tvbuff_t *tvb,
const int offset,
const int length,
636 const unsigned encoding, GByteArray* bytes,
int *endoff);
645WS_DLL_PUBLIC
void tvb_get_ipv6(
tvbuff_t *tvb,
const int offset,
675WS_DLL_PUBLIC
void tvb_get_ntohguid(
tvbuff_t *tvb,
const int offset,
678WS_DLL_PUBLIC
void tvb_get_letohguid(
tvbuff_t *tvb,
const int offset,
681WS_DLL_PUBLIC
void tvb_get_guid(
tvbuff_t *tvb,
const int offset,
682 e_guid_t *guid,
const unsigned encoding);
686 const int offset,
size_t length,
size_t *data_length,
const unsigned encoding);
696WS_DLL_PUBLIC uint8_t tvb_get_bits8(
tvbuff_t *tvb,
unsigned bit_offset,
697 const int no_of_bits);
700WS_DLL_PUBLIC uint16_t tvb_get_bits16(
tvbuff_t *tvb,
unsigned bit_offset,
701 const int no_of_bits,
const unsigned encoding);
704WS_DLL_PUBLIC uint32_t tvb_get_bits32(
tvbuff_t *tvb,
unsigned bit_offset,
705 const int no_of_bits,
const unsigned encoding);
708WS_DLL_PUBLIC uint64_t tvb_get_bits64(
tvbuff_t *tvb,
unsigned bit_offset,
709 const int no_of_bits,
const unsigned encoding);
715WS_DEPRECATED_X(
"Use tvb_get_bits32() instead")
717 const
int no_of_bits, const
unsigned encoding);
744 const
int offset,
size_t length);
782 const
int maxlength, const uint8_t needle);
785static inline
int tvb_find_guint8(
tvbuff_t* tvb, const
int offset,
786 const
int maxlength, const uint8_t needle) {
return tvb_find_uint8(tvb, offset, maxlength, needle); }
790 const int maxlength,
const uint16_t needle);
792WS_DEPRECATED_X(
"Use tvb_find_uint16 instead")
793static inline
int tvb_find_guint16(
tvbuff_t* tvb, const
int offset,
794 const
int maxlength, const uint16_t needle) {
808WS_DEPRECATED_X(
"Use tvb_ws_mempbrk_pattern_uint8 instead")
809static inline
int tvb_ws_mempbrk_pattern_guint8(
tvbuff_t* tvb, const
int offset,
810 const
int maxlength, const
ws_mempbrk_pattern* pattern,
unsigned char* found_needle) {
834 const unsigned maxlength);
884 tvbuff_t *tvb,
const int offset,
const int length,
const unsigned encoding);
908 tvbuff_t *tvb,
const int bit_offset,
int no_of_chars);
978 tvbuff_t *tvb,
const int bit_offset,
int no_of_chars);
1001 tvbuff_t *tvb,
const int offset,
const int length,
const unsigned encoding);
1030 tvbuff_t *tvb,
const int offset,
int *lengthp,
const unsigned encoding);
1057WS_DEPRECATED_X(
"Use APIs that return a valid UTF-8 string instead")
1059 const
int offset,
int *lengthp);
1071 const
unsigned bufsize, uint8_t *
buffer);
1079WS_DLL_PUBLIC
int tvb_get_raw_bytes_as_string(
tvbuff_t *tvb, const
int offset,
char *
buffer,
size_t bufsize);
1127 int *next_offset, const
bool desegment);
1148 int len,
int *next_offset);
1168 const
int maxlength);
1170WS_DLL_PUBLIC
int tvb_skip_wsp_return(
tvbuff_t *tvb, const
int offset);
1172int tvb_skip_uint8(
tvbuff_t *tvb,
int offset, const
int maxlength, const uint8_t ch);
1173WS_DEPRECATED_X("Use tvb_skip_uint8 instead")
1174static inline
int tvb_skip_guint8(
tvbuff_t *tvb,
int offset, const
int maxlength, const uint8_t ch) {
1175 return tvb_skip_uint8(tvb, offset, maxlength, ch);
1203 const char *str,
const size_t size);
1210 const char *str,
const size_t size);
1217 const uint8_t *str,
size_t size);
1225 const int len,
const char punct);
1232 const int offset,
const int len);
1246 const unsigned char out[16];
1285 const int offset,
int len,
const dgt_set_t *dgt,
1286 bool skip_first,
bool odd,
bool bigendian);
1293 const int haystack_offset);
1297WS_DEPRECATED_X(
"Use tvb_uncompress_zlib instead")
1315 const
int offset,
int comprlen);
1323 const
int offset,
int comprlen);
1345 const
int offset,
int comprlen);
1363 const
int offset,
int comprlen);
1378 const
int offset,
int comprlen);
1387 tvbuff_t *tvb, const
int offset,
int comprlen);
1402 const
int offset,
int comprlen);
1411 tvbuff_t *tvb, const
int offset,
int comprlen);
1426 const
int offset,
int comprlen);
1435 tvbuff_t *tvb, const
int offset,
int comprlen);
1448 const
int offset,
int comprlen);
1457 tvbuff_t *tvb, const
int offset,
int comprlen);
1484extern
tvbuff_t* base64uri_tvb_to_new_tvb(
tvbuff_t* parent,
int offset,
int length);
1489 tvbuff_t *tvb, const
int offset, const
int len);
1492 int offset,
int length);
1507WS_DLL_PUBLIC
unsigned tvb_get_varint(
tvbuff_t *tvb,
unsigned offset,
unsigned maxlen, uint64_t *value, const
unsigned encoding);
WS_DLL_PUBLIC bool tvb_ascii_isprint(tvbuff_t *tvb, const int offset, const int length)
Definition tvbuff.c:4129
WS_DLL_PUBLIC bool tvb_ascii_isdigit(tvbuff_t *tvb, const int offset, const int length)
Definition tvbuff.c:4160
WS_DLL_PUBLIC int tvb_find_uint16(tvbuff_t *tvb, const int offset, const int maxlength, const uint16_t needle)
Definition tvbuff.c:2503
WS_DLL_PUBLIC int tvb_find_tvb(tvbuff_t *haystack_tvb, tvbuff_t *needle_tvb, const int haystack_offset)
Definition tvbuff.c:4747
WS_DLL_PUBLIC int tvb_strnlen(tvbuff_t *tvb, const int offset, const unsigned maxlength)
Definition tvbuff.c:2679
WS_DLL_PUBLIC tvbuff_t * tvb_child_uncompress_brotli(tvbuff_t *parent, tvbuff_t *tvb, const int offset, int comprlen)
Definition tvbuff_brotli.c:173
int tvb_get_ipv4_addr_with_prefix_len(tvbuff_t *tvb, int offset, ws_in4_addr *addr, uint32_t prefix_len)
Definition tvbuff.c:2135
WS_DLL_PUBLIC void tvb_set_fragment(tvbuff_t *tvb)
Definition tvbuff.c:4785
WS_DLL_PUBLIC int tvb_get_token_len(tvbuff_t *tvb, const int offset, int len, int *next_offset, const bool desegment)
Definition tvbuff.c:4541
WS_DLL_PUBLIC char * tvb_get_etsi_ts_102_221_annex_a_string(wmem_allocator_t *scope, tvbuff_t *tvb, const int offset, int length)
Definition tvbuff.c:3096
WS_DLL_PUBLIC int tvb_strneql(tvbuff_t *tvb, const int offset, const char *str, const size_t size)
Definition tvbuff.c:2707
WS_DLL_PUBLIC tvbuff_t * tvb_new_octet_aligned(tvbuff_t *tvb, uint32_t bit_offset, int32_t no_of_bits)
Extracts a specified number of bits starting at a given bit offset, aligning the result to octet boun...
Definition tvbuff.c:371
WS_DLL_PUBLIC void tvb_free(tvbuff_t *tvb)
Free a tvbuff_t and all tvbuffs chained from it.
Definition tvbuff.c:109
WS_DLL_PUBLIC char * tvb_get_ascii_7bits_string(wmem_allocator_t *scope, tvbuff_t *tvb, const int bit_offset, int no_of_chars)
Definition tvbuff.c:3108
WS_DLL_PUBLIC tvbuff_t * tvb_new_subset_length(tvbuff_t *backing, const int backing_offset, const int reported_length)
Definition tvbuff_subset.c:191
WS_DLL_PUBLIC tvbuff_t * tvb_uncompress_lz77huff(tvbuff_t *tvb, const int offset, int comprlen)
Definition tvbuff_lz77huff.c:360
WS_DLL_PUBLIC unsigned tvb_ensure_captured_length_remaining(const tvbuff_t *tvb, const int offset)
Definition tvbuff.c:578
WS_DLL_PUBLIC int tvb_get_raw_bytes_as_stringz(tvbuff_t *tvb, const int offset, const unsigned bufsize, uint8_t *buffer)
Definition tvbuff.c:4079
WS_DLL_PUBLIC char * tvb_format_text_wsp(wmem_allocator_t *allocator, tvbuff_t *tvb, const int offset, const int size)
Definition tvbuff.c:2803
WS_DLL_PUBLIC unsigned tvb_reported_length(const tvbuff_t *tvb)
Get reported length of buffer.
Definition tvbuff.c:756
WS_DLL_PUBLIC uint8_t * tvb_get_stringz_enc(wmem_allocator_t *scope, tvbuff_t *tvb, const int offset, int *lengthp, const unsigned encoding)
Definition tvbuff.c:3795
WS_DLL_PUBLIC char * tvb_get_bcd_string(wmem_allocator_t *scope, tvbuff_t *tvb, const int offset, int len, const dgt_set_t *dgt, bool skip_first, bool odd, bool bigendian)
Definition tvbuff.c:4634
WS_DLL_PUBLIC tvbuff_t * tvb_child_uncompress_lznt1(tvbuff_t *parent, tvbuff_t *tvb, const int offset, int comprlen)
Definition tvbuff_lznt1.c:148
WS_DLL_PUBLIC uint8_t * tvb_get_stringzpad(wmem_allocator_t *scope, tvbuff_t *tvb, const int offset, const int length, const unsigned encoding)
Definition tvbuff.c:3564
WS_DLL_PUBLIC unsigned tvb_unicode_strsize(tvbuff_t *tvb, const int offset)
Definition tvbuff.c:2658
WS_DLL_PUBLIC void tvb_free_chain(tvbuff_t *tvb)
Free the tvbuff_t and all tvbuffs chained from it.
Definition tvbuff.c:115
WS_DLL_PUBLIC tvbuff_t * tvb_clone(tvbuff_t *tvb)
Creates a full clone of the given tvbuff.
Definition tvbuff.c:535
WS_DLL_PUBLIC uint8_t * tvb_get_string_enc(wmem_allocator_t *scope, tvbuff_t *tvb, const int offset, const int length, const unsigned encoding)
Definition tvbuff.c:3298
WS_DLL_PUBLIC bool tvb_offset_exists(const tvbuff_t *tvb, const int offset)
Checks (without throwing an exception) whether the offset exists in the buffer.
Definition tvbuff.c:738
WS_DLL_PUBLIC const uint8_t * tvb_get_const_stringz(tvbuff_t *tvb, const int offset, int *lengthp)
Definition tvbuff.c:3663
WS_DLL_PUBLIC char * tvb_bytes_to_str_punct(wmem_allocator_t *scope, tvbuff_t *tvb, const int offset, const int len, const char punct)
Definition tvbuff.c:4612
WS_DLL_PUBLIC tvbuff_t * tvb_child_uncompress_zstd(tvbuff_t *parent, tvbuff_t *tvb, const int offset, int comprlen)
Definition tvbuff_zstd.c:101
WS_DLL_PUBLIC void tvb_set_child_real_data_tvbuff(tvbuff_t *parent, tvbuff_t *child)
Attach a "real" tvbuff to a parent tvbuff.
Definition tvbuff_real.c:96
void(* tvbuff_free_cb_t)(void *)
Definition tvbuff.h:103
WS_DLL_PUBLIC char * tvb_get_ts_23_038_7bits_string_unpacked(wmem_allocator_t *scope, tvbuff_t *tvb, const int offset, int length)
Definition tvbuff.c:3084
WS_DLL_PUBLIC unsigned tvb_captured_length(const tvbuff_t *tvb)
Get the amount of captured data in the buffer.
Definition tvbuff.c:541
WS_DLL_PUBLIC char * tvb_format_text(wmem_allocator_t *scope, tvbuff_t *tvb, const int offset, const int size)
Definition tvbuff.c:2788
WS_DLL_PUBLIC unsigned tvb_ensure_reported_length_remaining(const tvbuff_t *tvb, const int offset)
Same as tvb_reported_length_remaining but throws an exception if the offset is out of bounds.
Definition tvbuff.c:782
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.
Definition tvbuff_composite.c:216
WS_DLL_PUBLIC tvbuff_t * tvb_new_composite(void)
Create an empty composite tvbuff.
Definition tvbuff_composite.c:201
WS_DLL_PUBLIC void tvb_ensure_bytes_exist(const tvbuff_t *tvb, const int offset, const int length)
Checks that the bytes referred to by 'offset' and 'length' actually exist in the buffer.
Definition tvbuff.c:653
WS_DLL_PUBLIC int tvb_strncaseeql(tvbuff_t *tvb, const int offset, const char *str, const size_t size)
Definition tvbuff.c:2734
WS_DLL_PUBLIC char * tvb_get_ts_23_038_7bits_string_packed(wmem_allocator_t *scope, tvbuff_t *tvb, const int bit_offset, int no_of_chars)
Definition tvbuff.c:3070
WS_DLL_PUBLIC int tvb_find_uint8(tvbuff_t *tvb, const int offset, const int maxlength, const uint8_t needle)
Definition tvbuff.c:2464
WS_DLL_PUBLIC tvbuff_t * tvb_child_uncompress_snappy(tvbuff_t *parent, tvbuff_t *tvb, const int offset, int comprlen)
Definition tvbuff_snappy.c:66
tvbuff_t * base64_to_tvb(tvbuff_t *parent, const char *base64)
Definition tvbuff_base64.c:169
WS_DLL_PUBLIC int tvb_reported_length_remaining(const tvbuff_t *tvb, const int offset)
Computes bytes of reported packet data from the given offset to the end of buffer.
Definition tvbuff.c:764
WS_DLL_PUBLIC const uint8_t * tvb_get_ptr(tvbuff_t *tvb, const int offset, const int length)
Definition tvbuff.c:1013
WS_DLL_PUBLIC void tvb_ensure_bytes_exist64(const tvbuff_t *tvb, const int offset, const uint64_t length)
Checks that the bytes referred to by 'offset' and 'length' actually exist in the buffer.
Definition tvbuff.c:636
WS_DLL_PUBLIC const char * tvb_bcd_dig_to_str_be(wmem_allocator_t *scope, tvbuff_t *tvb, const int offset, const int len, const dgt_set_t *dgt, bool skip_first)
Definition tvbuff.c:4726
WS_DLL_PUBLIC int tvb_captured_length_remaining(const tvbuff_t *tvb, const int offset)
Computes bytes to end of buffer from the given offset.
Definition tvbuff.c:563
WS_DLL_PUBLIC tvbuff_t * tvb_child_uncompress_zlib(tvbuff_t *parent, tvbuff_t *tvb, const int offset, int comprlen)
Definition tvbuff_zlib.c:309
WS_DLL_PUBLIC uint32_t tvb_get_ipv4(tvbuff_t *tvb, const int offset)
Definition tvbuff.c:2110
WS_DLL_PUBLIC tvbuff_t * tvb_uncompress_lznt1(tvbuff_t *tvb, const int offset, int comprlen)
Definition tvbuff_lznt1.c:109
WS_DLL_PUBLIC int tvb_find_line_end(tvbuff_t *tvb, const int offset, int len, int *next_offset, const bool desegment)
Definition tvbuff.c:4197
WS_DLL_PUBLIC tvbuff_t * tvb_new_subset_remaining(tvbuff_t *backing, const int backing_offset)
Similar to tvb_new_subset_length_caplen() but with backing_length and reported_length set to -1.
Definition tvbuff_subset.c:240
WS_DLL_PUBLIC void * tvb_memcpy(tvbuff_t *tvb, void *target, const int offset, size_t length)
Definition tvbuff.c:936
WS_DLL_PUBLIC void tvb_composite_finalize(tvbuff_t *tvb)
Mark a composite tvbuff as finalized.
Definition tvbuff_composite.c:262
WS_DLL_PUBLIC int tvb_memeql(tvbuff_t *tvb, const int offset, const uint8_t *str, size_t size)
Definition tvbuff.c:2762
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.
Definition tvbuff.c:521
tvbuff_t * base64_tvb_to_new_tvb(tvbuff_t *parent, int offset, int length)
Definition tvbuff_base64.c:184
WS_DLL_PUBLIC tvbuff_t * tvb_child_uncompress_lz77(tvbuff_t *parent, tvbuff_t *tvb, const int offset, int comprlen)
Definition tvbuff_lz77.c:136
WS_DLL_PUBLIC tvbuff_t * tvb_new_subset_length_caplen(tvbuff_t *backing, const int backing_offset, const int backing_length, const int reported_length)
Definition tvbuff_subset.c:155
WS_DLL_PUBLIC bool tvb_utf_8_isprint(tvbuff_t *tvb, const int offset, const int length)
Definition tvbuff.c:4146
WS_DLL_PUBLIC char * tvb_bytes_to_str(wmem_allocator_t *allocator, tvbuff_t *tvb, const int offset, const int len)
Definition tvbuff.c:4738
WS_DLL_PUBLIC tvbuff_t * tvb_new_octet_right_aligned(tvbuff_t *tvb, uint32_t bit_offset, int32_t no_of_bits)
Extracts a specified number of bits starting at a given bit offset, with bits counted from least sign...
Definition tvbuff.c:437
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.
Definition tvbuff_real.c:86
char * tvb_format_stringzpad_wsp(wmem_allocator_t *allocator, tvbuff_t *tvb, const int offset, const int size)
Definition tvbuff.c:2838
int tvb_get_ipv6_addr_with_prefix_len(tvbuff_t *tvb, int offset, ws_in6_addr *addr, uint32_t prefix_len)
Definition tvbuff.c:2156
WS_DLL_PUBLIC unsigned tvb_strsize(tvbuff_t *tvb, const int offset)
Definition tvbuff.c:2628
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.
Definition tvbuff.c:805
WS_DLL_PUBLIC tvbuff_t * tvb_uncompress_brotli(tvbuff_t *tvb, const int offset, int comprlen)
WS_DLL_PUBLIC tvbuff_t * tvb_child_uncompress_lz77huff(tvbuff_t *parent, tvbuff_t *tvb, const int offset, int comprlen)
Definition tvbuff_lz77huff.c:406
WS_DLL_PUBLIC int tvb_ws_mempbrk_pattern_uint8(tvbuff_t *tvb, const int offset, const int maxlength, const ws_mempbrk_pattern *pattern, unsigned char *found_needle)
Definition tvbuff.c:2584
WS_DLL_PUBLIC void * tvb_memdup(wmem_allocator_t *scope, tvbuff_t *tvb, const int offset, size_t length)
Definition tvbuff.c:994
WS_DLL_PUBLIC int tvb_skip_wsp(tvbuff_t *tvb, const int offset, const int maxlength)
Definition tvbuff.c:4469
WS_DLL_PUBLIC tvbuff_t * tvb_new_real_data(const uint8_t *data, const unsigned length, const int reported_length)
Create a tvbuff backed by existing data.
Definition tvbuff_real.c:58
char * tvb_format_stringzpad(wmem_allocator_t *scope, tvbuff_t *tvb, const int offset, const int size)
Definition tvbuff.c:2819
WS_DLL_PUBLIC unsigned tvb_get_varint(tvbuff_t *tvb, unsigned offset, unsigned maxlen, uint64_t *value, const unsigned encoding)
Definition tvbuff.c:4797
WS_DLL_PUBLIC tvbuff_t * tvb_uncompress_snappy(tvbuff_t *tvb, const int offset, int comprlen)
void tvb_composite_prepend(tvbuff_t *tvb, tvbuff_t *member)
Prepend to the list of tvbuffs that make up this composite tvbuff.
Definition tvbuff_composite.c:239
WS_DLL_PUBLIC uint32_t tvb_get_bits(tvbuff_t *tvb, const unsigned bit_offset, const int no_of_bits, const unsigned encoding)
Definition tvbuff.c:2434
WS_DLL_PUBLIC tvbuff_t * tvb_uncompress_zstd(tvbuff_t *tvb, const int offset, int comprlen)
Definition tvbuff_zstd.c:28
WS_DLL_PUBLIC tvbuff_t * tvb_uncompress_lz77(tvbuff_t *tvb, const int offset, int comprlen)
Definition tvbuff_lz77.c:97
WS_DLL_PUBLIC tvbuff_t * tvb_uncompress_zlib(tvbuff_t *tvb, const int offset, int comprlen)
WS_DLL_PUBLIC int tvb_find_line_end_unquoted(tvbuff_t *tvb, const int offset, int len, int *next_offset)
Definition tvbuff.c:4320
uint32_t ws_in4_addr
Definition inet_addr.h:22
Definition guid-utils.h:23
Definition wmem_allocator.h:27
Definition wmem_strbuf.h:39
Definition mcast_stream.h:30
Definition inet_addr.h:27
Definition tvbuff-int.h:35
unsigned length
Definition tvbuff-int.h:61
unsigned reported_length
Definition tvbuff-int.h:67
Definition ws_mempbrk.h:21