| Wireshark 4.7.3 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
wmem_user_cb.h
Go to the documentation of this file.
1
11
12#ifndef __WMEM_USER_CB_H__
13#define __WMEM_USER_CB_H__
14
15#include <glib.h>
16
17#ifdef __cplusplus
18 extern "C" {
19#endif /* __cplusplus */
20
29
31 typedef enum _wmem_cb_event_t {
32 WMEM_CB_FREE_EVENT,
33 WMEM_CB_DESTROY_EVENT
34} wmem_cb_event_t;
35
45 typedef bool (*wmem_user_cb_t) (wmem_allocator_t*, wmem_cb_event_t, void*);
46
60WS_DLL_PUBLIC
61 unsigned
62 wmem_register_callback(wmem_allocator_t *allocator, wmem_user_cb_t callback,
63 void *user_data);
64
71WS_DLL_PUBLIC
72 void
73 wmem_unregister_callback(wmem_allocator_t *allocator, unsigned id);
74
77
78#ifdef __cplusplus
79}
80#endif /* __cplusplus */
81
82#endif /* __WMEM_USER_CB_H__ */
83
84/*
85 * Editor modelines - https://www.wireshark.org/tools/modelines.html
86 *
87 * Local variables:
88 * c-basic-offset: 4
89 * tab-width: 8
90 * indent-tabs-mode: nil
91 * End:
92 *
93 * vi: set shiftwidth=4 tabstop=8 expandtab:
94 * :indentSize=4:tabSize=8:noTabs=true:
95 */
wmem_user_cb_t
bool(* wmem_user_cb_t)(wmem_allocator_t *, wmem_cb_event_t, void *)
Function signature for registered user callbacks.
Definition wmem_user_cb.h:45
wmem_cb_event_t
enum _wmem_cb_event_t wmem_cb_event_t
wmem_unregister_callback
WS_DLL_PUBLIC void wmem_unregister_callback(wmem_allocator_t *allocator, unsigned id)
Unregister the callback function with the given ID.
Definition wmem_user_cb.c:73
wmem_register_callback
WS_DLL_PUBLIC unsigned wmem_register_callback(wmem_allocator_t *allocator, wmem_user_cb_t callback, void *user_data)
Register a callback function with the given allocator pool.
Definition wmem_user_cb.c:54
_wmem_cb_event_t
_wmem_cb_event_t
Definition wmem_user_cb.h:31
WMEM_CB_FREE_EVENT
@ WMEM_CB_FREE_EVENT
Definition wmem_user_cb.h:32
WMEM_CB_DESTROY_EVENT
@ WMEM_CB_DESTROY_EVENT
Definition wmem_user_cb.h:33
wmem_allocator_t
struct _wmem_allocator_t wmem_allocator_t
Definition wmem_core.h:44