Wireshark 4.7.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
proto_data.h
Go to the documentation of this file.
1/* proto_data.h
2 * Definitions for protocol-specific data
3 *
4 * Wireshark - Network traffic analyzer
5 * By Gerald Combs <gerald@wireshark.org>
6 * Copyright 1998 Gerald Combs
7 *
8 * SPDX-License-Identifier: GPL-2.0-or-later
9 */
10#pragma once
11#include "ws_symbol_export.h"
12
13#ifdef __cplusplus
14extern "C" {
15#endif /* __cplusplus */
16
26/* Allocator should be either pinfo->pool or wmem_file_scope() */
27
43WS_DLL_PUBLIC void p_add_proto_data(wmem_allocator_t *scope, struct _packet_info* pinfo, int proto, uint32_t key, void *proto_data);
44
61WS_DLL_PUBLIC void p_set_proto_data(wmem_allocator_t *scope, struct _packet_info* pinfo, int proto, uint32_t key, void *proto_data);
62
74WS_DLL_PUBLIC void *p_get_proto_data(wmem_allocator_t *scope, struct _packet_info* pinfo, int proto, uint32_t key);
75
84WS_DLL_PUBLIC void p_remove_proto_data(wmem_allocator_t *scope, struct _packet_info* pinfo, int proto, uint32_t key);
85
95char *p_get_proto_name_and_key(wmem_allocator_t *scope, struct _packet_info* pinfo, unsigned pfd_index);
96
104WS_DLL_PUBLIC void p_set_proto_depth(struct _packet_info* pinfo, int proto, unsigned depth);
105
112WS_DLL_PUBLIC unsigned p_get_proto_depth(struct _packet_info* pinfo, int proto);
113
116#ifdef __cplusplus
117}
118#endif /* __cplusplus */
119
120/*
121 * Editor modelines - https://www.wireshark.org/tools/modelines.html
122 *
123 * Local variables:
124 * c-basic-offset: 2
125 * tab-width: 8
126 * indent-tabs-mode: nil
127 * End:
128 *
129 * vi: set shiftwidth=2 tabstop=8 expandtab:
130 * :indentSize=2:tabSize=8:noTabs=true:
131 */
WS_DLL_PUBLIC void p_add_proto_data(wmem_allocator_t *scope, struct _packet_info *pinfo, int proto, uint32_t key, void *proto_data)
Definition proto_data.c:50
WS_DLL_PUBLIC void p_remove_proto_data(wmem_allocator_t *scope, struct _packet_info *pinfo, int proto, uint32_t key)
Definition proto_data.c:130
WS_DLL_PUBLIC void * p_get_proto_data(wmem_allocator_t *scope, struct _packet_info *pinfo, int proto, uint32_t key)
Definition proto_data.c:104
WS_DLL_PUBLIC void p_set_proto_depth(struct _packet_info *pinfo, int proto, unsigned depth)
Definition proto_data.c:172
char * p_get_proto_name_and_key(wmem_allocator_t *scope, struct _packet_info *pinfo, unsigned pfd_index)
Definition proto_data.c:156
WS_DLL_PUBLIC void p_set_proto_data(wmem_allocator_t *scope, struct _packet_info *pinfo, int proto, uint32_t key, void *proto_data)
Definition proto_data.c:77
WS_DLL_PUBLIC unsigned p_get_proto_depth(struct _packet_info *pinfo, int proto)
Definition proto_data.c:176
Represents the metadata and indexing information for a single captured frame.
Definition packet_info.h:43
Internal memory allocator interface used by the wmem subsystem.
Definition wmem_allocator.h:34