41 const uint8_t *(*tvb_get_ptr)(
struct tvbuff *tvb,
unsigned abs_offset,
unsigned abs_length);
51 void *(*tvb_memcpy)(
struct tvbuff *tvb,
void *target,
unsigned offset,
unsigned length);
89#define TVBUFF_FRAGMENT 0x00000001
90#define TVBUFF_RAW_OFFSET 0x00000002
Vtable of low-level operations implementing a specific tvbuff backing type.
Definition tvbuff-int.h:17
unsigned(* tvb_offset)(const struct tvbuff *tvb, unsigned counter)
Translates a logical counter value to a physical byte offset within the tvbuff's backing data.
Definition tvbuff-int.h:32
size_t tvb_size
Definition tvbuff-int.h:18
void(* tvb_free)(struct tvbuff *tvb)
Releases any resources owned by the tvbuff when it is freed.
Definition tvbuff-int.h:24
bool(* tvb_find_uint8)(tvbuff_t *tvb, unsigned abs_offset, unsigned limit, uint8_t needle, unsigned *found_offset)
Searches for the first occurrence of a single byte value within a region of the tvbuff.
Definition tvbuff-int.h:62
bool(* tvb_ws_mempbrk_pattern_uint8)(tvbuff_t *tvb, unsigned abs_offset, unsigned limit, const ws_mempbrk_pattern *pattern, unsigned *found_offset, unsigned char *found_needle)
Searches for the first byte within a region that matches any byte in a pre-compiled pattern.
Definition tvbuff-int.h:74
Core tvbuff (testy virtual buffer) structure representing a region of packet data,...
Definition tvbuff-int.h:95
bool initialized
Definition tvbuff-int.h:101
unsigned length
Definition tvbuff-int.h:115
unsigned raw_offset
Definition tvbuff-int.h:132
tvbuff_t * next
Definition tvbuff-int.h:97
unsigned reported_length
Definition tvbuff-int.h:120
unsigned flags
Definition tvbuff-int.h:102
const uint8_t * real_data
Definition tvbuff-int.h:109
const struct tvb_ops * ops
Definition tvbuff-int.h:100
unsigned contained_length
Definition tvbuff-int.h:128
struct tvbuff * ds_tvb
Definition tvbuff-int.h:103
Definition ws_mempbrk.h:21
void tvb_validate_offset_length(const tvbuff_t *tvb, const unsigned offset, const unsigned length)
Validates that an offset and length are within the bounds of a TVBuffer.
Definition tvbuff.c:302
void tvb_validate_offset_and_remaining(const tvbuff_t *tvb, const unsigned offset, unsigned *rem_len)
Validates that an offset and remaining length are within the bounds of a TVBuffer.
Definition tvbuff.c:312
tvbuff_t * tvb_new(const struct tvb_ops *ops)
Creates a new TVB (Packet Buffer) with the specified operations.
Definition tvbuff.c:70
unsigned tvb_offset_from_real_beginning_counter(const tvbuff_t *tvb, const unsigned counter)
Calculates the offset from the real beginning of a TVBuffer using a counter.
Definition tvbuff.c:881
tvbuff_t * tvb_new_proxy(tvbuff_t *backing)
Creates a new TVBuffer that is a proxy for an existing TVBuffer.
Definition tvbuff_subset.c:234
void tvb_check_offset_length(const tvbuff_t *tvb, const int offset, int const length_val, unsigned *offset_ptr, unsigned *length_ptr)
Validates that an offset and length are within the bounds of a tvbuff.
Definition tvbuff.c:442
void tvb_add_to_chain(tvbuff_t *parent, tvbuff_t *child)
Adds a child tvbuff to the parent tvbuff chain.
Definition tvbuff.c:141