Wireshark 4.5.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
11#ifndef __PROTO_DATA_H__
12#define __PROTO_DATA_H__
13
14#include "ws_symbol_export.h"
15
16#ifdef __cplusplus
17extern "C" {
18#endif /* __cplusplus */
19
29/* Allocator should be either pinfo->pool or wmem_file_scope() */
30
46WS_DLL_PUBLIC void p_add_proto_data(wmem_allocator_t *scope, struct _packet_info* pinfo, int proto, uint32_t key, void *proto_data);
47
64WS_DLL_PUBLIC void p_set_proto_data(wmem_allocator_t *scope, struct _packet_info* pinfo, int proto, uint32_t key, void *proto_data);
65
77WS_DLL_PUBLIC void *p_get_proto_data(wmem_allocator_t *scope, struct _packet_info* pinfo, int proto, uint32_t key);
78
87WS_DLL_PUBLIC void p_remove_proto_data(wmem_allocator_t *scope, struct _packet_info* pinfo, int proto, uint32_t key);
88
89char *p_get_proto_name_and_key(wmem_allocator_t *scope, struct _packet_info* pinfo, unsigned pfd_index);
90
98WS_DLL_PUBLIC void p_set_proto_depth(struct _packet_info* pinfo, int proto, unsigned depth);
99
106WS_DLL_PUBLIC unsigned p_get_proto_depth(struct _packet_info* pinfo, int proto);
107
110#ifdef __cplusplus
111}
112#endif /* __cplusplus */
113
114#endif /* __PROTO_DATA__ */
115
116/*
117 * Editor modelines - https://www.wireshark.org/tools/modelines.html
118 *
119 * Local variables:
120 * c-basic-offset: 2
121 * tab-width: 8
122 * indent-tabs-mode: nil
123 * End:
124 *
125 * vi: set shiftwidth=2 tabstop=8 expandtab:
126 * :indentSize=2:tabSize=8:noTabs=true:
127 */
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:43
Definition wmem_allocator.h:27