diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-02-13 09:42:03 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-02-13 09:42:03 +0000 |
commit | 54440ebeed80d95185531c4725bd80e3bed161e5 (patch) | |
tree | cfc09863066803f58d2f375029b19fd2d482c394 /src/include/gnunet_container_lib.h | |
parent | 5bc01eca77a685f63ac94129ee0eea0140beaf76 (diff) | |
download | gnunet-54440ebeed80d95185531c4725bd80e3bed161e5.tar.gz gnunet-54440ebeed80d95185531c4725bd80e3bed161e5.zip |
correct unit placement for GAUGER calls
Diffstat (limited to 'src/include/gnunet_container_lib.h')
-rw-r--r-- | src/include/gnunet_container_lib.h | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/src/include/gnunet_container_lib.h b/src/include/gnunet_container_lib.h index c5f46b419..908657d6b 100644 --- a/src/include/gnunet_container_lib.h +++ b/src/include/gnunet_container_lib.h | |||
@@ -65,6 +65,7 @@ struct GNUNET_CONTAINER_BloomFilter; | |||
65 | typedef int (*GNUNET_HashCodeIterator) (void *cls, | 65 | typedef int (*GNUNET_HashCodeIterator) (void *cls, |
66 | GNUNET_HashCode * next); | 66 | GNUNET_HashCode * next); |
67 | 67 | ||
68 | |||
68 | /** | 69 | /** |
69 | * Load a bloom-filter from a file. | 70 | * Load a bloom-filter from a file. |
70 | * | 71 | * |
@@ -85,6 +86,7 @@ GNUNET_CONTAINER_bloomfilter_load (const | |||
85 | int | 86 | int |
86 | k); | 87 | k); |
87 | 88 | ||
89 | |||
88 | /** | 90 | /** |
89 | * Create a bloom filter from raw bits. | 91 | * Create a bloom filter from raw bits. |
90 | * | 92 | * |
@@ -108,6 +110,7 @@ GNUNET_CONTAINER_bloomfilter_init (const | |||
108 | int | 110 | int |
109 | k); | 111 | k); |
110 | 112 | ||
113 | |||
111 | /** | 114 | /** |
112 | * Copy the raw data of this bloomfilter into | 115 | * Copy the raw data of this bloomfilter into |
113 | * the given data array. | 116 | * the given data array. |
@@ -121,6 +124,7 @@ int GNUNET_CONTAINER_bloomfilter_get_raw_data (const struct | |||
121 | *bf, char *data, | 124 | *bf, char *data, |
122 | size_t size); | 125 | size_t size); |
123 | 126 | ||
127 | |||
124 | /** | 128 | /** |
125 | * Test if an element is in the filter. | 129 | * Test if an element is in the filter. |
126 | * @param e the element | 130 | * @param e the element |
@@ -130,6 +134,7 @@ int GNUNET_CONTAINER_bloomfilter_get_raw_data (const struct | |||
130 | int GNUNET_CONTAINER_bloomfilter_test (const struct GNUNET_CONTAINER_BloomFilter | 134 | int GNUNET_CONTAINER_bloomfilter_test (const struct GNUNET_CONTAINER_BloomFilter |
131 | *bf, const GNUNET_HashCode * e); | 135 | *bf, const GNUNET_HashCode * e); |
132 | 136 | ||
137 | |||
133 | /** | 138 | /** |
134 | * Add an element to the filter | 139 | * Add an element to the filter |
135 | * @param bf the filter | 140 | * @param bf the filter |
@@ -138,6 +143,7 @@ int GNUNET_CONTAINER_bloomfilter_test (const struct GNUNET_CONTAINER_BloomFilter | |||
138 | void GNUNET_CONTAINER_bloomfilter_add (struct GNUNET_CONTAINER_BloomFilter | 143 | void GNUNET_CONTAINER_bloomfilter_add (struct GNUNET_CONTAINER_BloomFilter |
139 | *bf, const GNUNET_HashCode * e); | 144 | *bf, const GNUNET_HashCode * e); |
140 | 145 | ||
146 | |||
141 | /** | 147 | /** |
142 | * Remove an element from the filter. | 148 | * Remove an element from the filter. |
143 | * @param bf the filter | 149 | * @param bf the filter |
@@ -146,6 +152,18 @@ void GNUNET_CONTAINER_bloomfilter_add (struct GNUNET_CONTAINER_BloomFilter | |||
146 | void GNUNET_CONTAINER_bloomfilter_remove (struct GNUNET_CONTAINER_BloomFilter | 152 | void GNUNET_CONTAINER_bloomfilter_remove (struct GNUNET_CONTAINER_BloomFilter |
147 | *bf, const GNUNET_HashCode * e); | 153 | *bf, const GNUNET_HashCode * e); |
148 | 154 | ||
155 | |||
156 | /** | ||
157 | * Free the space associcated with a filter | ||
158 | * in memory, flush to drive if needed (do not | ||
159 | * free the space on the drive) | ||
160 | * @param bf the filter | ||
161 | */ | ||
162 | struct GNUNET_CONTAINER_BloomFilter * | ||
163 | GNUNET_CONTAINER_bloomfilter_copy (const struct GNUNET_CONTAINER_BloomFilter *bf); | ||
164 | |||
165 | |||
166 | |||
149 | /** | 167 | /** |
150 | * Free the space associcated with a filter | 168 | * Free the space associcated with a filter |
151 | * in memory, flush to drive if needed (do not | 169 | * in memory, flush to drive if needed (do not |
@@ -942,7 +960,9 @@ GNUNET_CONTAINER_heap_iterate (const struct GNUNET_CONTAINER_Heap *heap, | |||
942 | * | 960 | * |
943 | */ | 961 | */ |
944 | void * | 962 | void * |
945 | GNUNET_CONTAINER_heap_get_random (struct GNUNET_CONTAINER_Heap *heap, uint32_t max); | 963 | GNUNET_CONTAINER_heap_get_random (struct GNUNET_CONTAINER_Heap *heap, |
964 | uint32_t max); | ||
965 | |||
946 | 966 | ||
947 | /** | 967 | /** |
948 | * Perform a random walk of the tree. The walk is biased | 968 | * Perform a random walk of the tree. The walk is biased |