25 #include <epan/guid-utils.h> 26 #include <epan/wmem/wmem.h> 27 #include <epan/ipv6.h> 30 #include "wsutil/ws_mempbrk.h" 110 guint32 bit_offset, gint32 no_of_bits);
177 const gint backing_offset,
const gint backing_length,
191 const gint backing_offset);
214 WS_DLL_PUBLIC guint tvb_captured_length(
const tvbuff_t *tvb);
228 WS_DLL_PUBLIC gboolean tvb_bytes_exist(
const tvbuff_t *tvb,
const gint offset,
235 const gint offset,
const guint64
length);
240 const gint offset,
const gint
length);
243 WS_DLL_PUBLIC gboolean tvb_offset_exists(
const tvbuff_t *tvb,
247 WS_DLL_PUBLIC guint tvb_reported_length(
const tvbuff_t *tvb);
264 WS_DLL_PUBLIC guint tvb_offset_from_real_beginning(
const tvbuff_t *tvb);
267 WS_DLL_PUBLIC gint tvb_raw_offset(
tvbuff_t *tvb);
278 WS_DLL_PUBLIC guint8 tvb_get_guint8(
tvbuff_t *tvb,
const gint offset);
279 WS_DLL_PUBLIC gint8 tvb_get_gint8(
tvbuff_t *tvb,
const gint offset);
281 WS_DLL_PUBLIC guint16 tvb_get_ntohs(
tvbuff_t *tvb,
const gint offset);
282 WS_DLL_PUBLIC gint16 tvb_get_ntohis(
tvbuff_t *tvb,
const gint offset);
283 WS_DLL_PUBLIC guint32 tvb_get_ntoh24(
tvbuff_t *tvb,
const gint offset);
284 WS_DLL_PUBLIC gint32 tvb_get_ntohi24(
tvbuff_t *tvb,
const gint offset);
285 WS_DLL_PUBLIC guint32 tvb_get_ntohl(
tvbuff_t *tvb,
const gint offset);
286 WS_DLL_PUBLIC gint32 tvb_get_ntohil(
tvbuff_t *tvb,
const gint offset);
287 WS_DLL_PUBLIC guint64 tvb_get_ntoh40(
tvbuff_t *tvb,
const gint offset);
288 WS_DLL_PUBLIC gint64 tvb_get_ntohi40(
tvbuff_t *tvb,
const gint offset);
289 WS_DLL_PUBLIC guint64 tvb_get_ntoh48(
tvbuff_t *tvb,
const gint offset);
290 WS_DLL_PUBLIC gint64 tvb_get_ntohi48(
tvbuff_t *tvb,
const gint offset);
291 WS_DLL_PUBLIC guint64 tvb_get_ntoh56(
tvbuff_t *tvb,
const gint offset);
292 WS_DLL_PUBLIC gint64 tvb_get_ntohi56(
tvbuff_t *tvb,
const gint offset);
293 WS_DLL_PUBLIC guint64 tvb_get_ntoh64(
tvbuff_t *tvb,
const gint offset);
294 WS_DLL_PUBLIC gint64 tvb_get_ntohi64(
tvbuff_t *tvb,
const gint offset);
295 WS_DLL_PUBLIC gfloat tvb_get_ntohieee_float(
tvbuff_t *tvb,
const gint offset);
296 WS_DLL_PUBLIC gdouble tvb_get_ntohieee_double(
tvbuff_t *tvb,
299 WS_DLL_PUBLIC guint16 tvb_get_letohs(
tvbuff_t *tvb,
const gint offset);
300 WS_DLL_PUBLIC gint16 tvb_get_letohis(
tvbuff_t *tvb,
const gint offset);
301 WS_DLL_PUBLIC guint32 tvb_get_letoh24(
tvbuff_t *tvb,
const gint offset);
302 WS_DLL_PUBLIC gint32 tvb_get_letohi24(
tvbuff_t *tvb,
const gint offset);
303 WS_DLL_PUBLIC guint32 tvb_get_letohl(
tvbuff_t *tvb,
const gint offset);
304 WS_DLL_PUBLIC gint32 tvb_get_letohil(
tvbuff_t *tvb,
const gint offset);
305 WS_DLL_PUBLIC guint64 tvb_get_letoh40(
tvbuff_t *tvb,
const gint offset);
306 WS_DLL_PUBLIC gint64 tvb_get_letohi40(
tvbuff_t *tvb,
const gint offset);
307 WS_DLL_PUBLIC guint64 tvb_get_letoh48(
tvbuff_t *tvb,
const gint offset);
308 WS_DLL_PUBLIC gint64 tvb_get_letohi48(
tvbuff_t *tvb,
const gint offset);
309 WS_DLL_PUBLIC guint64 tvb_get_letoh56(
tvbuff_t *tvb,
const gint offset);
310 WS_DLL_PUBLIC gint64 tvb_get_letohi56(
tvbuff_t *tvb,
const gint offset);
311 WS_DLL_PUBLIC guint64 tvb_get_letoh64(
tvbuff_t *tvb,
const gint offset);
312 WS_DLL_PUBLIC gint64 tvb_get_letohi64(
tvbuff_t *tvb,
const gint offset);
313 WS_DLL_PUBLIC gfloat tvb_get_letohieee_float(
tvbuff_t *tvb,
const gint offset);
314 WS_DLL_PUBLIC gdouble tvb_get_letohieee_double(
tvbuff_t *tvb,
317 WS_DLL_PUBLIC guint16 tvb_get_guint16(
tvbuff_t *tvb,
const gint offset,
const guint encoding);
318 WS_DLL_PUBLIC gint16 tvb_get_gint16(
tvbuff_t *tvb,
const gint offset,
const guint encoding);
319 WS_DLL_PUBLIC guint32 tvb_get_guint24(
tvbuff_t *tvb,
const gint offset,
const guint encoding);
320 WS_DLL_PUBLIC gint32 tvb_get_gint24(
tvbuff_t *tvb,
const gint offset,
const guint encoding);
321 WS_DLL_PUBLIC guint32 tvb_get_guint32(
tvbuff_t *tvb,
const gint offset,
const guint encoding);
322 WS_DLL_PUBLIC gint32 tvb_get_gint32(
tvbuff_t *tvb,
const gint offset,
const guint encoding);
323 WS_DLL_PUBLIC guint64 tvb_get_guint40(
tvbuff_t *tvb,
const gint offset,
const guint encoding);
324 WS_DLL_PUBLIC gint64 tvb_get_gint40(
tvbuff_t *tvb,
const gint offset,
const guint encoding);
325 WS_DLL_PUBLIC guint64 tvb_get_guint48(
tvbuff_t *tvb,
const gint offset,
const guint encoding);
326 WS_DLL_PUBLIC gint64 tvb_get_gint48(
tvbuff_t *tvb,
const gint offset,
const guint encoding);
327 WS_DLL_PUBLIC guint64 tvb_get_guint56(
tvbuff_t *tvb,
const gint offset,
const guint encoding);
328 WS_DLL_PUBLIC gint64 tvb_get_gint56(
tvbuff_t *tvb,
const gint offset,
const guint encoding);
329 WS_DLL_PUBLIC guint64 tvb_get_guint64(
tvbuff_t *tvb,
const gint offset,
const guint encoding);
330 WS_DLL_PUBLIC gint64 tvb_get_gint64(
tvbuff_t *tvb,
const gint offset,
const guint encoding);
331 WS_DLL_PUBLIC gfloat tvb_get_ieee_float(
tvbuff_t *tvb,
const gint offset,
const guint encoding);
332 WS_DLL_PUBLIC gdouble tvb_get_ieee_double(
tvbuff_t *tvb,
const gint offset,
const guint encoding);
341 #if G_BYTE_ORDER == G_LITTLE_ENDIAN 342 #define tvb_get_h_guint16 tvb_get_letohs 343 #define tvb_get_h_guint32 tvb_get_letohl 344 #elif G_BYTE_ORDER == G_BIG_ENDIAN 345 #define tvb_get_h_guint16 tvb_get_ntohs 346 #define tvb_get_h_guint32 tvb_get_ntohl 348 #error "Unsupported byte order" 380 const guint encoding,
nstime_t* ns, gint *endoff);
391 GByteArray* tvb_get_string_bytes(
tvbuff_t *tvb,
const gint offset,
const gint
length,
392 const guint encoding, GByteArray* bytes, gint *endoff);
401 WS_DLL_PUBLIC
void tvb_get_ipv6(
tvbuff_t *tvb,
const gint offset,
405 WS_DLL_PUBLIC
void tvb_get_ntohguid(
tvbuff_t *tvb,
const gint offset,
407 WS_DLL_PUBLIC
void tvb_get_letohguid(
tvbuff_t *tvb,
const gint offset,
409 WS_DLL_PUBLIC
void tvb_get_guid(
tvbuff_t *tvb,
const gint offset,
410 e_guid_t *guid,
const guint encoding);
417 WS_DLL_PUBLIC guint8 tvb_get_bits8(
tvbuff_t *tvb, guint bit_offset,
418 const gint no_of_bits);
420 WS_DLL_PUBLIC guint16 tvb_get_bits16(
tvbuff_t *tvb, guint bit_offset,
421 const gint no_of_bits,
const guint encoding);
423 WS_DLL_PUBLIC guint32 tvb_get_bits32(
tvbuff_t *tvb, guint bit_offset,
424 const gint no_of_bits,
const guint encoding);
426 WS_DLL_PUBLIC guint64 tvb_get_bits64(
tvbuff_t *tvb, guint bit_offset,
427 const gint no_of_bits,
const guint encoding);
434 const gint no_of_bits,
const guint encoding);
461 const gint offset,
size_t length);
499 const gint maxlength,
const guint8 needle);
503 const gint maxlength,
const guint16 needle);
537 const guint maxlength);
589 tvbuff_t *tvb,
const gint offset,
const gint
length,
const guint encoding);
612 tvbuff_t *tvb,
const gint bit_offset, gint no_of_chars);
635 tvbuff_t *tvb,
const gint bit_offset, gint no_of_chars);
658 tvbuff_t *tvb,
const gint offset,
const gint
length,
const guint encoding);
687 tvbuff_t *tvb,
const gint offset, gint *lengthp,
const guint encoding);
708 const gint offset, gint *lengthp);
724 const guint bufsize, guint8 *
buffer);
733 const guint bufsize, guint8 *
buffer);
755 gint *next_offset,
const gboolean desegment);
776 int len, gint *next_offset);
796 const gint maxlength);
798 WS_DLL_PUBLIC gint tvb_skip_wsp_return(
tvbuff_t *tvb,
const gint offset);
800 int tvb_skip_guint8(
tvbuff_t *tvb,
int offset,
const int maxlength,
const guint8 ch);
807 const gchar *str,
const size_t size);
814 const gchar *str,
const size_t size);
821 const guint8 *str,
size_t size);
829 const gint len,
const gchar punct);
836 const gint offset,
const gint len);
850 const unsigned char out[16];
854 WS_DLL_PUBLIC
const gchar *tvb_bcd_dig_to_wmem_packet_str(
tvbuff_t *tvb,
855 const gint offset,
const gint len,
const dgt_set_t *dgt,
856 gboolean skip_first);
863 const gint haystack_offset);
881 const int offset,
int comprlen);
903 WS_DLL_PUBLIC guint
tvb_get_varint(
tvbuff_t *tvb, guint offset, guint maxlen, guint64 *value,
const guint encoding);
WS_DLL_PUBLIC guint tvb_unicode_strsize(tvbuff_t *tvb, const gint offset)
Definition: tvbuff.c:2223
WS_DLL_PUBLIC gint tvb_get_nstringz(tvbuff_t *tvb, const gint offset, const guint bufsize, guint8 *buffer)
Definition: tvbuff.c:3287
WS_DLL_PUBLIC gint tvb_captured_length_remaining(const tvbuff_t *tvb, const gint offset)
Definition: tvbuff.c:497
WS_DLL_PUBLIC const guint8 * tvb_get_const_stringz(tvbuff_t *tvb, const gint offset, gint *lengthp)
Definition: tvbuff.c:2941
Definition: inet_ipv6.h:20
void(* tvbuff_free_cb_t)(void *)
Definition: tvbuff.h:103
WS_DLL_PUBLIC gchar * tvb_bytes_to_str_punct(wmem_allocator_t *scope, tvbuff_t *tvb, const gint offset, const gint len, const gchar punct)
Definition: tvbuff.c:3684
WS_DLL_PUBLIC gint tvb_find_guint16(tvbuff_t *tvb, const gint offset, const gint maxlength, const guint16 needle)
Definition: tvbuff.c:2085
WS_DLL_PUBLIC gint tvb_strnlen(tvbuff_t *tvb, const gint offset, const guint maxlength)
Definition: tvbuff.c:2244
Definition: ws_mempbrk.h:21
WS_DLL_PUBLIC guint tvb_get_varint(tvbuff_t *tvb, guint offset, guint maxlen, guint64 *value, const guint encoding)
Definition: tvbuff.c:3826
WS_DLL_PUBLIC tvbuff_t * tvb_new_octet_aligned(tvbuff_t *tvb, guint32 bit_offset, gint32 no_of_bits)
Definition: tvbuff.c:371
WS_DLL_PUBLIC void tvb_ensure_bytes_exist(const tvbuff_t *tvb, const gint offset, const gint length)
Definition: tvbuff.c:583
WS_DLL_PUBLIC gint tvb_get_nstringz0(tvbuff_t *tvb, const gint offset, const guint bufsize, guint8 *buffer)
Definition: tvbuff.c:3301
struct dgt_set_t dgt_set_t
WS_DLL_PUBLIC gint tvb_skip_wsp(tvbuff_t *tvb, const gint offset, const gint maxlength)
Definition: tvbuff.c:3612
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)
Definition: tvbuff.c:2614
Definition: tvbuff-int.h:35
WS_DLL_PUBLIC tvbuff_t * tvb_new_real_data(const guint8 *data, const guint length, const gint reported_length)
Definition: tvbuff_real.c:58
WS_DLL_PUBLIC guint tvb_strsize(tvbuff_t *tvb, const gint offset)
Definition: tvbuff.c:2193
WS_DLL_PUBLIC tvbuff_t * tvb_uncompress(tvbuff_t *tvb, const int offset, int comprlen)
WS_DLL_PUBLIC void * tvb_memdup(wmem_allocator_t *scope, tvbuff_t *tvb, const gint offset, size_t length)
Definition: tvbuff.c:881
WS_DLL_PUBLIC guint8 * tvb_get_string_enc(wmem_allocator_t *scope, tvbuff_t *tvb, const gint offset, const gint length, const guint encoding)
Definition: tvbuff.c:2675
WS_DLL_PUBLIC gint tvb_strncaseeql(tvbuff_t *tvb, const gint offset, const gchar *str, const size_t size)
Definition: tvbuff.c:2299
WS_DLL_PUBLIC gint tvb_memeql(tvbuff_t *tvb, const gint offset, const guint8 *str, size_t size)
Definition: tvbuff.c:2327
gchar * tvb_format_stringzpad_wsp(wmem_allocator_t *allocator, tvbuff_t *tvb, const gint offset, const gint size)
Definition: tvbuff.c:2405
WS_DLL_PUBLIC tvbuff_t * tvb_new_subset_length_caplen(tvbuff_t *backing, const gint backing_offset, const gint backing_length, const gint reported_length)
Definition: tvbuff_subset.c:135
Definition: guid-utils.h:21
WS_DLL_PUBLIC gint tvb_find_tvb(tvbuff_t *haystack_tvb, tvbuff_t *needle_tvb, const gint haystack_offset)
Definition: tvbuff.c:3776
WS_DLL_PUBLIC guint32 tvb_get_ipv4(tvbuff_t *tvb, const gint offset)
Definition: tvbuff.c:1835
WS_DLL_PUBLIC void * tvb_memcpy(tvbuff_t *tvb, void *target, const gint offset, size_t length)
Definition: tvbuff.c:823
WS_DLL_PUBLIC gchar * tvb_format_text(tvbuff_t *tvb, const gint offset, const gint size)
Definition: tvbuff.c:2354
WS_DLL_PUBLIC guint8 * tvb_get_stringz_enc(wmem_allocator_t *scope, tvbuff_t *tvb, const gint offset, gint *lengthp, const guint encoding)
Definition: tvbuff.c:3031
WS_DLL_PUBLIC void tvb_set_reported_length(tvbuff_t *tvb, const guint)
Definition: tvbuff.c:715
WS_DLL_PUBLIC gint tvb_find_guint8(tvbuff_t *tvb, const gint offset, const gint maxlength, const guint8 needle)
Definition: tvbuff.c:2046
gchar * tvb_format_stringzpad(tvbuff_t *tvb, const gint offset, const gint size)
Definition: tvbuff.c:2386
WS_DLL_PUBLIC void tvb_free_chain(tvbuff_t *tvb)
Definition: tvbuff.c:118
WS_DLL_PUBLIC tvbuff_t * tvb_new_subset_length(tvbuff_t *backing, const gint backing_offset, const gint reported_length)
Definition: tvbuff_subset.c:164
Definition: wmem_allocator.h:26
void tvb_composite_prepend(tvbuff_t *tvb, tvbuff_t *member)
Definition: tvbuff_composite.c:231
guint length
Definition: tvbuff-int.h:61
guint reported_length
Definition: tvbuff-int.h:67
WS_DLL_PUBLIC gint tvb_strneql(tvbuff_t *tvb, const gint offset, const gchar *str, const size_t size)
Definition: tvbuff.c:2272
WS_DLL_PUBLIC void tvb_set_free_cb(tvbuff_t *tvb, const tvbuff_free_cb_t func)
Definition: tvbuff_real.c:86
WS_DLL_PUBLIC gchar * tvb_get_ascii_7bits_string(wmem_allocator_t *scope, tvbuff_t *tvb, const gint bit_offset, gint no_of_chars)
Definition: tvbuff.c:2628
WS_DLL_PUBLIC tvbuff_t * tvb_new_subset_remaining(tvbuff_t *backing, const gint backing_offset)
Definition: tvbuff_subset.c:197
WS_DLL_PUBLIC void tvb_composite_append(tvbuff_t *tvb, tvbuff_t *member)
Definition: tvbuff_composite.c:213
WS_DLL_PUBLIC void tvb_free(tvbuff_t *tvb)
Definition: tvbuff.c:112
WS_DLL_PUBLIC gint tvb_find_line_end(tvbuff_t *tvb, const gint offset, int len, gint *next_offset, const gboolean desegment)
Definition: tvbuff.c:3340
WS_DLL_PUBLIC guint8 * tvb_get_stringzpad(wmem_allocator_t *scope, tvbuff_t *tvb, const gint offset, const gint length, const guint encoding)
Definition: tvbuff.c:2856
Definition: mcast_stream.h:30
WS_DLL_PUBLIC gint tvb_find_line_end_unquoted(tvbuff_t *tvb, const gint offset, int len, gint *next_offset)
Definition: tvbuff.c:3463
WS_DLL_PUBLIC void tvb_composite_finalize(tvbuff_t *tvb)
Definition: tvbuff_composite.c:249
WS_DLL_PUBLIC tvbuff_t * tvb_new_composite(void)
Definition: tvbuff_composite.c:199
tvbuff_t * base64_to_tvb(tvbuff_t *parent, const char *base64)
Definition: tvbuff_base64.c:19
WS_DLL_PUBLIC guint32 tvb_get_bits(tvbuff_t *tvb, const guint bit_offset, const gint no_of_bits, const guint encoding)
Definition: tvbuff.c:2017
WS_DLL_PUBLIC guint tvb_ensure_captured_length_remaining(const tvbuff_t *tvb, const gint offset)
Definition: tvbuff.c:512
WS_DLL_PUBLIC void tvb_set_fragment(tvbuff_t *tvb)
Definition: tvbuff.c:3814
WS_DLL_PUBLIC void tvb_ensure_bytes_exist64(const tvbuff_t *tvb, const gint offset, const guint64 length)
Definition: tvbuff.c:566
WS_DLL_PUBLIC void tvb_set_child_real_data_tvbuff(tvbuff_t *parent, tvbuff_t *child)
Definition: tvbuff_real.c:96
WS_DLL_PUBLIC gint tvb_reported_length_remaining(const tvbuff_t *tvb, const gint offset)
Definition: tvbuff.c:692
WS_DLL_PUBLIC gint tvb_ws_mempbrk_pattern_guint8(tvbuff_t *tvb, const gint offset, const gint maxlength, const ws_mempbrk_pattern *pattern, guchar *found_needle)
Definition: tvbuff.c:2149
WS_DLL_PUBLIC tvbuff_t * tvb_child_uncompress(tvbuff_t *parent, tvbuff_t *tvb, const int offset, int comprlen)
Definition: tvbuff_zlib.c:328
WS_DLL_PUBLIC const guint8 * tvb_get_ptr(tvbuff_t *tvb, const gint offset, const gint length)
Definition: tvbuff.c:897
WS_DLL_PUBLIC gchar * tvb_bytes_to_str(wmem_allocator_t *allocator, tvbuff_t *tvb, const gint offset, const gint len)
Definition: tvbuff.c:3768
WS_DLL_PUBLIC gchar * tvb_format_text_wsp(wmem_allocator_t *allocator, tvbuff_t *tvb, const gint offset, const gint size)
Definition: tvbuff.c:2369