| Wireshark 4.7.0 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
next_tvb.h
Go to the documentation of this file.
1
10/* The buffers returned by these functions are all allocated with a
11 * packet lifetime or are static buffers and does not have to be freed.
12 * However, take into account that when the packet dissection
13 * completes, these buffers will be automatically reclaimed/freed.
14 * If you need the buffer to remain for a longer scope than packet lifetime
15 * you must copy the content to an wmem_file_scope() buffer.
16 */
17
18#ifndef __NEXT_TVB_H__
19#define __NEXT_TVB_H__
20
21#include "ws_symbol_export.h"
22#include <epan/packet.h>
23
24 typedef enum {
25 NTVB_HANDLE,
26 NTVB_UINT,
27 NTVB_STRING
28} next_tvb_call_e;
29
30/* For old code that hasn't yet been changed. */
31#define NTVB_PORT NTVB_UINT
32
33 typedef struct next_tvb_item {
34 struct next_tvb_item *next;
35 struct next_tvb_item *previous;
36 next_tvb_call_e type;
37 dissector_handle_t handle;
38 dissector_table_t table;
39 uint32_t uint_val;
40 const char *string;
41 tvbuff_t *tvb;
42 proto_tree *tree;
43} next_tvb_item_t;
44
45 typedef struct {
46 next_tvb_item_t *first;
47 next_tvb_item_t *last;
48 wmem_allocator_t *pool;
49 int count;
50} next_tvb_list_t;
51
52WS_DLL_PUBLIC next_tvb_list_t* next_tvb_list_new(wmem_allocator_t *pool);
53WS_DLL_PUBLIC void next_tvb_add_handle(next_tvb_list_t *list, tvbuff_t *tvb, proto_tree *tree, dissector_handle_t handle);
54WS_DLL_PUBLIC void next_tvb_add_uint(next_tvb_list_t *list, tvbuff_t *tvb, proto_tree *tree, dissector_table_t table, uint32_t uint_val);
55WS_DLL_PUBLIC void next_tvb_add_string(next_tvb_list_t *list, tvbuff_t *tvb, proto_tree *tree, dissector_table_t table, const char *string);
56WS_DLL_PUBLIC void next_tvb_call(next_tvb_list_t *list, packet_info *pinfo, proto_tree *tree, dissector_handle_t handle, dissector_handle_t data_handle);
57
58#endif /* __NEXT_TVB_H__ */
packet.h
_packet_info
Definition packet_info.h:43
_proto_node
Definition proto.h:905
_wmem_allocator_t
Internal memory allocator interface used by the wmem subsystem.
Definition wmem_allocator.h:34
dissector_handle
Definition packet.c:852
dissector_table
Definition packet.c:97
next_tvb_item
Definition next_tvb.h:33
next_tvb_list_t
Definition next_tvb.h:45
tvbuff
Definition tvbuff-int.h:36