14#include "ws_symbol_export.h"
20#define SUBTREE_UNDEFINED_LENGTH -1
53ptvcursor_add(ptvcursor_t* ptvc,
int hf,
int length,
const unsigned encoding);
70ptvcursor_add_ret_uint(ptvcursor_t* ptvc,
int hf,
unsigned length,
const unsigned encoding, uint32_t *retval);
87ptvcursor_add_ret_int(ptvcursor_t* ptvc,
int hf,
unsigned length,
const unsigned encoding, int32_t *retval);
242 const unsigned encoding,
int ett_subtree);
261 int ett_subtree,
const char* format, ...)
276ptvcursor_set_subtree(ptvcursor_t* ptvc,
proto_item* it,
int ett_subtree);
proto_node proto_item
Definition proto.h:927
struct _wmem_allocator_t wmem_allocator_t
Definition wmem_core.h:44
WS_DLL_PUBLIC proto_tree * ptvcursor_add_with_subtree(ptvcursor_t *ptvc, int hfindex, int length, const unsigned encoding, int ett_subtree)
Adds text with a subtree to the cursor.
Definition proto.c:1440
WS_DLL_PUBLIC proto_item * ptvcursor_add(ptvcursor_t *ptvc, int hf, int length, const unsigned encoding)
Adds data from tvbuff to proto_tree and increments offset.
Definition proto.c:4516
WS_DLL_PUBLIC proto_item * ptvcursor_add_ret_boolean(ptvcursor_t *ptvc, int hf, unsigned length, const unsigned encoding, bool *retval)
Adds a boolean value to the protocol tree and returns it.
Definition proto.c:3735
WS_DLL_PUBLIC tvbuff_t * ptvcursor_tvbuff(ptvcursor_t *ptvc)
Retrieves the tvbuff associated with the protocol tree cursor.
Definition proto.c:1344
WS_DLL_PUBLIC proto_tree * ptvcursor_tree(ptvcursor_t *ptvc)
Returns the current proto_tree associated with the ptvcursor.
Definition proto.c:1357
WS_DLL_PUBLIC proto_item * ptvcursor_add_ret_int(ptvcursor_t *ptvc, int hf, unsigned length, const unsigned encoding, int32_t *retval)
Adds an integer value to the protocol tree and returns it.
Definition proto.c:3625
WS_DLL_PUBLIC void ptvcursor_advance(ptvcursor_t *ptvc, unsigned length)
Advances the ptvcursor's offset within its tvbuff without adding anything to the proto_tree.
Definition proto.c:4906
WS_DLL_PUBLIC proto_tree * ptvcursor_add_text_with_subtree(ptvcursor_t *ptvc, int length, int ett_subtree, const char *format,...)
Adds text with a subtree to the cursor.
Definition proto.c:1458
WS_DLL_PUBLIC proto_item * ptvcursor_add_no_advance(ptvcursor_t *ptvc, int hf, int length, const unsigned encoding)
Adds a new item to the protocol tree without advancing the cursor.
Definition proto.c:4892
WS_DLL_PUBLIC void ptvcursor_pop_subtree(ptvcursor_t *ptvc)
Pops a subtree from the protocol tree cursor.
Definition proto.c:1388
WS_DLL_PUBLIC ptvcursor_t * ptvcursor_new(wmem_allocator_t *scope, proto_tree *tree, tvbuff_t *tvb, unsigned offset)
Creates a new protocol tree cursor.
Definition proto.c:1318
WS_DLL_PUBLIC unsigned ptvcursor_current_offset(ptvcursor_t *ptvc)
Returns the current offset in the protocol tree cursor.
Definition proto.c:1351
WS_DLL_PUBLIC proto_item * ptvcursor_add_ret_uint(ptvcursor_t *ptvc, int hf, unsigned length, const unsigned encoding, uint32_t *retval)
Adds a uint32_t value to the protocol tree and returns it.
Definition proto.c:3568
WS_DLL_PUBLIC proto_tree * ptvcursor_push_subtree(ptvcursor_t *ptvc, proto_item *it, int ett_subtree)
Pushes a subtree onto the tree stack of the cursor.
Definition proto.c:1373
WS_DLL_PUBLIC proto_item * ptvcursor_add_ret_string(ptvcursor_t *ptvc, int hf, int length, const unsigned encoding, wmem_allocator_t *scope, const uint8_t **retval)
Adds a string to the protocol tree and returns the proto_item* and the retrieved string value.
Definition proto.c:3684
WS_DLL_PUBLIC void ptvcursor_free(ptvcursor_t *ptvc)
Frees a ptvcursor_t structure.
Definition proto.c:1336
WS_DLL_PUBLIC void ptvcursor_set_tree(ptvcursor_t *ptvc, proto_tree *tree)
Sets a new proto_tree* for the ptvcursor_t.
Definition proto.c:1366