diff options
-rw-r--r-- | src/consensus/gnunet-consensus-profiler.c | 2 | ||||
-rw-r--r-- | src/gns/gns_api.c | 12 | ||||
-rw-r--r-- | src/gns/gnunet-service-gns_resolver.c | 6 | ||||
-rw-r--r-- | src/gns/gnunet-service-gns_resolver.h | 5 | ||||
-rw-r--r-- | src/include/gnunet_core_service.h | 50 | ||||
-rw-r--r-- | src/include/gnunet_crypto_lib.h | 55 | ||||
-rw-r--r-- | src/include/gnunet_gns_service.h | 2 | ||||
-rw-r--r-- | src/namestore/gnunet-namestore-fcfsd.c | 2 | ||||
-rw-r--r-- | src/namestore/gnunet-service-namestore.c | 6 | ||||
-rw-r--r-- | src/namestore/namestore.h | 2 |
10 files changed, 67 insertions, 75 deletions
diff --git a/src/consensus/gnunet-consensus-profiler.c b/src/consensus/gnunet-consensus-profiler.c index baa6a3623..89fd6bf23 100644 --- a/src/consensus/gnunet-consensus-profiler.c +++ b/src/consensus/gnunet-consensus-profiler.c | |||
@@ -19,7 +19,7 @@ | |||
19 | */ | 19 | */ |
20 | 20 | ||
21 | /** | 21 | /** |
22 | * @file consensus/gnunet-consensus.c | 22 | * @file consensus/gnunet-consensus-profiler.c |
23 | * @brief profiling tool for gnunet-consensus | 23 | * @brief profiling tool for gnunet-consensus |
24 | * @author Florian Dold | 24 | * @author Florian Dold |
25 | */ | 25 | */ |
diff --git a/src/gns/gns_api.c b/src/gns/gns_api.c index 6472018f8..63d42ffee 100644 --- a/src/gns/gns_api.c +++ b/src/gns/gns_api.c | |||
@@ -506,14 +506,14 @@ GNUNET_GNS_lookup_cancel (struct GNUNET_GNS_LookupRequest *lr) | |||
506 | 506 | ||
507 | 507 | ||
508 | /** | 508 | /** |
509 | * Perform an asynchronous Lookup operation on the GNS. | 509 | * Perform an asynchronous lookup operation on the GNS. |
510 | * | 510 | * |
511 | * @param handle handle to the GNS service | 511 | * @param handle handle to the GNS service |
512 | * @param name the name to look up | 512 | * @param name the name to look up |
513 | * @param zone the zone to start the resolution in | 513 | * @param zone the zone to start the resolution in |
514 | * @param type the record type to look up | 514 | * @param type the record type to look up |
515 | * @param only_cached GNUNET_YES to only check locally not DHT for performance | 515 | * @param only_cached #GNUNET_YES to only check locally (not in the DHT) |
516 | * @param shorten_key the private key of the shorten zone (can be NULL) | 516 | * @param shorten_zone_key the private key of the shorten zone (can be NULL) |
517 | * @param proc processor to call on result | 517 | * @param proc processor to call on result |
518 | * @param proc_cls closure for processor | 518 | * @param proc_cls closure for processor |
519 | * @return handle to the get request | 519 | * @return handle to the get request |
@@ -524,7 +524,7 @@ GNUNET_GNS_lookup (struct GNUNET_GNS_Handle *handle, | |||
524 | const struct GNUNET_CRYPTO_EccPublicKey *zone, | 524 | const struct GNUNET_CRYPTO_EccPublicKey *zone, |
525 | int type, | 525 | int type, |
526 | int only_cached, | 526 | int only_cached, |
527 | const struct GNUNET_CRYPTO_EccPrivateKey *shorten_key, | 527 | const struct GNUNET_CRYPTO_EccPrivateKey *shorten_zone_key, |
528 | GNUNET_GNS_LookupResultProcessor proc, | 528 | GNUNET_GNS_LookupResultProcessor proc, |
529 | void *proc_cls) | 529 | void *proc_cls) |
530 | { | 530 | { |
@@ -568,10 +568,10 @@ GNUNET_GNS_lookup (struct GNUNET_GNS_Handle *handle, | |||
568 | lookup_msg->only_cached = htonl (only_cached); | 568 | lookup_msg->only_cached = htonl (only_cached); |
569 | lookup_msg->zone = *zone; | 569 | lookup_msg->zone = *zone; |
570 | lookup_msg->type = htonl (type); | 570 | lookup_msg->type = htonl (type); |
571 | if (NULL != shorten_key) | 571 | if (NULL != shorten_zone_key) |
572 | { | 572 | { |
573 | lookup_msg->have_key = htonl (GNUNET_YES); | 573 | lookup_msg->have_key = htonl (GNUNET_YES); |
574 | lookup_msg->shorten_key = *shorten_key; | 574 | lookup_msg->shorten_key = *shorten_zone_key; |
575 | } | 575 | } |
576 | memcpy (&lookup_msg[1], name, strlen (name) + 1); | 576 | memcpy (&lookup_msg[1], name, strlen (name) + 1); |
577 | GNUNET_CONTAINER_DLL_insert_tail (handle->pending_head, | 577 | GNUNET_CONTAINER_DLL_insert_tail (handle->pending_head, |
diff --git a/src/gns/gnunet-service-gns_resolver.c b/src/gns/gnunet-service-gns_resolver.c index db5d8b93f..b436b306e 100644 --- a/src/gns/gnunet-service-gns_resolver.c +++ b/src/gns/gnunet-service-gns_resolver.c | |||
@@ -3346,15 +3346,13 @@ GNS_resolver_lookup_cancel (struct GNS_ResolverHandle *rh) | |||
3346 | * Initialize the resolver | 3346 | * Initialize the resolver |
3347 | * | 3347 | * |
3348 | * @param nh the namestore handle | 3348 | * @param nh the namestore handle |
3349 | * @param dh the dht handle | 3349 | * @param dht the dht handle |
3350 | * @param c configuration handle | 3350 | * @param c configuration handle |
3351 | * @param max_bg_queries maximum number of parallel background queries in dht | 3351 | * @param max_bg_queries maximum number of parallel background queries in dht |
3352 | * @param ignore_pending ignore records that still require user confirmation | ||
3353 | * on lookup | ||
3354 | */ | 3352 | */ |
3355 | void | 3353 | void |
3356 | GNS_resolver_init (struct GNUNET_NAMESTORE_Handle *nh, | 3354 | GNS_resolver_init (struct GNUNET_NAMESTORE_Handle *nh, |
3357 | struct GNUNET_DHT_Handle *dh, | 3355 | struct GNUNET_DHT_Handle *dht, |
3358 | const struct GNUNET_CONFIGURATION_Handle *c, | 3356 | const struct GNUNET_CONFIGURATION_Handle *c, |
3359 | unsigned long long max_bg_queries) | 3357 | unsigned long long max_bg_queries) |
3360 | { | 3358 | { |
diff --git a/src/gns/gnunet-service-gns_resolver.h b/src/gns/gnunet-service-gns_resolver.h index 7ee545e2b..47942e57b 100644 --- a/src/gns/gnunet-service-gns_resolver.h +++ b/src/gns/gnunet-service-gns_resolver.h | |||
@@ -95,11 +95,10 @@ GNS_resolver_lookup (const struct GNUNET_CRYPTO_EccPublicKey *zone, | |||
95 | /** | 95 | /** |
96 | * Cancel active resolution (i.e. client disconnected). | 96 | * Cancel active resolution (i.e. client disconnected). |
97 | * | 97 | * |
98 | * @param h resolution to abort | 98 | * @param rh resolution to abort |
99 | */ | 99 | */ |
100 | void | 100 | void |
101 | GNS_resolver_lookup_cancel (struct GNS_ResolverHandle *h); | 101 | GNS_resolver_lookup_cancel (struct GNS_ResolverHandle *rh); |
102 | |||
103 | 102 | ||
104 | 103 | ||
105 | 104 | ||
diff --git a/src/include/gnunet_core_service.h b/src/include/gnunet_core_service.h index cec06fedd..dc64f189a 100644 --- a/src/include/gnunet_core_service.h +++ b/src/include/gnunet_core_service.h | |||
@@ -77,12 +77,12 @@ typedef void (*GNUNET_CORE_DisconnectEventHandler) (void *cls, | |||
77 | * Functions with this signature are called whenever a message is | 77 | * Functions with this signature are called whenever a message is |
78 | * received or transmitted. | 78 | * received or transmitted. |
79 | * | 79 | * |
80 | * @param cls closure (set from GNUNET_CORE_connect) | 80 | * @param cls closure (set from #GNUNET_CORE_connect) |
81 | * @param peer the other peer involved (sender or receiver, NULL | 81 | * @param peer the other peer involved (sender or receiver, NULL |
82 | * for loopback messages where we are both sender and receiver) | 82 | * for loopback messages where we are both sender and receiver) |
83 | * @param message the actual message | 83 | * @param message the actual message |
84 | * @return GNUNET_OK to keep the connection open, | 84 | * @return #GNUNET_OK to keep the connection open, |
85 | * GNUNET_SYSERR to close connection to the peer (signal serious error) | 85 | * #GNUNET_SYSERR to close connection to the peer (signal serious error) |
86 | */ | 86 | */ |
87 | typedef int (*GNUNET_CORE_MessageCallback) (void *cls, | 87 | typedef int (*GNUNET_CORE_MessageCallback) (void *cls, |
88 | const struct GNUNET_PeerIdentity * | 88 | const struct GNUNET_PeerIdentity * |
@@ -118,16 +118,17 @@ struct GNUNET_CORE_MessageHandler | |||
118 | 118 | ||
119 | 119 | ||
120 | /** | 120 | /** |
121 | * Function called after GNUNET_CORE_connect has succeeded (or failed | 121 | * Function called after #GNUNET_CORE_connect has succeeded (or failed |
122 | * for good). Note that the private key of the peer is intentionally | 122 | * for good). Note that the private key of the peer is intentionally |
123 | * not exposed here; if you need it, your process should try to read | 123 | * not exposed here; if you need it, your process should try to read |
124 | * the private key file directly (which should work if you are | 124 | * the private key file directly (which should work if you are |
125 | * authorized...). Implementations of this function must not call | 125 | * authorized...). Implementations of this function must not call |
126 | * GNUNET_CORE_disconnect (other than by scheduling a new task to | 126 | * #GNUNET_CORE_disconnect (other than by scheduling a new task to |
127 | * do this later). | 127 | * do this later). |
128 | * | 128 | * |
129 | * @param cls closure | 129 | * @param cls closure |
130 | * @param server handle to the server, NULL if we failed; TODO: consider removing this argument, it is redundant... | 130 | * @param server handle to the server, NULL if we failed; |
131 | * TODO: consider removing this argument, it is redundant... | ||
131 | * @param my_identity ID of this peer, NULL if we failed | 132 | * @param my_identity ID of this peer, NULL if we failed |
132 | */ | 133 | */ |
133 | typedef void (*GNUNET_CORE_StartupCallback) (void *cls, | 134 | typedef void (*GNUNET_CORE_StartupCallback) (void *cls, |
@@ -143,7 +144,7 @@ typedef void (*GNUNET_CORE_StartupCallback) (void *cls, | |||
143 | * specified event happens. The maximum number of queued | 144 | * specified event happens. The maximum number of queued |
144 | * notifications (queue length) is per client; the queue is shared | 145 | * notifications (queue length) is per client; the queue is shared |
145 | * across all types of notifications. So a slow client that registers | 146 | * across all types of notifications. So a slow client that registers |
146 | * for 'outbound_notify' also risks missing 'inbound_notify' messages. | 147 | * for @a outbound_notify also risks missing @a inbound_notify messages. |
147 | * Certain events (such as connect/disconnect notifications) are not | 148 | * Certain events (such as connect/disconnect notifications) are not |
148 | * subject to queue size limitations. | 149 | * subject to queue size limitations. |
149 | * | 150 | * |
@@ -157,7 +158,7 @@ typedef void (*GNUNET_CORE_StartupCallback) (void *cls, | |||
157 | * note that the core is allowed to drop notifications about inbound | 158 | * note that the core is allowed to drop notifications about inbound |
158 | * messages if the client does not process them fast enough (for this | 159 | * messages if the client does not process them fast enough (for this |
159 | * notification type, a bounded queue is used) | 160 | * notification type, a bounded queue is used) |
160 | * @param inbound_hdr_only set to GNUNET_YES if inbound_notify will only read the | 161 | * @param inbound_hdr_only set to #GNUNET_YES if @a inbound_notify will only read the |
161 | * GNUNET_MessageHeader and hence we do not need to give it the full message; | 162 | * GNUNET_MessageHeader and hence we do not need to give it the full message; |
162 | * can be used to improve efficiency, ignored if inbound_notify is NULL | 163 | * can be used to improve efficiency, ignored if inbound_notify is NULL |
163 | * note that the core is allowed to drop notifications about inbound | 164 | * note that the core is allowed to drop notifications about inbound |
@@ -167,7 +168,7 @@ typedef void (*GNUNET_CORE_StartupCallback) (void *cls, | |||
167 | * note that the core is allowed to drop notifications about outbound | 168 | * note that the core is allowed to drop notifications about outbound |
168 | * messages if the client does not process them fast enough (for this | 169 | * messages if the client does not process them fast enough (for this |
169 | * notification type, a bounded queue is used) | 170 | * notification type, a bounded queue is used) |
170 | * @param outbound_hdr_only set to GNUNET_YES if outbound_notify will only read the | 171 | * @param outbound_hdr_only set to #GNUNET_YES if @a outbound_notify will only read the |
171 | * GNUNET_MessageHeader and hence we do not need to give it the full message | 172 | * GNUNET_MessageHeader and hence we do not need to give it the full message |
172 | * can be used to improve efficiency, ignored if outbound_notify is NULL | 173 | * can be used to improve efficiency, ignored if outbound_notify is NULL |
173 | * note that the core is allowed to drop notifications about outbound | 174 | * note that the core is allowed to drop notifications about outbound |
@@ -177,7 +178,7 @@ typedef void (*GNUNET_CORE_StartupCallback) (void *cls, | |||
177 | * note that the core is allowed to drop notifications about inbound | 178 | * note that the core is allowed to drop notifications about inbound |
178 | * messages if the client does not process them fast enough (for this | 179 | * messages if the client does not process them fast enough (for this |
179 | * notification type, a bounded queue is used) | 180 | * notification type, a bounded queue is used) |
180 | * @return handle to the core service (only useful for disconnect until 'init' is called), | 181 | * @return handle to the core service (only useful for disconnect until @a init is called), |
181 | * NULL on error (in this case, init is never called) | 182 | * NULL on error (in this case, init is never called) |
182 | */ | 183 | */ |
183 | struct GNUNET_CORE_Handle * | 184 | struct GNUNET_CORE_Handle * |
@@ -195,7 +196,7 @@ GNUNET_CORE_connect (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
195 | 196 | ||
196 | /** | 197 | /** |
197 | * Disconnect from the core service. This function can only | 198 | * Disconnect from the core service. This function can only |
198 | * be called *after* all pending 'GNUNET_CORE_notify_transmit_ready' | 199 | * be called *after* all pending #GNUNET_CORE_notify_transmit_ready |
199 | * requests have been explicitly cancelled. | 200 | * requests have been explicitly cancelled. |
200 | * | 201 | * |
201 | * @param handle connection to core to disconnect | 202 | * @param handle connection to core to disconnect |
@@ -211,13 +212,13 @@ struct GNUNET_CORE_TransmitHandle; | |||
211 | 212 | ||
212 | 213 | ||
213 | /** | 214 | /** |
214 | * Ask the core to call "notify" once it is ready to transmit the | 215 | * Ask the core to call @a notify once it is ready to transmit the |
215 | * given number of bytes to the specified "target". Must only be | 216 | * given number of bytes to the specified @a target. Must only be |
216 | * called after a connection to the respective peer has been | 217 | * called after a connection to the respective peer has been |
217 | * established (and the client has been informed about this). You may | 218 | * established (and the client has been informed about this). You may |
218 | * have one request of this type pending for each connected peer at | 219 | * have one request of this type pending for each connected peer at |
219 | * any time. If a peer disconnects, the application MUST call | 220 | * any time. If a peer disconnects, the application MUST call |
220 | * "GNUNET_CORE_notify_transmit_ready_cancel" on the respective | 221 | * #GNUNET_CORE_notify_transmit_ready_cancel on the respective |
221 | * transmission request, if one such request is pending. | 222 | * transmission request, if one such request is pending. |
222 | * | 223 | * |
223 | * @param handle connection to core service | 224 | * @param handle connection to core service |
@@ -230,7 +231,7 @@ struct GNUNET_CORE_TransmitHandle; | |||
230 | * will be called with NULL on timeout; clients MUST cancel | 231 | * will be called with NULL on timeout; clients MUST cancel |
231 | * all pending transmission requests DURING the disconnect | 232 | * all pending transmission requests DURING the disconnect |
232 | * handler | 233 | * handler |
233 | * @param notify_cls closure for notify | 234 | * @param notify_cls closure for @a notify |
234 | * @return non-NULL if the notify callback was queued, | 235 | * @return non-NULL if the notify callback was queued, |
235 | * NULL if we can not even queue the request (request already pending); | 236 | * NULL if we can not even queue the request (request already pending); |
236 | * if NULL is returned, "notify" will NOT be called. | 237 | * if NULL is returned, "notify" will NOT be called. |
@@ -255,11 +256,8 @@ GNUNET_CORE_notify_transmit_ready_cancel (struct GNUNET_CORE_TransmitHandle | |||
255 | *th); | 256 | *th); |
256 | 257 | ||
257 | 258 | ||
258 | |||
259 | |||
260 | |||
261 | /** | 259 | /** |
262 | * Iterate over all connected peers. Calls peer_cb with each | 260 | * Iterate over all connected peers. Calls @a peer_cb with each |
263 | * connected peer, and then once with NULL to indicate that all peers | 261 | * connected peer, and then once with NULL to indicate that all peers |
264 | * have been handled. Normal users of the CORE API are not expected | 262 | * have been handled. Normal users of the CORE API are not expected |
265 | * to use this function. It is different in that it truly lists | 263 | * to use this function. It is different in that it truly lists |
@@ -272,8 +270,8 @@ GNUNET_CORE_notify_transmit_ready_cancel (struct GNUNET_CORE_TransmitHandle | |||
272 | * | 270 | * |
273 | * @param cfg configuration handle | 271 | * @param cfg configuration handle |
274 | * @param peer_cb function to call with the peer information | 272 | * @param peer_cb function to call with the peer information |
275 | * @param cb_cls closure for peer_cb | 273 | * @param cb_cls closure for @a peer_cb |
276 | * @return GNUNET_OK on success, GNUNET_SYSERR on errors | 274 | * @return #GNUNET_OK on success, #GNUNET_SYSERR on errors |
277 | */ | 275 | */ |
278 | int | 276 | int |
279 | GNUNET_CORE_iterate_peers (const struct GNUNET_CONFIGURATION_Handle *cfg, | 277 | GNUNET_CORE_iterate_peers (const struct GNUNET_CONFIGURATION_Handle *cfg, |
@@ -298,7 +296,7 @@ struct GNUNET_CORE_ConnectTestHandle; | |||
298 | * @param cfg configuration to use | 296 | * @param cfg configuration to use |
299 | * @param peer the specific peer to check for | 297 | * @param peer the specific peer to check for |
300 | * @param peer_cb function to call with the peer information | 298 | * @param peer_cb function to call with the peer information |
301 | * @param cb_cls closure for peer_cb | 299 | * @param cb_cls closure for @a peer_cb |
302 | * @return handle to cancel the operation | 300 | * @return handle to cancel the operation |
303 | */ | 301 | */ |
304 | struct GNUNET_CORE_ConnectTestHandle * | 302 | struct GNUNET_CORE_ConnectTestHandle * |
@@ -321,16 +319,16 @@ GNUNET_CORE_is_peer_connected_cancel (struct GNUNET_CORE_ConnectTestHandle *cth) | |||
321 | * Check if the given peer is currently connected. This function is for special | 319 | * Check if the given peer is currently connected. This function is for special |
322 | * cirumstances (GNUNET_TESTBED uses it), normal users of the CORE API are | 320 | * cirumstances (GNUNET_TESTBED uses it), normal users of the CORE API are |
323 | * expected to track which peers are connected based on the connect/disconnect | 321 | * expected to track which peers are connected based on the connect/disconnect |
324 | * callbacks from GNUNET_CORE_connect. This function is NOT part of the | 322 | * callbacks from #GNUNET_CORE_connect. This function is NOT part of the |
325 | * 'versioned', 'official' API. The difference between this function and the | 323 | * 'versioned', 'official' API. The difference between this function and the |
326 | * function GNUNET_CORE_is_peer_connected() is that this one returns | 324 | * function #GNUNET_CORE_is_peer_connected is that this one returns |
327 | * synchronously after looking in the CORE API cache. The function | 325 | * synchronously after looking in the CORE API cache. The function |
328 | * GNUNET_CORE_is_peer_connected() sends a message to the CORE service and hence | 326 | * #GNUNET_CORE_is_peer_connected sends a message to the CORE service and hence |
329 | * its response is given asynchronously. | 327 | * its response is given asynchronously. |
330 | * | 328 | * |
331 | * @param h the core handle | 329 | * @param h the core handle |
332 | * @param pid the identity of the peer to check if it has been connected to us | 330 | * @param pid the identity of the peer to check if it has been connected to us |
333 | * @return GNUNET_YES if the peer is connected to us; GNUNET_NO if not | 331 | * @return #GNUNET_YES if the peer is connected to us; #GNUNET_NO if not |
334 | */ | 332 | */ |
335 | int | 333 | int |
336 | GNUNET_CORE_is_peer_connected_sync (const struct GNUNET_CORE_Handle *h, | 334 | GNUNET_CORE_is_peer_connected_sync (const struct GNUNET_CORE_Handle *h, |
diff --git a/src/include/gnunet_crypto_lib.h b/src/include/gnunet_crypto_lib.h index 4d4455af4..19813a693 100644 --- a/src/include/gnunet_crypto_lib.h +++ b/src/include/gnunet_crypto_lib.h | |||
@@ -220,7 +220,7 @@ struct GNUNET_CRYPTO_AuthKey | |||
220 | /* **************** Functions and Macros ************* */ | 220 | /* **************** Functions and Macros ************* */ |
221 | 221 | ||
222 | /** | 222 | /** |
223 | * Seed a weak random generator. Only GNUNET_CRYPTO_QUALITY_WEAK-mode generator | 223 | * Seed a weak random generator. Only #GNUNET_CRYPTO_QUALITY_WEAK-mode generator |
224 | * can be seeded. | 224 | * can be seeded. |
225 | * | 225 | * |
226 | * @param seed the seed to use | 226 | * @param seed the seed to use |
@@ -234,7 +234,7 @@ GNUNET_CRYPTO_seed_weak_random (int32_t seed); | |||
234 | * | 234 | * |
235 | * @param sum current sum, initially 0 | 235 | * @param sum current sum, initially 0 |
236 | * @param buf buffer to calculate CRC over (must be 16-bit aligned) | 236 | * @param buf buffer to calculate CRC over (must be 16-bit aligned) |
237 | * @param len number of bytes in hdr, must be multiple of 2 | 237 | * @param len number of bytes in @a buf, must be multiple of 2 |
238 | * @return updated crc sum (must be subjected to GNUNET_CRYPTO_crc16_finish to get actual crc16) | 238 | * @return updated crc sum (must be subjected to GNUNET_CRYPTO_crc16_finish to get actual crc16) |
239 | */ | 239 | */ |
240 | uint32_t | 240 | uint32_t |
@@ -254,8 +254,8 @@ GNUNET_CRYPTO_crc16_finish (uint32_t sum); | |||
254 | /** | 254 | /** |
255 | * Calculate the checksum of a buffer in one step. | 255 | * Calculate the checksum of a buffer in one step. |
256 | * | 256 | * |
257 | * @param buf buffer to calculate CRC over (must be 16-bit aligned) | 257 | * @param buf buffer to calculate CRC over (must be 16-bit aligned) |
258 | * @param len number of bytes in hdr, must be multiple of 2 | 258 | * @param len number of bytes in @a buf, must be multiple of 2 |
259 | * @return crc16 value | 259 | * @return crc16 value |
260 | */ | 260 | */ |
261 | uint16_t | 261 | uint16_t |
@@ -267,7 +267,7 @@ GNUNET_CRYPTO_crc16_n (const void *buf, size_t len); | |||
267 | * bytes of the buffer. | 267 | * bytes of the buffer. |
268 | * | 268 | * |
269 | * @param buf the data over which we're taking the CRC | 269 | * @param buf the data over which we're taking the CRC |
270 | * @param len the length of the buffer in bytes | 270 | * @param len the length of the buffer @buf in bytes |
271 | * @return the resulting CRC32 checksum | 271 | * @return the resulting CRC32 checksum |
272 | */ | 272 | */ |
273 | int32_t | 273 | int32_t |
@@ -279,7 +279,7 @@ GNUNET_CRYPTO_crc32_n (const void *buf, size_t len); | |||
279 | * | 279 | * |
280 | * @param mode desired quality of the random number | 280 | * @param mode desired quality of the random number |
281 | * @param i the upper limit (exclusive) for the random number | 281 | * @param i the upper limit (exclusive) for the random number |
282 | * @return a random value in the interval [0,i) (exclusive). | 282 | * @return a random value in the interval [0,@a i) (exclusive). |
283 | */ | 283 | */ |
284 | uint32_t | 284 | uint32_t |
285 | GNUNET_CRYPTO_random_u32 (enum GNUNET_CRYPTO_Quality mode, uint32_t i); | 285 | GNUNET_CRYPTO_random_u32 (enum GNUNET_CRYPTO_Quality mode, uint32_t i); |
@@ -289,7 +289,7 @@ GNUNET_CRYPTO_random_u32 (enum GNUNET_CRYPTO_Quality mode, uint32_t i); | |||
289 | * Random on unsigned 64-bit values. | 289 | * Random on unsigned 64-bit values. |
290 | * | 290 | * |
291 | * @param mode desired quality of the random number | 291 | * @param mode desired quality of the random number |
292 | * @param max value returned will be in range [0,max) (exclusive) | 292 | * @param max value returned will be in range [0,@a max) (exclusive) |
293 | * @return random 64-bit number | 293 | * @return random 64-bit number |
294 | */ | 294 | */ |
295 | uint64_t | 295 | uint64_t |
@@ -299,7 +299,8 @@ GNUNET_CRYPTO_random_u64 (enum GNUNET_CRYPTO_Quality mode, uint64_t max); | |||
299 | /** | 299 | /** |
300 | * Get an array with a random permutation of the | 300 | * Get an array with a random permutation of the |
301 | * numbers 0...n-1. | 301 | * numbers 0...n-1. |
302 | * @param mode GNUNET_CRYPTO_QUALITY_STRONG if the strong (but expensive) PRNG should be used, GNUNET_CRYPTO_QUALITY_WEAK otherwise | 302 | * @param mode #GNUNET_CRYPTO_QUALITY_STRONG if the strong (but expensive) PRNG should be used, |
303 | * #GNUNET_CRYPTO_QUALITY_WEAK or #GNUNET_CRYPTO_QUALITY_NONCE otherwise | ||
303 | * @param n the size of the array | 304 | * @param n the size of the array |
304 | * @return the permutation array (allocated from heap) | 305 | * @return the permutation array (allocated from heap) |
305 | */ | 306 | */ |
@@ -406,22 +407,22 @@ GNUNET_CRYPTO_short_hash_to_enc (const struct GNUNET_CRYPTO_ShortHashCode * bloc | |||
406 | * Convert ASCII encoding back to a 'struct GNUNET_HashCode' | 407 | * Convert ASCII encoding back to a 'struct GNUNET_HashCode' |
407 | * | 408 | * |
408 | * @param enc the encoding | 409 | * @param enc the encoding |
409 | * @param enclen number of characters in 'enc' (without 0-terminator, which can be missing) | 410 | * @param enclen number of characters in @a enc (without 0-terminator, which can be missing) |
410 | * @param result where to store the GNUNET_CRYPTO_hash code | 411 | * @param result where to store the hash code |
411 | * @return GNUNET_OK on success, GNUNET_SYSERR if result has the wrong encoding | 412 | * @return #GNUNET_OK on success, #GNUNET_SYSERR if result has the wrong encoding |
412 | */ | 413 | */ |
413 | int | 414 | int |
414 | GNUNET_CRYPTO_hash_from_string2 (const char *enc, size_t enclen, | 415 | GNUNET_CRYPTO_hash_from_string2 (const char *enc, size_t enclen, |
415 | struct GNUNET_HashCode * result); | 416 | struct GNUNET_HashCode *result); |
416 | 417 | ||
417 | 418 | ||
418 | /** | 419 | /** |
419 | * Convert ASCII encoding back to a 'struct GNUNET_CRYPTO_ShortHash' | 420 | * Convert ASCII encoding back to a 'struct GNUNET_CRYPTO_ShortHash' |
420 | * | 421 | * |
421 | * @param enc the encoding | 422 | * @param enc the encoding |
422 | * @param enclen number of characters in 'enc' (without 0-terminator, which can be missing) | 423 | * @param enclen number of characters in @a enc (without 0-terminator, which can be missing) |
423 | * @param result where to store the GNUNET_CRYPTO_hash code | 424 | * @param result where to store the hash code |
424 | * @return GNUNET_OK on success, GNUNET_SYSERR if result has the wrong encoding | 425 | * @return #GNUNET_OK on success, #GNUNET_SYSERR if result has the wrong encoding |
425 | */ | 426 | */ |
426 | int | 427 | int |
427 | GNUNET_CRYPTO_short_hash_from_string2 (const char *enc, size_t enclen, | 428 | GNUNET_CRYPTO_short_hash_from_string2 (const char *enc, size_t enclen, |
@@ -444,7 +445,7 @@ GNUNET_CRYPTO_short_hash_from_string2 (const char *enc, size_t enclen, | |||
444 | * | 445 | * |
445 | * @param enc the encoding | 446 | * @param enc the encoding |
446 | * @param result where to store the GNUNET_CRYPTO_ShortHash | 447 | * @param result where to store the GNUNET_CRYPTO_ShortHash |
447 | * @return GNUNET_OK on success, GNUNET_SYSERR if result has the wrong encoding | 448 | * @return #GNUNET_OK on success, #GNUNET_SYSERR if result has the wrong encoding |
448 | */ | 449 | */ |
449 | #define GNUNET_CRYPTO_short_hash_from_string(enc, result) \ | 450 | #define GNUNET_CRYPTO_short_hash_from_string(enc, result) \ |
450 | GNUNET_CRYPTO_short_hash_from_string2 (enc, strlen(enc), result) | 451 | GNUNET_CRYPTO_short_hash_from_string2 (enc, strlen(enc), result) |
@@ -482,7 +483,7 @@ GNUNET_CRYPTO_hash_distance_u32 (const struct GNUNET_HashCode * a, | |||
482 | * Compute hash of a given block. | 483 | * Compute hash of a given block. |
483 | * | 484 | * |
484 | * @param block the data to hash | 485 | * @param block the data to hash |
485 | * @param size size of the block | 486 | * @param size size of the @a block |
486 | * @param ret pointer to where to write the hashcode | 487 | * @param ret pointer to where to write the hashcode |
487 | */ | 488 | */ |
488 | void | 489 | void |
@@ -493,7 +494,7 @@ GNUNET_CRYPTO_hash (const void *block, size_t size, struct GNUNET_HashCode * ret | |||
493 | * Compute short (256-bit) hash of a given block. | 494 | * Compute short (256-bit) hash of a given block. |
494 | * | 495 | * |
495 | * @param block the data to hash | 496 | * @param block the data to hash |
496 | * @param size size of the block | 497 | * @param size size of the @a block |
497 | * @param ret pointer to where to write the hashcode | 498 | * @param ret pointer to where to write the hashcode |
498 | */ | 499 | */ |
499 | void | 500 | void |
@@ -530,7 +531,7 @@ GNUNET_CRYPTO_short_hash_from_truncation (const struct GNUNET_HashCode *dh, | |||
530 | * | 531 | * |
531 | * @param key secret key | 532 | * @param key secret key |
532 | * @param plaintext input plaintext | 533 | * @param plaintext input plaintext |
533 | * @param plaintext_len length of plaintext | 534 | * @param plaintext_len length of @a plaintext |
534 | * @param hmac where to store the hmac | 535 | * @param hmac where to store the hmac |
535 | */ | 536 | */ |
536 | void | 537 | void |
@@ -598,7 +599,7 @@ GNUNET_CRYPTO_hash_create_random (enum GNUNET_CRYPTO_Quality mode, | |||
598 | * | 599 | * |
599 | * @param a some hash code | 600 | * @param a some hash code |
600 | * @param b some hash code | 601 | * @param b some hash code |
601 | * @param result set to b - a | 602 | * @param result set to @a b - @a a |
602 | */ | 603 | */ |
603 | void | 604 | void |
604 | GNUNET_CRYPTO_hash_difference (const struct GNUNET_HashCode * a, | 605 | GNUNET_CRYPTO_hash_difference (const struct GNUNET_HashCode * a, |
@@ -611,7 +612,7 @@ GNUNET_CRYPTO_hash_difference (const struct GNUNET_HashCode * a, | |||
611 | * | 612 | * |
612 | * @param a some hash code | 613 | * @param a some hash code |
613 | * @param delta some hash code | 614 | * @param delta some hash code |
614 | * @param result set to a + delta | 615 | * @param result set to @a a + @a delta |
615 | */ | 616 | */ |
616 | void | 617 | void |
617 | GNUNET_CRYPTO_hash_sum (const struct GNUNET_HashCode * a, | 618 | GNUNET_CRYPTO_hash_sum (const struct GNUNET_HashCode * a, |
@@ -624,7 +625,7 @@ GNUNET_CRYPTO_hash_sum (const struct GNUNET_HashCode * a, | |||
624 | * | 625 | * |
625 | * @param a some hash code | 626 | * @param a some hash code |
626 | * @param b some hash code | 627 | * @param b some hash code |
627 | * @param result set to a ^ b | 628 | * @param result set to @a a ^ @a b |
628 | */ | 629 | */ |
629 | void | 630 | void |
630 | GNUNET_CRYPTO_hash_xor (const struct GNUNET_HashCode * a, const struct GNUNET_HashCode * b, | 631 | GNUNET_CRYPTO_hash_xor (const struct GNUNET_HashCode * a, const struct GNUNET_HashCode * b, |
@@ -655,6 +656,7 @@ GNUNET_CRYPTO_hash_to_aes_key (const struct GNUNET_HashCode * hc, | |||
655 | int | 656 | int |
656 | GNUNET_CRYPTO_hash_get_bit (const struct GNUNET_HashCode * code, unsigned int bit); | 657 | GNUNET_CRYPTO_hash_get_bit (const struct GNUNET_HashCode * code, unsigned int bit); |
657 | 658 | ||
659 | |||
658 | /** | 660 | /** |
659 | * Determine how many low order bits match in two | 661 | * Determine how many low order bits match in two |
660 | * struct GNUNET_HashCodes. i.e. - 010011 and 011111 share | 662 | * struct GNUNET_HashCodes. i.e. - 010011 and 011111 share |
@@ -664,7 +666,6 @@ GNUNET_CRYPTO_hash_get_bit (const struct GNUNET_HashCode * code, unsigned int bi | |||
664 | * | 666 | * |
665 | * @param first the first hashcode | 667 | * @param first the first hashcode |
666 | * @param second the hashcode to compare first to | 668 | * @param second the hashcode to compare first to |
667 | * | ||
668 | * @return the number of bits that match | 669 | * @return the number of bits that match |
669 | */ | 670 | */ |
670 | unsigned int | 671 | unsigned int |
@@ -919,7 +920,7 @@ GNUNET_CRYPTO_ecc_setup_hostkey (const char *cfg_name); | |||
919 | * | 920 | * |
920 | * @param cfg configuration to use | 921 | * @param cfg configuration to use |
921 | * @param dst pointer to where to write the peer identity | 922 | * @param dst pointer to where to write the peer identity |
922 | * @return GNUNET_OK on success, GNUNET_SYSERR if the identity | 923 | * @return #GNUNET_OK on success, #GNUNET_SYSERR if the identity |
923 | * could not be retrieved | 924 | * could not be retrieved |
924 | */ | 925 | */ |
925 | int | 926 | int |
@@ -933,7 +934,7 @@ GNUNET_CRYPTO_get_host_identity (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
933 | * @param priv private key to use for the ECDH (x) | 934 | * @param priv private key to use for the ECDH (x) |
934 | * @param pub public key to use for the ECDY (yG) | 935 | * @param pub public key to use for the ECDY (yG) |
935 | * @param key_material where to write the key material (xyG) | 936 | * @param key_material where to write the key material (xyG) |
936 | * @return GNUNET_SYSERR on error, GNUNET_OK on success | 937 | * @return #GNUNET_SYSERR on error, #GNUNET_OK on success |
937 | */ | 938 | */ |
938 | int | 939 | int |
939 | GNUNET_CRYPTO_ecc_ecdh (const struct GNUNET_CRYPTO_EccPrivateKey *priv, | 940 | GNUNET_CRYPTO_ecc_ecdh (const struct GNUNET_CRYPTO_EccPrivateKey *priv, |
@@ -947,7 +948,7 @@ GNUNET_CRYPTO_ecc_ecdh (const struct GNUNET_CRYPTO_EccPrivateKey *priv, | |||
947 | * @param priv private key to use for the signing | 948 | * @param priv private key to use for the signing |
948 | * @param purpose what to sign (size, purpose) | 949 | * @param purpose what to sign (size, purpose) |
949 | * @param sig where to write the signature | 950 | * @param sig where to write the signature |
950 | * @return GNUNET_SYSERR on error, GNUNET_OK on success | 951 | * @return #GNUNET_SYSERR on error, #GNUNET_OK on success |
951 | */ | 952 | */ |
952 | int | 953 | int |
953 | GNUNET_CRYPTO_ecc_sign (const struct GNUNET_CRYPTO_EccPrivateKey *priv, | 954 | GNUNET_CRYPTO_ecc_sign (const struct GNUNET_CRYPTO_EccPrivateKey *priv, |
@@ -962,7 +963,7 @@ GNUNET_CRYPTO_ecc_sign (const struct GNUNET_CRYPTO_EccPrivateKey *priv, | |||
962 | * @param validate block to validate (size, purpose, data) | 963 | * @param validate block to validate (size, purpose, data) |
963 | * @param sig signature that is being validated | 964 | * @param sig signature that is being validated |
964 | * @param pub public key of the signer | 965 | * @param pub public key of the signer |
965 | * @returns GNUNET_OK if ok, GNUNET_SYSERR if invalid | 966 | * @returns #GNUNET_OK if ok, #GNUNET_SYSERR if invalid |
966 | */ | 967 | */ |
967 | int | 968 | int |
968 | GNUNET_CRYPTO_ecc_verify (uint32_t purpose, | 969 | GNUNET_CRYPTO_ecc_verify (uint32_t purpose, |
diff --git a/src/include/gnunet_gns_service.h b/src/include/gnunet_gns_service.h index 283229dbf..677957214 100644 --- a/src/include/gnunet_gns_service.h +++ b/src/include/gnunet_gns_service.h | |||
@@ -94,7 +94,7 @@ typedef void (*GNUNET_GNS_LookupResultProcessor) (void *cls, | |||
94 | * @param name the name to look up | 94 | * @param name the name to look up |
95 | * @param zone zone to look in | 95 | * @param zone zone to look in |
96 | * @param type the GNS record type to look for | 96 | * @param type the GNS record type to look for |
97 | * @param only_cached #GNUNET_NO to only check locally (not in the DHT) | 97 | * @param only_cached #GNUNET_YES to only check locally (not in the DHT) |
98 | * @param shorten_zone_key the private key of the shorten zone (can be NULL); | 98 | * @param shorten_zone_key the private key of the shorten zone (can be NULL); |
99 | * specify to enable automatic shortening (given a PSEU | 99 | * specify to enable automatic shortening (given a PSEU |
100 | * record, if a given pseudonym is not yet used in the | 100 | * record, if a given pseudonym is not yet used in the |
diff --git a/src/namestore/gnunet-namestore-fcfsd.c b/src/namestore/gnunet-namestore-fcfsd.c index 9fc75ee5e..8abb10f90 100644 --- a/src/namestore/gnunet-namestore-fcfsd.c +++ b/src/namestore/gnunet-namestore-fcfsd.c | |||
@@ -18,7 +18,7 @@ | |||
18 | Boston, MA 02111-1307, USA. | 18 | Boston, MA 02111-1307, USA. |
19 | */ | 19 | */ |
20 | /** | 20 | /** |
21 | * @file gnunet-gns-fcfsd.c | 21 | * @file gnunet-namestore-fcfsd.c |
22 | * @brief HTTP daemon that offers first-come-first-serve GNS domain registration | 22 | * @brief HTTP daemon that offers first-come-first-serve GNS domain registration |
23 | * @author Christian Grothoff | 23 | * @author Christian Grothoff |
24 | * | 24 | * |
diff --git a/src/namestore/gnunet-service-namestore.c b/src/namestore/gnunet-service-namestore.c index 066bfa5bb..200b167de 100644 --- a/src/namestore/gnunet-service-namestore.c +++ b/src/namestore/gnunet-service-namestore.c | |||
@@ -353,7 +353,7 @@ struct LookupBlockContext | |||
353 | 353 | ||
354 | 354 | ||
355 | /** | 355 | /** |
356 | * A #GNUNET_NAMESTORE_BlockCallback for name lookups in #handle_lookup_name | 356 | * A #GNUNET_NAMESTORE_BlockCallback for name lookups in #handle_lookup_block |
357 | * | 357 | * |
358 | * @param cls a 'struct LookupNameContext *' with information about the request | 358 | * @param cls a 'struct LookupNameContext *' with information about the request |
359 | * @param block the block | 359 | * @param block the block |
@@ -873,11 +873,9 @@ struct ZoneIterationProcResult | |||
873 | * | 873 | * |
874 | * @param cls struct ZoneIterationProcResult *proc | 874 | * @param cls struct ZoneIterationProcResult *proc |
875 | * @param zone_key the zone key | 875 | * @param zone_key the zone key |
876 | * @param expire expiration time | ||
877 | * @param name name | 876 | * @param name name |
878 | * @param rd_count number of records for this name | 877 | * @param rd_count number of records for this name |
879 | * @param rd record data | 878 | * @param rd record data |
880 | * @param signature block signature | ||
881 | */ | 879 | */ |
882 | static void | 880 | static void |
883 | zone_iteraterate_proc (void *cls, | 881 | zone_iteraterate_proc (void *cls, |
@@ -1118,11 +1116,9 @@ monitor_next (void *cls, | |||
1118 | * | 1116 | * |
1119 | * @param cls a 'struct ZoneMonitor *' with information about the monitor | 1117 | * @param cls a 'struct ZoneMonitor *' with information about the monitor |
1120 | * @param zone_key zone key of the zone | 1118 | * @param zone_key zone key of the zone |
1121 | * @param expire expiration time | ||
1122 | * @param name name | 1119 | * @param name name |
1123 | * @param rd_count number of records | 1120 | * @param rd_count number of records |
1124 | * @param rd array of records | 1121 | * @param rd array of records |
1125 | * @param signature signature | ||
1126 | */ | 1122 | */ |
1127 | static void | 1123 | static void |
1128 | monitor_iterate_cb (void *cls, | 1124 | monitor_iterate_cb (void *cls, |
diff --git a/src/namestore/namestore.h b/src/namestore/namestore.h index edfb8dcdd..d54ab12a8 100644 --- a/src/namestore/namestore.h +++ b/src/namestore/namestore.h | |||
@@ -151,7 +151,7 @@ struct BlockCacheResponseMessage | |||
151 | struct RecordStoreMessage | 151 | struct RecordStoreMessage |
152 | { | 152 | { |
153 | /** | 153 | /** |
154 | * Type will be #GNUNET_MESSAGE_TYPE_NAMESTORE_LOOKUP_RECORD_STORE | 154 | * Type will be #GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_STORE |
155 | */ | 155 | */ |
156 | struct GNUNET_NAMESTORE_Header gns_header; | 156 | struct GNUNET_NAMESTORE_Header gns_header; |
157 | 157 | ||