HTTPS (almost) everywhere.
[metze/wireshark/wip.git] / epan / proto_data.h
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
11 #ifndef __PROTO_DATA_H__
12 #define __PROTO_DATA_H__
13
14 #ifdef __cplusplus
15 extern "C" {
16 #endif /* __cplusplus */
17
18 #include "ws_symbol_export.h"
19
20 /* Allocator should be either pinfo->pool or wmem_file_scope() */
21 WS_DLL_PUBLIC void p_add_proto_data(wmem_allocator_t *scope, struct _packet_info* pinfo, int proto, guint32 key, void *proto_data);
22 WS_DLL_PUBLIC void *p_get_proto_data(wmem_allocator_t *scope, struct _packet_info* pinfo, int proto, guint32 key);
23 WS_DLL_PUBLIC void p_remove_proto_data(wmem_allocator_t *scope, struct _packet_info* pinfo, int proto, guint32 key);
24 gchar *p_get_proto_name_and_key(wmem_allocator_t *scope, struct _packet_info* pinfo, guint pfd_index);
25
26 #ifdef __cplusplus
27 }
28 #endif /* __cplusplus */
29
30 #endif  /* __PROTO_DATA__ */
31
32 /*
33  * Editor modelines  -  https://www.wireshark.org/tools/modelines.html
34  *
35  * Local variables:
36  * c-basic-offset: 2
37  * tab-width: 8
38  * indent-tabs-mode: nil
39  * End:
40  *
41  * vi: set shiftwidth=2 tabstop=8 expandtab:
42  * :indentSize=2:tabSize=8:noTabs=true:
43  */