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 <[email protected]>
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
86char *p_get_proto_name_and_key(wmem_allocator_t *scope, struct _packet_info* pinfo, unsigned pfd_index);
87
95WS_DLL_PUBLIC void p_set_proto_depth(struct _packet_info* pinfo, int proto, unsigned depth);
96
103WS_DLL_PUBLIC unsigned p_get_proto_depth(struct _packet_info* pinfo, int proto);
104
107#ifdef __cplusplus
108}
109#endif /* __cplusplus */
110
111/*
112 * Editor modelines - https://www.wireshark.org/tools/modelines.html
113 *
114 * Local variables:
115 * c-basic-offset: 2
116 * tab-width: 8
117 * indent-tabs-mode: nil
118 * End:
119 *
120 * vi: set shiftwidth=2 tabstop=8 expandtab:
121 * :indentSize=2:tabSize=8:noTabs=true:
122 */
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
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
Definition packet_info.h:40
Internal memory allocator interface used by the wmem subsystem.
Definition wmem_allocator.h:34