diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-08-14 23:05:42 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-08-14 23:05:42 +0000 |
commit | ca173048a26a418866163d14c9159b9ad712644b (patch) | |
tree | 7ec72935229086d494257d144dcb373b5ea858cd /src/include | |
parent | 17d1146c625092753e1b29b7ce6f0dfb603fbd09 (diff) | |
download | gnunet-ca173048a26a418866163d14c9159b9ad712644b.tar.gz gnunet-ca173048a26a418866163d14c9159b9ad712644b.zip |
-doxygen
Diffstat (limited to 'src/include')
-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 |
3 files changed, 53 insertions, 54 deletions
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 |