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
51
64WS_DLL_PUBLIC
67 GHashFunc hash_func, GEqualFunc eql_func)
68G_GNUC_MALLOC;
69
91WS_DLL_PUBLIC
94 GHashFunc hash_func, GEqualFunc eql_func)
95G_GNUC_MALLOC;
96
104WS_DLL_PUBLIC
106wmem_multimap_get_keys(wmem_allocator_t *list_allocator, const wmem_multimap_t *map);
107
114WS_DLL_PUBLIC
115unsigned
117
130WS_DLL_PUBLIC
131unsigned
132wmem_multimap_count(const wmem_multimap_t *map, const void *key);
133
150WS_DLL_PUBLIC
151bool
152wmem_multimap_insert32(wmem_multimap_t *map, const void *key, uint32_t frame_num, void *value);
153
162WS_DLL_PUBLIC
163void *
164wmem_multimap_lookup32(const wmem_multimap_t *map, const void *key, const uint32_t frame_num);
165
179WS_DLL_PUBLIC
180void *
181wmem_multimap_lookup32_le(const wmem_multimap_t *map, const void *key, const uint32_t frame_num);
182
195WS_DLL_PUBLIC
196void *
197wmem_multimap_remove32(wmem_multimap_t *map, const void *key, const uint32_t frame_num);
198
202#ifdef __cplusplus
203}
204#endif /* __cplusplus */
205
206#endif /* __WMEM_MULTIMAP_H__ */
207
208/*
209 * Editor modelines - https://www.wireshark.org/tools/modelines.html
210 *
211 * Local variables:
212 * c-basic-offset: 4
213 * tab-width: 8
214 * indent-tabs-mode: nil
215 * End:
216 *
217 * vi: set shiftwidth=4 tabstop=8 expandtab:
218 * :indentSize=4:tabSize=8:noTabs=true:
219 */
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
Definition wmem_allocator.h:27
Definition wmem_list.c:23
Definition wmem_multimap.c:23