| Wireshark 4.7.0 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
wmem_interval_tree.h
Go to the documentation of this file.
1
12#ifndef __WMEM_INTERVAL_TREE_H__
13#define __WMEM_INTERVAL_TREE_H__
14
15#include "wmem_core.h"
16#include "wmem_tree.h"
17#include "wmem_list.h"
18
19
20#ifdef __cplusplus
21 extern "C" {
22#endif /* __cplusplus */
23
36 struct _wmem_tree_t;
37
46 typedef struct _wmem_tree_t wmem_itree_t;
47
54 struct _wmem_range_t {
55 uint64_t low;
56 uint64_t high;
57 uint64_t max_edge;
58};
59
60
71WS_DLL_PUBLIC
72 wmem_itree_t *
73 wmem_itree_new(wmem_allocator_t *allocator);
74
75
84WS_DLL_PUBLIC
85 bool
86 wmem_itree_is_empty(wmem_itree_t *tree);
87
88
101WS_DLL_PUBLIC
102 void
103 wmem_itree_insert(wmem_itree_t *tree, const uint64_t low, const uint64_t high, void *data);
104
105
119WS_DLL_PUBLIC
120 wmem_list_t *
121 wmem_itree_find_intervals(wmem_itree_t *tree, wmem_allocator_t *allocator, uint64_t low, uint64_t high);
122
123
133 void
134 wmem_print_itree(wmem_itree_t *tree);
135
139#ifdef __cplusplus
140}
141#endif /* __cplusplus */
142
143#endif /* __WMEM_INTERVAL_TREE_H__ */
144
145/*
146 * Editor modelines - https://www.wireshark.org/tools/modelines.html
147 *
148 * Local variables:
149 * c-basic-offset: 4
150 * tab-width: 8
151 * indent-tabs-mode: nil
152 * End:
153 *
154 * vi: set shiftwidth=4 tabstop=8 expandtab:
155 * :indentSize=4:tabSize=8:noTabs=true:
156 */
wmem_itree_new
WS_DLL_PUBLIC wmem_itree_t * wmem_itree_new(wmem_allocator_t *allocator)
Create a new interval tree using the specified memory allocator.
Definition wmem_interval_tree.c:91
wmem_itree_find_intervals
WS_DLL_PUBLIC wmem_list_t * wmem_itree_find_intervals(wmem_itree_t *tree, wmem_allocator_t *allocator, uint64_t low, uint64_t high)
Find all intervals overlapping a given range in an interval tree.
Definition wmem_interval_tree.c:161
wmem_itree_is_empty
WS_DLL_PUBLIC bool wmem_itree_is_empty(wmem_itree_t *tree)
Check whether an interval tree is empty.
Definition wmem_interval_tree.c:99
wmem_print_itree
void wmem_print_itree(wmem_itree_t *tree)
Print all intervals stored in the interval tree.
Definition wmem_interval_tree.c:173
wmem_itree_insert
WS_DLL_PUBLIC void wmem_itree_insert(wmem_itree_t *tree, const uint64_t low, const uint64_t high, void *data)
Insert an interval into the interval tree.
Definition wmem_interval_tree.c:120
_wmem_allocator_t
Internal memory allocator interface used by the wmem subsystem.
Definition wmem_allocator.h:34
_wmem_list_t
Definition wmem_list.c:23
_wmem_range_t
Represents a numeric range used in wmem's internal range tree.
Definition wmem_interval_tree.h:54
_wmem_range_t::low
uint64_t low
Definition wmem_interval_tree.h:55
_wmem_range_t::high
uint64_t high
Definition wmem_interval_tree.h:56
_wmem_range_t::max_edge
uint64_t max_edge
Definition wmem_interval_tree.h:57
_wmem_tree_t
Internal representation of a wmem balanced tree.
Definition wmem_tree-int.h:81
wmem_core.h
wmem_list.h
wmem_tree.h