Wireshark 4.5.0
The Wireshark network protocol analyzer
|
Classes | |
struct | _packet_info |
Macros | |
#define | P2P_DIR_UNKNOWN -1 |
#define | P2P_DIR_SENT 0 |
#define | P2P_DIR_RECV 1 |
#define | LINK_DIR_UNKNOWN -1 |
#define | P2P_DIR_UL 0 |
#define | P2P_DIR_DL 1 |
#define | PINFO_HAS_TS 0x00000001 |
Typedefs | |
typedef struct _packet_info | packet_info |
Functions | |
WS_DLL_PUBLIC void | p_add_proto_data (wmem_allocator_t *scope, struct _packet_info *pinfo, int proto, uint32_t key, void *proto_data) |
WS_DLL_PUBLIC void | p_set_proto_data (wmem_allocator_t *scope, struct _packet_info *pinfo, int proto, uint32_t key, void *proto_data) |
WS_DLL_PUBLIC void * | p_get_proto_data (wmem_allocator_t *scope, struct _packet_info *pinfo, int proto, uint32_t key) |
WS_DLL_PUBLIC void | p_remove_proto_data (wmem_allocator_t *scope, struct _packet_info *pinfo, int proto, uint32_t key) |
char * | p_get_proto_name_and_key (wmem_allocator_t *scope, struct _packet_info *pinfo, unsigned pfd_index) |
WS_DLL_PUBLIC void | p_set_proto_depth (struct _packet_info *pinfo, int proto, unsigned depth) |
WS_DLL_PUBLIC unsigned | p_get_proto_depth (struct _packet_info *pinfo, int proto) |
#define PINFO_HAS_TS 0x00000001 |
time stamp
WS_DLL_PUBLIC void p_add_proto_data | ( | wmem_allocator_t * | scope, |
struct _packet_info * | pinfo, | ||
int | proto, | ||
uint32_t | key, | ||
void * | proto_data | ||
) |
Add data associated with a protocol.
This can be used to persist file-scoped data between packets or share packet-scoped data between dissectors without having to use global variables.
Each call adds a new entry to the protocol data list.
scope | The memory scope, either pinfo->pool or wmem_file_scope(). |
pinfo | This dissection's packet info. |
proto | The protocol ID. |
key | A unique key for the data. |
proto_data | The data to add. |
WS_DLL_PUBLIC void * p_get_proto_data | ( | wmem_allocator_t * | scope, |
struct _packet_info * | pinfo, | ||
int | proto, | ||
uint32_t | key | ||
) |
Fetch data associated with a protocol.
scope | The memory scope, typically pinfo->pool or wmem_file_scope(). |
pinfo | This dissection's packet info. |
proto | The protocol ID. |
key | A unique key for the data. |
WS_DLL_PUBLIC unsigned p_get_proto_depth | ( | struct _packet_info * | pinfo, |
int | proto | ||
) |
Fetch the current per-protocol and per-packet recursion, nesting, or cycling depth.
pinfo | Packet info for this packet. |
proto | The current protocol. |
WS_DLL_PUBLIC void p_remove_proto_data | ( | wmem_allocator_t * | scope, |
struct _packet_info * | pinfo, | ||
int | proto, | ||
uint32_t | key | ||
) |
Remove data associated with a protocol.
scope | The memory scope, typically pinfo->pool or wmem_file_scope(). |
pinfo | This dissection's packet info. |
proto | The protocol ID. |
key | A unique key for the data. |
WS_DLL_PUBLIC void p_set_proto_data | ( | wmem_allocator_t * | scope, |
struct _packet_info * | pinfo, | ||
int | proto, | ||
uint32_t | key, | ||
void * | proto_data | ||
) |
Set data associated with a protocol.
This can be used to persist file-scoped data between packets or share packet-scoped data between dissectors without having to use global variables.
If the protocol data list contains a matching entry it will be updated, otherwise a new entry will be created.
scope | The memory scope, either pinfo->pool or wmem_file_scope(). |
pinfo | This dissection's packet info. |
proto | The protocol ID. |
key | A unique key for the data. |
proto_data | The data to add. |
WS_DLL_PUBLIC void p_set_proto_depth | ( | struct _packet_info * | pinfo, |
int | proto, | ||
unsigned | depth | ||
) |
Initialize or update a per-protocol and per-packet check for recursion, nesting, cycling, etc.
pinfo | Packet info for this packet. |
proto | The current protocol. |
depth | The depth to set. |