Wireshark 4.7.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
wmem_multimap.h
Go to the documentation of this file.
1
14#ifndef __WMEM_MULTIMAP_H__
15#define __WMEM_MULTIMAP_H__
16
17#include <glib.h>
18
19#include "wmem_core.h"
20#include "wmem_list.h"
21
22#ifdef __cplusplus
23extern "C" {
24#endif /* __cplusplus */
25
63
76WS_DLL_PUBLIC
79 GHashFunc hash_func, GEqualFunc eql_func)
80G_GNUC_MALLOC;
81
103WS_DLL_PUBLIC
106 GHashFunc hash_func, GEqualFunc eql_func)
107G_GNUC_MALLOC;
108
116WS_DLL_PUBLIC
118wmem_multimap_get_keys(wmem_allocator_t *list_allocator, const wmem_multimap_t *map);
119
126WS_DLL_PUBLIC
127unsigned
129
142WS_DLL_PUBLIC
143unsigned
144wmem_multimap_count(const wmem_multimap_t *map, const void *key);
145
162WS_DLL_PUBLIC
163bool
164wmem_multimap_insert32(wmem_multimap_t *map, const void *key, uint32_t frame_num, void *value);
165
174WS_DLL_PUBLIC
175void *
176wmem_multimap_lookup32(const wmem_multimap_t *map, const void *key, const uint32_t frame_num);
177
191WS_DLL_PUBLIC
192void *
193wmem_multimap_lookup32_le(const wmem_multimap_t *map, const void *key, const uint32_t frame_num);
194
207WS_DLL_PUBLIC
208void *
209wmem_multimap_remove32(wmem_multimap_t *map, const void *key, const uint32_t frame_num);
210
214#ifdef __cplusplus
215}
216#endif /* __cplusplus */
217
218#endif /* __WMEM_MULTIMAP_H__ */
219
220/*
221 * Editor modelines - https://www.wireshark.org/tools/modelines.html
222 *
223 * Local variables:
224 * c-basic-offset: 4
225 * tab-width: 8
226 * indent-tabs-mode: nil
227 * End:
228 *
229 * vi: set shiftwidth=4 tabstop=8 expandtab:
230 * :indentSize=4:tabSize=8:noTabs=true:
231 */
WS_DLL_PUBLIC void * wmem_multimap_lookup32_le(const wmem_multimap_t *map, const void *key, const uint32_t frame_num)
Lookup a value in the multimap with an exact match for the map key and the largest value less than or...
Definition wmem_multimap.c:153
WS_DLL_PUBLIC wmem_multimap_t * wmem_multimap_new(wmem_allocator_t *allocator, GHashFunc hash_func, GEqualFunc eql_func) G_GNUC_MALLOC
Creates a multimap with the given allocator scope.
Definition wmem_multimap.c:35
WS_DLL_PUBLIC void * wmem_multimap_remove32(wmem_multimap_t *map, const void *key, const uint32_t frame_num)
Remove a value from the multimap.
Definition wmem_multimap.c:164
WS_DLL_PUBLIC bool wmem_multimap_insert32(wmem_multimap_t *map, const void *key, uint32_t frame_num, void *value)
Insert a value in the multimap.
Definition wmem_multimap.c:126
WS_DLL_PUBLIC void * wmem_multimap_lookup32(const wmem_multimap_t *map, const void *key, const uint32_t frame_num)
Lookup a value in the multimap combination with an exact match.
Definition wmem_multimap.c:142
WS_DLL_PUBLIC unsigned wmem_multimap_count(const wmem_multimap_t *map, const void *key)
Returns the number of values in the multimap with a certain hash key.
Definition wmem_multimap.c:115
WS_DLL_PUBLIC wmem_multimap_t * wmem_multimap_new_autoreset(wmem_allocator_t *metadata_scope, wmem_allocator_t *data_scope, GHashFunc hash_func, GEqualFunc eql_func) G_GNUC_MALLOC
Creates a multimap with two allocator scopes.
Definition wmem_multimap.c:75
WS_DLL_PUBLIC wmem_list_t * wmem_multimap_get_keys(wmem_allocator_t *list_allocator, const wmem_multimap_t *map)
Retrieves a list of the keys inside the multimap.
Definition wmem_multimap.c:93
WS_DLL_PUBLIC unsigned wmem_multimap_size(const wmem_multimap_t *map)
Return the total number of elements in the multimap.
Definition wmem_multimap.c:106
Internal memory allocator interface used by the wmem subsystem.
Definition wmem_allocator.h:34
Definition wmem_list.c:23
Definition wmem_multimap.c:23