diff options
169 files changed, 1117 insertions, 1116 deletions
diff --git a/pre-commit b/pre-commit index da86ca59c..ed2455237 100755 --- a/pre-commit +++ b/pre-commit | |||
@@ -1,6 +1,10 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | find src/ -name "*.c" -exec indent {} \; | 2 | find src/ -name "*.c" -exec indent {} \; |
3 | find src/ -name "*.h" -exec indent {} \; | 3 | find src/ -name "*.h" -exec indent {} \; |
4 | find src/ -name "*.c" -exec indent {} \; | ||
5 | find src/ -name "*.h" -exec indent {} \; | ||
6 | find src/ -name "*.c" -exec contrib/removetrailingwhitespace {} \; | ||
7 | find src/ -name "*.h" -exec contrib/removetrailingwhitespace {} \; | ||
4 | if test -x "`which 'dos2unix'`" | 8 | if test -x "`which 'dos2unix'`" |
5 | then | 9 | then |
6 | find src/ -name "*.c" -exec dos2unix {} \; | 10 | find src/ -name "*.c" -exec dos2unix {} \; |
diff --git a/src/arm/gnunet-service-arm.c b/src/arm/gnunet-service-arm.c index e85b2eb12..eb19776e6 100644 --- a/src/arm/gnunet-service-arm.c +++ b/src/arm/gnunet-service-arm.c | |||
@@ -103,12 +103,12 @@ struct ServiceList | |||
103 | time_t mtime; | 103 | time_t mtime; |
104 | 104 | ||
105 | /** | 105 | /** |
106 | * Process exponential backoff time | 106 | * Process exponential backoff time |
107 | */ | 107 | */ |
108 | struct GNUNET_TIME_Relative backoff; | 108 | struct GNUNET_TIME_Relative backoff; |
109 | 109 | ||
110 | /** | 110 | /** |
111 | * Absolute time at which the process is scheduled to restart in case of death | 111 | * Absolute time at which the process is scheduled to restart in case of death |
112 | */ | 112 | */ |
113 | struct GNUNET_TIME_Absolute restartAt; | 113 | struct GNUNET_TIME_Absolute restartAt; |
114 | 114 | ||
@@ -631,8 +631,8 @@ clean_up_running () | |||
631 | 631 | ||
632 | 632 | ||
633 | /** | 633 | /** |
634 | * We are done with everything. Stop remaining | 634 | * We are done with everything. Stop remaining |
635 | * tasks, signal handler and the server. | 635 | * tasks, signal handler and the server. |
636 | */ | 636 | */ |
637 | static void | 637 | static void |
638 | do_shutdown () | 638 | do_shutdown () |
@@ -743,7 +743,7 @@ delayed_restart_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
743 | 743 | ||
744 | /** | 744 | /** |
745 | * Task triggered whenever we receive a SIGCHLD (child | 745 | * Task triggered whenever we receive a SIGCHLD (child |
746 | * process died). | 746 | * process died). |
747 | * | 747 | * |
748 | * @param cls closure, NULL if we need to self-restart | 748 | * @param cls closure, NULL if we need to self-restart |
749 | * @param tc context | 749 | * @param tc context |
diff --git a/src/arm/gnunet-service-arm.h b/src/arm/gnunet-service-arm.h index e8d125b92..689f26c82 100644 --- a/src/arm/gnunet-service-arm.h +++ b/src/arm/gnunet-service-arm.h | |||
@@ -31,7 +31,7 @@ | |||
31 | * Start the specified service. | 31 | * Start the specified service. |
32 | * | 32 | * |
33 | * @param client who is asking for this | 33 | * @param client who is asking for this |
34 | * @param servicename name of the service to start | 34 | * @param servicename name of the service to start |
35 | * @param lsocks -1 terminated list of listen sockets to pass (systemd style), or NULL | 35 | * @param lsocks -1 terminated list of listen sockets to pass (systemd style), or NULL |
36 | * @return GNUNET_OK on success | 36 | * @return GNUNET_OK on success |
37 | */ | 37 | */ |
@@ -41,7 +41,7 @@ start_service (struct GNUNET_SERVER_Client *client, const char *servicename, | |||
41 | 41 | ||
42 | /** | 42 | /** |
43 | * Stop listening for connections to a service. | 43 | * Stop listening for connections to a service. |
44 | * | 44 | * |
45 | * @param serviceName name of service to stop listening for | 45 | * @param serviceName name of service to stop listening for |
46 | * @return GNUNET_OK if we stopped to listen, GNUNET_NO if we were | 46 | * @return GNUNET_OK if we stopped to listen, GNUNET_NO if we were |
47 | * not listening | 47 | * not listening |
diff --git a/src/arm/gnunet-service-arm_interceptor.c b/src/arm/gnunet-service-arm_interceptor.c index 59f8ac30b..837f67d4d 100644 --- a/src/arm/gnunet-service-arm_interceptor.c +++ b/src/arm/gnunet-service-arm_interceptor.c | |||
@@ -21,7 +21,7 @@ | |||
21 | * @file arm/gnunet-service-arm_interceptor.c | 21 | * @file arm/gnunet-service-arm_interceptor.c |
22 | * @brief listen to incoming connections from clients to services, | 22 | * @brief listen to incoming connections from clients to services, |
23 | * start services for which incoming an incoming connection occur, | 23 | * start services for which incoming an incoming connection occur, |
24 | * and relay communication between the client and the service for | 24 | * and relay communication between the client and the service for |
25 | * that first incoming connection. | 25 | * that first incoming connection. |
26 | * | 26 | * |
27 | * @author Safey Abdel Halim | 27 | * @author Safey Abdel Halim |
@@ -228,7 +228,7 @@ static struct ServiceListeningInfo *serviceListeningInfoList_tail; | |||
228 | 228 | ||
229 | /** | 229 | /** |
230 | * Put the default services represented by a space separated string into an array of strings | 230 | * Put the default services represented by a space separated string into an array of strings |
231 | * | 231 | * |
232 | * @param services space separated string of default services | 232 | * @param services space separated string of default services |
233 | */ | 233 | */ |
234 | static void | 234 | static void |
@@ -264,7 +264,7 @@ addDefaultServicesToList (const char *services) | |||
264 | 264 | ||
265 | /** | 265 | /** |
266 | * Checks whether the serviceName is in the list of default services | 266 | * Checks whether the serviceName is in the list of default services |
267 | * | 267 | * |
268 | * @param serviceName string to check its existance in the list | 268 | * @param serviceName string to check its existance in the list |
269 | * @return GNUNET_YES if the service is started by default | 269 | * @return GNUNET_YES if the service is started by default |
270 | */ | 270 | */ |
@@ -283,7 +283,7 @@ isInDefaultList (const char *serviceName) | |||
283 | /** | 283 | /** |
284 | * Close forwarded connection (partial or full). | 284 | * Close forwarded connection (partial or full). |
285 | * | 285 | * |
286 | * @param fc connection to close | 286 | * @param fc connection to close |
287 | * @param reason which direction to close | 287 | * @param reason which direction to close |
288 | */ | 288 | */ |
289 | static void | 289 | static void |
@@ -352,9 +352,9 @@ closeClientAndServiceSockets (struct ForwardedConnection *fc, int reason) | |||
352 | 352 | ||
353 | /** | 353 | /** |
354 | * Read data from the client and then forward it to the service. | 354 | * Read data from the client and then forward it to the service. |
355 | * | 355 | * |
356 | * @param cls callback data, struct ForwardedConnection for the communication between client and service | 356 | * @param cls callback data, struct ForwardedConnection for the communication between client and service |
357 | * @param tc context | 357 | * @param tc context |
358 | */ | 358 | */ |
359 | static void | 359 | static void |
360 | receiveFromClient (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc); | 360 | receiveFromClient (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc); |
@@ -362,7 +362,7 @@ receiveFromClient (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc); | |||
362 | 362 | ||
363 | /** | 363 | /** |
364 | * Receive service messages sent by the service and forward it to client | 364 | * Receive service messages sent by the service and forward it to client |
365 | * | 365 | * |
366 | * @param cls callback data, struct ForwardedConnection for the communication between client and service | 366 | * @param cls callback data, struct ForwardedConnection for the communication between client and service |
367 | * @param tc scheduler context | 367 | * @param tc scheduler context |
368 | */ | 368 | */ |
@@ -380,7 +380,7 @@ start_forwarding (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc); | |||
380 | 380 | ||
381 | /** | 381 | /** |
382 | * Forward messages sent from service to client | 382 | * Forward messages sent from service to client |
383 | * | 383 | * |
384 | * @param cls callback data, struct ForwardedConnection for the communication between client and service | 384 | * @param cls callback data, struct ForwardedConnection for the communication between client and service |
385 | * @param tc context | 385 | * @param tc context |
386 | */ | 386 | */ |
@@ -437,7 +437,7 @@ forwardToClient (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
437 | 437 | ||
438 | /** | 438 | /** |
439 | * Receive service messages sent by the service and forward it to client | 439 | * Receive service messages sent by the service and forward it to client |
440 | * | 440 | * |
441 | * @param cls callback data, struct ForwardedConnection for the communication between client and service | 441 | * @param cls callback data, struct ForwardedConnection for the communication between client and service |
442 | * @param tc scheduler context | 442 | * @param tc scheduler context |
443 | */ | 443 | */ |
@@ -531,7 +531,7 @@ receiveFromService (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
531 | 531 | ||
532 | /** | 532 | /** |
533 | * Forward client message to service | 533 | * Forward client message to service |
534 | * | 534 | * |
535 | * @param cls callback data, struct ForwardedConnection for the communication between client and service | 535 | * @param cls callback data, struct ForwardedConnection for the communication between client and service |
536 | * @param tc scheduler context | 536 | * @param tc scheduler context |
537 | */ | 537 | */ |
@@ -626,9 +626,9 @@ forwardToService (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
626 | 626 | ||
627 | /** | 627 | /** |
628 | * Read data from the client and then forward it to the service. | 628 | * Read data from the client and then forward it to the service. |
629 | * | 629 | * |
630 | * @param cls callback data, struct ForwardedConnection for the communication between client and service | 630 | * @param cls callback data, struct ForwardedConnection for the communication between client and service |
631 | * @param tc context | 631 | * @param tc context |
632 | */ | 632 | */ |
633 | static void | 633 | static void |
634 | receiveFromClient (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 634 | receiveFromClient (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) |
@@ -907,9 +907,9 @@ stop_listening (const char *serviceName) | |||
907 | /** | 907 | /** |
908 | * First connection has come to the listening socket associated with the service, | 908 | * First connection has come to the listening socket associated with the service, |
909 | * create the service in order to relay the incoming connection to it | 909 | * create the service in order to relay the incoming connection to it |
910 | * | 910 | * |
911 | * @param cls callback data, struct ServiceListeningInfo describing a listen socket | 911 | * @param cls callback data, struct ServiceListeningInfo describing a listen socket |
912 | * @param tc context | 912 | * @param tc context |
913 | */ | 913 | */ |
914 | static void | 914 | static void |
915 | acceptConnection (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc); | 915 | acceptConnection (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc); |
@@ -970,9 +970,9 @@ accept_and_forward (struct ServiceListeningInfo *serviceListeningInfo) | |||
970 | /** | 970 | /** |
971 | * First connection has come to the listening socket associated with the service, | 971 | * First connection has come to the listening socket associated with the service, |
972 | * create the service in order to relay the incoming connection to it | 972 | * create the service in order to relay the incoming connection to it |
973 | * | 973 | * |
974 | * @param cls callback data, struct ServiceListeningInfo describing a listen socket | 974 | * @param cls callback data, struct ServiceListeningInfo describing a listen socket |
975 | * @param tc context | 975 | * @param tc context |
976 | */ | 976 | */ |
977 | static void | 977 | static void |
978 | acceptConnection (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 978 | acceptConnection (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) |
@@ -1042,7 +1042,7 @@ acceptConnection (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
1042 | /** | 1042 | /** |
1043 | * Creating a listening socket for each of the service's addresses and | 1043 | * Creating a listening socket for each of the service's addresses and |
1044 | * wait for the first incoming connection to it | 1044 | * wait for the first incoming connection to it |
1045 | * | 1045 | * |
1046 | * @param sa address associated with the service | 1046 | * @param sa address associated with the service |
1047 | * @param addr_len length of sa | 1047 | * @param addr_len length of sa |
1048 | * @param serviceName the name of the service in question | 1048 | * @param serviceName the name of the service in question |
@@ -1132,7 +1132,7 @@ createListeningSocket (struct sockaddr *sa, socklen_t addr_len, | |||
1132 | /** | 1132 | /** |
1133 | * Callback function, checks whether the current tokens are representing a service, | 1133 | * Callback function, checks whether the current tokens are representing a service, |
1134 | * gets its addresses and create listening socket for it. | 1134 | * gets its addresses and create listening socket for it. |
1135 | * | 1135 | * |
1136 | * @param cls callback data, not used | 1136 | * @param cls callback data, not used |
1137 | * @param section configuration section | 1137 | * @param section configuration section |
1138 | * @param option configuration option | 1138 | * @param option configuration option |
diff --git a/src/ats/ats_api.c b/src/ats/ats_api.c index 4f791050d..42c2f99a4 100644 --- a/src/ats/ats_api.c +++ b/src/ats/ats_api.c | |||
@@ -165,7 +165,7 @@ struct GNUNET_ATS_Handle | |||
165 | * | 165 | * |
166 | * @param cls pointer to counter | 166 | * @param cls pointer to counter |
167 | * @param key identity of the peer associated with the records | 167 | * @param key identity of the peer associated with the records |
168 | * @param value a 'struct AllocationRecord' | 168 | * @param value a 'struct AllocationRecord' |
169 | * @return GNUNET_YES (continue iteration) | 169 | * @return GNUNET_YES (continue iteration) |
170 | */ | 170 | */ |
171 | static int | 171 | static int |
@@ -202,7 +202,7 @@ struct SetBandwidthContext | |||
202 | * | 202 | * |
203 | * @param cls 'struct SetBandwidthContext' | 203 | * @param cls 'struct SetBandwidthContext' |
204 | * @param key identity of the peer associated with the records | 204 | * @param key identity of the peer associated with the records |
205 | * @param value a 'struct AllocationRecord' | 205 | * @param value a 'struct AllocationRecord' |
206 | * @return GNUNET_YES (continue iteration) | 206 | * @return GNUNET_YES (continue iteration) |
207 | */ | 207 | */ |
208 | static int | 208 | static int |
@@ -285,8 +285,7 @@ suggest_address (void *cls, const GNUNET_HashCode * key, void *value) | |||
285 | 285 | ||
286 | /* trivial strategy: pick first available address... */ | 286 | /* trivial strategy: pick first available address... */ |
287 | asc->cb (asc->cb_cls, &asc->target, ar->plugin_name, ar->plugin_addr, | 287 | asc->cb (asc->cb_cls, &asc->target, ar->plugin_name, ar->plugin_addr, |
288 | ar->plugin_addr_len, | 288 | ar->plugin_addr_len, ar->session, |
289 | ar->session, | ||
290 | GNUNET_BANDWIDTH_value_init (asc->atc->total_bps / 32), ar->ats, | 289 | GNUNET_BANDWIDTH_value_init (asc->atc->total_bps / 32), ar->ats, |
291 | ar->ats_count); | 290 | ar->ats_count); |
292 | asc->cb = NULL; | 291 | asc->cb = NULL; |
@@ -437,8 +436,8 @@ struct UpdateSessionContext | |||
437 | * | 436 | * |
438 | * @param cls a new 'struct AllocationRecord' | 437 | * @param cls a new 'struct AllocationRecord' |
439 | * @param key identity of the peer associated with the records | 438 | * @param key identity of the peer associated with the records |
440 | * @param value the old 'struct AllocationRecord' | 439 | * @param value the old 'struct AllocationRecord' |
441 | * @return GNUNET_YES if the records do not match, | 440 | * @return GNUNET_YES if the records do not match, |
442 | * GNUNET_NO if the record do match and 'old' was updated | 441 | * GNUNET_NO if the record do match and 'old' was updated |
443 | */ | 442 | */ |
444 | static int | 443 | static int |
@@ -682,8 +681,7 @@ notify_valid (void *cls, const GNUNET_HashCode * key, void *value) | |||
682 | struct GNUNET_ATS_SuggestionContext *asc = value; | 681 | struct GNUNET_ATS_SuggestionContext *asc = value; |
683 | 682 | ||
684 | asc->cb (asc->cb_cls, &asc->target, ar->plugin_name, ar->plugin_addr, | 683 | asc->cb (asc->cb_cls, &asc->target, ar->plugin_name, ar->plugin_addr, |
685 | ar->plugin_addr_len, | 684 | ar->plugin_addr_len, ar->session, |
686 | ar->session, | ||
687 | GNUNET_BANDWIDTH_value_init (asc->atc->total_bps / 32), ar->ats, | 685 | GNUNET_BANDWIDTH_value_init (asc->atc->total_bps / 32), ar->ats, |
688 | ar->ats_count); | 686 | ar->ats_count); |
689 | GNUNET_ATS_suggest_address_cancel (asc); | 687 | GNUNET_ATS_suggest_address_cancel (asc); |
diff --git a/src/block/block.c b/src/block/block.c index ac466337c..238334b66 100644 --- a/src/block/block.c +++ b/src/block/block.c | |||
@@ -66,7 +66,7 @@ struct GNUNET_BLOCK_Context | |||
66 | 66 | ||
67 | /** | 67 | /** |
68 | * Mingle hash with the mingle_number to produce different bits. | 68 | * Mingle hash with the mingle_number to produce different bits. |
69 | * | 69 | * |
70 | * @param in original hash code | 70 | * @param in original hash code |
71 | * @param mingle_number number for hash permutation | 71 | * @param mingle_number number for hash permutation |
72 | * @param hc where to store the result. | 72 | * @param hc where to store the result. |
@@ -192,7 +192,7 @@ find_plugin (struct GNUNET_BLOCK_Context *ctx, enum GNUNET_BLOCK_Type type) | |||
192 | /** | 192 | /** |
193 | * Function called to validate a reply or a request. For | 193 | * Function called to validate a reply or a request. For |
194 | * request evaluation, simply pass "NULL" for the reply_block. | 194 | * request evaluation, simply pass "NULL" for the reply_block. |
195 | * Note that it is assumed that the reply has already been | 195 | * Note that it is assumed that the reply has already been |
196 | * matched to the key (and signatures checked) as it would | 196 | * matched to the key (and signatures checked) as it would |
197 | * be done with the "get_key" function. | 197 | * be done with the "get_key" function. |
198 | * | 198 | * |
diff --git a/src/block/plugin_block_fs.c b/src/block/plugin_block_fs.c index 627f21a10..f9bf4e36e 100644 --- a/src/block/plugin_block_fs.c +++ b/src/block/plugin_block_fs.c | |||
@@ -40,7 +40,7 @@ | |||
40 | /** | 40 | /** |
41 | * Function called to validate a reply or a request. For | 41 | * Function called to validate a reply or a request. For |
42 | * request evaluation, simply pass "NULL" for the reply_block. | 42 | * request evaluation, simply pass "NULL" for the reply_block. |
43 | * Note that it is assumed that the reply has already been | 43 | * Note that it is assumed that the reply has already been |
44 | * matched to the key (and signatures checked) as it would | 44 | * matched to the key (and signatures checked) as it would |
45 | * be done with the "get_key" function. | 45 | * be done with the "get_key" function. |
46 | * | 46 | * |
diff --git a/src/chat/chat.c b/src/chat/chat.c index fb47b6c15..b51d29b9c 100644 --- a/src/chat/chat.c +++ b/src/chat/chat.c | |||
@@ -626,7 +626,7 @@ GNUNET_CHAT_leave_room (struct GNUNET_CHAT_Room *chat_room) | |||
626 | * @param room_name name of the room | 626 | * @param room_name name of the room |
627 | * @param msg_options message options of the joining user | 627 | * @param msg_options message options of the joining user |
628 | * @param joinCallback function to call on successful join | 628 | * @param joinCallback function to call on successful join |
629 | * @param join_cls closure for joinCallback | 629 | * @param join_cls closure for joinCallback |
630 | * @param messageCallback which function to call if a message has | 630 | * @param messageCallback which function to call if a message has |
631 | * been received? | 631 | * been received? |
632 | * @param message_cls argument to callback | 632 | * @param message_cls argument to callback |
diff --git a/src/chat/gnunet-service-chat.c b/src/chat/gnunet-service-chat.c index e04d8d099..c41ec9095 100644 --- a/src/chat/gnunet-service-chat.c +++ b/src/chat/gnunet-service-chat.c | |||
@@ -20,7 +20,7 @@ | |||
20 | 20 | ||
21 | /** | 21 | /** |
22 | * @file chat/gnunet-service-chat.c | 22 | * @file chat/gnunet-service-chat.c |
23 | * @brief service providing chat functionality | 23 | * @brief service providing chat functionality |
24 | * @author Christian Grothoff | 24 | * @author Christian Grothoff |
25 | * @author Vitaly Minko | 25 | * @author Vitaly Minko |
26 | */ | 26 | */ |
diff --git a/src/core/core.h b/src/core/core.h index 53d1a1b6d..37580bb82 100644 --- a/src/core/core.h +++ b/src/core/core.h | |||
@@ -378,7 +378,7 @@ struct SendMessageRequest | |||
378 | 378 | ||
379 | 379 | ||
380 | /** | 380 | /** |
381 | * Core notifying client that it is allowed to now | 381 | * Core notifying client that it is allowed to now |
382 | * transmit a message to the given target | 382 | * transmit a message to the given target |
383 | * (response to GNUNET_MESSAGE_TYPE_CORE_SEND_REQUEST). | 383 | * (response to GNUNET_MESSAGE_TYPE_CORE_SEND_REQUEST). |
384 | */ | 384 | */ |
@@ -390,9 +390,9 @@ struct SendMessageReady | |||
390 | struct GNUNET_MessageHeader header; | 390 | struct GNUNET_MessageHeader header; |
391 | 391 | ||
392 | /** | 392 | /** |
393 | * How many bytes are allowed for transmission? | 393 | * How many bytes are allowed for transmission? |
394 | * Guaranteed to be at least as big as the requested size, | 394 | * Guaranteed to be at least as big as the requested size, |
395 | * or ZERO if the request is rejected (will timeout, | 395 | * or ZERO if the request is rejected (will timeout, |
396 | * peer disconnected, queue full, etc.). | 396 | * peer disconnected, queue full, etc.). |
397 | */ | 397 | */ |
398 | uint16_t size GNUNET_PACKED; | 398 | uint16_t size GNUNET_PACKED; |
diff --git a/src/core/core_api.c b/src/core/core_api.c index 27754010a..30c86d0d9 100644 --- a/src/core/core_api.c +++ b/src/core/core_api.c | |||
@@ -39,14 +39,14 @@ struct PeerRecord | |||
39 | /** | 39 | /** |
40 | * We generally do NOT keep peer records in a DLL; this | 40 | * We generally do NOT keep peer records in a DLL; this |
41 | * DLL is only used IF this peer's 'pending_head' message | 41 | * DLL is only used IF this peer's 'pending_head' message |
42 | * is ready for transmission. | 42 | * is ready for transmission. |
43 | */ | 43 | */ |
44 | struct PeerRecord *prev; | 44 | struct PeerRecord *prev; |
45 | 45 | ||
46 | /** | 46 | /** |
47 | * We generally do NOT keep peer records in a DLL; this | 47 | * We generally do NOT keep peer records in a DLL; this |
48 | * DLL is only used IF this peer's 'pending_head' message | 48 | * DLL is only used IF this peer's 'pending_head' message |
49 | * is ready for transmission. | 49 | * is ready for transmission. |
50 | */ | 50 | */ |
51 | struct PeerRecord *next; | 51 | struct PeerRecord *next; |
52 | 52 | ||
@@ -98,7 +98,7 @@ struct PeerRecord | |||
98 | 98 | ||
99 | /** | 99 | /** |
100 | * ID of timeout task for the 'pending_head' handle | 100 | * ID of timeout task for the 'pending_head' handle |
101 | * which is the one with the smallest timeout. | 101 | * which is the one with the smallest timeout. |
102 | */ | 102 | */ |
103 | GNUNET_SCHEDULER_TaskIdentifier timeout_task; | 103 | GNUNET_SCHEDULER_TaskIdentifier timeout_task; |
104 | 104 | ||
@@ -124,7 +124,7 @@ struct PeerRecord | |||
124 | * Entry in a doubly-linked list of control messages to be transmitted | 124 | * Entry in a doubly-linked list of control messages to be transmitted |
125 | * to the core service. Control messages include traffic allocation, | 125 | * to the core service. Control messages include traffic allocation, |
126 | * connection requests and of course our initial 'init' request. | 126 | * connection requests and of course our initial 'init' request. |
127 | * | 127 | * |
128 | * The actual message is allocated at the end of this struct. | 128 | * The actual message is allocated at the end of this struct. |
129 | */ | 129 | */ |
130 | struct ControlMessage | 130 | struct ControlMessage |
@@ -319,7 +319,7 @@ struct GNUNET_CORE_TransmitHandle | |||
319 | struct PeerRecord *peer; | 319 | struct PeerRecord *peer; |
320 | 320 | ||
321 | /** | 321 | /** |
322 | * Corresponding SEND_REQUEST message. Only non-NULL | 322 | * Corresponding SEND_REQUEST message. Only non-NULL |
323 | * while SEND_REQUEST message is pending. | 323 | * while SEND_REQUEST message is pending. |
324 | */ | 324 | */ |
325 | struct ControlMessage *cm; | 325 | struct ControlMessage *cm; |
@@ -396,7 +396,7 @@ reconnect_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
396 | 396 | ||
397 | 397 | ||
398 | /** | 398 | /** |
399 | * Notify clients about disconnect and free | 399 | * Notify clients about disconnect and free |
400 | * the entry for connected peer. | 400 | * the entry for connected peer. |
401 | * | 401 | * |
402 | * @param cls the 'struct GNUNET_CORE_Handle*' | 402 | * @param cls the 'struct GNUNET_CORE_Handle*' |
@@ -1393,7 +1393,7 @@ GNUNET_CORE_connect (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
1393 | 1393 | ||
1394 | 1394 | ||
1395 | /** | 1395 | /** |
1396 | * Disconnect from the core service. This function can only | 1396 | * Disconnect from the core service. This function can only |
1397 | * be called *after* all pending 'GNUNET_CORE_notify_transmit_ready' | 1397 | * be called *after* all pending 'GNUNET_CORE_notify_transmit_ready' |
1398 | * requests have been explicitly canceled. | 1398 | * requests have been explicitly canceled. |
1399 | * | 1399 | * |
@@ -1883,7 +1883,7 @@ GNUNET_CORE_peer_change_preference (struct GNUNET_CORE_Handle *h, | |||
1883 | /** | 1883 | /** |
1884 | * Cancel request for getting information about a peer. | 1884 | * Cancel request for getting information about a peer. |
1885 | * Note that an eventual change in preference, trust or bandwidth | 1885 | * Note that an eventual change in preference, trust or bandwidth |
1886 | * assignment MAY have already been committed at the time, | 1886 | * assignment MAY have already been committed at the time, |
1887 | * so cancelling a request is NOT sure to undo the original | 1887 | * so cancelling a request is NOT sure to undo the original |
1888 | * request. The original request may or may not still commit. | 1888 | * request. The original request may or may not still commit. |
1889 | * The only thing cancellation ensures is that the callback | 1889 | * The only thing cancellation ensures is that the callback |
diff --git a/src/core/gnunet-service-core.c b/src/core/gnunet-service-core.c index 7385991a2..1b8bb630c 100644 --- a/src/core/gnunet-service-core.c +++ b/src/core/gnunet-service-core.c | |||
@@ -71,7 +71,7 @@ | |||
71 | 71 | ||
72 | /** | 72 | /** |
73 | * After how much time past the "official" expiration time do | 73 | * After how much time past the "official" expiration time do |
74 | * we discard messages? Should not be zero since we may | 74 | * we discard messages? Should not be zero since we may |
75 | * intentionally defer transmission until close to the deadline | 75 | * intentionally defer transmission until close to the deadline |
76 | * and then may be slightly past the deadline due to inaccuracy | 76 | * and then may be slightly past the deadline due to inaccuracy |
77 | * in sleep and our own CPU consumption. | 77 | * in sleep and our own CPU consumption. |
@@ -410,7 +410,7 @@ struct MessageEntry | |||
410 | 410 | ||
411 | 411 | ||
412 | /** | 412 | /** |
413 | * Record kept for each request for transmission issued by a | 413 | * Record kept for each request for transmission issued by a |
414 | * client that is still pending. | 414 | * client that is still pending. |
415 | */ | 415 | */ |
416 | struct ClientActiveRequest; | 416 | struct ClientActiveRequest; |
@@ -439,13 +439,13 @@ struct Neighbour | |||
439 | struct MessageEntry *encrypted_tail; | 439 | struct MessageEntry *encrypted_tail; |
440 | 440 | ||
441 | /** | 441 | /** |
442 | * Head of list of requests from clients for transmission to | 442 | * Head of list of requests from clients for transmission to |
443 | * this peer. | 443 | * this peer. |
444 | */ | 444 | */ |
445 | struct ClientActiveRequest *active_client_request_head; | 445 | struct ClientActiveRequest *active_client_request_head; |
446 | 446 | ||
447 | /** | 447 | /** |
448 | * Tail of list of requests from clients for transmission to | 448 | * Tail of list of requests from clients for transmission to |
449 | * this peer. | 449 | * this peer. |
450 | */ | 450 | */ |
451 | struct ClientActiveRequest *active_client_request_tail; | 451 | struct ClientActiveRequest *active_client_request_tail; |
@@ -684,7 +684,7 @@ struct Client | |||
684 | 684 | ||
685 | 685 | ||
686 | /** | 686 | /** |
687 | * Record kept for each request for transmission issued by a | 687 | * Record kept for each request for transmission issued by a |
688 | * client that is still pending. | 688 | * client that is still pending. |
689 | */ | 689 | */ |
690 | struct ClientActiveRequest | 690 | struct ClientActiveRequest |
@@ -962,10 +962,10 @@ send_to_client (struct Client *client, const struct GNUNET_MessageHeader *msg, | |||
962 | /** | 962 | /** |
963 | * Send a message to all of our current clients that have | 963 | * Send a message to all of our current clients that have |
964 | * the right options set. | 964 | * the right options set. |
965 | * | 965 | * |
966 | * @param msg message to multicast | 966 | * @param msg message to multicast |
967 | * @param can_drop can this message be discarded if the queue is too long | 967 | * @param can_drop can this message be discarded if the queue is too long |
968 | * @param options mask to use | 968 | * @param options mask to use |
969 | */ | 969 | */ |
970 | static void | 970 | static void |
971 | send_to_all_clients (const struct GNUNET_MessageHeader *msg, int can_drop, | 971 | send_to_all_clients (const struct GNUNET_MessageHeader *msg, int can_drop, |
@@ -1225,7 +1225,7 @@ handle_client_send_request (void *cls, struct GNUNET_SERVER_Client *client, | |||
1225 | (n->status != PEER_STATE_KEY_CONFIRMED)) | 1225 | (n->status != PEER_STATE_KEY_CONFIRMED)) |
1226 | { | 1226 | { |
1227 | /* neighbour must have disconnected since request was issued, | 1227 | /* neighbour must have disconnected since request was issued, |
1228 | * ignore (client will realize it once it processes the | 1228 | * ignore (client will realize it once it processes the |
1229 | * disconnect notification) */ | 1229 | * disconnect notification) */ |
1230 | #if DEBUG_CORE_CLIENT | 1230 | #if DEBUG_CORE_CLIENT |
1231 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1231 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
@@ -1705,7 +1705,7 @@ handle_client_request_info (void *cls, struct GNUNET_SERVER_Client *client, | |||
1705 | else | 1705 | else |
1706 | { | 1706 | { |
1707 | /* Technically, this COULD happen (due to asynchronous behavior), | 1707 | /* Technically, this COULD happen (due to asynchronous behavior), |
1708 | * but it should be rare, so we should generate an info event | 1708 | * but it should be rare, so we should generate an info event |
1709 | * to help diagnosis of serious errors that might be masked by this */ | 1709 | * to help diagnosis of serious errors that might be masked by this */ |
1710 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, | 1710 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, |
1711 | _ | 1711 | _ |
@@ -1860,7 +1860,7 @@ consider_free_neighbour (struct Neighbour *n); | |||
1860 | 1860 | ||
1861 | 1861 | ||
1862 | /** | 1862 | /** |
1863 | * Task triggered when a neighbour entry is about to time out | 1863 | * Task triggered when a neighbour entry is about to time out |
1864 | * (and we should prevent this by sending a PING). | 1864 | * (and we should prevent this by sending a PING). |
1865 | * | 1865 | * |
1866 | * @param cls the 'struct Neighbour' | 1866 | * @param cls the 'struct Neighbour' |
@@ -2733,7 +2733,7 @@ process_plaintext_neighbour_queue (struct Neighbour *n) | |||
2733 | /** | 2733 | /** |
2734 | * Function that recalculates the bandwidth quota for the | 2734 | * Function that recalculates the bandwidth quota for the |
2735 | * given neighbour and transmits it to the transport service. | 2735 | * given neighbour and transmits it to the transport service. |
2736 | * | 2736 | * |
2737 | * @param cls neighbour for the quota update | 2737 | * @param cls neighbour for the quota update |
2738 | * @param tc context | 2738 | * @param tc context |
2739 | */ | 2739 | */ |
@@ -2850,7 +2850,7 @@ handle_client_send (void *cls, struct GNUNET_SERVER_Client *client, | |||
2850 | if ((n == NULL) || (GNUNET_YES != n->is_connected) || | 2850 | if ((n == NULL) || (GNUNET_YES != n->is_connected) || |
2851 | (n->status != PEER_STATE_KEY_CONFIRMED)) | 2851 | (n->status != PEER_STATE_KEY_CONFIRMED)) |
2852 | { | 2852 | { |
2853 | /* attempt to send message to peer that is not connected anymore | 2853 | /* attempt to send message to peer that is not connected anymore |
2854 | * (can happen due to asynchrony) */ | 2854 | * (can happen due to asynchrony) */ |
2855 | GNUNET_STATISTICS_update (stats, | 2855 | GNUNET_STATISTICS_update (stats, |
2856 | gettext_noop | 2856 | gettext_noop |
@@ -4256,7 +4256,7 @@ handle_transport_receive (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
4256 | /** | 4256 | /** |
4257 | * Function that recalculates the bandwidth quota for the | 4257 | * Function that recalculates the bandwidth quota for the |
4258 | * given neighbour and transmits it to the transport service. | 4258 | * given neighbour and transmits it to the transport service. |
4259 | * | 4259 | * |
4260 | * @param cls neighbour for the quota update | 4260 | * @param cls neighbour for the quota update |
4261 | * @param tc context | 4261 | * @param tc context |
4262 | */ | 4262 | */ |
@@ -4283,7 +4283,7 @@ neighbour_quota_update (void *cls, | |||
4283 | n->quota_update_task = GNUNET_SCHEDULER_NO_TASK; | 4283 | n->quota_update_task = GNUNET_SCHEDULER_NO_TASK; |
4284 | /* calculate relative preference among all neighbours; | 4284 | /* calculate relative preference among all neighbours; |
4285 | * divides by a bit more to avoid division by zero AND to | 4285 | * divides by a bit more to avoid division by zero AND to |
4286 | * account for possibility of new neighbours joining any time | 4286 | * account for possibility of new neighbours joining any time |
4287 | * AND to convert to double... */ | 4287 | * AND to convert to double... */ |
4288 | neighbour_count = GNUNET_CONTAINER_multihashmap_size (neighbours); | 4288 | neighbour_count = GNUNET_CONTAINER_multihashmap_size (neighbours); |
4289 | if (neighbour_count == 0) | 4289 | if (neighbour_count == 0) |
diff --git a/src/datacache/datacache.c b/src/datacache/datacache.c index 9d12fbc3e..26402362b 100644 --- a/src/datacache/datacache.c +++ b/src/datacache/datacache.c | |||
@@ -92,7 +92,7 @@ struct GNUNET_DATACACHE_Handle | |||
92 | /** | 92 | /** |
93 | * Function called by plugins to notify the datacache | 93 | * Function called by plugins to notify the datacache |
94 | * about content deletions. | 94 | * about content deletions. |
95 | * | 95 | * |
96 | * @param cls closure | 96 | * @param cls closure |
97 | * @param key key of the content that was deleted | 97 | * @param key key of the content that was deleted |
98 | * @param size number of bytes that were made available | 98 | * @param size number of bytes that were made available |
diff --git a/src/datacache/plugin_datacache_mysql.c b/src/datacache/plugin_datacache_mysql.c index 62787eea6..b9954faf9 100644 --- a/src/datacache/plugin_datacache_mysql.c +++ b/src/datacache/plugin_datacache_mysql.c | |||
@@ -877,7 +877,7 @@ mysql_plugin_get (void *cls, const GNUNET_HashCode * key, | |||
877 | /** | 877 | /** |
878 | * Delete the entry with the lowest expiration value | 878 | * Delete the entry with the lowest expiration value |
879 | * from the datacache right now. | 879 | * from the datacache right now. |
880 | * | 880 | * |
881 | * @param cls closure (our "struct Plugin") | 881 | * @param cls closure (our "struct Plugin") |
882 | * @return GNUNET_OK on success, GNUNET_SYSERR on error | 882 | * @return GNUNET_OK on success, GNUNET_SYSERR on error |
883 | */ | 883 | */ |
diff --git a/src/datacache/plugin_datacache_postgres.c b/src/datacache/plugin_datacache_postgres.c index c5730078a..0f7dd8904 100644 --- a/src/datacache/plugin_datacache_postgres.c +++ b/src/datacache/plugin_datacache_postgres.c | |||
@@ -57,7 +57,7 @@ struct Plugin | |||
57 | * Check if the result obtained from Postgres has | 57 | * Check if the result obtained from Postgres has |
58 | * the desired status code. If not, log an error, clear the | 58 | * the desired status code. If not, log an error, clear the |
59 | * result and return GNUNET_SYSERR. | 59 | * result and return GNUNET_SYSERR. |
60 | * | 60 | * |
61 | * @return GNUNET_OK if the result is acceptable | 61 | * @return GNUNET_OK if the result is acceptable |
62 | */ | 62 | */ |
63 | static int | 63 | static int |
@@ -416,7 +416,7 @@ postgres_plugin_get (void *cls, const GNUNET_HashCode * key, | |||
416 | /** | 416 | /** |
417 | * Delete the entry with the lowest expiration value | 417 | * Delete the entry with the lowest expiration value |
418 | * from the datacache right now. | 418 | * from the datacache right now. |
419 | * | 419 | * |
420 | * @param cls closure (our "struct Plugin") | 420 | * @param cls closure (our "struct Plugin") |
421 | * @return GNUNET_OK on success, GNUNET_SYSERR on error | 421 | * @return GNUNET_OK on success, GNUNET_SYSERR on error |
422 | */ | 422 | */ |
diff --git a/src/datacache/plugin_datacache_sqlite.c b/src/datacache/plugin_datacache_sqlite.c index 3d67ffc22..369e8c101 100644 --- a/src/datacache/plugin_datacache_sqlite.c +++ b/src/datacache/plugin_datacache_sqlite.c | |||
@@ -267,7 +267,7 @@ sqlite_plugin_get (void *cls, const GNUNET_HashCode * key, | |||
267 | /** | 267 | /** |
268 | * Delete the entry with the lowest expiration value | 268 | * Delete the entry with the lowest expiration value |
269 | * from the datacache right now. | 269 | * from the datacache right now. |
270 | * | 270 | * |
271 | * @param cls closure (our "struct Plugin") | 271 | * @param cls closure (our "struct Plugin") |
272 | * @return GNUNET_OK on success, GNUNET_SYSERR on error | 272 | * @return GNUNET_OK on success, GNUNET_SYSERR on error |
273 | */ | 273 | */ |
diff --git a/src/datacache/plugin_datacache_template.c b/src/datacache/plugin_datacache_template.c index 046c603ad..2d3f160e4 100644 --- a/src/datacache/plugin_datacache_template.c +++ b/src/datacache/plugin_datacache_template.c | |||
@@ -85,7 +85,7 @@ template_plugin_get (void *cls, const GNUNET_HashCode * key, | |||
85 | /** | 85 | /** |
86 | * Delete the entry with the lowest expiration value | 86 | * Delete the entry with the lowest expiration value |
87 | * from the datacache right now. | 87 | * from the datacache right now. |
88 | * | 88 | * |
89 | * @param cls closure (our "struct Plugin") | 89 | * @param cls closure (our "struct Plugin") |
90 | * @return GNUNET_OK on success, GNUNET_SYSERR on error | 90 | * @return GNUNET_OK on success, GNUNET_SYSERR on error |
91 | */ | 91 | */ |
diff --git a/src/datastore/datastore.h b/src/datastore/datastore.h index 39a680e42..1dcf7bb4b 100644 --- a/src/datastore/datastore.h +++ b/src/datastore/datastore.h | |||
@@ -103,7 +103,7 @@ struct GetMessage | |||
103 | { | 103 | { |
104 | /** | 104 | /** |
105 | * Type is GNUNET_MESSAGE_TYPE_DATASTORE_GET. Size | 105 | * Type is GNUNET_MESSAGE_TYPE_DATASTORE_GET. Size |
106 | * can either be "sizeof(struct GetMessage)" or | 106 | * can either be "sizeof(struct GetMessage)" or |
107 | * "sizeof(struct GetMessage) - sizeof(GNUNET_HashCode)"! | 107 | * "sizeof(struct GetMessage) - sizeof(GNUNET_HashCode)"! |
108 | */ | 108 | */ |
109 | struct GNUNET_MessageHeader header; | 109 | struct GNUNET_MessageHeader header; |
diff --git a/src/datastore/datastore_api.c b/src/datastore/datastore_api.c index 8a8f64eb3..f8826ce66 100644 --- a/src/datastore/datastore_api.c +++ b/src/datastore/datastore_api.c | |||
@@ -34,7 +34,7 @@ | |||
34 | /** | 34 | /** |
35 | * If a client stopped asking for more results, how many more do | 35 | * If a client stopped asking for more results, how many more do |
36 | * we receive from the DB before killing the connection? Trade-off | 36 | * we receive from the DB before killing the connection? Trade-off |
37 | * between re-doing TCP handshakes and (needlessly) receiving | 37 | * between re-doing TCP handshakes and (needlessly) receiving |
38 | * useless results. | 38 | * useless results. |
39 | */ | 39 | */ |
40 | #define MAX_EXCESS_RESULTS 8 | 40 | #define MAX_EXCESS_RESULTS 8 |
@@ -163,7 +163,7 @@ struct GNUNET_DATASTORE_QueueEntry | |||
163 | /** | 163 | /** |
164 | * Has this message been transmitted to the service? | 164 | * Has this message been transmitted to the service? |
165 | * Only ever GNUNET_YES for the head of the queue. | 165 | * Only ever GNUNET_YES for the head of the queue. |
166 | * Note that the overall struct should end at a | 166 | * Note that the overall struct should end at a |
167 | * multiple of 64 bits. | 167 | * multiple of 64 bits. |
168 | */ | 168 | */ |
169 | int was_transmitted; | 169 | int was_transmitted; |
@@ -171,7 +171,7 @@ struct GNUNET_DATASTORE_QueueEntry | |||
171 | }; | 171 | }; |
172 | 172 | ||
173 | /** | 173 | /** |
174 | * Handle to the datastore service. | 174 | * Handle to the datastore service. |
175 | */ | 175 | */ |
176 | struct GNUNET_DATASTORE_Handle | 176 | struct GNUNET_DATASTORE_Handle |
177 | { | 177 | { |
@@ -391,7 +391,7 @@ timeout_queue_entry (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
391 | * @param timeout timeout for the operation | 391 | * @param timeout timeout for the operation |
392 | * @param response_proc function to call with replies (can be NULL) | 392 | * @param response_proc function to call with replies (can be NULL) |
393 | * @param qc client context (NOT a closure for response_proc) | 393 | * @param qc client context (NOT a closure for response_proc) |
394 | * @return NULL if the queue is full | 394 | * @return NULL if the queue is full |
395 | */ | 395 | */ |
396 | static struct GNUNET_DATASTORE_QueueEntry * | 396 | static struct GNUNET_DATASTORE_QueueEntry * |
397 | make_queue_entry (struct GNUNET_DATASTORE_Handle *h, size_t msize, | 397 | make_queue_entry (struct GNUNET_DATASTORE_Handle *h, size_t msize, |
@@ -452,7 +452,7 @@ make_queue_entry (struct GNUNET_DATASTORE_Handle *h, size_t msize, | |||
452 | if ((pos->max_queue < h->queue_size) && (pos->was_transmitted == GNUNET_NO)) | 452 | if ((pos->max_queue < h->queue_size) && (pos->was_transmitted == GNUNET_NO)) |
453 | { | 453 | { |
454 | GNUNET_assert (pos->response_proc != NULL); | 454 | GNUNET_assert (pos->response_proc != NULL); |
455 | /* move 'pos' element to head so that it will be | 455 | /* move 'pos' element to head so that it will be |
456 | * killed on 'NULL' call below */ | 456 | * killed on 'NULL' call below */ |
457 | #if DEBUG_DATASTORE | 457 | #if DEBUG_DATASTORE |
458 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 458 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
@@ -477,7 +477,7 @@ make_queue_entry (struct GNUNET_DATASTORE_Handle *h, size_t msize, | |||
477 | /** | 477 | /** |
478 | * Process entries in the queue (or do nothing if we are already | 478 | * Process entries in the queue (or do nothing if we are already |
479 | * doing so). | 479 | * doing so). |
480 | * | 480 | * |
481 | * @param h handle to the datastore | 481 | * @param h handle to the datastore |
482 | */ | 482 | */ |
483 | static void | 483 | static void |
@@ -637,7 +637,7 @@ transmit_request (void *cls, size_t size, void *buf) | |||
637 | /** | 637 | /** |
638 | * Process entries in the queue (or do nothing if we are already | 638 | * Process entries in the queue (or do nothing if we are already |
639 | * doing so). | 639 | * doing so). |
640 | * | 640 | * |
641 | * @param h handle to the datastore | 641 | * @param h handle to the datastore |
642 | */ | 642 | */ |
643 | static void | 643 | static void |
@@ -696,7 +696,7 @@ process_queue (struct GNUNET_DATASTORE_Handle *h) | |||
696 | * Dummy continuation used to do nothing (but be non-zero). | 696 | * Dummy continuation used to do nothing (but be non-zero). |
697 | * | 697 | * |
698 | * @param cls closure | 698 | * @param cls closure |
699 | * @param result result | 699 | * @param result result |
700 | * @param emsg error message | 700 | * @param emsg error message |
701 | */ | 701 | */ |
702 | static void | 702 | static void |
@@ -710,7 +710,7 @@ drop_status_cont (void *cls, int32_t result, const char *emsg) | |||
710 | * Free a queue entry. Removes the given entry from the | 710 | * Free a queue entry. Removes the given entry from the |
711 | * queue and releases associated resources. Does NOT | 711 | * queue and releases associated resources. Does NOT |
712 | * call the callback. | 712 | * call the callback. |
713 | * | 713 | * |
714 | * @param qe entry to free. | 714 | * @param qe entry to free. |
715 | */ | 715 | */ |
716 | static void | 716 | static void |
@@ -1478,7 +1478,7 @@ GNUNET_DATASTORE_get_key (struct GNUNET_DATASTORE_Handle *h, uint64_t offset, | |||
1478 | /** | 1478 | /** |
1479 | * Cancel a datastore operation. The final callback from the | 1479 | * Cancel a datastore operation. The final callback from the |
1480 | * operation must not have been done yet. | 1480 | * operation must not have been done yet. |
1481 | * | 1481 | * |
1482 | * @param qe operation to cancel | 1482 | * @param qe operation to cancel |
1483 | */ | 1483 | */ |
1484 | void | 1484 | void |
diff --git a/src/datastore/gnunet-service-datastore.c b/src/datastore/gnunet-service-datastore.c index d6a0b3c81..29f68d8bb 100644 --- a/src/datastore/gnunet-service-datastore.c +++ b/src/datastore/gnunet-service-datastore.c | |||
@@ -199,7 +199,7 @@ static struct GNUNET_STATISTICS_Handle *stats; | |||
199 | 199 | ||
200 | 200 | ||
201 | /** | 201 | /** |
202 | * Synchronize our utilization statistics with the | 202 | * Synchronize our utilization statistics with the |
203 | * statistics service. | 203 | * statistics service. |
204 | */ | 204 | */ |
205 | static void | 205 | static void |
@@ -857,7 +857,7 @@ execute_put (struct GNUNET_SERVER_Client *client, const struct DataMessage *dm) | |||
857 | * maybe 0 if no unique identifier is available | 857 | * maybe 0 if no unique identifier is available |
858 | * | 858 | * |
859 | * @return GNUNET_OK usually | 859 | * @return GNUNET_OK usually |
860 | * GNUNET_NO to delete the item | 860 | * GNUNET_NO to delete the item |
861 | */ | 861 | */ |
862 | static int | 862 | static int |
863 | check_present (void *cls, const GNUNET_HashCode * key, uint32_t size, | 863 | check_present (void *cls, const GNUNET_HashCode * key, uint32_t size, |
@@ -1214,7 +1214,7 @@ handle_drop (void *cls, struct GNUNET_SERVER_Client *client, | |||
1214 | * change in their disk utilization. | 1214 | * change in their disk utilization. |
1215 | * | 1215 | * |
1216 | * @param cls closure (NULL) | 1216 | * @param cls closure (NULL) |
1217 | * @param delta change in disk utilization, | 1217 | * @param delta change in disk utilization, |
1218 | * 0 for "reset to empty" | 1218 | * 0 for "reset to empty" |
1219 | */ | 1219 | */ |
1220 | static void | 1220 | static void |
diff --git a/src/datastore/perf_plugin_datastore.c b/src/datastore/perf_plugin_datastore.c index 36dc84656..ac3be4d5c 100644 --- a/src/datastore/perf_plugin_datastore.c +++ b/src/datastore/perf_plugin_datastore.c | |||
@@ -90,7 +90,7 @@ struct CpsRunContext | |||
90 | * change in their disk utilization. | 90 | * change in their disk utilization. |
91 | * | 91 | * |
92 | * @param cls closure (NULL) | 92 | * @param cls closure (NULL) |
93 | * @param delta change in disk utilization, | 93 | * @param delta change in disk utilization, |
94 | * 0 for "reset to empty" | 94 | * 0 for "reset to empty" |
95 | */ | 95 | */ |
96 | static void | 96 | static void |
diff --git a/src/datastore/plugin_datastore_mysql.c b/src/datastore/plugin_datastore_mysql.c index d6b6d6c62..0448b7299 100644 --- a/src/datastore/plugin_datastore_mysql.c +++ b/src/datastore/plugin_datastore_mysql.c | |||
@@ -331,7 +331,7 @@ get_my_cnf_path (const struct GNUNET_CONFIGURATION_Handle *cfg) | |||
331 | /** | 331 | /** |
332 | * Close database connection and all prepared statements (we got a DB | 332 | * Close database connection and all prepared statements (we got a DB |
333 | * disconnect error). | 333 | * disconnect error). |
334 | * | 334 | * |
335 | * @param plugin plugin context | 335 | * @param plugin plugin context |
336 | */ | 336 | */ |
337 | static int | 337 | static int |
@@ -1025,7 +1025,7 @@ execute_select (struct Plugin *plugin, struct GNUNET_MysqlStatementHandle *stmt, | |||
1025 | * Get one of the results for a particular key in the datastore. | 1025 | * Get one of the results for a particular key in the datastore. |
1026 | * | 1026 | * |
1027 | * @param cls closure | 1027 | * @param cls closure |
1028 | * @param offset offset of the result (modulo num-results); | 1028 | * @param offset offset of the result (modulo num-results); |
1029 | * specific ordering does not matter for the offset | 1029 | * specific ordering does not matter for the offset |
1030 | * @param key key to match, never NULL | 1030 | * @param key key to match, never NULL |
1031 | * @param vhash hash of the value, maybe NULL (to | 1031 | * @param vhash hash of the value, maybe NULL (to |
@@ -1035,7 +1035,7 @@ execute_select (struct Plugin *plugin, struct GNUNET_MysqlStatementHandle *stmt, | |||
1035 | * there may be! | 1035 | * there may be! |
1036 | * @param type entries of which type are relevant? | 1036 | * @param type entries of which type are relevant? |
1037 | * Use 0 for any type. | 1037 | * Use 0 for any type. |
1038 | * @param proc function to call on the matching value, | 1038 | * @param proc function to call on the matching value, |
1039 | * with NULL for if no value matches | 1039 | * with NULL for if no value matches |
1040 | * @param proc_cls closure for proc | 1040 | * @param proc_cls closure for proc |
1041 | */ | 1041 | */ |
diff --git a/src/datastore/plugin_datastore_postgres.c b/src/datastore/plugin_datastore_postgres.c index d71d5e0ef..4e44107b6 100644 --- a/src/datastore/plugin_datastore_postgres.c +++ b/src/datastore/plugin_datastore_postgres.c | |||
@@ -65,7 +65,7 @@ struct Plugin | |||
65 | * Check if the result obtained from Postgres has | 65 | * Check if the result obtained from Postgres has |
66 | * the desired status code. If not, log an error, clear the | 66 | * the desired status code. If not, log an error, clear the |
67 | * result and return GNUNET_SYSERR. | 67 | * result and return GNUNET_SYSERR. |
68 | * | 68 | * |
69 | * @param plugin global context | 69 | * @param plugin global context |
70 | * @param ret result to check | 70 | * @param ret result to check |
71 | * @param expected_status expected return value | 71 | * @param expected_status expected return value |
@@ -582,7 +582,7 @@ process_result (struct Plugin *plugin, PluginDatumProcessor proc, | |||
582 | * in the datastore. | 582 | * in the datastore. |
583 | * | 583 | * |
584 | * @param cls closure | 584 | * @param cls closure |
585 | * @param offset offset of the result (modulo num-results); | 585 | * @param offset offset of the result (modulo num-results); |
586 | * specific ordering does not matter for the offset | 586 | * specific ordering does not matter for the offset |
587 | * @param key maybe NULL (to match all entries) | 587 | * @param key maybe NULL (to match all entries) |
588 | * @param vhash hash of the value, maybe NULL (to | 588 | * @param vhash hash of the value, maybe NULL (to |
@@ -822,7 +822,7 @@ repl_proc (void *cls, const GNUNET_HashCode * key, uint32_t size, | |||
822 | 822 | ||
823 | /** | 823 | /** |
824 | * Get a random item for replication. Returns a single, not expired, random item | 824 | * Get a random item for replication. Returns a single, not expired, random item |
825 | * from those with the highest replication counters. The item's | 825 | * from those with the highest replication counters. The item's |
826 | * replication counter is decremented by one IF it was positive before. | 826 | * replication counter is decremented by one IF it was positive before. |
827 | * Call 'proc' with all values ZERO or NULL if the datastore is empty. | 827 | * Call 'proc' with all values ZERO or NULL if the datastore is empty. |
828 | * | 828 | * |
diff --git a/src/datastore/plugin_datastore_sqlite.c b/src/datastore/plugin_datastore_sqlite.c index 46486d933..4a66c44ca 100644 --- a/src/datastore/plugin_datastore_sqlite.c +++ b/src/datastore/plugin_datastore_sqlite.c | |||
@@ -1,17 +1,17 @@ | |||
1 | /* | 1 | /* |
2 | * This file is part of GNUnet | 2 | * This file is part of GNUnet |
3 | * (C) 2009, 2011 Christian Grothoff (and other contributing authors) | 3 | * (C) 2009, 2011 Christian Grothoff (and other contributing authors) |
4 | * | 4 | * |
5 | * GNUnet is free software; you can redistribute it and/or modify | 5 | * GNUnet is free software; you can redistribute it and/or modify |
6 | * it under the terms of the GNU General Public License as published | 6 | * it under the terms of the GNU General Public License as published |
7 | * by the Free Software Foundation; either version 3, or (at your | 7 | * by the Free Software Foundation; either version 3, or (at your |
8 | * option) any later version. | 8 | * option) any later version. |
9 | * | 9 | * |
10 | * GNUnet is distributed in the hope that it will be useful, but | 10 | * GNUnet is distributed in the hope that it will be useful, but |
11 | * WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 | * General Public License for more details. | 13 | * General Public License for more details. |
14 | * | 14 | * |
15 | * You should have received a copy of the GNU General Public License | 15 | * You should have received a copy of the GNU General Public License |
16 | * along with GNUnet; see the file COPYING. If not, write to the | 16 | * along with GNUnet; see the file COPYING. If not, write to the |
17 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 17 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
@@ -157,7 +157,7 @@ sq_prepare (sqlite3 * dbh, const char *zSql, sqlite3_stmt ** ppStmt) | |||
157 | 157 | ||
158 | /** | 158 | /** |
159 | * Create our database indices. | 159 | * Create our database indices. |
160 | * | 160 | * |
161 | * @param dbh handle to the database | 161 | * @param dbh handle to the database |
162 | */ | 162 | */ |
163 | static void | 163 | static void |
@@ -724,7 +724,7 @@ execute_get (struct Plugin *plugin, sqlite3_stmt * stmt, | |||
724 | * the given processor for the item. | 724 | * the given processor for the item. |
725 | * | 725 | * |
726 | * @param cls our plugin context | 726 | * @param cls our plugin context |
727 | * @param offset offset of the result (modulo num-results); | 727 | * @param offset offset of the result (modulo num-results); |
728 | * specific ordering does not matter for the offset | 728 | * specific ordering does not matter for the offset |
729 | * @param type entries of which type should be considered? | 729 | * @param type entries of which type should be considered? |
730 | * Use 0 for any type. | 730 | * Use 0 for any type. |
@@ -947,7 +947,7 @@ repl_proc (void *cls, const GNUNET_HashCode * key, uint32_t size, | |||
947 | 947 | ||
948 | /** | 948 | /** |
949 | * Get a random item for replication. Returns a single random item | 949 | * Get a random item for replication. Returns a single random item |
950 | * from those with the highest replication counters. The item's | 950 | * from those with the highest replication counters. The item's |
951 | * replication counter is decremented by one IF it was positive before. | 951 | * replication counter is decremented by one IF it was positive before. |
952 | * Call 'proc' with all values ZERO or NULL if the datastore is empty. | 952 | * Call 'proc' with all values ZERO or NULL if the datastore is empty. |
953 | * | 953 | * |
diff --git a/src/datastore/plugin_datastore_template.c b/src/datastore/plugin_datastore_template.c index 566155fb5..174d3d255 100644 --- a/src/datastore/plugin_datastore_template.c +++ b/src/datastore/plugin_datastore_template.c | |||
@@ -87,7 +87,7 @@ template_plugin_put (void *cls, const GNUNET_HashCode * key, uint32_t size, | |||
87 | * Get one of the results for a particular key in the datastore. | 87 | * Get one of the results for a particular key in the datastore. |
88 | * | 88 | * |
89 | * @param cls closure | 89 | * @param cls closure |
90 | * @param offset offset of the result (modulo num-results); | 90 | * @param offset offset of the result (modulo num-results); |
91 | * specific ordering does not matter for the offset | 91 | * specific ordering does not matter for the offset |
92 | * @param key maybe NULL (to match all entries) | 92 | * @param key maybe NULL (to match all entries) |
93 | * @param vhash hash of the value, maybe NULL (to | 93 | * @param vhash hash of the value, maybe NULL (to |
@@ -185,7 +185,7 @@ template_plugin_update (void *cls, uint64_t uid, int delta, | |||
185 | * Call the given processor on an item with zero anonymity. | 185 | * Call the given processor on an item with zero anonymity. |
186 | * | 186 | * |
187 | * @param cls our "struct Plugin*" | 187 | * @param cls our "struct Plugin*" |
188 | * @param offset offset of the result (modulo num-results); | 188 | * @param offset offset of the result (modulo num-results); |
189 | * specific ordering does not matter for the offset | 189 | * specific ordering does not matter for the offset |
190 | * @param type entries of which type should be considered? | 190 | * @param type entries of which type should be considered? |
191 | * Use 0 for any type. | 191 | * Use 0 for any type. |
diff --git a/src/datastore/test_plugin_datastore.c b/src/datastore/test_plugin_datastore.c index 3a924c7b6..373e8f453 100644 --- a/src/datastore/test_plugin_datastore.c +++ b/src/datastore/test_plugin_datastore.c | |||
@@ -74,7 +74,7 @@ struct CpsRunContext | |||
74 | * change in their disk utilization. | 74 | * change in their disk utilization. |
75 | * | 75 | * |
76 | * @param cls closure (NULL) | 76 | * @param cls closure (NULL) |
77 | * @param delta change in disk utilization, | 77 | * @param delta change in disk utilization, |
78 | * 0 for "reset to empty" | 78 | * 0 for "reset to empty" |
79 | */ | 79 | */ |
80 | static void | 80 | static void |
diff --git a/src/dht/gnunet-service-dht.c b/src/dht/gnunet-service-dht.c index 43a6c9bea..cbeecb5cc 100644 --- a/src/dht/gnunet-service-dht.c +++ b/src/dht/gnunet-service-dht.c | |||
@@ -1281,7 +1281,7 @@ distance (const GNUNET_HashCode * target, const GNUNET_HashCode * have) | |||
1281 | * two numbers being identical; furthermore, we need to | 1281 | * two numbers being identical; furthermore, we need to |
1282 | * guarantee that a difference in the number of matching | 1282 | * guarantee that a difference in the number of matching |
1283 | * bits is always represented in the result. | 1283 | * bits is always represented in the result. |
1284 | * | 1284 | * |
1285 | * We use 2^32/2^9 numerical values to distinguish between | 1285 | * We use 2^32/2^9 numerical values to distinguish between |
1286 | * hash codes that have the same LSB bit distance and | 1286 | * hash codes that have the same LSB bit distance and |
1287 | * use the highest 2^9 bits of the result to signify the | 1287 | * use the highest 2^9 bits of the result to signify the |
diff --git a/src/dht/test_dht_multipeer.c b/src/dht/test_dht_multipeer.c index 779aff88d..47d78ef40 100644 --- a/src/dht/test_dht_multipeer.c +++ b/src/dht/test_dht_multipeer.c | |||
@@ -60,7 +60,7 @@ | |||
60 | struct TestPutContext | 60 | struct TestPutContext |
61 | { | 61 | { |
62 | /** | 62 | /** |
63 | * This is a linked list | 63 | * This is a linked list |
64 | */ | 64 | */ |
65 | struct TestPutContext *next; | 65 | struct TestPutContext *next; |
66 | 66 | ||
diff --git a/src/fragmentation/defragmentation.c b/src/fragmentation/defragmentation.c index bd4dfba5a..6246163a6 100644 --- a/src/fragmentation/defragmentation.c +++ b/src/fragmentation/defragmentation.c | |||
@@ -192,7 +192,7 @@ struct GNUNET_DEFRAGMENT_Context | |||
192 | * Create a defragmentation context. | 192 | * Create a defragmentation context. |
193 | * | 193 | * |
194 | * @param stats statistics context | 194 | * @param stats statistics context |
195 | * @param mtu the maximum message size for each fragment | 195 | * @param mtu the maximum message size for each fragment |
196 | * @param num_msgs how many fragmented messages | 196 | * @param num_msgs how many fragmented messages |
197 | * to we defragment at most at the same time? | 197 | * to we defragment at most at the same time? |
198 | * @param cls closure for proc and ackp | 198 | * @param cls closure for proc and ackp |
diff --git a/src/fs/fs.c b/src/fs/fs.c index fc1388a04..93971075a 100644 --- a/src/fs/fs.c +++ b/src/fs/fs.c | |||
@@ -213,7 +213,7 @@ GNUNET_FS_make_top (struct GNUNET_FS_Handle *h, SuspendSignalFunction ssf, | |||
213 | 213 | ||
214 | /** | 214 | /** |
215 | * Destroy a top-level activity entry. | 215 | * Destroy a top-level activity entry. |
216 | * | 216 | * |
217 | * @param h global fs handle | 217 | * @param h global fs handle |
218 | * @param top top level activity entry | 218 | * @param top top level activity entry |
219 | */ | 219 | */ |
@@ -250,7 +250,7 @@ struct FileInfo | |||
250 | * @param offset offset to read from; it is possible | 250 | * @param offset offset to read from; it is possible |
251 | * that the caller might need to go backwards | 251 | * that the caller might need to go backwards |
252 | * a bit at times | 252 | * a bit at times |
253 | * @param max maximum number of bytes that should be | 253 | * @param max maximum number of bytes that should be |
254 | * copied to buf; readers are not allowed | 254 | * copied to buf; readers are not allowed |
255 | * to provide less data unless there is an error; | 255 | * to provide less data unless there is an error; |
256 | * a value of "0" will be used at the end to allow | 256 | * a value of "0" will be used at the end to allow |
@@ -333,7 +333,7 @@ GNUNET_FS_make_file_reader_context_ (const char *filename) | |||
333 | * @param offset offset to read from; it is possible | 333 | * @param offset offset to read from; it is possible |
334 | * that the caller might need to go backwards | 334 | * that the caller might need to go backwards |
335 | * a bit at times | 335 | * a bit at times |
336 | * @param max maximum number of bytes that should be | 336 | * @param max maximum number of bytes that should be |
337 | * copied to buf; readers are not allowed | 337 | * copied to buf; readers are not allowed |
338 | * to provide less data unless there is an error; | 338 | * to provide less data unless there is an error; |
339 | * a value of "0" will be used at the end to allow | 339 | * a value of "0" will be used at the end to allow |
@@ -363,7 +363,7 @@ GNUNET_FS_data_reader_copy_ (void *cls, uint64_t offset, size_t max, void *buf, | |||
363 | * (for serialization/deserialization). | 363 | * (for serialization/deserialization). |
364 | * | 364 | * |
365 | * @param h master context | 365 | * @param h master context |
366 | * @param ext component of the path | 366 | * @param ext component of the path |
367 | * @param ent entity identifier (or emtpy string for the directory) | 367 | * @param ent entity identifier (or emtpy string for the directory) |
368 | * @return NULL on error | 368 | * @return NULL on error |
369 | */ | 369 | */ |
@@ -394,7 +394,7 @@ get_serialization_file_name (struct GNUNET_FS_Handle *h, const char *ext, | |||
394 | * parent operation. | 394 | * parent operation. |
395 | * | 395 | * |
396 | * @param h master context | 396 | * @param h master context |
397 | * @param ext component of the path | 397 | * @param ext component of the path |
398 | * @param uni name of the parent operation | 398 | * @param uni name of the parent operation |
399 | * @param ent entity identifier (or emtpy string for the directory) | 399 | * @param ent entity identifier (or emtpy string for the directory) |
400 | * @return NULL on error | 400 | * @return NULL on error |
@@ -424,7 +424,7 @@ get_serialization_file_name_in_dir (struct GNUNET_FS_Handle *h, const char *ext, | |||
424 | * Return a read handle for deserialization. | 424 | * Return a read handle for deserialization. |
425 | * | 425 | * |
426 | * @param h master context | 426 | * @param h master context |
427 | * @param ext component of the path | 427 | * @param ext component of the path |
428 | * @param ent entity identifier (or emtpy string for the directory) | 428 | * @param ent entity identifier (or emtpy string for the directory) |
429 | * @return NULL on error | 429 | * @return NULL on error |
430 | */ | 430 | */ |
@@ -447,7 +447,7 @@ get_read_handle (struct GNUNET_FS_Handle *h, const char *ext, const char *ent) | |||
447 | * Return a write handle for serialization. | 447 | * Return a write handle for serialization. |
448 | * | 448 | * |
449 | * @param h master context | 449 | * @param h master context |
450 | * @param ext component of the path | 450 | * @param ext component of the path |
451 | * @param ent entity identifier (or emtpy string for the directory) | 451 | * @param ent entity identifier (or emtpy string for the directory) |
452 | * @return NULL on error | 452 | * @return NULL on error |
453 | */ | 453 | */ |
@@ -474,7 +474,7 @@ get_write_handle (struct GNUNET_FS_Handle *h, const char *ext, const char *ent) | |||
474 | * Return a write handle for serialization. | 474 | * Return a write handle for serialization. |
475 | * | 475 | * |
476 | * @param h master context | 476 | * @param h master context |
477 | * @param ext component of the path | 477 | * @param ext component of the path |
478 | * @param uni name of parent | 478 | * @param uni name of parent |
479 | * @param ent entity identifier (or emtpy string for the directory) | 479 | * @param ent entity identifier (or emtpy string for the directory) |
480 | * @return NULL on error | 480 | * @return NULL on error |
@@ -499,8 +499,8 @@ get_write_handle_in_dir (struct GNUNET_FS_Handle *h, const char *ext, | |||
499 | * Remove serialization/deserialization file from disk. | 499 | * Remove serialization/deserialization file from disk. |
500 | * | 500 | * |
501 | * @param h master context | 501 | * @param h master context |
502 | * @param ext component of the path | 502 | * @param ext component of the path |
503 | * @param ent entity identifier | 503 | * @param ent entity identifier |
504 | */ | 504 | */ |
505 | void | 505 | void |
506 | GNUNET_FS_remove_sync_file_ (struct GNUNET_FS_Handle *h, const char *ext, | 506 | GNUNET_FS_remove_sync_file_ (struct GNUNET_FS_Handle *h, const char *ext, |
@@ -527,9 +527,9 @@ GNUNET_FS_remove_sync_file_ (struct GNUNET_FS_Handle *h, const char *ext, | |||
527 | * Remove serialization/deserialization file from disk. | 527 | * Remove serialization/deserialization file from disk. |
528 | * | 528 | * |
529 | * @param h master context | 529 | * @param h master context |
530 | * @param ext component of the path | 530 | * @param ext component of the path |
531 | * @param uni parent name | 531 | * @param uni parent name |
532 | * @param ent entity identifier | 532 | * @param ent entity identifier |
533 | */ | 533 | */ |
534 | static void | 534 | static void |
535 | remove_sync_file_in_dir (struct GNUNET_FS_Handle *h, const char *ext, | 535 | remove_sync_file_in_dir (struct GNUNET_FS_Handle *h, const char *ext, |
@@ -556,8 +556,8 @@ remove_sync_file_in_dir (struct GNUNET_FS_Handle *h, const char *ext, | |||
556 | * Remove serialization/deserialization directory from disk. | 556 | * Remove serialization/deserialization directory from disk. |
557 | * | 557 | * |
558 | * @param h master context | 558 | * @param h master context |
559 | * @param ext component of the path | 559 | * @param ext component of the path |
560 | * @param uni unique name of parent | 560 | * @param uni unique name of parent |
561 | */ | 561 | */ |
562 | void | 562 | void |
563 | GNUNET_FS_remove_sync_dir_ (struct GNUNET_FS_Handle *h, const char *ext, | 563 | GNUNET_FS_remove_sync_dir_ (struct GNUNET_FS_Handle *h, const char *ext, |
@@ -891,7 +891,7 @@ deserialize_file_information (struct GNUNET_FS_Handle *h, const char *filename) | |||
891 | * Given a serialization name (full absolute path), return the | 891 | * Given a serialization name (full absolute path), return the |
892 | * basename of the file (without the path), which must only | 892 | * basename of the file (without the path), which must only |
893 | * consist of the 6 random characters. | 893 | * consist of the 6 random characters. |
894 | * | 894 | * |
895 | * @param fullname name to extract the basename from | 895 | * @param fullname name to extract the basename from |
896 | * @return copy of the basename, NULL on error | 896 | * @return copy of the basename, NULL on error |
897 | */ | 897 | */ |
@@ -926,7 +926,7 @@ get_serialization_short_name (const char *fullname) | |||
926 | * is enabled and returns NULL if not. | 926 | * is enabled and returns NULL if not. |
927 | * | 927 | * |
928 | * @param h master context | 928 | * @param h master context |
929 | * @param ext component of the path | 929 | * @param ext component of the path |
930 | * @return NULL on errror | 930 | * @return NULL on errror |
931 | */ | 931 | */ |
932 | static char * | 932 | static char * |
@@ -961,7 +961,7 @@ make_serialization_file_name (struct GNUNET_FS_Handle *h, const char *ext) | |||
961 | * is enabled and returns NULL if not. | 961 | * is enabled and returns NULL if not. |
962 | * | 962 | * |
963 | * @param h master context | 963 | * @param h master context |
964 | * @param ext component of the path | 964 | * @param ext component of the path |
965 | * @param uni name of parent | 965 | * @param uni name of parent |
966 | * @return NULL on errror | 966 | * @return NULL on errror |
967 | */ | 967 | */ |
@@ -1396,7 +1396,7 @@ cleanup: | |||
1396 | * on disk. Note that all internal FS-operations that change | 1396 | * on disk. Note that all internal FS-operations that change |
1397 | * publishing structs should already call "sync" internally, | 1397 | * publishing structs should already call "sync" internally, |
1398 | * so this function is likely not useful for clients. | 1398 | * so this function is likely not useful for clients. |
1399 | * | 1399 | * |
1400 | * @param pc the struct to sync | 1400 | * @param pc the struct to sync |
1401 | */ | 1401 | */ |
1402 | void | 1402 | void |
@@ -1463,7 +1463,7 @@ cleanup: | |||
1463 | * on disk. Note that all internal FS-operations that change | 1463 | * on disk. Note that all internal FS-operations that change |
1464 | * publishing structs should already call "sync" internally, | 1464 | * publishing structs should already call "sync" internally, |
1465 | * so this function is likely not useful for clients. | 1465 | * so this function is likely not useful for clients. |
1466 | * | 1466 | * |
1467 | * @param uc the struct to sync | 1467 | * @param uc the struct to sync |
1468 | */ | 1468 | */ |
1469 | void | 1469 | void |
@@ -1516,7 +1516,7 @@ cleanup: | |||
1516 | 1516 | ||
1517 | /** | 1517 | /** |
1518 | * Serialize a download request. | 1518 | * Serialize a download request. |
1519 | * | 1519 | * |
1520 | * @param wh the 'struct GNUNET_BIO_WriteHandle*' | 1520 | * @param wh the 'struct GNUNET_BIO_WriteHandle*' |
1521 | * @param dr the 'struct DownloadRequest' | 1521 | * @param dr the 'struct DownloadRequest' |
1522 | * @return GNUNET_YES on success, GNUNET_NO on error | 1522 | * @return GNUNET_YES on success, GNUNET_NO on error |
@@ -1545,7 +1545,7 @@ write_download_request (struct GNUNET_BIO_WriteHandle *wh, | |||
1545 | 1545 | ||
1546 | /** | 1546 | /** |
1547 | * Read a download request tree. | 1547 | * Read a download request tree. |
1548 | * | 1548 | * |
1549 | * @param rh stream to read from | 1549 | * @param rh stream to read from |
1550 | * @return value the 'struct DownloadRequest', NULL on error | 1550 | * @return value the 'struct DownloadRequest', NULL on error |
1551 | */ | 1551 | */ |
@@ -1646,7 +1646,7 @@ get_download_sync_filename (struct GNUNET_FS_DownloadContext *dc, | |||
1646 | * on disk. Note that all internal FS-operations that change | 1646 | * on disk. Note that all internal FS-operations that change |
1647 | * publishing structs should already call "sync" internally, | 1647 | * publishing structs should already call "sync" internally, |
1648 | * so this function is likely not useful for clients. | 1648 | * so this function is likely not useful for clients. |
1649 | * | 1649 | * |
1650 | * @param dc the struct to sync | 1650 | * @param dc the struct to sync |
1651 | */ | 1651 | */ |
1652 | void | 1652 | void |
@@ -1748,7 +1748,7 @@ cleanup: | |||
1748 | * on disk. Note that all internal FS-operations that change | 1748 | * on disk. Note that all internal FS-operations that change |
1749 | * publishing structs should already call "sync" internally, | 1749 | * publishing structs should already call "sync" internally, |
1750 | * so this function is likely not useful for clients. | 1750 | * so this function is likely not useful for clients. |
1751 | * | 1751 | * |
1752 | * @param sr the struct to sync | 1752 | * @param sr the struct to sync |
1753 | */ | 1753 | */ |
1754 | void | 1754 | void |
@@ -1825,7 +1825,7 @@ cleanup: | |||
1825 | * on disk. Note that all internal FS-operations that change | 1825 | * on disk. Note that all internal FS-operations that change |
1826 | * publishing structs should already call "sync" internally, | 1826 | * publishing structs should already call "sync" internally, |
1827 | * so this function is likely not useful for clients. | 1827 | * so this function is likely not useful for clients. |
1828 | * | 1828 | * |
1829 | * @param sc the struct to sync | 1829 | * @param sc the struct to sync |
1830 | */ | 1830 | */ |
1831 | void | 1831 | void |
@@ -2022,7 +2022,7 @@ deserialize_download (struct GNUNET_FS_Handle *h, | |||
2022 | 2022 | ||
2023 | 2023 | ||
2024 | /** | 2024 | /** |
2025 | * Deserialize a search. | 2025 | * Deserialize a search. |
2026 | * | 2026 | * |
2027 | * @param h overall context | 2027 | * @param h overall context |
2028 | * @param rh file to deserialize from | 2028 | * @param rh file to deserialize from |
@@ -2165,7 +2165,7 @@ cleanup: | |||
2165 | * resume the download (put it in the queue). Does this | 2165 | * resume the download (put it in the queue). Does this |
2166 | * recursively for the top-level download and all child | 2166 | * recursively for the top-level download and all child |
2167 | * downloads. | 2167 | * downloads. |
2168 | * | 2168 | * |
2169 | * @param dc download to resume | 2169 | * @param dc download to resume |
2170 | */ | 2170 | */ |
2171 | static void | 2171 | static void |
@@ -2511,7 +2511,7 @@ signal_search_resume (struct GNUNET_FS_SearchContext *sc) | |||
2511 | 2511 | ||
2512 | 2512 | ||
2513 | /** | 2513 | /** |
2514 | * Deserialize a search. | 2514 | * Deserialize a search. |
2515 | * | 2515 | * |
2516 | * @param h overall context | 2516 | * @param h overall context |
2517 | * @param rh file to deserialize from | 2517 | * @param rh file to deserialize from |
@@ -2700,7 +2700,7 @@ deserialization_master (const char *master_path, GNUNET_FileNameCallback proc, | |||
2700 | * Setup a connection to the file-sharing service. | 2700 | * Setup a connection to the file-sharing service. |
2701 | * | 2701 | * |
2702 | * @param cfg configuration to use | 2702 | * @param cfg configuration to use |
2703 | * @param client_name unique identifier for this client | 2703 | * @param client_name unique identifier for this client |
2704 | * @param upcb function to call to notify about FS actions | 2704 | * @param upcb function to call to notify about FS actions |
2705 | * @param upcb_cls closure for upcb | 2705 | * @param upcb_cls closure for upcb |
2706 | * @param flags specific attributes for fs-operations | 2706 | * @param flags specific attributes for fs-operations |
diff --git a/src/fs/fs.h b/src/fs/fs.h index 11cfc755e..1629af852 100644 --- a/src/fs/fs.h +++ b/src/fs/fs.h | |||
@@ -465,7 +465,7 @@ struct GNUNET_FS_FileInformation | |||
465 | char *emsg; | 465 | char *emsg; |
466 | 466 | ||
467 | /** | 467 | /** |
468 | * Name of the file or directory (must be an absolute path). | 468 | * Name of the file or directory (must be an absolute path). |
469 | */ | 469 | */ |
470 | char *filename; | 470 | char *filename; |
471 | 471 | ||
@@ -779,7 +779,7 @@ GNUNET_FS_dequeue_ (struct GNUNET_FS_QueueEntry *qh); | |||
779 | * @param offset offset to read from; it is possible | 779 | * @param offset offset to read from; it is possible |
780 | * that the caller might need to go backwards | 780 | * that the caller might need to go backwards |
781 | * a bit at times | 781 | * a bit at times |
782 | * @param max maximum number of bytes that should be | 782 | * @param max maximum number of bytes that should be |
783 | * copied to buf; readers are not allowed | 783 | * copied to buf; readers are not allowed |
784 | * to provide less data unless there is an error; | 784 | * to provide less data unless there is an error; |
785 | * a value of "0" will be used at the end to allow | 785 | * a value of "0" will be used at the end to allow |
@@ -811,7 +811,7 @@ GNUNET_FS_make_file_reader_context_ (const char *filename); | |||
811 | * @param offset offset to read from; it is possible | 811 | * @param offset offset to read from; it is possible |
812 | * that the caller might need to go backwards | 812 | * that the caller might need to go backwards |
813 | * a bit at times | 813 | * a bit at times |
814 | * @param max maximum number of bytes that should be | 814 | * @param max maximum number of bytes that should be |
815 | * copied to buf; readers are not allowed | 815 | * copied to buf; readers are not allowed |
816 | * to provide less data unless there is an error; | 816 | * to provide less data unless there is an error; |
817 | * a value of "0" will be used at the end to allow | 817 | * a value of "0" will be used at the end to allow |
@@ -909,7 +909,7 @@ GNUNET_FS_download_start_task_ (void *cls, | |||
909 | 909 | ||
910 | 910 | ||
911 | /** | 911 | /** |
912 | * Fill in all of the generic fields for | 912 | * Fill in all of the generic fields for |
913 | * an unindex event and call the callback. | 913 | * an unindex event and call the callback. |
914 | * | 914 | * |
915 | * @param pi structure to fill in | 915 | * @param pi structure to fill in |
@@ -973,8 +973,8 @@ GNUNET_FS_search_start_probe_ (struct GNUNET_FS_SearchResult *sr); | |||
973 | * Remove serialization/deserialization file from disk. | 973 | * Remove serialization/deserialization file from disk. |
974 | * | 974 | * |
975 | * @param h master context | 975 | * @param h master context |
976 | * @param ext component of the path | 976 | * @param ext component of the path |
977 | * @param ent entity identifier | 977 | * @param ent entity identifier |
978 | */ | 978 | */ |
979 | void | 979 | void |
980 | GNUNET_FS_remove_sync_file_ (struct GNUNET_FS_Handle *h, const char *ext, | 980 | GNUNET_FS_remove_sync_file_ (struct GNUNET_FS_Handle *h, const char *ext, |
@@ -985,8 +985,8 @@ GNUNET_FS_remove_sync_file_ (struct GNUNET_FS_Handle *h, const char *ext, | |||
985 | * Remove serialization/deserialization directory from disk. | 985 | * Remove serialization/deserialization directory from disk. |
986 | * | 986 | * |
987 | * @param h master context | 987 | * @param h master context |
988 | * @param ext component of the path | 988 | * @param ext component of the path |
989 | * @param uni unique name of parent | 989 | * @param uni unique name of parent |
990 | */ | 990 | */ |
991 | void | 991 | void |
992 | GNUNET_FS_remove_sync_dir_ (struct GNUNET_FS_Handle *h, const char *ext, | 992 | GNUNET_FS_remove_sync_dir_ (struct GNUNET_FS_Handle *h, const char *ext, |
@@ -998,7 +998,7 @@ GNUNET_FS_remove_sync_dir_ (struct GNUNET_FS_Handle *h, const char *ext, | |||
998 | * on disk. Note that all internal FS-operations that change | 998 | * on disk. Note that all internal FS-operations that change |
999 | * file information data should already call "sync" internally, | 999 | * file information data should already call "sync" internally, |
1000 | * so this function is likely not useful for clients. | 1000 | * so this function is likely not useful for clients. |
1001 | * | 1001 | * |
1002 | * @param fi the struct to sync | 1002 | * @param fi the struct to sync |
1003 | */ | 1003 | */ |
1004 | void | 1004 | void |
@@ -1009,7 +1009,7 @@ GNUNET_FS_file_information_sync_ (struct GNUNET_FS_FileInformation *f); | |||
1009 | * on disk. Note that all internal FS-operations that change | 1009 | * on disk. Note that all internal FS-operations that change |
1010 | * publishing structs should already call "sync" internally, | 1010 | * publishing structs should already call "sync" internally, |
1011 | * so this function is likely not useful for clients. | 1011 | * so this function is likely not useful for clients. |
1012 | * | 1012 | * |
1013 | * @param pc the struct to sync | 1013 | * @param pc the struct to sync |
1014 | */ | 1014 | */ |
1015 | void | 1015 | void |
@@ -1020,7 +1020,7 @@ GNUNET_FS_publish_sync_ (struct GNUNET_FS_PublishContext *pc); | |||
1020 | * on disk. Note that all internal FS-operations that change | 1020 | * on disk. Note that all internal FS-operations that change |
1021 | * publishing structs should already call "sync" internally, | 1021 | * publishing structs should already call "sync" internally, |
1022 | * so this function is likely not useful for clients. | 1022 | * so this function is likely not useful for clients. |
1023 | * | 1023 | * |
1024 | * @param uc the struct to sync | 1024 | * @param uc the struct to sync |
1025 | */ | 1025 | */ |
1026 | void | 1026 | void |
@@ -1031,7 +1031,7 @@ GNUNET_FS_unindex_sync_ (struct GNUNET_FS_UnindexContext *uc); | |||
1031 | * on disk. Note that all internal FS-operations that change | 1031 | * on disk. Note that all internal FS-operations that change |
1032 | * publishing structs should already call "sync" internally, | 1032 | * publishing structs should already call "sync" internally, |
1033 | * so this function is likely not useful for clients. | 1033 | * so this function is likely not useful for clients. |
1034 | * | 1034 | * |
1035 | * @param sc the struct to sync | 1035 | * @param sc the struct to sync |
1036 | */ | 1036 | */ |
1037 | void | 1037 | void |
@@ -1042,7 +1042,7 @@ GNUNET_FS_search_sync_ (struct GNUNET_FS_SearchContext *sc); | |||
1042 | * on disk. Note that all internal FS-operations that change | 1042 | * on disk. Note that all internal FS-operations that change |
1043 | * publishing structs should already call "sync" internally, | 1043 | * publishing structs should already call "sync" internally, |
1044 | * so this function is likely not useful for clients. | 1044 | * so this function is likely not useful for clients. |
1045 | * | 1045 | * |
1046 | * @param sr the struct to sync | 1046 | * @param sr the struct to sync |
1047 | */ | 1047 | */ |
1048 | void | 1048 | void |
@@ -1053,7 +1053,7 @@ GNUNET_FS_search_result_sync_ (struct GNUNET_FS_SearchResult *sr); | |||
1053 | * on disk. Note that all internal FS-operations that change | 1053 | * on disk. Note that all internal FS-operations that change |
1054 | * publishing structs should already call "sync" internally, | 1054 | * publishing structs should already call "sync" internally, |
1055 | * so this function is likely not useful for clients. | 1055 | * so this function is likely not useful for clients. |
1056 | * | 1056 | * |
1057 | * @param dc the struct to sync | 1057 | * @param dc the struct to sync |
1058 | */ | 1058 | */ |
1059 | void | 1059 | void |
@@ -1147,7 +1147,7 @@ GNUNET_FS_make_top (struct GNUNET_FS_Handle *h, SuspendSignalFunction ssf, | |||
1147 | 1147 | ||
1148 | /** | 1148 | /** |
1149 | * Destroy a top-level activity entry. | 1149 | * Destroy a top-level activity entry. |
1150 | * | 1150 | * |
1151 | * @param h global fs handle | 1151 | * @param h global fs handle |
1152 | * @param top top level activity entry | 1152 | * @param top top level activity entry |
1153 | */ | 1153 | */ |
@@ -1660,7 +1660,7 @@ enum BlockRequestState | |||
1660 | BRS_RECONSTRUCT_UP = 3, | 1660 | BRS_RECONSTRUCT_UP = 3, |
1661 | 1661 | ||
1662 | /** | 1662 | /** |
1663 | * We've determined the real, desired CHK for this block | 1663 | * We've determined the real, desired CHK for this block |
1664 | * (full tree reconstruction failed), request is now pending. | 1664 | * (full tree reconstruction failed), request is now pending. |
1665 | * If the CHK that bubbled up through reconstruction did match | 1665 | * If the CHK that bubbled up through reconstruction did match |
1666 | * the top-level request, the state machine for the subtree | 1666 | * the top-level request, the state machine for the subtree |
@@ -1672,7 +1672,7 @@ enum BlockRequestState | |||
1672 | * We've successfully downloaded this block, but the children | 1672 | * We've successfully downloaded this block, but the children |
1673 | * still need to be either downloaded or verified (download | 1673 | * still need to be either downloaded or verified (download |
1674 | * request propagates down). If the download fails, the | 1674 | * request propagates down). If the download fails, the |
1675 | * state machine for this block may move to | 1675 | * state machine for this block may move to |
1676 | * BRS_DOWNLOAD_ERROR instead. | 1676 | * BRS_DOWNLOAD_ERROR instead. |
1677 | */ | 1677 | */ |
1678 | BRS_DOWNLOAD_DOWN = 5, | 1678 | BRS_DOWNLOAD_DOWN = 5, |
@@ -2127,7 +2127,7 @@ struct IndexStartMessage | |||
2127 | struct IndexInfoMessage | 2127 | struct IndexInfoMessage |
2128 | { | 2128 | { |
2129 | /** | 2129 | /** |
2130 | * Message type will be | 2130 | * Message type will be |
2131 | * GNUNET_MESSAGE_TYPE_FS_INDEX_LIST_ENTRY. | 2131 | * GNUNET_MESSAGE_TYPE_FS_INDEX_LIST_ENTRY. |
2132 | */ | 2132 | */ |
2133 | struct GNUNET_MessageHeader header; | 2133 | struct GNUNET_MessageHeader header; |
@@ -2160,7 +2160,7 @@ struct UnindexMessage | |||
2160 | { | 2160 | { |
2161 | 2161 | ||
2162 | /** | 2162 | /** |
2163 | * Message type will be | 2163 | * Message type will be |
2164 | * GNUNET_MESSAGE_TYPE_FS_UNINDEX. | 2164 | * GNUNET_MESSAGE_TYPE_FS_UNINDEX. |
2165 | */ | 2165 | */ |
2166 | struct GNUNET_MessageHeader header; | 2166 | struct GNUNET_MessageHeader header; |
@@ -2186,13 +2186,13 @@ struct SearchMessage | |||
2186 | { | 2186 | { |
2187 | 2187 | ||
2188 | /** | 2188 | /** |
2189 | * Message type will be | 2189 | * Message type will be |
2190 | * GNUNET_MESSAGE_TYPE_FS_START_SEARCH. | 2190 | * GNUNET_MESSAGE_TYPE_FS_START_SEARCH. |
2191 | */ | 2191 | */ |
2192 | struct GNUNET_MessageHeader header; | 2192 | struct GNUNET_MessageHeader header; |
2193 | 2193 | ||
2194 | /** | 2194 | /** |
2195 | * Bitmask with options. Zero for no options, one for loopback-only. | 2195 | * Bitmask with options. Zero for no options, one for loopback-only. |
2196 | * Other bits are currently not defined. | 2196 | * Other bits are currently not defined. |
2197 | */ | 2197 | */ |
2198 | int32_t options GNUNET_PACKED; | 2198 | int32_t options GNUNET_PACKED; |
@@ -2216,7 +2216,7 @@ struct SearchMessage | |||
2216 | * or similar blunt actions in order to avoid exposing ourselves). | 2216 | * or similar blunt actions in order to avoid exposing ourselves). |
2217 | * <p> | 2217 | * <p> |
2218 | * If the request is for an SBLOCK, this is the identity of the | 2218 | * If the request is for an SBLOCK, this is the identity of the |
2219 | * pseudonym to which the SBLOCK belongs. | 2219 | * pseudonym to which the SBLOCK belongs. |
2220 | * <p> | 2220 | * <p> |
2221 | * If the request is for a KBLOCK, "target" must be all zeros. | 2221 | * If the request is for a KBLOCK, "target" must be all zeros. |
2222 | */ | 2222 | */ |
@@ -2346,7 +2346,7 @@ struct PutMessage | |||
2346 | uint32_t type GNUNET_PACKED; | 2346 | uint32_t type GNUNET_PACKED; |
2347 | 2347 | ||
2348 | /** | 2348 | /** |
2349 | * When does this result expire? | 2349 | * When does this result expire? |
2350 | */ | 2350 | */ |
2351 | struct GNUNET_TIME_AbsoluteNBO expiration; | 2351 | struct GNUNET_TIME_AbsoluteNBO expiration; |
2352 | 2352 | ||
@@ -2362,7 +2362,7 @@ struct PutMessage | |||
2362 | struct MigrationStopMessage | 2362 | struct MigrationStopMessage |
2363 | { | 2363 | { |
2364 | /** | 2364 | /** |
2365 | * Message type will be | 2365 | * Message type will be |
2366 | * GNUNET_MESSAGE_TYPE_FS_MIGRATION_STOP. | 2366 | * GNUNET_MESSAGE_TYPE_FS_MIGRATION_STOP. |
2367 | */ | 2367 | */ |
2368 | struct GNUNET_MessageHeader header; | 2368 | struct GNUNET_MessageHeader header; |
diff --git a/src/fs/fs_directory.c b/src/fs/fs_directory.c index 61ed1586f..f43fe14a7 100644 --- a/src/fs/fs_directory.c +++ b/src/fs/fs_directory.c | |||
@@ -72,7 +72,7 @@ GNUNET_FS_meta_data_test_for_directory (const struct GNUNET_CONTAINER_MetaData | |||
72 | /** | 72 | /** |
73 | * Set the MIMETYPE information for the given | 73 | * Set the MIMETYPE information for the given |
74 | * metadata to "application/gnunet-directory". | 74 | * metadata to "application/gnunet-directory". |
75 | * | 75 | * |
76 | * @param md metadata to add mimetype to | 76 | * @param md metadata to add mimetype to |
77 | */ | 77 | */ |
78 | void | 78 | void |
@@ -124,7 +124,7 @@ struct GetFullDataClosure | |||
124 | * used in the main libextractor library and yielding | 124 | * used in the main libextractor library and yielding |
125 | * meta data). | 125 | * meta data). |
126 | * @param type libextractor-type describing the meta data | 126 | * @param type libextractor-type describing the meta data |
127 | * @param format basic format information about data | 127 | * @param format basic format information about data |
128 | * @param data_mime_type mime-type of data (not of the original file); | 128 | * @param data_mime_type mime-type of data (not of the original file); |
129 | * can be NULL (if mime-type is not known) | 129 | * can be NULL (if mime-type is not known) |
130 | * @param data actual meta-data found | 130 | * @param data actual meta-data found |
@@ -341,7 +341,7 @@ struct GNUNET_FS_DirectoryBuilder | |||
341 | 341 | ||
342 | /** | 342 | /** |
343 | * Create a directory builder. | 343 | * Create a directory builder. |
344 | * | 344 | * |
345 | * @param mdir metadata for the directory | 345 | * @param mdir metadata for the directory |
346 | */ | 346 | */ |
347 | struct GNUNET_FS_DirectoryBuilder * | 347 | struct GNUNET_FS_DirectoryBuilder * |
@@ -362,7 +362,7 @@ GNUNET_FS_directory_builder_create (const struct GNUNET_CONTAINER_MetaData | |||
362 | 362 | ||
363 | /** | 363 | /** |
364 | * Add an entry to a directory. | 364 | * Add an entry to a directory. |
365 | * | 365 | * |
366 | * @param bld directory to extend | 366 | * @param bld directory to extend |
367 | * @param uri uri of the entry (must not be a KSK) | 367 | * @param uri uri of the entry (must not be a KSK) |
368 | * @param md metadata of the entry | 368 | * @param md metadata of the entry |
diff --git a/src/fs/fs_download.c b/src/fs/fs_download.c index 89de277da..ba4461986 100644 --- a/src/fs/fs_download.c +++ b/src/fs/fs_download.c | |||
@@ -59,7 +59,7 @@ is_recursive_download (struct GNUNET_FS_DownloadContext *dc) | |||
59 | * Given the offset of a block (with respect to the DBLOCKS) and its | 59 | * Given the offset of a block (with respect to the DBLOCKS) and its |
60 | * depth, return the offset where we would store this block in the | 60 | * depth, return the offset where we would store this block in the |
61 | * file. | 61 | * file. |
62 | * | 62 | * |
63 | * @param fsize overall file size | 63 | * @param fsize overall file size |
64 | * @param off offset of the block in the file | 64 | * @param off offset of the block in the file |
65 | * @param depth depth of the block in the tree, 0 for DBLOCK | 65 | * @param depth depth of the block in the tree, 0 for DBLOCK |
@@ -134,8 +134,8 @@ GNUNET_FS_download_make_status_ (struct GNUNET_FS_ProgressInfo *pi, | |||
134 | 134 | ||
135 | /** | 135 | /** |
136 | * We're ready to transmit a search request to the | 136 | * We're ready to transmit a search request to the |
137 | * file-sharing service. Do it. If there is | 137 | * file-sharing service. Do it. If there is |
138 | * more than one request pending, try to send | 138 | * more than one request pending, try to send |
139 | * multiple or request another transmission. | 139 | * multiple or request another transmission. |
140 | * | 140 | * |
141 | * @param cls closure | 141 | * @param cls closure |
@@ -204,7 +204,7 @@ process_result_with_request (void *cls, const GNUNET_HashCode * key, | |||
204 | * We've found a matching block without downloading it. | 204 | * We've found a matching block without downloading it. |
205 | * Encrypt it and pass it to our "receive" function as | 205 | * Encrypt it and pass it to our "receive" function as |
206 | * if we had received it from the network. | 206 | * if we had received it from the network. |
207 | * | 207 | * |
208 | * @param dc download in question | 208 | * @param dc download in question |
209 | * @param chk request this relates to | 209 | * @param chk request this relates to |
210 | * @param dr request details | 210 | * @param dr request details |
@@ -543,7 +543,7 @@ try_match_block (struct GNUNET_FS_DownloadContext *dc, | |||
543 | * used in the main libextractor library and yielding | 543 | * used in the main libextractor library and yielding |
544 | * meta data). | 544 | * meta data). |
545 | * @param type libextractor-type describing the meta data | 545 | * @param type libextractor-type describing the meta data |
546 | * @param format basic format information about data | 546 | * @param format basic format information about data |
547 | * @param data_mime_type mime-type of data (not of the original file); | 547 | * @param data_mime_type mime-type of data (not of the original file); |
548 | * can be NULL (if mime-type is not known) | 548 | * can be NULL (if mime-type is not known) |
549 | * @param data actual meta-data found | 549 | * @param data actual meta-data found |
@@ -1057,7 +1057,7 @@ process_result_with_request (void *cls, const GNUNET_HashCode * key, | |||
1057 | dc->completed += app; | 1057 | dc->completed += app; |
1058 | 1058 | ||
1059 | /* do recursive download if option is set and either meta data | 1059 | /* do recursive download if option is set and either meta data |
1060 | * says it is a directory or if no meta data is given AND filename | 1060 | * says it is a directory or if no meta data is given AND filename |
1061 | * ends in '.gnd' (top-level case) */ | 1061 | * ends in '.gnd' (top-level case) */ |
1062 | if (is_recursive_download (dc)) | 1062 | if (is_recursive_download (dc)) |
1063 | GNUNET_FS_directory_list_contents (prc->size, pt, off, | 1063 | GNUNET_FS_directory_list_contents (prc->size, pt, off, |
@@ -1242,8 +1242,8 @@ receive_results (void *cls, const struct GNUNET_MessageHeader *msg) | |||
1242 | 1242 | ||
1243 | /** | 1243 | /** |
1244 | * We're ready to transmit a search request to the | 1244 | * We're ready to transmit a search request to the |
1245 | * file-sharing service. Do it. If there is | 1245 | * file-sharing service. Do it. If there is |
1246 | * more than one request pending, try to send | 1246 | * more than one request pending, try to send |
1247 | * multiple or request another transmission. | 1247 | * multiple or request another transmission. |
1248 | * | 1248 | * |
1249 | * @param cls closure | 1249 | * @param cls closure |
@@ -1495,7 +1495,7 @@ deactivate_fs_download (void *cls) | |||
1495 | * @param depth depth of the current entry, 0 are the DBLOCKs, | 1495 | * @param depth depth of the current entry, 0 are the DBLOCKs, |
1496 | * top level block is 'dc->treedepth - 1' | 1496 | * top level block is 'dc->treedepth - 1' |
1497 | * @param dr_offset offset in the original file this block maps to | 1497 | * @param dr_offset offset in the original file this block maps to |
1498 | * (as in, offset of the first byte of the first DBLOCK | 1498 | * (as in, offset of the first byte of the first DBLOCK |
1499 | * in the subtree rooted in the returned download request tree) | 1499 | * in the subtree rooted in the returned download request tree) |
1500 | * @param file_start_offset desired starting offset for the download | 1500 | * @param file_start_offset desired starting offset for the download |
1501 | * in the original file; requesting tree should not contain | 1501 | * in the original file; requesting tree should not contain |
@@ -1616,7 +1616,7 @@ get_next_block (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
1616 | * | 1616 | * |
1617 | * This function checks if the content on disk matches | 1617 | * This function checks if the content on disk matches |
1618 | * the expected content based on the URI. | 1618 | * the expected content based on the URI. |
1619 | * | 1619 | * |
1620 | * @param cls closure | 1620 | * @param cls closure |
1621 | * @param chk content hash key for the block | 1621 | * @param chk content hash key for the block |
1622 | * @param offset offset of the block | 1622 | * @param offset offset of the block |
@@ -1658,7 +1658,7 @@ reconstruct_cb (void *cls, const struct ContentHashKey *chk, uint64_t offset, | |||
1658 | case BRS_CHK_SET: | 1658 | case BRS_CHK_SET: |
1659 | if (0 == memcmp (chk, &dr->chk, sizeof (struct ContentHashKey))) | 1659 | if (0 == memcmp (chk, &dr->chk, sizeof (struct ContentHashKey))) |
1660 | { | 1660 | { |
1661 | /* block matches, hence tree below matches; | 1661 | /* block matches, hence tree below matches; |
1662 | * this request is done! */ | 1662 | * this request is done! */ |
1663 | dr->state = BRS_DOWNLOAD_UP; | 1663 | dr->state = BRS_DOWNLOAD_UP; |
1664 | /* calculate how many bytes of payload this block | 1664 | /* calculate how many bytes of payload this block |
@@ -1816,7 +1816,7 @@ GNUNET_FS_download_start_task_ (void *cls, | |||
1816 | /* already done entirely, party! */ | 1816 | /* already done entirely, party! */ |
1817 | if (dc->rfh != NULL) | 1817 | if (dc->rfh != NULL) |
1818 | { | 1818 | { |
1819 | /* avoid hanging on to file handle longer than | 1819 | /* avoid hanging on to file handle longer than |
1820 | * necessary */ | 1820 | * necessary */ |
1821 | GNUNET_DISK_file_close (dc->rfh); | 1821 | GNUNET_DISK_file_close (dc->rfh); |
1822 | dc->rfh = NULL; | 1822 | dc->rfh = NULL; |
@@ -1851,7 +1851,7 @@ GNUNET_FS_download_start_task_ (void *cls, | |||
1851 | { | 1851 | { |
1852 | if (dc->rfh != NULL) | 1852 | if (dc->rfh != NULL) |
1853 | { | 1853 | { |
1854 | /* avoid hanging on to file handle longer than | 1854 | /* avoid hanging on to file handle longer than |
1855 | * necessary */ | 1855 | * necessary */ |
1856 | GNUNET_DISK_file_close (dc->rfh); | 1856 | GNUNET_DISK_file_close (dc->rfh); |
1857 | dc->rfh = NULL; | 1857 | dc->rfh = NULL; |
diff --git a/src/fs/fs_file_information.c b/src/fs/fs_file_information.c index a67b22036..fadcfea05 100644 --- a/src/fs/fs_file_information.c +++ b/src/fs/fs_file_information.c | |||
@@ -227,7 +227,7 @@ GNUNET_FS_file_information_create_from_data (struct GNUNET_FS_Handle *h, | |||
227 | * @param h handle to the file sharing subsystem | 227 | * @param h handle to the file sharing subsystem |
228 | * @param client_info initial value for the client-info value for this entry | 228 | * @param client_info initial value for the client-info value for this entry |
229 | * @param length length of the file | 229 | * @param length length of the file |
230 | * @param reader function that can be used to obtain the data for the file | 230 | * @param reader function that can be used to obtain the data for the file |
231 | * @param reader_cls closure for "reader" | 231 | * @param reader_cls closure for "reader" |
232 | * @param keywords under which keywords should this file be available | 232 | * @param keywords under which keywords should this file be available |
233 | * directly; can be NULL | 233 | * directly; can be NULL |
@@ -592,7 +592,7 @@ GNUNET_FS_file_information_create_empty_directory (struct GNUNET_FS_Handle *h, | |||
592 | * | 592 | * |
593 | * @param dir the directory | 593 | * @param dir the directory |
594 | * @param ent the entry to add; the entry must not have been | 594 | * @param ent the entry to add; the entry must not have been |
595 | * added to any other directory at this point and | 595 | * added to any other directory at this point and |
596 | * must not include "dir" in its structure | 596 | * must not include "dir" in its structure |
597 | * @return GNUNET_OK on success, GNUNET_SYSERR on error | 597 | * @return GNUNET_OK on success, GNUNET_SYSERR on error |
598 | */ | 598 | */ |
diff --git a/src/fs/fs_misc.c b/src/fs/fs_misc.c index 3a8260d05..6bd4e59f8 100644 --- a/src/fs/fs_misc.c +++ b/src/fs/fs_misc.c | |||
@@ -30,7 +30,7 @@ | |||
30 | 30 | ||
31 | /** | 31 | /** |
32 | * Suggest a filename based on given metadata. | 32 | * Suggest a filename based on given metadata. |
33 | * | 33 | * |
34 | * @param md given meta data | 34 | * @param md given meta data |
35 | * @return NULL if meta data is useless for suggesting a filename | 35 | * @return NULL if meta data is useless for suggesting a filename |
36 | */ | 36 | */ |
diff --git a/src/fs/fs_namespace.c b/src/fs/fs_namespace.c index 236e8d59b..7475896a8 100644 --- a/src/fs/fs_namespace.c +++ b/src/fs/fs_namespace.c | |||
@@ -36,7 +36,7 @@ | |||
36 | * Return the name of the directory in which we store | 36 | * Return the name of the directory in which we store |
37 | * our local namespaces (or rather, their public keys). | 37 | * our local namespaces (or rather, their public keys). |
38 | * | 38 | * |
39 | * @param h global fs handle | 39 | * @param h global fs handle |
40 | * @return NULL on error, otherwise the name of the directory | 40 | * @return NULL on error, otherwise the name of the directory |
41 | */ | 41 | */ |
42 | static char * | 42 | static char * |
@@ -61,7 +61,7 @@ get_namespace_directory (struct GNUNET_FS_Handle *h) | |||
61 | * Return the name of the directory in which we store | 61 | * Return the name of the directory in which we store |
62 | * the update information graph for the given local namespace. | 62 | * the update information graph for the given local namespace. |
63 | * | 63 | * |
64 | * @param ns namespace handle | 64 | * @param ns namespace handle |
65 | * @return NULL on error, otherwise the name of the directory | 65 | * @return NULL on error, otherwise the name of the directory |
66 | */ | 66 | */ |
67 | static char * | 67 | static char * |
@@ -87,7 +87,7 @@ get_update_information_directory (struct GNUNET_FS_Namespace *ns) | |||
87 | 87 | ||
88 | /** | 88 | /** |
89 | * Write the namespace update node graph to a file. | 89 | * Write the namespace update node graph to a file. |
90 | * | 90 | * |
91 | * @param ns namespace to dump | 91 | * @param ns namespace to dump |
92 | */ | 92 | */ |
93 | static void | 93 | static void |
@@ -134,7 +134,7 @@ END: | |||
134 | 134 | ||
135 | /** | 135 | /** |
136 | * Read the namespace update node graph from a file. | 136 | * Read the namespace update node graph from a file. |
137 | * | 137 | * |
138 | * @param ns namespace to read | 138 | * @param ns namespace to read |
139 | */ | 139 | */ |
140 | static void | 140 | static void |
@@ -280,7 +280,7 @@ struct AdvertisementContext | |||
280 | 280 | ||
281 | /** | 281 | /** |
282 | * Disconnect from the datastore. | 282 | * Disconnect from the datastore. |
283 | * | 283 | * |
284 | * @param cls datastore handle | 284 | * @param cls datastore handle |
285 | * @param tc scheduler context | 285 | * @param tc scheduler context |
286 | */ | 286 | */ |
@@ -375,7 +375,7 @@ advertisement_cont (void *cls, int success, const char *msg) | |||
375 | 375 | ||
376 | 376 | ||
377 | /** | 377 | /** |
378 | * Publish an advertismement for a namespace. | 378 | * Publish an advertismement for a namespace. |
379 | * | 379 | * |
380 | * @param h handle to the file sharing subsystem | 380 | * @param h handle to the file sharing subsystem |
381 | * @param ksk_uri keywords to use for advertisment | 381 | * @param ksk_uri keywords to use for advertisment |
@@ -965,7 +965,7 @@ struct FindTreeClosure | |||
965 | * head of an tree if it is in the 'tree_array' under its respective | 965 | * head of an tree if it is in the 'tree_array' under its respective |
966 | * 'tree_id'. | 966 | * 'tree_id'. |
967 | * | 967 | * |
968 | * In short, we're trying to find the smallest number of tree to | 968 | * In short, we're trying to find the smallest number of tree to |
969 | * cover a directed graph. | 969 | * cover a directed graph. |
970 | * | 970 | * |
971 | * @param cls closure (of type 'struct FindTreeClosure') | 971 | * @param cls closure (of type 'struct FindTreeClosure') |
@@ -988,7 +988,7 @@ find_trees (void *cls, const GNUNET_HashCode * key, void *value) | |||
988 | return GNUNET_YES; /* circular */ | 988 | return GNUNET_YES; /* circular */ |
989 | GNUNET_assert (nsn->tree_id < fc->tree_array_size); | 989 | GNUNET_assert (nsn->tree_id < fc->tree_array_size); |
990 | if (fc->tree_array[nsn->tree_id] != nsn) | 990 | if (fc->tree_array[nsn->tree_id] != nsn) |
991 | return GNUNET_YES; /* part of "another" (directed) TREE, | 991 | return GNUNET_YES; /* part of "another" (directed) TREE, |
992 | * and not root of it, end trace */ | 992 | * and not root of it, end trace */ |
993 | if (nsn->tree_id == fc->id) | 993 | if (nsn->tree_id == fc->id) |
994 | return GNUNET_YES; /* that's our own root (can this be?) */ | 994 | return GNUNET_YES; /* that's our own root (can this be?) */ |
@@ -1015,12 +1015,12 @@ find_trees (void *cls, const GNUNET_HashCode * key, void *value) | |||
1015 | * produce an update. Namespace updates form a graph where each node | 1015 | * produce an update. Namespace updates form a graph where each node |
1016 | * has a name. Each node can have any number of URI/meta-data entries | 1016 | * has a name. Each node can have any number of URI/meta-data entries |
1017 | * which can each be linked to other nodes. Cycles are possible. | 1017 | * which can each be linked to other nodes. Cycles are possible. |
1018 | * | 1018 | * |
1019 | * Calling this function with "next_id" NULL will cause the library to | 1019 | * Calling this function with "next_id" NULL will cause the library to |
1020 | * call "ip" with a root for each strongly connected component of the | 1020 | * call "ip" with a root for each strongly connected component of the |
1021 | * graph (a root being a node from which all other nodes in the Tree | 1021 | * graph (a root being a node from which all other nodes in the Tree |
1022 | * are reachable). | 1022 | * are reachable). |
1023 | * | 1023 | * |
1024 | * Calling this function with "next_id" being the name of a node will | 1024 | * Calling this function with "next_id" being the name of a node will |
1025 | * cause the library to call "ip" with all children of the node. Note | 1025 | * cause the library to call "ip" with all children of the node. Note |
1026 | * that cycles within the final tree are possible (including self-loops). | 1026 | * that cycles within the final tree are possible (including self-loops). |
diff --git a/src/fs/fs_publish.c b/src/fs/fs_publish.c index 94641e934..b286d41ca 100644 --- a/src/fs/fs_publish.c +++ b/src/fs/fs_publish.c | |||
@@ -38,7 +38,7 @@ | |||
38 | 38 | ||
39 | 39 | ||
40 | /** | 40 | /** |
41 | * Fill in all of the generic fields for | 41 | * Fill in all of the generic fields for |
42 | * a publish event and call the callback. | 42 | * a publish event and call the callback. |
43 | * | 43 | * |
44 | * @param pi structure to fill in | 44 | * @param pi structure to fill in |
@@ -216,7 +216,7 @@ signal_publish_error (struct GNUNET_FS_FileInformation *p, | |||
216 | 216 | ||
217 | /** | 217 | /** |
218 | * Datastore returns from reservation cancel request. | 218 | * Datastore returns from reservation cancel request. |
219 | * | 219 | * |
220 | * @param cls the 'struct GNUNET_FS_PublishContext' | 220 | * @param cls the 'struct GNUNET_FS_PublishContext' |
221 | * @param success success code (not used) | 221 | * @param success success code (not used) |
222 | * @param msg error message (typically NULL, not used) | 222 | * @param msg error message (typically NULL, not used) |
@@ -371,7 +371,7 @@ block_reader (void *cls, uint64_t offset, size_t max, void *buf, char **emsg) | |||
371 | { | 371 | { |
372 | pt_size = GNUNET_MIN (max, p->data.file.file_size - offset); | 372 | pt_size = GNUNET_MIN (max, p->data.file.file_size - offset); |
373 | if (pt_size == 0) | 373 | if (pt_size == 0) |
374 | return 0; /* calling reader with pt_size==0 | 374 | return 0; /* calling reader with pt_size==0 |
375 | * might free buf, so don't! */ | 375 | * might free buf, so don't! */ |
376 | if (pt_size != | 376 | if (pt_size != |
377 | p->data.file.reader (p->data.file.reader_cls, offset, pt_size, buf, | 377 | p->data.file.reader (p->data.file.reader_cls, offset, pt_size, buf, |
@@ -441,7 +441,7 @@ encode_cont (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
441 | * or (on error) "GNUNET_FS_tree_encode_finish". | 441 | * or (on error) "GNUNET_FS_tree_encode_finish". |
442 | * | 442 | * |
443 | * @param cls closure | 443 | * @param cls closure |
444 | * @param chk content hash key for the block | 444 | * @param chk content hash key for the block |
445 | * @param offset offset of the block in the file | 445 | * @param offset offset of the block in the file |
446 | * @param depth depth of the block in the file, 0 for DBLOCK | 446 | * @param depth depth of the block in the file, 0 for DBLOCK |
447 | * @param type type of the block (IBLOCK or DBLOCK) | 447 | * @param type type of the block (IBLOCK or DBLOCK) |
@@ -1059,7 +1059,7 @@ GNUNET_FS_publish_signal_suspend_ (void *cls) | |||
1059 | /** | 1059 | /** |
1060 | * We have gotten a reply for our space reservation request. | 1060 | * We have gotten a reply for our space reservation request. |
1061 | * Either fail (insufficient space) or start publishing for good. | 1061 | * Either fail (insufficient space) or start publishing for good. |
1062 | * | 1062 | * |
1063 | * @param cls the 'struct GNUNET_FS_PublishContext*' | 1063 | * @param cls the 'struct GNUNET_FS_PublishContext*' |
1064 | * @param success positive reservation ID on success | 1064 | * @param success positive reservation ID on success |
1065 | * @param msg error message on error, otherwise NULL | 1065 | * @param msg error message on error, otherwise NULL |
@@ -1096,9 +1096,9 @@ finish_reserve (void *cls, int success, const char *msg) | |||
1096 | * @param namespace namespace to publish the file in, NULL for no namespace | 1096 | * @param namespace namespace to publish the file in, NULL for no namespace |
1097 | * @param nid identifier to use for the publishd content in the namespace | 1097 | * @param nid identifier to use for the publishd content in the namespace |
1098 | * (can be NULL, must be NULL if namespace is NULL) | 1098 | * (can be NULL, must be NULL if namespace is NULL) |
1099 | * @param nuid update-identifier that will be used for future updates | 1099 | * @param nuid update-identifier that will be used for future updates |
1100 | * (can be NULL, must be NULL if namespace or nid is NULL) | 1100 | * (can be NULL, must be NULL if namespace or nid is NULL) |
1101 | * @param options options for the publication | 1101 | * @param options options for the publication |
1102 | * @return context that can be used to control the publish operation | 1102 | * @return context that can be used to control the publish operation |
1103 | */ | 1103 | */ |
1104 | struct GNUNET_FS_PublishContext * | 1104 | struct GNUNET_FS_PublishContext * |
@@ -1206,7 +1206,7 @@ fip_signal_stop (void *cls, struct GNUNET_FS_FileInformation *fi, | |||
1206 | 1206 | ||
1207 | 1207 | ||
1208 | /** | 1208 | /** |
1209 | * Stop an upload. Will abort incomplete uploads (but | 1209 | * Stop an upload. Will abort incomplete uploads (but |
1210 | * not remove blocks that have already been publishd) or | 1210 | * not remove blocks that have already been publishd) or |
1211 | * simply clean up the state for completed uploads. | 1211 | * simply clean up the state for completed uploads. |
1212 | * Must NOT be called from within the event callback! | 1212 | * Must NOT be called from within the event callback! |
diff --git a/src/fs/fs_search.c b/src/fs/fs_search.c index 0c47eb173..10cce3f1f 100644 --- a/src/fs/fs_search.c +++ b/src/fs/fs_search.c | |||
@@ -62,7 +62,7 @@ GNUNET_FS_search_make_status_ (struct GNUNET_FS_ProgressInfo *pi, | |||
62 | /** | 62 | /** |
63 | * Check if the given result is identical | 63 | * Check if the given result is identical |
64 | * to the given URI. | 64 | * to the given URI. |
65 | * | 65 | * |
66 | * @param cls points to the URI we check against | 66 | * @param cls points to the URI we check against |
67 | * @param key not used | 67 | * @param key not used |
68 | * @param value a "struct GNUNET_FS_SearchResult" who's URI we | 68 | * @param value a "struct GNUNET_FS_SearchResult" who's URI we |
@@ -85,7 +85,7 @@ test_result_present (void *cls, const GNUNET_HashCode * key, void *value) | |||
85 | /** | 85 | /** |
86 | * We've found a new CHK result. Let the client | 86 | * We've found a new CHK result. Let the client |
87 | * know about it. | 87 | * know about it. |
88 | * | 88 | * |
89 | * @param sc the search context | 89 | * @param sc the search context |
90 | * @param sr the specific result | 90 | * @param sr the specific result |
91 | */ | 91 | */ |
@@ -107,7 +107,7 @@ notify_client_chk_result (struct GNUNET_FS_SearchContext *sc, | |||
107 | /** | 107 | /** |
108 | * We've found new information about an existing CHK result. Let the | 108 | * We've found new information about an existing CHK result. Let the |
109 | * client know about it. | 109 | * client know about it. |
110 | * | 110 | * |
111 | * @param sc the search context | 111 | * @param sc the search context |
112 | * @param sr the specific result | 112 | * @param sr the specific result |
113 | */ | 113 | */ |
@@ -151,7 +151,7 @@ struct GetResultContext | |||
151 | /** | 151 | /** |
152 | * Check if the given result is identical to the given URI and if so | 152 | * Check if the given result is identical to the given URI and if so |
153 | * return it. | 153 | * return it. |
154 | * | 154 | * |
155 | * @param cls a "struct GetResultContext" | 155 | * @param cls a "struct GetResultContext" |
156 | * @param key not used | 156 | * @param key not used |
157 | * @param value a "struct GNUNET_FS_SearchResult" who's URI we | 157 | * @param value a "struct GNUNET_FS_SearchResult" who's URI we |
@@ -1379,7 +1379,7 @@ GNUNET_FS_search_start (struct GNUNET_FS_Handle *h, | |||
1379 | 1379 | ||
1380 | 1380 | ||
1381 | /** | 1381 | /** |
1382 | * Pause search. | 1382 | * Pause search. |
1383 | * | 1383 | * |
1384 | * @param sc context for the search that should be paused | 1384 | * @param sc context for the search that should be paused |
1385 | */ | 1385 | */ |
diff --git a/src/fs/fs_tree.c b/src/fs/fs_tree.c index 58d0f0127..60e80efbb 100644 --- a/src/fs/fs_tree.c +++ b/src/fs/fs_tree.c | |||
@@ -100,7 +100,7 @@ struct GNUNET_FS_TreeEncoder | |||
100 | * In-memory cache of the current CHK tree. | 100 | * In-memory cache of the current CHK tree. |
101 | * This struct will contain the CHK values | 101 | * This struct will contain the CHK values |
102 | * from the root to the currently processed | 102 | * from the root to the currently processed |
103 | * node in the tree as identified by | 103 | * node in the tree as identified by |
104 | * "current_depth" and "publish_offset". | 104 | * "current_depth" and "publish_offset". |
105 | * The "chktree" will be initially NULL, | 105 | * The "chktree" will be initially NULL, |
106 | * then allocated to a sufficient number of | 106 | * then allocated to a sufficient number of |
@@ -176,8 +176,8 @@ GNUNET_FS_tree_compute_tree_size (unsigned int depth) | |||
176 | * | 176 | * |
177 | * @param depth depth of the IBlock in the tree, 0 would be a DBLOCK, | 177 | * @param depth depth of the IBlock in the tree, 0 would be a DBLOCK, |
178 | * must be > 0 (this function is for IBLOCKs only!) | 178 | * must be > 0 (this function is for IBLOCKs only!) |
179 | * @param end_offset current offset in the payload (!) of the overall file, | 179 | * @param end_offset current offset in the payload (!) of the overall file, |
180 | * must be > 0 (since this function is called at the | 180 | * must be > 0 (since this function is called at the |
181 | * end of a block). | 181 | * end of a block). |
182 | * @return size of the corresponding IBlock | 182 | * @return size of the corresponding IBlock |
183 | */ | 183 | */ |
@@ -264,7 +264,7 @@ GNUNET_FS_tree_calculate_block_size (uint64_t fsize, uint64_t offset, | |||
264 | * @param cls closure for reader, proc, progress and cont | 264 | * @param cls closure for reader, proc, progress and cont |
265 | * @param reader function to call to read plaintext data | 265 | * @param reader function to call to read plaintext data |
266 | * @param proc function to call on each encrypted block | 266 | * @param proc function to call on each encrypted block |
267 | * @param progress function to call with progress information | 267 | * @param progress function to call with progress information |
268 | * @param cont function to call when done | 268 | * @param cont function to call when done |
269 | */ | 269 | */ |
270 | struct GNUNET_FS_TreeEncoder * | 270 | struct GNUNET_FS_TreeEncoder * |
@@ -298,7 +298,7 @@ GNUNET_FS_tree_encoder_create (struct GNUNET_FS_Handle *h, uint64_t size, | |||
298 | * | 298 | * |
299 | * @param depth depth of the IBlock in the tree (aka overall | 299 | * @param depth depth of the IBlock in the tree (aka overall |
300 | * number of tree levels minus depth); 0 == DBlock | 300 | * number of tree levels minus depth); 0 == DBlock |
301 | * @param end_offset current offset in the overall file, | 301 | * @param end_offset current offset in the overall file, |
302 | * at the *beginning* of the block for DBLOCKs (depth==0), | 302 | * at the *beginning* of the block for DBLOCKs (depth==0), |
303 | * otherwise at the *end* of the block (exclusive) | 303 | * otherwise at the *end* of the block (exclusive) |
304 | * @return (array of CHKs') offset in the above IBlock | 304 | * @return (array of CHKs') offset in the above IBlock |
@@ -421,7 +421,7 @@ GNUNET_FS_tree_encoder_next (struct GNUNET_FS_TreeEncoder *te) | |||
421 | /** | 421 | /** |
422 | * Clean up a tree encoder and return information | 422 | * Clean up a tree encoder and return information |
423 | * about the resulting URI or an error message. | 423 | * about the resulting URI or an error message. |
424 | * | 424 | * |
425 | * @param te the tree encoder to clean up | 425 | * @param te the tree encoder to clean up |
426 | * @param uri set to the resulting URI (if encoding finished) | 426 | * @param uri set to the resulting URI (if encoding finished) |
427 | * @param emsg set to an error message (if an error occured | 427 | * @param emsg set to an error message (if an error occured |
diff --git a/src/fs/fs_tree.h b/src/fs/fs_tree.h index b39a47cd3..56c32a390 100644 --- a/src/fs/fs_tree.h +++ b/src/fs/fs_tree.h | |||
@@ -35,7 +35,7 @@ | |||
35 | #include "fs.h" | 35 | #include "fs.h" |
36 | 36 | ||
37 | /** | 37 | /** |
38 | * Compute the depth of the CHK tree. | 38 | * Compute the depth of the CHK tree. |
39 | * | 39 | * |
40 | * @param flen file length for which to compute the depth | 40 | * @param flen file length for which to compute the depth |
41 | * @return depth of the tree, always > 0. A depth of 1 means only a DBLOCK. | 41 | * @return depth of the tree, always > 0. A depth of 1 means only a DBLOCK. |
@@ -133,7 +133,7 @@ typedef void (*GNUNET_FS_TreeProgressCallback) (void *cls, uint64_t offset, | |||
133 | * @param cls closure for reader, proc, progress and cont | 133 | * @param cls closure for reader, proc, progress and cont |
134 | * @param reader function to call to read plaintext data | 134 | * @param reader function to call to read plaintext data |
135 | * @param proc function to call on each encrypted block | 135 | * @param proc function to call on each encrypted block |
136 | * @param progress function to call with progress information | 136 | * @param progress function to call with progress information |
137 | * @param cont function to call when done | 137 | * @param cont function to call when done |
138 | * @return tree encoder context | 138 | * @return tree encoder context |
139 | */ | 139 | */ |
@@ -146,8 +146,8 @@ GNUNET_FS_tree_encoder_create (struct GNUNET_FS_Handle *h, uint64_t size, | |||
146 | 146 | ||
147 | 147 | ||
148 | /** | 148 | /** |
149 | * Encrypt the next block of the file (and | 149 | * Encrypt the next block of the file (and |
150 | * call proc and progress accordingly; or | 150 | * call proc and progress accordingly; or |
151 | * of course "cont" if we have already completed | 151 | * of course "cont" if we have already completed |
152 | * encoding of the entire file). | 152 | * encoding of the entire file). |
153 | * | 153 | * |
@@ -160,7 +160,7 @@ GNUNET_FS_tree_encoder_next (struct GNUNET_FS_TreeEncoder *te); | |||
160 | /** | 160 | /** |
161 | * Clean up a tree encoder and return information | 161 | * Clean up a tree encoder and return information |
162 | * about the resulting URI or an error message. | 162 | * about the resulting URI or an error message. |
163 | * | 163 | * |
164 | * @param te the tree encoder to clean up | 164 | * @param te the tree encoder to clean up |
165 | * @param uri set to the resulting URI (if encoding finished) | 165 | * @param uri set to the resulting URI (if encoding finished) |
166 | * @param emsg set to an error message (if an error occured | 166 | * @param emsg set to an error message (if an error occured |
@@ -179,7 +179,7 @@ GNUNET_FS_tree_encoder_finish (struct GNUNET_FS_TreeEncoder *te, | |||
179 | /** | 179 | /** |
180 | * Get data that would be needed to resume | 180 | * Get data that would be needed to resume |
181 | * the encoding later. | 181 | * the encoding later. |
182 | * | 182 | * |
183 | * @param te encoding to resume | 183 | * @param te encoding to resume |
184 | * @param data set to the resume data | 184 | * @param data set to the resume data |
185 | * @param size set to the size of the resume data | 185 | * @param size set to the size of the resume data |
@@ -192,7 +192,7 @@ GNUNET_FS_tree_encoder_resume_get_data (const struct GNUNET_FS_TreeEncoder *te, | |||
192 | /** | 192 | /** |
193 | * Reset tree encoder to point previously | 193 | * Reset tree encoder to point previously |
194 | * obtained for resuming. | 194 | * obtained for resuming. |
195 | * | 195 | * |
196 | * @param te encoding to resume | 196 | * @param te encoding to resume |
197 | * @param data the resume data | 197 | * @param data the resume data |
198 | * @param size the size of the resume data | 198 | * @param size the size of the resume data |
diff --git a/src/fs/fs_unindex.c b/src/fs/fs_unindex.c index a992c5ff6..a37a39a78 100644 --- a/src/fs/fs_unindex.c +++ b/src/fs/fs_unindex.c | |||
@@ -68,7 +68,7 @@ unindex_reader (void *cls, uint64_t offset, size_t max, void *buf, char **emsg) | |||
68 | 68 | ||
69 | 69 | ||
70 | /** | 70 | /** |
71 | * Fill in all of the generic fields for | 71 | * Fill in all of the generic fields for |
72 | * an unindex event and call the callback. | 72 | * an unindex event and call the callback. |
73 | * | 73 | * |
74 | * @param pi structure to fill in | 74 | * @param pi structure to fill in |
@@ -443,7 +443,7 @@ GNUNET_FS_unindex_signal_suspend_ (void *cls) | |||
443 | * @param h handle to the file sharing subsystem | 443 | * @param h handle to the file sharing subsystem |
444 | * @param filename file to unindex | 444 | * @param filename file to unindex |
445 | * @param cctx initial value for the client context | 445 | * @param cctx initial value for the client context |
446 | * @return NULL on error, otherwise handle | 446 | * @return NULL on error, otherwise handle |
447 | */ | 447 | */ |
448 | struct GNUNET_FS_UnindexContext * | 448 | struct GNUNET_FS_UnindexContext * |
449 | GNUNET_FS_unindex_start (struct GNUNET_FS_Handle *h, const char *filename, | 449 | GNUNET_FS_unindex_start (struct GNUNET_FS_Handle *h, const char *filename, |
diff --git a/src/fs/fs_uri.c b/src/fs/fs_uri.c index 206a8adca..b654b2a81 100644 --- a/src/fs/fs_uri.c +++ b/src/fs/fs_uri.c | |||
@@ -125,7 +125,7 @@ GNUNET_FS_uri_to_key (const struct GNUNET_FS_Uri *uri, GNUNET_HashCode * key) | |||
125 | * Convert keyword URI to a human readable format | 125 | * Convert keyword URI to a human readable format |
126 | * (i.e. the search query that was used in the first place) | 126 | * (i.e. the search query that was used in the first place) |
127 | * | 127 | * |
128 | * @param uri ksk uri to convert to a string | 128 | * @param uri ksk uri to convert to a string |
129 | * @return string with the keywords | 129 | * @return string with the keywords |
130 | */ | 130 | */ |
131 | char * | 131 | char * |
@@ -187,7 +187,7 @@ GNUNET_FS_uri_ksk_to_string_fancy (const struct GNUNET_FS_Uri *uri) | |||
187 | * spaces), return a copy of the keyword without %-encoding and | 187 | * spaces), return a copy of the keyword without %-encoding and |
188 | * without double-quotes (%22). Also, add a space at the beginning | 188 | * without double-quotes (%22). Also, add a space at the beginning |
189 | * if there is not a '+'. | 189 | * if there is not a '+'. |
190 | * | 190 | * |
191 | * @param in string with %-encoding | 191 | * @param in string with %-encoding |
192 | * @param emsg where to store the parser error message (if any) | 192 | * @param emsg where to store the parser error message (if any) |
193 | * @return decodded string with leading space (or preserved plus) | 193 | * @return decodded string with leading space (or preserved plus) |
@@ -971,7 +971,7 @@ GNUNET_FS_uri_sks_create_from_nsid (GNUNET_HashCode * nsid, const char *id) | |||
971 | 971 | ||
972 | /** | 972 | /** |
973 | * Canonicalize a keyword. | 973 | * Canonicalize a keyword. |
974 | * | 974 | * |
975 | * @param in input string (the keyword) | 975 | * @param in input string (the keyword) |
976 | * @return canonicalized keyword | 976 | * @return canonicalized keyword |
977 | */ | 977 | */ |
@@ -1049,7 +1049,7 @@ canonicalize_keyword (const char *in) | |||
1049 | * as decapitalization and removal of certain characters. | 1049 | * as decapitalization and removal of certain characters. |
1050 | * (useful for search). | 1050 | * (useful for search). |
1051 | * | 1051 | * |
1052 | * @param uri the URI to canonicalize | 1052 | * @param uri the URI to canonicalize |
1053 | * @return canonicalized version of the URI, NULL on error | 1053 | * @return canonicalized version of the URI, NULL on error |
1054 | */ | 1054 | */ |
1055 | struct GNUNET_FS_Uri * | 1055 | struct GNUNET_FS_Uri * |
@@ -1568,7 +1568,7 @@ GNUNET_FS_uri_test_loc (const struct GNUNET_FS_Uri *uri) | |||
1568 | * used in the main libextractor library and yielding | 1568 | * used in the main libextractor library and yielding |
1569 | * meta data). | 1569 | * meta data). |
1570 | * @param type libextractor-type describing the meta data | 1570 | * @param type libextractor-type describing the meta data |
1571 | * @param format basic format information about data | 1571 | * @param format basic format information about data |
1572 | * @param data_mime_type mime-type of data (not of the original file); | 1572 | * @param data_mime_type mime-type of data (not of the original file); |
1573 | * can be NULL (if mime-type is not known) | 1573 | * can be NULL (if mime-type is not known) |
1574 | * @param data actual meta-data found | 1574 | * @param data actual meta-data found |
diff --git a/src/fs/gnunet-download.c b/src/fs/gnunet-download.c index 748a8f09c..f38805c2b 100644 --- a/src/fs/gnunet-download.c +++ b/src/fs/gnunet-download.c | |||
@@ -75,7 +75,7 @@ shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
75 | 75 | ||
76 | 76 | ||
77 | /** | 77 | /** |
78 | * Called by FS client to give information about the progress of an | 78 | * Called by FS client to give information about the progress of an |
79 | * operation. | 79 | * operation. |
80 | * | 80 | * |
81 | * @param cls closure | 81 | * @param cls closure |
diff --git a/src/fs/gnunet-publish.c b/src/fs/gnunet-publish.c index 7edad6979..9cfdfe6a5 100644 --- a/src/fs/gnunet-publish.c +++ b/src/fs/gnunet-publish.c | |||
@@ -87,7 +87,7 @@ do_stop_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
87 | 87 | ||
88 | 88 | ||
89 | /** | 89 | /** |
90 | * Called by FS client to give information about the progress of an | 90 | * Called by FS client to give information about the progress of an |
91 | * operation. | 91 | * operation. |
92 | * | 92 | * |
93 | * @param cls closure | 93 | * @param cls closure |
diff --git a/src/fs/gnunet-search.c b/src/fs/gnunet-search.c index eb5345833..3a30f6c2b 100644 --- a/src/fs/gnunet-search.c +++ b/src/fs/gnunet-search.c | |||
@@ -62,7 +62,7 @@ static int local_only; | |||
62 | * used in the main libextractor library and yielding | 62 | * used in the main libextractor library and yielding |
63 | * meta data). | 63 | * meta data). |
64 | * @param type libextractor-type describing the meta data | 64 | * @param type libextractor-type describing the meta data |
65 | * @param format basic format information about data | 65 | * @param format basic format information about data |
66 | * @param data_mime_type mime-type of data (not of the original file); | 66 | * @param data_mime_type mime-type of data (not of the original file); |
67 | * can be NULL (if mime-type is not known) | 67 | * can be NULL (if mime-type is not known) |
68 | * @param data actual meta-data found | 68 | * @param data actual meta-data found |
@@ -117,7 +117,7 @@ clean_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
117 | 117 | ||
118 | 118 | ||
119 | /** | 119 | /** |
120 | * Called by FS client to give information about the progress of an | 120 | * Called by FS client to give information about the progress of an |
121 | * operation. | 121 | * operation. |
122 | * | 122 | * |
123 | * @param cls closure | 123 | * @param cls closure |
diff --git a/src/fs/gnunet-service-fs.c b/src/fs/gnunet-service-fs.c index 0457607d5..2e3c7742f 100644 --- a/src/fs/gnunet-service-fs.c +++ b/src/fs/gnunet-service-fs.c | |||
@@ -24,7 +24,7 @@ | |||
24 | * @author Christian Grothoff | 24 | * @author Christian Grothoff |
25 | * | 25 | * |
26 | * To use: | 26 | * To use: |
27 | * - consider re-issue GSF_dht_lookup_ after non-DHT reply received | 27 | * - consider re-issue GSF_dht_lookup_ after non-DHT reply received |
28 | * - implement 'SUPPORT_DELAYS' | 28 | * - implement 'SUPPORT_DELAYS' |
29 | * | 29 | * |
30 | */ | 30 | */ |
@@ -59,7 +59,7 @@ | |||
59 | 59 | ||
60 | 60 | ||
61 | /** | 61 | /** |
62 | * How quickly do we age cover traffic? At the given | 62 | * How quickly do we age cover traffic? At the given |
63 | * time interval, remaining cover traffic counters are | 63 | * time interval, remaining cover traffic counters are |
64 | * decremented by 1/16th. | 64 | * decremented by 1/16th. |
65 | */ | 65 | */ |
@@ -106,13 +106,13 @@ struct GNUNET_LOAD_Value *GSF_rt_entry_lifetime; | |||
106 | double GSF_current_priorities; | 106 | double GSF_current_priorities; |
107 | 107 | ||
108 | /** | 108 | /** |
109 | * How many query messages have we received 'recently' that | 109 | * How many query messages have we received 'recently' that |
110 | * have not yet been claimed as cover traffic? | 110 | * have not yet been claimed as cover traffic? |
111 | */ | 111 | */ |
112 | unsigned int GSF_cover_query_count; | 112 | unsigned int GSF_cover_query_count; |
113 | 113 | ||
114 | /** | 114 | /** |
115 | * How many content messages have we received 'recently' that | 115 | * How many content messages have we received 'recently' that |
116 | * have not yet been claimed as cover traffic? | 116 | * have not yet been claimed as cover traffic? |
117 | */ | 117 | */ |
118 | unsigned int GSF_cover_content_count; | 118 | unsigned int GSF_cover_content_count; |
@@ -192,8 +192,8 @@ GSF_update_datastore_delay_ (struct GNUNET_TIME_Absolute start) | |||
192 | /** | 192 | /** |
193 | * Test if the DATABASE (GET) load on this peer is too high | 193 | * Test if the DATABASE (GET) load on this peer is too high |
194 | * to even consider processing the query at | 194 | * to even consider processing the query at |
195 | * all. | 195 | * all. |
196 | * | 196 | * |
197 | * @return GNUNET_YES if the load is too high to do anything (load high) | 197 | * @return GNUNET_YES if the load is too high to do anything (load high) |
198 | * GNUNET_NO to process normally (load normal) | 198 | * GNUNET_NO to process normally (load normal) |
199 | * GNUNET_SYSERR to process for free (load low) | 199 | * GNUNET_SYSERR to process for free (load low) |
@@ -311,7 +311,7 @@ handle_p2p_get (void *cls, const struct GNUNET_PeerIdentity *other, | |||
311 | /** | 311 | /** |
312 | * We're done with the local lookup, now consider | 312 | * We're done with the local lookup, now consider |
313 | * P2P processing (depending on request options and | 313 | * P2P processing (depending on request options and |
314 | * result status). Also signal that we can now | 314 | * result status). Also signal that we can now |
315 | * receive more request information from the client. | 315 | * receive more request information from the client. |
316 | * | 316 | * |
317 | * @param cls the client doing the request ('struct GNUNET_SERVER_Client') | 317 | * @param cls the client doing the request ('struct GNUNET_SERVER_Client') |
diff --git a/src/fs/gnunet-service-fs.h b/src/fs/gnunet-service-fs.h index bee814318..ef2eebc8d 100644 --- a/src/fs/gnunet-service-fs.h +++ b/src/fs/gnunet-service-fs.h | |||
@@ -137,13 +137,13 @@ extern struct GNUNET_LOAD_Value *GSF_rt_entry_lifetime; | |||
137 | extern double GSF_current_priorities; | 137 | extern double GSF_current_priorities; |
138 | 138 | ||
139 | /** | 139 | /** |
140 | * How many query messages have we received 'recently' that | 140 | * How many query messages have we received 'recently' that |
141 | * have not yet been claimed as cover traffic? | 141 | * have not yet been claimed as cover traffic? |
142 | */ | 142 | */ |
143 | extern unsigned int GSF_cover_query_count; | 143 | extern unsigned int GSF_cover_query_count; |
144 | 144 | ||
145 | /** | 145 | /** |
146 | * How many content messages have we received 'recently' that | 146 | * How many content messages have we received 'recently' that |
147 | * have not yet been claimed as cover traffic? | 147 | * have not yet been claimed as cover traffic? |
148 | */ | 148 | */ |
149 | extern unsigned int GSF_cover_content_count; | 149 | extern unsigned int GSF_cover_content_count; |
@@ -161,8 +161,8 @@ extern int GSF_enable_randomized_delays; | |||
161 | /** | 161 | /** |
162 | * Test if the DATABASE (GET) load on this peer is too high | 162 | * Test if the DATABASE (GET) load on this peer is too high |
163 | * to even consider processing the query at | 163 | * to even consider processing the query at |
164 | * all. | 164 | * all. |
165 | * | 165 | * |
166 | * @return GNUNET_YES if the load is too high to do anything (load high) | 166 | * @return GNUNET_YES if the load is too high to do anything (load high) |
167 | * GNUNET_NO to process normally (load normal) | 167 | * GNUNET_NO to process normally (load normal) |
168 | * GNUNET_SYSERR to process for free (load low) | 168 | * GNUNET_SYSERR to process for free (load low) |
diff --git a/src/fs/gnunet-service-fs_cp.c b/src/fs/gnunet-service-fs_cp.c index 96d906c5b..527ca7677 100644 --- a/src/fs/gnunet-service-fs_cp.c +++ b/src/fs/gnunet-service-fs_cp.c | |||
@@ -364,7 +364,7 @@ update_atsi (struct GSF_ConnectedPeer *cp, | |||
364 | 364 | ||
365 | /** | 365 | /** |
366 | * Return the performance data record for the given peer | 366 | * Return the performance data record for the given peer |
367 | * | 367 | * |
368 | * @param cp peer to query | 368 | * @param cp peer to query |
369 | * @return performance data record for the peer | 369 | * @return performance data record for the peer |
370 | */ | 370 | */ |
@@ -818,7 +818,7 @@ transmit_delayed_now (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
818 | 818 | ||
819 | /** | 819 | /** |
820 | * Get the randomized delay a response should be subjected to. | 820 | * Get the randomized delay a response should be subjected to. |
821 | * | 821 | * |
822 | * @return desired delay | 822 | * @return desired delay |
823 | */ | 823 | */ |
824 | static struct GNUNET_TIME_Relative | 824 | static struct GNUNET_TIME_Relative |
@@ -844,7 +844,7 @@ get_randomized_delay () | |||
844 | * Handle a reply to a pending request. Also called if a request | 844 | * Handle a reply to a pending request. Also called if a request |
845 | * expires (then with data == NULL). The handler may be called | 845 | * expires (then with data == NULL). The handler may be called |
846 | * many times (depending on the request type), but will not be | 846 | * many times (depending on the request type), but will not be |
847 | * called during or after a call to GSF_pending_request_cancel | 847 | * called during or after a call to GSF_pending_request_cancel |
848 | * and will also not be called anymore after a call signalling | 848 | * and will also not be called anymore after a call signalling |
849 | * expiration. | 849 | * expiration. |
850 | * | 850 | * |
@@ -997,7 +997,7 @@ change_host_trust (struct GSF_ConnectedPeer *cp, int value) | |||
997 | /** | 997 | /** |
998 | * We've received a request with the specified priority. Bound it | 998 | * We've received a request with the specified priority. Bound it |
999 | * according to how much we trust the given peer. | 999 | * according to how much we trust the given peer. |
1000 | * | 1000 | * |
1001 | * @param prio_in requested priority | 1001 | * @param prio_in requested priority |
1002 | * @param cp the peer making the request | 1002 | * @param cp the peer making the request |
1003 | * @return effective priority | 1003 | * @return effective priority |
@@ -1333,7 +1333,7 @@ GSF_handle_p2p_query_ (const struct GNUNET_PeerIdentity *other, | |||
1333 | * Function called if there has been a timeout trying to satisfy | 1333 | * Function called if there has been a timeout trying to satisfy |
1334 | * a transmission request. | 1334 | * a transmission request. |
1335 | * | 1335 | * |
1336 | * @param cls the 'struct GSF_PeerTransmitHandle' of the request | 1336 | * @param cls the 'struct GSF_PeerTransmitHandle' of the request |
1337 | * @param tc scheduler context | 1337 | * @param tc scheduler context |
1338 | */ | 1338 | */ |
1339 | static void | 1339 | static void |
@@ -1717,7 +1717,7 @@ create_migration_stop_message (void *cls, size_t size, void *buf) | |||
1717 | /** | 1717 | /** |
1718 | * Ask a peer to stop migrating data to us until the given point | 1718 | * Ask a peer to stop migrating data to us until the given point |
1719 | * in time. | 1719 | * in time. |
1720 | * | 1720 | * |
1721 | * @param cp peer to ask | 1721 | * @param cp peer to ask |
1722 | * @param block_time until when to block | 1722 | * @param block_time until when to block |
1723 | */ | 1723 | */ |
diff --git a/src/fs/gnunet-service-fs_cp.h b/src/fs/gnunet-service-fs_cp.h index 3f25363f1..0f22b0280 100644 --- a/src/fs/gnunet-service-fs_cp.h +++ b/src/fs/gnunet-service-fs_cp.h | |||
@@ -308,7 +308,7 @@ GSF_handle_p2p_query_ (const struct GNUNET_PeerIdentity *other, | |||
308 | 308 | ||
309 | /** | 309 | /** |
310 | * Return the performance data record for the given peer | 310 | * Return the performance data record for the given peer |
311 | * | 311 | * |
312 | * @param cp peer to query | 312 | * @param cp peer to query |
313 | * @return performance data record for the peer | 313 | * @return performance data record for the peer |
314 | */ | 314 | */ |
@@ -319,7 +319,7 @@ GSF_get_peer_performance_data_ (struct GSF_ConnectedPeer *cp); | |||
319 | /** | 319 | /** |
320 | * Ask a peer to stop migrating data to us until the given point | 320 | * Ask a peer to stop migrating data to us until the given point |
321 | * in time. | 321 | * in time. |
322 | * | 322 | * |
323 | * @param cp peer to ask | 323 | * @param cp peer to ask |
324 | * @param block_time until when to block | 324 | * @param block_time until when to block |
325 | */ | 325 | */ |
diff --git a/src/fs/gnunet-service-fs_lc.c b/src/fs/gnunet-service-fs_lc.c index 6460d4f13..a7e78a6ed 100644 --- a/src/fs/gnunet-service-fs_lc.c +++ b/src/fs/gnunet-service-fs_lc.c | |||
@@ -209,7 +209,7 @@ client_request_destroy (void *cls, | |||
209 | * Handle a reply to a pending request. Also called if a request | 209 | * Handle a reply to a pending request. Also called if a request |
210 | * expires (then with data == NULL). The handler may be called | 210 | * expires (then with data == NULL). The handler may be called |
211 | * many times (depending on the request type), but will not be | 211 | * many times (depending on the request type), but will not be |
212 | * called during or after a call to GSF_pending_request_cancel | 212 | * called during or after a call to GSF_pending_request_cancel |
213 | * and will also not be called anymore after a call signalling | 213 | * and will also not be called anymore after a call signalling |
214 | * expiration. | 214 | * expiration. |
215 | * | 215 | * |
@@ -217,7 +217,7 @@ client_request_destroy (void *cls, | |||
217 | * @param eval evaluation of the result | 217 | * @param eval evaluation of the result |
218 | * @param pr handle to the original pending request | 218 | * @param pr handle to the original pending request |
219 | * @param reply_anonymity_level anonymity level for the reply, UINT32_MAX for "unknown" | 219 | * @param reply_anonymity_level anonymity level for the reply, UINT32_MAX for "unknown" |
220 | * @param expiration when does 'data' expire? | 220 | * @param expiration when does 'data' expire? |
221 | * @param type type of the block | 221 | * @param type type of the block |
222 | * @param data response data, NULL on request expiration | 222 | * @param data response data, NULL on request expiration |
223 | * @param data_len number of bytes in data | 223 | * @param data_len number of bytes in data |
diff --git a/src/fs/gnunet-service-fs_pe.c b/src/fs/gnunet-service-fs_pe.c index d1a8a1163..1ed7085c4 100644 --- a/src/fs/gnunet-service-fs_pe.c +++ b/src/fs/gnunet-service-fs_pe.c | |||
@@ -31,7 +31,7 @@ | |||
31 | 31 | ||
32 | 32 | ||
33 | /** | 33 | /** |
34 | * List of GSF_PendingRequests this request plan | 34 | * List of GSF_PendingRequests this request plan |
35 | * participates with. | 35 | * participates with. |
36 | */ | 36 | */ |
37 | struct PendingRequestList; | 37 | struct PendingRequestList; |
@@ -67,7 +67,7 @@ struct GSF_RequestPlanReference | |||
67 | 67 | ||
68 | 68 | ||
69 | /** | 69 | /** |
70 | * List of GSF_PendingRequests this request plan | 70 | * List of GSF_PendingRequests this request plan |
71 | * participates with. | 71 | * participates with. |
72 | */ | 72 | */ |
73 | struct PendingRequestList | 73 | struct PendingRequestList |
@@ -228,7 +228,7 @@ plan (struct PeerPlan *pp, struct GSF_RequestPlan *rp) | |||
228 | gettext_noop ("# average retransmission delay (ms)"), | 228 | gettext_noop ("# average retransmission delay (ms)"), |
229 | total_delay * 1000LL / plan_count, GNUNET_NO); | 229 | total_delay * 1000LL / plan_count, GNUNET_NO); |
230 | prd = GSF_pending_request_get_data_ (rp->prl_head->pr); | 230 | prd = GSF_pending_request_get_data_ (rp->prl_head->pr); |
231 | // FIXME: calculate 'rp->priority'! | 231 | // FIXME: calculate 'rp->priority'! |
232 | if (rp->transmission_counter < 32) | 232 | if (rp->transmission_counter < 32) |
233 | delay = | 233 | delay = |
234 | GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, | 234 | GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, |
@@ -533,7 +533,7 @@ GSF_plan_add_ (struct GSF_ConnectedPeer *cp, struct GSF_PendingRequest *pr) | |||
533 | * Notify the plan about a peer being no longer available; | 533 | * Notify the plan about a peer being no longer available; |
534 | * destroy all entries associated with this peer. | 534 | * destroy all entries associated with this peer. |
535 | * | 535 | * |
536 | * @param cp connected peer | 536 | * @param cp connected peer |
537 | */ | 537 | */ |
538 | void | 538 | void |
539 | GSF_plan_notify_peer_disconnect_ (const struct GSF_ConnectedPeer *cp) | 539 | GSF_plan_notify_peer_disconnect_ (const struct GSF_ConnectedPeer *cp) |
diff --git a/src/fs/gnunet-service-fs_pe.h b/src/fs/gnunet-service-fs_pe.h index 23787908e..3ae9904a6 100644 --- a/src/fs/gnunet-service-fs_pe.h +++ b/src/fs/gnunet-service-fs_pe.h | |||
@@ -43,7 +43,7 @@ GSF_plan_add_ (struct GSF_ConnectedPeer *cp, struct GSF_PendingRequest *pr); | |||
43 | * Notify the plan about a peer being no longer available; | 43 | * Notify the plan about a peer being no longer available; |
44 | * destroy all entries associated with this peer. | 44 | * destroy all entries associated with this peer. |
45 | * | 45 | * |
46 | * @param cp connected peer | 46 | * @param cp connected peer |
47 | */ | 47 | */ |
48 | void | 48 | void |
49 | GSF_plan_notify_peer_disconnect_ (const struct GSF_ConnectedPeer *cp); | 49 | GSF_plan_notify_peer_disconnect_ (const struct GSF_ConnectedPeer *cp); |
diff --git a/src/fs/gnunet-service-fs_pr.c b/src/fs/gnunet-service-fs_pr.c index e5cb1f03c..a1fc60bd9 100644 --- a/src/fs/gnunet-service-fs_pr.c +++ b/src/fs/gnunet-service-fs_pr.c | |||
@@ -254,7 +254,7 @@ refresh_bloomfilter (struct GSF_PendingRequest *pr) | |||
254 | 254 | ||
255 | 255 | ||
256 | /** | 256 | /** |
257 | * Create a new pending request. | 257 | * Create a new pending request. |
258 | * | 258 | * |
259 | * @param options request options | 259 | * @param options request options |
260 | * @param type type of the block that is being requested | 260 | * @param type type of the block that is being requested |
@@ -384,7 +384,7 @@ GSF_pending_request_create_ (enum GSF_PendingRequestOptions options, | |||
384 | 384 | ||
385 | /** | 385 | /** |
386 | * Obtain the public data associated with a pending request | 386 | * Obtain the public data associated with a pending request |
387 | * | 387 | * |
388 | * @param pr pending request | 388 | * @param pr pending request |
389 | * @return associated public data | 389 | * @return associated public data |
390 | */ | 390 | */ |
@@ -399,7 +399,7 @@ GSF_pending_request_get_data_ (struct GSF_PendingRequest *pr) | |||
399 | * Test if two pending requests are compatible (would generate | 399 | * Test if two pending requests are compatible (would generate |
400 | * the same query modulo filters and should thus be processed | 400 | * the same query modulo filters and should thus be processed |
401 | * jointly). | 401 | * jointly). |
402 | * | 402 | * |
403 | * @param pra a pending request | 403 | * @param pra a pending request |
404 | * @param pra another pending request | 404 | * @param pra another pending request |
405 | * @return GNUNET_OK if the requests are compatible | 405 | * @return GNUNET_OK if the requests are compatible |
@@ -957,8 +957,8 @@ put_migration_continuation (void *cls, int success, const char *msg) | |||
957 | /** | 957 | /** |
958 | * Test if the DATABASE (PUT) load on this peer is too high | 958 | * Test if the DATABASE (PUT) load on this peer is too high |
959 | * to even consider processing the query at | 959 | * to even consider processing the query at |
960 | * all. | 960 | * all. |
961 | * | 961 | * |
962 | * @return GNUNET_YES if the load is too high to do anything (load high) | 962 | * @return GNUNET_YES if the load is too high to do anything (load high) |
963 | * GNUNET_NO to process normally (load normal or low) | 963 | * GNUNET_NO to process normally (load normal or low) |
964 | */ | 964 | */ |
@@ -1089,7 +1089,7 @@ GSF_dht_lookup_ (struct GSF_PendingRequest *pr) | |||
1089 | 1089 | ||
1090 | /** | 1090 | /** |
1091 | * Task that issues a warning if the datastore lookup takes too long. | 1091 | * Task that issues a warning if the datastore lookup takes too long. |
1092 | * | 1092 | * |
1093 | * @param cls the 'struct GSF_PendingRequest' | 1093 | * @param cls the 'struct GSF_PendingRequest' |
1094 | * @param tc task context | 1094 | * @param tc task context |
1095 | */ | 1095 | */ |
@@ -1110,7 +1110,7 @@ warn_delay_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
1110 | 1110 | ||
1111 | /** | 1111 | /** |
1112 | * Task that issues a warning if the datastore lookup takes too long. | 1112 | * Task that issues a warning if the datastore lookup takes too long. |
1113 | * | 1113 | * |
1114 | * @param cls the 'struct GSF_PendingRequest' | 1114 | * @param cls the 'struct GSF_PendingRequest' |
1115 | * @param tc task context | 1115 | * @param tc task context |
1116 | */ | 1116 | */ |
diff --git a/src/fs/gnunet-service-fs_pr.h b/src/fs/gnunet-service-fs_pr.h index b68989be7..03fc047fb 100644 --- a/src/fs/gnunet-service-fs_pr.h +++ b/src/fs/gnunet-service-fs_pr.h | |||
@@ -153,7 +153,7 @@ struct GSF_PendingRequestData | |||
153 | * Handle a reply to a pending request. Also called if a request | 153 | * Handle a reply to a pending request. Also called if a request |
154 | * expires (then with data == NULL). The handler may be called | 154 | * expires (then with data == NULL). The handler may be called |
155 | * many times (depending on the request type), but will not be | 155 | * many times (depending on the request type), but will not be |
156 | * called during or after a call to GSF_pending_request_cancel | 156 | * called during or after a call to GSF_pending_request_cancel |
157 | * and will also not be called anymore after a call signalling | 157 | * and will also not be called anymore after a call signalling |
158 | * expiration. | 158 | * expiration. |
159 | * | 159 | * |
@@ -180,7 +180,7 @@ typedef void (*GSF_PendingRequestReplyHandler) (void *cls, | |||
180 | 180 | ||
181 | 181 | ||
182 | /** | 182 | /** |
183 | * Create a new pending request. | 183 | * Create a new pending request. |
184 | * | 184 | * |
185 | * @param options request options | 185 | * @param options request options |
186 | * @param type type of the block that is being requested | 186 | * @param type type of the block that is being requested |
@@ -232,7 +232,7 @@ GSF_pending_request_update_ (struct GSF_PendingRequest *pr, | |||
232 | 232 | ||
233 | /** | 233 | /** |
234 | * Obtain the public data associated with a pending request | 234 | * Obtain the public data associated with a pending request |
235 | * | 235 | * |
236 | * @param pr pending request | 236 | * @param pr pending request |
237 | * @return associated public data | 237 | * @return associated public data |
238 | */ | 238 | */ |
@@ -244,7 +244,7 @@ GSF_pending_request_get_data_ (struct GSF_PendingRequest *pr); | |||
244 | * Test if two pending requests are compatible (would generate | 244 | * Test if two pending requests are compatible (would generate |
245 | * the same query modulo filters and should thus be processed | 245 | * the same query modulo filters and should thus be processed |
246 | * jointly). | 246 | * jointly). |
247 | * | 247 | * |
248 | * @param pra a pending request | 248 | * @param pra a pending request |
249 | * @param pra another pending request | 249 | * @param pra another pending request |
250 | * @return GNUNET_OK if the requests are compatible | 250 | * @return GNUNET_OK if the requests are compatible |
diff --git a/src/fs/gnunet-service-fs_push.c b/src/fs/gnunet-service-fs_push.c index fb05366af..acdba81f0 100644 --- a/src/fs/gnunet-service-fs_push.c +++ b/src/fs/gnunet-service-fs_push.c | |||
@@ -34,7 +34,7 @@ | |||
34 | #define DEBUG_FS_MIGRATION GNUNET_NO | 34 | #define DEBUG_FS_MIGRATION GNUNET_NO |
35 | 35 | ||
36 | /** | 36 | /** |
37 | * How long must content remain valid for us to consider it for migration? | 37 | * How long must content remain valid for us to consider it for migration? |
38 | * If content will expire too soon, there is clearly no point in pushing | 38 | * If content will expire too soon, there is clearly no point in pushing |
39 | * it to other peers. This value gives the threshold for migration. Note | 39 | * it to other peers. This value gives the threshold for migration. Note |
40 | * that if this value is increased, the migration testcase may need to be | 40 | * that if this value is increased, the migration testcase may need to be |
@@ -65,7 +65,7 @@ struct MigrationReadyBlock | |||
65 | GNUNET_HashCode query; | 65 | GNUNET_HashCode query; |
66 | 66 | ||
67 | /** | 67 | /** |
68 | * When does this block expire? | 68 | * When does this block expire? |
69 | */ | 69 | */ |
70 | struct GNUNET_TIME_Absolute expiration; | 70 | struct GNUNET_TIME_Absolute expiration; |
71 | 71 | ||
@@ -313,7 +313,7 @@ count_targets (struct MigrationReadyBlock *block) | |||
313 | 313 | ||
314 | /** | 314 | /** |
315 | * Check if sending this block to this peer would | 315 | * Check if sending this block to this peer would |
316 | * be a good idea. | 316 | * be a good idea. |
317 | * | 317 | * |
318 | * @param peer target peer | 318 | * @param peer target peer |
319 | * @param block the block | 319 | * @param block the block |
@@ -419,7 +419,7 @@ find_content (struct MigrationReadyPeer *mrp) | |||
419 | /** | 419 | /** |
420 | * Task that is run periodically to obtain blocks for content | 420 | * Task that is run periodically to obtain blocks for content |
421 | * migration | 421 | * migration |
422 | * | 422 | * |
423 | * @param cls unused | 423 | * @param cls unused |
424 | * @param tc scheduler context (also unused) | 424 | * @param tc scheduler context (also unused) |
425 | */ | 425 | */ |
@@ -539,7 +539,7 @@ process_migration_content (void *cls, const GNUNET_HashCode * key, size_t size, | |||
539 | /** | 539 | /** |
540 | * Task that is run periodically to obtain blocks for content | 540 | * Task that is run periodically to obtain blocks for content |
541 | * migration | 541 | * migration |
542 | * | 542 | * |
543 | * @param cls unused | 543 | * @param cls unused |
544 | * @param tc scheduler context (also unused) | 544 | * @param tc scheduler context (also unused) |
545 | */ | 545 | */ |
diff --git a/src/fs/gnunet-service-fs_put.c b/src/fs/gnunet-service-fs_put.c index 4b4925d22..5771b5665 100644 --- a/src/fs/gnunet-service-fs_put.c +++ b/src/fs/gnunet-service-fs_put.c | |||
@@ -82,7 +82,7 @@ static struct PutOperator operators[] = { | |||
82 | 82 | ||
83 | /** | 83 | /** |
84 | * Task that is run periodically to obtain blocks for DHT PUTs. | 84 | * Task that is run periodically to obtain blocks for DHT PUTs. |
85 | * | 85 | * |
86 | * @param cls type of blocks to gather | 86 | * @param cls type of blocks to gather |
87 | * @param tc scheduler context (unused) | 87 | * @param tc scheduler context (unused) |
88 | */ | 88 | */ |
@@ -93,7 +93,7 @@ gather_dht_put_blocks (void *cls, | |||
93 | 93 | ||
94 | /** | 94 | /** |
95 | * Task that is run periodically to obtain blocks for DHT PUTs. | 95 | * Task that is run periodically to obtain blocks for DHT PUTs. |
96 | * | 96 | * |
97 | * @param cls type of blocks to gather | 97 | * @param cls type of blocks to gather |
98 | * @param tc scheduler context (unused) | 98 | * @param tc scheduler context (unused) |
99 | */ | 99 | */ |
@@ -169,7 +169,7 @@ process_dht_put_content (void *cls, const GNUNET_HashCode * key, size_t size, | |||
169 | 169 | ||
170 | /** | 170 | /** |
171 | * Task that is run periodically to obtain blocks for DHT PUTs. | 171 | * Task that is run periodically to obtain blocks for DHT PUTs. |
172 | * | 172 | * |
173 | * @param cls type of blocks to gather | 173 | * @param cls type of blocks to gather |
174 | * @param tc scheduler context (unused) | 174 | * @param tc scheduler context (unused) |
175 | */ | 175 | */ |
diff --git a/src/fs/gnunet-unindex.c b/src/fs/gnunet-unindex.c index d52956a75..25560ca10 100644 --- a/src/fs/gnunet-unindex.c +++ b/src/fs/gnunet-unindex.c | |||
@@ -61,7 +61,7 @@ shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
61 | } | 61 | } |
62 | 62 | ||
63 | /** | 63 | /** |
64 | * Called by FS client to give information about the progress of an | 64 | * Called by FS client to give information about the progress of an |
65 | * operation. | 65 | * operation. |
66 | * | 66 | * |
67 | * @param cls closure | 67 | * @param cls closure |
diff --git a/src/fs/perf_gnunet_service_fs_p2p_trust.c b/src/fs/perf_gnunet_service_fs_p2p_trust.c index 3432714b3..6140bb74f 100644 --- a/src/fs/perf_gnunet_service_fs_p2p_trust.c +++ b/src/fs/perf_gnunet_service_fs_p2p_trust.c | |||
@@ -37,7 +37,7 @@ | |||
37 | * Download speed of type `seeder 1' was 757 KiB/s | 37 | * Download speed of type `seeder 1' was 757 KiB/s |
38 | * Download speed of type `seeder 2' was 613 KiB/s | 38 | * Download speed of type `seeder 2' was 613 KiB/s |
39 | * Download speed of type `leach` was 539 KiB/s | 39 | * Download speed of type `leach` was 539 KiB/s |
40 | * | 40 | * |
41 | * - 10 MB, 3 peers, without delays: | 41 | * - 10 MB, 3 peers, without delays: |
42 | * Download speed of type `seeder 1' was 1784 KiB/s | 42 | * Download speed of type `seeder 1' was 1784 KiB/s |
43 | * Download speed of type `seeder 2' was 1604 KiB/s | 43 | * Download speed of type `seeder 2' was 1604 KiB/s |
diff --git a/src/fs/test_fs_download_persistence.c b/src/fs/test_fs_download_persistence.c index c7a0a8b7c..c26a60978 100644 --- a/src/fs/test_fs_download_persistence.c +++ b/src/fs/test_fs_download_persistence.c | |||
@@ -138,8 +138,8 @@ restart_fs_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
138 | 138 | ||
139 | 139 | ||
140 | /** | 140 | /** |
141 | * Consider scheduling the restart-task. | 141 | * Consider scheduling the restart-task. |
142 | * Only runs the restart task once per event | 142 | * Only runs the restart task once per event |
143 | * category. | 143 | * category. |
144 | * | 144 | * |
145 | * @param ev type of the event to consider | 145 | * @param ev type of the event to consider |
diff --git a/src/fs/test_fs_publish_persistence.c b/src/fs/test_fs_publish_persistence.c index 704c2a4c0..eab0aa650 100644 --- a/src/fs/test_fs_publish_persistence.c +++ b/src/fs/test_fs_publish_persistence.c | |||
@@ -112,8 +112,8 @@ restart_fs_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
112 | 112 | ||
113 | 113 | ||
114 | /** | 114 | /** |
115 | * Consider scheduling the restart-task. | 115 | * Consider scheduling the restart-task. |
116 | * Only runs the restart task once per event | 116 | * Only runs the restart task once per event |
117 | * category. | 117 | * category. |
118 | * | 118 | * |
119 | * @param ev type of the event to consider | 119 | * @param ev type of the event to consider |
diff --git a/src/fs/test_fs_search_persistence.c b/src/fs/test_fs_search_persistence.c index 6eb18dafb..335b1bee3 100644 --- a/src/fs/test_fs_search_persistence.c +++ b/src/fs/test_fs_search_persistence.c | |||
@@ -102,8 +102,8 @@ restart_fs_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
102 | 102 | ||
103 | 103 | ||
104 | /** | 104 | /** |
105 | * Consider scheduling the restart-task. | 105 | * Consider scheduling the restart-task. |
106 | * Only runs the restart task once per event | 106 | * Only runs the restart task once per event |
107 | * category. | 107 | * category. |
108 | * | 108 | * |
109 | * @param ev type of the event to consider | 109 | * @param ev type of the event to consider |
diff --git a/src/fs/test_fs_unindex_persistence.c b/src/fs/test_fs_unindex_persistence.c index e81400817..69623ac7c 100644 --- a/src/fs/test_fs_unindex_persistence.c +++ b/src/fs/test_fs_unindex_persistence.c | |||
@@ -108,8 +108,8 @@ restart_fs_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
108 | 108 | ||
109 | 109 | ||
110 | /** | 110 | /** |
111 | * Consider scheduling the restart-task. | 111 | * Consider scheduling the restart-task. |
112 | * Only runs the restart task once per event | 112 | * Only runs the restart task once per event |
113 | * category. | 113 | * category. |
114 | * | 114 | * |
115 | * @param ev type of the event to consider | 115 | * @param ev type of the event to consider |
diff --git a/src/hello/hello.c b/src/hello/hello.c index 5d64d8f5a..501f057c8 100644 --- a/src/hello/hello.c +++ b/src/hello/hello.c | |||
@@ -600,9 +600,9 @@ find_matching (void *cls, const char *tname, | |||
600 | * @param h2 the second HELLO message | 600 | * @param h2 the second HELLO message |
601 | * @param now time to use for deciding which addresses have | 601 | * @param now time to use for deciding which addresses have |
602 | * expired and should not be considered at all | 602 | * expired and should not be considered at all |
603 | * @return absolute time forever if the two HELLOs are | 603 | * @return absolute time forever if the two HELLOs are |
604 | * totally identical; smallest timestamp >= now if | 604 | * totally identical; smallest timestamp >= now if |
605 | * they only differ in timestamps; | 605 | * they only differ in timestamps; |
606 | * zero if the some addresses with expirations >= now | 606 | * zero if the some addresses with expirations >= now |
607 | * do not match at all | 607 | * do not match at all |
608 | */ | 608 | */ |
diff --git a/src/hostlist/hostlist-client.c b/src/hostlist/hostlist-client.c index f6a47f4d9..85c691172 100644 --- a/src/hostlist/hostlist-client.c +++ b/src/hostlist/hostlist-client.c | |||
@@ -775,7 +775,7 @@ download_prepare () | |||
775 | 775 | ||
776 | /** | 776 | /** |
777 | * Task that is run when we are ready to receive more data from the hostlist | 777 | * Task that is run when we are ready to receive more data from the hostlist |
778 | * server. | 778 | * server. |
779 | * | 779 | * |
780 | * @param cls closure, unused | 780 | * @param cls closure, unused |
781 | * @param tc task context, unused | 781 | * @param tc task context, unused |
@@ -1221,7 +1221,7 @@ handler_advertisement (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
1221 | 1221 | ||
1222 | 1222 | ||
1223 | /** | 1223 | /** |
1224 | * Continuation called by the statistics code once | 1224 | * Continuation called by the statistics code once |
1225 | * we go the stat. Initiates hostlist download scheduling. | 1225 | * we go the stat. Initiates hostlist download scheduling. |
1226 | * | 1226 | * |
1227 | * @param cls closure | 1227 | * @param cls closure |
diff --git a/src/include/block_fs.h b/src/include/block_fs.h index c3dcdeced..9dc22e57f 100644 --- a/src/include/block_fs.h +++ b/src/include/block_fs.h | |||
@@ -140,7 +140,7 @@ struct NBlock | |||
140 | 140 | ||
141 | 141 | ||
142 | /** | 142 | /** |
143 | * @brief index block (indexing a DBlock that | 143 | * @brief index block (indexing a DBlock that |
144 | * can be obtained directly from reading | 144 | * can be obtained directly from reading |
145 | * the plaintext file) | 145 | * the plaintext file) |
146 | */ | 146 | */ |
diff --git a/src/include/gnunet_ats_service.h b/src/include/gnunet_ats_service.h index 618eab0a6..9317ace43 100644 --- a/src/include/gnunet_ats_service.h +++ b/src/include/gnunet_ats_service.h | |||
@@ -25,7 +25,7 @@ | |||
25 | * | 25 | * |
26 | * TODO: | 26 | * TODO: |
27 | * - move GNUNET_TRANSPORT_ATS* in here and rename... | 27 | * - move GNUNET_TRANSPORT_ATS* in here and rename... |
28 | * - extend API to express communication preferences to ATS | 28 | * - extend API to express communication preferences to ATS |
29 | * (to be called DIRECTLY from apps, not from transport/core!) | 29 | * (to be called DIRECTLY from apps, not from transport/core!) |
30 | */ | 30 | */ |
31 | #ifndef GNUNET_ATS_SERVICE_H | 31 | #ifndef GNUNET_ATS_SERVICE_H |
@@ -47,7 +47,7 @@ struct GNUNET_ATS_Handle; | |||
47 | * Signature of a function called by ATS to notify the callee that the | 47 | * Signature of a function called by ATS to notify the callee that the |
48 | * assigned bandwidth or address for a given peer was changed. If the | 48 | * assigned bandwidth or address for a given peer was changed. If the |
49 | * callback is called with address/bandwidth assignments of zero, the | 49 | * callback is called with address/bandwidth assignments of zero, the |
50 | * ATS disconnect function will still be called once the disconnect | 50 | * ATS disconnect function will still be called once the disconnect |
51 | * actually happened. | 51 | * actually happened. |
52 | * | 52 | * |
53 | * @param cls closure | 53 | * @param cls closure |
@@ -99,7 +99,7 @@ GNUNET_ATS_shutdown (struct GNUNET_ATS_Handle *atc); | |||
99 | 99 | ||
100 | 100 | ||
101 | /** | 101 | /** |
102 | * Signature of a function that takes an address suggestion | 102 | * Signature of a function that takes an address suggestion |
103 | * | 103 | * |
104 | * @param cls closure | 104 | * @param cls closure |
105 | * @param peer identity of the new peer | 105 | * @param peer identity of the new peer |
@@ -117,7 +117,7 @@ typedef void (*GNUNET_ATS_AddressSuggestionCallback) (void *cls, | |||
117 | const char *plugin_name, | 117 | const char *plugin_name, |
118 | const void *plugin_addr, | 118 | const void *plugin_addr, |
119 | size_t plugin_addr_len, | 119 | size_t plugin_addr_len, |
120 | struct Session *session, | 120 | struct Session * session, |
121 | struct | 121 | struct |
122 | GNUNET_BANDWIDTH_Value32NBO | 122 | GNUNET_BANDWIDTH_Value32NBO |
123 | bandwidth, | 123 | bandwidth, |
diff --git a/src/include/gnunet_block_lib.h b/src/include/gnunet_block_lib.h index 66b2490c0..01a1ec2fc 100644 --- a/src/include/gnunet_block_lib.h +++ b/src/include/gnunet_block_lib.h | |||
@@ -69,7 +69,7 @@ enum GNUNET_BLOCK_Type | |||
69 | GNUNET_BLOCK_TYPE_FS_SBLOCK = 4, | 69 | GNUNET_BLOCK_TYPE_FS_SBLOCK = 4, |
70 | 70 | ||
71 | /** | 71 | /** |
72 | * Type of a block that is used to advertise a namespace. | 72 | * Type of a block that is used to advertise a namespace. |
73 | */ | 73 | */ |
74 | GNUNET_BLOCK_TYPE_FS_NBLOCK = 5, | 74 | GNUNET_BLOCK_TYPE_FS_NBLOCK = 5, |
75 | 75 | ||
@@ -156,7 +156,7 @@ struct GNUNET_BLOCK_Context; | |||
156 | 156 | ||
157 | /** | 157 | /** |
158 | * Mingle hash with the mingle_number to produce different bits. | 158 | * Mingle hash with the mingle_number to produce different bits. |
159 | * | 159 | * |
160 | * @param in original hash code | 160 | * @param in original hash code |
161 | * @param mingle_number number for hash permutation | 161 | * @param mingle_number number for hash permutation |
162 | * @param hc where to store the result. | 162 | * @param hc where to store the result. |
@@ -188,7 +188,7 @@ GNUNET_BLOCK_context_destroy (struct GNUNET_BLOCK_Context *ctx); | |||
188 | /** | 188 | /** |
189 | * Function called to validate a reply or a request. For | 189 | * Function called to validate a reply or a request. For |
190 | * request evaluation, simply pass "NULL" for the reply_block. | 190 | * request evaluation, simply pass "NULL" for the reply_block. |
191 | * Note that it is assumed that the reply has already been | 191 | * Note that it is assumed that the reply has already been |
192 | * matched to the key (and signatures checked) as it would | 192 | * matched to the key (and signatures checked) as it would |
193 | * be done with the "get_key" function. | 193 | * be done with the "get_key" function. |
194 | * | 194 | * |
@@ -221,7 +221,7 @@ GNUNET_BLOCK_evaluate (struct GNUNET_BLOCK_Context *ctx, | |||
221 | * @param block block to get the key for | 221 | * @param block block to get the key for |
222 | * @param block_size number of bytes in block | 222 | * @param block_size number of bytes in block |
223 | * @param key set to the key (query) for the given block | 223 | * @param key set to the key (query) for the given block |
224 | * @return GNUNET_YES on success, | 224 | * @return GNUNET_YES on success, |
225 | * GNUNET_NO if the block is malformed | 225 | * GNUNET_NO if the block is malformed |
226 | * GNUNET_SYSERR if type not supported | 226 | * GNUNET_SYSERR if type not supported |
227 | * (or if extracting a key from a block of this type does not work) | 227 | * (or if extracting a key from a block of this type does not work) |
diff --git a/src/include/gnunet_block_plugin.h b/src/include/gnunet_block_plugin.h index 6d1f2f103..0ead4afad 100644 --- a/src/include/gnunet_block_plugin.h +++ b/src/include/gnunet_block_plugin.h | |||
@@ -20,7 +20,7 @@ | |||
20 | 20 | ||
21 | /** | 21 | /** |
22 | * @file include/gnunet_block_plugin.h | 22 | * @file include/gnunet_block_plugin.h |
23 | * @brief API for block plugins. Each block plugin must conform to | 23 | * @brief API for block plugins. Each block plugin must conform to |
24 | * the API specified by this header. | 24 | * the API specified by this header. |
25 | * @author Christian Grothoff | 25 | * @author Christian Grothoff |
26 | */ | 26 | */ |
@@ -35,7 +35,7 @@ | |||
35 | /** | 35 | /** |
36 | * Function called to validate a reply or a request. For | 36 | * Function called to validate a reply or a request. For |
37 | * request evaluation, simply pass "NULL" for the reply_block. | 37 | * request evaluation, simply pass "NULL" for the reply_block. |
38 | * Note that it is assumed that the reply has already been | 38 | * Note that it is assumed that the reply has already been |
39 | * matched to the key (and signatures checked) as it would | 39 | * matched to the key (and signatures checked) as it would |
40 | * be done with the "get_key" function. | 40 | * be done with the "get_key" function. |
41 | * | 41 | * |
@@ -81,7 +81,7 @@ typedef enum | |||
81 | * @param block block to get the key for | 81 | * @param block block to get the key for |
82 | * @param block_size number of bytes in block | 82 | * @param block_size number of bytes in block |
83 | * @param key set to the key (query) for the given block | 83 | * @param key set to the key (query) for the given block |
84 | * @return GNUNET_YES on success, | 84 | * @return GNUNET_YES on success, |
85 | * GNUNET_NO if the block is malformed | 85 | * GNUNET_NO if the block is malformed |
86 | * GNUNET_SYSERR if type not supported | 86 | * GNUNET_SYSERR if type not supported |
87 | * (or if extracting a key from a block of this type does not work) | 87 | * (or if extracting a key from a block of this type does not work) |
@@ -112,7 +112,7 @@ struct GNUNET_BLOCK_PluginFunctions | |||
112 | const enum GNUNET_BLOCK_Type *types; | 112 | const enum GNUNET_BLOCK_Type *types; |
113 | 113 | ||
114 | /** | 114 | /** |
115 | * Main function of a block plugin. Allows us to check if a | 115 | * Main function of a block plugin. Allows us to check if a |
116 | * block matches a query. | 116 | * block matches a query. |
117 | */ | 117 | */ |
118 | GNUNET_BLOCK_EvaluationFunction evaluate; | 118 | GNUNET_BLOCK_EvaluationFunction evaluate; |
diff --git a/src/include/gnunet_chat_service.h b/src/include/gnunet_chat_service.h index 5eb0daf3f..938b43423 100644 --- a/src/include/gnunet_chat_service.h +++ b/src/include/gnunet_chat_service.h | |||
@@ -20,7 +20,7 @@ | |||
20 | 20 | ||
21 | /** | 21 | /** |
22 | * @file include/gnunet_chat_service.h | 22 | * @file include/gnunet_chat_service.h |
23 | * @brief API for chatting via GNUnet | 23 | * @brief API for chatting via GNUnet |
24 | * @author Christian Grothoff | 24 | * @author Christian Grothoff |
25 | * @author Nathan Evans | 25 | * @author Nathan Evans |
26 | * @author Vitaly Minko | 26 | * @author Vitaly Minko |
diff --git a/src/include/gnunet_client_lib.h b/src/include/gnunet_client_lib.h index ed033d031..64892de0f 100644 --- a/src/include/gnunet_client_lib.h +++ b/src/include/gnunet_client_lib.h | |||
@@ -163,7 +163,7 @@ GNUNET_CLIENT_notify_transmit_ready (struct GNUNET_CLIENT_Connection *sock, | |||
163 | 163 | ||
164 | /** | 164 | /** |
165 | * Cancel a request for notification. | 165 | * Cancel a request for notification. |
166 | * | 166 | * |
167 | * @param th handle from the original request. | 167 | * @param th handle from the original request. |
168 | */ | 168 | */ |
169 | void | 169 | void |
@@ -188,7 +188,7 @@ GNUNET_CLIENT_notify_transmit_ready_cancel (struct GNUNET_CLIENT_TransmitHandle | |||
188 | * if the caller does not care about temporary connection errors, | 188 | * if the caller does not care about temporary connection errors, |
189 | * for example because the protocol is stateless | 189 | * for example because the protocol is stateless |
190 | * @param rn function to call with the response | 190 | * @param rn function to call with the response |
191 | * @param rn_cls closure for rn | 191 | * @param rn_cls closure for rn |
192 | * @return GNUNET_OK on success, GNUNET_SYSERR if a request | 192 | * @return GNUNET_OK on success, GNUNET_SYSERR if a request |
193 | * is already pending | 193 | * is already pending |
194 | */ | 194 | */ |
diff --git a/src/include/gnunet_common.h b/src/include/gnunet_common.h index 2636824d3..b8a667524 100644 --- a/src/include/gnunet_common.h +++ b/src/include/gnunet_common.h | |||
@@ -235,7 +235,7 @@ GNUNET_logger_remove (GNUNET_Logger logger, void *logger_cls); | |||
235 | * NOT reentrant! | 235 | * NOT reentrant! |
236 | * | 236 | * |
237 | * @param hc the hash code | 237 | * @param hc the hash code |
238 | * @return string | 238 | * @return string |
239 | */ | 239 | */ |
240 | const char * | 240 | const char * |
241 | GNUNET_h2s (const GNUNET_HashCode * hc); | 241 | GNUNET_h2s (const GNUNET_HashCode * hc); |
@@ -368,7 +368,7 @@ GNUNET_htonll (unsigned long long n); | |||
368 | 368 | ||
369 | /** | 369 | /** |
370 | * Allocate and initialize a block of memory. | 370 | * Allocate and initialize a block of memory. |
371 | * | 371 | * |
372 | * @param buf data to initalize the block with | 372 | * @param buf data to initalize the block with |
373 | * @param size the number of bytes in buf (and size of the allocation) | 373 | * @param size the number of bytes in buf (and size of the allocation) |
374 | * @return pointer to size bytes of memory, never NULL (!) | 374 | * @return pointer to size bytes of memory, never NULL (!) |
diff --git a/src/include/gnunet_connection_lib.h b/src/include/gnunet_connection_lib.h index f7a6e5078..7ee3c109d 100644 --- a/src/include/gnunet_connection_lib.h +++ b/src/include/gnunet_connection_lib.h | |||
@@ -232,7 +232,7 @@ GNUNET_CONNECTION_get_address (struct GNUNET_CONNECTION_Handle *sock, | |||
232 | /** | 232 | /** |
233 | * Close the socket and free associated resources. Pending | 233 | * Close the socket and free associated resources. Pending |
234 | * transmissions may be completed or dropped depending on the | 234 | * transmissions may be completed or dropped depending on the |
235 | * arguments. If a receive call is pending and should | 235 | * arguments. If a receive call is pending and should |
236 | * NOT be completed, 'GNUNET_CONNECTION_receive_cancel' | 236 | * NOT be completed, 'GNUNET_CONNECTION_receive_cancel' |
237 | * should be called explicitly first. | 237 | * should be called explicitly first. |
238 | * | 238 | * |
diff --git a/src/include/gnunet_constants.h b/src/include/gnunet_constants.h index da408bf55..190cabbb0 100644 --- a/src/include/gnunet_constants.h +++ b/src/include/gnunet_constants.h | |||
@@ -69,7 +69,7 @@ extern "C" | |||
69 | #define GNUNET_CONSTANTS_EXEC_WAIT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MILLISECONDS, 200) | 69 | #define GNUNET_CONSTANTS_EXEC_WAIT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MILLISECONDS, 200) |
70 | 70 | ||
71 | /** | 71 | /** |
72 | * After how long do we retry a service connection that was | 72 | * After how long do we retry a service connection that was |
73 | * unavailable? Used in cases where an exponential back-off | 73 | * unavailable? Used in cases where an exponential back-off |
74 | * seems inappropriate. | 74 | * seems inappropriate. |
75 | */ | 75 | */ |
@@ -99,13 +99,13 @@ extern "C" | |||
99 | 99 | ||
100 | /** | 100 | /** |
101 | * Size of the 'struct EncryptedMessage' of the core (which | 101 | * Size of the 'struct EncryptedMessage' of the core (which |
102 | * is the per-message overhead of the core). | 102 | * is the per-message overhead of the core). |
103 | */ | 103 | */ |
104 | #define GNUNET_CONSTANTS_CORE_SIZE_ENCRYPTED_MESSAGE (24 + sizeof (GNUNET_HashCode)) | 104 | #define GNUNET_CONSTANTS_CORE_SIZE_ENCRYPTED_MESSAGE (24 + sizeof (GNUNET_HashCode)) |
105 | 105 | ||
106 | /** | 106 | /** |
107 | * Size of the 'struct OutboundMessage' of the transport | 107 | * Size of the 'struct OutboundMessage' of the transport |
108 | * (which, in combination with the | 108 | * (which, in combination with the |
109 | * GNUNET_CONSTANTS_CORE_SIZE_ENCRYPTED_MESSAGE) defines | 109 | * GNUNET_CONSTANTS_CORE_SIZE_ENCRYPTED_MESSAGE) defines |
110 | * the headers that must be pre-pendable to all GNUnet | 110 | * the headers that must be pre-pendable to all GNUnet |
111 | * messages. Taking GNUNET_SERVER_MAX_MESSAGE_SIZE | 111 | * messages. Taking GNUNET_SERVER_MAX_MESSAGE_SIZE |
@@ -123,7 +123,7 @@ extern "C" | |||
123 | * | 123 | * |
124 | * Could theoretically be 64k minus (GNUNET_CONSTANTS_CORE_SIZE_ENCRYPTED_MESSAGE + | 124 | * Could theoretically be 64k minus (GNUNET_CONSTANTS_CORE_SIZE_ENCRYPTED_MESSAGE + |
125 | * GNUNET_CONSTANTS_TRANSPORT_SIZE_OUTBOUND_MESSAGE), but we're going | 125 | * GNUNET_CONSTANTS_TRANSPORT_SIZE_OUTBOUND_MESSAGE), but we're going |
126 | * to be more conservative for now. | 126 | * to be more conservative for now. |
127 | */ | 127 | */ |
128 | #define GNUNET_CONSTANTS_MAX_ENCRYPTED_MESSAGE_SIZE (63 * 1024) | 128 | #define GNUNET_CONSTANTS_MAX_ENCRYPTED_MESSAGE_SIZE (63 * 1024) |
129 | 129 | ||
diff --git a/src/include/gnunet_container_lib.h b/src/include/gnunet_container_lib.h index cad85d016..0c7f60a7a 100644 --- a/src/include/gnunet_container_lib.h +++ b/src/include/gnunet_container_lib.h | |||
@@ -239,7 +239,7 @@ struct GNUNET_CONTAINER_MetaData; | |||
239 | 239 | ||
240 | /** | 240 | /** |
241 | * Create a fresh MetaData token. | 241 | * Create a fresh MetaData token. |
242 | * | 242 | * |
243 | * @return empty meta-data container | 243 | * @return empty meta-data container |
244 | */ | 244 | */ |
245 | struct GNUNET_CONTAINER_MetaData * | 245 | struct GNUNET_CONTAINER_MetaData * |
@@ -247,7 +247,7 @@ GNUNET_CONTAINER_meta_data_create (void); | |||
247 | 247 | ||
248 | /** | 248 | /** |
249 | * Duplicate a MetaData token. | 249 | * Duplicate a MetaData token. |
250 | * | 250 | * |
251 | * @param md what to duplicate | 251 | * @param md what to duplicate |
252 | * @return duplicate meta-data container | 252 | * @return duplicate meta-data container |
253 | */ | 253 | */ |
@@ -289,7 +289,7 @@ GNUNET_CONTAINER_meta_data_test_equal (const struct GNUNET_CONTAINER_MetaData | |||
289 | * used in the main libextractor library and yielding | 289 | * used in the main libextractor library and yielding |
290 | * meta data). | 290 | * meta data). |
291 | * @param type libextractor-type describing the meta data | 291 | * @param type libextractor-type describing the meta data |
292 | * @param format basic format information about data | 292 | * @param format basic format information about data |
293 | * @param data_mime_type mime-type of data (not of the original file); | 293 | * @param data_mime_type mime-type of data (not of the original file); |
294 | * can be NULL (if mime-type is not known) | 294 | * can be NULL (if mime-type is not known) |
295 | * @param data actual meta-data found | 295 | * @param data actual meta-data found |
@@ -999,7 +999,7 @@ GNUNET_CONTAINER_heap_remove_root (struct GNUNET_CONTAINER_Heap *heap); | |||
999 | 999 | ||
1000 | /** | 1000 | /** |
1001 | * Removes a node from the heap. | 1001 | * Removes a node from the heap. |
1002 | * | 1002 | * |
1003 | * @param node node to remove | 1003 | * @param node node to remove |
1004 | * @return element data stored at the node, NULL if heap is empty | 1004 | * @return element data stored at the node, NULL if heap is empty |
1005 | */ | 1005 | */ |
@@ -1047,12 +1047,12 @@ enum GNUNET_CONTAINER_SListDisposition | |||
1047 | 1047 | ||
1048 | 1048 | ||
1049 | /** | 1049 | /** |
1050 | * Handle to a singly linked list | 1050 | * Handle to a singly linked list |
1051 | */ | 1051 | */ |
1052 | struct GNUNET_CONTAINER_SList; | 1052 | struct GNUNET_CONTAINER_SList; |
1053 | 1053 | ||
1054 | /** | 1054 | /** |
1055 | * Handle to a singly linked list iterator | 1055 | * Handle to a singly linked list iterator |
1056 | */ | 1056 | */ |
1057 | struct GNUNET_CONTAINER_SList_Iterator; | 1057 | struct GNUNET_CONTAINER_SList_Iterator; |
1058 | 1058 | ||
diff --git a/src/include/gnunet_core_service.h b/src/include/gnunet_core_service.h index 083276804..0fcff6d6f 100644 --- a/src/include/gnunet_core_service.h +++ b/src/include/gnunet_core_service.h | |||
@@ -201,7 +201,7 @@ typedef void (*GNUNET_CORE_StartupCallback) (void *cls, | |||
201 | * can be used to improve efficiency, ignored if inbound_notify is NULL | 201 | * can be used to improve efficiency, ignored if inbound_notify is NULL |
202 | * note that the core is allowed to drop notifications about inbound | 202 | * note that the core is allowed to drop notifications about inbound |
203 | * messages if the client does not process them fast enough (for this | 203 | * messages if the client does not process them fast enough (for this |
204 | * notification type, a bounded queue is used) | 204 | * notification type, a bounded queue is used) |
205 | * @param outbound_notify function to call for all outbound messages, can be NULL; | 205 | * @param outbound_notify function to call for all outbound messages, can be NULL; |
206 | * note that the core is allowed to drop notifications about outbound | 206 | * note that the core is allowed to drop notifications about outbound |
207 | * messages if the client does not process them fast enough (for this | 207 | * messages if the client does not process them fast enough (for this |
@@ -234,7 +234,7 @@ GNUNET_CORE_connect (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
234 | 234 | ||
235 | 235 | ||
236 | /** | 236 | /** |
237 | * Disconnect from the core service. This function can only | 237 | * Disconnect from the core service. This function can only |
238 | * be called *after* all pending 'GNUNET_CORE_notify_transmit_ready' | 238 | * be called *after* all pending 'GNUNET_CORE_notify_transmit_ready' |
239 | * requests have been explicitly cancelled. | 239 | * requests have been explicitly cancelled. |
240 | * | 240 | * |
@@ -371,7 +371,7 @@ GNUNET_CORE_peer_change_preference (struct GNUNET_CORE_Handle *h, | |||
371 | /** | 371 | /** |
372 | * Cancel request for getting information about a peer. | 372 | * Cancel request for getting information about a peer. |
373 | * Note that an eventual change in preference, trust or bandwidth | 373 | * Note that an eventual change in preference, trust or bandwidth |
374 | * assignment MAY have already been committed at the time, | 374 | * assignment MAY have already been committed at the time, |
375 | * so cancelling a request is NOT sure to undo the original | 375 | * so cancelling a request is NOT sure to undo the original |
376 | * request. The original request may or may not still commit. | 376 | * request. The original request may or may not still commit. |
377 | * The only thing cancellation ensures is that the callback | 377 | * The only thing cancellation ensures is that the callback |
@@ -429,7 +429,7 @@ struct GNUNET_CORE_TransmitHandle; | |||
429 | * given number of bytes to the specified "target". Must only be | 429 | * given number of bytes to the specified "target". Must only be |
430 | * called after a connection to the respective peer has been | 430 | * called after a connection to the respective peer has been |
431 | * established (and the client has been informed about this). | 431 | * established (and the client has been informed about this). |
432 | * | 432 | * |
433 | * | 433 | * |
434 | * @param handle connection to core service | 434 | * @param handle connection to core service |
435 | * @param cork is corking allowed for this transmission? | 435 | * @param cork is corking allowed for this transmission? |
diff --git a/src/include/gnunet_crypto_lib.h b/src/include/gnunet_crypto_lib.h index d5a1685d1..f97b351c9 100644 --- a/src/include/gnunet_crypto_lib.h +++ b/src/include/gnunet_crypto_lib.h | |||
@@ -247,7 +247,7 @@ GNUNET_CRYPTO_random_u32 (enum GNUNET_CRYPTO_Quality mode, uint32_t i); | |||
247 | 247 | ||
248 | 248 | ||
249 | /** | 249 | /** |
250 | * Random on unsigned 64-bit values. | 250 | * Random on unsigned 64-bit values. |
251 | * | 251 | * |
252 | * @param mode desired quality of the random number | 252 | * @param mode desired quality of the random number |
253 | * @param max value returned will be in range [0,max) (exclusive) | 253 | * @param max value returned will be in range [0,max) (exclusive) |
@@ -471,7 +471,7 @@ GNUNET_CRYPTO_hash_create_random (enum GNUNET_CRYPTO_Quality mode, | |||
471 | * | 471 | * |
472 | * @param a some hash code | 472 | * @param a some hash code |
473 | * @param b some hash code | 473 | * @param b some hash code |
474 | * @param result set to b - a | 474 | * @param result set to b - a |
475 | */ | 475 | */ |
476 | void | 476 | void |
477 | GNUNET_CRYPTO_hash_difference (const GNUNET_HashCode * a, | 477 | GNUNET_CRYPTO_hash_difference (const GNUNET_HashCode * a, |
@@ -497,7 +497,7 @@ GNUNET_CRYPTO_hash_sum (const GNUNET_HashCode * a, | |||
497 | * | 497 | * |
498 | * @param a some hash code | 498 | * @param a some hash code |
499 | * @param b some hash code | 499 | * @param b some hash code |
500 | * @param result set to a ^ b | 500 | * @param result set to a ^ b |
501 | */ | 501 | */ |
502 | void | 502 | void |
503 | GNUNET_CRYPTO_hash_xor (const GNUNET_HashCode * a, const GNUNET_HashCode * b, | 503 | GNUNET_CRYPTO_hash_xor (const GNUNET_HashCode * a, const GNUNET_HashCode * b, |
@@ -693,7 +693,7 @@ GNUNET_CRYPTO_rsa_decode_key (const char *buf, uint16_t len); | |||
693 | * files does not exist, create a new key and write it to the | 693 | * files does not exist, create a new key and write it to the |
694 | * file. Caller must free return value. Note that this function | 694 | * file. Caller must free return value. Note that this function |
695 | * can not guarantee that another process might not be trying | 695 | * can not guarantee that another process might not be trying |
696 | * the same operation on the same file at the same time. | 696 | * the same operation on the same file at the same time. |
697 | * If the contents of the file | 697 | * If the contents of the file |
698 | * are invalid the old file is deleted and a fresh key is | 698 | * are invalid the old file is deleted and a fresh key is |
699 | * created. | 699 | * created. |
@@ -807,7 +807,7 @@ GNUNET_CRYPTO_rsa_verify (uint32_t purpose, | |||
807 | /** | 807 | /** |
808 | * This function should only be called in testcases | 808 | * This function should only be called in testcases |
809 | * where strong entropy gathering is not desired | 809 | * where strong entropy gathering is not desired |
810 | * (for example, for hostkey generation). | 810 | * (for example, for hostkey generation). |
811 | */ | 811 | */ |
812 | void | 812 | void |
813 | GNUNET_CRYPTO_random_disable_entropy_gathering (void); | 813 | GNUNET_CRYPTO_random_disable_entropy_gathering (void); |
diff --git a/src/include/gnunet_datacache_plugin.h b/src/include/gnunet_datacache_plugin.h index 6868d6b76..fbfcdf1e8 100644 --- a/src/include/gnunet_datacache_plugin.h +++ b/src/include/gnunet_datacache_plugin.h | |||
@@ -40,7 +40,7 @@ extern "C" | |||
40 | /** | 40 | /** |
41 | * Function called by plugins to notify the datacache | 41 | * Function called by plugins to notify the datacache |
42 | * about content deletions. | 42 | * about content deletions. |
43 | * | 43 | * |
44 | * @param cls closure | 44 | * @param cls closure |
45 | * @param key key of the content that was deleted | 45 | * @param key key of the content that was deleted |
46 | * @param size number of bytes that were made available | 46 | * @param size number of bytes that were made available |
@@ -133,7 +133,7 @@ struct GNUNET_DATACACHE_PluginFunctions | |||
133 | /** | 133 | /** |
134 | * Delete the entry with the lowest expiration value | 134 | * Delete the entry with the lowest expiration value |
135 | * from the datacache right now. | 135 | * from the datacache right now. |
136 | * | 136 | * |
137 | * @param cls closure (internal context for the plugin) | 137 | * @param cls closure (internal context for the plugin) |
138 | * @return GNUNET_OK on success, GNUNET_SYSERR on error | 138 | * @return GNUNET_OK on success, GNUNET_SYSERR on error |
139 | */ | 139 | */ |
diff --git a/src/include/gnunet_datastore_plugin.h b/src/include/gnunet_datastore_plugin.h index b0aa0c6c9..fb1dff51d 100644 --- a/src/include/gnunet_datastore_plugin.h +++ b/src/include/gnunet_datastore_plugin.h | |||
@@ -45,7 +45,7 @@ | |||
45 | * changes. | 45 | * changes. |
46 | * | 46 | * |
47 | * @param cls closure | 47 | * @param cls closure |
48 | * @param delta change in disk utilization, | 48 | * @param delta change in disk utilization, |
49 | * 0 for "reset to empty" | 49 | * 0 for "reset to empty" |
50 | */ | 50 | */ |
51 | typedef void (*DiskUtilizationChange) (void *cls, int delta); | 51 | typedef void (*DiskUtilizationChange) (void *cls, int delta); |
@@ -138,7 +138,7 @@ typedef int (*PluginPut) (void *cls, const GNUNET_HashCode * key, uint32_t size, | |||
138 | * Get one of the results for a particular key in the datastore. | 138 | * Get one of the results for a particular key in the datastore. |
139 | * | 139 | * |
140 | * @param cls closure | 140 | * @param cls closure |
141 | * @param offset offset of the result (modulo num-results); | 141 | * @param offset offset of the result (modulo num-results); |
142 | * specific ordering does not matter for the offset | 142 | * specific ordering does not matter for the offset |
143 | * @param key key to match, never NULL | 143 | * @param key key to match, never NULL |
144 | * @param vhash hash of the value, maybe NULL (to | 144 | * @param vhash hash of the value, maybe NULL (to |
@@ -148,7 +148,7 @@ typedef int (*PluginPut) (void *cls, const GNUNET_HashCode * key, uint32_t size, | |||
148 | * there may be! | 148 | * there may be! |
149 | * @param type entries of which type are relevant? | 149 | * @param type entries of which type are relevant? |
150 | * Use 0 for any type. | 150 | * Use 0 for any type. |
151 | * @param proc function to call on the matching value; | 151 | * @param proc function to call on the matching value; |
152 | * proc should be called with NULL if there is no result | 152 | * proc should be called with NULL if there is no result |
153 | * @param proc_cls closure for proc | 153 | * @param proc_cls closure for proc |
154 | */ | 154 | */ |
@@ -203,10 +203,10 @@ typedef int (*PluginUpdate) (void *cls, uint64_t uid, int delta, | |||
203 | 203 | ||
204 | /** | 204 | /** |
205 | * Select a single item from the datastore at the specified offset | 205 | * Select a single item from the datastore at the specified offset |
206 | * (among those applicable). | 206 | * (among those applicable). |
207 | * | 207 | * |
208 | * @param cls closure | 208 | * @param cls closure |
209 | * @param offset offset of the result (modulo num-results); | 209 | * @param offset offset of the result (modulo num-results); |
210 | * specific ordering does not matter for the offset | 210 | * specific ordering does not matter for the offset |
211 | * @param type entries of which type should be considered? | 211 | * @param type entries of which type should be considered? |
212 | * Must not be zero (ANY). | 212 | * Must not be zero (ANY). |
diff --git a/src/include/gnunet_datastore_service.h b/src/include/gnunet_datastore_service.h index 3d2cc35c9..03ec9117c 100644 --- a/src/include/gnunet_datastore_service.h +++ b/src/include/gnunet_datastore_service.h | |||
@@ -371,7 +371,7 @@ GNUNET_DATASTORE_get_for_replication (struct GNUNET_DATASTORE_Handle *h, | |||
371 | /** | 371 | /** |
372 | * Cancel a datastore operation. The final callback from the | 372 | * Cancel a datastore operation. The final callback from the |
373 | * operation must not have been done yet. | 373 | * operation must not have been done yet. |
374 | * | 374 | * |
375 | * @param qe operation to cancel | 375 | * @param qe operation to cancel |
376 | */ | 376 | */ |
377 | void | 377 | void |
diff --git a/src/include/gnunet_disk_lib.h b/src/include/gnunet_disk_lib.h index abca17370..5f6a37840 100644 --- a/src/include/gnunet_disk_lib.h +++ b/src/include/gnunet_disk_lib.h | |||
@@ -103,37 +103,37 @@ enum GNUNET_DISK_OpenFlags | |||
103 | { | 103 | { |
104 | 104 | ||
105 | /** | 105 | /** |
106 | * Open the file for reading | 106 | * Open the file for reading |
107 | */ | 107 | */ |
108 | GNUNET_DISK_OPEN_READ = 1, | 108 | GNUNET_DISK_OPEN_READ = 1, |
109 | 109 | ||
110 | /** | 110 | /** |
111 | * Open the file for writing | 111 | * Open the file for writing |
112 | */ | 112 | */ |
113 | GNUNET_DISK_OPEN_WRITE = 2, | 113 | GNUNET_DISK_OPEN_WRITE = 2, |
114 | 114 | ||
115 | /** | 115 | /** |
116 | * Open the file for both reading and writing | 116 | * Open the file for both reading and writing |
117 | */ | 117 | */ |
118 | GNUNET_DISK_OPEN_READWRITE = 3, | 118 | GNUNET_DISK_OPEN_READWRITE = 3, |
119 | 119 | ||
120 | /** | 120 | /** |
121 | * Fail if file already exists | 121 | * Fail if file already exists |
122 | */ | 122 | */ |
123 | GNUNET_DISK_OPEN_FAILIFEXISTS = 4, | 123 | GNUNET_DISK_OPEN_FAILIFEXISTS = 4, |
124 | 124 | ||
125 | /** | 125 | /** |
126 | * Truncate file if it exists | 126 | * Truncate file if it exists |
127 | */ | 127 | */ |
128 | GNUNET_DISK_OPEN_TRUNCATE = 8, | 128 | GNUNET_DISK_OPEN_TRUNCATE = 8, |
129 | 129 | ||
130 | /** | 130 | /** |
131 | * Create file if it doesn't exist | 131 | * Create file if it doesn't exist |
132 | */ | 132 | */ |
133 | GNUNET_DISK_OPEN_CREATE = 16, | 133 | GNUNET_DISK_OPEN_CREATE = 16, |
134 | 134 | ||
135 | /** | 135 | /** |
136 | * Append to the file | 136 | * Append to the file |
137 | */ | 137 | */ |
138 | GNUNET_DISK_OPEN_APPEND = 32 | 138 | GNUNET_DISK_OPEN_APPEND = 32 |
139 | }; | 139 | }; |
@@ -342,7 +342,7 @@ GNUNET_DISK_file_get_identifiers (const char *filename, uint64_t * dev, | |||
342 | * an absolute path, the current 'TMPDIR' will be prepended. In any case, | 342 | * an absolute path, the current 'TMPDIR' will be prepended. In any case, |
343 | * 6 random characters will be appended to the name to create a unique | 343 | * 6 random characters will be appended to the name to create a unique |
344 | * filename. | 344 | * filename. |
345 | * | 345 | * |
346 | * @param t component to use for the name; | 346 | * @param t component to use for the name; |
347 | * does NOT contain "XXXXXX" or "/tmp/". | 347 | * does NOT contain "XXXXXX" or "/tmp/". |
348 | * @return NULL on error, otherwise name of fresh | 348 | * @return NULL on error, otherwise name of fresh |
@@ -463,7 +463,7 @@ GNUNET_DISK_file_write (const struct GNUNET_DISK_FileHandle *h, | |||
463 | * @param fn file name | 463 | * @param fn file name |
464 | * @param buffer the data to write | 464 | * @param buffer the data to write |
465 | * @param n number of bytes to write | 465 | * @param n number of bytes to write |
466 | * @param mode file permissions | 466 | * @param mode file permissions |
467 | * @return number of bytes written on success, GNUNET_SYSERR on error | 467 | * @return number of bytes written on success, GNUNET_SYSERR on error |
468 | */ | 468 | */ |
469 | ssize_t | 469 | ssize_t |
diff --git a/src/include/gnunet_fragmentation_lib.h b/src/include/gnunet_fragmentation_lib.h index 06022e093..a953bd2b1 100644 --- a/src/include/gnunet_fragmentation_lib.h +++ b/src/include/gnunet_fragmentation_lib.h | |||
@@ -154,7 +154,7 @@ typedef void (*GNUNET_DEFRAGMENT_AckProcessor) (void *cls, uint32_t id, | |||
154 | * Create a defragmentation context. | 154 | * Create a defragmentation context. |
155 | * | 155 | * |
156 | * @param stats statistics context | 156 | * @param stats statistics context |
157 | * @param mtu the maximum message size for each fragment | 157 | * @param mtu the maximum message size for each fragment |
158 | * @param num_msgs how many fragmented messages | 158 | * @param num_msgs how many fragmented messages |
159 | * to we defragment at most at the same time? | 159 | * to we defragment at most at the same time? |
160 | * @param cls closure for proc and ackp | 160 | * @param cls closure for proc and ackp |
diff --git a/src/include/gnunet_fs_service.h b/src/include/gnunet_fs_service.h index e8026a66f..7bfb15ac0 100644 --- a/src/include/gnunet_fs_service.h +++ b/src/include/gnunet_fs_service.h | |||
@@ -19,7 +19,7 @@ | |||
19 | */ | 19 | */ |
20 | /** | 20 | /** |
21 | * @file include/gnunet_fs_service.h | 21 | * @file include/gnunet_fs_service.h |
22 | * @brief API for file-sharing via GNUnet | 22 | * @brief API for file-sharing via GNUnet |
23 | * @author Christian Grothoff | 23 | * @author Christian Grothoff |
24 | */ | 24 | */ |
25 | #ifndef GNUNET_FS_LIB_H | 25 | #ifndef GNUNET_FS_LIB_H |
@@ -105,7 +105,7 @@ GNUNET_FS_uri_to_string (const struct GNUNET_FS_Uri *uri); | |||
105 | * Convert keyword URI to a human readable format | 105 | * Convert keyword URI to a human readable format |
106 | * (i.e. the search query that was used in the first place) | 106 | * (i.e. the search query that was used in the first place) |
107 | * | 107 | * |
108 | * @param uri ksk uri to convert to a string | 108 | * @param uri ksk uri to convert to a string |
109 | * @return string with the keywords | 109 | * @return string with the keywords |
110 | */ | 110 | */ |
111 | char * | 111 | char * |
@@ -232,7 +232,7 @@ GNUNET_FS_uri_loc_create (const struct GNUNET_FS_Uri *baseUri, | |||
232 | * as decapitalization and removal of certain characters. | 232 | * as decapitalization and removal of certain characters. |
233 | * (useful for search). | 233 | * (useful for search). |
234 | * | 234 | * |
235 | * @param uri the URI to canonicalize | 235 | * @param uri the URI to canonicalize |
236 | * @return canonicalized version of the URI, NULL on error | 236 | * @return canonicalized version of the URI, NULL on error |
237 | */ | 237 | */ |
238 | struct GNUNET_FS_Uri * | 238 | struct GNUNET_FS_Uri * |
@@ -490,13 +490,13 @@ GNUNET_FS_getopt_set_metadata (struct GNUNET_GETOPT_CommandLineProcessorContext | |||
490 | 490 | ||
491 | 491 | ||
492 | /** | 492 | /** |
493 | * Possible status codes used in the callback for the | 493 | * Possible status codes used in the callback for the |
494 | * various file-sharing operations. On each file (or search), | 494 | * various file-sharing operations. On each file (or search), |
495 | * the callback is guaranteed to be called once with "START" | 495 | * the callback is guaranteed to be called once with "START" |
496 | * and once with STOPPED; calls with PROGRESS, ERROR or COMPLETED | 496 | * and once with STOPPED; calls with PROGRESS, ERROR or COMPLETED |
497 | * are optional and depend on the circumstances; parent operations | 497 | * are optional and depend on the circumstances; parent operations |
498 | * will be STARTED before child-operations and STOPPED after | 498 | * will be STARTED before child-operations and STOPPED after |
499 | * their respective child-operations. START and STOP signals | 499 | * their respective child-operations. START and STOP signals |
500 | * are typically generated either due to explicit client requests | 500 | * are typically generated either due to explicit client requests |
501 | * or because of suspend/resume operations. | 501 | * or because of suspend/resume operations. |
502 | */ | 502 | */ |
@@ -602,7 +602,7 @@ enum GNUNET_FS_Status | |||
602 | GNUNET_FS_STATUS_DOWNLOAD_LOST_PARENT, | 602 | GNUNET_FS_STATUS_DOWNLOAD_LOST_PARENT, |
603 | 603 | ||
604 | /** | 604 | /** |
605 | * First event generated when a client requests | 605 | * First event generated when a client requests |
606 | * a search to begin or when a namespace result | 606 | * a search to begin or when a namespace result |
607 | * automatically triggers the search for updates. | 607 | * automatically triggers the search for updates. |
608 | */ | 608 | */ |
@@ -807,7 +807,7 @@ struct GNUNET_FS_ProgressInfo | |||
807 | /** | 807 | /** |
808 | * How large is the file overall? For directories, | 808 | * How large is the file overall? For directories, |
809 | * this is only the size of the directory itself, | 809 | * this is only the size of the directory itself, |
810 | * not of the other files contained within the | 810 | * not of the other files contained within the |
811 | * directory. | 811 | * directory. |
812 | */ | 812 | */ |
813 | uint64_t size; | 813 | uint64_t size; |
@@ -864,7 +864,7 @@ struct GNUNET_FS_ProgressInfo | |||
864 | uint64_t data_len; | 864 | uint64_t data_len; |
865 | 865 | ||
866 | /** | 866 | /** |
867 | * Depth of the given block in the tree; | 867 | * Depth of the given block in the tree; |
868 | * 0 would be the lowest level (DBLOCKs). | 868 | * 0 would be the lowest level (DBLOCKs). |
869 | */ | 869 | */ |
870 | unsigned int depth; | 870 | unsigned int depth; |
@@ -950,7 +950,7 @@ struct GNUNET_FS_ProgressInfo | |||
950 | /** | 950 | /** |
951 | * Client context pointer for the associated search operation | 951 | * Client context pointer for the associated search operation |
952 | * (specifically, context pointer for the specific search | 952 | * (specifically, context pointer for the specific search |
953 | * result, not the overall search); only set if this | 953 | * result, not the overall search); only set if this |
954 | * download was started from a search result. | 954 | * download was started from a search result. |
955 | */ | 955 | */ |
956 | void *sctx; | 956 | void *sctx; |
@@ -1031,7 +1031,7 @@ struct GNUNET_FS_ProgressInfo | |||
1031 | uint64_t data_len; | 1031 | uint64_t data_len; |
1032 | 1032 | ||
1033 | /** | 1033 | /** |
1034 | * Depth of the given block in the tree; | 1034 | * Depth of the given block in the tree; |
1035 | * 0 would be the lowest level (DBLOCKS). | 1035 | * 0 would be the lowest level (DBLOCKS). |
1036 | */ | 1036 | */ |
1037 | unsigned int depth; | 1037 | unsigned int depth; |
@@ -1266,7 +1266,7 @@ struct GNUNET_FS_ProgressInfo | |||
1266 | * These values are only valid for | 1266 | * These values are only valid for |
1267 | * GNUNET_FS_STATUS_SEARCH_RESULT_SUSPEND events. | 1267 | * GNUNET_FS_STATUS_SEARCH_RESULT_SUSPEND events. |
1268 | * These events are automatically triggered for | 1268 | * These events are automatically triggered for |
1269 | * each search result before the | 1269 | * each search result before the |
1270 | * GNUNET_FS_STATUS_SEARCH_SUSPEND event. This | 1270 | * GNUNET_FS_STATUS_SEARCH_SUSPEND event. This |
1271 | * happens primarily to give the client a chance | 1271 | * happens primarily to give the client a chance |
1272 | * to clean up the "cctx" (if needed). | 1272 | * to clean up the "cctx" (if needed). |
@@ -1296,7 +1296,7 @@ struct GNUNET_FS_ProgressInfo | |||
1296 | * These values are only valid for | 1296 | * These values are only valid for |
1297 | * GNUNET_FS_STATUS_SEARCH_RESULT_STOPPED events. | 1297 | * GNUNET_FS_STATUS_SEARCH_RESULT_STOPPED events. |
1298 | * These events are automatically triggered for | 1298 | * These events are automatically triggered for |
1299 | * each search result before the | 1299 | * each search result before the |
1300 | * GNUNET_FS_STATUS_SEARCH_STOPPED event. This | 1300 | * GNUNET_FS_STATUS_SEARCH_STOPPED event. This |
1301 | * happens primarily to give the client a chance | 1301 | * happens primarily to give the client a chance |
1302 | * to clean up the "cctx" (if needed). | 1302 | * to clean up the "cctx" (if needed). |
@@ -1468,7 +1468,7 @@ struct GNUNET_FS_ProgressInfo | |||
1468 | uint64_t data_len; | 1468 | uint64_t data_len; |
1469 | 1469 | ||
1470 | /** | 1470 | /** |
1471 | * Depth of the given block in the tree; | 1471 | * Depth of the given block in the tree; |
1472 | * 0 would be the lowest level (DBLOCKS). | 1472 | * 0 would be the lowest level (DBLOCKS). |
1473 | */ | 1473 | */ |
1474 | unsigned int depth; | 1474 | unsigned int depth; |
@@ -1518,9 +1518,9 @@ struct GNUNET_FS_ProgressInfo | |||
1518 | 1518 | ||
1519 | 1519 | ||
1520 | /** | 1520 | /** |
1521 | * Notification of FS to a client about the progress of an | 1521 | * Notification of FS to a client about the progress of an |
1522 | * operation. Callbacks of this type will be used for uploads, | 1522 | * operation. Callbacks of this type will be used for uploads, |
1523 | * downloads and searches. Some of the arguments depend a bit | 1523 | * downloads and searches. Some of the arguments depend a bit |
1524 | * in their meaning on the context in which the callback is used. | 1524 | * in their meaning on the context in which the callback is used. |
1525 | * | 1525 | * |
1526 | * @param cls closure | 1526 | * @param cls closure |
@@ -1661,7 +1661,7 @@ struct GNUNET_FS_Handle; | |||
1661 | * Setup a connection to the file-sharing service. | 1661 | * Setup a connection to the file-sharing service. |
1662 | * | 1662 | * |
1663 | * @param cfg configuration to use | 1663 | * @param cfg configuration to use |
1664 | * @param client_name unique identifier for this client | 1664 | * @param client_name unique identifier for this client |
1665 | * @param upcb function to call to notify about FS actions | 1665 | * @param upcb function to call to notify about FS actions |
1666 | * @param upcb_cls closure for upcb | 1666 | * @param upcb_cls closure for upcb |
1667 | * @param flags specific attributes for fs-operations | 1667 | * @param flags specific attributes for fs-operations |
@@ -1806,7 +1806,7 @@ GNUNET_FS_file_information_create_from_data (struct GNUNET_FS_Handle *h, | |||
1806 | * @param offset offset to read from; it is possible | 1806 | * @param offset offset to read from; it is possible |
1807 | * that the caller might need to go backwards | 1807 | * that the caller might need to go backwards |
1808 | * a bit at times | 1808 | * a bit at times |
1809 | * @param max maximum number of bytes that should be | 1809 | * @param max maximum number of bytes that should be |
1810 | * copied to buf; readers are not allowed | 1810 | * copied to buf; readers are not allowed |
1811 | * to provide less data unless there is an error; | 1811 | * to provide less data unless there is an error; |
1812 | * a value of "0" will be used at the end to allow | 1812 | * a value of "0" will be used at the end to allow |
@@ -1825,7 +1825,7 @@ typedef size_t (*GNUNET_FS_DataReader) (void *cls, uint64_t offset, size_t max, | |||
1825 | * @param h handle to the file sharing subsystem | 1825 | * @param h handle to the file sharing subsystem |
1826 | * @param client_info initial client-info value for this entry | 1826 | * @param client_info initial client-info value for this entry |
1827 | * @param length length of the file | 1827 | * @param length length of the file |
1828 | * @param reader function that can be used to obtain the data for the file | 1828 | * @param reader function that can be used to obtain the data for the file |
1829 | * @param reader_cls closure for "reader" | 1829 | * @param reader_cls closure for "reader" |
1830 | * @param keywords under which keywords should this file be available | 1830 | * @param keywords under which keywords should this file be available |
1831 | * directly; can be NULL | 1831 | * directly; can be NULL |
@@ -1855,7 +1855,7 @@ GNUNET_FS_file_information_create_from_reader (struct GNUNET_FS_Handle *h, | |||
1855 | * for each entry in the directory. | 1855 | * for each entry in the directory. |
1856 | * | 1856 | * |
1857 | * @param cls closure | 1857 | * @param cls closure |
1858 | * @param filename name of the file (including path); must end | 1858 | * @param filename name of the file (including path); must end |
1859 | * in a "/" (even on W32) if this is a directory | 1859 | * in a "/" (even on W32) if this is a directory |
1860 | * @param fi information about the file (should not be | 1860 | * @param fi information about the file (should not be |
1861 | * used henceforth by the caller) | 1861 | * used henceforth by the caller) |
@@ -1866,7 +1866,7 @@ typedef void (*GNUNET_FS_FileProcessor) (void *cls, const char *filename, | |||
1866 | 1866 | ||
1867 | /** | 1867 | /** |
1868 | * Type of a function that will be used to scan a directory. | 1868 | * Type of a function that will be used to scan a directory. |
1869 | * | 1869 | * |
1870 | * @param cls closure | 1870 | * @param cls closure |
1871 | * @param h handle to the file sharing subsystem | 1871 | * @param h handle to the file sharing subsystem |
1872 | * @param dirname name of the directory to scan | 1872 | * @param dirname name of the directory to scan |
@@ -1991,7 +1991,7 @@ GNUNET_FS_file_information_is_directory (const struct GNUNET_FS_FileInformation | |||
1991 | * | 1991 | * |
1992 | * @param dir the directory | 1992 | * @param dir the directory |
1993 | * @param ent the entry to add; the entry must not have been | 1993 | * @param ent the entry to add; the entry must not have been |
1994 | * added to any other directory at this point and | 1994 | * added to any other directory at this point and |
1995 | * must not include "dir" in its structure | 1995 | * must not include "dir" in its structure |
1996 | * @return GNUNET_OK on success, GNUNET_SYSERR on error | 1996 | * @return GNUNET_OK on success, GNUNET_SYSERR on error |
1997 | */ | 1997 | */ |
@@ -2062,9 +2062,9 @@ enum GNUNET_FS_PublishOptions | |||
2062 | * @param namespace namespace to publish the file in, NULL for no namespace | 2062 | * @param namespace namespace to publish the file in, NULL for no namespace |
2063 | * @param nid identifier to use for the publishd content in the namespace | 2063 | * @param nid identifier to use for the publishd content in the namespace |
2064 | * (can be NULL, must be NULL if namespace is NULL) | 2064 | * (can be NULL, must be NULL if namespace is NULL) |
2065 | * @param nuid update-identifier that will be used for future updates | 2065 | * @param nuid update-identifier that will be used for future updates |
2066 | * (can be NULL, must be NULL if namespace or nid is NULL) | 2066 | * (can be NULL, must be NULL if namespace or nid is NULL) |
2067 | * @param options options for the publication | 2067 | * @param options options for the publication |
2068 | * @return context that can be used to control the publish operation | 2068 | * @return context that can be used to control the publish operation |
2069 | */ | 2069 | */ |
2070 | struct GNUNET_FS_PublishContext * | 2070 | struct GNUNET_FS_PublishContext * |
@@ -2076,7 +2076,7 @@ GNUNET_FS_publish_start (struct GNUNET_FS_Handle *h, | |||
2076 | 2076 | ||
2077 | 2077 | ||
2078 | /** | 2078 | /** |
2079 | * Stop a publication. Will abort incomplete publications (but | 2079 | * Stop a publication. Will abort incomplete publications (but |
2080 | * not remove blocks that have already been published) or | 2080 | * not remove blocks that have already been published) or |
2081 | * simply clean up the state for completed publications. | 2081 | * simply clean up the state for completed publications. |
2082 | * Must NOT be called from within the event callback! | 2082 | * Must NOT be called from within the event callback! |
@@ -2183,7 +2183,7 @@ GNUNET_FS_get_indexed_files (struct GNUNET_FS_Handle *h, | |||
2183 | * @param h handle to the file sharing subsystem | 2183 | * @param h handle to the file sharing subsystem |
2184 | * @param filename file to unindex | 2184 | * @param filename file to unindex |
2185 | * @param cctx initial value for the client context | 2185 | * @param cctx initial value for the client context |
2186 | * @return NULL on error, otherwise handle | 2186 | * @return NULL on error, otherwise handle |
2187 | */ | 2187 | */ |
2188 | struct GNUNET_FS_UnindexContext * | 2188 | struct GNUNET_FS_UnindexContext * |
2189 | GNUNET_FS_unindex_start (struct GNUNET_FS_Handle *h, const char *filename, | 2189 | GNUNET_FS_unindex_start (struct GNUNET_FS_Handle *h, const char *filename, |
@@ -2200,7 +2200,7 @@ GNUNET_FS_unindex_stop (struct GNUNET_FS_UnindexContext *uc); | |||
2200 | 2200 | ||
2201 | 2201 | ||
2202 | /** | 2202 | /** |
2203 | * Publish an advertismement for a namespace. | 2203 | * Publish an advertismement for a namespace. |
2204 | * | 2204 | * |
2205 | * @param h handle to the file sharing subsystem | 2205 | * @param h handle to the file sharing subsystem |
2206 | * @param ksk_uri keywords to use for advertisment | 2206 | * @param ksk_uri keywords to use for advertisment |
@@ -2280,7 +2280,7 @@ GNUNET_FS_namespace_list (struct GNUNET_FS_Handle *h, | |||
2280 | * Function called on updateable identifiers. | 2280 | * Function called on updateable identifiers. |
2281 | * | 2281 | * |
2282 | * @param cls closure | 2282 | * @param cls closure |
2283 | * @param last_id last identifier | 2283 | * @param last_id last identifier |
2284 | * @param last_uri uri used for the content published under the last_id | 2284 | * @param last_uri uri used for the content published under the last_id |
2285 | * @param last_meta metadata associated with last_uri | 2285 | * @param last_meta metadata associated with last_uri |
2286 | * @param next_id identifier that should be used for updates | 2286 | * @param next_id identifier that should be used for updates |
@@ -2298,12 +2298,12 @@ typedef void (*GNUNET_FS_IdentifierProcessor) (void *cls, const char *last_id, | |||
2298 | * produce an update. Namespace updates form a graph where each node | 2298 | * produce an update. Namespace updates form a graph where each node |
2299 | * has a name. Each node can have any number of URI/meta-data entries | 2299 | * has a name. Each node can have any number of URI/meta-data entries |
2300 | * which can each be linked to other nodes. Cycles are possible. | 2300 | * which can each be linked to other nodes. Cycles are possible. |
2301 | * | 2301 | * |
2302 | * Calling this function with "next_id" NULL will cause the library to | 2302 | * Calling this function with "next_id" NULL will cause the library to |
2303 | * call "ip" with a root for each strongly connected component of the | 2303 | * call "ip" with a root for each strongly connected component of the |
2304 | * graph (a root being a node from which all other nodes in the Scc | 2304 | * graph (a root being a node from which all other nodes in the Scc |
2305 | * are reachable). | 2305 | * are reachable). |
2306 | * | 2306 | * |
2307 | * Calling this function with "next_id" being the name of a node will | 2307 | * Calling this function with "next_id" being the name of a node will |
2308 | * cause the library to call "ip" with all children of the node. Note | 2308 | * cause the library to call "ip" with all children of the node. Note |
2309 | * that cycles within an SCC are possible (including self-loops). | 2309 | * that cycles within an SCC are possible (including self-loops). |
@@ -2356,7 +2356,7 @@ GNUNET_FS_search_start (struct GNUNET_FS_Handle *h, | |||
2356 | 2356 | ||
2357 | 2357 | ||
2358 | /** | 2358 | /** |
2359 | * Pause search. | 2359 | * Pause search. |
2360 | * | 2360 | * |
2361 | * @param sc context for the search that should be paused | 2361 | * @param sc context for the search that should be paused |
2362 | */ | 2362 | */ |
@@ -2541,7 +2541,7 @@ GNUNET_FS_meta_data_test_for_directory (const struct GNUNET_CONTAINER_MetaData | |||
2541 | /** | 2541 | /** |
2542 | * Set the MIMETYPE information for the given | 2542 | * Set the MIMETYPE information for the given |
2543 | * metadata to "application/gnunet-directory". | 2543 | * metadata to "application/gnunet-directory". |
2544 | * | 2544 | * |
2545 | * @param md metadata to add mimetype to | 2545 | * @param md metadata to add mimetype to |
2546 | */ | 2546 | */ |
2547 | void | 2547 | void |
@@ -2550,7 +2550,7 @@ GNUNET_FS_meta_data_make_directory (struct GNUNET_CONTAINER_MetaData *md); | |||
2550 | 2550 | ||
2551 | /** | 2551 | /** |
2552 | * Suggest a filename based on given metadata. | 2552 | * Suggest a filename based on given metadata. |
2553 | * | 2553 | * |
2554 | * @param md given meta data | 2554 | * @param md given meta data |
2555 | * @return NULL if meta data is useless for suggesting a filename | 2555 | * @return NULL if meta data is useless for suggesting a filename |
2556 | */ | 2556 | */ |
@@ -2617,7 +2617,7 @@ struct GNUNET_FS_DirectoryBuilder; | |||
2617 | 2617 | ||
2618 | /** | 2618 | /** |
2619 | * Create a directory builder. | 2619 | * Create a directory builder. |
2620 | * | 2620 | * |
2621 | * @param mdir metadata for the directory | 2621 | * @param mdir metadata for the directory |
2622 | */ | 2622 | */ |
2623 | struct GNUNET_FS_DirectoryBuilder * | 2623 | struct GNUNET_FS_DirectoryBuilder * |
@@ -2627,7 +2627,7 @@ GNUNET_FS_directory_builder_create (const struct GNUNET_CONTAINER_MetaData | |||
2627 | 2627 | ||
2628 | /** | 2628 | /** |
2629 | * Add an entry to a directory. | 2629 | * Add an entry to a directory. |
2630 | * | 2630 | * |
2631 | * @param bld directory to extend | 2631 | * @param bld directory to extend |
2632 | * @param uri uri of the entry (must not be a KSK) | 2632 | * @param uri uri of the entry (must not be a KSK) |
2633 | * @param md metadata of the entry | 2633 | * @param md metadata of the entry |
diff --git a/src/include/gnunet_getopt_lib.h b/src/include/gnunet_getopt_lib.h index e6afa2b3c..2f4f4c32b 100644 --- a/src/include/gnunet_getopt_lib.h +++ b/src/include/gnunet_getopt_lib.h | |||
@@ -250,7 +250,7 @@ GNUNET_GETOPT_set_uint (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, | |||
250 | 250 | ||
251 | 251 | ||
252 | /** | 252 | /** |
253 | * Set an option of type 'int' from the command line to 1 if the | 253 | * Set an option of type 'int' from the command line to 1 if the |
254 | * given option is present. | 254 | * given option is present. |
255 | * A pointer to this function should be passed as part of the | 255 | * A pointer to this function should be passed as part of the |
256 | * 'struct GNUNET_GETOPT_CommandLineOption' array to initialize options | 256 | * 'struct GNUNET_GETOPT_CommandLineOption' array to initialize options |
@@ -261,7 +261,7 @@ GNUNET_GETOPT_set_uint (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, | |||
261 | * @param scls additional closure (will point to the 'int') | 261 | * @param scls additional closure (will point to the 'int') |
262 | * @param option name of the option | 262 | * @param option name of the option |
263 | * @param value not used (NULL) | 263 | * @param value not used (NULL) |
264 | * @return GNUNET_OK | 264 | * @return GNUNET_OK |
265 | */ | 265 | */ |
266 | int | 266 | int |
267 | GNUNET_GETOPT_set_one (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, | 267 | GNUNET_GETOPT_set_one (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, |
@@ -280,7 +280,7 @@ GNUNET_GETOPT_set_one (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, | |||
280 | * which will be allocated) | 280 | * which will be allocated) |
281 | * @param option name of the option | 281 | * @param option name of the option |
282 | * @param value actual value of the option (a string) | 282 | * @param value actual value of the option (a string) |
283 | * @return GNUNET_OK | 283 | * @return GNUNET_OK |
284 | */ | 284 | */ |
285 | int | 285 | int |
286 | GNUNET_GETOPT_set_string (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, | 286 | GNUNET_GETOPT_set_string (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, |
@@ -298,7 +298,7 @@ GNUNET_GETOPT_set_string (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, | |||
298 | * @param scls additional closure (will point to the 'int') | 298 | * @param scls additional closure (will point to the 'int') |
299 | * @param option name of the option | 299 | * @param option name of the option |
300 | * @param value not used (NULL) | 300 | * @param value not used (NULL) |
301 | * @return GNUNET_OK | 301 | * @return GNUNET_OK |
302 | */ | 302 | */ |
303 | int | 303 | int |
304 | GNUNET_GETOPT_increment_value (struct GNUNET_GETOPT_CommandLineProcessorContext | 304 | GNUNET_GETOPT_increment_value (struct GNUNET_GETOPT_CommandLineProcessorContext |
diff --git a/src/include/gnunet_hello_lib.h b/src/include/gnunet_hello_lib.h index 556b41d3c..0ec1be7d1 100644 --- a/src/include/gnunet_hello_lib.h +++ b/src/include/gnunet_hello_lib.h | |||
@@ -130,9 +130,9 @@ GNUNET_HELLO_merge (const struct GNUNET_HELLO_Message *h1, | |||
130 | * @param h2 the second HELLO message | 130 | * @param h2 the second HELLO message |
131 | * @param now time to use for deciding which addresses have | 131 | * @param now time to use for deciding which addresses have |
132 | * expired and should not be considered at all | 132 | * expired and should not be considered at all |
133 | * @return absolute time forever if the two HELLOs are | 133 | * @return absolute time forever if the two HELLOs are |
134 | * totally identical; smallest timestamp >= now if | 134 | * totally identical; smallest timestamp >= now if |
135 | * they only differ in timestamps; | 135 | * they only differ in timestamps; |
136 | * zero if the some addresses with expirations >= now | 136 | * zero if the some addresses with expirations >= now |
137 | * do not match at all | 137 | * do not match at all |
138 | */ | 138 | */ |
diff --git a/src/include/gnunet_mesh_service.h b/src/include/gnunet_mesh_service.h index bea706478..bf43c8289 100644 --- a/src/include/gnunet_mesh_service.h +++ b/src/include/gnunet_mesh_service.h | |||
@@ -135,7 +135,7 @@ typedef uint32_t GNUNET_MESH_ApplicationType; | |||
135 | * messages if the client does not process them fast enough (for this | 135 | * messages if the client does not process them fast enough (for this |
136 | * notification type, a bounded queue is used) | 136 | * notification type, a bounded queue is used) |
137 | * @param stypes Application Types the client claims to offer | 137 | * @param stypes Application Types the client claims to offer |
138 | * @return handle to the mesh service | 138 | * @return handle to the mesh service |
139 | * NULL on error (in this case, init is never called) | 139 | * NULL on error (in this case, init is never called) |
140 | */ | 140 | */ |
141 | struct GNUNET_MESH_Handle * | 141 | struct GNUNET_MESH_Handle * |
@@ -146,7 +146,7 @@ GNUNET_MESH_connect (const struct GNUNET_CONFIGURATION_Handle *cfg, void *cls, | |||
146 | 146 | ||
147 | /** | 147 | /** |
148 | * Get the peer on the other side of this tunnel if it is just one. Return NULL otherwise | 148 | * Get the peer on the other side of this tunnel if it is just one. Return NULL otherwise |
149 | * | 149 | * |
150 | * @param tunnel the tunnel | 150 | * @param tunnel the tunnel |
151 | * @return the peer or NULL | 151 | * @return the peer or NULL |
152 | */ | 152 | */ |
@@ -309,7 +309,7 @@ GNUNET_MESH_peer_request_connect_by_type (struct GNUNET_MESH_Handle *h, | |||
309 | 309 | ||
310 | /** | 310 | /** |
311 | * Cancel a pending request to connect to a particular peer. Destroys the | 311 | * Cancel a pending request to connect to a particular peer. Destroys the |
312 | * tunnel. | 312 | * tunnel. |
313 | * | 313 | * |
314 | * @param req request handle that was returned for the original request | 314 | * @param req request handle that was returned for the original request |
315 | */ | 315 | */ |
@@ -333,7 +333,7 @@ struct GNUNET_MESH_TransmitHandle; | |||
333 | * @param cork is corking allowed for this transmission? | 333 | * @param cork is corking allowed for this transmission? |
334 | * @param priority how important is the message? | 334 | * @param priority how important is the message? |
335 | * @param maxdelay how long can the message wait? | 335 | * @param maxdelay how long can the message wait? |
336 | * @param target destination for the message, NULL for multicast to all tunnel targets | 336 | * @param target destination for the message, NULL for multicast to all tunnel targets |
337 | * @param notify_size how many bytes of buffer space does notify want? | 337 | * @param notify_size how many bytes of buffer space does notify want? |
338 | * @param notify function to call when buffer space is available; | 338 | * @param notify function to call when buffer space is available; |
339 | * will be called with NULL on timeout or if the overall queue | 339 | * will be called with NULL on timeout or if the overall queue |
diff --git a/src/include/gnunet_mesh_service_new.h b/src/include/gnunet_mesh_service_new.h index 83addfce5..d0be4ee77 100644 --- a/src/include/gnunet_mesh_service_new.h +++ b/src/include/gnunet_mesh_service_new.h | |||
@@ -257,14 +257,14 @@ struct GNUNET_MESH_TransmitHandle; | |||
257 | 257 | ||
258 | /** | 258 | /** |
259 | * Ask the mesh to call "notify" once it is ready to transmit the | 259 | * Ask the mesh to call "notify" once it is ready to transmit the |
260 | * given number of bytes to the specified tunnel or target. | 260 | * given number of bytes to the specified tunnel or target. |
261 | * | 261 | * |
262 | * @param tunnel tunnel to use for transmission | 262 | * @param tunnel tunnel to use for transmission |
263 | * @param cork is corking allowed for this transmission? | 263 | * @param cork is corking allowed for this transmission? |
264 | * @param priority how important is the message? | 264 | * @param priority how important is the message? |
265 | * @param maxdelay how long can the message wait? | 265 | * @param maxdelay how long can the message wait? |
266 | * @param target destination for the message | 266 | * @param target destination for the message |
267 | * NULL for multicast to all tunnel targets | 267 | * NULL for multicast to all tunnel targets |
268 | * @param notify_size how many bytes of buffer space does notify want? | 268 | * @param notify_size how many bytes of buffer space does notify want? |
269 | * @param notify function to call when buffer space is available; | 269 | * @param notify function to call when buffer space is available; |
270 | * will be called with NULL on timeout or if the overall queue | 270 | * will be called with NULL on timeout or if the overall queue |
diff --git a/src/include/gnunet_nat_lib.h b/src/include/gnunet_nat_lib.h index c521a560c..6c1db8043 100644 --- a/src/include/gnunet_nat_lib.h +++ b/src/include/gnunet_nat_lib.h | |||
@@ -84,7 +84,7 @@ struct GNUNET_NAT_Handle; | |||
84 | * @param reversal_callback function to call if someone wants connection reversal from us, | 84 | * @param reversal_callback function to call if someone wants connection reversal from us, |
85 | * NULL if connection reversal is not supported | 85 | * NULL if connection reversal is not supported |
86 | * @param callback_cls closure for callback | 86 | * @param callback_cls closure for callback |
87 | * @return NULL on error, otherwise handle that can be used to unregister | 87 | * @return NULL on error, otherwise handle that can be used to unregister |
88 | */ | 88 | */ |
89 | struct GNUNET_NAT_Handle * | 89 | struct GNUNET_NAT_Handle * |
90 | GNUNET_NAT_register (const struct GNUNET_CONFIGURATION_Handle *cfg, int is_tcp, | 90 | GNUNET_NAT_register (const struct GNUNET_CONFIGURATION_Handle *cfg, int is_tcp, |
@@ -145,7 +145,7 @@ struct GNUNET_NAT_Test; | |||
145 | * | 145 | * |
146 | * @param cls closure | 146 | * @param cls closure |
147 | * @param success GNUNET_OK on success, GNUNET_NO on failure, | 147 | * @param success GNUNET_OK on success, GNUNET_NO on failure, |
148 | * GNUNET_SYSERR if the test could not be | 148 | * GNUNET_SYSERR if the test could not be |
149 | * properly started (internal failure) | 149 | * properly started (internal failure) |
150 | */ | 150 | */ |
151 | typedef void (*GNUNET_NAT_TestCallback) (void *cls, int success); | 151 | typedef void (*GNUNET_NAT_TestCallback) (void *cls, int success); |
@@ -227,7 +227,7 @@ struct GNUNET_NAT_MiniHandle; | |||
227 | * general-purpose 'GNUNET_NAT_register' code). However, it can be | 227 | * general-purpose 'GNUNET_NAT_register' code). However, it can be |
228 | * used if specifically UPnP-based NAT traversal is to be used or | 228 | * used if specifically UPnP-based NAT traversal is to be used or |
229 | * tested. | 229 | * tested. |
230 | * | 230 | * |
231 | * @param port port to map | 231 | * @param port port to map |
232 | * @param is_tcp GNUNET_YES to map TCP, GNUNET_NO for UDP | 232 | * @param is_tcp GNUNET_YES to map TCP, GNUNET_NO for UDP |
233 | * @param ac function to call with mapping result | 233 | * @param ac function to call with mapping result |
@@ -244,7 +244,7 @@ GNUNET_NAT_mini_map_start (uint16_t port, int is_tcp, | |||
244 | * this function will give 'upnpc' 1s to remove tha mapping, | 244 | * this function will give 'upnpc' 1s to remove tha mapping, |
245 | * so while this function is non-blocking, a task will be | 245 | * so while this function is non-blocking, a task will be |
246 | * left with the scheduler for up to 1s past this call. | 246 | * left with the scheduler for up to 1s past this call. |
247 | * | 247 | * |
248 | * @param mini the handle | 248 | * @param mini the handle |
249 | */ | 249 | */ |
250 | void | 250 | void |
diff --git a/src/include/gnunet_nse_service.h b/src/include/gnunet_nse_service.h index 451f2a2dc..a0c6016a4 100644 --- a/src/include/gnunet_nse_service.h +++ b/src/include/gnunet_nse_service.h | |||
@@ -70,7 +70,7 @@ typedef void (*GNUNET_NSE_Callback) (void *cls, | |||
70 | * Convert the logarithmic estimated returned to the 'GNUNET_NSE_Callback' | 70 | * Convert the logarithmic estimated returned to the 'GNUNET_NSE_Callback' |
71 | * into an absolute estimate in terms of the number of peers in the network. | 71 | * into an absolute estimate in terms of the number of peers in the network. |
72 | * | 72 | * |
73 | * @param loge logarithmic estimate | 73 | * @param loge logarithmic estimate |
74 | * @return absolute number of peers in the network (estimated) | 74 | * @return absolute number of peers in the network (estimated) |
75 | */ | 75 | */ |
76 | #define GNUNET_NSE_log_estimate_to_n(loge) pow(2.0, (loge)) | 76 | #define GNUNET_NSE_log_estimate_to_n(loge) pow(2.0, (loge)) |
diff --git a/src/include/gnunet_os_lib.h b/src/include/gnunet_os_lib.h index 9d611af9b..31062bd40 100644 --- a/src/include/gnunet_os_lib.h +++ b/src/include/gnunet_os_lib.h | |||
@@ -356,7 +356,7 @@ GNUNET_OS_install_parent_control_handler (void *cls, | |||
356 | * PATH environment variable as a search path. | 356 | * PATH environment variable as a search path. |
357 | * | 357 | * |
358 | * @param binary the name of the file to check | 358 | * @param binary the name of the file to check |
359 | * @return GNUNET_YES if the file is SUID, | 359 | * @return GNUNET_YES if the file is SUID, |
360 | * GNUNET_NO if not SUID (but binary exists) | 360 | * GNUNET_NO if not SUID (but binary exists) |
361 | * GNUNET_SYSERR on error (no such binary or not executable) | 361 | * GNUNET_SYSERR on error (no such binary or not executable) |
362 | */ | 362 | */ |
diff --git a/src/include/gnunet_peer_lib.h b/src/include/gnunet_peer_lib.h index 89413aa59..0121e8453 100644 --- a/src/include/gnunet_peer_lib.h +++ b/src/include/gnunet_peer_lib.h | |||
@@ -80,7 +80,7 @@ GNUNET_PEER_change_rc (GNUNET_PEER_Id id, int delta); | |||
80 | 80 | ||
81 | /** | 81 | /** |
82 | * Decrement multiple RCs of peer identities by one. | 82 | * Decrement multiple RCs of peer identities by one. |
83 | * | 83 | * |
84 | * @param ids array of PIDs to decrement the RCs of | 84 | * @param ids array of PIDs to decrement the RCs of |
85 | * @param count size of the ids array | 85 | * @param count size of the ids array |
86 | */ | 86 | */ |
diff --git a/src/include/gnunet_peerinfo_service.h b/src/include/gnunet_peerinfo_service.h index 50bbc458a..158eae602 100644 --- a/src/include/gnunet_peerinfo_service.h +++ b/src/include/gnunet_peerinfo_service.h | |||
@@ -73,7 +73,7 @@ GNUNET_PEERINFO_disconnect (struct GNUNET_PEERINFO_Handle *h); | |||
73 | 73 | ||
74 | 74 | ||
75 | /** | 75 | /** |
76 | * Add a host to the persistent list. This method operates in | 76 | * Add a host to the persistent list. This method operates in |
77 | * semi-reliable mode: if the transmission is not completed by | 77 | * semi-reliable mode: if the transmission is not completed by |
78 | * the time 'GNUNET_PEERINFO_disconnect' is called, it will be | 78 | * the time 'GNUNET_PEERINFO_disconnect' is called, it will be |
79 | * aborted. Furthermore, if a second HELLO is added for the | 79 | * aborted. Furthermore, if a second HELLO is added for the |
@@ -116,15 +116,15 @@ struct GNUNET_PEERINFO_IteratorContext; | |||
116 | * host and then finally once with a NULL pointer. After that final | 116 | * host and then finally once with a NULL pointer. After that final |
117 | * invocation, the iterator context must no longer be used. | 117 | * invocation, the iterator context must no longer be used. |
118 | * | 118 | * |
119 | * Instead of calling this function with 'peer == NULL' | 119 | * Instead of calling this function with 'peer == NULL' |
120 | * it is often better to use 'GNUNET_PEERINFO_notify'. | 120 | * it is often better to use 'GNUNET_PEERINFO_notify'. |
121 | * | 121 | * |
122 | * @param h handle to the peerinfo service | 122 | * @param h handle to the peerinfo service |
123 | * @param peer restrict iteration to this peer only (can be NULL) | 123 | * @param peer restrict iteration to this peer only (can be NULL) |
124 | * @param timeout how long to wait until timing out | 124 | * @param timeout how long to wait until timing out |
125 | * @param callback the method to call for each peer | 125 | * @param callback the method to call for each peer |
126 | * @param callback_cls closure for callback | 126 | * @param callback_cls closure for callback |
127 | * @return NULL on error (in this case, 'callback' is never called!), | 127 | * @return NULL on error (in this case, 'callback' is never called!), |
128 | * otherwise an iterator context | 128 | * otherwise an iterator context |
129 | */ | 129 | */ |
130 | struct GNUNET_PEERINFO_IteratorContext * | 130 | struct GNUNET_PEERINFO_IteratorContext * |
diff --git a/src/include/gnunet_plugin_lib.h b/src/include/gnunet_plugin_lib.h index fbc7e2617..d143a6ccf 100644 --- a/src/include/gnunet_plugin_lib.h +++ b/src/include/gnunet_plugin_lib.h | |||
@@ -54,7 +54,7 @@ typedef void *(*GNUNET_PLUGIN_Callback) (void *arg); | |||
54 | * Test if a plugin exists. | 54 | * Test if a plugin exists. |
55 | * | 55 | * |
56 | * Note that the library must export a symbol called | 56 | * Note that the library must export a symbol called |
57 | * "library_name_init" for the test to succeed. | 57 | * "library_name_init" for the test to succeed. |
58 | * | 58 | * |
59 | * @param library_name name of the plugin to test if it is installed | 59 | * @param library_name name of the plugin to test if it is installed |
60 | * @return GNUNET_YES if the plugin exists, GNUNET_NO if not | 60 | * @return GNUNET_YES if the plugin exists, GNUNET_NO if not |
diff --git a/src/include/gnunet_protocols.h b/src/include/gnunet_protocols.h index c12a849ce..5f3ab25ce 100644 --- a/src/include/gnunet_protocols.h +++ b/src/include/gnunet_protocols.h | |||
@@ -36,7 +36,7 @@ extern "C" | |||
36 | #endif | 36 | #endif |
37 | 37 | ||
38 | /******************************************************************************* | 38 | /******************************************************************************* |
39 | * UTIL message types | 39 | * UTIL message types |
40 | ******************************************************************************/ | 40 | ******************************************************************************/ |
41 | 41 | ||
42 | /** | 42 | /** |
@@ -45,7 +45,7 @@ extern "C" | |||
45 | #define GNUNET_MESSAGE_TYPE_TEST 1 | 45 | #define GNUNET_MESSAGE_TYPE_TEST 1 |
46 | 46 | ||
47 | /******************************************************************************* | 47 | /******************************************************************************* |
48 | * RESOLVER message types | 48 | * RESOLVER message types |
49 | ******************************************************************************/ | 49 | ******************************************************************************/ |
50 | 50 | ||
51 | /** | 51 | /** |
@@ -59,7 +59,7 @@ extern "C" | |||
59 | #define GNUNET_MESSAGE_TYPE_RESOLVER_RESPONSE 5 | 59 | #define GNUNET_MESSAGE_TYPE_RESOLVER_RESPONSE 5 |
60 | 60 | ||
61 | /******************************************************************************* | 61 | /******************************************************************************* |
62 | * ARM message types | 62 | * ARM message types |
63 | ******************************************************************************/ | 63 | ******************************************************************************/ |
64 | 64 | ||
65 | /** | 65 | /** |
@@ -100,7 +100,7 @@ extern "C" | |||
100 | #define GNUNET_MESSAGE_TYPE_ARM_SHUTDOWN_ACK 14 | 100 | #define GNUNET_MESSAGE_TYPE_ARM_SHUTDOWN_ACK 14 |
101 | 101 | ||
102 | /******************************************************************************* | 102 | /******************************************************************************* |
103 | * HELLO message types | 103 | * HELLO message types |
104 | ******************************************************************************/ | 104 | ******************************************************************************/ |
105 | 105 | ||
106 | /** | 106 | /** |
@@ -110,7 +110,7 @@ extern "C" | |||
110 | #define GNUNET_MESSAGE_TYPE_HELLO 16 | 110 | #define GNUNET_MESSAGE_TYPE_HELLO 16 |
111 | 111 | ||
112 | /******************************************************************************* | 112 | /******************************************************************************* |
113 | * FRAGMENTATION message types | 113 | * FRAGMENTATION message types |
114 | ******************************************************************************/ | 114 | ******************************************************************************/ |
115 | 115 | ||
116 | /** | 116 | /** |
@@ -126,7 +126,7 @@ extern "C" | |||
126 | #define GNUNET_MESSAGE_TYPE_FRAGMENT_ACK 19 | 126 | #define GNUNET_MESSAGE_TYPE_FRAGMENT_ACK 19 |
127 | 127 | ||
128 | /******************************************************************************* | 128 | /******************************************************************************* |
129 | * TRANSPORT message types | 129 | * TRANSPORT message types |
130 | ******************************************************************************/ | 130 | ******************************************************************************/ |
131 | 131 | ||
132 | /** | 132 | /** |
@@ -242,7 +242,7 @@ extern "C" | |||
242 | #define GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_KEEPALIVE 39 | 242 | #define GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_KEEPALIVE 39 |
243 | 243 | ||
244 | /******************************************************************************* | 244 | /******************************************************************************* |
245 | * Transport-WLAN message types | 245 | * Transport-WLAN message types |
246 | ******************************************************************************/ | 246 | ******************************************************************************/ |
247 | 247 | ||
248 | /** | 248 | /** |
@@ -269,7 +269,7 @@ extern "C" | |||
269 | 269 | ||
270 | 270 | ||
271 | /******************************************************************************* | 271 | /******************************************************************************* |
272 | * Transport-DV message types | 272 | * Transport-DV message types |
273 | ******************************************************************************/ | 273 | ******************************************************************************/ |
274 | 274 | ||
275 | /** | 275 | /** |
@@ -313,7 +313,7 @@ extern "C" | |||
313 | #define GNUNET_MESSAGE_TYPE_DV_DISCONNECT 50 | 313 | #define GNUNET_MESSAGE_TYPE_DV_DISCONNECT 50 |
314 | 314 | ||
315 | /******************************************************************************* | 315 | /******************************************************************************* |
316 | * Transport-UDP message types | 316 | * Transport-UDP message types |
317 | ******************************************************************************/ | 317 | ******************************************************************************/ |
318 | 318 | ||
319 | /** | 319 | /** |
@@ -327,7 +327,7 @@ extern "C" | |||
327 | #define GNUNET_MESSAGE_TYPE_TRANSPORT_UDP_ACK 57 | 327 | #define GNUNET_MESSAGE_TYPE_TRANSPORT_UDP_ACK 57 |
328 | 328 | ||
329 | /******************************************************************************* | 329 | /******************************************************************************* |
330 | * Transport-TCP message types | 330 | * Transport-TCP message types |
331 | ******************************************************************************/ | 331 | ******************************************************************************/ |
332 | 332 | ||
333 | /** | 333 | /** |
@@ -347,7 +347,7 @@ extern "C" | |||
347 | #define GNUNET_MESSAGE_TYPE_TRANSPORT_ATS 62 | 347 | #define GNUNET_MESSAGE_TYPE_TRANSPORT_ATS 62 |
348 | 348 | ||
349 | /******************************************************************************* | 349 | /******************************************************************************* |
350 | * NAT message types | 350 | * NAT message types |
351 | ******************************************************************************/ | 351 | ******************************************************************************/ |
352 | 352 | ||
353 | /** | 353 | /** |
@@ -356,7 +356,7 @@ extern "C" | |||
356 | #define GNUNET_MESSAGE_TYPE_NAT_TEST 63 | 356 | #define GNUNET_MESSAGE_TYPE_NAT_TEST 63 |
357 | 357 | ||
358 | /******************************************************************************* | 358 | /******************************************************************************* |
359 | * CORE message types | 359 | * CORE message types |
360 | ******************************************************************************/ | 360 | ******************************************************************************/ |
361 | 361 | ||
362 | /** | 362 | /** |
@@ -484,7 +484,7 @@ extern "C" | |||
484 | #define GNUNET_MESSAGE_TYPE_CORE_BINARY_TYPE_MAP 87 | 484 | #define GNUNET_MESSAGE_TYPE_CORE_BINARY_TYPE_MAP 87 |
485 | 485 | ||
486 | /******************************************************************************* | 486 | /******************************************************************************* |
487 | * DATASTORE message types | 487 | * DATASTORE message types |
488 | ******************************************************************************/ | 488 | ******************************************************************************/ |
489 | 489 | ||
490 | /** | 490 | /** |
@@ -554,7 +554,7 @@ extern "C" | |||
554 | 554 | ||
555 | 555 | ||
556 | /******************************************************************************* | 556 | /******************************************************************************* |
557 | * FS message types | 557 | * FS message types |
558 | ******************************************************************************/ | 558 | ******************************************************************************/ |
559 | 559 | ||
560 | /** | 560 | /** |
@@ -621,7 +621,7 @@ extern "C" | |||
621 | 621 | ||
622 | 622 | ||
623 | /******************************************************************************* | 623 | /******************************************************************************* |
624 | * DHT message types | 624 | * DHT message types |
625 | ******************************************************************************/ | 625 | ******************************************************************************/ |
626 | 626 | ||
627 | /** | 627 | /** |
@@ -706,7 +706,7 @@ extern "C" | |||
706 | #define GNUNET_MESSAGE_TYPE_DHT_MALICIOUS_DROP 156 | 706 | #define GNUNET_MESSAGE_TYPE_DHT_MALICIOUS_DROP 156 |
707 | 707 | ||
708 | /******************************************************************************* | 708 | /******************************************************************************* |
709 | * HOSTLIST message types | 709 | * HOSTLIST message types |
710 | ******************************************************************************/ | 710 | ******************************************************************************/ |
711 | 711 | ||
712 | /** | 712 | /** |
@@ -716,7 +716,7 @@ extern "C" | |||
716 | 716 | ||
717 | 717 | ||
718 | /******************************************************************************* | 718 | /******************************************************************************* |
719 | * STATISTICS message types | 719 | * STATISTICS message types |
720 | ******************************************************************************/ | 720 | ******************************************************************************/ |
721 | 721 | ||
722 | /** | 722 | /** |
@@ -752,7 +752,7 @@ extern "C" | |||
752 | 752 | ||
753 | 753 | ||
754 | /******************************************************************************* | 754 | /******************************************************************************* |
755 | * VPN message types | 755 | * VPN message types |
756 | ******************************************************************************/ | 756 | ******************************************************************************/ |
757 | 757 | ||
758 | /** | 758 | /** |
@@ -802,7 +802,7 @@ extern "C" | |||
802 | 802 | ||
803 | 803 | ||
804 | /******************************************************************************* | 804 | /******************************************************************************* |
805 | * VPN-DNS message types | 805 | * VPN-DNS message types |
806 | ******************************************************************************/ | 806 | ******************************************************************************/ |
807 | 807 | ||
808 | /** | 808 | /** |
diff --git a/src/include/gnunet_pseudonym_lib.h b/src/include/gnunet_pseudonym_lib.h index 138375fe1..bde98ef8f 100644 --- a/src/include/gnunet_pseudonym_lib.h +++ b/src/include/gnunet_pseudonym_lib.h | |||
@@ -83,7 +83,7 @@ GNUNET_PSEUDONYM_add (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
83 | /** | 83 | /** |
84 | * List all known pseudonyms. | 84 | * List all known pseudonyms. |
85 | * | 85 | * |
86 | * @param cfg overall configuration | 86 | * @param cfg overall configuration |
87 | * @param iterator function to call for each pseudonym | 87 | * @param iterator function to call for each pseudonym |
88 | * @param closure closure for iterator | 88 | * @param closure closure for iterator |
89 | * @return number of pseudonyms found | 89 | * @return number of pseudonyms found |
diff --git a/src/include/gnunet_scheduler_lib.h b/src/include/gnunet_scheduler_lib.h index 0f80b9cee..9b8c57ff3 100644 --- a/src/include/gnunet_scheduler_lib.h +++ b/src/include/gnunet_scheduler_lib.h | |||
@@ -256,7 +256,7 @@ GNUNET_SCHEDULER_get_load (enum GNUNET_SCHEDULER_Priority p); | |||
256 | 256 | ||
257 | /** | 257 | /** |
258 | * Obtain the reason code for why the current task was | 258 | * Obtain the reason code for why the current task was |
259 | * started. Will return the same value as | 259 | * started. Will return the same value as |
260 | * the GNUNET_SCHEDULER_TaskContext's reason field. | 260 | * the GNUNET_SCHEDULER_TaskContext's reason field. |
261 | * | 261 | * |
262 | * * @return reason(s) why the current task is run | 262 | * * @return reason(s) why the current task is run |
diff --git a/src/include/gnunet_server_lib.h b/src/include/gnunet_server_lib.h index 45da3efa2..682a265ff 100644 --- a/src/include/gnunet_server_lib.h +++ b/src/include/gnunet_server_lib.h | |||
@@ -135,7 +135,7 @@ GNUNET_SERVER_create_with_sockets (GNUNET_CONNECTION_AccessCheck access, | |||
135 | * @param access function for access control | 135 | * @param access function for access control |
136 | * @param access_cls closure for access | 136 | * @param access_cls closure for access |
137 | * @param serverAddr address toes listen on (including port), NULL terminated array | 137 | * @param serverAddr address toes listen on (including port), NULL terminated array |
138 | * @param socklen lengths of respective serverAddr | 138 | * @param socklen lengths of respective serverAddr |
139 | * @param idle_timeout after how long should we timeout idle connections? | 139 | * @param idle_timeout after how long should we timeout idle connections? |
140 | * @param require_found if YES, connections sending messages of unknown type | 140 | * @param require_found if YES, connections sending messages of unknown type |
141 | * will be closed | 141 | * will be closed |
@@ -352,7 +352,7 @@ typedef void (*GNUNET_SERVER_DisconnectCallback) (void *cls, | |||
352 | * Ask the server to notify us whenever a client disconnects. | 352 | * Ask the server to notify us whenever a client disconnects. |
353 | * This function is called whenever the actual network connection | 353 | * This function is called whenever the actual network connection |
354 | * is closed; the reference count may be zero or larger than zero | 354 | * is closed; the reference count may be zero or larger than zero |
355 | * at this point. If the server is destroyed before this | 355 | * at this point. If the server is destroyed before this |
356 | * notification is explicitly cancelled, the 'callback' will | 356 | * notification is explicitly cancelled, the 'callback' will |
357 | * once be called with a 'client' argument of NULL to indicate | 357 | * once be called with a 'client' argument of NULL to indicate |
358 | * that the server itself is now gone (and that the callback | 358 | * that the server itself is now gone (and that the callback |
@@ -609,7 +609,7 @@ GNUNET_SERVER_mst_create (GNUNET_SERVER_MessageTokenizerCallback cb, | |||
609 | * can be NULL (will be passed back to 'cb') | 609 | * can be NULL (will be passed back to 'cb') |
610 | * @param buf input data to add | 610 | * @param buf input data to add |
611 | * @param size number of bytes in buf | 611 | * @param size number of bytes in buf |
612 | * @param purge should any excess bytes in the buffer be discarded | 612 | * @param purge should any excess bytes in the buffer be discarded |
613 | * (i.e. for packet-based services like UDP) | 613 | * (i.e. for packet-based services like UDP) |
614 | * @param one_shot only call callback once, keep rest of message in buffer | 614 | * @param one_shot only call callback once, keep rest of message in buffer |
615 | * @return GNUNET_OK if we are done processing (need more data) | 615 | * @return GNUNET_OK if we are done processing (need more data) |
diff --git a/src/include/gnunet_statistics_service.h b/src/include/gnunet_statistics_service.h index c246e7cda..11796d781 100644 --- a/src/include/gnunet_statistics_service.h +++ b/src/include/gnunet_statistics_service.h | |||
@@ -143,7 +143,7 @@ GNUNET_STATISTICS_get (struct GNUNET_STATISTICS_Handle *handle, | |||
143 | 143 | ||
144 | 144 | ||
145 | /** | 145 | /** |
146 | * Cancel a 'get' request. Must be called before the 'cont' | 146 | * Cancel a 'get' request. Must be called before the 'cont' |
147 | * function is called. | 147 | * function is called. |
148 | * | 148 | * |
149 | * @param gh handle of the request to cancel | 149 | * @param gh handle of the request to cancel |
diff --git a/src/include/gnunet_time_lib.h b/src/include/gnunet_time_lib.h index 1f157631f..f8afdae41 100644 --- a/src/include/gnunet_time_lib.h +++ b/src/include/gnunet_time_lib.h | |||
@@ -253,7 +253,7 @@ GNUNET_TIME_absolute_get_remaining (struct GNUNET_TIME_Absolute future); | |||
253 | 253 | ||
254 | 254 | ||
255 | /** | 255 | /** |
256 | * Calculate the estimate time of arrival/completion | 256 | * Calculate the estimate time of arrival/completion |
257 | * for an operation. | 257 | * for an operation. |
258 | * | 258 | * |
259 | * @param start when did the operation start? | 259 | * @param start when did the operation start? |
@@ -363,7 +363,7 @@ GNUNET_TIME_relative_subtract (struct GNUNET_TIME_Relative a1, | |||
363 | 363 | ||
364 | /** | 364 | /** |
365 | * Convert relative time to network byte order. | 365 | * Convert relative time to network byte order. |
366 | * | 366 | * |
367 | * @param a time to convert | 367 | * @param a time to convert |
368 | * @return converted time value | 368 | * @return converted time value |
369 | */ | 369 | */ |
diff --git a/src/include/gnunet_transport_plugin.h b/src/include/gnunet_transport_plugin.h index d7ca62219..bc5b791d5 100644 --- a/src/include/gnunet_transport_plugin.h +++ b/src/include/gnunet_transport_plugin.h | |||
@@ -74,9 +74,9 @@ struct SessionHeader | |||
74 | * use NULL wherever a session pointer is needed. This function | 74 | * use NULL wherever a session pointer is needed. This function |
75 | * should be called BEFORE a potential "TransmitContinuation" | 75 | * should be called BEFORE a potential "TransmitContinuation" |
76 | * from the "TransmitFunction". | 76 | * from the "TransmitFunction". |
77 | * | 77 | * |
78 | * @param cls closure | 78 | * @param cls closure |
79 | * @param peer which peer was the session for | 79 | * @param peer which peer was the session for |
80 | * @param session which session is being destoyed | 80 | * @param session which session is being destoyed |
81 | */ | 81 | */ |
82 | typedef void (*GNUNET_TRANSPORT_SessionEnd) (void *cls, | 82 | typedef void (*GNUNET_TRANSPORT_SessionEnd) (void *cls, |
@@ -393,14 +393,14 @@ typedef int (*GNUNET_TRANSPORT_CheckAddress) (void *cls, const void *addr, | |||
393 | 393 | ||
394 | /** | 394 | /** |
395 | * Function called for a quick conversion of the binary address to | 395 | * Function called for a quick conversion of the binary address to |
396 | * a numeric address. Note that the caller must not free the | 396 | * a numeric address. Note that the caller must not free the |
397 | * address and that the next call to this function is allowed | 397 | * address and that the next call to this function is allowed |
398 | * to override the address again. | 398 | * to override the address again. |
399 | * | 399 | * |
400 | * @param cls closure | 400 | * @param cls closure |
401 | * @param addr binary address | 401 | * @param addr binary address |
402 | * @param addr_len length of the address | 402 | * @param addr_len length of the address |
403 | * @return string representing the same address | 403 | * @return string representing the same address |
404 | */ | 404 | */ |
405 | typedef const char *(*GNUNET_TRANSPORT_AddressToString) (void *cls, | 405 | typedef const char *(*GNUNET_TRANSPORT_AddressToString) (void *cls, |
406 | const void *addr, | 406 | const void *addr, |
@@ -431,7 +431,7 @@ struct GNUNET_TRANSPORT_PluginFunctions | |||
431 | /** | 431 | /** |
432 | * Function that can be used to force the plugin to disconnect from | 432 | * Function that can be used to force the plugin to disconnect from |
433 | * the given peer and cancel all previous transmissions (and their | 433 | * the given peer and cancel all previous transmissions (and their |
434 | * continuations). | 434 | * continuations). |
435 | */ | 435 | */ |
436 | GNUNET_TRANSPORT_DisconnectFunction disconnect; | 436 | GNUNET_TRANSPORT_DisconnectFunction disconnect; |
437 | 437 | ||
diff --git a/src/include/gnunet_transport_service.h b/src/include/gnunet_transport_service.h index 988d55784..e90acab4d 100644 --- a/src/include/gnunet_transport_service.h +++ b/src/include/gnunet_transport_service.h | |||
@@ -486,7 +486,7 @@ GNUNET_TRANSPORT_disconnect (struct GNUNET_TRANSPORT_Handle *handle); | |||
486 | 486 | ||
487 | 487 | ||
488 | /** | 488 | /** |
489 | * Ask the transport service to establish a connection to | 489 | * Ask the transport service to establish a connection to |
490 | * the given peer. | 490 | * the given peer. |
491 | * | 491 | * |
492 | * @param handle connection to transport service | 492 | * @param handle connection to transport service |
@@ -621,7 +621,7 @@ GNUNET_TRANSPORT_offer_hello (struct GNUNET_TRANSPORT_Handle *handle, | |||
621 | * @param cfg configuration to use | 621 | * @param cfg configuration to use |
622 | * @param address address to convert (binary format) | 622 | * @param address address to convert (binary format) |
623 | * @param addressLen number of bytes in address | 623 | * @param addressLen number of bytes in address |
624 | * @param numeric should (IP) addresses be displayed in numeric form | 624 | * @param numeric should (IP) addresses be displayed in numeric form |
625 | * (otherwise do reverse DNS lookup) | 625 | * (otherwise do reverse DNS lookup) |
626 | * @param nameTrans name of the transport to which the address belongs | 626 | * @param nameTrans name of the transport to which the address belongs |
627 | * @param timeout how long is the lookup allowed to take at most | 627 | * @param timeout how long is the lookup allowed to take at most |
diff --git a/src/mesh/gnunet-service-mesh.c b/src/mesh/gnunet-service-mesh.c index a5c9b131a..fdc0007ed 100644 --- a/src/mesh/gnunet-service-mesh.c +++ b/src/mesh/gnunet-service-mesh.c | |||
@@ -33,7 +33,7 @@ | |||
33 | * - MESH LOCAL HANDLER HELPERS | 33 | * - MESH LOCAL HANDLER HELPERS |
34 | * - MESH LOCAL HANDLES | 34 | * - MESH LOCAL HANDLES |
35 | * - MAIN FUNCTIONS (main & run) | 35 | * - MAIN FUNCTIONS (main & run) |
36 | * | 36 | * |
37 | * TODO: | 37 | * TODO: |
38 | * - error reporting (CREATE/CHANGE/ADD/DEL?) -- new message! | 38 | * - error reporting (CREATE/CHANGE/ADD/DEL?) -- new message! |
39 | * - partial disconnect reporting -- same as error reporting? | 39 | * - partial disconnect reporting -- same as error reporting? |
@@ -797,7 +797,7 @@ destroy_tunnel (struct MeshTunnel *t) | |||
797 | 797 | ||
798 | /** | 798 | /** |
799 | * Periodically announce what applications are provided by local clients | 799 | * Periodically announce what applications are provided by local clients |
800 | * | 800 | * |
801 | * @param cls closure | 801 | * @param cls closure |
802 | * @param tc task context | 802 | * @param tc task context |
803 | */ | 803 | */ |
@@ -844,7 +844,7 @@ announce_applications (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
844 | 844 | ||
845 | /** | 845 | /** |
846 | * Periodically announce self id in the DHT | 846 | * Periodically announce self id in the DHT |
847 | * | 847 | * |
848 | * @param cls closure | 848 | * @param cls closure |
849 | * @param tc task context | 849 | * @param tc task context |
850 | */ | 850 | */ |
@@ -1199,7 +1199,7 @@ send_p2p_tunnel_destroy (void *cls, size_t size, void *buf) | |||
1199 | 1199 | ||
1200 | /** | 1200 | /** |
1201 | * Send the message to all clients that have subscribed to its type | 1201 | * Send the message to all clients that have subscribed to its type |
1202 | * | 1202 | * |
1203 | * @param msg Pointer to the message itself | 1203 | * @param msg Pointer to the message itself |
1204 | * @return number of clients this message was sent to | 1204 | * @return number of clients this message was sent to |
1205 | */ | 1205 | */ |
@@ -1294,7 +1294,8 @@ handle_mesh_path_create (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
1294 | struct MeshPeerInfo *orig_peer_info; | 1294 | struct MeshPeerInfo *orig_peer_info; |
1295 | struct MeshTunnel *t; | 1295 | struct MeshTunnel *t; |
1296 | 1296 | ||
1297 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "MESH: Received a MESH path create msg\n"); | 1297 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1298 | "MESH: Received a MESH path create msg\n"); | ||
1298 | size = ntohs (message->size); | 1299 | size = ntohs (message->size); |
1299 | if (size < sizeof (struct GNUNET_MESH_ManipulatePath)) | 1300 | if (size < sizeof (struct GNUNET_MESH_ManipulatePath)) |
1300 | { | 1301 | { |
@@ -2057,7 +2058,7 @@ handle_client_disconnect (void *cls, struct GNUNET_SERVER_Client *client) | |||
2057 | 2058 | ||
2058 | /** | 2059 | /** |
2059 | * Handler for new clients | 2060 | * Handler for new clients |
2060 | * | 2061 | * |
2061 | * @param cls closure | 2062 | * @param cls closure |
2062 | * @param client identification of the client | 2063 | * @param client identification of the client |
2063 | * @param message the actual message, which includes messages the client wants | 2064 | * @param message the actual message, which includes messages the client wants |
@@ -2137,8 +2138,9 @@ handle_local_new_client (void *cls, struct GNUNET_SERVER_Client *client, | |||
2137 | } | 2138 | } |
2138 | } | 2139 | } |
2139 | } | 2140 | } |
2140 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "MESH: client has %u+%u subscriptions\n", | 2141 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
2141 | c->type_counter, c->app_counter); | 2142 | "MESH: client has %u+%u subscriptions\n", c->type_counter, |
2143 | c->app_counter); | ||
2142 | 2144 | ||
2143 | GNUNET_CONTAINER_DLL_insert (clients, clients_tail, c); | 2145 | GNUNET_CONTAINER_DLL_insert (clients, clients_tail, c); |
2144 | c->tunnels = GNUNET_CONTAINER_multihashmap_create (32); | 2146 | c->tunnels = GNUNET_CONTAINER_multihashmap_create (32); |
@@ -2151,7 +2153,7 @@ handle_local_new_client (void *cls, struct GNUNET_SERVER_Client *client, | |||
2151 | 2153 | ||
2152 | /** | 2154 | /** |
2153 | * Handler for requests of new tunnels | 2155 | * Handler for requests of new tunnels |
2154 | * | 2156 | * |
2155 | * @param cls closure | 2157 | * @param cls closure |
2156 | * @param client identification of the client | 2158 | * @param client identification of the client |
2157 | * @param message the actual message | 2159 | * @param message the actual message |
@@ -2233,7 +2235,7 @@ handle_local_tunnel_create (void *cls, struct GNUNET_SERVER_Client *client, | |||
2233 | 2235 | ||
2234 | /** | 2236 | /** |
2235 | * Handler for requests of deleting tunnels | 2237 | * Handler for requests of deleting tunnels |
2236 | * | 2238 | * |
2237 | * @param cls closure | 2239 | * @param cls closure |
2238 | * @param client identification of the client | 2240 | * @param client identification of the client |
2239 | * @param message the actual message | 2241 | * @param message the actual message |
@@ -2286,7 +2288,7 @@ handle_local_tunnel_destroy (void *cls, struct GNUNET_SERVER_Client *client, | |||
2286 | 2288 | ||
2287 | /** | 2289 | /** |
2288 | * Handler for connection requests to new peers | 2290 | * Handler for connection requests to new peers |
2289 | * | 2291 | * |
2290 | * @param cls closure | 2292 | * @param cls closure |
2291 | * @param client identification of the client | 2293 | * @param client identification of the client |
2292 | * @param message the actual message (PeerControl) | 2294 | * @param message the actual message (PeerControl) |
@@ -2359,7 +2361,7 @@ handle_local_connect_add (void *cls, struct GNUNET_SERVER_Client *client, | |||
2359 | 2361 | ||
2360 | /** | 2362 | /** |
2361 | * Handler for disconnection requests of peers in a tunnel | 2363 | * Handler for disconnection requests of peers in a tunnel |
2362 | * | 2364 | * |
2363 | * @param cls closure | 2365 | * @param cls closure |
2364 | * @param client identification of the client | 2366 | * @param client identification of the client |
2365 | * @param message the actual message (PeerControl) | 2367 | * @param message the actual message (PeerControl) |
@@ -2418,7 +2420,7 @@ handle_local_connect_del (void *cls, struct GNUNET_SERVER_Client *client, | |||
2418 | 2420 | ||
2419 | /** | 2421 | /** |
2420 | * Handler for connection requests to new peers by type | 2422 | * Handler for connection requests to new peers by type |
2421 | * | 2423 | * |
2422 | * @param cls closure | 2424 | * @param cls closure |
2423 | * @param client identification of the client | 2425 | * @param client identification of the client |
2424 | * @param message the actual message (ConnectPeerByType) | 2426 | * @param message the actual message (ConnectPeerByType) |
@@ -2515,7 +2517,7 @@ handle_local_connect_by_type (void *cls, struct GNUNET_SERVER_Client *client, | |||
2515 | 2517 | ||
2516 | /** | 2518 | /** |
2517 | * Handler for client traffic directed to one peer | 2519 | * Handler for client traffic directed to one peer |
2518 | * | 2520 | * |
2519 | * @param cls closure | 2521 | * @param cls closure |
2520 | * @param client identification of the client | 2522 | * @param client identification of the client |
2521 | * @param message the actual message | 2523 | * @param message the actual message |
@@ -2608,7 +2610,7 @@ handle_local_unicast (void *cls, struct GNUNET_SERVER_Client *client, | |||
2608 | 2610 | ||
2609 | /** | 2611 | /** |
2610 | * Handler for client traffic directed to all peers in a tunnel | 2612 | * Handler for client traffic directed to all peers in a tunnel |
2611 | * | 2613 | * |
2612 | * @param cls closure | 2614 | * @param cls closure |
2613 | * @param client identification of the client | 2615 | * @param client identification of the client |
2614 | * @param message the actual message | 2616 | * @param message the actual message |
@@ -2807,9 +2809,10 @@ shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
2807 | GNUNET_SERVER_notification_context_destroy (nc); | 2809 | GNUNET_SERVER_notification_context_destroy (nc); |
2808 | nc = NULL; | 2810 | nc = NULL; |
2809 | } | 2811 | } |
2810 | if (0 != announce_id_task) { | 2812 | if (0 != announce_id_task) |
2811 | GNUNET_SCHEDULER_cancel(announce_id_task); | 2813 | { |
2812 | announce_id_task = 0; | 2814 | GNUNET_SCHEDULER_cancel (announce_id_task); |
2815 | announce_id_task = 0; | ||
2813 | } | 2816 | } |
2814 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "MESH: shut down\n"); | 2817 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "MESH: shut down\n"); |
2815 | } | 2818 | } |
diff --git a/src/mesh/mesh.h b/src/mesh/mesh.h index 116e7a777..b9f2226b9 100644 --- a/src/mesh/mesh.h +++ b/src/mesh/mesh.h | |||
@@ -36,7 +36,7 @@ | |||
36 | /* Any API call should be documented in the folowing table under API CALL. | 36 | /* Any API call should be documented in the folowing table under API CALL. |
37 | * Also, any message type should be documented in the following table, with the | 37 | * Also, any message type should be documented in the following table, with the |
38 | * associated event. | 38 | * associated event. |
39 | * | 39 | * |
40 | * API CALL (GNUNET_MESH_*) MESSAGE USED | 40 | * API CALL (GNUNET_MESH_*) MESSAGE USED |
41 | * ------------------------ ------------ | 41 | * ------------------------ ------------ |
42 | * connect GNUNET_MESH_ClientConnect | 42 | * connect GNUNET_MESH_ClientConnect |
@@ -51,9 +51,9 @@ | |||
51 | * | 51 | * |
52 | * notify_transmit_ready *GNUNET_MESH_TransmitReady?* | 52 | * notify_transmit_ready *GNUNET_MESH_TransmitReady?* |
53 | * notify_transmit_ready_cancel None (clear of internal data structures) | 53 | * notify_transmit_ready_cancel None (clear of internal data structures) |
54 | * | 54 | * |
55 | * | 55 | * |
56 | * | 56 | * |
57 | * EVENT MESSAGE USED | 57 | * EVENT MESSAGE USED |
58 | * ----- ------------ | 58 | * ----- ------------ |
59 | * data GNUNET_MESH_Data OR | 59 | * data GNUNET_MESH_Data OR |
@@ -135,8 +135,8 @@ struct GNUNET_MESH_PeerControl | |||
135 | * (client to service, client created tunnel) | 135 | * (client to service, client created tunnel) |
136 | * GNUNET_MESSAGE_TYPE_MESH_LOCAL_PEER_[CONNECTED|DISCONNECTED] | 136 | * GNUNET_MESSAGE_TYPE_MESH_LOCAL_PEER_[CONNECTED|DISCONNECTED] |
137 | * (service to client) | 137 | * (service to client) |
138 | * | 138 | * |
139 | * Size: sizeof(struct GNUNET_MESH_PeerControl) | 139 | * Size: sizeof(struct GNUNET_MESH_PeerControl) |
140 | */ | 140 | */ |
141 | struct GNUNET_MessageHeader header; | 141 | struct GNUNET_MessageHeader header; |
142 | 142 | ||
@@ -168,7 +168,7 @@ struct GNUNET_MESH_ConnectPeerByType | |||
168 | MESH_TunnelNumber tunnel_id GNUNET_PACKED; | 168 | MESH_TunnelNumber tunnel_id GNUNET_PACKED; |
169 | 169 | ||
170 | /** | 170 | /** |
171 | * Type specification | 171 | * Type specification |
172 | */ | 172 | */ |
173 | GNUNET_MESH_ApplicationType type GNUNET_PACKED; | 173 | GNUNET_MESH_ApplicationType type GNUNET_PACKED; |
174 | }; | 174 | }; |
diff --git a/src/mesh/mesh_api.c b/src/mesh/mesh_api.c index 3a50e44ee..0edb6eb0c 100644 --- a/src/mesh/mesh_api.c +++ b/src/mesh/mesh_api.c | |||
@@ -673,7 +673,7 @@ core_notify (void *cls, size_t size, void *buf) | |||
673 | * @param cork is corking allowed for this transmission? | 673 | * @param cork is corking allowed for this transmission? |
674 | * @param priority how important is the message? | 674 | * @param priority how important is the message? |
675 | * @param maxdelay how long can the message wait? | 675 | * @param maxdelay how long can the message wait? |
676 | * @param target destination for the message, NULL for multicast to all tunnel targets | 676 | * @param target destination for the message, NULL for multicast to all tunnel targets |
677 | * @param notify_size how many bytes of buffer space does notify want? | 677 | * @param notify_size how many bytes of buffer space does notify want? |
678 | * @param notify function to call when buffer space is available; | 678 | * @param notify function to call when buffer space is available; |
679 | * will be called with NULL on timeout or if the overall queue | 679 | * will be called with NULL on timeout or if the overall queue |
diff --git a/src/mesh/mesh_api_new.c b/src/mesh/mesh_api_new.c index 0540c765b..e6e6fdaa8 100644 --- a/src/mesh/mesh_api_new.c +++ b/src/mesh/mesh_api_new.c | |||
@@ -22,7 +22,7 @@ | |||
22 | * @file mesh/mesh_api_new.c | 22 | * @file mesh/mesh_api_new.c |
23 | * @brief mesh api: client implementation of mesh service | 23 | * @brief mesh api: client implementation of mesh service |
24 | * @author Bartlomiej Polot | 24 | * @author Bartlomiej Polot |
25 | * | 25 | * |
26 | * STRUCTURE: | 26 | * STRUCTURE: |
27 | * - CONSTANTS | 27 | * - CONSTANTS |
28 | * - DATA STRUCTURES | 28 | * - DATA STRUCTURES |
@@ -193,7 +193,7 @@ retrieve_tunnel (struct GNUNET_MESH_Handle *h, MESH_TunnelNumber tid) | |||
193 | 193 | ||
194 | /** | 194 | /** |
195 | * Process the new tunnel notification and add it to the tunnels in the handle | 195 | * Process the new tunnel notification and add it to the tunnels in the handle |
196 | * | 196 | * |
197 | * @param h The mesh handle | 197 | * @param h The mesh handle |
198 | * @param msg A message with the details of the new incoming tunnel | 198 | * @param msg A message with the details of the new incoming tunnel |
199 | */ | 199 | */ |
@@ -201,30 +201,30 @@ static void | |||
201 | process_tunnel_create (struct GNUNET_MESH_Handle *h, | 201 | process_tunnel_create (struct GNUNET_MESH_Handle *h, |
202 | const struct GNUNET_MESH_TunnelMessage *msg) | 202 | const struct GNUNET_MESH_TunnelMessage *msg) |
203 | { | 203 | { |
204 | struct GNUNET_MESH_Tunnel *t; | 204 | struct GNUNET_MESH_Tunnel *t; |
205 | MESH_TunnelNumber tid; | 205 | MESH_TunnelNumber tid; |
206 | 206 | ||
207 | tid = ntohl (msg->tunnel_id); | 207 | tid = ntohl (msg->tunnel_id); |
208 | if (tid >= GNUNET_MESH_LOCAL_TUNNEL_ID_MARK) | 208 | if (tid >= GNUNET_MESH_LOCAL_TUNNEL_ID_MARK) |
209 | { | 209 | { |
210 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 210 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
211 | "MESH: received an incoming tunnel with tid in local range (%X)\n", | 211 | "MESH: received an incoming tunnel with tid in local range (%X)\n", |
212 | tid); | 212 | tid); |
213 | GNUNET_break_op (0); | 213 | GNUNET_break_op (0); |
214 | return; //FIXME abort? reconnect? | 214 | return; //FIXME abort? reconnect? |
215 | } | 215 | } |
216 | t = GNUNET_malloc (sizeof (struct GNUNET_MESH_Tunnel)); | 216 | t = GNUNET_malloc (sizeof (struct GNUNET_MESH_Tunnel)); |
217 | t->cls = h->cls; | 217 | t->cls = h->cls; |
218 | t->mesh = h; | 218 | t->mesh = h; |
219 | t->tid = tid; | 219 | t->tid = tid; |
220 | 220 | ||
221 | return; | 221 | return; |
222 | } | 222 | } |
223 | 223 | ||
224 | 224 | ||
225 | /** | 225 | /** |
226 | * Process the new peer event and notify the upper level of it | 226 | * Process the new peer event and notify the upper level of it |
227 | * | 227 | * |
228 | * @param h The mesh handle | 228 | * @param h The mesh handle |
229 | * @param msg A message with the details of the peer event | 229 | * @param msg A message with the details of the peer event |
230 | */ | 230 | */ |
@@ -232,41 +232,41 @@ static void | |||
232 | process_peer_event (struct GNUNET_MESH_Handle *h, | 232 | process_peer_event (struct GNUNET_MESH_Handle *h, |
233 | const struct GNUNET_MESH_PeerControl *msg) | 233 | const struct GNUNET_MESH_PeerControl *msg) |
234 | { | 234 | { |
235 | struct GNUNET_MESH_Tunnel *t; | 235 | struct GNUNET_MESH_Tunnel *t; |
236 | uint16_t size; | 236 | uint16_t size; |
237 | 237 | ||
238 | size = ntohs (msg->header.size); | 238 | size = ntohs (msg->header.size); |
239 | if (size != sizeof (struct GNUNET_MESH_PeerControl)) | 239 | if (size != sizeof (struct GNUNET_MESH_PeerControl)) |
240 | { | 240 | { |
241 | GNUNET_break_op (0); | 241 | GNUNET_break_op (0); |
242 | return; | 242 | return; |
243 | } | 243 | } |
244 | t = retrieve_tunnel (h, ntohl (msg->tunnel_id)); | 244 | t = retrieve_tunnel (h, ntohl (msg->tunnel_id)); |
245 | if (NULL == t) | 245 | if (NULL == t) |
246 | { | 246 | { |
247 | GNUNET_break_op (0); | 247 | GNUNET_break_op (0); |
248 | return; | 248 | return; |
249 | } | 249 | } |
250 | if (GNUNET_MESSAGE_TYPE_MESH_LOCAL_PEER_CONNECTED == msg->header.type) | 250 | if (GNUNET_MESSAGE_TYPE_MESH_LOCAL_PEER_CONNECTED == msg->header.type) |
251 | { | ||
252 | if (NULL != t->connect_handler) | ||
251 | { | 253 | { |
252 | if (NULL != t->connect_handler) | 254 | t->connect_handler (t->cls, &msg->peer, NULL); /* FIXME atsi */ |
253 | { | ||
254 | t->connect_handler (t->cls, &msg->peer, NULL); /* FIXME atsi */ | ||
255 | } | ||
256 | } | 255 | } |
257 | else | 256 | } |
257 | else | ||
258 | { | ||
259 | if (NULL != t->disconnect_handler) | ||
258 | { | 260 | { |
259 | if (NULL != t->disconnect_handler) | 261 | t->disconnect_handler (t->cls, &msg->peer); |
260 | { | ||
261 | t->disconnect_handler (t->cls, &msg->peer); | ||
262 | } | ||
263 | } | 262 | } |
263 | } | ||
264 | } | 264 | } |
265 | 265 | ||
266 | 266 | ||
267 | /** | 267 | /** |
268 | * Process the incoming data packets | 268 | * Process the incoming data packets |
269 | * | 269 | * |
270 | * @param h The mesh handle | 270 | * @param h The mesh handle |
271 | * @param msh A message encapsulating the data | 271 | * @param msh A message encapsulating the data |
272 | */ | 272 | */ |
@@ -274,66 +274,66 @@ static void | |||
274 | process_incoming_data (struct GNUNET_MESH_Handle *h, | 274 | process_incoming_data (struct GNUNET_MESH_Handle *h, |
275 | const struct GNUNET_MessageHeader *message) | 275 | const struct GNUNET_MessageHeader *message) |
276 | { | 276 | { |
277 | const struct GNUNET_MessageHeader *payload; | 277 | const struct GNUNET_MessageHeader *payload; |
278 | const struct GNUNET_MESH_MessageHandler *handler; | 278 | const struct GNUNET_MESH_MessageHandler *handler; |
279 | const struct GNUNET_PeerIdentity *peer; | 279 | const struct GNUNET_PeerIdentity *peer; |
280 | struct GNUNET_MESH_Unicast *ucast; | 280 | struct GNUNET_MESH_Unicast *ucast; |
281 | struct GNUNET_MESH_Multicast *mcast; | 281 | struct GNUNET_MESH_Multicast *mcast; |
282 | struct GNUNET_MESH_ToOrigin *to_orig; | 282 | struct GNUNET_MESH_ToOrigin *to_orig; |
283 | struct GNUNET_MESH_Tunnel *t; | 283 | struct GNUNET_MESH_Tunnel *t; |
284 | uint16_t type; | 284 | uint16_t type; |
285 | int i; | 285 | int i; |
286 | 286 | ||
287 | type = ntohs (message->type); | 287 | type = ntohs (message->type); |
288 | switch (type) | 288 | switch (type) |
289 | { | 289 | { |
290 | case GNUNET_MESSAGE_TYPE_MESH_UNICAST: | 290 | case GNUNET_MESSAGE_TYPE_MESH_UNICAST: |
291 | ucast = (struct GNUNET_MESH_Unicast *) message; | 291 | ucast = (struct GNUNET_MESH_Unicast *) message; |
292 | t = retrieve_tunnel (h, ntohl (ucast->tid)); | 292 | t = retrieve_tunnel (h, ntohl (ucast->tid)); |
293 | payload = (struct GNUNET_MessageHeader *) &ucast[1]; | 293 | payload = (struct GNUNET_MessageHeader *) &ucast[1]; |
294 | peer = &ucast->oid; | 294 | peer = &ucast->oid; |
295 | break; | 295 | break; |
296 | case GNUNET_MESSAGE_TYPE_MESH_MULTICAST: | 296 | case GNUNET_MESSAGE_TYPE_MESH_MULTICAST: |
297 | mcast = (struct GNUNET_MESH_Multicast *) message; | 297 | mcast = (struct GNUNET_MESH_Multicast *) message; |
298 | t = retrieve_tunnel (h, ntohl (mcast->tid)); | 298 | t = retrieve_tunnel (h, ntohl (mcast->tid)); |
299 | payload = (struct GNUNET_MessageHeader *) &mcast[1]; | 299 | payload = (struct GNUNET_MessageHeader *) &mcast[1]; |
300 | peer = &mcast->oid; | 300 | peer = &mcast->oid; |
301 | break; | 301 | break; |
302 | case GNUNET_MESSAGE_TYPE_MESH_TO_ORIGIN: | 302 | case GNUNET_MESSAGE_TYPE_MESH_TO_ORIGIN: |
303 | to_orig = (struct GNUNET_MESH_ToOrigin *) message; | 303 | to_orig = (struct GNUNET_MESH_ToOrigin *) message; |
304 | t = retrieve_tunnel (h, ntohl (to_orig->tid)); | 304 | t = retrieve_tunnel (h, ntohl (to_orig->tid)); |
305 | payload = (struct GNUNET_MessageHeader *) &to_orig[1]; | 305 | payload = (struct GNUNET_MessageHeader *) &to_orig[1]; |
306 | peer = &to_orig->sender; | 306 | peer = &to_orig->sender; |
307 | break; | 307 | break; |
308 | default: | 308 | default: |
309 | GNUNET_break_op (0); | 309 | GNUNET_break_op (0); |
310 | return; | 310 | return; |
311 | } | 311 | } |
312 | if (NULL == t) | 312 | if (NULL == t) |
313 | { | 313 | { |
314 | GNUNET_break_op (0); | 314 | GNUNET_break_op (0); |
315 | return; | 315 | return; |
316 | } | 316 | } |
317 | for (i = 0; i < h->n_handlers; i++) | 317 | for (i = 0; i < h->n_handlers; i++) |
318 | { | ||
319 | handler = &h->message_handlers[i]; | ||
320 | if (handler->type == type) | ||
318 | { | 321 | { |
319 | handler = &h->message_handlers[i]; | 322 | if (GNUNET_OK == handler->callback (h->cls, t, NULL, /* FIXME ctx */ |
320 | if (handler->type == type) | 323 | peer, payload, NULL)) /* FIXME atsi */ |
321 | { | 324 | { |
322 | if (GNUNET_OK == handler->callback (h->cls, t, NULL, /* FIXME ctx */ | 325 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
323 | peer, payload, NULL)) /* FIXME atsi */ | 326 | "MESH: callback completed successfully\n"); |
324 | { | 327 | } |
325 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 328 | else |
326 | "MESH: callback completed successfully\n"); | 329 | { |
327 | } | 330 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
328 | else | 331 | "MESH: callback caused disconnection\n"); |
329 | { | 332 | GNUNET_MESH_disconnect (h); |
330 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 333 | } |
331 | "MESH: callback caused disconnection\n"); | ||
332 | GNUNET_MESH_disconnect (h); | ||
333 | } | ||
334 | } | ||
335 | } | 334 | } |
336 | return; | 335 | } |
336 | return; | ||
337 | } | 337 | } |
338 | 338 | ||
339 | 339 | ||
@@ -346,44 +346,43 @@ process_incoming_data (struct GNUNET_MESH_Handle *h, | |||
346 | static void | 346 | static void |
347 | msg_received (void *cls, const struct GNUNET_MessageHeader *msg) | 347 | msg_received (void *cls, const struct GNUNET_MessageHeader *msg) |
348 | { | 348 | { |
349 | struct GNUNET_MESH_Handle *h = cls; | 349 | struct GNUNET_MESH_Handle *h = cls; |
350 | 350 | ||
351 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 351 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "mesh: received a message from MESH\n"); |
352 | "mesh: received a message from MESH\n"); | 352 | if (msg == NULL) |
353 | if (msg == NULL) | 353 | { |
354 | { | 354 | GNUNET_break_op (0); |
355 | GNUNET_break_op (0); | 355 | return; |
356 | return; | 356 | } |
357 | } | ||
358 | 357 | ||
359 | switch (ntohs (msg->type)) | 358 | switch (ntohs (msg->type)) |
360 | { | 359 | { |
361 | /* Notify of a new incoming tunnel */ | 360 | /* Notify of a new incoming tunnel */ |
362 | case GNUNET_MESSAGE_TYPE_MESH_LOCAL_TUNNEL_CREATE: | 361 | case GNUNET_MESSAGE_TYPE_MESH_LOCAL_TUNNEL_CREATE: |
363 | process_tunnel_create (h, (struct GNUNET_MESH_TunnelMessage *) msg); | 362 | process_tunnel_create (h, (struct GNUNET_MESH_TunnelMessage *) msg); |
364 | break; | 363 | break; |
365 | /* Notify of a new peer or a peer disconnect in the tunnel */ | 364 | /* Notify of a new peer or a peer disconnect in the tunnel */ |
366 | case GNUNET_MESSAGE_TYPE_MESH_LOCAL_PEER_CONNECTED: | 365 | case GNUNET_MESSAGE_TYPE_MESH_LOCAL_PEER_CONNECTED: |
367 | case GNUNET_MESSAGE_TYPE_MESH_LOCAL_PEER_DISCONNECTED: | 366 | case GNUNET_MESSAGE_TYPE_MESH_LOCAL_PEER_DISCONNECTED: |
368 | process_peer_event (h, (struct GNUNET_MESH_PeerControl *) msg); | 367 | process_peer_event (h, (struct GNUNET_MESH_PeerControl *) msg); |
369 | break; | 368 | break; |
370 | /* Notify of a new data packet in the tunnel */ | 369 | /* Notify of a new data packet in the tunnel */ |
371 | case GNUNET_MESSAGE_TYPE_MESH_UNICAST: | 370 | case GNUNET_MESSAGE_TYPE_MESH_UNICAST: |
372 | case GNUNET_MESSAGE_TYPE_MESH_MULTICAST: | 371 | case GNUNET_MESSAGE_TYPE_MESH_MULTICAST: |
373 | case GNUNET_MESSAGE_TYPE_MESH_TO_ORIGIN: | 372 | case GNUNET_MESSAGE_TYPE_MESH_TO_ORIGIN: |
374 | process_incoming_data (h, msg); | 373 | process_incoming_data (h, msg); |
375 | break; | 374 | break; |
376 | /* We shouldn't get any other packages, log and ignore */ | 375 | /* We shouldn't get any other packages, log and ignore */ |
377 | default: | 376 | default: |
378 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 377 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
379 | "MESH: unsolicited message form service (type %d)\n", | 378 | "MESH: unsolicited message form service (type %d)\n", |
380 | ntohs (msg->type)); | 379 | ntohs (msg->type)); |
381 | } | 380 | } |
382 | 381 | ||
383 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "mesh: message processed\n"); | 382 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "mesh: message processed\n"); |
384 | GNUNET_CLIENT_receive (h->client, &msg_received, h, | 383 | GNUNET_CLIENT_receive (h->client, &msg_received, h, |
385 | GNUNET_TIME_UNIT_FOREVER_REL); | 384 | GNUNET_TIME_UNIT_FOREVER_REL); |
386 | return; | 385 | return; |
387 | } | 386 | } |
388 | 387 | ||
389 | 388 | ||
@@ -406,66 +405,65 @@ msg_received (void *cls, const struct GNUNET_MessageHeader *msg) | |||
406 | static size_t | 405 | static size_t |
407 | send_connect_packet (void *cls, size_t size, void *buf) | 406 | send_connect_packet (void *cls, size_t size, void *buf) |
408 | { | 407 | { |
409 | struct GNUNET_MESH_Handle *h = cls; | 408 | struct GNUNET_MESH_Handle *h = cls; |
410 | struct GNUNET_MESH_ClientConnect *msg; | 409 | struct GNUNET_MESH_ClientConnect *msg; |
411 | GNUNET_MESH_ApplicationType *apps; | 410 | GNUNET_MESH_ApplicationType *apps; |
412 | uint16_t napps; | 411 | uint16_t napps; |
413 | uint16_t *types; | 412 | uint16_t *types; |
414 | uint16_t ntypes; | 413 | uint16_t ntypes; |
415 | 414 | ||
416 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 415 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "mesh: Send connect packet()\n", size); |
417 | "mesh: Send connect packet()\n", size); | 416 | h->th = NULL; |
418 | h->th = NULL; | 417 | if (0 == size || NULL == buf) |
419 | if (0 == size || NULL == buf) | 418 | { |
420 | { | 419 | // FIXME: disconnect, reconnect, retry? |
421 | // FIXME: disconnect, reconnect, retry? | 420 | return 0; |
422 | return 0; | 421 | } |
423 | } | 422 | if (sizeof (struct GNUNET_MessageHeader) > size) |
424 | if (sizeof (struct GNUNET_MessageHeader) > size) | 423 | { |
425 | { | 424 | GNUNET_break (0); |
426 | GNUNET_break(0); | 425 | // FIXME: disconnect, reconnect, retry! |
427 | // FIXME: disconnect, reconnect, retry! | 426 | return 0; |
428 | return 0; | 427 | } |
429 | } | 428 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
430 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 429 | "mesh: Send connect packet: %lu bytes buffer\n", size); |
431 | "mesh: Send connect packet: %lu bytes buffer\n", size); | 430 | msg = (struct GNUNET_MESH_ClientConnect *) buf; |
432 | msg = (struct GNUNET_MESH_ClientConnect *) buf; | 431 | msg->header.type = htons (GNUNET_MESSAGE_TYPE_MESH_LOCAL_CONNECT); |
433 | msg->header.type = htons (GNUNET_MESSAGE_TYPE_MESH_LOCAL_CONNECT); | ||
434 | |||
435 | for (ntypes = 0, types = NULL; ntypes < h->n_handlers; ntypes++) | ||
436 | { | ||
437 | types = GNUNET_realloc (types, sizeof (uint16_t) * (ntypes + 1)); | ||
438 | types[ntypes] = h->message_handlers[ntypes].type; | ||
439 | } | ||
440 | 432 | ||
441 | for (napps = 0, apps = NULL; napps < h->n_applications; napps++) | 433 | for (ntypes = 0, types = NULL; ntypes < h->n_handlers; ntypes++) |
442 | { | 434 | { |
443 | apps = | 435 | types = GNUNET_realloc (types, sizeof (uint16_t) * (ntypes + 1)); |
444 | GNUNET_realloc (apps, | 436 | types[ntypes] = h->message_handlers[ntypes].type; |
445 | sizeof (GNUNET_MESH_ApplicationType) * (napps + 1)); | 437 | } |
446 | apps[napps] = h->applications[napps]; | ||
447 | } | ||
448 | 438 | ||
449 | msg->header.size = | 439 | for (napps = 0, apps = NULL; napps < h->n_applications; napps++) |
450 | htons (sizeof (struct GNUNET_MESH_ClientConnect) + | 440 | { |
451 | sizeof (uint16_t) * ntypes + | 441 | apps = |
452 | sizeof (GNUNET_MESH_ApplicationType) * napps); | 442 | GNUNET_realloc (apps, |
453 | memcpy (&msg[1], types, sizeof (uint16_t) * ntypes); | 443 | sizeof (GNUNET_MESH_ApplicationType) * (napps + 1)); |
454 | types = (uint16_t *) &msg[1]; | 444 | apps[napps] = h->applications[napps]; |
455 | memcpy (&types[ntypes], apps, sizeof (GNUNET_MESH_ApplicationType) * napps); | 445 | } |
456 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
457 | "mesh: Sent %lu bytes long message %d types and %d apps\n", | ||
458 | ntohs (msg->header.size), ntypes, napps); | ||
459 | msg->applications = htons (napps); | ||
460 | msg->types = htons (ntypes); | ||
461 | |||
462 | /* start listening */ | ||
463 | GNUNET_CLIENT_receive (h->client, &msg_received, h, | ||
464 | GNUNET_TIME_UNIT_FOREVER_REL); | ||
465 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
466 | "mesh: Send connect packet() END\n", size); | ||
467 | 446 | ||
468 | return ntohs (msg->header.size); | 447 | msg->header.size = |
448 | htons (sizeof (struct GNUNET_MESH_ClientConnect) + | ||
449 | sizeof (uint16_t) * ntypes + | ||
450 | sizeof (GNUNET_MESH_ApplicationType) * napps); | ||
451 | memcpy (&msg[1], types, sizeof (uint16_t) * ntypes); | ||
452 | types = (uint16_t *) & msg[1]; | ||
453 | memcpy (&types[ntypes], apps, sizeof (GNUNET_MESH_ApplicationType) * napps); | ||
454 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
455 | "mesh: Sent %lu bytes long message %d types and %d apps\n", | ||
456 | ntohs (msg->header.size), ntypes, napps); | ||
457 | msg->applications = htons (napps); | ||
458 | msg->types = htons (ntypes); | ||
459 | |||
460 | /* start listening */ | ||
461 | GNUNET_CLIENT_receive (h->client, &msg_received, h, | ||
462 | GNUNET_TIME_UNIT_FOREVER_REL); | ||
463 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "mesh: Send connect packet() END\n", | ||
464 | size); | ||
465 | |||
466 | return ntohs (msg->header.size); | ||
469 | } | 467 | } |
470 | 468 | ||
471 | 469 | ||
@@ -496,7 +494,7 @@ send_tunnel_create_packet (void *cls, size_t size, void *buf) | |||
496 | } | 494 | } |
497 | if (sizeof (struct GNUNET_MESH_TunnelMessage) > size) | 495 | if (sizeof (struct GNUNET_MESH_TunnelMessage) > size) |
498 | { | 496 | { |
499 | GNUNET_break(0); | 497 | GNUNET_break (0); |
500 | // FIXME: disconnect, reconnect, retry? | 498 | // FIXME: disconnect, reconnect, retry? |
501 | return 0; | 499 | return 0; |
502 | } | 500 | } |
@@ -529,35 +527,35 @@ send_tunnel_create_packet (void *cls, size_t size, void *buf) | |||
529 | static size_t | 527 | static size_t |
530 | send_tunnel_destroy_packet (void *cls, size_t size, void *buf) | 528 | send_tunnel_destroy_packet (void *cls, size_t size, void *buf) |
531 | { | 529 | { |
532 | struct GNUNET_MESH_Tunnel *t = cls; | 530 | struct GNUNET_MESH_Tunnel *t = cls; |
533 | struct GNUNET_MESH_Handle *h; | 531 | struct GNUNET_MESH_Handle *h; |
534 | struct GNUNET_MESH_TunnelMessage *msg; | 532 | struct GNUNET_MESH_TunnelMessage *msg; |
535 | 533 | ||
536 | h = t->mesh; | 534 | h = t->mesh; |
537 | h->th = NULL; | 535 | h->th = NULL; |
538 | if (0 == size || buf == NULL) | 536 | if (0 == size || buf == NULL) |
539 | { | 537 | { |
540 | return 0; | 538 | return 0; |
541 | } | 539 | } |
542 | if (sizeof (struct GNUNET_MESH_TunnelMessage) > size) | 540 | if (sizeof (struct GNUNET_MESH_TunnelMessage) > size) |
543 | { | 541 | { |
544 | GNUNET_break(0); | 542 | GNUNET_break (0); |
545 | // FIXME: disconnect, reconnect, retry! | 543 | // FIXME: disconnect, reconnect, retry! |
546 | return 0; | 544 | return 0; |
547 | } | 545 | } |
548 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 546 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
549 | "Send tunnel destroy packet: %lu bytes buffer\n", size); | 547 | "Send tunnel destroy packet: %lu bytes buffer\n", size); |
550 | msg = (struct GNUNET_MESH_TunnelMessage *) buf; | 548 | msg = (struct GNUNET_MESH_TunnelMessage *) buf; |
551 | msg->header.type = htons (GNUNET_MESSAGE_TYPE_MESH_LOCAL_TUNNEL_DESTROY); | 549 | msg->header.type = htons (GNUNET_MESSAGE_TYPE_MESH_LOCAL_TUNNEL_DESTROY); |
552 | 550 | ||
553 | msg->header.size = htons (sizeof (struct GNUNET_MESH_TunnelMessage)); | 551 | msg->header.size = htons (sizeof (struct GNUNET_MESH_TunnelMessage)); |
554 | msg->tunnel_id = htonl (t->tid); | 552 | msg->tunnel_id = htonl (t->tid); |
555 | 553 | ||
556 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Sent %lu bytes long message\n", | 554 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Sent %lu bytes long message\n", |
557 | ntohs (msg->header.size)); | 555 | ntohs (msg->header.size)); |
558 | GNUNET_free(t); | 556 | GNUNET_free (t); |
559 | 557 | ||
560 | return sizeof (struct GNUNET_MESH_TunnelMessage); | 558 | return sizeof (struct GNUNET_MESH_TunnelMessage); |
561 | } | 559 | } |
562 | 560 | ||
563 | 561 | ||
@@ -577,7 +575,7 @@ send_tunnel_destroy_packet (void *cls, size_t size, void *buf) | |||
577 | * inbound messages if the client does not process them fast | 575 | * inbound messages if the client does not process them fast |
578 | * enough (for this notification type, a bounded queue is used) | 576 | * enough (for this notification type, a bounded queue is used) |
579 | * @param stypes Application Types the client claims to offer | 577 | * @param stypes Application Types the client claims to offer |
580 | * @return handle to the mesh service | 578 | * @return handle to the mesh service |
581 | * NULL on error (in this case, init is never called) | 579 | * NULL on error (in this case, init is never called) |
582 | */ | 580 | */ |
583 | struct GNUNET_MESH_Handle * | 581 | struct GNUNET_MESH_Handle * |
@@ -586,8 +584,8 @@ GNUNET_MESH_connect (const struct GNUNET_CONFIGURATION_Handle *cfg, void *cls, | |||
586 | const struct GNUNET_MESH_MessageHandler *handlers, | 584 | const struct GNUNET_MESH_MessageHandler *handlers, |
587 | const GNUNET_MESH_ApplicationType *stypes) | 585 | const GNUNET_MESH_ApplicationType *stypes) |
588 | { | 586 | { |
589 | struct GNUNET_MESH_Handle *h; | 587 | struct GNUNET_MESH_Handle *h; |
590 | size_t size; | 588 | size_t size; |
591 | 589 | ||
592 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "mesh: GNUNET_MESH_connect()\n"); | 590 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "mesh: GNUNET_MESH_connect()\n"); |
593 | h = GNUNET_malloc (sizeof (struct GNUNET_MESH_Handle)); | 591 | h = GNUNET_malloc (sizeof (struct GNUNET_MESH_Handle)); |
@@ -596,7 +594,7 @@ GNUNET_MESH_connect (const struct GNUNET_CONFIGURATION_Handle *cfg, void *cls, | |||
596 | h->client = GNUNET_CLIENT_connect ("mesh", cfg); | 594 | h->client = GNUNET_CLIENT_connect ("mesh", cfg); |
597 | if (h->client == NULL) | 595 | if (h->client == NULL) |
598 | { | 596 | { |
599 | GNUNET_break(0); | 597 | GNUNET_break (0); |
600 | GNUNET_free (h); | 598 | GNUNET_free (h); |
601 | return NULL; | 599 | return NULL; |
602 | } | 600 | } |
@@ -613,11 +611,11 @@ GNUNET_MESH_connect (const struct GNUNET_CONFIGURATION_Handle *cfg, void *cls, | |||
613 | size += h->n_handlers * sizeof (uint16_t); | 611 | size += h->n_handlers * sizeof (uint16_t); |
614 | size += h->n_applications * sizeof (GNUNET_MESH_ApplicationType); | 612 | size += h->n_applications * sizeof (GNUNET_MESH_ApplicationType); |
615 | 613 | ||
616 | if (NULL != h->th) { | 614 | if (NULL != h->th) |
617 | /* FIXME implement queue system instead */ | 615 | { |
618 | GNUNET_log(GNUNET_ERROR_TYPE_ERROR, | 616 | /* FIXME implement queue system instead */ |
619 | "mesh: overwriting th of mesh\n"); | 617 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "mesh: overwriting th of mesh\n"); |
620 | GNUNET_CLIENT_notify_transmit_ready_cancel(h->th); | 618 | GNUNET_CLIENT_notify_transmit_ready_cancel (h->th); |
621 | } | 619 | } |
622 | h->th = | 620 | h->th = |
623 | GNUNET_CLIENT_notify_transmit_ready (h->client, size, | 621 | GNUNET_CLIENT_notify_transmit_ready (h->client, size, |
@@ -676,11 +674,11 @@ GNUNET_MESH_tunnel_create (struct GNUNET_MESH_Handle *h, | |||
676 | tunnel->mesh = h; | 674 | tunnel->mesh = h; |
677 | tunnel->tid = h->next_tid++; | 675 | tunnel->tid = h->next_tid++; |
678 | h->next_tid |= GNUNET_MESH_LOCAL_TUNNEL_ID_MARK; // keep in range | 676 | h->next_tid |= GNUNET_MESH_LOCAL_TUNNEL_ID_MARK; // keep in range |
679 | if (NULL != h->th) { | 677 | if (NULL != h->th) |
680 | /* FIXME implement queue system instead */ | 678 | { |
681 | GNUNET_log(GNUNET_ERROR_TYPE_ERROR, | 679 | /* FIXME implement queue system instead */ |
682 | "mesh: overwriting th of mesh\n"); | 680 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "mesh: overwriting th of mesh\n"); |
683 | GNUNET_CLIENT_notify_transmit_ready_cancel(h->th); | 681 | GNUNET_CLIENT_notify_transmit_ready_cancel (h->th); |
684 | } | 682 | } |
685 | h->th = | 683 | h->th = |
686 | GNUNET_CLIENT_notify_transmit_ready (h->client, | 684 | GNUNET_CLIENT_notify_transmit_ready (h->client, |
@@ -703,21 +701,21 @@ GNUNET_MESH_tunnel_create (struct GNUNET_MESH_Handle *h, | |||
703 | void | 701 | void |
704 | GNUNET_MESH_tunnel_destroy (struct GNUNET_MESH_Tunnel *tun) | 702 | GNUNET_MESH_tunnel_destroy (struct GNUNET_MESH_Tunnel *tun) |
705 | { | 703 | { |
706 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "mesh: Destroying tunnel\n"); | 704 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "mesh: Destroying tunnel\n"); |
707 | if (NULL != tun->mesh->th) { | 705 | if (NULL != tun->mesh->th) |
708 | /* FIXME implement queue system instead */ | 706 | { |
709 | GNUNET_log(GNUNET_ERROR_TYPE_ERROR, | 707 | /* FIXME implement queue system instead */ |
710 | "mesh: overwriting th of mesh\n"); | 708 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "mesh: overwriting th of mesh\n"); |
711 | GNUNET_CLIENT_notify_transmit_ready_cancel(tun->mesh->th); | 709 | GNUNET_CLIENT_notify_transmit_ready_cancel (tun->mesh->th); |
712 | } | 710 | } |
713 | tun->mesh->th = GNUNET_CLIENT_notify_transmit_ready ( | 711 | tun->mesh->th = |
714 | tun->mesh->client, | 712 | GNUNET_CLIENT_notify_transmit_ready (tun->mesh->client, |
715 | sizeof (struct | 713 | sizeof (struct |
716 | GNUNET_MESH_TunnelMessage), | 714 | GNUNET_MESH_TunnelMessage), |
717 | GNUNET_TIME_UNIT_FOREVER_REL, | 715 | GNUNET_TIME_UNIT_FOREVER_REL, |
718 | GNUNET_YES, | 716 | GNUNET_YES, |
719 | &send_tunnel_destroy_packet, | 717 | &send_tunnel_destroy_packet, |
720 | (void *) tun); | 718 | (void *) tun); |
721 | } | 719 | } |
722 | 720 | ||
723 | 721 | ||
@@ -792,7 +790,7 @@ GNUNET_MESH_peer_request_connect_by_type (struct GNUNET_MESH_Tunnel *tunnel, | |||
792 | * @param priority how important is the message? | 790 | * @param priority how important is the message? |
793 | * @param maxdelay how long can the message wait? | 791 | * @param maxdelay how long can the message wait? |
794 | * @param target destination for the message, | 792 | * @param target destination for the message, |
795 | * NULL for multicast to all tunnel targets | 793 | * NULL for multicast to all tunnel targets |
796 | * @param notify_size how many bytes of buffer space does notify want? | 794 | * @param notify_size how many bytes of buffer space does notify want? |
797 | * @param notify function to call when buffer space is available; | 795 | * @param notify function to call when buffer space is available; |
798 | * will be called with NULL on timeout or if the overall queue | 796 | * will be called with NULL on timeout or if the overall queue |
diff --git a/src/mesh/test_mesh_api.c b/src/mesh/test_mesh_api.c index af6b5e3e7..fbef7ee19 100644 --- a/src/mesh/test_mesh_api.c +++ b/src/mesh/test_mesh_api.c | |||
@@ -67,33 +67,33 @@ static struct GNUNET_MESH_MessageHandler handlers[] = { {&callback, 1, 0}, | |||
67 | static void | 67 | static void |
68 | do_shutdown (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 68 | do_shutdown (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) |
69 | { | 69 | { |
70 | fprintf(stderr, "++++++++ STARTING SHUTDOWN\n"); | 70 | fprintf (stderr, "++++++++ STARTING SHUTDOWN\n"); |
71 | fprintf(stderr, "+++++++++ ABORT TASK\n"); | 71 | fprintf (stderr, "+++++++++ ABORT TASK\n"); |
72 | if (0 != abort_task) | 72 | if (0 != abort_task) |
73 | { | 73 | { |
74 | GNUNET_SCHEDULER_cancel (abort_task); | 74 | GNUNET_SCHEDULER_cancel (abort_task); |
75 | } | 75 | } |
76 | fprintf(stderr, "+++++++++ DISCONNECT MESH\n"); | 76 | fprintf (stderr, "+++++++++ DISCONNECT MESH\n"); |
77 | if (NULL != mesh) | 77 | if (NULL != mesh) |
78 | { | 78 | { |
79 | GNUNET_MESH_disconnect (mesh); | 79 | GNUNET_MESH_disconnect (mesh); |
80 | } | 80 | } |
81 | fprintf(stderr, "+++++++++ KILL PROCESS\n"); | 81 | fprintf (stderr, "+++++++++ KILL PROCESS\n"); |
82 | if (0 != GNUNET_OS_process_kill (arm_pid, SIGTERM)) | 82 | if (0 != GNUNET_OS_process_kill (arm_pid, SIGTERM)) |
83 | { | 83 | { |
84 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); | 84 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); |
85 | } | 85 | } |
86 | fprintf(stderr, "+++++++++ WAIT\n"); | 86 | fprintf (stderr, "+++++++++ WAIT\n"); |
87 | GNUNET_assert (GNUNET_OK == GNUNET_OS_process_wait (arm_pid)); | 87 | GNUNET_assert (GNUNET_OK == GNUNET_OS_process_wait (arm_pid)); |
88 | fprintf(stderr, "+++++++++ PROCESS CLOSE\n"); | 88 | fprintf (stderr, "+++++++++ PROCESS CLOSE\n"); |
89 | GNUNET_OS_process_close (arm_pid); | 89 | GNUNET_OS_process_close (arm_pid); |
90 | fprintf(stderr, "++++++++ END SHUTDOWN\n"); | 90 | fprintf (stderr, "++++++++ END SHUTDOWN\n"); |
91 | } | 91 | } |
92 | 92 | ||
93 | static void | 93 | static void |
94 | do_abort (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 94 | do_abort (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) |
95 | { | 95 | { |
96 | fprintf(stderr, "++++++++ STARTING ABORT\n"); | 96 | fprintf (stderr, "++++++++ STARTING ABORT\n"); |
97 | if (0 != test_task) | 97 | if (0 != test_task) |
98 | { | 98 | { |
99 | GNUNET_SCHEDULER_cancel (test_task); | 99 | GNUNET_SCHEDULER_cancel (test_task); |
@@ -101,16 +101,16 @@ do_abort (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
101 | result = GNUNET_SYSERR; | 101 | result = GNUNET_SYSERR; |
102 | abort_task = 0; | 102 | abort_task = 0; |
103 | do_shutdown (cls, tc); | 103 | do_shutdown (cls, tc); |
104 | fprintf(stderr, "++++++++ END ABORT\n"); | 104 | fprintf (stderr, "++++++++ END ABORT\n"); |
105 | } | 105 | } |
106 | 106 | ||
107 | static void | 107 | static void |
108 | test (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 108 | test (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) |
109 | { | 109 | { |
110 | struct GNUNET_CONFIGURATION_Handle *cfg = cls; | 110 | struct GNUNET_CONFIGURATION_Handle *cfg = cls; |
111 | static const GNUNET_MESH_ApplicationType app[] = {1,2,3,0}; | 111 | static const GNUNET_MESH_ApplicationType app[] = { 1, 2, 3, 0 }; |
112 | 112 | ||
113 | fprintf(stderr, "++++++++ STARTING TEST\n"); | 113 | fprintf (stderr, "++++++++ STARTING TEST\n"); |
114 | test_task = (GNUNET_SCHEDULER_TaskIdentifier) 0; | 114 | test_task = (GNUNET_SCHEDULER_TaskIdentifier) 0; |
115 | mesh = GNUNET_MESH_connect (cfg, NULL, NULL, handlers, app); | 115 | mesh = GNUNET_MESH_connect (cfg, NULL, NULL, handlers, app); |
116 | if (NULL == mesh) | 116 | if (NULL == mesh) |
@@ -123,8 +123,10 @@ test (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
123 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "YAY! CONNECTED TO MESH :D\n"); | 123 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "YAY! CONNECTED TO MESH :D\n"); |
124 | } | 124 | } |
125 | 125 | ||
126 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, 3), &do_shutdown, NULL); | 126 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply |
127 | fprintf(stderr, "++++++++ END TEST\n"); | 127 | (GNUNET_TIME_UNIT_SECONDS, 3), &do_shutdown, |
128 | NULL); | ||
129 | fprintf (stderr, "++++++++ END TEST\n"); | ||
128 | } | 130 | } |
129 | 131 | ||
130 | 132 | ||
@@ -132,14 +134,14 @@ static void | |||
132 | run (void *cls, char *const *args, const char *cfgfile, | 134 | run (void *cls, char *const *args, const char *cfgfile, |
133 | const struct GNUNET_CONFIGURATION_Handle *cfg) | 135 | const struct GNUNET_CONFIGURATION_Handle *cfg) |
134 | { | 136 | { |
135 | fprintf(stderr, "++++++++ STARTING RUN\n"); | 137 | fprintf (stderr, "++++++++ STARTING RUN\n"); |
136 | GNUNET_log_setup ("test_mesh_small", | 138 | GNUNET_log_setup ("test_mesh_small", |
137 | #if VERBOSE | 139 | #if VERBOSE |
138 | "DEBUG", | 140 | "DEBUG", |
139 | #else | 141 | #else |
140 | "WARNING", | 142 | "WARNING", |
141 | #endif | 143 | #endif |
142 | NULL); | 144 | NULL); |
143 | arm_pid = | 145 | arm_pid = |
144 | GNUNET_OS_start_process (NULL, NULL, "gnunet-service-arm", | 146 | GNUNET_OS_start_process (NULL, NULL, "gnunet-service-arm", |
145 | "gnunet-service-arm", | 147 | "gnunet-service-arm", |
@@ -152,10 +154,12 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
152 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply | 154 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply |
153 | (GNUNET_TIME_UNIT_SECONDS, 20), &do_abort, | 155 | (GNUNET_TIME_UNIT_SECONDS, 20), &do_abort, |
154 | NULL); | 156 | NULL); |
155 | test_task = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS, &test, (void *)cfg); | 157 | test_task = |
158 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS, &test, | ||
159 | (void *) cfg); | ||
156 | // GNUNET_SCHEDULER_add_now (&test, (void *)cfg); | 160 | // GNUNET_SCHEDULER_add_now (&test, (void *)cfg); |
157 | 161 | ||
158 | fprintf(stderr, "++++++++ END RUN\n"); | 162 | fprintf (stderr, "++++++++ END RUN\n"); |
159 | } | 163 | } |
160 | 164 | ||
161 | 165 | ||
@@ -163,6 +167,7 @@ int | |||
163 | main (int argc, char *argv[]) | 167 | main (int argc, char *argv[]) |
164 | { | 168 | { |
165 | int ret; | 169 | int ret; |
170 | |||
166 | char *const argv2[] = { "test-mesh-api", | 171 | char *const argv2[] = { "test-mesh-api", |
167 | "-c", "test_mesh.conf", | 172 | "-c", "test_mesh.conf", |
168 | #if VERBOSE | 173 | #if VERBOSE |
@@ -174,7 +179,7 @@ main (int argc, char *argv[]) | |||
174 | GNUNET_GETOPT_OPTION_END | 179 | GNUNET_GETOPT_OPTION_END |
175 | }; | 180 | }; |
176 | 181 | ||
177 | fprintf(stderr, "++++++++ STARTING TEST_API\n"); | 182 | fprintf (stderr, "++++++++ STARTING TEST_API\n"); |
178 | ret = | 183 | ret = |
179 | GNUNET_PROGRAM_run ((sizeof (argv2) / sizeof (char *)) - 1, argv2, | 184 | GNUNET_PROGRAM_run ((sizeof (argv2) / sizeof (char *)) - 1, argv2, |
180 | "test-mesh-api", "nohelp", options, &run, NULL); | 185 | "test-mesh-api", "nohelp", options, &run, NULL); |
@@ -191,6 +196,6 @@ main (int argc, char *argv[]) | |||
191 | return 1; | 196 | return 1; |
192 | } | 197 | } |
193 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test ok\n"); | 198 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test ok\n"); |
194 | fprintf(stderr, "++++++++ END TEST_API\n"); | 199 | fprintf (stderr, "++++++++ END TEST_API\n"); |
195 | return 0; | 200 | return 0; |
196 | } | 201 | } |
diff --git a/src/mesh/test_mesh_small.c b/src/mesh/test_mesh_small.c index 30b2d8aef..6234d0359 100644 --- a/src/mesh/test_mesh_small.c +++ b/src/mesh/test_mesh_small.c | |||
@@ -48,7 +48,7 @@ struct StatsContext | |||
48 | 48 | ||
49 | 49 | ||
50 | // static struct MeshPeer *peer_head; | 50 | // static struct MeshPeer *peer_head; |
51 | // | 51 | // |
52 | // static struct MeshPeer *peer_tail; | 52 | // static struct MeshPeer *peer_tail; |
53 | 53 | ||
54 | /** | 54 | /** |
@@ -180,7 +180,7 @@ shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
180 | if (data_file != NULL) | 180 | if (data_file != NULL) |
181 | GNUNET_DISK_file_close (data_file); | 181 | GNUNET_DISK_file_close (data_file); |
182 | GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL); | 182 | GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL); |
183 | GNUNET_CONFIGURATION_destroy(testing_cfg); | 183 | GNUNET_CONFIGURATION_destroy (testing_cfg); |
184 | } | 184 | } |
185 | 185 | ||
186 | 186 | ||
@@ -189,7 +189,7 @@ shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
189 | */ | 189 | */ |
190 | static struct GNUNET_MESH_MessageHandler handlers[] = { | 190 | static struct GNUNET_MESH_MessageHandler handlers[] = { |
191 | // {&callback, 1, 0}, | 191 | // {&callback, 1, 0}, |
192 | {NULL, 0, 0} | 192 | {NULL, 0, 0} |
193 | }; | 193 | }; |
194 | 194 | ||
195 | 195 | ||
@@ -203,15 +203,13 @@ static struct GNUNET_MESH_MessageHandler handlers[] = { | |||
203 | * with the tunnel is stored | 203 | * with the tunnel is stored |
204 | */ | 204 | */ |
205 | static void | 205 | static void |
206 | tunnel_cleaner (void *cls, | 206 | tunnel_cleaner (void *cls, const struct GNUNET_MESH_Tunnel *tunnel, |
207 | const struct GNUNET_MESH_Tunnel * tunnel, | ||
208 | void **tunnel_ctx) | 207 | void **tunnel_ctx) |
209 | { | 208 | { |
210 | #if VERBOSE | 209 | #if VERBOSE |
211 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 210 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "tunnel disconnected\n"); |
212 | "tunnel disconnected\n"); | ||
213 | #endif | 211 | #endif |
214 | return; | 212 | return; |
215 | } | 213 | } |
216 | 214 | ||
217 | /** | 215 | /** |
@@ -223,9 +221,8 @@ tunnel_cleaner (void *cls, | |||
223 | static void | 221 | static void |
224 | dh (void *cls, const struct GNUNET_PeerIdentity *peer) | 222 | dh (void *cls, const struct GNUNET_PeerIdentity *peer) |
225 | { | 223 | { |
226 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 224 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "peer disconnected\n"); |
227 | "peer disconnected\n"); | 225 | return; |
228 | return; | ||
229 | } | 226 | } |
230 | 227 | ||
231 | 228 | ||
@@ -237,48 +234,43 @@ dh (void *cls, const struct GNUNET_PeerIdentity *peer) | |||
237 | * @param atsi performance data for the connection | 234 | * @param atsi performance data for the connection |
238 | */ | 235 | */ |
239 | static void | 236 | static void |
240 | ch (void *cls, | 237 | ch (void *cls, const struct GNUNET_PeerIdentity *peer, |
241 | const struct GNUNET_PeerIdentity * peer, | 238 | const struct GNUNET_TRANSPORT_ATS_Information *atsi) |
242 | const struct GNUNET_TRANSPORT_ATS_Information * atsi) | ||
243 | { | 239 | { |
244 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 240 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "peer connected\n"); |
245 | "peer connected\n"); | 241 | return; |
246 | return; | ||
247 | } | 242 | } |
248 | 243 | ||
249 | 244 | ||
250 | /** | 245 | /** |
251 | * connect_mesh_service: connect to the mesh service of one of the peers | 246 | * connect_mesh_service: connect to the mesh service of one of the peers |
252 | * | 247 | * |
253 | */ | 248 | */ |
254 | static void | 249 | static void |
255 | connect_mesh_service (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 250 | connect_mesh_service (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) |
256 | { | 251 | { |
257 | struct GNUNET_TESTING_Daemon *d; | 252 | struct GNUNET_TESTING_Daemon *d; |
258 | struct GNUNET_MESH_Handle *h; | 253 | struct GNUNET_MESH_Handle *h; |
259 | struct GNUNET_MESH_Tunnel *t; | 254 | struct GNUNET_MESH_Tunnel *t; |
260 | GNUNET_MESH_ApplicationType app; | 255 | GNUNET_MESH_ApplicationType app; |
261 | 256 | ||
262 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 257 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "connect_mesh_service\n"); |
263 | "connect_mesh_service\n"); | ||
264 | 258 | ||
265 | d = GNUNET_TESTING_daemon_get(pg, 1); | 259 | d = GNUNET_TESTING_daemon_get (pg, 1); |
266 | app = (GNUNET_MESH_ApplicationType) 0; | 260 | app = (GNUNET_MESH_ApplicationType) 0; |
267 | 261 | ||
268 | #if VERBOSE | 262 | #if VERBOSE |
269 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 263 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
270 | "connecting to mesh service of peer %s\n", | 264 | "connecting to mesh service of peer %s\n", GNUNET_i2s (&d->id)); |
271 | GNUNET_i2s(&d->id)); | ||
272 | #endif | 265 | #endif |
273 | h = GNUNET_MESH_connect(d->cfg, NULL, &tunnel_cleaner, handlers, &app); | 266 | h = GNUNET_MESH_connect (d->cfg, NULL, &tunnel_cleaner, handlers, &app); |
274 | #if VERBOSE | 267 | #if VERBOSE |
275 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 268 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "connected to mesh service of peer %s\n", |
276 | "connected to mesh service of peer %s\n", | 269 | GNUNET_i2s (&d->id)); |
277 | GNUNET_i2s(&d->id)); | ||
278 | #endif | 270 | #endif |
279 | t = GNUNET_MESH_tunnel_create(h, &ch, &dh, NULL); | 271 | t = GNUNET_MESH_tunnel_create (h, &ch, &dh, NULL); |
280 | GNUNET_MESH_tunnel_destroy(t); | 272 | GNUNET_MESH_tunnel_destroy (t); |
281 | GNUNET_MESH_disconnect(h); | 273 | GNUNET_MESH_disconnect (h); |
282 | } | 274 | } |
283 | 275 | ||
284 | 276 | ||
@@ -338,8 +330,8 @@ statistics_iterator (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
338 | { | 330 | { |
339 | struct StatsContext *stats_context = cls; | 331 | struct StatsContext *stats_context = cls; |
340 | 332 | ||
341 | // | 333 | // |
342 | // if ( (0 == strstr(subsystem, "nse")) && | 334 | // if ( (0 == strstr(subsystem, "nse")) && |
343 | // (0 == strstr(name, "# flood messages received")) ) | 335 | // (0 == strstr(name, "# flood messages received")) ) |
344 | stats_context->total_mesh_bytes += 1; //value; | 336 | stats_context->total_mesh_bytes += 1; //value; |
345 | return GNUNET_OK; | 337 | return GNUNET_OK; |
@@ -489,38 +481,38 @@ churn_peers (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
489 | static void | 481 | static void |
490 | peergroup_ready (void *cls, const char *emsg) | 482 | peergroup_ready (void *cls, const char *emsg) |
491 | { | 483 | { |
492 | char *buf; | 484 | char *buf; |
493 | int buf_len; | 485 | int buf_len; |
494 | 486 | ||
495 | if (emsg != NULL) | 487 | if (emsg != NULL) |
496 | { | 488 | { |
497 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 489 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
498 | "Peergroup callback called with error, aborting test!\n"); | 490 | "Peergroup callback called with error, aborting test!\n"); |
499 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Error from testing: `%s'\n"); | 491 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Error from testing: `%s'\n"); |
500 | ok = 1; | 492 | ok = 1; |
501 | GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL); | 493 | GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL); |
502 | return; | 494 | return; |
503 | } | 495 | } |
504 | 496 | ||
505 | #if VERBOSE | 497 | #if VERBOSE |
506 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peer Group started successfully!\n"); | 498 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peer Group started successfully!\n"); |
507 | #endif | 499 | #endif |
508 | 500 | ||
509 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Have %u connections\n", | 501 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Have %u connections\n", |
510 | total_connections); | 502 | total_connections); |
511 | if (data_file != NULL) | 503 | if (data_file != NULL) |
512 | { | 504 | { |
513 | buf = NULL; | 505 | buf = NULL; |
514 | buf_len = GNUNET_asprintf (&buf, "CONNECTIONS_0: %u\n", total_connections); | 506 | buf_len = GNUNET_asprintf (&buf, "CONNECTIONS_0: %u\n", total_connections); |
515 | if (buf_len > 0) | 507 | if (buf_len > 0) |
516 | GNUNET_DISK_file_write (data_file, buf, buf_len); | 508 | GNUNET_DISK_file_write (data_file, buf, buf_len); |
517 | GNUNET_free (buf); | 509 | GNUNET_free (buf); |
518 | } | 510 | } |
519 | peers_running = GNUNET_TESTING_daemons_running (pg); | 511 | peers_running = GNUNET_TESTING_daemons_running (pg); |
520 | 512 | ||
521 | GNUNET_SCHEDULER_add_now (&connect_mesh_service, NULL); | 513 | GNUNET_SCHEDULER_add_now (&connect_mesh_service, NULL); |
522 | disconnect_task = | 514 | disconnect_task = |
523 | GNUNET_SCHEDULER_add_delayed (wait_time, &disconnect_mesh_peers, NULL); | 515 | GNUNET_SCHEDULER_add_delayed (wait_time, &disconnect_mesh_peers, NULL); |
524 | 516 | ||
525 | } | 517 | } |
526 | 518 | ||
@@ -563,110 +555,112 @@ static void | |||
563 | run (void *cls, char *const *args, const char *cfgfile, | 555 | run (void *cls, char *const *args, const char *cfgfile, |
564 | const struct GNUNET_CONFIGURATION_Handle *cfg) | 556 | const struct GNUNET_CONFIGURATION_Handle *cfg) |
565 | { | 557 | { |
566 | char *temp_str; | 558 | char *temp_str; |
567 | unsigned long long temp_wait; | 559 | unsigned long long temp_wait; |
568 | struct GNUNET_TESTING_Host *hosts; | 560 | struct GNUNET_TESTING_Host *hosts; |
569 | 561 | ||
570 | ok = 1; | 562 | ok = 1; |
571 | testing_cfg = GNUNET_CONFIGURATION_dup(cfg); | 563 | testing_cfg = GNUNET_CONFIGURATION_dup (cfg); |
572 | 564 | ||
573 | GNUNET_log_setup ("test_mesh_small", | 565 | GNUNET_log_setup ("test_mesh_small", |
574 | #if VERBOSE | 566 | #if VERBOSE |
575 | "DEBUG", | 567 | "DEBUG", |
576 | #else | 568 | #else |
577 | "WARNING", | 569 | "WARNING", |
578 | #endif | 570 | #endif |
579 | NULL); | 571 | NULL); |
580 | 572 | ||
581 | #if VERBOSE | 573 | #if VERBOSE |
582 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Starting daemons.\n"); | 574 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Starting daemons.\n"); |
583 | GNUNET_CONFIGURATION_set_value_string (testing_cfg, "testing", | 575 | GNUNET_CONFIGURATION_set_value_string (testing_cfg, "testing", |
584 | "use_progressbars", "YES"); | 576 | "use_progressbars", "YES"); |
585 | #endif | 577 | #endif |
586 | 578 | ||
579 | if (GNUNET_OK != | ||
580 | GNUNET_CONFIGURATION_get_value_number (testing_cfg, "testing", | ||
581 | "num_peers", &num_peers)) | ||
582 | { | ||
583 | GNUNET_CONFIGURATION_load (testing_cfg, "test_mesh_small.conf"); | ||
587 | if (GNUNET_OK != | 584 | if (GNUNET_OK != |
588 | GNUNET_CONFIGURATION_get_value_number (testing_cfg, "testing", | 585 | GNUNET_CONFIGURATION_get_value_number (testing_cfg, "testing", |
589 | "num_peers", &num_peers)) | 586 | "num_peers", &num_peers)) |
590 | { | 587 | { |
591 | GNUNET_CONFIGURATION_load(testing_cfg, "test_mesh_small.conf"); | 588 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
592 | if (GNUNET_OK != | 589 | "Option TESTING:NUM_PEERS is required!\n"); |
593 | GNUNET_CONFIGURATION_get_value_number (testing_cfg, "testing", | 590 | return; |
594 | "num_peers", &num_peers)) | ||
595 | { | ||
596 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | ||
597 | "Option TESTING:NUM_PEERS is required!\n"); | ||
598 | return; | ||
599 | } | ||
600 | } | 591 | } |
592 | } | ||
601 | 593 | ||
602 | if (GNUNET_OK != | 594 | if (GNUNET_OK != |
603 | GNUNET_CONFIGURATION_get_value_number (testing_cfg, "test_mesh_small", | 595 | GNUNET_CONFIGURATION_get_value_number (testing_cfg, "test_mesh_small", |
604 | "wait_time", &temp_wait)) | 596 | "wait_time", &temp_wait)) |
605 | { | 597 | { |
606 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 598 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
607 | "Option nsetest_mesh_small:wait_time is required!\n"); | 599 | "Option nsetest_mesh_small:wait_time is required!\n"); |
608 | return; | 600 | return; |
609 | } | 601 | } |
610 | 602 | ||
611 | if (GNUNET_OK != | 603 | if (GNUNET_OK != |
612 | GNUNET_CONFIGURATION_get_value_string (testing_cfg, "testing", | 604 | GNUNET_CONFIGURATION_get_value_string (testing_cfg, "testing", |
613 | "topology_output_file", | 605 | "topology_output_file", |
614 | &topology_file)) | 606 | &topology_file)) |
615 | { | 607 | { |
616 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 608 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
617 | "Option test_mesh_small:topology_output_file is required!\n"); | 609 | "Option test_mesh_small:topology_output_file is required!\n"); |
618 | return; | 610 | return; |
619 | } | 611 | } |
620 | 612 | ||
621 | if (GNUNET_OK != | 613 | if (GNUNET_OK != |
622 | GNUNET_CONFIGURATION_get_value_string (testing_cfg, "test_mesh_small", | 614 | GNUNET_CONFIGURATION_get_value_string (testing_cfg, "test_mesh_small", |
623 | "data_output_file", | 615 | "data_output_file", |
624 | &data_filename)) | 616 | &data_filename)) |
625 | { | 617 | { |
626 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 618 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
627 | "Option test_mesh_small:data_output_file is required!\n"); | 619 | "Option test_mesh_small:data_output_file is required!\n"); |
628 | return; | 620 | return; |
629 | } | 621 | } |
630 | 622 | ||
631 | data_file = GNUNET_DISK_file_open (data_filename, | 623 | data_file = |
632 | GNUNET_DISK_OPEN_READWRITE | | 624 | GNUNET_DISK_file_open (data_filename, |
633 | GNUNET_DISK_OPEN_CREATE, | 625 | GNUNET_DISK_OPEN_READWRITE | |
634 | GNUNET_DISK_PERM_USER_READ | | 626 | GNUNET_DISK_OPEN_CREATE, |
635 | GNUNET_DISK_PERM_USER_WRITE); | 627 | GNUNET_DISK_PERM_USER_READ | |
636 | if (data_file == NULL) { | 628 | GNUNET_DISK_PERM_USER_WRITE); |
637 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 629 | if (data_file == NULL) |
638 | "Failed to open %s for output!\n", | 630 | { |
639 | data_filename); | 631 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Failed to open %s for output!\n", |
640 | GNUNET_free (data_filename); | 632 | data_filename); |
641 | } | 633 | GNUNET_free (data_filename); |
634 | } | ||
642 | 635 | ||
643 | wait_time = | 636 | wait_time = |
644 | GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, temp_wait); | 637 | GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, temp_wait); |
645 | 638 | ||
646 | if (GNUNET_YES == | 639 | if (GNUNET_YES == |
647 | GNUNET_CONFIGURATION_get_value_string (cfg, "test_mesh_small", | 640 | GNUNET_CONFIGURATION_get_value_string (cfg, "test_mesh_small", |
648 | "output_file", &temp_str)) | 641 | "output_file", &temp_str)) |
649 | { | 642 | { |
650 | output_file = GNUNET_DISK_file_open (temp_str, | 643 | output_file = |
651 | GNUNET_DISK_OPEN_READWRITE | | 644 | GNUNET_DISK_file_open (temp_str, |
652 | GNUNET_DISK_OPEN_CREATE, | 645 | GNUNET_DISK_OPEN_READWRITE | |
653 | GNUNET_DISK_PERM_USER_READ | | 646 | GNUNET_DISK_OPEN_CREATE, |
654 | GNUNET_DISK_PERM_USER_WRITE); | 647 | GNUNET_DISK_PERM_USER_READ | |
655 | if (output_file == NULL) | 648 | GNUNET_DISK_PERM_USER_WRITE); |
656 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 649 | if (output_file == NULL) |
657 | "Failed to open %s for output!\n", | 650 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Failed to open %s for output!\n", |
658 | temp_str); | 651 | temp_str); |
659 | } | 652 | } |
660 | GNUNET_free_non_null (temp_str); | 653 | GNUNET_free_non_null (temp_str); |
661 | 654 | ||
662 | hosts = GNUNET_TESTING_hosts_load (testing_cfg); | 655 | hosts = GNUNET_TESTING_hosts_load (testing_cfg); |
663 | 656 | ||
664 | pg = GNUNET_TESTING_peergroup_start (testing_cfg, num_peers, TIMEOUT, | 657 | pg = GNUNET_TESTING_peergroup_start (testing_cfg, num_peers, TIMEOUT, |
665 | &connect_cb, &peergroup_ready, NULL, hosts); | 658 | &connect_cb, &peergroup_ready, NULL, |
666 | GNUNET_assert (pg != NULL); | 659 | hosts); |
667 | shutdown_handle = GNUNET_SCHEDULER_add_delayed ( | 660 | GNUNET_assert (pg != NULL); |
668 | GNUNET_TIME_relative_get_forever (), | 661 | shutdown_handle = |
669 | &shutdown_task, NULL); | 662 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_get_forever (), |
663 | &shutdown_task, NULL); | ||
670 | } | 664 | } |
671 | 665 | ||
672 | 666 | ||
@@ -688,13 +682,13 @@ static struct GNUNET_GETOPT_CommandLineOption options[] = { | |||
688 | int | 682 | int |
689 | main (int argc, char *argv[]) | 683 | main (int argc, char *argv[]) |
690 | { | 684 | { |
691 | GNUNET_PROGRAM_run (argc, argv, "test_mesh_small", | 685 | GNUNET_PROGRAM_run (argc, argv, "test_mesh_small", |
692 | gettext_noop ("Test mesh in a small network."), options, | 686 | gettext_noop ("Test mesh in a small network."), options, |
693 | &run, NULL); | 687 | &run, NULL); |
694 | #if REMOVE_DIR | 688 | #if REMOVE_DIR |
695 | GNUNET_DISK_directory_remove ("/tmp/test_mesh_small"); | 689 | GNUNET_DISK_directory_remove ("/tmp/test_mesh_small"); |
696 | #endif | 690 | #endif |
697 | return ok; | 691 | return ok; |
698 | } | 692 | } |
699 | 693 | ||
700 | /* end of test_mesh_small.c */ | 694 | /* end of test_mesh_small.c */ |
diff --git a/src/nat/gnunet-nat-server.c b/src/nat/gnunet-nat-server.c index 988e9fbc9..5e2390f35 100644 --- a/src/nat/gnunet-nat-server.c +++ b/src/nat/gnunet-nat-server.c | |||
@@ -83,7 +83,7 @@ struct TcpContext | |||
83 | */ | 83 | */ |
84 | struct GNUNET_NETWORK_Handle *s; | 84 | struct GNUNET_NETWORK_Handle *s; |
85 | 85 | ||
86 | /** | 86 | /** |
87 | * Data to transmit. | 87 | * Data to transmit. |
88 | */ | 88 | */ |
89 | uint16_t data; | 89 | uint16_t data; |
@@ -122,7 +122,7 @@ tcp_send (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
122 | /** | 122 | /** |
123 | * Try to send 'data' to the | 123 | * Try to send 'data' to the |
124 | * IP 'dst_ipv4' at port 'dport' via TCP. | 124 | * IP 'dst_ipv4' at port 'dport' via TCP. |
125 | * | 125 | * |
126 | * @param dst_ivp4 target IP | 126 | * @param dst_ivp4 target IP |
127 | * @param dport target port | 127 | * @param dport target port |
128 | * @param data data to send | 128 | * @param data data to send |
@@ -169,7 +169,7 @@ try_send_tcp (uint32_t dst_ipv4, uint16_t dport, uint16_t data) | |||
169 | /** | 169 | /** |
170 | * Try to send 'data' to the | 170 | * Try to send 'data' to the |
171 | * IP 'dst_ipv4' at port 'dport' via UDP. | 171 | * IP 'dst_ipv4' at port 'dport' via UDP. |
172 | * | 172 | * |
173 | * @param dst_ivp4 target IP | 173 | * @param dst_ivp4 target IP |
174 | * @param dport target port | 174 | * @param dport target port |
175 | * @param data data to send | 175 | * @param data data to send |
@@ -208,7 +208,7 @@ try_send_udp (uint32_t dst_ipv4, uint16_t dport, uint16_t data) | |||
208 | /** | 208 | /** |
209 | * We've received a request to probe a NAT | 209 | * We've received a request to probe a NAT |
210 | * traversal. Do it. | 210 | * traversal. Do it. |
211 | * | 211 | * |
212 | * @param cls unused | 212 | * @param cls unused |
213 | * @param client handle to client (we always close) | 213 | * @param client handle to client (we always close) |
214 | * @param msg message with details about what to test | 214 | * @param msg message with details about what to test |
diff --git a/src/nat/nat.c b/src/nat/nat.c index a037e3b20..891613fea 100644 --- a/src/nat/nat.c +++ b/src/nat/nat.c | |||
@@ -57,7 +57,7 @@ | |||
57 | 57 | ||
58 | /** | 58 | /** |
59 | * Where did the given local address originate from? | 59 | * Where did the given local address originate from? |
60 | * To be used for debugging as well as in the future | 60 | * To be used for debugging as well as in the future |
61 | * to remove all addresses from a certain source when | 61 | * to remove all addresses from a certain source when |
62 | * we reevaluate the source. | 62 | * we reevaluate the source. |
63 | */ | 63 | */ |
@@ -368,7 +368,7 @@ start_gnunet_nat_server (struct GNUNET_NAT_Handle *h); | |||
368 | /** | 368 | /** |
369 | * Remove all addresses from the list of 'local' addresses | 369 | * Remove all addresses from the list of 'local' addresses |
370 | * that originated from the given source. | 370 | * that originated from the given source. |
371 | * | 371 | * |
372 | * @param plugin the plugin | 372 | * @param plugin the plugin |
373 | * @param src source that identifies addresses to remove | 373 | * @param src source that identifies addresses to remove |
374 | */ | 374 | */ |
@@ -396,8 +396,8 @@ remove_from_address_list_by_source (struct GNUNET_NAT_Handle *h, | |||
396 | 396 | ||
397 | /** | 397 | /** |
398 | * Add the given address to the list of 'local' addresses, thereby | 398 | * Add the given address to the list of 'local' addresses, thereby |
399 | * making it a 'legal' address for this peer to have. | 399 | * making it a 'legal' address for this peer to have. |
400 | * | 400 | * |
401 | * @param plugin the plugin | 401 | * @param plugin the plugin |
402 | * @param src where did the local address originate from? | 402 | * @param src where did the local address originate from? |
403 | * @param arg the address, some 'struct sockaddr' | 403 | * @param arg the address, some 'struct sockaddr' |
@@ -431,7 +431,7 @@ add_to_address_list_as_is (struct GNUNET_NAT_Handle *h, | |||
431 | * making it a 'legal' address for this peer to have. Set the | 431 | * making it a 'legal' address for this peer to have. Set the |
432 | * port number in the process to the advertised port and possibly | 432 | * port number in the process to the advertised port and possibly |
433 | * also to zero (if we have the gnunet-helper-nat-server). | 433 | * also to zero (if we have the gnunet-helper-nat-server). |
434 | * | 434 | * |
435 | * @param plugin the plugin | 435 | * @param plugin the plugin |
436 | * @param src where did the local address originate from? | 436 | * @param src where did the local address originate from? |
437 | * @param arg the address, some 'struct sockaddr' | 437 | * @param arg the address, some 'struct sockaddr' |
@@ -481,8 +481,8 @@ add_to_address_list (struct GNUNET_NAT_Handle *h, enum LocalAddressSource src, | |||
481 | 481 | ||
482 | /** | 482 | /** |
483 | * Add the given IP address to the list of 'local' addresses, thereby | 483 | * Add the given IP address to the list of 'local' addresses, thereby |
484 | * making it a 'legal' address for this peer to have. | 484 | * making it a 'legal' address for this peer to have. |
485 | * | 485 | * |
486 | * @param plugin the plugin | 486 | * @param plugin the plugin |
487 | * @param src where did the local address originate from? | 487 | * @param src where did the local address originate from? |
488 | * @param arg the address, some 'struct in_addr' or 'struct in6_addr' | 488 | * @param arg the address, some 'struct in_addr' or 'struct in6_addr' |
@@ -1040,7 +1040,7 @@ add_from_bind (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
1040 | * @param address_callback function to call everytime the public IP address changes | 1040 | * @param address_callback function to call everytime the public IP address changes |
1041 | * @param reversal_callback function to call if someone wants connection reversal from us | 1041 | * @param reversal_callback function to call if someone wants connection reversal from us |
1042 | * @param callback_cls closure for callbacks | 1042 | * @param callback_cls closure for callbacks |
1043 | * @return NULL on error, otherwise handle that can be used to unregister | 1043 | * @return NULL on error, otherwise handle that can be used to unregister |
1044 | */ | 1044 | */ |
1045 | struct GNUNET_NAT_Handle * | 1045 | struct GNUNET_NAT_Handle * |
1046 | GNUNET_NAT_register (const struct GNUNET_CONFIGURATION_Handle *cfg, int is_tcp, | 1046 | GNUNET_NAT_register (const struct GNUNET_CONFIGURATION_Handle *cfg, int is_tcp, |
diff --git a/src/nat/nat_mini.c b/src/nat/nat_mini.c index 1f5a83d2d..52a4e86b0 100644 --- a/src/nat/nat_mini.c +++ b/src/nat/nat_mini.c | |||
@@ -361,12 +361,12 @@ process_refresh_output (void *cls, const char *line) | |||
361 | } | 361 | } |
362 | /* | 362 | /* |
363 | * we're looking for output of the form: | 363 | * we're looking for output of the form: |
364 | * | 364 | * |
365 | * "0 TCP 3000->192.168.2.150:3000 'libminiupnpc' ''" | 365 | * "0 TCP 3000->192.168.2.150:3000 'libminiupnpc' ''" |
366 | * "1 UDP 3001->192.168.2.150:3001 'libminiupnpc' ''" | 366 | * "1 UDP 3001->192.168.2.150:3001 'libminiupnpc' ''" |
367 | * | 367 | * |
368 | * the pattern we look for is: | 368 | * the pattern we look for is: |
369 | * | 369 | * |
370 | * "%s TCP PORT->STRING:OURPORT *" or | 370 | * "%s TCP PORT->STRING:OURPORT *" or |
371 | * "%s UDP PORT->STRING:OURPORT *" | 371 | * "%s UDP PORT->STRING:OURPORT *" |
372 | */ | 372 | */ |
@@ -439,7 +439,7 @@ process_map_output (void *cls, const char *line) | |||
439 | } | 439 | } |
440 | /* | 440 | /* |
441 | * The upnpc output we're after looks like this: | 441 | * The upnpc output we're after looks like this: |
442 | * | 442 | * |
443 | * "external 87.123.42.204:3000 TCP is redirected to internal 192.168.2.150:3000" | 443 | * "external 87.123.42.204:3000 TCP is redirected to internal 192.168.2.150:3000" |
444 | */ | 444 | */ |
445 | if ((NULL == (ipaddr = strstr (line, " "))) || | 445 | if ((NULL == (ipaddr = strstr (line, " "))) || |
@@ -475,7 +475,7 @@ process_map_output (void *cls, const char *line) | |||
475 | * general-purpose 'GNUNET_NAT_register' code). However, it can be | 475 | * general-purpose 'GNUNET_NAT_register' code). However, it can be |
476 | * used if specifically UPnP-based NAT traversal is to be used or | 476 | * used if specifically UPnP-based NAT traversal is to be used or |
477 | * tested. | 477 | * tested. |
478 | * | 478 | * |
479 | * @param port port to map | 479 | * @param port port to map |
480 | * @param is_tcp GNUNET_YES to map TCP, GNUNET_NO for UDP | 480 | * @param is_tcp GNUNET_YES to map TCP, GNUNET_NO for UDP |
481 | * @param ac function to call with mapping result | 481 | * @param ac function to call with mapping result |
@@ -539,7 +539,7 @@ process_unmap_output (void *cls, const char *line) | |||
539 | * this function will give 'upnpc' 1s to remove tha mapping, | 539 | * this function will give 'upnpc' 1s to remove tha mapping, |
540 | * so while this function is non-blocking, a task will be | 540 | * so while this function is non-blocking, a task will be |
541 | * left with the scheduler for up to 1s past this call. | 541 | * left with the scheduler for up to 1s past this call. |
542 | * | 542 | * |
543 | * @param mini the handle | 543 | * @param mini the handle |
544 | */ | 544 | */ |
545 | void | 545 | void |
diff --git a/src/nat/test_nat.c b/src/nat/test_nat.c index 6a533798e..784fc6cc7 100644 --- a/src/nat/test_nat.c +++ b/src/nat/test_nat.c | |||
@@ -45,7 +45,7 @@ | |||
45 | 45 | ||
46 | 46 | ||
47 | /** | 47 | /** |
48 | * Time to wait before stopping NAT, in seconds | 48 | * Time to wait before stopping NAT, in seconds |
49 | */ | 49 | */ |
50 | #define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 5) | 50 | #define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 5) |
51 | 51 | ||
@@ -87,7 +87,7 @@ struct addr_cls | |||
87 | 87 | ||
88 | /** | 88 | /** |
89 | * Return the address of the default interface, | 89 | * Return the address of the default interface, |
90 | * or any interface with a valid address if the default is not valid | 90 | * or any interface with a valid address if the default is not valid |
91 | * | 91 | * |
92 | * @param cls the 'struct addr_cls' | 92 | * @param cls the 'struct addr_cls' |
93 | * @param name name of the interface | 93 | * @param name name of the interface |
diff --git a/src/nat/test_nat_mini.c b/src/nat/test_nat_mini.c index 4aac3d17f..2c6da3b57 100644 --- a/src/nat/test_nat_mini.c +++ b/src/nat/test_nat_mini.c | |||
@@ -22,7 +22,7 @@ | |||
22 | * Testcase for port redirection and public IP address retrieval. | 22 | * Testcase for port redirection and public IP address retrieval. |
23 | * This test never fails, because there need to be a NAT box set up for tha * | 23 | * This test never fails, because there need to be a NAT box set up for tha * |
24 | * @file nat/test_nat_mini.c | 24 | * @file nat/test_nat_mini.c |
25 | * @brief Testcase for NAT library - mini | 25 | * @brief Testcase for NAT library - mini |
26 | * @author Christian Grothoff | 26 | * @author Christian Grothoff |
27 | * | 27 | * |
28 | * TODO: actually use ARM to start resolver service to make DNS work! | 28 | * TODO: actually use ARM to start resolver service to make DNS work! |
diff --git a/src/nat/test_nat_test.c b/src/nat/test_nat_test.c index b1e6235f9..b8db301aa 100644 --- a/src/nat/test_nat_test.c +++ b/src/nat/test_nat_test.c | |||
@@ -35,7 +35,7 @@ | |||
35 | 35 | ||
36 | 36 | ||
37 | /** | 37 | /** |
38 | * Time to wait before stopping NAT test, in seconds | 38 | * Time to wait before stopping NAT test, in seconds |
39 | */ | 39 | */ |
40 | #define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 15) | 40 | #define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 15) |
41 | 41 | ||
diff --git a/src/nse/gnunet-service-nse.c b/src/nse/gnunet-service-nse.c index c82180dfd..f8d5f76f1 100644 --- a/src/nse/gnunet-service-nse.c +++ b/src/nse/gnunet-service-nse.c | |||
@@ -1,17 +1,17 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of GNUnet. | 2 | This file is part of GNUnet. |
3 | (C) 2009, 2010, 2011 Christian Grothoff (and other contributing authors) | 3 | (C) 2009, 2010, 2011 Christian Grothoff (and other contributing authors) |
4 | 4 | ||
5 | GNUnet is free software; you can redistribute it and/or modify | 5 | GNUnet is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published | 6 | it under the terms of the GNU General Public License as published |
7 | by the Free Software Foundation; either version 3, or (at your | 7 | by the Free Software Foundation; either version 3, or (at your |
8 | option) any later version. | 8 | option) any later version. |
9 | 9 | ||
10 | GNUnet is distributed in the hope that it will be useful, but | 10 | GNUnet is distributed in the hope that it will be useful, but |
11 | WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 | General Public License for more details. | 13 | General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU General Public License | 15 | You should have received a copy of the GNU General Public License |
16 | along with GNUnet; see the file COPYING. If not, write to the | 16 | along with GNUnet; see the file COPYING. If not, write to the |
17 | Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 17 | Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
@@ -207,7 +207,7 @@ static struct GNUNET_CONTAINER_MultiHashMap *peers; | |||
207 | 207 | ||
208 | /** | 208 | /** |
209 | * The current network size estimate. Number of bits matching on | 209 | * The current network size estimate. Number of bits matching on |
210 | * average thus far. | 210 | * average thus far. |
211 | */ | 211 | */ |
212 | static double current_size_estimate; | 212 | static double current_size_estimate; |
213 | 213 | ||
@@ -396,7 +396,7 @@ get_matching_bits_delay (uint32_t matching_bits) | |||
396 | * What delay randomization should we apply for a given number of matching bits? | 396 | * What delay randomization should we apply for a given number of matching bits? |
397 | * | 397 | * |
398 | * @param matching_bits number of matching bits | 398 | * @param matching_bits number of matching bits |
399 | * @return random delay to apply | 399 | * @return random delay to apply |
400 | */ | 400 | */ |
401 | static struct GNUNET_TIME_Relative | 401 | static struct GNUNET_TIME_Relative |
402 | get_delay_randomization (uint32_t matching_bits) | 402 | get_delay_randomization (uint32_t matching_bits) |
@@ -439,7 +439,7 @@ get_matching_bits (struct GNUNET_TIME_Absolute timestamp, | |||
439 | 439 | ||
440 | 440 | ||
441 | /** | 441 | /** |
442 | * Get the transmission delay that should be applied for a | 442 | * Get the transmission delay that should be applied for a |
443 | * particular round. | 443 | * particular round. |
444 | * | 444 | * |
445 | * @param round_offset -1 for the previous round (random delay between 0 and 50ms) | 445 | * @param round_offset -1 for the previous round (random delay between 0 and 50ms) |
@@ -902,7 +902,7 @@ update_flood_times (void *cls, const GNUNET_HashCode * key, void *value) | |||
902 | return GNUNET_OK; /* trigger of the update */ | 902 | return GNUNET_OK; /* trigger of the update */ |
903 | if (peer_entry->previous_round == GNUNET_NO) | 903 | if (peer_entry->previous_round == GNUNET_NO) |
904 | { | 904 | { |
905 | /* still stuck in previous round, no point to update, check that | 905 | /* still stuck in previous round, no point to update, check that |
906 | * we are active here though... */ | 906 | * we are active here though... */ |
907 | GNUNET_break ((peer_entry->transmit_task != GNUNET_SCHEDULER_NO_TASK) || | 907 | GNUNET_break ((peer_entry->transmit_task != GNUNET_SCHEDULER_NO_TASK) || |
908 | (peer_entry->th != NULL)); | 908 | (peer_entry->th != NULL)); |
diff --git a/src/peerinfo/gnunet-service-peerinfo.c b/src/peerinfo/gnunet-service-peerinfo.c index 26fec5289..e453621d2 100644 --- a/src/peerinfo/gnunet-service-peerinfo.c +++ b/src/peerinfo/gnunet-service-peerinfo.c | |||
@@ -158,7 +158,7 @@ get_host_filename (const struct GNUNET_PeerIdentity *id) | |||
158 | 158 | ||
159 | 159 | ||
160 | /** | 160 | /** |
161 | * Broadcast information about the given entry to all | 161 | * Broadcast information about the given entry to all |
162 | * clients that care. | 162 | * clients that care. |
163 | * | 163 | * |
164 | * @param entry entry to broadcast about | 164 | * @param entry entry to broadcast about |
diff --git a/src/peerinfo/peerinfo_api.c b/src/peerinfo/peerinfo_api.c index d1af01405..345375819 100644 --- a/src/peerinfo/peerinfo_api.c +++ b/src/peerinfo/peerinfo_api.c | |||
@@ -33,7 +33,7 @@ | |||
33 | 33 | ||
34 | /** | 34 | /** |
35 | * Function to call after transmission has succeeded. | 35 | * Function to call after transmission has succeeded. |
36 | * | 36 | * |
37 | * @param cls closure | 37 | * @param cls closure |
38 | * @param success GNUNET_OK if transmission worked, GNUNET_SYSERR on error | 38 | * @param success GNUNET_OK if transmission worked, GNUNET_SYSERR on error |
39 | */ | 39 | */ |
@@ -330,7 +330,7 @@ trigger_transmit (struct GNUNET_PEERINFO_Handle *h) | |||
330 | 330 | ||
331 | 331 | ||
332 | /** | 332 | /** |
333 | * Add a host to the persistent list. This method operates in | 333 | * Add a host to the persistent list. This method operates in |
334 | * semi-reliable mode: if the transmission is not completed by | 334 | * semi-reliable mode: if the transmission is not completed by |
335 | * the time 'GNUNET_PEERINFO_disconnect' is called, it will be | 335 | * the time 'GNUNET_PEERINFO_disconnect' is called, it will be |
336 | * aborted. Furthermore, if a second HELLO is added for the | 336 | * aborted. Furthermore, if a second HELLO is added for the |
@@ -535,7 +535,7 @@ iterator_start_receive (void *cls, int transmit_success) | |||
535 | 535 | ||
536 | 536 | ||
537 | /** | 537 | /** |
538 | * Peerinfo iteration request has timed out. | 538 | * Peerinfo iteration request has timed out. |
539 | * | 539 | * |
540 | * @param cls the 'struct GNUNET_PEERINFO_IteratorContext*' | 540 | * @param cls the 'struct GNUNET_PEERINFO_IteratorContext*' |
541 | * @param tc scheduler context | 541 | * @param tc scheduler context |
@@ -567,7 +567,7 @@ signal_timeout (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
567 | * | 567 | * |
568 | * Instead of calling this function with 'peer == NULL' it is often | 568 | * Instead of calling this function with 'peer == NULL' it is often |
569 | * better to use 'GNUNET_PEERINFO_notify'. | 569 | * better to use 'GNUNET_PEERINFO_notify'. |
570 | * | 570 | * |
571 | * @param h handle to the peerinfo service | 571 | * @param h handle to the peerinfo service |
572 | * @param peer restrict iteration to this peer only (can be NULL) | 572 | * @param peer restrict iteration to this peer only (can be NULL) |
573 | * @param timeout how long to wait until timing out | 573 | * @param timeout how long to wait until timing out |
diff --git a/src/statistics/gnunet-service-statistics.c b/src/statistics/gnunet-service-statistics.c index 3305dc6f4..24ed08833 100644 --- a/src/statistics/gnunet-service-statistics.c +++ b/src/statistics/gnunet-service-statistics.c | |||
@@ -22,7 +22,7 @@ | |||
22 | * @file statistics/gnunet-service-statistics.c | 22 | * @file statistics/gnunet-service-statistics.c |
23 | * @brief program that tracks statistics | 23 | * @brief program that tracks statistics |
24 | * @author Christian Grothoff | 24 | * @author Christian Grothoff |
25 | * | 25 | * |
26 | * TODO: | 26 | * TODO: |
27 | * - use BIO for IO operations | 27 | * - use BIO for IO operations |
28 | */ | 28 | */ |
diff --git a/src/statistics/statistics.h b/src/statistics/statistics.h index 757550922..14dd45d82 100644 --- a/src/statistics/statistics.h +++ b/src/statistics/statistics.h | |||
@@ -110,9 +110,9 @@ struct GNUNET_STATISTICS_WatchValueMessage | |||
110 | 110 | ||
111 | /** | 111 | /** |
112 | * Unique watch identification number (watch | 112 | * Unique watch identification number (watch |
113 | * requests are enumerated in the order they | 113 | * requests are enumerated in the order they |
114 | * are received, the first request having | 114 | * are received, the first request having |
115 | * a wid of zero). | 115 | * a wid of zero). |
116 | */ | 116 | */ |
117 | uint32_t wid GNUNET_PACKED; | 117 | uint32_t wid GNUNET_PACKED; |
118 | 118 | ||
diff --git a/src/statistics/statistics_api.c b/src/statistics/statistics_api.c index e117e971c..10659f11a 100644 --- a/src/statistics/statistics_api.c +++ b/src/statistics/statistics_api.c | |||
@@ -36,7 +36,7 @@ | |||
36 | /** | 36 | /** |
37 | * How long do we wait until a statistics request for setting | 37 | * How long do we wait until a statistics request for setting |
38 | * a value times out? (The update will be lost if the | 38 | * a value times out? (The update will be lost if the |
39 | * service does not react within this timeframe). | 39 | * service does not react within this timeframe). |
40 | */ | 40 | */ |
41 | #define SET_TRANSMIT_TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 2) | 41 | #define SET_TRANSMIT_TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 2) |
42 | 42 | ||
@@ -954,7 +954,7 @@ GNUNET_STATISTICS_get (struct GNUNET_STATISTICS_Handle *handle, | |||
954 | 954 | ||
955 | 955 | ||
956 | /** | 956 | /** |
957 | * Cancel a 'get' request. Must be called before the 'cont' | 957 | * Cancel a 'get' request. Must be called before the 'cont' |
958 | * function is called. | 958 | * function is called. |
959 | * | 959 | * |
960 | * @param gh handle of the request to cancel | 960 | * @param gh handle of the request to cancel |
diff --git a/src/topology/gnunet-daemon-topology.c b/src/topology/gnunet-daemon-topology.c index 4db7ce6d2..55ee36fd2 100644 --- a/src/topology/gnunet-daemon-topology.c +++ b/src/topology/gnunet-daemon-topology.c | |||
@@ -231,7 +231,7 @@ static int autoconnect; | |||
231 | 231 | ||
232 | 232 | ||
233 | /** | 233 | /** |
234 | * Function that decides if a connection is acceptable or not. | 234 | * Function that decides if a connection is acceptable or not. |
235 | * If we have a blacklist, only friends are allowed, so the check | 235 | * If we have a blacklist, only friends are allowed, so the check |
236 | * is rather simple. | 236 | * is rather simple. |
237 | * | 237 | * |
@@ -285,7 +285,7 @@ connect_completed_callback (void *cls, int success) | |||
285 | 285 | ||
286 | /** | 286 | /** |
287 | * Check if an additional connection from the given peer is allowed. | 287 | * Check if an additional connection from the given peer is allowed. |
288 | * | 288 | * |
289 | * @param peer connection to check | 289 | * @param peer connection to check |
290 | * @return GNUNET_OK if the connection is allowed | 290 | * @return GNUNET_OK if the connection is allowed |
291 | */ | 291 | */ |
@@ -536,7 +536,7 @@ struct FindAdvHelloContext | |||
536 | * | 536 | * |
537 | * @param cls closure | 537 | * @param cls closure |
538 | * @param pid identity of a peer | 538 | * @param pid identity of a peer |
539 | * @param value 'struct Peer*' for the peer we are considering | 539 | * @param value 'struct Peer*' for the peer we are considering |
540 | * @return GNUNET_YES (continue iteration) | 540 | * @return GNUNET_YES (continue iteration) |
541 | */ | 541 | */ |
542 | static int | 542 | static int |
diff --git a/src/transport/gnunet-service-transport-new.c b/src/transport/gnunet-service-transport-new.c index 54af9cade..b605954ac 100644 --- a/src/transport/gnunet-service-transport-new.c +++ b/src/transport/gnunet-service-transport-new.c | |||
@@ -20,7 +20,7 @@ | |||
20 | 20 | ||
21 | /** | 21 | /** |
22 | * @file transport/gnunet-service-transport-new.c | 22 | * @file transport/gnunet-service-transport-new.c |
23 | * @brief | 23 | * @brief |
24 | * @author Christian Grothoff | 24 | * @author Christian Grothoff |
25 | */ | 25 | */ |
26 | #include "platform.h" | 26 | #include "platform.h" |
@@ -156,8 +156,7 @@ static struct GNUNET_TIME_Relative | |||
156 | plugin_env_receive_callback (void *cls, const struct GNUNET_PeerIdentity *peer, | 156 | plugin_env_receive_callback (void *cls, const struct GNUNET_PeerIdentity *peer, |
157 | const struct GNUNET_MessageHeader *message, | 157 | const struct GNUNET_MessageHeader *message, |
158 | const struct GNUNET_TRANSPORT_ATS_Information *ats, | 158 | const struct GNUNET_TRANSPORT_ATS_Information *ats, |
159 | uint32_t ats_count, | 159 | uint32_t ats_count, struct Session *session, |
160 | struct Session *session, | ||
161 | const char *sender_address, | 160 | const char *sender_address, |
162 | uint16_t sender_address_len) | 161 | uint16_t sender_address_len) |
163 | { | 162 | { |
@@ -202,7 +201,7 @@ plugin_env_receive_callback (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
202 | case GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_CONNECT: | 201 | case GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_CONNECT: |
203 | (void) GST_blacklist_test_allowed (peer, NULL, &try_connect_if_allowed, | 202 | (void) GST_blacklist_test_allowed (peer, NULL, &try_connect_if_allowed, |
204 | NULL); | 203 | NULL); |
205 | /* TODO: if 'session != NULL', maybe notify ATS that this is now the preferred | 204 | /* TODO: if 'session != NULL', maybe notify ATS that this is now the preferred |
206 | * way to communicate with this peer (other peer switched transport) */ | 205 | * way to communicate with this peer (other peer switched transport) */ |
207 | break; | 206 | break; |
208 | case GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_DISCONNECT: | 207 | case GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_DISCONNECT: |
@@ -224,21 +223,20 @@ plugin_env_receive_callback (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
224 | &do_forward); | 223 | &do_forward); |
225 | if (do_forward == GNUNET_YES) | 224 | if (do_forward == GNUNET_YES) |
226 | { | 225 | { |
227 | struct InboundMessage * im; | 226 | struct InboundMessage *im; |
228 | size_t size = | 227 | size_t size = sizeof (struct InboundMessage) + ntohs (message->size); |
229 | sizeof (struct InboundMessage) + | ||
230 | ntohs (message->size); | ||
231 | 228 | ||
232 | im = GNUNET_malloc (size); | 229 | im = GNUNET_malloc (size); |
233 | im->header.size = htons (size); | 230 | im->header.size = htons (size); |
234 | im->header.type = htons (GNUNET_MESSAGE_TYPE_TRANSPORT_RECV); | 231 | im->header.type = htons (GNUNET_MESSAGE_TYPE_TRANSPORT_RECV); |
235 | im->ats_count = htonl (0); | 232 | im->ats_count = htonl (0); |
236 | memcpy (&(im->peer), peer, sizeof(struct GNUNET_PeerIdentity)); | 233 | memcpy (&(im->peer), peer, sizeof (struct GNUNET_PeerIdentity)); |
237 | memcpy (&im[1], message, ntohs (message->size)); | 234 | memcpy (&im[1], message, ntohs (message->size)); |
238 | 235 | ||
239 | GST_clients_broadcast ((const struct GNUNET_MessageHeader *) im, GNUNET_YES); | 236 | GST_clients_broadcast ((const struct GNUNET_MessageHeader *) im, |
237 | GNUNET_YES); | ||
240 | 238 | ||
241 | GNUNET_free(im); | 239 | GNUNET_free (im); |
242 | } | 240 | } |
243 | break; | 241 | break; |
244 | } | 242 | } |
@@ -280,9 +278,9 @@ plugin_env_address_change_notification (void *cls, int add_remove, | |||
280 | * use NULL wherever a session pointer is needed. This function | 278 | * use NULL wherever a session pointer is needed. This function |
281 | * should be called BEFORE a potential "TransmitContinuation" | 279 | * should be called BEFORE a potential "TransmitContinuation" |
282 | * from the "TransmitFunction". | 280 | * from the "TransmitFunction". |
283 | * | 281 | * |
284 | * @param cls closure | 282 | * @param cls closure |
285 | * @param peer which peer was the session for | 283 | * @param peer which peer was the session for |
286 | * @param session which session is being destoyed | 284 | * @param session which session is being destoyed |
287 | */ | 285 | */ |
288 | static void | 286 | static void |
@@ -297,7 +295,7 @@ plugin_env_session_end (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
297 | * Function called by ATS to notify the callee that the | 295 | * Function called by ATS to notify the callee that the |
298 | * assigned bandwidth or address for a given peer was changed. If the | 296 | * assigned bandwidth or address for a given peer was changed. If the |
299 | * callback is called with address/bandwidth assignments of zero, the | 297 | * callback is called with address/bandwidth assignments of zero, the |
300 | * ATS disconnect function will still be called once the disconnect | 298 | * ATS disconnect function will still be called once the disconnect |
301 | * actually happened. | 299 | * actually happened. |
302 | * | 300 | * |
303 | * @param cls closure | 301 | * @param cls closure |
diff --git a/src/transport/gnunet-service-transport.c b/src/transport/gnunet-service-transport.c index d6b5ac23f..67dc4e962 100644 --- a/src/transport/gnunet-service-transport.c +++ b/src/transport/gnunet-service-transport.c | |||
@@ -439,7 +439,7 @@ struct ReadyList | |||
439 | 439 | ||
440 | 440 | ||
441 | /** | 441 | /** |
442 | * Entry in neighbours. | 442 | * Entry in neighbours. |
443 | */ | 443 | */ |
444 | struct NeighbourMapEntry | 444 | struct NeighbourMapEntry |
445 | { | 445 | { |
@@ -2270,12 +2270,12 @@ try_fast_reconnect (struct TransportPlugin *p, struct NeighbourMapEntry *nl) | |||
2270 | * quickly (much faster than timeout) `if a connection was lost and | 2270 | * quickly (much faster than timeout) `if a connection was lost and |
2271 | * could not be re-established (i.e. other peer went down or is | 2271 | * could not be re-established (i.e. other peer went down or is |
2272 | * unable / refuses to communicate); | 2272 | * unable / refuses to communicate); |
2273 | * | 2273 | * |
2274 | * So we should consider: | 2274 | * So we should consider: |
2275 | * 1) ideally: our own willingness / need to connect | 2275 | * 1) ideally: our own willingness / need to connect |
2276 | * 2) prior failures to connect to this peer (by plugin) | 2276 | * 2) prior failures to connect to this peer (by plugin) |
2277 | * 3) ideally: reasons why other peer terminated (as far as knowable) | 2277 | * 3) ideally: reasons why other peer terminated (as far as knowable) |
2278 | * | 2278 | * |
2279 | * Most importantly, it must be POSSIBLE for another peer to terminate | 2279 | * Most importantly, it must be POSSIBLE for another peer to terminate |
2280 | * a connection for a while (without us instantly re-establishing it). | 2280 | * a connection for a while (without us instantly re-establishing it). |
2281 | * Similarly, if another peer is gone we should quickly notify CORE. | 2281 | * Similarly, if another peer is gone we should quickly notify CORE. |
@@ -2284,7 +2284,7 @@ try_fast_reconnect (struct TransportPlugin *p, struct NeighbourMapEntry *nl) | |||
2284 | * services never even notice. | 2284 | * services never even notice. |
2285 | * Furthermore, the same mechanism (or small variation) could be used | 2285 | * Furthermore, the same mechanism (or small variation) could be used |
2286 | * to switch to a better-performing plugin (ATS). | 2286 | * to switch to a better-performing plugin (ATS). |
2287 | * | 2287 | * |
2288 | * Finally, this needs to be tested throughly... */ | 2288 | * Finally, this needs to be tested throughly... */ |
2289 | 2289 | ||
2290 | /* | 2290 | /* |
@@ -4002,7 +4002,7 @@ check_pending_validation (void *cls, const GNUNET_HashCode * key, void *value) | |||
4002 | GNUNET_i2s (&pong->pid), a2s (ve->transport_name, &addr[slen], | 4002 | GNUNET_i2s (&pong->pid), a2s (ve->transport_name, &addr[slen], |
4003 | alen)); | 4003 | alen)); |
4004 | /* FIXME: since the sender of the PONG currently uses the | 4004 | /* FIXME: since the sender of the PONG currently uses the |
4005 | * wrong address (see FIMXE there!), we cannot run a | 4005 | * wrong address (see FIMXE there!), we cannot run a |
4006 | * proper check here... */ | 4006 | * proper check here... */ |
4007 | #if FIXME_URGENT | 4007 | #if FIXME_URGENT |
4008 | return GNUNET_NO; | 4008 | return GNUNET_NO; |
diff --git a/src/transport/gnunet-service-transport_blacklist.c b/src/transport/gnunet-service-transport_blacklist.c index 21ad49652..36abbf85c 100644 --- a/src/transport/gnunet-service-transport_blacklist.c +++ b/src/transport/gnunet-service-transport_blacklist.c | |||
@@ -648,7 +648,7 @@ GST_blacklist_handle_reply (void *cls, struct GNUNET_SERVER_Client *client, | |||
648 | bl->waiting_for_reply = GNUNET_NO; | 648 | bl->waiting_for_reply = GNUNET_NO; |
649 | if (NULL != bc) | 649 | if (NULL != bc) |
650 | { | 650 | { |
651 | /* only run this if the blacklist check has not been | 651 | /* only run this if the blacklist check has not been |
652 | * cancelled in the meantime... */ | 652 | * cancelled in the meantime... */ |
653 | if (ntohl (msg->is_allowed) == GNUNET_SYSERR) | 653 | if (ntohl (msg->is_allowed) == GNUNET_SYSERR) |
654 | { | 654 | { |
@@ -683,7 +683,7 @@ GST_blacklist_handle_reply (void *cls, struct GNUNET_SERVER_Client *client, | |||
683 | 683 | ||
684 | /** | 684 | /** |
685 | * Add the given peer to the blacklist (for the given transport). | 685 | * Add the given peer to the blacklist (for the given transport). |
686 | * | 686 | * |
687 | * @param peer peer to blacklist | 687 | * @param peer peer to blacklist |
688 | * @param transport_name transport to blacklist for this peer, NULL for all | 688 | * @param transport_name transport to blacklist for this peer, NULL for all |
689 | */ | 689 | */ |
@@ -780,7 +780,7 @@ GST_blacklist_test_allowed (const struct GNUNET_PeerIdentity *peer, | |||
780 | 780 | ||
781 | /** | 781 | /** |
782 | * Cancel a blacklist check. | 782 | * Cancel a blacklist check. |
783 | * | 783 | * |
784 | * @param bc check to cancel | 784 | * @param bc check to cancel |
785 | */ | 785 | */ |
786 | void | 786 | void |
diff --git a/src/transport/gnunet-service-transport_blacklist.h b/src/transport/gnunet-service-transport_blacklist.h index 64a800664..68da7e4ce 100644 --- a/src/transport/gnunet-service-transport_blacklist.h +++ b/src/transport/gnunet-service-transport_blacklist.h | |||
@@ -71,7 +71,7 @@ GST_blacklist_handle_reply (void *cls, struct GNUNET_SERVER_Client *client, | |||
71 | 71 | ||
72 | /** | 72 | /** |
73 | * Add the given peer to the blacklist (for the given transport). | 73 | * Add the given peer to the blacklist (for the given transport). |
74 | * | 74 | * |
75 | * @param peer peer to blacklist | 75 | * @param peer peer to blacklist |
76 | * @param transport_name transport to blacklist for this peer, NULL for all | 76 | * @param transport_name transport to blacklist for this peer, NULL for all |
77 | */ | 77 | */ |
@@ -117,7 +117,7 @@ GST_blacklist_test_allowed (const struct GNUNET_PeerIdentity *peer, | |||
117 | 117 | ||
118 | /** | 118 | /** |
119 | * Cancel a blacklist check. | 119 | * Cancel a blacklist check. |
120 | * | 120 | * |
121 | * @param bc check to cancel | 121 | * @param bc check to cancel |
122 | */ | 122 | */ |
123 | void | 123 | void |
diff --git a/src/transport/gnunet-service-transport_clients.c b/src/transport/gnunet-service-transport_clients.c index 73d1220e4..6a29edc34 100644 --- a/src/transport/gnunet-service-transport_clients.c +++ b/src/transport/gnunet-service-transport_clients.c | |||
@@ -377,8 +377,7 @@ clients_handle_start (void *cls, struct GNUNET_SERVER_Client *client, | |||
377 | #if DEBUG_TRANSPORT | 377 | #if DEBUG_TRANSPORT |
378 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG | GNUNET_ERROR_TYPE_BULK, | 378 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG | GNUNET_ERROR_TYPE_BULK, |
379 | "TransportClient %X ServerClient %X sent multiple START messages\n", | 379 | "TransportClient %X ServerClient %X sent multiple START messages\n", |
380 | tc, | 380 | tc, tc->client); |
381 | tc->client); | ||
382 | #endif | 381 | #endif |
383 | GNUNET_break (0); | 382 | GNUNET_break (0); |
384 | GNUNET_SERVER_receive_done (client, GNUNET_SYSERR); | 383 | GNUNET_SERVER_receive_done (client, GNUNET_SYSERR); |
diff --git a/src/transport/gnunet-service-transport_hello.c b/src/transport/gnunet-service-transport_hello.c index 3c51c5df2..2793ce5eb 100644 --- a/src/transport/gnunet-service-transport_hello.c +++ b/src/transport/gnunet-service-transport_hello.c | |||
@@ -128,7 +128,7 @@ struct GeneratorContext | |||
128 | 128 | ||
129 | /** | 129 | /** |
130 | * Add an address from the 'OwnAddressList' to the buffer. | 130 | * Add an address from the 'OwnAddressList' to the buffer. |
131 | * | 131 | * |
132 | * @param cls the 'struct GeneratorContext' | 132 | * @param cls the 'struct GeneratorContext' |
133 | * @param max maximum number of bytes left | 133 | * @param max maximum number of bytes left |
134 | * @param buf where to write the address | 134 | * @param buf where to write the address |
diff --git a/src/transport/gnunet-service-transport_neighbours.c b/src/transport/gnunet-service-transport_neighbours.c index 76e27bf2e..d971e7cf9 100644 --- a/src/transport/gnunet-service-transport_neighbours.c +++ b/src/transport/gnunet-service-transport_neighbours.c | |||
@@ -47,7 +47,7 @@ | |||
47 | 47 | ||
48 | 48 | ||
49 | /** | 49 | /** |
50 | * Entry in neighbours. | 50 | * Entry in neighbours. |
51 | */ | 51 | */ |
52 | struct NeighbourMapEntry; | 52 | struct NeighbourMapEntry; |
53 | 53 | ||
@@ -105,7 +105,7 @@ struct MessageQueue | |||
105 | 105 | ||
106 | 106 | ||
107 | /** | 107 | /** |
108 | * Entry in neighbours. | 108 | * Entry in neighbours. |
109 | */ | 109 | */ |
110 | struct NeighbourMapEntry | 110 | struct NeighbourMapEntry |
111 | { | 111 | { |
@@ -171,7 +171,7 @@ struct NeighbourMapEntry | |||
171 | 171 | ||
172 | /** | 172 | /** |
173 | * ID of task scheduled to run when we should try transmitting | 173 | * ID of task scheduled to run when we should try transmitting |
174 | * the head of the message queue. | 174 | * the head of the message queue. |
175 | */ | 175 | */ |
176 | GNUNET_SCHEDULER_TaskIdentifier transmission_task; | 176 | GNUNET_SCHEDULER_TaskIdentifier transmission_task; |
177 | 177 | ||
@@ -622,7 +622,7 @@ GST_neighbours_try_connect (const struct GNUNET_PeerIdentity *target) | |||
622 | 622 | ||
623 | /** | 623 | /** |
624 | * Test if we're connected to the given peer. | 624 | * Test if we're connected to the given peer. |
625 | * | 625 | * |
626 | * @param target peer to test | 626 | * @param target peer to test |
627 | * @return GNUNET_YES if we are connected, GNUNET_NO if not | 627 | * @return GNUNET_YES if we are connected, GNUNET_NO if not |
628 | */ | 628 | */ |
@@ -839,7 +839,7 @@ GST_neighbours_keepalive (const struct GNUNET_PeerIdentity *neighbour) | |||
839 | * Change the incoming quota for the given peer. | 839 | * Change the incoming quota for the given peer. |
840 | * | 840 | * |
841 | * @param neighbour identity of peer to change qutoa for | 841 | * @param neighbour identity of peer to change qutoa for |
842 | * @param quota new quota | 842 | * @param quota new quota |
843 | */ | 843 | */ |
844 | void | 844 | void |
845 | GST_neighbours_set_incoming_quota (const struct GNUNET_PeerIdentity *neighbour, | 845 | GST_neighbours_set_incoming_quota (const struct GNUNET_PeerIdentity *neighbour, |
@@ -912,7 +912,7 @@ neighbours_iterate (void *cls, const GNUNET_HashCode * key, void *value) | |||
912 | /** | 912 | /** |
913 | * Iterate over all connected neighbours. | 913 | * Iterate over all connected neighbours. |
914 | * | 914 | * |
915 | * @param cb function to call | 915 | * @param cb function to call |
916 | * @param cb_cls closure for cb | 916 | * @param cb_cls closure for cb |
917 | */ | 917 | */ |
918 | void | 918 | void |
diff --git a/src/transport/gnunet-service-transport_neighbours.h b/src/transport/gnunet-service-transport_neighbours.h index db29d66aa..d7b234889 100644 --- a/src/transport/gnunet-service-transport_neighbours.h +++ b/src/transport/gnunet-service-transport_neighbours.h | |||
@@ -66,7 +66,7 @@ GST_neighbours_try_connect (const struct GNUNET_PeerIdentity *target); | |||
66 | 66 | ||
67 | /** | 67 | /** |
68 | * Test if we're connected to the given peer. | 68 | * Test if we're connected to the given peer. |
69 | * | 69 | * |
70 | * @param target peer to test | 70 | * @param target peer to test |
71 | * @return GNUNET_YES if we are connected, GNUNET_NO if not | 71 | * @return GNUNET_YES if we are connected, GNUNET_NO if not |
72 | */ | 72 | */ |
@@ -129,7 +129,7 @@ GST_neighbours_keepalive (const struct GNUNET_PeerIdentity *neighbour); | |||
129 | * Change the incoming quota for the given peer. | 129 | * Change the incoming quota for the given peer. |
130 | * | 130 | * |
131 | * @param neighbour identity of peer to change qutoa for | 131 | * @param neighbour identity of peer to change qutoa for |
132 | * @param quota new quota | 132 | * @param quota new quota |
133 | */ | 133 | */ |
134 | void | 134 | void |
135 | GST_neighbours_set_incoming_quota (const struct GNUNET_PeerIdentity *neighbour, | 135 | GST_neighbours_set_incoming_quota (const struct GNUNET_PeerIdentity *neighbour, |
@@ -164,7 +164,7 @@ typedef void (*GST_NeighbourIterator) (void *cls, | |||
164 | /** | 164 | /** |
165 | * Iterate over all connected neighbours. | 165 | * Iterate over all connected neighbours. |
166 | * | 166 | * |
167 | * @param cb function to call | 167 | * @param cb function to call |
168 | * @param cb_cls closure for cb | 168 | * @param cb_cls closure for cb |
169 | */ | 169 | */ |
170 | void | 170 | void |
diff --git a/src/transport/gnunet-service-transport_plugins.c b/src/transport/gnunet-service-transport_plugins.c index c32ac3acc..12ee231c4 100644 --- a/src/transport/gnunet-service-transport_plugins.c +++ b/src/transport/gnunet-service-transport_plugins.c | |||
@@ -189,7 +189,7 @@ GST_plugins_find (const char *name) | |||
189 | /** | 189 | /** |
190 | * Convert a given address to a human-readable format. Note that the | 190 | * Convert a given address to a human-readable format. Note that the |
191 | * return value will be overwritten on the next call to this function. | 191 | * return value will be overwritten on the next call to this function. |
192 | * | 192 | * |
193 | * @param name plugin name | 193 | * @param name plugin name |
194 | * @param addr binary address in plugin-specific format | 194 | * @param addr binary address in plugin-specific format |
195 | * @param addrlen number of bytes in 'addr' | 195 | * @param addrlen number of bytes in 'addr' |
diff --git a/src/transport/gnunet-service-transport_plugins.h b/src/transport/gnunet-service-transport_plugins.h index 856b594cd..3a49f004f 100644 --- a/src/transport/gnunet-service-transport_plugins.h +++ b/src/transport/gnunet-service-transport_plugins.h | |||
@@ -68,7 +68,7 @@ GST_plugins_find (const char *name); | |||
68 | /** | 68 | /** |
69 | * Convert a given address to a human-readable format. Note that the | 69 | * Convert a given address to a human-readable format. Note that the |
70 | * return value will be overwritten on the next call to this function. | 70 | * return value will be overwritten on the next call to this function. |
71 | * | 71 | * |
72 | * @param name plugin name | 72 | * @param name plugin name |
73 | * @param addr binary address in plugin-specific format | 73 | * @param addr binary address in plugin-specific format |
74 | * @param addrlen number of bytes in 'addr' | 74 | * @param addrlen number of bytes in 'addr' |
diff --git a/src/transport/gnunet-service-transport_validation.c b/src/transport/gnunet-service-transport_validation.c index c6ee515fe..8b652ceaa 100644 --- a/src/transport/gnunet-service-transport_validation.c +++ b/src/transport/gnunet-service-transport_validation.c | |||
@@ -409,7 +409,7 @@ add_valid_address (void *cls, const char *tname, | |||
409 | 409 | ||
410 | 410 | ||
411 | /** | 411 | /** |
412 | * Function called for any HELLO known to PEERINFO. | 412 | * Function called for any HELLO known to PEERINFO. |
413 | * | 413 | * |
414 | * @param cls unused | 414 | * @param cls unused |
415 | * @param peer id of the peer, NULL for last call | 415 | * @param peer id of the peer, NULL for last call |
@@ -737,7 +737,8 @@ transmit_ping_if_allowed (void *cls, const struct GNUNET_PeerIdentity *pid, | |||
737 | hsize = ntohs (hello->size); | 737 | hsize = ntohs (hello->size); |
738 | tsize = sizeof (struct TransportPingMessage) + ve->addrlen + slen + hsize; | 738 | tsize = sizeof (struct TransportPingMessage) + ve->addrlen + slen + hsize; |
739 | 739 | ||
740 | ping.header.size = htons (sizeof (struct TransportPingMessage) + ve->addrlen + slen); | 740 | ping.header.size = |
741 | htons (sizeof (struct TransportPingMessage) + ve->addrlen + slen); | ||
741 | ping.header.type = htons (GNUNET_MESSAGE_TYPE_TRANSPORT_PING); | 742 | ping.header.type = htons (GNUNET_MESSAGE_TYPE_TRANSPORT_PING); |
742 | ping.challenge = htonl (ve->challenge); | 743 | ping.challenge = htonl (ve->challenge); |
743 | ping.target = *pid; | 744 | ping.target = *pid; |
diff --git a/src/transport/gnunet-transport-wlan-helper.c b/src/transport/gnunet-transport-wlan-helper.c index 3fca1f85f..ad6810233 100644 --- a/src/transport/gnunet-transport-wlan-helper.c +++ b/src/transport/gnunet-transport-wlan-helper.c | |||
@@ -611,7 +611,7 @@ stdin_send_hw (void *cls, void *client, const struct GNUNET_MessageHeader *hdr) | |||
611 | rtheader.rate = header->rate; | 611 | rtheader.rate = header->rate; |
612 | memcpy (write_pout->buf, &rtheader, sizeof (rtheader)); | 612 | memcpy (write_pout->buf, &rtheader, sizeof (rtheader)); |
613 | memcpy (write_pout->buf + sizeof (rtheader), &header[1], sendsize); | 613 | memcpy (write_pout->buf + sizeof (rtheader), &header[1], sendsize); |
614 | /* payload contains MAC address, but we don't trust it, so we'll | 614 | /* payload contains MAC address, but we don't trust it, so we'll |
615 | * overwrite it with OUR MAC address again to prevent mischief */ | 615 | * overwrite it with OUR MAC address again to prevent mischief */ |
616 | wlanheader = (struct ieee80211_frame *) (write_pout->buf + sizeof (rtheader)); | 616 | wlanheader = (struct ieee80211_frame *) (write_pout->buf + sizeof (rtheader)); |
617 | mac_set (wlanheader, dev); | 617 | mac_set (wlanheader, dev); |
diff --git a/src/transport/plugin_transport_tcp.c b/src/transport/plugin_transport_tcp.c index d6084d9f0..452f55e1a 100644 --- a/src/transport/plugin_transport_tcp.c +++ b/src/transport/plugin_transport_tcp.c | |||
@@ -385,7 +385,7 @@ struct Plugin | |||
385 | 385 | ||
386 | /** | 386 | /** |
387 | * Function to check if an inbound connection is acceptable. | 387 | * Function to check if an inbound connection is acceptable. |
388 | * Mostly used to limit the total number of open connections | 388 | * Mostly used to limit the total number of open connections |
389 | * we can have. | 389 | * we can have. |
390 | * | 390 | * |
391 | * @param cls the 'struct Plugin' | 391 | * @param cls the 'struct Plugin' |
diff --git a/src/transport/plugin_transport_udp.c b/src/transport/plugin_transport_udp.c index 07a3df362..92fa8d2f5 100644 --- a/src/transport/plugin_transport_udp.c +++ b/src/transport/plugin_transport_udp.c | |||
@@ -170,7 +170,7 @@ struct PeerSession | |||
170 | 170 | ||
171 | /** | 171 | /** |
172 | * Data structure to track defragmentation contexts based | 172 | * Data structure to track defragmentation contexts based |
173 | * on the source of the UDP traffic. | 173 | * on the source of the UDP traffic. |
174 | */ | 174 | */ |
175 | struct ReceiveContext | 175 | struct ReceiveContext |
176 | { | 176 | { |
@@ -272,7 +272,7 @@ struct Plugin | |||
272 | struct GNUNET_NETWORK_Handle *sockv6; | 272 | struct GNUNET_NETWORK_Handle *sockv6; |
273 | 273 | ||
274 | /** | 274 | /** |
275 | * expected delay for ACKs | 275 | * expected delay for ACKs |
276 | */ | 276 | */ |
277 | struct GNUNET_TIME_Relative last_expected_delay; | 277 | struct GNUNET_TIME_Relative last_expected_delay; |
278 | 278 | ||
@@ -557,7 +557,7 @@ struct SourceInformation | |||
557 | 557 | ||
558 | 558 | ||
559 | /** | 559 | /** |
560 | * Message tokenizer has broken up an incomming message. Pass it on | 560 | * Message tokenizer has broken up an incomming message. Pass it on |
561 | * to the service. | 561 | * to the service. |
562 | * | 562 | * |
563 | * @param cls the 'struct Plugin' | 563 | * @param cls the 'struct Plugin' |
@@ -588,7 +588,7 @@ process_inbound_tokenized_messages (void *cls, void *client, | |||
588 | * | 588 | * |
589 | * @param plugin plugin context | 589 | * @param plugin plugin context |
590 | * @param msg the message | 590 | * @param msg the message |
591 | * @param sender_addr sender address | 591 | * @param sender_addr sender address |
592 | * @param sender_addr_len number of bytes in sender_addr | 592 | * @param sender_addr_len number of bytes in sender_addr |
593 | */ | 593 | */ |
594 | static void | 594 | static void |
diff --git a/src/transport/test_transport_api.c b/src/transport/test_transport_api.c index 303709136..29b465845 100644 --- a/src/transport/test_transport_api.c +++ b/src/transport/test_transport_api.c | |||
@@ -109,8 +109,8 @@ end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
109 | if (send_task != GNUNET_SCHEDULER_NO_TASK) | 109 | if (send_task != GNUNET_SCHEDULER_NO_TASK) |
110 | GNUNET_SCHEDULER_cancel (send_task); | 110 | GNUNET_SCHEDULER_cancel (send_task); |
111 | 111 | ||
112 | if (cc != NULL) | 112 | if (cc != NULL) |
113 | GNUNET_TRANSPORT_TESTING_connect_peers_cancel(cc); | 113 | GNUNET_TRANSPORT_TESTING_connect_peers_cancel (cc); |
114 | 114 | ||
115 | if (th != NULL) | 115 | if (th != NULL) |
116 | GNUNET_TRANSPORT_notify_transmit_ready_cancel (th); | 116 | GNUNET_TRANSPORT_notify_transmit_ready_cancel (th); |
@@ -229,7 +229,8 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
229 | p2 = GNUNET_TRANSPORT_TESTING_start_peer (cfg_file_p2, ¬ify_receive, | 229 | p2 = GNUNET_TRANSPORT_TESTING_start_peer (cfg_file_p2, ¬ify_receive, |
230 | ¬ify_connect, ¬ify_disconnect, | 230 | ¬ify_connect, ¬ify_disconnect, |
231 | NULL); | 231 | NULL); |
232 | cc = GNUNET_TRANSPORT_TESTING_connect_peers (p1, p2, &testing_connect_cb, NULL); | 232 | cc = GNUNET_TRANSPORT_TESTING_connect_peers (p1, p2, &testing_connect_cb, |
233 | NULL); | ||
233 | } | 234 | } |
234 | 235 | ||
235 | static int | 236 | static int |
diff --git a/src/transport/test_transport_startonly.c b/src/transport/test_transport_startonly.c index 35c9e546b..075c10527 100644 --- a/src/transport/test_transport_startonly.c +++ b/src/transport/test_transport_startonly.c | |||
@@ -119,11 +119,10 @@ static void | |||
119 | run (void *cls, char *const *args, const char *cfgfile, | 119 | run (void *cls, char *const *args, const char *cfgfile, |
120 | const struct GNUNET_CONFIGURATION_Handle *cfg) | 120 | const struct GNUNET_CONFIGURATION_Handle *cfg) |
121 | { | 121 | { |
122 | timeout_task = | 122 | timeout_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, &end_badly, NULL); |
123 | GNUNET_SCHEDULER_add_delayed (TIMEOUT, &end_badly, NULL); | ||
124 | 123 | ||
125 | i = 1; | 124 | i = 1; |
126 | fprintf(stderr,"%i",i); | 125 | fprintf (stderr, "%i", i); |
127 | while (i <= ITERATIONS) | 126 | while (i <= ITERATIONS) |
128 | { | 127 | { |
129 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Starting peer\n"); | 128 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Starting peer\n"); |
@@ -142,14 +141,14 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
142 | 141 | ||
143 | //sleep (5); | 142 | //sleep (5); |
144 | 143 | ||
145 | GNUNET_TRANSPORT_TESTING_stop_peer(p1); | 144 | GNUNET_TRANSPORT_TESTING_stop_peer (p1); |
146 | 145 | ||
147 | i++; | 146 | i++; |
148 | if (i <= ITERATIONS) | 147 | if (i <= ITERATIONS) |
149 | fprintf(stderr,"..%i",i); | 148 | fprintf (stderr, "..%i", i); |
150 | } | 149 | } |
151 | fprintf(stderr,"\n"); | 150 | fprintf (stderr, "\n"); |
152 | end(); | 151 | end (); |
153 | } | 152 | } |
154 | 153 | ||
155 | int | 154 | int |
diff --git a/src/transport/transport-testing.c b/src/transport/transport-testing.c index 61c392d77..162024eb4 100644 --- a/src/transport/transport-testing.c +++ b/src/transport/transport-testing.c | |||
@@ -321,10 +321,11 @@ GNUNET_TRANSPORT_TESTING_connect_peers (struct PeerContext *p1, | |||
321 | * Tou MUST cancel the request if you stop the peers before the peers connected succesfully | 321 | * Tou MUST cancel the request if you stop the peers before the peers connected succesfully |
322 | * @param cc a connect request handle | 322 | * @param cc a connect request handle |
323 | */ | 323 | */ |
324 | void | 324 | void GNUNET_TRANSPORT_TESTING_connect_peers_cancel |
325 | GNUNET_TRANSPORT_TESTING_connect_peers_cancel (GNUNET_TRANSPORT_TESTING_ConnectRequest ccr) | 325 | (GNUNET_TRANSPORT_TESTING_ConnectRequest ccr) |
326 | { | 326 | { |
327 | struct ConnectingContext *cc = ccr; | 327 | struct ConnectingContext *cc = ccr; |
328 | |||
328 | /* clean up */ | 329 | /* clean up */ |
329 | GNUNET_TRANSPORT_get_hello_cancel (cc->th_p2, &exchange_hello_last, cc); | 330 | GNUNET_TRANSPORT_get_hello_cancel (cc->th_p2, &exchange_hello_last, cc); |
330 | GNUNET_TRANSPORT_get_hello_cancel (cc->th_p1, &exchange_hello, cc); | 331 | GNUNET_TRANSPORT_get_hello_cancel (cc->th_p1, &exchange_hello, cc); |
diff --git a/src/transport/transport_api.c b/src/transport/transport_api.c index fed611e49..a6d2fa0ba 100644 --- a/src/transport/transport_api.c +++ b/src/transport/transport_api.c | |||
@@ -86,7 +86,7 @@ struct GNUNET_TRANSPORT_TransmitHandle | |||
86 | struct GNUNET_TIME_Absolute timeout; | 86 | struct GNUNET_TIME_Absolute timeout; |
87 | 87 | ||
88 | /** | 88 | /** |
89 | * Task to trigger request timeout if the request is stalled due to | 89 | * Task to trigger request timeout if the request is stalled due to |
90 | * congestion. | 90 | * congestion. |
91 | */ | 91 | */ |
92 | GNUNET_SCHEDULER_TaskIdentifier timeout_task; | 92 | GNUNET_SCHEDULER_TaskIdentifier timeout_task; |
@@ -520,7 +520,7 @@ demultiplexer (void *cls, const struct GNUNET_MessageHeader *msg) | |||
520 | GNUNET_assert (GNUNET_SCHEDULER_NO_TASK != n->th->timeout_task); | 520 | GNUNET_assert (GNUNET_SCHEDULER_NO_TASK != n->th->timeout_task); |
521 | GNUNET_SCHEDULER_cancel (n->th->timeout_task); | 521 | GNUNET_SCHEDULER_cancel (n->th->timeout_task); |
522 | n->th->timeout_task = GNUNET_SCHEDULER_NO_TASK; | 522 | n->th->timeout_task = GNUNET_SCHEDULER_NO_TASK; |
523 | /* we've been waiting for this (congestion, not quota, | 523 | /* we've been waiting for this (congestion, not quota, |
524 | * caused delayed transmission) */ | 524 | * caused delayed transmission) */ |
525 | n->hn = GNUNET_CONTAINER_heap_insert (h->ready_heap, n, 0); | 525 | n->hn = GNUNET_CONTAINER_heap_insert (h->ready_heap, n, 0); |
526 | schedule_transmission (h); | 526 | schedule_transmission (h); |
@@ -1082,7 +1082,7 @@ send_try_connect (void *cls, size_t size, void *buf) | |||
1082 | 1082 | ||
1083 | 1083 | ||
1084 | /** | 1084 | /** |
1085 | * Ask the transport service to establish a connection to | 1085 | * Ask the transport service to establish a connection to |
1086 | * the given peer. | 1086 | * the given peer. |
1087 | * | 1087 | * |
1088 | * @param handle connection to transport service | 1088 | * @param handle connection to transport service |
diff --git a/src/transport/wlan/byteorder.h b/src/transport/wlan/byteorder.h index 1abc631b8..1a13470e9 100644 --- a/src/transport/wlan/byteorder.h +++ b/src/transport/wlan/byteorder.h | |||
@@ -54,12 +54,12 @@ | |||
54 | 54 | ||
55 | #ifndef __int8_t_defined | 55 | #ifndef __int8_t_defined |
56 | typedef uint64_t u_int64_t; | 56 | typedef uint64_t u_int64_t; |
57 | typedef uint32_t u_int32_t; | 57 | typedef uint32_t u_int32_t; |
58 | typedef uint16_t u_int16_t; | 58 | typedef uint16_t u_int16_t; |
59 | typedef uint8_t u_int8_t; | 59 | typedef uint8_t u_int8_t; |
60 | 60 | ||
61 | 61 | ||
62 | #endif /* */ | 62 | #endif /* */ |
63 | 63 | ||
64 | #ifndef htole16 | 64 | #ifndef htole16 |
65 | #if __BYTE_ORDER == __LITTLE_ENDIAN | 65 | #if __BYTE_ORDER == __LITTLE_ENDIAN |
@@ -77,7 +77,7 @@ typedef uint64_t u_int64_t; | |||
77 | #define htole64(x) (x) | 77 | #define htole64(x) (x) |
78 | #define be64toh(x) ___my_swab64 (x) | 78 | #define be64toh(x) ___my_swab64 (x) |
79 | #define le64toh(x) (x) | 79 | #define le64toh(x) (x) |
80 | #else /* */ | 80 | #else /* */ |
81 | #define htobe16(x) (x) | 81 | #define htobe16(x) (x) |
82 | #define htole16(x) ___my_swab16 (x) | 82 | #define htole16(x) ___my_swab16 (x) |
83 | #define be16toh(x) (x) | 83 | #define be16toh(x) (x) |
@@ -92,10 +92,10 @@ typedef uint64_t u_int64_t; | |||
92 | #define htole64(x) ___my_swab64 (x) | 92 | #define htole64(x) ___my_swab64 (x) |
93 | #define be64toh(x) (x) | 93 | #define be64toh(x) (x) |
94 | #define le64toh(x) ___my_swab64 (x) | 94 | #define le64toh(x) ___my_swab64 (x) |
95 | #endif /* */ | 95 | #endif /* */ |
96 | #endif /* */ | 96 | #endif /* */ |
97 | 97 | ||
98 | #endif /* */ | 98 | #endif /* */ |
99 | /* | 99 | /* |
100 | * Cygwin | 100 | * Cygwin |
101 | */ | 101 | */ |
@@ -115,7 +115,7 @@ typedef uint64_t u_int64_t; | |||
115 | #define __cpu_to_le32(x) (x) | 115 | #define __cpu_to_le32(x) (x) |
116 | #define __cpu_to_le16(x) (x) | 116 | #define __cpu_to_le16(x) (x) |
117 | #define AIRCRACK_NG_BYTE_ORDER_DEFINED | 117 | #define AIRCRACK_NG_BYTE_ORDER_DEFINED |
118 | #endif /* */ | 118 | #endif /* */ |
119 | /* | 119 | /* |
120 | * Windows (DDK) | 120 | * Windows (DDK) |
121 | */ | 121 | */ |
@@ -134,7 +134,7 @@ typedef uint64_t u_int64_t; | |||
134 | #define __cpu_to_le32(x) (x) | 134 | #define __cpu_to_le32(x) (x) |
135 | #define __cpu_to_le16(x) (x) | 135 | #define __cpu_to_le16(x) (x) |
136 | #define AIRCRACK_NG_BYTE_ORDER_DEFINED | 136 | #define AIRCRACK_NG_BYTE_ORDER_DEFINED |
137 | #endif /* */ | 137 | #endif /* */ |
138 | /* | 138 | /* |
139 | * MAC (Darwin) | 139 | * MAC (Darwin) |
140 | */ | 140 | */ |
@@ -156,7 +156,7 @@ typedef uint64_t u_int64_t; | |||
156 | #define __cpu_to_le64(x) (unsigned long long) OSSwapHostToLittleInt64((uint64_t)x) | 156 | #define __cpu_to_le64(x) (unsigned long long) OSSwapHostToLittleInt64((uint64_t)x) |
157 | #define __cpu_to_le32(x) (unsigned long) OSSwapHostToLittleInt32((uint32_t)x) | 157 | #define __cpu_to_le32(x) (unsigned long) OSSwapHostToLittleInt32((uint32_t)x) |
158 | #define __cpu_to_le16(x) (unsigned short) OSSwapHostToLittleInt16((uint16_t)x) | 158 | #define __cpu_to_le16(x) (unsigned short) OSSwapHostToLittleInt16((uint16_t)x) |
159 | #else /* */ | 159 | #else /* */ |
160 | #include <architecture/byte_order.h> | 160 | #include <architecture/byte_order.h> |
161 | #define __swab64(x) NXSwapLongLong(x) | 161 | #define __swab64(x) NXSwapLongLong(x) |
162 | #define __swab32(x) NXSwapLong(x) | 162 | #define __swab32(x) NXSwapLong(x) |
@@ -173,13 +173,13 @@ typedef uint64_t u_int64_t; | |||
173 | #define __cpu_to_le64(x) NXSwapHostLongLongToLittle(x) | 173 | #define __cpu_to_le64(x) NXSwapHostLongLongToLittle(x) |
174 | #define __cpu_to_le32(x) NXSwapHostLongToLittle(x) | 174 | #define __cpu_to_le32(x) NXSwapHostLongToLittle(x) |
175 | #define __cpu_to_le16(x) NXSwapHostShortToLittle(x) | 175 | #define __cpu_to_le16(x) NXSwapHostShortToLittle(x) |
176 | #endif /* */ | 176 | #endif /* */ |
177 | #define __LITTLE_ENDIAN 1234 | 177 | #define __LITTLE_ENDIAN 1234 |
178 | #define __BIG_ENDIAN 4321 | 178 | #define __BIG_ENDIAN 4321 |
179 | #define __PDP_ENDIAN 3412 | 179 | #define __PDP_ENDIAN 3412 |
180 | #define __BYTE_ORDER __BIG_ENDIAN | 180 | #define __BYTE_ORDER __BIG_ENDIAN |
181 | #define AIRCRACK_NG_BYTE_ORDER_DEFINED | 181 | #define AIRCRACK_NG_BYTE_ORDER_DEFINED |
182 | #endif /* */ | 182 | #endif /* */ |
183 | /* | 183 | /* |
184 | * Solaris | 184 | * Solaris |
185 | * ------- | 185 | * ------- |
@@ -200,14 +200,14 @@ typedef uint64_t u_int64_t; | |||
200 | #define __cpu_to_le64(x) ___my_swab64(x) | 200 | #define __cpu_to_le64(x) ___my_swab64(x) |
201 | #define __cpu_to_le32(x) ___my_swab32(x) | 201 | #define __cpu_to_le32(x) ___my_swab32(x) |
202 | #define __cpu_to_le16(x) ___my_swab16(x) | 202 | #define __cpu_to_le16(x) ___my_swab16(x) |
203 | typedef uint64_t u_int64_t; | 203 | typedef uint64_t u_int64_t; |
204 | typedef uint32_t u_int32_t; | 204 | typedef uint32_t u_int32_t; |
205 | typedef uint16_t u_int16_t; | 205 | typedef uint16_t u_int16_t; |
206 | typedef uint8_t u_int8_t; | 206 | typedef uint8_t u_int8_t; |
207 | 207 | ||
208 | 208 | ||
209 | #define AIRCRACK_NG_BYTE_ORDER_DEFINED | 209 | #define AIRCRACK_NG_BYTE_ORDER_DEFINED |
210 | #endif /* */ | 210 | #endif /* */ |
211 | /* | 211 | /* |
212 | * Custom stuff | 212 | * Custom stuff |
213 | */ | 213 | */ |
@@ -216,12 +216,12 @@ typedef uint64_t u_int64_t; | |||
216 | #define __cpu_to_be64(x) = OSSwapHostToBigInt64(x) | 216 | #define __cpu_to_be64(x) = OSSwapHostToBigInt64(x) |
217 | #define __cpu_to_be32(x) = OSSwapHostToBigInt32(x) | 217 | #define __cpu_to_be32(x) = OSSwapHostToBigInt32(x) |
218 | #define AIRCRACK_NG_BYTE_ORDER_DEFINED | 218 | #define AIRCRACK_NG_BYTE_ORDER_DEFINED |
219 | #endif /* */ | 219 | #endif /* */ |
220 | 220 | ||
221 | // FreeBSD | 221 | // FreeBSD |
222 | #ifdef __FreeBSD__ | 222 | #ifdef __FreeBSD__ |
223 | #include <machine/endian.h> | 223 | #include <machine/endian.h> |
224 | #endif /* */ | 224 | #endif /* */ |
225 | // XXX: Is there anything to include on OpenBSD/NetBSD/DragonFlyBSD/...? | 225 | // XXX: Is there anything to include on OpenBSD/NetBSD/DragonFlyBSD/...? |
226 | 226 | ||
227 | // XXX: Mac: Check http://www.opensource.apple.com/source/CF/CF-476.18/CFByteOrder.h | 227 | // XXX: Mac: Check http://www.opensource.apple.com/source/CF/CF-476.18/CFByteOrder.h |
@@ -233,39 +233,39 @@ typedef uint64_t u_int64_t; | |||
233 | #define AIRCRACK_NG_LITTLE_ENDIAN __LITTLE_ENDIAN | 233 | #define AIRCRACK_NG_LITTLE_ENDIAN __LITTLE_ENDIAN |
234 | #elif defined(_LITTLE_ENDIAN) | 234 | #elif defined(_LITTLE_ENDIAN) |
235 | #define AIRCRACK_NG_LITTLE_ENDIAN _LITTLE_ENDIAN | 235 | #define AIRCRACK_NG_LITTLE_ENDIAN _LITTLE_ENDIAN |
236 | #endif /* */ | 236 | #endif /* */ |
237 | #if defined(BIG_ENDIAN) | 237 | #if defined(BIG_ENDIAN) |
238 | #define AIRCRACK_NG_BIG_ENDIAN BIG_ENDIAN | 238 | #define AIRCRACK_NG_BIG_ENDIAN BIG_ENDIAN |
239 | #elif defined(__BIG_ENDIAN) | 239 | #elif defined(__BIG_ENDIAN) |
240 | #define AIRCRACK_NG_BIG_ENDIAN __BIG_ENDIAN | 240 | #define AIRCRACK_NG_BIG_ENDIAN __BIG_ENDIAN |
241 | #elif defined(_BIG_ENDIAN) | 241 | #elif defined(_BIG_ENDIAN) |
242 | #define AIRCRACK_NG_BIG_ENDIAN _BIG_ENDIAN | 242 | #define AIRCRACK_NG_BIG_ENDIAN _BIG_ENDIAN |
243 | #endif /* */ | 243 | #endif /* */ |
244 | #if !defined(AIRCRACK_NG_LITTLE_ENDIAN) && !defined(AIRCRACK_NG_BIG_ENDIAN) | 244 | #if !defined(AIRCRACK_NG_LITTLE_ENDIAN) && !defined(AIRCRACK_NG_BIG_ENDIAN) |
245 | #error Impossible to determine endianness (Little or Big endian), please contact the author. | 245 | #error Impossible to determine endianness (Little or Big endian), please contact the author. |
246 | #endif /* */ | 246 | #endif /* */ |
247 | #if defined(BYTE_ORDER) | 247 | #if defined(BYTE_ORDER) |
248 | #if (BYTE_ORDER == AIRCRACK_NG_LITTLE_ENDIAN) | 248 | #if (BYTE_ORDER == AIRCRACK_NG_LITTLE_ENDIAN) |
249 | #define AIRCRACK_NG_BYTE_ORDER AIRCRACK_NG_LITTLE_ENDIAN | 249 | #define AIRCRACK_NG_BYTE_ORDER AIRCRACK_NG_LITTLE_ENDIAN |
250 | #elif (BYTE_ORDER == AIRCRACK_NG_BIG_ENDIAN) | 250 | #elif (BYTE_ORDER == AIRCRACK_NG_BIG_ENDIAN) |
251 | #define AIRCRACK_NG_BYTE_ORDER AIRCRACK_NG_BIG_ENDIAN | 251 | #define AIRCRACK_NG_BYTE_ORDER AIRCRACK_NG_BIG_ENDIAN |
252 | #endif /* */ | 252 | #endif /* */ |
253 | #elif defined(__BYTE_ORDER) | 253 | #elif defined(__BYTE_ORDER) |
254 | #if (__BYTE_ORDER == AIRCRACK_NG_LITTLE_ENDIAN) | 254 | #if (__BYTE_ORDER == AIRCRACK_NG_LITTLE_ENDIAN) |
255 | #define AIRCRACK_NG_BYTE_ORDER AIRCRACK_NG_LITTLE_ENDIAN | 255 | #define AIRCRACK_NG_BYTE_ORDER AIRCRACK_NG_LITTLE_ENDIAN |
256 | #elif (__BYTE_ORDER == AIRCRACK_NG_BIG_ENDIAN) | 256 | #elif (__BYTE_ORDER == AIRCRACK_NG_BIG_ENDIAN) |
257 | #define AIRCRACK_NG_BYTE_ORDER AIRCRACK_NG_BIG_ENDIAN | 257 | #define AIRCRACK_NG_BYTE_ORDER AIRCRACK_NG_BIG_ENDIAN |
258 | #endif /* */ | 258 | #endif /* */ |
259 | #elif defined(_BYTE_ORDER) | 259 | #elif defined(_BYTE_ORDER) |
260 | #if (_BYTE_ORDER == AIRCRACK_NG_LITTLE_ENDIAN) | 260 | #if (_BYTE_ORDER == AIRCRACK_NG_LITTLE_ENDIAN) |
261 | #define AIRCRACK_NG_BYTE_ORDER AIRCRACK_NG_LITTLE_ENDIAN | 261 | #define AIRCRACK_NG_BYTE_ORDER AIRCRACK_NG_LITTLE_ENDIAN |
262 | #elif (_BYTE_ORDER == AIRCRACK_NG_BIG_ENDIAN) | 262 | #elif (_BYTE_ORDER == AIRCRACK_NG_BIG_ENDIAN) |
263 | #define AIRCRACK_NG_BYTE_ORDER AIRCRACK_NG_BIG_ENDIAN | 263 | #define AIRCRACK_NG_BYTE_ORDER AIRCRACK_NG_BIG_ENDIAN |
264 | #endif /* */ | 264 | #endif /* */ |
265 | #endif /* */ | 265 | #endif /* */ |
266 | #ifndef AIRCRACK_NG_BYTE_ORDER | 266 | #ifndef AIRCRACK_NG_BYTE_ORDER |
267 | #error Impossible to determine endianness (Little or Big endian), please contact the author. | 267 | #error Impossible to determine endianness (Little or Big endian), please contact the author. |
268 | #endif /* */ | 268 | #endif /* */ |
269 | #if (AIRCRACK_NG_BYTE_ORDER == AIRCRACK_NG_LITTLE_ENDIAN) | 269 | #if (AIRCRACK_NG_BYTE_ORDER == AIRCRACK_NG_LITTLE_ENDIAN) |
270 | #ifndef AIRCRACK_NG_BYTE_ORDER_DEFINED | 270 | #ifndef AIRCRACK_NG_BYTE_ORDER_DEFINED |
271 | #define __be64_to_cpu(x) ___my_swab64(x) | 271 | #define __be64_to_cpu(x) ___my_swab64(x) |
@@ -280,32 +280,32 @@ typedef uint64_t u_int64_t; | |||
280 | #define __cpu_to_le64(x) (x) | 280 | #define __cpu_to_le64(x) (x) |
281 | #define __cpu_to_le32(x) (x) | 281 | #define __cpu_to_le32(x) (x) |
282 | #define __cpu_to_le16(x) (x) | 282 | #define __cpu_to_le16(x) (x) |
283 | #endif /* */ | 283 | #endif /* */ |
284 | #ifndef htobe16 | 284 | #ifndef htobe16 |
285 | #define htobe16 ___my_swab16 | 285 | #define htobe16 ___my_swab16 |
286 | #endif /* */ | 286 | #endif /* */ |
287 | #ifndef htobe32 | 287 | #ifndef htobe32 |
288 | #define htobe32 ___my_swab32 | 288 | #define htobe32 ___my_swab32 |
289 | #endif /* */ | 289 | #endif /* */ |
290 | #ifndef betoh16 | 290 | #ifndef betoh16 |
291 | #define betoh16 ___my_swab16 | 291 | #define betoh16 ___my_swab16 |
292 | #endif /* */ | 292 | #endif /* */ |
293 | #ifndef betoh32 | 293 | #ifndef betoh32 |
294 | #define betoh32 ___my_swab32 | 294 | #define betoh32 ___my_swab32 |
295 | #endif /* */ | 295 | #endif /* */ |
296 | #ifndef htole16 | 296 | #ifndef htole16 |
297 | #define htole16(x) (x) | 297 | #define htole16(x) (x) |
298 | #endif /* */ | 298 | #endif /* */ |
299 | #ifndef htole32 | 299 | #ifndef htole32 |
300 | #define htole32(x) (x) | 300 | #define htole32(x) (x) |
301 | #endif /* */ | 301 | #endif /* */ |
302 | #ifndef letoh16 | 302 | #ifndef letoh16 |
303 | #define letoh16(x) (x) | 303 | #define letoh16(x) (x) |
304 | #endif /* */ | 304 | #endif /* */ |
305 | #ifndef letoh32 | 305 | #ifndef letoh32 |
306 | #define letoh32(x) (x) | 306 | #define letoh32(x) (x) |
307 | #endif /* */ | 307 | #endif /* */ |
308 | #endif /* */ | 308 | #endif /* */ |
309 | #if (AIRCRACK_NG_BYTE_ORDER == AIRCRACK_NG_BIG_ENDIAN) | 309 | #if (AIRCRACK_NG_BYTE_ORDER == AIRCRACK_NG_BIG_ENDIAN) |
310 | #ifndef AIRCRACK_NG_BYTE_ORDER_DEFINED | 310 | #ifndef AIRCRACK_NG_BYTE_ORDER_DEFINED |
311 | #define __be64_to_cpu(x) (x) | 311 | #define __be64_to_cpu(x) (x) |
@@ -320,32 +320,32 @@ typedef uint64_t u_int64_t; | |||
320 | #define __cpu_to_le64(x) ___my_swab64(x) | 320 | #define __cpu_to_le64(x) ___my_swab64(x) |
321 | #define __cpu_to_le32(x) ___my_swab32(x) | 321 | #define __cpu_to_le32(x) ___my_swab32(x) |
322 | #define __cpu_to_le16(x) ___my_swab16(x) | 322 | #define __cpu_to_le16(x) ___my_swab16(x) |
323 | #endif /* */ | 323 | #endif /* */ |
324 | #ifndef htobe16 | 324 | #ifndef htobe16 |
325 | #define htobe16(x) (x) | 325 | #define htobe16(x) (x) |
326 | #endif /* */ | 326 | #endif /* */ |
327 | #ifndef htobe32 | 327 | #ifndef htobe32 |
328 | #define htobe32(x) (x) | 328 | #define htobe32(x) (x) |
329 | #endif /* */ | 329 | #endif /* */ |
330 | #ifndef betoh16 | 330 | #ifndef betoh16 |
331 | #define betoh16(x) (x) | 331 | #define betoh16(x) (x) |
332 | #endif /* */ | 332 | #endif /* */ |
333 | #ifndef betoh32 | 333 | #ifndef betoh32 |
334 | #define betoh32(x) (x) | 334 | #define betoh32(x) (x) |
335 | #endif /* */ | 335 | #endif /* */ |
336 | #ifndef htole16 | 336 | #ifndef htole16 |
337 | #define htole16 ___my_swab16 | 337 | #define htole16 ___my_swab16 |
338 | #endif /* */ | 338 | #endif /* */ |
339 | #ifndef htole32 | 339 | #ifndef htole32 |
340 | #define htole32 ___my_swab32 | 340 | #define htole32 ___my_swab32 |
341 | #endif /* */ | 341 | #endif /* */ |
342 | #ifndef letoh16 | 342 | #ifndef letoh16 |
343 | #define letoh16 ___my_swab16 | 343 | #define letoh16 ___my_swab16 |
344 | #endif /* */ | 344 | #endif /* */ |
345 | #ifndef letoh32 | 345 | #ifndef letoh32 |
346 | #define letoh32 ___my_swab32 | 346 | #define letoh32 ___my_swab32 |
347 | #endif /* */ | 347 | #endif /* */ |
348 | #endif /* */ | 348 | #endif /* */ |
349 | // Common defines | 349 | // Common defines |
350 | #define cpu_to_le64 __cpu_to_le64 | 350 | #define cpu_to_le64 __cpu_to_le64 |
351 | #define le64_to_cpu __le64_to_cpu | 351 | #define le64_to_cpu __le64_to_cpu |
@@ -361,27 +361,27 @@ typedef uint64_t u_int64_t; | |||
361 | #define be16_to_cpu __be16_to_cpu | 361 | #define be16_to_cpu __be16_to_cpu |
362 | #ifndef le16toh | 362 | #ifndef le16toh |
363 | #define le16toh le16_to_cpu | 363 | #define le16toh le16_to_cpu |
364 | #endif /* */ | 364 | #endif /* */ |
365 | #ifndef be16toh | 365 | #ifndef be16toh |
366 | #define be16toh be16_to_cpu | 366 | #define be16toh be16_to_cpu |
367 | #endif /* */ | 367 | #endif /* */ |
368 | #ifndef le32toh | 368 | #ifndef le32toh |
369 | #define le32toh le32_to_cpu | 369 | #define le32toh le32_to_cpu |
370 | #endif /* */ | 370 | #endif /* */ |
371 | #ifndef be32toh | 371 | #ifndef be32toh |
372 | #define be32toh be32_to_cpu | 372 | #define be32toh be32_to_cpu |
373 | #endif /* */ | 373 | #endif /* */ |
374 | 374 | ||
375 | #ifndef htons | 375 | #ifndef htons |
376 | #define htons be16_to_cpu | 376 | #define htons be16_to_cpu |
377 | #endif /* */ | 377 | #endif /* */ |
378 | #ifndef htonl | 378 | #ifndef htonl |
379 | #define htonl cpu_to_be16 | 379 | #define htonl cpu_to_be16 |
380 | #endif /* */ | 380 | #endif /* */ |
381 | #ifndef ntohs | 381 | #ifndef ntohs |
382 | #define ntohs cpu_to_be16 | 382 | #define ntohs cpu_to_be16 |
383 | #endif /* */ | 383 | #endif /* */ |
384 | #ifndef ntohl | 384 | #ifndef ntohl |
385 | #define ntohl cpu_to_be32 | 385 | #define ntohl cpu_to_be32 |
386 | #endif /* */ | 386 | #endif /* */ |
387 | #endif /* */ | 387 | #endif /* */ |
diff --git a/src/transport/wlan/ieee80211.h b/src/transport/wlan/ieee80211.h index a952674ca..fd297f4a4 100644 --- a/src/transport/wlan/ieee80211.h +++ b/src/transport/wlan/ieee80211.h | |||
@@ -646,7 +646,7 @@ enum | |||
646 | 646 | ||
647 | #define IEEE80211_AID(b) ((b) &~ 0xc000) | 647 | #define IEEE80211_AID(b) ((b) &~ 0xc000) |
648 | 648 | ||
649 | /* | 649 | /* |
650 | * RTS frame length parameters. The default is specified in | 650 | * RTS frame length parameters. The default is specified in |
651 | * the 802.11 spec as 512; we treat it as implementation-dependent | 651 | * the 802.11 spec as 512; we treat it as implementation-dependent |
652 | * so it's defined in ieee80211_var.h. The max may be wrong | 652 | * so it's defined in ieee80211_var.h. The max may be wrong |
@@ -655,7 +655,7 @@ enum | |||
655 | #define IEEE80211_RTS_MIN 1 | 655 | #define IEEE80211_RTS_MIN 1 |
656 | #define IEEE80211_RTS_MAX 2346 | 656 | #define IEEE80211_RTS_MAX 2346 |
657 | 657 | ||
658 | /* | 658 | /* |
659 | * TX fragmentation parameters. As above for RTS, we treat | 659 | * TX fragmentation parameters. As above for RTS, we treat |
660 | * default as implementation-dependent so define it elsewhere. | 660 | * default as implementation-dependent so define it elsewhere. |
661 | */ | 661 | */ |
diff --git a/src/util/bandwidth.c b/src/util/bandwidth.c index 95ff4bfff..8d81e55a0 100644 --- a/src/util/bandwidth.c +++ b/src/util/bandwidth.c | |||
@@ -20,7 +20,7 @@ | |||
20 | 20 | ||
21 | /** | 21 | /** |
22 | * @file util/bandwidth.c | 22 | * @file util/bandwidth.c |
23 | * @brief functions related to bandwidth (unit) | 23 | * @brief functions related to bandwidth (unit) |
24 | * @author Christian Grothoff | 24 | * @author Christian Grothoff |
25 | */ | 25 | */ |
26 | #include "platform.h" | 26 | #include "platform.h" |
diff --git a/src/util/client.c b/src/util/client.c index 2b866e6f8..4e6093a68 100644 --- a/src/util/client.c +++ b/src/util/client.c | |||
@@ -103,7 +103,7 @@ struct GNUNET_CLIENT_TransmitHandle | |||
103 | 103 | ||
104 | 104 | ||
105 | /** | 105 | /** |
106 | * Context for processing | 106 | * Context for processing |
107 | * "GNUNET_CLIENT_transmit_and_get_response" requests. | 107 | * "GNUNET_CLIENT_transmit_and_get_response" requests. |
108 | */ | 108 | */ |
109 | struct TransmitGetResponseContext | 109 | struct TransmitGetResponseContext |
@@ -692,7 +692,7 @@ write_test (void *cls, size_t size, void *buf) | |||
692 | * | 692 | * |
693 | * @param service name of the service to wait for | 693 | * @param service name of the service to wait for |
694 | * @param cfg configuration to use | 694 | * @param cfg configuration to use |
695 | * @param timeout how long to wait at most | 695 | * @param timeout how long to wait at most |
696 | * @param task task to run if service is running | 696 | * @param task task to run if service is running |
697 | * (reason will be "PREREQ_DONE" (service running) | 697 | * (reason will be "PREREQ_DONE" (service running) |
698 | * or "TIMEOUT" (service not known to be running)) | 698 | * or "TIMEOUT" (service not known to be running)) |
@@ -1108,7 +1108,7 @@ GNUNET_CLIENT_notify_transmit_ready (struct GNUNET_CLIENT_Connection *sock, | |||
1108 | 1108 | ||
1109 | /** | 1109 | /** |
1110 | * Cancel a request for notification. | 1110 | * Cancel a request for notification. |
1111 | * | 1111 | * |
1112 | * @param th handle from the original request. | 1112 | * @param th handle from the original request. |
1113 | */ | 1113 | */ |
1114 | void | 1114 | void |
@@ -1188,7 +1188,7 @@ transmit_for_response (void *cls, size_t size, void *buf) | |||
1188 | * if the caller does not care about temporary connection errors, | 1188 | * if the caller does not care about temporary connection errors, |
1189 | * for example because the protocol is stateless | 1189 | * for example because the protocol is stateless |
1190 | * @param rn function to call with the response | 1190 | * @param rn function to call with the response |
1191 | * @param rn_cls closure for rn | 1191 | * @param rn_cls closure for rn |
1192 | * @return GNUNET_OK on success, GNUNET_SYSERR if a request | 1192 | * @return GNUNET_OK on success, GNUNET_SYSERR if a request |
1193 | * is already pending | 1193 | * is already pending |
1194 | */ | 1194 | */ |
diff --git a/src/util/configuration.c b/src/util/configuration.c index 534949652..c69042175 100644 --- a/src/util/configuration.c +++ b/src/util/configuration.c | |||
@@ -495,7 +495,7 @@ GNUNET_CONFIGURATION_remove_section (struct GNUNET_CONFIGURATION_Handle *cfg, | |||
495 | * @param cls the destination configuration (struct GNUNET_CONFIGURATION_Handle*) | 495 | * @param cls the destination configuration (struct GNUNET_CONFIGURATION_Handle*) |
496 | * @param section section for the value | 496 | * @param section section for the value |
497 | * @param option option name of the value | 497 | * @param option option name of the value |
498 | * @param value value to copy | 498 | * @param value value to copy |
499 | */ | 499 | */ |
500 | static void | 500 | static void |
501 | copy_entry (void *cls, const char *section, const char *option, | 501 | copy_entry (void *cls, const char *section, const char *option, |
diff --git a/src/util/connection.c b/src/util/connection.c index 9aeca9096..8639d2416 100644 --- a/src/util/connection.c +++ b/src/util/connection.c | |||
@@ -111,7 +111,7 @@ struct GNUNET_CONNECTION_TransmitHandle | |||
111 | 111 | ||
112 | /** | 112 | /** |
113 | * During connect, we try multiple possible IP addresses | 113 | * During connect, we try multiple possible IP addresses |
114 | * to find out which one might work. | 114 | * to find out which one might work. |
115 | */ | 115 | */ |
116 | struct AddressProbe | 116 | struct AddressProbe |
117 | { | 117 | { |
@@ -165,13 +165,13 @@ struct GNUNET_CONNECTION_Handle | |||
165 | const struct GNUNET_CONFIGURATION_Handle *cfg; | 165 | const struct GNUNET_CONFIGURATION_Handle *cfg; |
166 | 166 | ||
167 | /** | 167 | /** |
168 | * Linked list of sockets we are currently trying out | 168 | * Linked list of sockets we are currently trying out |
169 | * (during connect). | 169 | * (during connect). |
170 | */ | 170 | */ |
171 | struct AddressProbe *ap_head; | 171 | struct AddressProbe *ap_head; |
172 | 172 | ||
173 | /** | 173 | /** |
174 | * Linked list of sockets we are currently trying out | 174 | * Linked list of sockets we are currently trying out |
175 | * (during connect). | 175 | * (during connect). |
176 | */ | 176 | */ |
177 | struct AddressProbe *ap_tail; | 177 | struct AddressProbe *ap_tail; |
@@ -1047,7 +1047,7 @@ GNUNET_CONNECTION_check (struct GNUNET_CONNECTION_Handle *sock) | |||
1047 | /** | 1047 | /** |
1048 | * Close the socket and free associated resources. Pending | 1048 | * Close the socket and free associated resources. Pending |
1049 | * transmissions may be completed or dropped depending on the | 1049 | * transmissions may be completed or dropped depending on the |
1050 | * arguments. If a receive call is pending and should | 1050 | * arguments. If a receive call is pending and should |
1051 | * NOT be completed, 'GNUNET_CONNECTION_receive_cancel' | 1051 | * NOT be completed, 'GNUNET_CONNECTION_receive_cancel' |
1052 | * should be called explicitly first. | 1052 | * should be called explicitly first. |
1053 | * | 1053 | * |
diff --git a/src/util/container_heap.c b/src/util/container_heap.c index 059a5b253..cd4d7909a 100644 --- a/src/util/container_heap.c +++ b/src/util/container_heap.c | |||
@@ -1,17 +1,17 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of GNUnet. | 2 | This file is part of GNUnet. |
3 | (C) 2008, 2009 Christian Grothoff (and other contributing authors) | 3 | (C) 2008, 2009 Christian Grothoff (and other contributing authors) |
4 | 4 | ||
5 | GNUnet is free software; you can redistribute it and/or modify | 5 | GNUnet is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published | 6 | it under the terms of the GNU General Public License as published |
7 | by the Free Software Foundation; either version 2, or (at your | 7 | by the Free Software Foundation; either version 2, or (at your |
8 | option) any later version. | 8 | option) any later version. |
9 | 9 | ||
10 | GNUnet is distributed in the hope that it will be useful, but | 10 | GNUnet is distributed in the hope that it will be useful, but |
11 | WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 | General Public License for more details. | 13 | General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU General Public License | 15 | You should have received a copy of the GNU General Public License |
16 | along with GNUnet; see the file COPYING. If not, write to the | 16 | along with GNUnet; see the file COPYING. If not, write to the |
17 | Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 17 | Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
@@ -481,7 +481,7 @@ remove_node (struct GNUNET_CONTAINER_HeapNode *node) | |||
481 | 481 | ||
482 | /** | 482 | /** |
483 | * Removes a node from the heap. | 483 | * Removes a node from the heap. |
484 | * | 484 | * |
485 | * @param node node to remove | 485 | * @param node node to remove |
486 | * @return element data stored at the node | 486 | * @return element data stored at the node |
487 | */ | 487 | */ |
diff --git a/src/util/container_meta_data.c b/src/util/container_meta_data.c index eb515e8fb..16173cca9 100644 --- a/src/util/container_meta_data.c +++ b/src/util/container_meta_data.c | |||
@@ -105,7 +105,7 @@ struct GNUNET_CONTAINER_MetaData | |||
105 | 105 | ||
106 | /** | 106 | /** |
107 | * Create a fresh struct CONTAINER_MetaData token. | 107 | * Create a fresh struct CONTAINER_MetaData token. |
108 | * | 108 | * |
109 | * @return empty meta-data container | 109 | * @return empty meta-data container |
110 | */ | 110 | */ |
111 | struct GNUNET_CONTAINER_MetaData * | 111 | struct GNUNET_CONTAINER_MetaData * |
@@ -251,7 +251,7 @@ GNUNET_CONTAINER_meta_data_test_equal (const struct GNUNET_CONTAINER_MetaData | |||
251 | * used in the main libextractor library and yielding | 251 | * used in the main libextractor library and yielding |
252 | * meta data). | 252 | * meta data). |
253 | * @param type libextractor-type describing the meta data | 253 | * @param type libextractor-type describing the meta data |
254 | * @param format basic format information about data | 254 | * @param format basic format information about data |
255 | * @param data_mime_type mime-type of data (not of the original file); | 255 | * @param data_mime_type mime-type of data (not of the original file); |
256 | * can be NULL (if mime-type is not known) | 256 | * can be NULL (if mime-type is not known) |
257 | * @param data actual meta-data found | 257 | * @param data actual meta-data found |
@@ -339,7 +339,7 @@ GNUNET_CONTAINER_meta_data_insert (struct GNUNET_CONTAINER_MetaData *md, | |||
339 | * used in the main libextractor library and yielding | 339 | * used in the main libextractor library and yielding |
340 | * meta data). | 340 | * meta data). |
341 | * @param type libextractor-type describing the meta data | 341 | * @param type libextractor-type describing the meta data |
342 | * @param format basic format information about data | 342 | * @param format basic format information about data |
343 | * @param data_mime_type mime-type of data (not of the original file); | 343 | * @param data_mime_type mime-type of data (not of the original file); |
344 | * can be NULL (if mime-type is not known) | 344 | * can be NULL (if mime-type is not known) |
345 | * @param data actual meta-data found | 345 | * @param data actual meta-data found |
@@ -587,7 +587,7 @@ GNUNET_CONTAINER_meta_data_get_thumbnail (const struct GNUNET_CONTAINER_MetaData | |||
587 | 587 | ||
588 | /** | 588 | /** |
589 | * Duplicate struct GNUNET_CONTAINER_MetaData. | 589 | * Duplicate struct GNUNET_CONTAINER_MetaData. |
590 | * | 590 | * |
591 | * @param md what to duplicate | 591 | * @param md what to duplicate |
592 | * @return duplicate meta-data container | 592 | * @return duplicate meta-data container |
593 | */ | 593 | */ |
diff --git a/src/util/container_slist.c b/src/util/container_slist.c index 2d7c24c03..1dd0344e4 100644 --- a/src/util/container_slist.c +++ b/src/util/container_slist.c | |||
@@ -55,7 +55,7 @@ struct GNUNET_CONTAINER_SList_Elem | |||
55 | 55 | ||
56 | 56 | ||
57 | /** | 57 | /** |
58 | * Handle to a singly linked list | 58 | * Handle to a singly linked list |
59 | */ | 59 | */ |
60 | struct GNUNET_CONTAINER_SList | 60 | struct GNUNET_CONTAINER_SList |
61 | { | 61 | { |
@@ -77,7 +77,7 @@ struct GNUNET_CONTAINER_SList | |||
77 | 77 | ||
78 | 78 | ||
79 | /** | 79 | /** |
80 | * Handle to a singly linked list iterator | 80 | * Handle to a singly linked list iterator |
81 | */ | 81 | */ |
82 | struct GNUNET_CONTAINER_SList_Iterator | 82 | struct GNUNET_CONTAINER_SList_Iterator |
83 | { | 83 | { |
diff --git a/src/util/crypto_hash.c b/src/util/crypto_hash.c index 6438784ba..c253bbf2f 100644 --- a/src/util/crypto_hash.c +++ b/src/util/crypto_hash.c | |||
@@ -340,7 +340,7 @@ GNUNET_CRYPTO_hash_from_string (const char *enc, GNUNET_HashCode * result) | |||
340 | * fast, not involve bits[0] or bits[4] (they're used elsewhere), and be | 340 | * fast, not involve bits[0] or bits[4] (they're used elsewhere), and be |
341 | * somewhat consistent. And of course, the result should be a positive | 341 | * somewhat consistent. And of course, the result should be a positive |
342 | * number. | 342 | * number. |
343 | * | 343 | * |
344 | * @param a some hash code | 344 | * @param a some hash code |
345 | * @param b some hash code | 345 | * @param b some hash code |
346 | * @return a positive number which is a measure for | 346 | * @return a positive number which is a measure for |
diff --git a/src/util/crypto_kdf.c b/src/util/crypto_kdf.c index cd665ad23..eff4e6fd6 100644 --- a/src/util/crypto_kdf.c +++ b/src/util/crypto_kdf.c | |||
@@ -53,7 +53,7 @@ GNUNET_CRYPTO_kdf_v (void *result, size_t out_len, const void *xts, | |||
53 | * setting. Second, as shown in Section 6, using HMAC with a truncated output as an extractor | 53 | * setting. Second, as shown in Section 6, using HMAC with a truncated output as an extractor |
54 | * allows to prove the security of HKDF under considerably weaker assumptions on the underlying | 54 | * allows to prove the security of HKDF under considerably weaker assumptions on the underlying |
55 | * hash function." | 55 | * hash function." |
56 | * | 56 | * |
57 | * http://eprint.iacr.org/2010/264 | 57 | * http://eprint.iacr.org/2010/264 |
58 | */ | 58 | */ |
59 | 59 | ||
diff --git a/src/util/crypto_random.c b/src/util/crypto_random.c index bb105437d..445f99a62 100644 --- a/src/util/crypto_random.c +++ b/src/util/crypto_random.c | |||
@@ -32,7 +32,7 @@ | |||
32 | 32 | ||
33 | /** | 33 | /** |
34 | * Create a cryptographically weak pseudo-random number in the interval of 0 to 1. | 34 | * Create a cryptographically weak pseudo-random number in the interval of 0 to 1. |
35 | * | 35 | * |
36 | * @return number between 0 and 1. | 36 | * @return number between 0 and 1. |
37 | */ | 37 | */ |
38 | static double | 38 | static double |
diff --git a/src/util/crypto_rsa.c b/src/util/crypto_rsa.c index ec46b486c..46778a842 100644 --- a/src/util/crypto_rsa.c +++ b/src/util/crypto_rsa.c | |||
@@ -547,7 +547,7 @@ GNUNET_CRYPTO_rsa_decode_key (const char *buf, uint16_t len) | |||
547 | * files does not exist, create a new key and write it to the | 547 | * files does not exist, create a new key and write it to the |
548 | * file. Caller must free return value. Note that this function | 548 | * file. Caller must free return value. Note that this function |
549 | * can not guarantee that another process might not be trying | 549 | * can not guarantee that another process might not be trying |
550 | * the same operation on the same file at the same time. | 550 | * the same operation on the same file at the same time. |
551 | * If the contents of the file | 551 | * If the contents of the file |
552 | * are invalid the old file is deleted and a fresh key is | 552 | * are invalid the old file is deleted and a fresh key is |
553 | * created. | 553 | * created. |
diff --git a/src/util/disk.c b/src/util/disk.c index 6ba5db773..9059852d3 100644 --- a/src/util/disk.c +++ b/src/util/disk.c | |||
@@ -139,7 +139,7 @@ translate_unix_perms (enum GNUNET_DISK_AccessPermissions perm) | |||
139 | 139 | ||
140 | 140 | ||
141 | /** | 141 | /** |
142 | * Iterate over all files in the given directory and | 142 | * Iterate over all files in the given directory and |
143 | * accumulate their size. | 143 | * accumulate their size. |
144 | * | 144 | * |
145 | * @param cls closure of type "struct GetFileSizeData" | 145 | * @param cls closure of type "struct GetFileSizeData" |
@@ -339,7 +339,7 @@ GNUNET_DISK_file_get_identifiers (const char *filename, uint64_t * dev, | |||
339 | * an absolute path, the current 'TMPDIR' will be prepended. In any case, | 339 | * an absolute path, the current 'TMPDIR' will be prepended. In any case, |
340 | * 6 random characters will be appended to the name to create a unique | 340 | * 6 random characters will be appended to the name to create a unique |
341 | * filename. | 341 | * filename. |
342 | * | 342 | * |
343 | * @param t component to use for the name; | 343 | * @param t component to use for the name; |
344 | * does NOT contain "XXXXXX" or "/tmp/". | 344 | * does NOT contain "XXXXXX" or "/tmp/". |
345 | * @return NULL on error, otherwise name of fresh | 345 | * @return NULL on error, otherwise name of fresh |
@@ -767,7 +767,7 @@ GNUNET_DISK_file_write (const struct GNUNET_DISK_FileHandle * h, | |||
767 | * @param fn file name | 767 | * @param fn file name |
768 | * @param buffer the data to write | 768 | * @param buffer the data to write |
769 | * @param n number of bytes to write | 769 | * @param n number of bytes to write |
770 | * @param mode file permissions | 770 | * @param mode file permissions |
771 | * @return number of bytes written on success, GNUNET_SYSERR on error | 771 | * @return number of bytes written on success, GNUNET_SYSERR on error |
772 | */ | 772 | */ |
773 | ssize_t | 773 | ssize_t |
@@ -788,7 +788,7 @@ GNUNET_DISK_fn_write (const char *fn, const void *buffer, size_t n, | |||
788 | } | 788 | } |
789 | 789 | ||
790 | /** | 790 | /** |
791 | * Scan a directory for files. | 791 | * Scan a directory for files. |
792 | * | 792 | * |
793 | * @param dirName the name of the directory | 793 | * @param dirName the name of the directory |
794 | * @param callback the method to call for each file, | 794 | * @param callback the method to call for each file, |
diff --git a/src/util/getopt.c b/src/util/getopt.c index eb79db757..d48183b2a 100644 --- a/src/util/getopt.c +++ b/src/util/getopt.c | |||
@@ -609,16 +609,16 @@ GN_getopt_internal (int argc, char *const *argv, const char *optstring, | |||
609 | /* Decode the current option-ARGV-element. */ | 609 | /* Decode the current option-ARGV-element. */ |
610 | 610 | ||
611 | /* Check whether the ARGV-element is a long option. | 611 | /* Check whether the ARGV-element is a long option. |
612 | * | 612 | * |
613 | * If long_only and the ARGV-element has the form "-f", where f is | 613 | * If long_only and the ARGV-element has the form "-f", where f is |
614 | * a valid short option, don't consider it an abbreviated form of | 614 | * a valid short option, don't consider it an abbreviated form of |
615 | * a long option that starts with f. Otherwise there would be no | 615 | * a long option that starts with f. Otherwise there would be no |
616 | * way to give the -f short option. | 616 | * way to give the -f short option. |
617 | * | 617 | * |
618 | * On the other hand, if there's a long option "fubar" and | 618 | * On the other hand, if there's a long option "fubar" and |
619 | * the ARGV-element is "-fu", do consider that an abbreviation of | 619 | * the ARGV-element is "-fu", do consider that an abbreviation of |
620 | * the long option, just like "--fu", and not "-f" with arg "u". | 620 | * the long option, just like "--fu", and not "-f" with arg "u". |
621 | * | 621 | * |
622 | * This distinction seems to be the most useful approach. */ | 622 | * This distinction seems to be the most useful approach. */ |
623 | 623 | ||
624 | if (longopts != NULL && | 624 | if (longopts != NULL && |
diff --git a/src/util/getopt_helpers.c b/src/util/getopt_helpers.c index d0c8c0e6a..d050ec99c 100644 --- a/src/util/getopt_helpers.c +++ b/src/util/getopt_helpers.c | |||
@@ -163,7 +163,7 @@ OUTER: | |||
163 | * @param scls additional closure (will point to the 'int') | 163 | * @param scls additional closure (will point to the 'int') |
164 | * @param option name of the option | 164 | * @param option name of the option |
165 | * @param value not used (NULL) | 165 | * @param value not used (NULL) |
166 | * @return GNUNET_OK | 166 | * @return GNUNET_OK |
167 | */ | 167 | */ |
168 | int | 168 | int |
169 | GNUNET_GETOPT_increment_value (struct GNUNET_GETOPT_CommandLineProcessorContext | 169 | GNUNET_GETOPT_increment_value (struct GNUNET_GETOPT_CommandLineProcessorContext |
@@ -178,7 +178,7 @@ GNUNET_GETOPT_increment_value (struct GNUNET_GETOPT_CommandLineProcessorContext | |||
178 | 178 | ||
179 | 179 | ||
180 | /** | 180 | /** |
181 | * Set an option of type 'int' from the command line to 1 if the | 181 | * Set an option of type 'int' from the command line to 1 if the |
182 | * given option is present. | 182 | * given option is present. |
183 | * A pointer to this function should be passed as part of the | 183 | * A pointer to this function should be passed as part of the |
184 | * 'struct GNUNET_GETOPT_CommandLineOption' array to initialize options | 184 | * 'struct GNUNET_GETOPT_CommandLineOption' array to initialize options |
@@ -189,7 +189,7 @@ GNUNET_GETOPT_increment_value (struct GNUNET_GETOPT_CommandLineProcessorContext | |||
189 | * @param scls additional closure (will point to the 'int') | 189 | * @param scls additional closure (will point to the 'int') |
190 | * @param option name of the option | 190 | * @param option name of the option |
191 | * @param value not used (NULL) | 191 | * @param value not used (NULL) |
192 | * @return GNUNET_OK | 192 | * @return GNUNET_OK |
193 | */ | 193 | */ |
194 | int | 194 | int |
195 | GNUNET_GETOPT_set_one (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, | 195 | GNUNET_GETOPT_set_one (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, |
@@ -214,7 +214,7 @@ GNUNET_GETOPT_set_one (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, | |||
214 | * which will be allocated) | 214 | * which will be allocated) |
215 | * @param option name of the option | 215 | * @param option name of the option |
216 | * @param value actual value of the option (a string) | 216 | * @param value actual value of the option (a string) |
217 | * @return GNUNET_OK | 217 | * @return GNUNET_OK |
218 | */ | 218 | */ |
219 | int | 219 | int |
220 | GNUNET_GETOPT_set_string (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, | 220 | GNUNET_GETOPT_set_string (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, |
diff --git a/src/util/load.c b/src/util/load.c index c7ef07295..35ed443c3 100644 --- a/src/util/load.c +++ b/src/util/load.c | |||
@@ -164,7 +164,7 @@ calculate_load (struct GNUNET_LOAD_Value *load) | |||
164 | if (load->cummulative_request_count <= 1) | 164 | if (load->cummulative_request_count <= 1) |
165 | return; | 165 | return; |
166 | /* calcuate std dev of latency; we have for n values of "i" that: | 166 | /* calcuate std dev of latency; we have for n values of "i" that: |
167 | * | 167 | * |
168 | * avg = (sum val_i) / n | 168 | * avg = (sum val_i) / n |
169 | * stddev = (sum (val_i - avg)^2) / (n-1) | 169 | * stddev = (sum (val_i - avg)^2) / (n-1) |
170 | * = (sum (val_i^2 - 2 avg val_i + avg^2) / (n-1) | 170 | * = (sum (val_i^2 - 2 avg val_i + avg^2) / (n-1) |
diff --git a/src/util/os_installation.c b/src/util/os_installation.c index 00825f2b7..1f4c5f000 100644 --- a/src/util/os_installation.c +++ b/src/util/os_installation.c | |||
@@ -435,7 +435,7 @@ GNUNET_OS_installation_get_path (enum GNUNET_OS_InstallationPathKind dirkind) | |||
435 | * PATH environment variable as a search path. | 435 | * PATH environment variable as a search path. |
436 | * | 436 | * |
437 | * @param binary the name of the file to check | 437 | * @param binary the name of the file to check |
438 | * @return GNUNET_YES if the file is SUID, | 438 | * @return GNUNET_YES if the file is SUID, |
439 | * GNUNET_NO if not SUID (but binary exists) | 439 | * GNUNET_NO if not SUID (but binary exists) |
440 | * GNUNET_SYSERR on error (no such binary or not executable) | 440 | * GNUNET_SYSERR on error (no such binary or not executable) |
441 | */ | 441 | */ |
diff --git a/src/util/peer.c b/src/util/peer.c index cd5444a19..1491211c5 100644 --- a/src/util/peer.c +++ b/src/util/peer.c | |||
@@ -157,7 +157,7 @@ GNUNET_PEER_intern (const struct GNUNET_PeerIdentity *pid) | |||
157 | 157 | ||
158 | /** | 158 | /** |
159 | * Decrement multiple RCs of peer identities by one. | 159 | * Decrement multiple RCs of peer identities by one. |
160 | * | 160 | * |
161 | * @param ids array of PIDs to decrement the RCs of | 161 | * @param ids array of PIDs to decrement the RCs of |
162 | * @param count size of the ids array | 162 | * @param count size of the ids array |
163 | */ | 163 | */ |
diff --git a/src/util/plugin.c b/src/util/plugin.c index 08b32b295..dbd3519aa 100644 --- a/src/util/plugin.c +++ b/src/util/plugin.c | |||
@@ -151,7 +151,7 @@ resolve_function (struct PluginList *plug, const char *name) | |||
151 | * Test if a plugin exists. | 151 | * Test if a plugin exists. |
152 | * | 152 | * |
153 | * Note that the library must export a symbol called | 153 | * Note that the library must export a symbol called |
154 | * "library_name_init" for the test to succeed. | 154 | * "library_name_init" for the test to succeed. |
155 | * | 155 | * |
156 | * @param library_name name of the plugin to test if it is installed | 156 | * @param library_name name of the plugin to test if it is installed |
157 | * @return GNUNET_YES if the plugin exists, GNUNET_NO if not | 157 | * @return GNUNET_YES if the plugin exists, GNUNET_NO if not |
diff --git a/src/util/pseudonym.c b/src/util/pseudonym.c index 85a485098..85353c6da 100644 --- a/src/util/pseudonym.c +++ b/src/util/pseudonym.c | |||
@@ -31,41 +31,41 @@ | |||
31 | #include "gnunet_pseudonym_lib.h" | 31 | #include "gnunet_pseudonym_lib.h" |
32 | #include "gnunet_bio_lib.h" | 32 | #include "gnunet_bio_lib.h" |
33 | 33 | ||
34 | /** | 34 | /** |
35 | * Name of the directory which stores meta data for pseudonym | 35 | * Name of the directory which stores meta data for pseudonym |
36 | */ | 36 | */ |
37 | #define PS_METADATA_DIR DIR_SEPARATOR_STR "data" DIR_SEPARATOR_STR "pseudonyms" DIR_SEPARATOR_STR "metadata" DIR_SEPARATOR_STR | 37 | #define PS_METADATA_DIR DIR_SEPARATOR_STR "data" DIR_SEPARATOR_STR "pseudonyms" DIR_SEPARATOR_STR "metadata" DIR_SEPARATOR_STR |
38 | 38 | ||
39 | /** | 39 | /** |
40 | * Name of the directory which stores names for pseudonyms | 40 | * Name of the directory which stores names for pseudonyms |
41 | */ | 41 | */ |
42 | #define PS_NAMES_DIR DIR_SEPARATOR_STR "data" DIR_SEPARATOR_STR "pseudonyms" DIR_SEPARATOR_STR "names" DIR_SEPARATOR_STR | 42 | #define PS_NAMES_DIR DIR_SEPARATOR_STR "data" DIR_SEPARATOR_STR "pseudonyms" DIR_SEPARATOR_STR "names" DIR_SEPARATOR_STR |
43 | 43 | ||
44 | 44 | ||
45 | /** | 45 | /** |
46 | * Registered callbacks for discovery of pseudonyms. | 46 | * Registered callbacks for discovery of pseudonyms. |
47 | */ | 47 | */ |
48 | struct DiscoveryCallback | 48 | struct DiscoveryCallback |
49 | { | 49 | { |
50 | /** | 50 | /** |
51 | * This is a linked list. | 51 | * This is a linked list. |
52 | */ | 52 | */ |
53 | struct DiscoveryCallback *next; | 53 | struct DiscoveryCallback *next; |
54 | 54 | ||
55 | /** | 55 | /** |
56 | * Function to call each time a pseudonym is discovered. | 56 | * Function to call each time a pseudonym is discovered. |
57 | */ | 57 | */ |
58 | GNUNET_PSEUDONYM_Iterator callback; | 58 | GNUNET_PSEUDONYM_Iterator callback; |
59 | 59 | ||
60 | /** | 60 | /** |
61 | * Closure for callback. | 61 | * Closure for callback. |
62 | */ | 62 | */ |
63 | void *closure; | 63 | void *closure; |
64 | }; | 64 | }; |
65 | 65 | ||
66 | 66 | ||
67 | /** | 67 | /** |
68 | * Head of the linked list of functions to call when | 68 | * Head of the linked list of functions to call when |
69 | * new pseudonyms are added. | 69 | * new pseudonyms are added. |
70 | */ | 70 | */ |
71 | static struct DiscoveryCallback *head; | 71 | static struct DiscoveryCallback *head; |
@@ -280,7 +280,7 @@ read_info (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
280 | /** | 280 | /** |
281 | * Return the unique, human readable name for the given namespace. | 281 | * Return the unique, human readable name for the given namespace. |
282 | * | 282 | * |
283 | * @param cfg configuration | 283 | * @param cfg configuration |
284 | * @param nsid cryptographic ID of the namespace | 284 | * @param nsid cryptographic ID of the namespace |
285 | * @return NULL on failure (should never happen) | 285 | * @return NULL on failure (should never happen) |
286 | */ | 286 | */ |
@@ -489,7 +489,7 @@ list_pseudonym_helper (void *cls, const char *fullname) | |||
489 | /** | 489 | /** |
490 | * List all available pseudonyms. | 490 | * List all available pseudonyms. |
491 | * | 491 | * |
492 | * @param cfg overall configuration | 492 | * @param cfg overall configuration |
493 | * @param iterator function to call for each pseudonym | 493 | * @param iterator function to call for each pseudonym |
494 | * @param closure closure for iterator | 494 | * @param closure closure for iterator |
495 | * @return number of pseudonyms found | 495 | * @return number of pseudonyms found |
diff --git a/src/util/resolver_api.c b/src/util/resolver_api.c index 3607ce67f..69c49d1e8 100644 --- a/src/util/resolver_api.c +++ b/src/util/resolver_api.c | |||
@@ -268,7 +268,7 @@ GNUNET_RESOLVER_disconnect () | |||
268 | /** | 268 | /** |
269 | * Convert IP address to string without DNS resolution. | 269 | * Convert IP address to string without DNS resolution. |
270 | * | 270 | * |
271 | * @param sa the address | 271 | * @param sa the address |
272 | * @param salen number of bytes in sa | 272 | * @param salen number of bytes in sa |
273 | * @return address as a string, NULL on error | 273 | * @return address as a string, NULL on error |
274 | */ | 274 | */ |
@@ -469,7 +469,7 @@ handle_response (void *cls, const struct GNUNET_MessageHeader *msg) | |||
469 | 469 | ||
470 | 470 | ||
471 | /** | 471 | /** |
472 | * We've been asked to lookup the address for a hostname and were | 472 | * We've been asked to lookup the address for a hostname and were |
473 | * given a valid numeric string. Perform the callbacks for the | 473 | * given a valid numeric string. Perform the callbacks for the |
474 | * numeric addresses. | 474 | * numeric addresses. |
475 | * | 475 | * |
@@ -524,7 +524,7 @@ numeric_resolution (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
524 | 524 | ||
525 | 525 | ||
526 | /** | 526 | /** |
527 | * We've been asked to lookup the address for a hostname and were | 527 | * We've been asked to lookup the address for a hostname and were |
528 | * given a variant of "loopback". Perform the callbacks for the | 528 | * given a variant of "loopback". Perform the callbacks for the |
529 | * respective loopback numeric addresses. | 529 | * respective loopback numeric addresses. |
530 | * | 530 | * |
diff --git a/src/util/scheduler.c b/src/util/scheduler.c index 52824d8b3..0ed48e793 100644 --- a/src/util/scheduler.c +++ b/src/util/scheduler.c | |||
@@ -613,7 +613,7 @@ destroy_task (struct Task *t) | |||
613 | * empty. Keep running tasks until we are either no longer running | 613 | * empty. Keep running tasks until we are either no longer running |
614 | * "URGENT" tasks or until we have at least one "pending" task (which | 614 | * "URGENT" tasks or until we have at least one "pending" task (which |
615 | * may become ready, hence we should select on it). Naturally, if | 615 | * may become ready, hence we should select on it). Naturally, if |
616 | * there are no more ready tasks, we also return. | 616 | * there are no more ready tasks, we also return. |
617 | * | 617 | * |
618 | * @param rs FDs ready for reading | 618 | * @param rs FDs ready for reading |
619 | * @param ws FDs ready for writing | 619 | * @param ws FDs ready for writing |
@@ -726,7 +726,7 @@ sighandler_shutdown () | |||
726 | 726 | ||
727 | /** | 727 | /** |
728 | * Check if the system is still life. Trigger shutdown if we | 728 | * Check if the system is still life. Trigger shutdown if we |
729 | * have tasks, but none of them give us lifeness. | 729 | * have tasks, but none of them give us lifeness. |
730 | * | 730 | * |
731 | * @return GNUNET_OK to continue the main loop, | 731 | * @return GNUNET_OK to continue the main loop, |
732 | * GNUNET_NO to exit | 732 | * GNUNET_NO to exit |
@@ -893,7 +893,7 @@ GNUNET_SCHEDULER_run (GNUNET_SCHEDULER_Task task, void *task_cls) | |||
893 | 893 | ||
894 | /** | 894 | /** |
895 | * Obtain the reason code for why the current task was | 895 | * Obtain the reason code for why the current task was |
896 | * started. Will return the same value as | 896 | * started. Will return the same value as |
897 | * the GNUNET_SCHEDULER_TaskContext's reason field. | 897 | * the GNUNET_SCHEDULER_TaskContext's reason field. |
898 | * | 898 | * |
899 | * @return reason(s) why the current task is run | 899 | * @return reason(s) why the current task is run |
@@ -1134,7 +1134,7 @@ GNUNET_SCHEDULER_add_with_priority (enum GNUNET_SCHEDULER_Priority prio, | |||
1134 | * will be scheduled for execution once the delay has expired. It | 1134 | * will be scheduled for execution once the delay has expired. It |
1135 | * will be run with the priority of the calling task. | 1135 | * will be run with the priority of the calling task. |
1136 | * | 1136 | * |
1137 | * @param delay when should this operation time out? Use | 1137 | * @param delay when should this operation time out? Use |
1138 | * GNUNET_TIME_UNIT_FOREVER_REL for "on shutdown" | 1138 | * GNUNET_TIME_UNIT_FOREVER_REL for "on shutdown" |
1139 | * @param task main function of the task | 1139 | * @param task main function of the task |
1140 | * @param task_cls closure of task | 1140 | * @param task_cls closure of task |
@@ -1404,7 +1404,7 @@ add_without_sets (struct GNUNET_TIME_Relative delay, int rfd, int wfd, | |||
1404 | * socket operation is ready. It will be run with the priority of | 1404 | * socket operation is ready. It will be run with the priority of |
1405 | * the calling task. | 1405 | * the calling task. |
1406 | * | 1406 | * |
1407 | * @param delay when should this operation time out? Use | 1407 | * @param delay when should this operation time out? Use |
1408 | * GNUNET_TIME_UNIT_FOREVER_REL for "on shutdown" | 1408 | * GNUNET_TIME_UNIT_FOREVER_REL for "on shutdown" |
1409 | * @param rfd read file-descriptor | 1409 | * @param rfd read file-descriptor |
1410 | * @param task main function of the task | 1410 | * @param task main function of the task |
@@ -1445,7 +1445,7 @@ GNUNET_SCHEDULER_add_read_net (struct GNUNET_TIME_Relative delay, | |||
1445 | * socket operation is ready. It will be run with the priority of | 1445 | * socket operation is ready. It will be run with the priority of |
1446 | * the calling task. | 1446 | * the calling task. |
1447 | * | 1447 | * |
1448 | * @param delay when should this operation time out? Use | 1448 | * @param delay when should this operation time out? Use |
1449 | * GNUNET_TIME_UNIT_FOREVER_REL for "on shutdown" | 1449 | * GNUNET_TIME_UNIT_FOREVER_REL for "on shutdown" |
1450 | * @param wfd write file-descriptor | 1450 | * @param wfd write file-descriptor |
1451 | * @param task main function of the task | 1451 | * @param task main function of the task |
@@ -1487,7 +1487,7 @@ GNUNET_SCHEDULER_add_write_net (struct GNUNET_TIME_Relative delay, | |||
1487 | * socket operation is ready. It will be run with the priority of | 1487 | * socket operation is ready. It will be run with the priority of |
1488 | * the calling task. | 1488 | * the calling task. |
1489 | * | 1489 | * |
1490 | * @param delay when should this operation time out? Use | 1490 | * @param delay when should this operation time out? Use |
1491 | * GNUNET_TIME_UNIT_FOREVER_REL for "on shutdown" | 1491 | * GNUNET_TIME_UNIT_FOREVER_REL for "on shutdown" |
1492 | * @param rfd read file-descriptor | 1492 | * @param rfd read file-descriptor |
1493 | * @param task main function of the task | 1493 | * @param task main function of the task |
@@ -1531,7 +1531,7 @@ GNUNET_SCHEDULER_add_read_file (struct GNUNET_TIME_Relative delay, | |||
1531 | * socket operation is ready. It will be run with the priority of | 1531 | * socket operation is ready. It will be run with the priority of |
1532 | * the calling task. | 1532 | * the calling task. |
1533 | * | 1533 | * |
1534 | * @param delay when should this operation time out? Use | 1534 | * @param delay when should this operation time out? Use |
1535 | * GNUNET_TIME_UNIT_FOREVER_REL for "on shutdown" | 1535 | * GNUNET_TIME_UNIT_FOREVER_REL for "on shutdown" |
1536 | * @param wfd write file-descriptor | 1536 | * @param wfd write file-descriptor |
1537 | * @param task main function of the task | 1537 | * @param task main function of the task |
diff --git a/src/util/server.c b/src/util/server.c index ddbae4410..ce5d16e1e 100644 --- a/src/util/server.c +++ b/src/util/server.c | |||
@@ -742,7 +742,7 @@ process_incoming (void *cls, const void *buf, size_t available, | |||
742 | 742 | ||
743 | /** | 743 | /** |
744 | * Process messages from the client's message tokenizer until either | 744 | * Process messages from the client's message tokenizer until either |
745 | * the tokenizer is empty (and then schedule receiving more), or | 745 | * the tokenizer is empty (and then schedule receiving more), or |
746 | * until some handler is not immediately done (then wait for restart_processing) | 746 | * until some handler is not immediately done (then wait for restart_processing) |
747 | * or shutdown. | 747 | * or shutdown. |
748 | * | 748 | * |
@@ -1229,10 +1229,10 @@ GNUNET_SERVER_client_disable_corking (struct GNUNET_SERVER_Client *client) | |||
1229 | /** | 1229 | /** |
1230 | * Wrapper for transmission notification that calls the original | 1230 | * Wrapper for transmission notification that calls the original |
1231 | * callback and update the last activity time for our connection. | 1231 | * callback and update the last activity time for our connection. |
1232 | * | 1232 | * |
1233 | * @param cls the 'struct GNUNET_SERVER_Client' | 1233 | * @param cls the 'struct GNUNET_SERVER_Client' |
1234 | * @param size number of bytes we can transmit | 1234 | * @param size number of bytes we can transmit |
1235 | * @param buf where to copy the message | 1235 | * @param buf where to copy the message |
1236 | * @return number of bytes actually transmitted | 1236 | * @return number of bytes actually transmitted |
1237 | */ | 1237 | */ |
1238 | static size_t | 1238 | static size_t |
diff --git a/src/util/server_mst.c b/src/util/server_mst.c index 07a7b30b8..ad3be8f63 100644 --- a/src/util/server_mst.c +++ b/src/util/server_mst.c | |||
@@ -110,7 +110,7 @@ GNUNET_SERVER_mst_create (GNUNET_SERVER_MessageTokenizerCallback cb, | |||
110 | * @param client_identity ID of client for which this is a buffer | 110 | * @param client_identity ID of client for which this is a buffer |
111 | * @param buf input data to add | 111 | * @param buf input data to add |
112 | * @param size number of bytes in buf | 112 | * @param size number of bytes in buf |
113 | * @param purge should any excess bytes in the buffer be discarded | 113 | * @param purge should any excess bytes in the buffer be discarded |
114 | * (i.e. for packet-based services like UDP) | 114 | * (i.e. for packet-based services like UDP) |
115 | * @param one_shot only call callback once, keep rest of message in buffer | 115 | * @param one_shot only call callback once, keep rest of message in buffer |
116 | * @return GNUNET_OK if we are done processing (need more data) | 116 | * @return GNUNET_OK if we are done processing (need more data) |
diff --git a/src/util/server_nc.c b/src/util/server_nc.c index a5ee7e0d6..7a26ab9bf 100644 --- a/src/util/server_nc.c +++ b/src/util/server_nc.c | |||
@@ -21,7 +21,7 @@ | |||
21 | /** | 21 | /** |
22 | * @file util/server_nc.c | 22 | * @file util/server_nc.c |
23 | * @brief convenience functions for transmission of | 23 | * @brief convenience functions for transmission of |
24 | * a notification stream | 24 | * a notification stream |
25 | * @author Christian Grothoff | 25 | * @author Christian Grothoff |
26 | */ | 26 | */ |
27 | 27 | ||
@@ -78,7 +78,7 @@ struct ClientList | |||
78 | struct ClientList *next; | 78 | struct ClientList *next; |
79 | 79 | ||
80 | /** | 80 | /** |
81 | * Overall context this client belongs to. | 81 | * Overall context this client belongs to. |
82 | */ | 82 | */ |
83 | struct GNUNET_SERVER_NotificationContext *nc; | 83 | struct GNUNET_SERVER_NotificationContext *nc; |
84 | 84 | ||
diff --git a/src/util/service.c b/src/util/service.c index 9b60dc56b..9e15ae1ab 100644 --- a/src/util/service.c +++ b/src/util/service.c | |||
@@ -751,7 +751,7 @@ add_unixpath (struct sockaddr **saddrs, socklen_t * saddrlens, | |||
751 | *saddrs = (struct sockaddr *) un; | 751 | *saddrs = (struct sockaddr *) un; |
752 | *saddrlens = slen; | 752 | *saddrlens = slen; |
753 | #else | 753 | #else |
754 | /* this function should never be called | 754 | /* this function should never be called |
755 | * unless AF_UNIX is defined! */ | 755 | * unless AF_UNIX is defined! */ |
756 | GNUNET_assert (0); | 756 | GNUNET_assert (0); |
757 | #endif | 757 | #endif |
diff --git a/src/util/test_container_heap.c b/src/util/test_container_heap.c index 62d675bbb..a2a004aa7 100644 --- a/src/util/test_container_heap.c +++ b/src/util/test_container_heap.c | |||
@@ -67,7 +67,7 @@ check () | |||
67 | n1 = GNUNET_CONTAINER_heap_peek (myHeap); | 67 | n1 = GNUNET_CONTAINER_heap_peek (myHeap); |
68 | GNUNET_assert (NULL == n1); | 68 | GNUNET_assert (NULL == n1); |
69 | 69 | ||
70 | // GNUNET_CONTAINER_heap_walk_get_next: heap empty, taking if-branch | 70 | // GNUNET_CONTAINER_heap_walk_get_next: heap empty, taking if-branch |
71 | n1 = GNUNET_CONTAINER_heap_walk_get_next (myHeap); | 71 | n1 = GNUNET_CONTAINER_heap_walk_get_next (myHeap); |
72 | GNUNET_assert (NULL == n1); | 72 | GNUNET_assert (NULL == n1); |
73 | 73 | ||
@@ -75,7 +75,7 @@ check () | |||
75 | GNUNET_assert (NULL != n1); | 75 | GNUNET_assert (NULL != n1); |
76 | 76 | ||
77 | 77 | ||
78 | // GNUNET_CONTAINER_heap_peek not empty, taking if-branch | 78 | // GNUNET_CONTAINER_heap_peek not empty, taking if-branch |
79 | n2 = NULL; | 79 | n2 = NULL; |
80 | n2 = GNUNET_CONTAINER_heap_peek (myHeap); | 80 | n2 = GNUNET_CONTAINER_heap_peek (myHeap); |
81 | GNUNET_assert (NULL != n2); | 81 | GNUNET_assert (NULL != n2); |
@@ -122,7 +122,7 @@ check () | |||
122 | 122 | ||
123 | GNUNET_CONTAINER_heap_destroy (myHeap); | 123 | GNUNET_CONTAINER_heap_destroy (myHeap); |
124 | 124 | ||
125 | // My additions to a complete testcase | 125 | // My additions to a complete testcase |
126 | // Testing a GNUNET_CONTAINER_HEAP_ORDER_MIN | 126 | // Testing a GNUNET_CONTAINER_HEAP_ORDER_MIN |
127 | // Testing remove_node | 127 | // Testing remove_node |
128 | 128 | ||
diff --git a/src/util/test_peer.c b/src/util/test_peer.c index 395d40712..1729114ff 100644 --- a/src/util/test_peer.c +++ b/src/util/test_peer.c | |||
@@ -32,7 +32,7 @@ | |||
32 | #define DEBUG GNUNET_NO | 32 | #define DEBUG GNUNET_NO |
33 | 33 | ||
34 | /** | 34 | /** |
35 | * A list of Peer ID's to play with | 35 | * A list of Peer ID's to play with |
36 | */ | 36 | */ |
37 | static struct GNUNET_PeerIdentity pidArr[NUMBER_OF_PEERS]; | 37 | static struct GNUNET_PeerIdentity pidArr[NUMBER_OF_PEERS]; |
38 | 38 | ||
@@ -99,10 +99,10 @@ check () | |||
99 | GNUNET_PEER_resolve (1, &res); | 99 | GNUNET_PEER_resolve (1, &res); |
100 | GNUNET_assert (0 == memcmp (&res, &pidArr[0], sizeof (res))); | 100 | GNUNET_assert (0 == memcmp (&res, &pidArr[0], sizeof (res))); |
101 | 101 | ||
102 | /* | 102 | /* |
103 | * Attempt to convert pid = 0 (which is reserved) | 103 | * Attempt to convert pid = 0 (which is reserved) |
104 | * into a peer identity object, the peer identity memory | 104 | * into a peer identity object, the peer identity memory |
105 | * is expected to be set to zero | 105 | * is expected to be set to zero |
106 | */ | 106 | */ |
107 | memset (&zero, 0, sizeof (struct GNUNET_PeerIdentity)); | 107 | memset (&zero, 0, sizeof (struct GNUNET_PeerIdentity)); |
108 | GNUNET_log_skip (1, GNUNET_YES); | 108 | GNUNET_log_skip (1, GNUNET_YES); |
diff --git a/src/util/test_resolver_api.c b/src/util/test_resolver_api.c index 563f204eb..704dc479b 100644 --- a/src/util/test_resolver_api.c +++ b/src/util/test_resolver_api.c | |||
@@ -32,7 +32,7 @@ | |||
32 | 32 | ||
33 | #define VERBOSE GNUNET_NO | 33 | #define VERBOSE GNUNET_NO |
34 | 34 | ||
35 | /** | 35 | /** |
36 | * Using DNS root servers to check gnunet's resolver service | 36 | * Using DNS root servers to check gnunet's resolver service |
37 | * a.root-servers.net <-> 198.41.0.4 is a fix 1:1 mapping that should not change over years | 37 | * a.root-servers.net <-> 198.41.0.4 is a fix 1:1 mapping that should not change over years |
38 | * For more information have a look at IANA's website http://www.root-servers.org/ | 38 | * For more information have a look at IANA's website http://www.root-servers.org/ |
diff --git a/src/util/time.c b/src/util/time.c index 34880b08b..d3dd3b5ec 100644 --- a/src/util/time.c +++ b/src/util/time.c | |||
@@ -353,7 +353,7 @@ GNUNET_TIME_relative_divide (struct GNUNET_TIME_Relative rel, | |||
353 | 353 | ||
354 | 354 | ||
355 | /** | 355 | /** |
356 | * Calculate the estimate time of arrival/completion | 356 | * Calculate the estimate time of arrival/completion |
357 | * for an operation. | 357 | * for an operation. |
358 | * | 358 | * |
359 | * @param start when did the operation start? | 359 | * @param start when did the operation start? |
diff --git a/src/vpn/gnunet-service-dns.c b/src/vpn/gnunet-service-dns.c index ba7fa65d7..9e7c10a1d 100644 --- a/src/vpn/gnunet-service-dns.c +++ b/src/vpn/gnunet-service-dns.c | |||
@@ -1119,7 +1119,7 @@ cleanup_task (void *cls | |||
1119 | * @param udp_redirects | 1119 | * @param udp_redirects |
1120 | * @param tcp_redirects | 1120 | * @param tcp_redirects |
1121 | * | 1121 | * |
1122 | * @return | 1122 | * @return |
1123 | */ | 1123 | */ |
1124 | uint64_t | 1124 | uint64_t |
1125 | get_port_from_redirects (const char *udp_redirects, const char *tcp_redirects) | 1125 | get_port_from_redirects (const char *udp_redirects, const char *tcp_redirects) |