diff options
author | Christian Grothoff <christian@grothoff.org> | 2009-09-22 19:06:35 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2009-09-22 19:06:35 +0000 |
commit | 4ad96e182037d35ec6e62a8bfb1d2ea9b14be106 (patch) | |
tree | 7e5b055bce051c11bfd460443956e619466d4710 /src | |
parent | d62bacc863759d211988cd59d0f0849e378d2a61 (diff) | |
download | gnunet-4ad96e182037d35ec6e62a8bfb1d2ea9b14be106.tar.gz gnunet-4ad96e182037d35ec6e62a8bfb1d2ea9b14be106.zip |
documentation cleanup
Diffstat (limited to 'src')
-rw-r--r-- | src/fs/fs_download.c | 9 | ||||
-rw-r--r-- | src/fs/fs_search.c | 2 | ||||
-rw-r--r-- | src/fs/fs_unindex.c | 5 | ||||
-rw-r--r-- | src/fs/fs_uri.c | 4 | ||||
-rw-r--r-- | src/fs/gnunet-directory.c | 6 | ||||
-rw-r--r-- | src/fs/gnunet-download.c | 2 | ||||
-rw-r--r-- | src/fs/gnunet-publish.c | 2 | ||||
-rw-r--r-- | src/fs/gnunet-search.c | 2 | ||||
-rw-r--r-- | src/util/client.c | 4 | ||||
-rw-r--r-- | src/util/common_allocation.c | 4 | ||||
-rw-r--r-- | src/util/common_logging.c | 2 | ||||
-rw-r--r-- | src/util/crypto_hash.c | 2 | ||||
-rw-r--r-- | src/util/crypto_rsa.c | 2 | ||||
-rw-r--r-- | src/util/program.c | 4 | ||||
-rw-r--r-- | src/util/pseudonym.c | 82 | ||||
-rw-r--r-- | src/util/scheduler.c | 56 | ||||
-rw-r--r-- | src/util/server.c | 3 | ||||
-rw-r--r-- | src/util/service.c | 6 | ||||
-rw-r--r-- | src/util/strings.c | 7 |
19 files changed, 168 insertions, 36 deletions
diff --git a/src/fs/fs_download.c b/src/fs/fs_download.c index 9ab4c5ce0..f36807e77 100644 --- a/src/fs/fs_download.c +++ b/src/fs/fs_download.c | |||
@@ -128,7 +128,7 @@ compute_dblock_offset (uint64_t offset, | |||
128 | * Fill in all of the generic fields for | 128 | * Fill in all of the generic fields for |
129 | * a download event. | 129 | * a download event. |
130 | * | 130 | * |
131 | * @param pc structure to fill in | 131 | * @param pi structure to fill in |
132 | * @param dc overall download context | 132 | * @param dc overall download context |
133 | */ | 133 | */ |
134 | static void | 134 | static void |
@@ -229,7 +229,8 @@ try_reconnect (struct GNUNET_FS_DownloadContext *dc); | |||
229 | * the specified node. | 229 | * the specified node. |
230 | * | 230 | * |
231 | * @param fsize overall file size | 231 | * @param fsize overall file size |
232 | * @param off offset of the node | 232 | * @param totaldepth depth of the entire tree |
233 | * @param offset offset of the node | ||
233 | * @param depth depth of the node | 234 | * @param depth depth of the node |
234 | * @return number of bytes stored in this node | 235 | * @return number of bytes stored in this node |
235 | */ | 236 | */ |
@@ -269,9 +270,9 @@ calculate_block_size (uint64_t fsize, | |||
269 | 270 | ||
270 | 271 | ||
271 | /** | 272 | /** |
272 | * Process a search result. | 273 | * Process a download result. |
273 | * | 274 | * |
274 | * @param sc our search context | 275 | * @param dc our download context |
275 | * @param type type of the result | 276 | * @param type type of the result |
276 | * @param data the (encrypted) response | 277 | * @param data the (encrypted) response |
277 | * @param size size of data | 278 | * @param size size of data |
diff --git a/src/fs/fs_search.c b/src/fs/fs_search.c index 1a9fc699e..85d65f483 100644 --- a/src/fs/fs_search.c +++ b/src/fs/fs_search.c | |||
@@ -46,7 +46,7 @@ | |||
46 | * Fill in all of the generic fields for | 46 | * Fill in all of the generic fields for |
47 | * a search event. | 47 | * a search event. |
48 | * | 48 | * |
49 | * @param pc structure to fill in | 49 | * @param pi structure to fill in |
50 | * @param sc overall search context | 50 | * @param sc overall search context |
51 | */ | 51 | */ |
52 | static void | 52 | static void |
diff --git a/src/fs/fs_unindex.c b/src/fs/fs_unindex.c index 977344b98..51d46ea37 100644 --- a/src/fs/fs_unindex.c +++ b/src/fs/fs_unindex.c | |||
@@ -82,8 +82,9 @@ unindex_reader (void *cls, | |||
82 | * Fill in all of the generic fields for | 82 | * Fill in all of the generic fields for |
83 | * an unindex event. | 83 | * an unindex event. |
84 | * | 84 | * |
85 | * @param pc structure to fill in | 85 | * @param pi structure to fill in |
86 | * @param sc overall unindex context | 86 | * @param uc overall unindex context |
87 | * @param offset where we are in the file (for progress) | ||
87 | */ | 88 | */ |
88 | static void | 89 | static void |
89 | make_unindex_status (struct GNUNET_FS_ProgressInfo *pi, | 90 | make_unindex_status (struct GNUNET_FS_ProgressInfo *pi, |
diff --git a/src/fs/fs_uri.c b/src/fs/fs_uri.c index 1c0686ed9..38dba8991 100644 --- a/src/fs/fs_uri.c +++ b/src/fs/fs_uri.c | |||
@@ -470,7 +470,7 @@ c2v (unsigned char a) | |||
470 | /** | 470 | /** |
471 | * Convert string back to binary data. | 471 | * Convert string back to binary data. |
472 | * | 472 | * |
473 | * @param input '\0'-terminated string | 473 | * @param input '\\0'-terminated string |
474 | * @param data where to write binary data | 474 | * @param data where to write binary data |
475 | * @param size how much data should be converted | 475 | * @param size how much data should be converted |
476 | * @return number of characters processed from input, | 476 | * @return number of characters processed from input, |
@@ -808,7 +808,7 @@ GNUNET_FS_uri_loc_get_uri (const struct GNUNET_FS_Uri *uri) | |||
808 | /** | 808 | /** |
809 | * Construct a location URI (this peer will be used for the location). | 809 | * Construct a location URI (this peer will be used for the location). |
810 | * | 810 | * |
811 | * @param baseURI content offered by the sender | 811 | * @param baseUri content offered by the sender |
812 | * @param cfg configuration information (used to find our hostkey) | 812 | * @param cfg configuration information (used to find our hostkey) |
813 | * @param expiration_time how long will the content be offered? | 813 | * @param expiration_time how long will the content be offered? |
814 | * @return the location URI, NULL on error | 814 | * @return the location URI, NULL on error |
diff --git a/src/fs/gnunet-directory.c b/src/fs/gnunet-directory.c index 0cbf700d1..8fc477614 100644 --- a/src/fs/gnunet-directory.c +++ b/src/fs/gnunet-directory.c | |||
@@ -29,6 +29,10 @@ static int ret; | |||
29 | 29 | ||
30 | /** | 30 | /** |
31 | * Print a meta data entry. | 31 | * Print a meta data entry. |
32 | * | ||
33 | * @param cls closure (unused) | ||
34 | * @param type type of the keyword | ||
35 | * @param data value of the keyword | ||
32 | */ | 36 | */ |
33 | static int | 37 | static int |
34 | item_printer (void *cls, | 38 | item_printer (void *cls, |
@@ -49,7 +53,7 @@ item_printer (void *cls, | |||
49 | * @param cls closure (not used) | 53 | * @param cls closure (not used) |
50 | * @param filename name of the file in the directory | 54 | * @param filename name of the file in the directory |
51 | * @param uri URI of the file | 55 | * @param uri URI of the file |
52 | * @param metadata metadata for the file; metadata for | 56 | * @param meta metadata for the file; metadata for |
53 | * the directory if everything else is NULL/zero | 57 | * the directory if everything else is NULL/zero |
54 | * @param length length of the available data for the file | 58 | * @param length length of the available data for the file |
55 | * (of type size_t since data must certainly fit | 59 | * (of type size_t since data must certainly fit |
diff --git a/src/fs/gnunet-download.c b/src/fs/gnunet-download.c index 681608d6b..00565b1a3 100644 --- a/src/fs/gnunet-download.c +++ b/src/fs/gnunet-download.c | |||
@@ -113,7 +113,7 @@ progress_cb (void *cls, | |||
113 | * @param sched the scheduler to use | 113 | * @param sched the scheduler to use |
114 | * @param args remaining command-line arguments | 114 | * @param args remaining command-line arguments |
115 | * @param cfgfile name of the configuration file used (for saving, can be NULL!) | 115 | * @param cfgfile name of the configuration file used (for saving, can be NULL!) |
116 | * @param cfg configuration | 116 | * @param c configuration |
117 | */ | 117 | */ |
118 | static void | 118 | static void |
119 | run (void *cls, | 119 | run (void *cls, |
diff --git a/src/fs/gnunet-publish.c b/src/fs/gnunet-publish.c index a30b36c9e..bf6a46914 100644 --- a/src/fs/gnunet-publish.c +++ b/src/fs/gnunet-publish.c | |||
@@ -258,7 +258,7 @@ publish_inspector (void *cls, | |||
258 | * @param sched the scheduler to use | 258 | * @param sched the scheduler to use |
259 | * @param args remaining command-line arguments | 259 | * @param args remaining command-line arguments |
260 | * @param cfgfile name of the configuration file used (for saving, can be NULL!) | 260 | * @param cfgfile name of the configuration file used (for saving, can be NULL!) |
261 | * @param cfg configuration | 261 | * @param c configuration |
262 | */ | 262 | */ |
263 | static void | 263 | static void |
264 | run (void *cls, | 264 | run (void *cls, |
diff --git a/src/fs/gnunet-search.c b/src/fs/gnunet-search.c index b744d2e1a..ed864fa1c 100644 --- a/src/fs/gnunet-search.c +++ b/src/fs/gnunet-search.c | |||
@@ -134,7 +134,7 @@ progress_cb (void *cls, | |||
134 | * @param sched the scheduler to use | 134 | * @param sched the scheduler to use |
135 | * @param args remaining command-line arguments | 135 | * @param args remaining command-line arguments |
136 | * @param cfgfile name of the configuration file used (for saving, can be NULL!) | 136 | * @param cfgfile name of the configuration file used (for saving, can be NULL!) |
137 | * @param cfg configuration | 137 | * @param c configuration |
138 | */ | 138 | */ |
139 | static void | 139 | static void |
140 | run (void *cls, | 140 | run (void *cls, |
diff --git a/src/util/client.c b/src/util/client.c index 8b356ce45..82ab35d21 100644 --- a/src/util/client.c +++ b/src/util/client.c | |||
@@ -301,7 +301,6 @@ receive_task (void *scls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
301 | /** | 301 | /** |
302 | * Read from the service. | 302 | * Read from the service. |
303 | * | 303 | * |
304 | * @param sched scheduler to use | ||
305 | * @param sock the service | 304 | * @param sock the service |
306 | * @param handler function to call with the message | 305 | * @param handler function to call with the message |
307 | * @param cls closure for handler | 306 | * @param cls closure for handler |
@@ -356,7 +355,6 @@ write_shutdown (void *cls, size_t size, void *buf) | |||
356 | * Request that the service should shutdown. | 355 | * Request that the service should shutdown. |
357 | * Afterwards, the connection should be disconnected. | 356 | * Afterwards, the connection should be disconnected. |
358 | * | 357 | * |
359 | * @param sched scheduler to use | ||
360 | * @param sock the socket connected to the service | 358 | * @param sock the socket connected to the service |
361 | */ | 359 | */ |
362 | void | 360 | void |
@@ -499,7 +497,7 @@ GNUNET_CLIENT_service_test (struct GNUNET_SCHEDULER_Handle *sched, | |||
499 | * are free in the transmission buffer. May call the notify | 497 | * are free in the transmission buffer. May call the notify |
500 | * method immediately if enough space is available. | 498 | * method immediately if enough space is available. |
501 | * | 499 | * |
502 | * @param client connection to the service | 500 | * @param sock connection to the service |
503 | * @param size number of bytes to send | 501 | * @param size number of bytes to send |
504 | * @param timeout after how long should we give up (and call | 502 | * @param timeout after how long should we give up (and call |
505 | * notify with buf NULL and size 0)? | 503 | * notify with buf NULL and size 0)? |
diff --git a/src/util/common_allocation.c b/src/util/common_allocation.c index f39d84cb3..749f824cd 100644 --- a/src/util/common_allocation.c +++ b/src/util/common_allocation.c | |||
@@ -73,8 +73,8 @@ GNUNET_xmalloc_unchecked_ (size_t size, const char *filename, int linenumber) | |||
73 | * Reallocate memory. Checks the return value, aborts if no more | 73 | * Reallocate memory. Checks the return value, aborts if no more |
74 | * memory is available. | 74 | * memory is available. |
75 | * | 75 | * |
76 | * @ptr the pointer to reallocate | 76 | * @param ptr the pointer to reallocate |
77 | * @param size how many bytes of memory to allocate | 77 | * @param n how many bytes of memory to allocate |
78 | * @param filename where in the code was the call to GNUNET_realloc | 78 | * @param filename where in the code was the call to GNUNET_realloc |
79 | * @param linenumber where in the code was the call to GNUNET_realloc | 79 | * @param linenumber where in the code was the call to GNUNET_realloc |
80 | * @return pointer to size bytes of memory | 80 | * @return pointer to size bytes of memory |
diff --git a/src/util/common_logging.c b/src/util/common_logging.c index 8d9eb5a76..436e009ab 100644 --- a/src/util/common_logging.c +++ b/src/util/common_logging.c | |||
@@ -149,6 +149,8 @@ get_type (const char *log) | |||
149 | * | 149 | * |
150 | * @param comp default component to use | 150 | * @param comp default component to use |
151 | * @param loglevel what types of messages should be logged | 151 | * @param loglevel what types of messages should be logged |
152 | * @param logfile which file to write log messages to (can be NULL) | ||
153 | * @return GNUNET_OK on success | ||
152 | */ | 154 | */ |
153 | int | 155 | int |
154 | GNUNET_log_setup (const char *comp, const char *loglevel, const char *logfile) | 156 | GNUNET_log_setup (const char *comp, const char *loglevel, const char *logfile) |
diff --git a/src/util/crypto_hash.c b/src/util/crypto_hash.c index 4f8482c4c..ec2a79602 100644 --- a/src/util/crypto_hash.c +++ b/src/util/crypto_hash.c | |||
@@ -563,7 +563,7 @@ getValue__ (unsigned char a) | |||
563 | * | 563 | * |
564 | * @param block the GNUNET_CRYPTO_hash code | 564 | * @param block the GNUNET_CRYPTO_hash code |
565 | * @param result where to store the encoding (struct GNUNET_CRYPTO_HashAsciiEncoded can be | 565 | * @param result where to store the encoding (struct GNUNET_CRYPTO_HashAsciiEncoded can be |
566 | * safely cast to char*, a '\0' termination is set). | 566 | * safely cast to char*, a '\\0' termination is set). |
567 | */ | 567 | */ |
568 | void | 568 | void |
569 | GNUNET_CRYPTO_hash_to_enc (const GNUNET_HashCode * block, | 569 | GNUNET_CRYPTO_hash_to_enc (const GNUNET_HashCode * block, |
diff --git a/src/util/crypto_rsa.c b/src/util/crypto_rsa.c index 3ac910eb0..99e4bc1c1 100644 --- a/src/util/crypto_rsa.c +++ b/src/util/crypto_rsa.c | |||
@@ -806,7 +806,7 @@ GNUNET_CRYPTO_rsa_decrypt (const struct GNUNET_CRYPTO_RsaPrivateKey *hostkey, | |||
806 | * | 806 | * |
807 | * @param hostkey private key to use for the signing | 807 | * @param hostkey private key to use for the signing |
808 | * @param purpose what to sign (size, purpose) | 808 | * @param purpose what to sign (size, purpose) |
809 | * @param result where to write the signature | 809 | * @param sig where to write the signature |
810 | * @return GNUNET_SYSERR on error, GNUNET_OK on success | 810 | * @return GNUNET_SYSERR on error, GNUNET_OK on success |
811 | */ | 811 | */ |
812 | int | 812 | int |
diff --git a/src/util/program.c b/src/util/program.c index 0cff324f8..aa272ea96 100644 --- a/src/util/program.c +++ b/src/util/program.c | |||
@@ -84,6 +84,9 @@ program_main (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
84 | /** | 84 | /** |
85 | * Compare function for 'qsort' to sort command-line arguments by the | 85 | * Compare function for 'qsort' to sort command-line arguments by the |
86 | * short option. | 86 | * short option. |
87 | * | ||
88 | * @param a1 first command line option | ||
89 | * @param a2 second command line option | ||
87 | */ | 90 | */ |
88 | static int | 91 | static int |
89 | cmd_sorter (const void *a1, const void *a2) | 92 | cmd_sorter (const void *a1, const void *a2) |
@@ -109,6 +112,7 @@ cmd_sorter (const void *a1, const void *a2) | |||
109 | * @param argc number of command line arguments | 112 | * @param argc number of command line arguments |
110 | * @param argv command line arguments | 113 | * @param argv command line arguments |
111 | * @param binaryName our expected name | 114 | * @param binaryName our expected name |
115 | * @param binaryHelp help text for the program | ||
112 | * @param options command line options | 116 | * @param options command line options |
113 | * @param task main function to run | 117 | * @param task main function to run |
114 | * @param task_cls closure for task | 118 | * @param task_cls closure for task |
diff --git a/src/util/pseudonym.c b/src/util/pseudonym.c index c19662540..5d9750f5b 100644 --- a/src/util/pseudonym.c +++ b/src/util/pseudonym.c | |||
@@ -30,20 +30,49 @@ | |||
30 | #include "gnunet_disk_lib.h" | 30 | #include "gnunet_disk_lib.h" |
31 | #include "gnunet_pseudonym_lib.h" | 31 | #include "gnunet_pseudonym_lib.h" |
32 | 32 | ||
33 | /** | ||
34 | * FIXME | ||
35 | */ | ||
33 | #define PS_METADATA_DIR DIR_SEPARATOR_STR "data" DIR_SEPARATOR_STR "pseudonyms/metadata" DIR_SEPARATOR_STR | 36 | #define PS_METADATA_DIR DIR_SEPARATOR_STR "data" DIR_SEPARATOR_STR "pseudonyms/metadata" DIR_SEPARATOR_STR |
37 | |||
38 | /** | ||
39 | * FIXME | ||
40 | */ | ||
34 | #define PS_NAMES_DIR DIR_SEPARATOR_STR "data" DIR_SEPARATOR_STR "pseudonyms/names" DIR_SEPARATOR_STR | 41 | #define PS_NAMES_DIR DIR_SEPARATOR_STR "data" DIR_SEPARATOR_STR "pseudonyms/names" DIR_SEPARATOR_STR |
35 | 42 | ||
43 | |||
44 | /** | ||
45 | * FIXME | ||
46 | */ | ||
36 | struct DiscoveryCallback | 47 | struct DiscoveryCallback |
37 | { | 48 | { |
49 | |||
50 | /** | ||
51 | * FIXME | ||
52 | */ | ||
38 | struct DiscoveryCallback *next; | 53 | struct DiscoveryCallback *next; |
54 | |||
55 | /** | ||
56 | * FIXME | ||
57 | */ | ||
39 | GNUNET_PSEUDONYM_Iterator callback; | 58 | GNUNET_PSEUDONYM_Iterator callback; |
59 | |||
60 | /** | ||
61 | * FIXME | ||
62 | */ | ||
40 | void *closure; | 63 | void *closure; |
41 | }; | 64 | }; |
42 | 65 | ||
66 | |||
67 | /** | ||
68 | * FIXME | ||
69 | */ | ||
43 | static struct DiscoveryCallback *head; | 70 | static struct DiscoveryCallback *head; |
44 | 71 | ||
45 | /** | 72 | /** |
46 | * Internal notification about new tracked URI. | 73 | * Internal notification about new tracked URI. |
74 | * | ||
75 | * FIXME | ||
47 | */ | 76 | */ |
48 | static void | 77 | static void |
49 | internal_notify (const GNUNET_HashCode * id, | 78 | internal_notify (const GNUNET_HashCode * id, |
@@ -62,6 +91,8 @@ internal_notify (const GNUNET_HashCode * id, | |||
62 | /** | 91 | /** |
63 | * Register callback to be invoked whenever we discover | 92 | * Register callback to be invoked whenever we discover |
64 | * a new pseudonym. | 93 | * a new pseudonym. |
94 | * | ||
95 | * FIXME | ||
65 | */ | 96 | */ |
66 | int | 97 | int |
67 | GNUNET_PSEUDONYM_discovery_callback_register (const struct | 98 | GNUNET_PSEUDONYM_discovery_callback_register (const struct |
@@ -83,6 +114,8 @@ GNUNET_PSEUDONYM_discovery_callback_register (const struct | |||
83 | 114 | ||
84 | /** | 115 | /** |
85 | * Unregister pseudonym discovery callback. | 116 | * Unregister pseudonym discovery callback. |
117 | * | ||
118 | * FIXME | ||
86 | */ | 119 | */ |
87 | int | 120 | int |
88 | GNUNET_PSEUDONYM_discovery_callback_unregister (GNUNET_PSEUDONYM_Iterator | 121 | GNUNET_PSEUDONYM_discovery_callback_unregister (GNUNET_PSEUDONYM_Iterator |
@@ -113,6 +146,8 @@ GNUNET_PSEUDONYM_discovery_callback_unregister (GNUNET_PSEUDONYM_Iterator | |||
113 | /** | 146 | /** |
114 | * Get the filename (or directory name) for the given | 147 | * Get the filename (or directory name) for the given |
115 | * pseudonym identifier and directory prefix. | 148 | * pseudonym identifier and directory prefix. |
149 | * | ||
150 | * FIXME | ||
116 | */ | 151 | */ |
117 | static char * | 152 | static char * |
118 | get_data_filename (const struct GNUNET_CONFIGURATION_Handle | 153 | get_data_filename (const struct GNUNET_CONFIGURATION_Handle |
@@ -130,6 +165,10 @@ get_data_filename (const struct GNUNET_CONFIGURATION_Handle | |||
130 | NULL); | 165 | NULL); |
131 | } | 166 | } |
132 | 167 | ||
168 | |||
169 | /** | ||
170 | * FIXME | ||
171 | */ | ||
133 | static void | 172 | static void |
134 | write_pseudonym_info (const struct GNUNET_CONFIGURATION_Handle *cfg, | 173 | write_pseudonym_info (const struct GNUNET_CONFIGURATION_Handle *cfg, |
135 | const GNUNET_HashCode * nsid, | 174 | const GNUNET_HashCode * nsid, |
@@ -178,6 +217,10 @@ write_pseudonym_info (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
178 | GNUNET_free_non_null (GNUNET_PSEUDONYM_id_to_name (cfg, nsid)); | 217 | GNUNET_free_non_null (GNUNET_PSEUDONYM_id_to_name (cfg, nsid)); |
179 | } | 218 | } |
180 | 219 | ||
220 | |||
221 | /** | ||
222 | * FIXME | ||
223 | */ | ||
181 | static int | 224 | static int |
182 | read_info (const struct GNUNET_CONFIGURATION_Handle *cfg, | 225 | read_info (const struct GNUNET_CONFIGURATION_Handle *cfg, |
183 | const GNUNET_HashCode * nsid, | 226 | const GNUNET_HashCode * nsid, |
@@ -270,6 +313,8 @@ read_info (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
270 | /** | 313 | /** |
271 | * Return the unique, human readable name for the given namespace. | 314 | * Return the unique, human readable name for the given namespace. |
272 | * | 315 | * |
316 | * @param cfg configuration | ||
317 | * @param nsid cryptographic ID of the namespace | ||
273 | * @return NULL on failure (should never happen) | 318 | * @return NULL on failure (should never happen) |
274 | */ | 319 | */ |
275 | char * | 320 | char * |
@@ -353,6 +398,9 @@ GNUNET_PSEUDONYM_id_to_name (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
353 | /** | 398 | /** |
354 | * Get the namespace ID belonging to the given namespace name. | 399 | * Get the namespace ID belonging to the given namespace name. |
355 | * | 400 | * |
401 | * @param cfg configuration to use | ||
402 | * @param ns_uname human-readable name for the namespace | ||
403 | * @param nsid set to namespace ID based on 'ns_uname' | ||
356 | * @return GNUNET_OK on success | 404 | * @return GNUNET_OK on success |
357 | */ | 405 | */ |
358 | int | 406 | int |
@@ -403,14 +451,33 @@ GNUNET_PSEUDONYM_name_to_id (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
403 | 451 | ||
404 | 452 | ||
405 | 453 | ||
406 | 454 | /** | |
455 | * FIXME | ||
456 | */ | ||
407 | struct ListPseudonymClosure | 457 | struct ListPseudonymClosure |
408 | { | 458 | { |
459 | |||
460 | /** | ||
461 | * FIXME | ||
462 | */ | ||
409 | GNUNET_PSEUDONYM_Iterator iterator; | 463 | GNUNET_PSEUDONYM_Iterator iterator; |
464 | |||
465 | /** | ||
466 | * FIXME | ||
467 | */ | ||
410 | void *closure; | 468 | void *closure; |
469 | |||
470 | /** | ||
471 | * FIXME | ||
472 | */ | ||
411 | const struct GNUNET_CONFIGURATION_Handle *cfg; | 473 | const struct GNUNET_CONFIGURATION_Handle *cfg; |
412 | }; | 474 | }; |
413 | 475 | ||
476 | |||
477 | |||
478 | /** | ||
479 | * FIXME | ||
480 | */ | ||
414 | static int | 481 | static int |
415 | list_pseudonym_helper (void *cls, const char *fullname) | 482 | list_pseudonym_helper (void *cls, const char *fullname) |
416 | { | 483 | { |
@@ -439,8 +506,14 @@ list_pseudonym_helper (void *cls, const char *fullname) | |||
439 | return ret; | 506 | return ret; |
440 | } | 507 | } |
441 | 508 | ||
509 | |||
442 | /** | 510 | /** |
443 | * List all available pseudonyms. | 511 | * List all available pseudonyms. |
512 | * | ||
513 | * @param cfg overall configuration | ||
514 | * @param iterator function to call for each pseudonym | ||
515 | * @param closure closure for iterator | ||
516 | * @return number of pseudonyms found | ||
444 | */ | 517 | */ |
445 | int | 518 | int |
446 | GNUNET_PSEUDONYM_list_all (const struct GNUNET_CONFIGURATION_Handle *cfg, | 519 | GNUNET_PSEUDONYM_list_all (const struct GNUNET_CONFIGURATION_Handle *cfg, |
@@ -464,6 +537,7 @@ GNUNET_PSEUDONYM_list_all (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
464 | /** | 537 | /** |
465 | * Change the ranking of a pseudonym. | 538 | * Change the ranking of a pseudonym. |
466 | * | 539 | * |
540 | * @param cfg overall configuration | ||
467 | * @param nsid id of the pseudonym | 541 | * @param nsid id of the pseudonym |
468 | * @param delta by how much should the rating be | 542 | * @param delta by how much should the rating be |
469 | * changed? | 543 | * changed? |
@@ -494,6 +568,10 @@ GNUNET_PSEUDONYM_rank (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
494 | 568 | ||
495 | /** | 569 | /** |
496 | * Insert metadata into existing MD record (passed as cls). | 570 | * Insert metadata into existing MD record (passed as cls). |
571 | * | ||
572 | * @param cls metadata to add to | ||
573 | * @param type type of entry to insert | ||
574 | * @param data value of entry to insert | ||
497 | */ | 575 | */ |
498 | static int | 576 | static int |
499 | merge_meta_helper (void *cls, | 577 | merge_meta_helper (void *cls, |
@@ -512,7 +590,9 @@ merge_meta_helper (void *cls, | |||
512 | * For all pseudonym advertisements that we discover | 590 | * For all pseudonym advertisements that we discover |
513 | * FSUI should automatically call this function. | 591 | * FSUI should automatically call this function. |
514 | * | 592 | * |
593 | * @param cfg overall configuration | ||
515 | * @param id the pseudonym identifier | 594 | * @param id the pseudonym identifier |
595 | * @param metadata for the pseudonym | ||
516 | */ | 596 | */ |
517 | void | 597 | void |
518 | GNUNET_PSEUDONYM_add (const struct GNUNET_CONFIGURATION_Handle *cfg, | 598 | GNUNET_PSEUDONYM_add (const struct GNUNET_CONFIGURATION_Handle *cfg, |
diff --git a/src/util/scheduler.c b/src/util/scheduler.c index 12b7c4cf2..d56c44276 100644 --- a/src/util/scheduler.c +++ b/src/util/scheduler.c | |||
@@ -154,6 +154,9 @@ struct GNUNET_SCHEDULER_Handle | |||
154 | 154 | ||
155 | /** | 155 | /** |
156 | * Check that the given priority is legal (and return it). | 156 | * Check that the given priority is legal (and return it). |
157 | * | ||
158 | * @param p priority value to check | ||
159 | * @return p on success, 0 on error | ||
157 | */ | 160 | */ |
158 | static enum GNUNET_SCHEDULER_Priority | 161 | static enum GNUNET_SCHEDULER_Priority |
159 | check_priority (enum GNUNET_SCHEDULER_Priority p) | 162 | check_priority (enum GNUNET_SCHEDULER_Priority p) |
@@ -171,6 +174,8 @@ check_priority (enum GNUNET_SCHEDULER_Priority p) | |||
171 | * future), but only if the return value is "GNUNET_NO" (and | 174 | * future), but only if the return value is "GNUNET_NO" (and |
172 | * the "lowest_pending_id" check failed). | 175 | * the "lowest_pending_id" check failed). |
173 | * | 176 | * |
177 | * @param sched the scheduler | ||
178 | * @param id which task are we checking for | ||
174 | * @return GNUNET_YES if so, GNUNET_NO if not | 179 | * @return GNUNET_YES if so, GNUNET_NO if not |
175 | */ | 180 | */ |
176 | static int | 181 | static int |
@@ -212,10 +217,17 @@ is_pending (struct GNUNET_SCHEDULER_Handle *sched, | |||
212 | 217 | ||
213 | /** | 218 | /** |
214 | * Update all sets and timeout for select. | 219 | * Update all sets and timeout for select. |
220 | * | ||
221 | * @param sched the scheduler | ||
222 | * @param rs read-set, set to all FDs we would like to read (updated) | ||
223 | * @param ws write-set, set to all FDs we would like to write (updated) | ||
224 | * @param timeout next timeout (updated) | ||
215 | */ | 225 | */ |
216 | static void | 226 | static void |
217 | update_sets (struct GNUNET_SCHEDULER_Handle *sched, | 227 | update_sets (struct GNUNET_SCHEDULER_Handle *sched, |
218 | struct GNUNET_NETWORK_FDSet * rs, struct GNUNET_NETWORK_FDSet * ws, struct GNUNET_TIME_Relative *timeout) | 228 | struct GNUNET_NETWORK_FDSet * rs, |
229 | struct GNUNET_NETWORK_FDSet * ws, | ||
230 | struct GNUNET_TIME_Relative *timeout) | ||
219 | { | 231 | { |
220 | struct Task *pos; | 232 | struct Task *pos; |
221 | 233 | ||
@@ -251,11 +263,13 @@ update_sets (struct GNUNET_SCHEDULER_Handle *sched, | |||
251 | * If so, update the want set (set all FDs that are ready). If not, | 263 | * If so, update the want set (set all FDs that are ready). If not, |
252 | * return GNUNET_NO. | 264 | * return GNUNET_NO. |
253 | * | 265 | * |
254 | * @param maxfd highest FD that needs to be checked. | 266 | * @param ready set that is ready |
267 | * @param want set that we want to be ready | ||
255 | * @return GNUNET_YES if there was some overlap | 268 | * @return GNUNET_YES if there was some overlap |
256 | */ | 269 | */ |
257 | static int | 270 | static int |
258 | set_overlaps (const struct GNUNET_NETWORK_FDSet * ready, struct GNUNET_NETWORK_FDSet * want) | 271 | set_overlaps (const struct GNUNET_NETWORK_FDSet * ready, |
272 | struct GNUNET_NETWORK_FDSet * want) | ||
259 | { | 273 | { |
260 | if (GNUNET_NETWORK_fdset_overlap (ready, want)) | 274 | if (GNUNET_NETWORK_fdset_overlap (ready, want)) |
261 | { | 275 | { |
@@ -272,13 +286,19 @@ set_overlaps (const struct GNUNET_NETWORK_FDSet * ready, struct GNUNET_NETWORK_F | |||
272 | * Check if the given task is eligible to run now. | 286 | * Check if the given task is eligible to run now. |
273 | * Also set the reason why it is eligible. | 287 | * Also set the reason why it is eligible. |
274 | * | 288 | * |
289 | * @param sched the scheduler | ||
290 | * @param task task to check if it is ready | ||
291 | * @param now the current time | ||
292 | * @param rs set of FDs ready for reading | ||
293 | * @param ws set of FDs ready for writing | ||
275 | * @return GNUNET_YES if we can run it, GNUNET_NO if not. | 294 | * @return GNUNET_YES if we can run it, GNUNET_NO if not. |
276 | */ | 295 | */ |
277 | static int | 296 | static int |
278 | is_ready (struct GNUNET_SCHEDULER_Handle *sched, | 297 | is_ready (struct GNUNET_SCHEDULER_Handle *sched, |
279 | struct Task *task, | 298 | struct Task *task, |
280 | struct GNUNET_TIME_Absolute now, | 299 | struct GNUNET_TIME_Absolute now, |
281 | const struct GNUNET_NETWORK_FDSet * rs, const struct GNUNET_NETWORK_FDSet * ws) | 300 | const struct GNUNET_NETWORK_FDSet *rs, |
301 | const struct GNUNET_NETWORK_FDSet * ws) | ||
282 | { | 302 | { |
283 | if ((GNUNET_NO == task->run_on_shutdown) && (GNUNET_YES == sched->shutdown)) | 303 | if ((GNUNET_NO == task->run_on_shutdown) && (GNUNET_YES == sched->shutdown)) |
284 | return GNUNET_NO; | 304 | return GNUNET_NO; |
@@ -307,9 +327,13 @@ is_ready (struct GNUNET_SCHEDULER_Handle *sched, | |||
307 | 327 | ||
308 | /** | 328 | /** |
309 | * Put a task that is ready for execution into the ready queue. | 329 | * Put a task that is ready for execution into the ready queue. |
330 | * | ||
331 | * @param handle the scheduler | ||
332 | * @param task task ready for execution | ||
310 | */ | 333 | */ |
311 | static void | 334 | static void |
312 | queue_ready_task (struct GNUNET_SCHEDULER_Handle *handle, struct Task *task) | 335 | queue_ready_task (struct GNUNET_SCHEDULER_Handle *handle, |
336 | struct Task *task) | ||
313 | { | 337 | { |
314 | task->next = handle->ready[check_priority (task->priority)]; | 338 | task->next = handle->ready[check_priority (task->priority)]; |
315 | handle->ready[check_priority (task->priority)] = task; | 339 | handle->ready[check_priority (task->priority)] = task; |
@@ -320,10 +344,15 @@ queue_ready_task (struct GNUNET_SCHEDULER_Handle *handle, struct Task *task) | |||
320 | /** | 344 | /** |
321 | * Check which tasks are ready and move them | 345 | * Check which tasks are ready and move them |
322 | * to the respective ready queue. | 346 | * to the respective ready queue. |
347 | * | ||
348 | * @param handle the scheduler | ||
349 | * @param rs FDs ready for reading | ||
350 | * @param ws FDs ready for writing | ||
323 | */ | 351 | */ |
324 | static void | 352 | static void |
325 | check_ready (struct GNUNET_SCHEDULER_Handle *handle, | 353 | check_ready (struct GNUNET_SCHEDULER_Handle *handle, |
326 | const struct GNUNET_NETWORK_FDSet * rs, const struct GNUNET_NETWORK_FDSet * ws) | 354 | const struct GNUNET_NETWORK_FDSet * rs, |
355 | const struct GNUNET_NETWORK_FDSet * ws) | ||
327 | { | 356 | { |
328 | struct Task *pos; | 357 | struct Task *pos; |
329 | struct Task *prev; | 358 | struct Task *prev; |
@@ -353,7 +382,9 @@ check_ready (struct GNUNET_SCHEDULER_Handle *handle, | |||
353 | 382 | ||
354 | 383 | ||
355 | /** | 384 | /** |
356 | * Destroy a task | 385 | * Destroy a task (release associated resources) |
386 | * | ||
387 | * @param t task to destroy | ||
357 | */ | 388 | */ |
358 | static void destroy_task (struct Task *t) | 389 | static void destroy_task (struct Task *t) |
359 | { | 390 | { |
@@ -371,6 +402,8 @@ static void destroy_task (struct Task *t) | |||
371 | * "URGENT" tasks or until we have at least one "pending" task (which | 402 | * "URGENT" tasks or until we have at least one "pending" task (which |
372 | * may become ready, hence we should select on it). Naturally, if | 403 | * may become ready, hence we should select on it). Naturally, if |
373 | * there are no more ready tasks, we also return. | 404 | * there are no more ready tasks, we also return. |
405 | * | ||
406 | * @param sched the scheduler | ||
374 | */ | 407 | */ |
375 | static void | 408 | static void |
376 | run_ready (struct GNUNET_SCHEDULER_Handle *sched) | 409 | run_ready (struct GNUNET_SCHEDULER_Handle *sched) |
@@ -513,6 +546,8 @@ GNUNET_SCHEDULER_run (GNUNET_SCHEDULER_Task task, void *cls) | |||
513 | * stop a scheduling thread when created with the | 546 | * stop a scheduling thread when created with the |
514 | * "GNUNET_SCHEDULER_init_thread" function or from within the signal | 547 | * "GNUNET_SCHEDULER_init_thread" function or from within the signal |
515 | * handler for signals causing shutdowns. | 548 | * handler for signals causing shutdowns. |
549 | * | ||
550 | * @param sched the scheduler | ||
516 | */ | 551 | */ |
517 | void | 552 | void |
518 | GNUNET_SCHEDULER_shutdown (struct GNUNET_SCHEDULER_Handle *sched) | 553 | GNUNET_SCHEDULER_shutdown (struct GNUNET_SCHEDULER_Handle *sched) |
@@ -528,6 +563,7 @@ GNUNET_SCHEDULER_shutdown (struct GNUNET_SCHEDULER_Handle *sched) | |||
528 | * tasks ready to run). | 563 | * tasks ready to run). |
529 | * | 564 | * |
530 | * @param sched scheduler to query | 565 | * @param sched scheduler to query |
566 | * @param p priority level to look at | ||
531 | * @return number of tasks pending right now | 567 | * @return number of tasks pending right now |
532 | */ | 568 | */ |
533 | unsigned int | 569 | unsigned int |
@@ -558,6 +594,7 @@ GNUNET_SCHEDULER_get_load (struct GNUNET_SCHEDULER_Handle *sched, | |||
558 | * | 594 | * |
559 | * @param sched scheduler to use | 595 | * @param sched scheduler to use |
560 | * @param task id of the task to cancel | 596 | * @param task id of the task to cancel |
597 | * @return original closure of the task | ||
561 | */ | 598 | */ |
562 | void * | 599 | void * |
563 | GNUNET_SCHEDULER_cancel (struct GNUNET_SCHEDULER_Handle *sched, | 600 | GNUNET_SCHEDULER_cancel (struct GNUNET_SCHEDULER_Handle *sched, |
@@ -616,8 +653,9 @@ GNUNET_SCHEDULER_cancel (struct GNUNET_SCHEDULER_Handle *sched, | |||
616 | * and the reason code can be specified. | 653 | * and the reason code can be specified. |
617 | * | 654 | * |
618 | * @param sched scheduler to use | 655 | * @param sched scheduler to use |
656 | * @param run_on_shutdown should this task be run if we are shutting down? | ||
619 | * @param main main function of the task | 657 | * @param main main function of the task |
620 | * @param cls closure of task | 658 | * @param cls closure for 'main' |
621 | * @param reason reason for task invocation | 659 | * @param reason reason for task invocation |
622 | */ | 660 | */ |
623 | void | 661 | void |
@@ -653,7 +691,7 @@ GNUNET_SCHEDULER_add_continuation (struct GNUNET_SCHEDULER_Handle *sched, | |||
653 | * are satisfied). Use GNUNET_SCHEDULER_NO_TASK to not have any dependency | 691 | * are satisfied). Use GNUNET_SCHEDULER_NO_TASK to not have any dependency |
654 | * on completion of other tasks. | 692 | * on completion of other tasks. |
655 | * @param main main function of the task | 693 | * @param main main function of the task |
656 | * @param cls closure of task | 694 | * @param cls closure for 'main' |
657 | * @return unique task identifier for the job | 695 | * @return unique task identifier for the job |
658 | * only valid until "main" is started! | 696 | * only valid until "main" is started! |
659 | */ | 697 | */ |
diff --git a/src/util/server.c b/src/util/server.c index 339dfae7c..086c94996 100644 --- a/src/util/server.c +++ b/src/util/server.c | |||
@@ -880,7 +880,7 @@ sock_receive (void *cls, | |||
880 | * Wrapper to cancel receiving from a socket. | 880 | * Wrapper to cancel receiving from a socket. |
881 | * | 881 | * |
882 | * @param cls handle to the GNUNET_CONNECTION_Handle to cancel | 882 | * @param cls handle to the GNUNET_CONNECTION_Handle to cancel |
883 | * @param tc task ID that was returned by GNUNET_CONNECTION_receive | 883 | * @param ti task ID that was returned by GNUNET_CONNECTION_receive |
884 | */ | 884 | */ |
885 | static void | 885 | static void |
886 | sock_receive_cancel (void *cls, GNUNET_SCHEDULER_TaskIdentifier ti) | 886 | sock_receive_cancel (void *cls, GNUNET_SCHEDULER_TaskIdentifier ti) |
@@ -1123,7 +1123,6 @@ GNUNET_SERVER_client_disconnect (struct GNUNET_SERVER_Client *client) | |||
1123 | * Notify us when the server has enough space to transmit | 1123 | * Notify us when the server has enough space to transmit |
1124 | * a message of the given size to the given client. | 1124 | * a message of the given size to the given client. |
1125 | * | 1125 | * |
1126 | * @param server the server to use | ||
1127 | * @param client client to transmit message to | 1126 | * @param client client to transmit message to |
1128 | * @param size requested amount of buffer space | 1127 | * @param size requested amount of buffer space |
1129 | * @param timeout after how long should we give up (and call | 1128 | * @param timeout after how long should we give up (and call |
diff --git a/src/util/service.c b/src/util/service.c index efcfa50c9..3e17336e8 100644 --- a/src/util/service.c +++ b/src/util/service.c | |||
@@ -229,7 +229,7 @@ parse_ipv4_specification (const char *routeList) | |||
229 | * notation. The netmask must be given in CIDR notation (/16) or | 229 | * notation. The netmask must be given in CIDR notation (/16) or |
230 | * can be omitted to specify a single host. | 230 | * can be omitted to specify a single host. |
231 | * <p> | 231 | * <p> |
232 | * @param routeList a string specifying the forbidden networks | 232 | * @param routeListX a string specifying the forbidden networks |
233 | * @return the converted list, NULL if the synatx is flawed | 233 | * @return the converted list, NULL if the synatx is flawed |
234 | */ | 234 | */ |
235 | static struct IPv6NetworkSet * | 235 | static struct IPv6NetworkSet * |
@@ -350,7 +350,7 @@ parse_ipv6_specification (const char *routeListX) | |||
350 | * Check if the given IP address is in the list of IP addresses. | 350 | * Check if the given IP address is in the list of IP addresses. |
351 | * | 351 | * |
352 | * @param list a list of networks | 352 | * @param list a list of networks |
353 | * @param ip the IP to check (in network byte order) | 353 | * @param add the IP to check (in network byte order) |
354 | * @return GNUNET_NO if the IP is not in the list, GNUNET_YES if it it is | 354 | * @return GNUNET_NO if the IP is not in the list, GNUNET_YES if it it is |
355 | */ | 355 | */ |
356 | static int | 356 | static int |
@@ -1422,7 +1422,7 @@ GNUNET_SERVICE_get_server (struct GNUNET_SERVICE_Context *ctx) | |||
1422 | /** | 1422 | /** |
1423 | * Stop a service that was started with "GNUNET_SERVICE_start". | 1423 | * Stop a service that was started with "GNUNET_SERVICE_start". |
1424 | * | 1424 | * |
1425 | * @param ctx the service context returned from the start function | 1425 | * @param sctx the service context returned from the start function |
1426 | */ | 1426 | */ |
1427 | void | 1427 | void |
1428 | GNUNET_SERVICE_stop (struct GNUNET_SERVICE_Context *sctx) | 1428 | GNUNET_SERVICE_stop (struct GNUNET_SERVICE_Context *sctx) |
diff --git a/src/util/strings.c b/src/util/strings.c index 18f6582e8..be0e6c1f0 100644 --- a/src/util/strings.c +++ b/src/util/strings.c | |||
@@ -337,7 +337,9 @@ GNUNET_STRINGS_filename_expand (const char *fil) | |||
337 | 337 | ||
338 | /** | 338 | /** |
339 | * Give relative time in human-readable fancy format. | 339 | * Give relative time in human-readable fancy format. |
340 | * @param delta time in milli seconds | 340 | * |
341 | * @param del time in milli seconds | ||
342 | * @return time as human-readable string | ||
341 | */ | 343 | */ |
342 | char * | 344 | char * |
343 | GNUNET_STRINGS_relative_time_to_string (struct GNUNET_TIME_Relative del) | 345 | GNUNET_STRINGS_relative_time_to_string (struct GNUNET_TIME_Relative del) |
@@ -374,6 +376,9 @@ GNUNET_STRINGS_relative_time_to_string (struct GNUNET_TIME_Relative del) | |||
374 | /** | 376 | /** |
375 | * "man ctime_r", except for GNUnet time; also, unlike ctime, the | 377 | * "man ctime_r", except for GNUnet time; also, unlike ctime, the |
376 | * return value does not include the newline character. | 378 | * return value does not include the newline character. |
379 | * | ||
380 | * @param t time to convert | ||
381 | * @return absolute time in human-readable format | ||
377 | */ | 382 | */ |
378 | char * | 383 | char * |
379 | GNUNET_STRINGS_absolute_time_to_string (struct GNUNET_TIME_Absolute t) | 384 | GNUNET_STRINGS_absolute_time_to_string (struct GNUNET_TIME_Absolute t) |