18 #include <ws_symbol_export.h>
Definition: packet_info.h:44
Definition: wmem_allocator.h:27
Definition: wmem_list.c:23
Definition: tvbuff-int.h:35
A data-containing, optionally-tagged chunk of CBOR.
Definition: wscbor.h:92
gint start
The start offset of this chunk.
Definition: wscbor.h:97
wmem_list_t * tags
Tags on this chunk, in encoded order (type wscbor_tag_t*)
Definition: wscbor.h:105
cbor_type type_major
Definition: wscbor.h:109
guint64 head_value
The header-encoded value.
Definition: wscbor.h:113
gint head_length
The length of just this header and any preceding tags.
Definition: wscbor.h:99
guint8 type_minor
Minor type of this item.
Definition: wscbor.h:111
wmem_list_t * errors
Errors processing this chunk (type wscbor_error_t*)
Definition: wscbor.h:103
wscbor_chunk_priv_t * _priv
Internal private data.
Definition: wscbor.h:94
gint data_length
The length of this chunk and its immediate definite data (i.e. strings)
Definition: wscbor.h:101
Decoding or require_* error.
Definition: wscbor.h:62
expert_field * ei
The associated expert info.
Definition: wscbor.h:64
const char * msg
Optional specific text.
Definition: wscbor.h:66
Tag metadata and value.
Definition: wscbor.h:80
gint start
The start offset of this tag head.
Definition: wscbor.h:82
gint length
The length of just this tag head.
Definition: wscbor.h:84
guint64 value
The tag value.
Definition: wscbor.h:86
WS_DLL_PUBLIC gboolean wscbor_require_map(wscbor_chunk_t *chunk)
Definition: wscbor.c:507
WS_DLL_PUBLIC bool * wscbor_require_boolean(wmem_allocator_t *alloc, wscbor_chunk_t *chunk)
Definition: wscbor.c:511
WS_DLL_PUBLIC gint64 * wscbor_require_int64(wmem_allocator_t *alloc, wscbor_chunk_t *chunk)
Definition: wscbor.c:545
WS_DLL_PUBLIC gboolean wscbor_skip_if_errors(wmem_allocator_t *alloc, tvbuff_t *tvb, gint *offset, const wscbor_chunk_t *chunk)
Definition: wscbor.c:444
WS_DLL_PUBLIC proto_item * proto_tree_add_cbor_strlen(proto_tree *tree, int hfindex, packet_info *pinfo, tvbuff_t *tvb, const wscbor_chunk_t *chunk)
WS_DLL_PUBLIC gboolean wscbor_require_array_size(wscbor_chunk_t *chunk, guint64 count_min, guint64 count_max)
Definition: wscbor.c:492
cbor_type
The same enumeration from libcbor-0.5.
Definition: wscbor.h:41
@ CBOR_TYPE_MAP
maps
Definition: wscbor.h:47
@ CBOR_TYPE_FLOAT_CTRL
decimals and special values (true, false, nil, ...)
Definition: wscbor.h:49
@ CBOR_TYPE_TAG
tags
Definition: wscbor.h:48
@ CBOR_TYPE_UINT
positive integers
Definition: wscbor.h:42
@ CBOR_TYPE_BYTESTRING
byte strings
Definition: wscbor.h:44
@ CBOR_TYPE_STRING
text strings
Definition: wscbor.h:45
@ CBOR_TYPE_NEGINT
negative integers
Definition: wscbor.h:43
@ CBOR_TYPE_ARRAY
arrays
Definition: wscbor.h:46
WS_DLL_PUBLIC gboolean wscbor_skip_next_item(wmem_allocator_t *alloc, tvbuff_t *tvb, gint *offset)
Definition: wscbor.c:440
WS_DLL_PUBLIC char * wscbor_require_tstr(wmem_allocator_t *alloc, wscbor_chunk_t *chunk)
Definition: wscbor.c:582
WS_DLL_PUBLIC proto_item * proto_tree_add_cbor_ctrl(proto_tree *tree, int hfindex, packet_info *pinfo, tvbuff_t *tvb, const wscbor_chunk_t *chunk)
Definition: wscbor.c:614
WS_DLL_PUBLIC guint64 * wscbor_require_uint64(wmem_allocator_t *alloc, wscbor_chunk_t *chunk)
Definition: wscbor.c:535
WS_DLL_PUBLIC wscbor_error_t * wscbor_error_new(wmem_allocator_t *alloc, expert_field *ei, const char *format,...)
Definition: wscbor.c:170
WS_DLL_PUBLIC wscbor_chunk_t * wscbor_chunk_read(wmem_allocator_t *alloc, tvbuff_t *tvb, gint *offset)
Definition: wscbor.c:186
_cbor_ctrl
The same enumeration from libcbor-0.5.
Definition: wscbor.h:53
WS_DLL_PUBLIC gboolean wscbor_is_indefinite_break(const wscbor_chunk_t *chunk)
Definition: wscbor.c:353
WS_DLL_PUBLIC guint wscbor_has_errors(const wscbor_chunk_t *chunk)
Definition: wscbor.c:349
WS_DLL_PUBLIC tvbuff_t * wscbor_require_bstr(wmem_allocator_t *alloc, wscbor_chunk_t *chunk)
WS_DLL_PUBLIC gboolean wscbor_require_major_type(wscbor_chunk_t *chunk, cbor_type major)
Definition: wscbor.c:476
WS_DLL_PUBLIC const ei_register_info * wscbor_expert_items(int *size)
Definition: wscbor.c:469
WS_DLL_PUBLIC void wscbor_init(void)
Definition: wscbor.c:454
WS_DLL_PUBLIC gboolean wscbor_require_array(wscbor_chunk_t *chunk)
Definition: wscbor.c:488
WS_DLL_PUBLIC void wscbor_chunk_free(wscbor_chunk_t *chunk)
Definition: wscbor.c:310
WS_DLL_PUBLIC guint64 wscbor_chunk_mark_errors(packet_info *pinfo, proto_item *item, const wscbor_chunk_t *chunk)
Definition: wscbor.c:341
WS_DLL_PUBLIC proto_item * proto_tree_add_cbor_container(proto_tree *tree, int hfindex, packet_info *pinfo, tvbuff_t *tvb, const wscbor_chunk_t *chunk)
Definition: wscbor.c:598