From 0c7015a6d8d2b3bf021c216b24d7062cd7375a71 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Wed, 14 Aug 2013 23:43:53 +0000 Subject: [PATCH] -playing with doxygen groups --- src/include/gnunet_common.h | 65 ++++++++++++++++++- src/include/gnunet_configuration_lib.h | 51 ++++++++------- src/include/gnunet_crypto_lib.h | 64 ++++++++++++++++-- src/include/gnunet_dht_service.h | 4 ++ src/include/gnunet_protocols.h | 4 ++ src/include/gnunet_scheduler_lib.h | 90 ++++++++++++++------------ src/include/gnunet_time_lib.h | 6 +- 7 files changed, 207 insertions(+), 77 deletions(-) diff --git a/src/include/gnunet_common.h b/src/include/gnunet_common.h index ab0876ef9..4552e860e 100644 --- a/src/include/gnunet_common.h +++ b/src/include/gnunet_common.h @@ -1,10 +1,10 @@ /* This file is part of GNUnet. - (C) 2006, 2009 Christian Grothoff (and other contributing authors) + (C) 2006-2013 Christian Grothoff (and other contributing authors) GNUnet is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 2, or (at your + by the Free Software Foundation; either version 3, or (at your option) any later version. GNUnet is distributed in the hope that it will be useful, but @@ -26,6 +26,9 @@ * * @author Christian Grothoff * @author Nils Durner + * + * @defgroup logging Logging + * @defgroup memory Memory management */ #ifndef GNUNET_COMMON_H #define GNUNET_COMMON_H @@ -104,6 +107,7 @@ extern "C" #endif /** + * @ingroup logging * define GNUNET_EXTRA_LOGGING if using this header outside the GNUnet source * tree where gnunet_config.h is unavailable */ @@ -288,6 +292,7 @@ typedef int (*GNUNET_FileNameCallback) (void *cls, const char *filename); /* ****************************** logging ***************************** */ /** + * @ingroup logging * Types of errors. */ enum GNUNET_ErrorType @@ -304,6 +309,7 @@ enum GNUNET_ErrorType /** + * @ingroup logging * User-defined handler for log messages. * * @param cls closure @@ -318,6 +324,7 @@ typedef void (*GNUNET_Logger) (void *cls, enum GNUNET_ErrorType kind, /** + * @ingroup logging * Get the number of log calls that are going to be skipped * * @return number of log calls to be ignored @@ -333,6 +340,7 @@ GNUNET_get_log_call_status (int caller_level, const char *comp, /** + * @ingroup logging * Main log function. * * @param kind how serious is the error? @@ -364,7 +372,9 @@ GNUNET_log_nocheck (enum GNUNET_ErrorType kind, const char *message, ...); #define GNUNET_LOG_CALL_STATUS -1 #endif + /** + * @ingroup logging * Log function that specifies an alternative component. * This function should be used by plugins. * @@ -410,6 +420,7 @@ GNUNET_log_from_nocheck (enum GNUNET_ErrorType kind, const char *comp, /** + * @ingroup logging * Log error message about missing configuration option. * * @param kind log level @@ -423,6 +434,7 @@ GNUNET_log_config_missing (enum GNUNET_ErrorType kind, /** + * @ingroup logging * Log error message about invalid configuration option value. * * @param kind log level @@ -438,13 +450,16 @@ GNUNET_log_config_invalid (enum GNUNET_ErrorType kind, /** + * @ingroup logging * Abort the process, generate a core dump if possible. */ void GNUNET_abort (void) GNUNET_NORETURN; + /** - * Ignore the next n calls to the log function. + * @ingroup logging + * Ignore the next @a n calls to the log function. * * @param n number of log calls to ignore (could be negative) * @param check_reset GNUNET_YES to assert that the log skip counter is currently zero @@ -454,6 +469,7 @@ GNUNET_log_skip (int n, int check_reset); /** + * @ingroup logging * Setup logging. * * @param comp default component to use @@ -466,6 +482,7 @@ GNUNET_log_setup (const char *comp, const char *loglevel, const char *logfile); /** + * @ingroup logging * Add a custom logger. * * @param logger log function @@ -476,6 +493,7 @@ GNUNET_logger_add (GNUNET_Logger logger, void *logger_cls); /** + * @ingroup logging * Remove a custom logger. * * @param logger log function @@ -486,6 +504,7 @@ GNUNET_logger_remove (GNUNET_Logger logger, void *logger_cls); /** + * @ingroup logging * Convert a short hash value to a string (for printing debug messages). * This is one of the very few calls in the entire API that is * NOT reentrant! @@ -498,6 +517,7 @@ GNUNET_short_h2s (const struct GNUNET_CRYPTO_ShortHashCode * hc); /** + * @ingroup logging * Convert a short hash value to a string (for printing debug messages). * This prints all 104 characters of a hashcode! * This is one of the very few calls in the entire API that is @@ -511,6 +531,7 @@ GNUNET_short_h2s_full (const struct GNUNET_CRYPTO_ShortHashCode * hc); /** + * @ingroup logging * Convert a hash value to a string (for printing debug messages). * This is one of the very few calls in the entire API that is * NOT reentrant! @@ -523,6 +544,7 @@ GNUNET_h2s (const struct GNUNET_HashCode * hc); /** + * @ingroup logging * Convert a hash value to a string (for printing debug messages). * This prints all 104 characters of a hashcode! * This is one of the very few calls in the entire API that is @@ -536,6 +558,7 @@ GNUNET_h2s_full (const struct GNUNET_HashCode * hc); /** + * @ingroup logging * Convert a peer identity to a string (for printing debug messages). * This is one of the very few calls in the entire API that is * NOT reentrant! @@ -547,7 +570,9 @@ GNUNET_h2s_full (const struct GNUNET_HashCode * hc); const char * GNUNET_i2s (const struct GNUNET_PeerIdentity *pid); + /** + * @ingroup logging * Convert a peer identity to a string (for printing debug messages). * This is one of the very few calls in the entire API that is * NOT reentrant! @@ -559,7 +584,9 @@ GNUNET_i2s (const struct GNUNET_PeerIdentity *pid); const char * GNUNET_i2s_full (const struct GNUNET_PeerIdentity *pid); + /** + * @ingroup logging * Convert a "struct sockaddr*" (IPv4 or IPv6 address) to a string * (for printing debug messages). This is one of the very few calls * in the entire API that is NOT reentrant! @@ -572,7 +599,9 @@ GNUNET_i2s_full (const struct GNUNET_PeerIdentity *pid); const char * GNUNET_a2s (const struct sockaddr *addr, socklen_t addrlen); + /** + * @ingroup logging * Convert error type to string. * * @param kind type to convert @@ -583,22 +612,29 @@ GNUNET_error_type_to_string (enum GNUNET_ErrorType kind); /** + * @ingroup logging * Use this for fatal errors that cannot be handled */ #define GNUNET_assert(cond) do { if (! (cond)) { GNUNET_log(GNUNET_ERROR_TYPE_ERROR, _("Assertion failed at %s:%d.\n"), __FILE__, __LINE__); GNUNET_abort(); } } while(0) + /** + * @ingroup logging * Use this for fatal errors that cannot be handled */ #define GNUNET_assert_at(cond, f, l) do { if (! (cond)) { GNUNET_log(GNUNET_ERROR_TYPE_ERROR, _("Assertion failed at %s:%d.\n"), f, l); GNUNET_abort(); } } while(0) + /** + * @ingroup logging * Use this for internal assertion violations that are * not fatal (can be handled) but should not occur. */ #define GNUNET_break(cond) do { if (! (cond)) { GNUNET_log(GNUNET_ERROR_TYPE_ERROR, _("Assertion failed at %s:%d.\n"), __FILE__, __LINE__); } } while(0) + /** + * @ingroup logging * Use this for assertion violations caused by other * peers (i.e. protocol violations). We do not want to * confuse end-users (say, some other peer runs an @@ -608,28 +644,36 @@ GNUNET_error_type_to_string (enum GNUNET_ErrorType kind); */ #define GNUNET_break_op(cond) do { if (! (cond)) { GNUNET_log(GNUNET_ERROR_TYPE_WARNING | GNUNET_ERROR_TYPE_BULK, _("External protocol violation detected at %s:%d.\n"), __FILE__, __LINE__); } } while(0) + /** + * @ingroup logging * Log an error message at log-level 'level' that indicates * a failure of the command 'cmd' with the message given * by strerror(errno). */ #define GNUNET_log_strerror(level, cmd) do { GNUNET_log(level, _("`%s' failed at %s:%d with error: %s\n"), cmd, __FILE__, __LINE__, STRERROR(errno)); } while(0) + /** + * @ingroup logging * Log an error message at log-level 'level' that indicates * a failure of the command 'cmd' with the message given * by strerror(errno). */ #define GNUNET_log_from_strerror(level, component, cmd) do { GNUNET_log_from (level, component, _("`%s' failed at %s:%d with error: %s\n"), cmd, __FILE__, __LINE__, STRERROR(errno)); } while(0) + /** + * @ingroup logging * Log an error message at log-level 'level' that indicates * a failure of the command 'cmd' with the message given * by strerror(errno). */ #define GNUNET_log_strerror_file(level, cmd, filename) do { GNUNET_log(level, _("`%s' failed on file `%s' at %s:%d with error: %s\n"), cmd, filename,__FILE__, __LINE__, STRERROR(errno)); } while(0) + /** + * @ingroup logging * Log an error message at log-level 'level' that indicates * a failure of the command 'cmd' with the message given * by strerror(errno). @@ -673,11 +717,13 @@ GNUNET_ntoh_double (double d); /* ************************* allocation functions ****************** */ /** + * @ingroup memory * Maximum allocation with GNUNET_malloc macro. */ #define GNUNET_MAX_MALLOC_CHECKED (1024 * 1024 * 40) /** + * @ingroup memory * Allocate a struct or union of the given 'type'. * Wrapper around GNUNET_malloc that returns a pointer * to the newly created object of the correct type. @@ -687,6 +733,7 @@ GNUNET_ntoh_double (double d); #define GNUNET_new(type) (type *) GNUNET_malloc (sizeof (type)) /** + * @ingroup memory * Wrapper around malloc. Allocates size bytes of memory. * The memory will be zero'ed out. * @@ -697,6 +744,7 @@ GNUNET_ntoh_double (double d); #define GNUNET_malloc(size) GNUNET_xmalloc_(size, __FILE__, __LINE__) /** + * @ingroup memory * Allocate and initialize a block of memory. * * @param buf data to initalize the block with @@ -706,6 +754,7 @@ GNUNET_ntoh_double (double d); #define GNUNET_memdup(buf,size) GNUNET_xmemdup_(buf, size, __FILE__, __LINE__) /** + * @ingroup memory * Wrapper around malloc. Allocates size bytes of memory. * The memory will be zero'ed out. * @@ -715,6 +764,7 @@ GNUNET_ntoh_double (double d); #define GNUNET_malloc_large(size) GNUNET_xmalloc_unchecked_(size, __FILE__, __LINE__) /** + * @ingroup memory * Wrapper around realloc. Rellocates size bytes of memory. * * @param ptr the pointer to reallocate @@ -724,6 +774,7 @@ GNUNET_ntoh_double (double d); #define GNUNET_realloc(ptr, size) GNUNET_xrealloc_(ptr, size, __FILE__, __LINE__) /** + * @ingroup memory * Wrapper around free. Frees the memory referred to by ptr. * Note that is is generally better to free memory that was * allocated with GNUNET_array_grow using GNUNET_array_grow(mem, size, 0) instead of GNUNET_free. @@ -734,6 +785,7 @@ GNUNET_ntoh_double (double d); #define GNUNET_free(ptr) GNUNET_xfree_(ptr, __FILE__, __LINE__) /** + * @ingroup memory * Free the memory pointed to by ptr if ptr is not NULL. * Equivalent to if (ptr!=null)GNUNET_free(ptr). * @@ -742,6 +794,7 @@ GNUNET_ntoh_double (double d); #define GNUNET_free_non_null(ptr) do { void * __x__ = ptr; if (__x__ != NULL) { GNUNET_free(__x__); } } while(0) /** + * @ingroup memory * Wrapper around GNUNET_strdup. Makes a copy of the zero-terminated string * pointed to by a. * @@ -751,6 +804,7 @@ GNUNET_ntoh_double (double d); #define GNUNET_strdup(a) GNUNET_xstrdup_(a,__FILE__,__LINE__) /** + * @ingroup memory * Wrapper around GNUNET_strndup. Makes a partial copy of the string * pointed to by a. * @@ -761,6 +815,7 @@ GNUNET_ntoh_double (double d); #define GNUNET_strndup(a,length) GNUNET_xstrndup_(a,length,__FILE__,__LINE__) /** + * @ingroup memory * Grow a well-typed (!) array. This is a convenience * method to grow a vector arr of size size * to the new (target) size tsize. @@ -796,12 +851,14 @@ GNUNET_ntoh_double (double d); #define GNUNET_array_grow(arr,size,tsize) GNUNET_xgrow_((void**)&arr, sizeof(arr[0]), &size, tsize, __FILE__, __LINE__) /** + * @ingroup memory * Append an element to a list (growing the * list by one). */ #define GNUNET_array_append(arr,size,element) do { GNUNET_array_grow(arr,size,size+1); arr[size-1] = element; } while(0) /** + * @ingroup memory * Like snprintf, just aborts if the buffer is of insufficient size. * * @param buf pointer to buffer that is written to @@ -815,6 +872,7 @@ GNUNET_snprintf (char *buf, size_t size, const char *format, ...); /** + * @ingroup memory * Like asprintf, just portable. * * @param buf set to a buffer of sufficient size (allocated, caller must free) @@ -938,6 +996,7 @@ GNUNET_xgrow_ (void **old, size_t elementSize, unsigned int *oldCount, /** + * @ingroup memory * Create a copy of the given message. * * @param msg message to copy diff --git a/src/include/gnunet_configuration_lib.h b/src/include/gnunet_configuration_lib.h index 0c87a537d..5ef58bf95 100644 --- a/src/include/gnunet_configuration_lib.h +++ b/src/include/gnunet_configuration_lib.h @@ -21,10 +21,10 @@ /** * @file include/gnunet_configuration_lib.h * @brief configuration API - * * @author Christian Grothoff + * @defgroup configuration Configuration management + * @{ */ - #ifndef GNUNET_CONFIGURATION_LIB_H #define GNUNET_CONFIGURATION_LIB_H @@ -79,7 +79,7 @@ GNUNET_CONFIGURATION_destroy (struct GNUNET_CONFIGURATION_Handle *cfg); * * @param cfg configuration to update * @param filename name of the configuration file, NULL to load defaults - * @return GNUNET_OK on success, GNUNET_SYSERR on error + * @return #GNUNET_OK on success, #GNUNET_SYSERR on error */ int GNUNET_CONFIGURATION_load (struct GNUNET_CONFIGURATION_Handle *cfg, @@ -92,7 +92,7 @@ GNUNET_CONFIGURATION_load (struct GNUNET_CONFIGURATION_Handle *cfg, * * @param cfg configuration to update * @param defaults_d directory with the defaults - * @return GNUNET_OK on success, GNUNET_SYSERR on error + * @return #GNUNET_OK on success, #GNUNET_SYSERR on error */ int GNUNET_CONFIGURATION_load_from (struct GNUNET_CONFIGURATION_Handle *cfg, @@ -105,7 +105,7 @@ GNUNET_CONFIGURATION_load_from (struct GNUNET_CONFIGURATION_Handle *cfg, * * @param cfg configuration to update * @param filename name of the configuration file - * @return GNUNET_OK on success, GNUNET_SYSERR on error + * @return #GNUNET_OK on success, #GNUNET_SYSERR on error */ int GNUNET_CONFIGURATION_parse (struct GNUNET_CONFIGURATION_Handle *cfg, @@ -131,10 +131,10 @@ GNUNET_CONFIGURATION_serialize (const struct GNUNET_CONFIGURATION_Handle *cfg, * @param cfg configuration to update * @param mem the memory block of serialized configuration * @param size the size of the memory block - * @param allow_inline set to GNUNET_YES if we recursively load configuration - * from inlined configurations; GNUNET_NO if not and raise warnings + * @param allow_inline set to #GNUNET_YES if we recursively load configuration + * from inlined configurations; #GNUNET_NO if not and raise warnings * when we come across them - * @return GNUNET_OK on success, GNUNET_ERROR on error + * @return #GNUNET_OK on success, #GNUNET_SYSERR on error */ int GNUNET_CONFIGURATION_deserialize (struct GNUNET_CONFIGURATION_Handle *cfg, @@ -148,7 +148,7 @@ GNUNET_CONFIGURATION_deserialize (struct GNUNET_CONFIGURATION_Handle *cfg, * * @param cfg configuration to write * @param filename where to write the configuration - * @return GNUNET_OK on success, GNUNET_SYSERR on error + * @return #GNUNET_OK on success, #GNUNET_SYSERR on error */ int GNUNET_CONFIGURATION_write (struct GNUNET_CONFIGURATION_Handle *cfg, @@ -160,7 +160,7 @@ GNUNET_CONFIGURATION_write (struct GNUNET_CONFIGURATION_Handle *cfg, * @param cfgDefault default configuration * @param cfgNew new configuration * @param filename where to write the configuration diff between default and new - * @return GNUNET_OK on success, GNUNET_SYSERR on error + * @return #GNUNET_OK on success, #GNUNET_SYSERR on error */ int GNUNET_CONFIGURATION_write_diffs (const struct GNUNET_CONFIGURATION_Handle @@ -188,7 +188,7 @@ GNUNET_CONFIGURATION_get_diff (const struct GNUNET_CONFIGURATION_Handle * changed since the last save. * * @param cfg configuration to inspect - * @return GNUNET_NO if clean, GNUNET_YES if dirty, GNUNET_SYSERR on error (i.e. last save failed) + * @return #GNUNET_NO if clean, #GNUNET_YES if dirty, #GNUNET_SYSERR on error (i.e. last save failed) */ int GNUNET_CONFIGURATION_is_dirty (const struct GNUNET_CONFIGURATION_Handle *cfg); @@ -261,7 +261,7 @@ GNUNET_CONFIGURATION_remove_section (struct GNUNET_CONFIGURATION_Handle *cfg, * @param section section of interest * @param option option of interest * @param number where to store the numeric value of the option - * @return GNUNET_OK on success, GNUNET_SYSERR on error + * @return #GNUNET_OK on success, #GNUNET_SYSERR on error */ int GNUNET_CONFIGURATION_get_value_number (const struct GNUNET_CONFIGURATION_Handle @@ -277,7 +277,7 @@ GNUNET_CONFIGURATION_get_value_number (const struct GNUNET_CONFIGURATION_Handle * @param section section of interest * @param option option of interest * @param time set to the time value stored in the configuration - * @return GNUNET_OK on success, GNUNET_SYSERR on error + * @return #GNUNET_OK on success, #GNUNET_SYSERR on error */ int GNUNET_CONFIGURATION_get_value_time (const struct GNUNET_CONFIGURATION_Handle @@ -294,7 +294,7 @@ GNUNET_CONFIGURATION_get_value_time (const struct GNUNET_CONFIGURATION_Handle * @param section section of interest * @param option option of interest * @param size set to the size in bytes as stored in the configuration - * @return GNUNET_OK on success, GNUNET_SYSERR on error + * @return #GNUNET_OK on success, #GNUNET_SYSERR on error */ int GNUNET_CONFIGURATION_get_value_size (const struct GNUNET_CONFIGURATION_Handle @@ -309,7 +309,7 @@ GNUNET_CONFIGURATION_get_value_size (const struct GNUNET_CONFIGURATION_Handle * @param cfg configuration to inspect * @param section section of interest * @param option option of interest - * @return GNUNET_YES if so, GNUNET_NO if not. + * @return #GNUNET_YES if so, #GNUNET_NO if not. */ int GNUNET_CONFIGURATION_have_value (const struct GNUNET_CONFIGURATION_Handle *cfg, @@ -324,7 +324,7 @@ GNUNET_CONFIGURATION_have_value (const struct GNUNET_CONFIGURATION_Handle *cfg, * @param option option of interest * @param value will be set to a freshly allocated configuration * value, or NULL if option is not specified - * @return GNUNET_OK on success, GNUNET_SYSERR on error + * @return #GNUNET_OK on success, #GNUNET_SYSERR on error */ int GNUNET_CONFIGURATION_get_value_string (const struct GNUNET_CONFIGURATION_Handle @@ -341,7 +341,7 @@ GNUNET_CONFIGURATION_get_value_string (const struct GNUNET_CONFIGURATION_Handle * @param option option of interest * @param value will be set to a freshly allocated configuration * value, or NULL if option is not specified - * @return GNUNET_OK on success, GNUNET_SYSERR on error + * @return #GNUNET_OK on success, #GNUNET_SYSERR on error */ int GNUNET_CONFIGURATION_get_value_filename (const struct @@ -356,7 +356,7 @@ GNUNET_CONFIGURATION_get_value_filename (const struct * @param section section of interest * @param option option of interest * @param cb function to call on each filename - * @param cb_cls closure for cb + * @param cb_cls closure for @a cb * @return number of filenames iterated over, -1 on error */ int @@ -373,7 +373,7 @@ GNUNET_CONFIGURATION_iterate_value_filenames (const struct * @param cfg configuration to inspect * @param section the section * @param iter function to call on each option - * @param iter_cls closure for iter + * @param iter_cls closure for @a iter */ void GNUNET_CONFIGURATION_iterate_section_values (const struct @@ -392,7 +392,7 @@ GNUNET_CONFIGURATION_iterate_section_values (const struct * @param choices NULL-terminated list of legal values * @param value will be set to an entry in the legal list, * or NULL if option is not specified and no default given - * @return GNUNET_OK on success, GNUNET_SYSERR on error + * @return #GNUNET_OK on success, #GNUNET_SYSERR on error */ int GNUNET_CONFIGURATION_get_value_choice (const struct GNUNET_CONFIGURATION_Handle @@ -407,7 +407,7 @@ GNUNET_CONFIGURATION_get_value_choice (const struct GNUNET_CONFIGURATION_Handle * @param cfg configuration to inspect * @param section section of interest * @param option option of interest - * @return GNUNET_YES, GNUNET_NO or if option has no valid value, GNUNET_SYSERR + * @return #GNUNET_YES, #GNUNET_NO or if option has no valid value, #GNUNET_SYSERR */ int GNUNET_CONFIGURATION_get_value_yesno (const struct GNUNET_CONFIGURATION_Handle @@ -465,8 +465,8 @@ GNUNET_CONFIGURATION_set_value_string (struct GNUNET_CONFIGURATION_Handle *cfg, * @param section section of interest * @param option option of interest * @param value filename to remove - * @return GNUNET_OK on success, - * GNUNET_SYSERR if the filename is not in the list + * @return #GNUNET_OK on success, + * #GNUNET_SYSERR if the filename is not in the list */ int GNUNET_CONFIGURATION_remove_value_filename (struct GNUNET_CONFIGURATION_Handle @@ -482,8 +482,8 @@ GNUNET_CONFIGURATION_remove_value_filename (struct GNUNET_CONFIGURATION_Handle * @param section section of interest * @param option option of interest * @param value filename to append - * @return GNUNET_OK on success, - * GNUNET_SYSERR if the filename already in the list + * @return #GNUNET_OK on success, + * #GNUNET_SYSERR if the filename already in the list */ int GNUNET_CONFIGURATION_append_value_filename (struct GNUNET_CONFIGURATION_Handle @@ -491,6 +491,7 @@ GNUNET_CONFIGURATION_append_value_filename (struct GNUNET_CONFIGURATION_Handle const char *option, const char *value); +/** @} */ /* end of group configuration */ #if 0 /* keep Emacsens' auto-indent happy */ { diff --git a/src/include/gnunet_crypto_lib.h b/src/include/gnunet_crypto_lib.h index 19813a693..73a3db382 100644 --- a/src/include/gnunet_crypto_lib.h +++ b/src/include/gnunet_crypto_lib.h @@ -27,6 +27,9 @@ * @author Gerd Knorr * @author Ioana Patrascu * @author Tzvetan Horozov + * + * @defgroup crypto Cryptographic operations + * @defgroup hash Hashing and operations on hashes */ #ifndef GNUNET_CRYPTO_LIB_H @@ -220,6 +223,7 @@ struct GNUNET_CRYPTO_AuthKey /* **************** Functions and Macros ************* */ /** + * @ingroup crypto * Seed a weak random generator. Only #GNUNET_CRYPTO_QUALITY_WEAK-mode generator * can be seeded. * @@ -252,6 +256,7 @@ GNUNET_CRYPTO_crc16_finish (uint32_t sum); /** + * @ingroup hash * Calculate the checksum of a buffer in one step. * * @param buf buffer to calculate CRC over (must be 16-bit aligned) @@ -263,11 +268,12 @@ GNUNET_CRYPTO_crc16_n (const void *buf, size_t len); /** + * @ingroup hash * Compute the CRC32 checksum for the first len * bytes of the buffer. * * @param buf the data over which we're taking the CRC - * @param len the length of the buffer @buf in bytes + * @param len the length of the buffer @a buf in bytes * @return the resulting CRC32 checksum */ int32_t @@ -275,6 +281,7 @@ GNUNET_CRYPTO_crc32_n (const void *buf, size_t len); /** + * @ingroup crypto * Produce a random value. * * @param mode desired quality of the random number @@ -286,6 +293,7 @@ GNUNET_CRYPTO_random_u32 (enum GNUNET_CRYPTO_Quality mode, uint32_t i); /** + * @ingroup crypto * Random on unsigned 64-bit values. * * @param mode desired quality of the random number @@ -297,6 +305,7 @@ GNUNET_CRYPTO_random_u64 (enum GNUNET_CRYPTO_Quality mode, uint64_t max); /** + * @ingroup crypto * Get an array with a random permutation of the * numbers 0...n-1. * @param mode #GNUNET_CRYPTO_QUALITY_STRONG if the strong (but expensive) PRNG should be used, @@ -309,7 +318,8 @@ GNUNET_CRYPTO_random_permute (enum GNUNET_CRYPTO_Quality mode, unsigned int n); /** - * Create a new Session key. + * @ingroup crypto + * Create a new random session key. * * @param key key to initialize */ @@ -318,8 +328,8 @@ GNUNET_CRYPTO_aes_create_session_key (struct GNUNET_CRYPTO_AesSessionKey *key); /** - * Encrypt a block with the public key of another - * host that uses the same cyper. + * @ingroup crypto + * Encrypt a block using a symmetric sessionkey. * * @param block the block to encrypt * @param len the size of the block @@ -336,7 +346,8 @@ GNUNET_CRYPTO_aes_encrypt (const void *block, size_t len, /** - * Decrypt a given block with the sessionkey. + * @ingroup crypto + * Decrypt a given block using a symmetric sessionkey. * * @param block the data to decrypt, encoded as returned by encrypt * @param size how big is the block? @@ -353,6 +364,7 @@ GNUNET_CRYPTO_aes_decrypt (const void *block, size_t size, /** + * @ingroup crypto * @brief Derive an IV * @param iv initialization vector * @param skey session key @@ -381,6 +393,7 @@ GNUNET_CRYPTO_aes_derive_iv_v (struct GNUNET_CRYPTO_AesInitializationVector *iv, /** + * @ingroup hash * Convert hash to ASCII encoding. * @param block the hash code * @param result where to store the encoding (struct GNUNET_CRYPTO_HashAsciiEncoded can be @@ -392,6 +405,7 @@ GNUNET_CRYPTO_hash_to_enc (const struct GNUNET_HashCode * block, /** + * @ingroup hash * Convert short hash to ASCII encoding. * * @param block the hash code @@ -404,6 +418,7 @@ GNUNET_CRYPTO_short_hash_to_enc (const struct GNUNET_CRYPTO_ShortHashCode * bloc /** + * @ingroup hash * Convert ASCII encoding back to a 'struct GNUNET_HashCode' * * @param enc the encoding @@ -417,6 +432,7 @@ GNUNET_CRYPTO_hash_from_string2 (const char *enc, size_t enclen, /** + * @ingroup hash * Convert ASCII encoding back to a 'struct GNUNET_CRYPTO_ShortHash' * * @param enc the encoding @@ -430,6 +446,7 @@ GNUNET_CRYPTO_short_hash_from_string2 (const char *enc, size_t enclen, /** + * @ingroup hash * Convert ASCII encoding back to struct GNUNET_HashCode * * @param enc the encoding @@ -441,6 +458,7 @@ GNUNET_CRYPTO_short_hash_from_string2 (const char *enc, size_t enclen, /** + * @ingroup hash * Convert ASCII encoding back to a 'struct GNUNET_CRYPTO_ShortHash' * * @param enc the encoding @@ -452,6 +470,7 @@ GNUNET_CRYPTO_short_hash_from_string2 (const char *enc, size_t enclen, /** + * @ingroup hash * Compare function for ShortHashCodes, producing a total ordering * of all hashcodes. * @@ -464,6 +483,7 @@ GNUNET_CRYPTO_short_hash_cmp (const struct GNUNET_CRYPTO_ShortHashCode * h1, const struct GNUNET_CRYPTO_ShortHashCode * h2); /** + * @ingroup hash * Compute the distance between 2 hashcodes. * The computation must be fast, not involve * a.a or a.e (they're used elsewhere), and @@ -480,6 +500,7 @@ GNUNET_CRYPTO_hash_distance_u32 (const struct GNUNET_HashCode * a, /** + * @ingroup hash * Compute hash of a given block. * * @param block the data to hash @@ -491,6 +512,7 @@ GNUNET_CRYPTO_hash (const void *block, size_t size, struct GNUNET_HashCode * ret /** + * @ingroup hash * Compute short (256-bit) hash of a given block. * * @param block the data to hash @@ -503,6 +525,7 @@ GNUNET_CRYPTO_short_hash (const void *block, size_t size, /** + * @ingroup hash * Double short (256-bit) hash to create a long hash. * * @param sh short hash to double @@ -514,6 +537,7 @@ GNUNET_CRYPTO_short_hash_double (const struct GNUNET_CRYPTO_ShortHashCode *sh, /** + * @ingroup hash * Truncate doubled short hash back to a short hash. * * @param dh doubled short hash to reduce again @@ -527,6 +551,7 @@ GNUNET_CRYPTO_short_hash_from_truncation (const struct GNUNET_HashCode *dh, /** + * @ingroup hash * Calculate HMAC of a message (RFC 2104) * * @param key secret key @@ -557,7 +582,9 @@ typedef void (*GNUNET_CRYPTO_HashCompletedCallback) (void *cls, */ struct GNUNET_CRYPTO_FileHashContext; + /** + * @ingroup hash * Compute the hash of an entire file. * * @param priority scheduling priority to use @@ -584,6 +611,7 @@ GNUNET_CRYPTO_hash_file_cancel (struct GNUNET_CRYPTO_FileHashContext *fhc); /** + * @ingroup hash * Create a random hash code. * * @param mode desired quality level @@ -595,6 +623,7 @@ GNUNET_CRYPTO_hash_create_random (enum GNUNET_CRYPTO_Quality mode, /** + * @ingroup hash * compute result(delta) = b - a * * @param a some hash code @@ -608,6 +637,7 @@ GNUNET_CRYPTO_hash_difference (const struct GNUNET_HashCode * a, /** + * @ingroup hash * compute result(b) = a + delta * * @param a some hash code @@ -621,6 +651,7 @@ GNUNET_CRYPTO_hash_sum (const struct GNUNET_HashCode * a, /** + * @ingroup hash * compute result = a ^ b * * @param a some hash code @@ -633,6 +664,7 @@ GNUNET_CRYPTO_hash_xor (const struct GNUNET_HashCode * a, const struct GNUNET_Ha /** + * @ingroup hash * Convert a hashcode into a key. * * @param hc hash code that serves to generate the key @@ -647,6 +679,7 @@ GNUNET_CRYPTO_hash_to_aes_key (const struct GNUNET_HashCode * hc, /** + * @ingroup hash * Obtain a bit from a hashcode. * * @param code the GNUNET_CRYPTO_hash to index bit-wise @@ -658,6 +691,7 @@ GNUNET_CRYPTO_hash_get_bit (const struct GNUNET_HashCode * code, unsigned int bi /** + * @ingroup hash * Determine how many low order bits match in two * struct GNUNET_HashCodes. i.e. - 010011 and 011111 share * the first two lowest order bits, and therefore the @@ -674,6 +708,7 @@ GNUNET_CRYPTO_hash_matching_bits (const struct GNUNET_HashCode * first, /** + * @ingroup hash * Compare function for HashCodes, producing a total ordering * of all hashcodes. * @@ -686,6 +721,7 @@ GNUNET_CRYPTO_hash_cmp (const struct GNUNET_HashCode * h1, const struct GNUNET_H /** + * @ingroup hash * Find out which of the two GNUNET_CRYPTO_hash codes is closer to target * in the XOR metric (Kademlia). * @@ -701,6 +737,7 @@ GNUNET_CRYPTO_hash_xorcmp (const struct GNUNET_HashCode * h1, /** + * @ingroup hash * @brief Derive an authentication key * @param key authentication key * @param rkey root key @@ -716,6 +753,7 @@ GNUNET_CRYPTO_hmac_derive_key_v (struct GNUNET_CRYPTO_AuthKey *key, /** + * @ingroup hash * @brief Derive an authentication key * @param key authentication key * @param rkey root key @@ -730,6 +768,7 @@ GNUNET_CRYPTO_hmac_derive_key (struct GNUNET_CRYPTO_AuthKey *key, /** + * @ingroup hash * @brief Derive key * @param result buffer for the derived key, allocated by caller * @param out_len desired length of the derived key @@ -749,6 +788,7 @@ GNUNET_CRYPTO_hkdf (void *result, size_t out_len, int xtr_algo, int prf_algo, /** + * @ingroup hash * @brief Derive key * @param result buffer for the derived key, allocated by caller * @param out_len desired length of the derived key @@ -785,6 +825,7 @@ GNUNET_CRYPTO_kdf_v (void *result, size_t out_len, const void *xts, /** + * @ingroup hash * @brief Derive key * @param result buffer for the derived key, allocated by caller * @param out_len desired length of the derived key @@ -813,6 +854,7 @@ typedef void (*GNUNET_CRYPTO_EccKeyCallback)(void *cls, /** + * @ingroup crypto * Free memory occupied by ECC key * * @param priv pointer to the memory to free @@ -822,6 +864,7 @@ GNUNET_CRYPTO_ecc_key_free (struct GNUNET_CRYPTO_EccPrivateKey *priv); /** + * @ingroup crypto * Extract the public key for the given private key. * * @param priv the private key @@ -857,6 +900,7 @@ GNUNET_CRYPTO_ecc_public_key_from_string (const char *enc, /** + * @ingroup crypto * Create a new private key by reading it from a file. If the * files does not exist, create a new key and write it to the * file. Caller must free return value. Note that this function @@ -875,6 +919,7 @@ GNUNET_CRYPTO_ecc_key_create_from_file (const char *filename); /** + * @ingroup crypto * Create a new private key by reading our peer's key from * the file specified in the configuration. * @@ -886,6 +931,7 @@ GNUNET_CRYPTO_ecc_key_create_from_configuration (const struct GNUNET_CONFIGURATI /** + * @ingroup crypto * Create a new private key. Caller must free return value. * * @return fresh private key @@ -895,6 +941,7 @@ GNUNET_CRYPTO_ecc_key_create (void); /** + * @ingroup crypto * Get the shared private key we use for anonymous users. * * @return "anonymous" private key @@ -904,6 +951,7 @@ GNUNET_CRYPTO_ecc_key_get_anonymous (void); /** + * @ingroup crypto * Setup a hostkey file for a peer given the name of the * configuration file (!). This function is used so that * at a later point code can be certain that reading a @@ -916,6 +964,7 @@ GNUNET_CRYPTO_ecc_setup_hostkey (const char *cfg_name); /** + * @ingroup crypto * Retrieve the identity of the host's peer. * * @param cfg configuration to use @@ -929,6 +978,7 @@ GNUNET_CRYPTO_get_host_identity (const struct GNUNET_CONFIGURATION_Handle *cfg, /** + * @ingroup crypto * Derive key material from a public and a private ECC key. * * @param priv private key to use for the ECDH (x) @@ -943,6 +993,7 @@ GNUNET_CRYPTO_ecc_ecdh (const struct GNUNET_CRYPTO_EccPrivateKey *priv, /** + * @ingroup crypto * Sign a given block. * * @param priv private key to use for the signing @@ -957,6 +1008,7 @@ GNUNET_CRYPTO_ecc_sign (const struct GNUNET_CRYPTO_EccPrivateKey *priv, /** + * @ingroup crypto * Verify signature. * * @param purpose what is the purpose that the signature should have? @@ -974,6 +1026,7 @@ GNUNET_CRYPTO_ecc_verify (uint32_t purpose, /** + * @ingroup crypto * Derive a private key from a given private key and a label. * Essentially calculates a private key 'h = H(l,P) * d mod n' * where n is the size of the ECC group and P is the public @@ -992,6 +1045,7 @@ GNUNET_CRYPTO_ecc_key_derive (const struct GNUNET_CRYPTO_EccPrivateKey *priv, /** + * @ingroup crypto * Derive a public key from a given public key and a label. * Essentially calculates a public key 'V = H(l,P) * P'. * diff --git a/src/include/gnunet_dht_service.h b/src/include/gnunet_dht_service.h index 46ef5847b..53a212dd3 100644 --- a/src/include/gnunet_dht_service.h +++ b/src/include/gnunet_dht_service.h @@ -22,6 +22,8 @@ * @file include/gnunet_dht_service.h * @brief API to the DHT service * @author Christian Grothoff + * @defgroup dht Distributed Hash Table + * @{ */ #ifndef GNUNET_DHT_SERVICE_H @@ -396,6 +398,8 @@ GNUNET_DHT_monitor_stop (struct GNUNET_DHT_MonitorHandle *handle); } #endif +/** @} */ /* end of group dht */ + #endif /* gnunet_dht_service.h */ diff --git a/src/include/gnunet_protocols.h b/src/include/gnunet_protocols.h index e934b0fe0..b3a1c009d 100644 --- a/src/include/gnunet_protocols.h +++ b/src/include/gnunet_protocols.h @@ -22,6 +22,8 @@ * @file include/gnunet_protocols.h * @brief constants for network protocols * @author Christian Grothoff + * @defgroup protocols Types of messages used in GNUnet + * @{ */ /******************************************************************************* @@ -1972,6 +1974,8 @@ extern "C" } #endif +/** @} */ /* end of group protocols */ + /* ifndef GNUNET_PROTOCOLS_H */ #endif /* end of gnunet_protocols.h */ diff --git a/src/include/gnunet_scheduler_lib.h b/src/include/gnunet_scheduler_lib.h index c482a000c..110c0ce77 100644 --- a/src/include/gnunet_scheduler_lib.h +++ b/src/include/gnunet_scheduler_lib.h @@ -22,6 +22,8 @@ * @file include/gnunet_scheduler_lib.h * @brief API to schedule computations using continuation passing style * @author Christian Grothoff + * @defgroup scheduler Event loop (scheduler) + * @{ */ #ifndef GNUNET_SCHEDULER_LIB_H @@ -198,29 +200,29 @@ typedef void (*GNUNET_SCHEDULER_Task) (void *cls, /** * Signature of the select function used by the scheduler. - * GNUNET_NETWORK_socket_select matches it. + * #GNUNET_NETWORK_socket_select matches it. * * @param cls closure * @param rfds set of sockets to be checked for readability * @param wfds set of sockets to be checked for writability * @param efds set of sockets to be checked for exceptions * @param timeout relative value when to return - * @return number of selected sockets, GNUNET_SYSERR on error + * @return number of selected sockets, #GNUNET_SYSERR on error */ typedef int (*GNUNET_SCHEDULER_select) (void *cls, - struct GNUNET_NETWORK_FDSet * rfds, - struct GNUNET_NETWORK_FDSet * wfds, - struct GNUNET_NETWORK_FDSet * efds, + struct GNUNET_NETWORK_FDSet *rfds, + struct GNUNET_NETWORK_FDSet *wfds, + struct GNUNET_NETWORK_FDSet *efds, struct GNUNET_TIME_Relative timeout); /** * Initialize and run scheduler. This function will return when all * tasks have completed. On systems with signals, receiving a SIGTERM - * (and other similar signals) will cause "GNUNET_SCHEDULER_shutdown" + * (and other similar signals) will cause #GNUNET_SCHEDULER_shutdown * to be run after the active task is complete. As a result, SIGTERM * causes all active tasks to be scheduled with reason - * "GNUNET_SCHEDULER_REASON_SHUTDOWN". (However, tasks added + * #GNUNET_SCHEDULER_REASON_SHUTDOWN. (However, tasks added * afterwards will execute normally!). Note that any particular * signal will only shut down one scheduler; applications should * always only create a single scheduler. @@ -249,7 +251,7 @@ GNUNET_SCHEDULER_shutdown (void); * dropped (if the decision should be made based on the number of * tasks ready to run). * - * * @param p priority-level to query, use KEEP to query the level + * @param p priority-level to query, use KEEP to query the level * of the current task, use COUNT to get the sum over * all priority levels * @return number of tasks pending right now @@ -263,7 +265,7 @@ GNUNET_SCHEDULER_get_load (enum GNUNET_SCHEDULER_Priority p); * started. Will return the same value as * the GNUNET_SCHEDULER_TaskContext's reason field. * - * * @return reason(s) why the current task is run + * @return reason(s) why the current task is run */ enum GNUNET_SCHEDULER_Reason GNUNET_SCHEDULER_get_reason (void); @@ -273,7 +275,7 @@ GNUNET_SCHEDULER_get_reason (void); * Cancel the task with the specified identifier. * The task must not yet have run. * - * * @param task id of the task to cancel + * @param task id of the task to cancel * @return the closure of the callback of the cancelled task */ void * @@ -285,7 +287,7 @@ GNUNET_SCHEDULER_cancel (GNUNET_SCHEDULER_TaskIdentifier task); * similar to the other "add" functions except that there is no delay * and the reason code can be specified. * - * * @param task main function of the task + * @param task main function of the task * @param task_cls closure of task * @param reason reason for task invocation */ @@ -300,7 +302,7 @@ GNUNET_SCHEDULER_add_continuation (GNUNET_SCHEDULER_Task task, void *task_cls, * and the reason code can be specified. * * @param task main function of the task - * @param task_cls closure for 'main' + * @param task_cls closure for @a task * @param reason reason for task invocation * @param priority priority to use for the task */ @@ -313,11 +315,11 @@ GNUNET_SCHEDULER_add_continuation_with_priority (GNUNET_SCHEDULER_Task task, voi /** * Schedule a new task to be run with a specified priority. * - * * @param prio how important is the new task? + * @param prio how important is the new task? * @param task main function of the task - * @param task_cls closure of task + * @param task_cls closure of @a task * @return unique task identifier for the job - * only valid until "task" is started! + * only valid until @a task is started! */ GNUNET_SCHEDULER_TaskIdentifier GNUNET_SCHEDULER_add_with_priority (enum GNUNET_SCHEDULER_Priority prio, @@ -328,10 +330,10 @@ GNUNET_SCHEDULER_add_with_priority (enum GNUNET_SCHEDULER_Priority prio, * Schedule a new task to be run as soon as possible. The task * will be run with the DEFAULT priority. * - * * @param task main function of the task - * @param task_cls closure of task + * @param task main function of the task + * @param task_cls closure of @a task * @return unique task identifier for the job - * only valid until "task" is started! + * only valid until @a task is started! */ GNUNET_SCHEDULER_TaskIdentifier GNUNET_SCHEDULER_add_now (GNUNET_SCHEDULER_Task task, void *task_cls); @@ -345,11 +347,11 @@ GNUNET_SCHEDULER_add_now (GNUNET_SCHEDULER_Task task, void *task_cls); * not count for the 'lifeness' of the process. This API is only * useful in a few special cases. * - * @param lifeness GNUNET_YES if the task counts for lifeness, GNUNET_NO if not. + * @param lifeness #GNUNET_YES if the task counts for lifeness, #GNUNET_NO if not. * @param task main function of the task - * @param task_cls closure of task + * @param task_cls closure of @a task * @return unique task identifier for the job - * only valid until "task" is started! + * only valid until @a task is started! */ GNUNET_SCHEDULER_TaskIdentifier GNUNET_SCHEDULER_add_now_with_lifeness (int lifeness, @@ -363,11 +365,11 @@ GNUNET_SCHEDULER_add_now_with_lifeness (int lifeness, * will be run with the DEFAULT priority. * * * @param delay when should this operation time out? Use - * GNUNET_TIME_UNIT_FOREVER_REL for "on shutdown" + * #GNUNET_TIME_UNIT_FOREVER_REL for "on shutdown" * @param task main function of the task - * @param task_cls closure of task + * @param task_cls closure of @a task * @return unique task identifier for the job - * only valid until "task" is started! + * only valid until @a task is started! */ GNUNET_SCHEDULER_TaskIdentifier GNUNET_SCHEDULER_add_delayed (struct GNUNET_TIME_Relative delay, @@ -379,12 +381,12 @@ GNUNET_SCHEDULER_add_delayed (struct GNUNET_TIME_Relative delay, * will be scheduled for execution once the delay has expired. * * @param delay when should this operation time out? Use - * GNUNET_TIME_UNIT_FOREVER_REL for "on shutdown" + * #GNUNET_TIME_UNIT_FOREVER_REL for "on shutdown" * @param priority priority to use for the task * @param task main function of the task - * @param task_cls closure of task + * @param task_cls closure of @a task * @return unique task identifier for the job - * only valid until "task" is started! + * only valid until @a task is started! */ GNUNET_SCHEDULER_TaskIdentifier GNUNET_SCHEDULER_add_delayed_with_priority (struct GNUNET_TIME_Relative delay, @@ -400,12 +402,12 @@ GNUNET_SCHEDULER_add_delayed_with_priority (struct GNUNET_TIME_Relative delay, * socket operation is ready. It will be run with the DEFAULT priority. * * * @param delay when should this operation time out? Use - * GNUNET_TIME_UNIT_FOREVER_REL for "on shutdown" + * #GNUNET_TIME_UNIT_FOREVER_REL for "on shutdown" * @param rfd read file-descriptor * @param task main function of the task - * @param task_cls closure of task + * @param task_cls closure of @a task * @return unique task identifier for the job - * only valid until "task" is started! + * only valid until @a task is started! */ GNUNET_SCHEDULER_TaskIdentifier GNUNET_SCHEDULER_add_read_net (struct GNUNET_TIME_Relative delay, @@ -422,13 +424,13 @@ GNUNET_SCHEDULER_add_read_net (struct GNUNET_TIME_Relative delay, * will be run with the DEFAULT priority. * * @param delay when should this operation time out? Use - * GNUNET_TIME_UNIT_FOREVER_REL for "on shutdown" + * #GNUNET_TIME_UNIT_FOREVER_REL for "on shutdown" * @param priority priority to use for the task * @param rfd read file-descriptor * @param task main function of the task - * @param task_cls closure of task + * @param task_cls closure of @a task * @return unique task identifier for the job - * only valid until "task" is started! + * only valid until @a task is started! */ GNUNET_SCHEDULER_TaskIdentifier GNUNET_SCHEDULER_add_read_net_with_priority (struct GNUNET_TIME_Relative delay, @@ -445,12 +447,12 @@ GNUNET_SCHEDULER_add_read_net_with_priority (struct GNUNET_TIME_Relative delay, * socket operation is ready. It will be run with the DEFAULT priority. * * * @param delay when should this operation time out? Use - * GNUNET_TIME_UNIT_FOREVER_REL for "on shutdown" + * #GNUNET_TIME_UNIT_FOREVER_REL for "on shutdown" * @param wfd write file-descriptor * @param task main function of the task - * @param task_cls closure of task + * @param task_cls closure of @a task * @return unique task identifier for the job - * only valid until "task" is started! + * only valid until @a task is started! */ GNUNET_SCHEDULER_TaskIdentifier GNUNET_SCHEDULER_add_write_net (struct GNUNET_TIME_Relative delay, @@ -466,10 +468,10 @@ GNUNET_SCHEDULER_add_write_net (struct GNUNET_TIME_Relative delay, * socket operation is ready. It will be run with the DEFAULT priority. * * * @param delay when should this operation time out? Use - * GNUNET_TIME_UNIT_FOREVER_REL for "on shutdown" + * #GNUNET_TIME_UNIT_FOREVER_REL for "on shutdown" * @param rfd read file-descriptor * @param task main function of the task - * @param task_cls closure of task + * @param task_cls closure of @a task * @return unique task identifier for the job * only valid until "task" is started! */ @@ -487,12 +489,12 @@ GNUNET_SCHEDULER_add_read_file (struct GNUNET_TIME_Relative delay, * socket operation is ready. It will be run with the DEFAULT priority. * * * @param delay when should this operation time out? Use - * GNUNET_TIME_UNIT_FOREVER_REL for "on shutdown" + * #GNUNET_TIME_UNIT_FOREVER_REL for "on shutdown" * @param wfd write file-descriptor * @param task main function of the task - * @param task_cls closure of task + * @param task_cls closure of @a task * @return unique task identifier for the job - * only valid until "task" is started! + * only valid until @a task is started! */ GNUNET_SCHEDULER_TaskIdentifier GNUNET_SCHEDULER_add_write_file (struct GNUNET_TIME_Relative delay, @@ -518,12 +520,12 @@ GNUNET_SCHEDULER_add_write_file (struct GNUNET_TIME_Relative delay, * * * @param prio how important is this task? - * @param delay how long should we wait? Use GNUNET_TIME_UNIT_FOREVER_REL for "forever", + * @param delay how long should we wait? Use #GNUNET_TIME_UNIT_FOREVER_REL for "forever", * which means that the task will only be run after we receive SIGTERM * @param rs set of file descriptors we want to read (can be NULL) * @param ws set of file descriptors we want to write (can be NULL) * @param task main function of the task - * @param task_cls closure of task + * @param task_cls closure of @a task * @return unique task identifier for the job * only valid until "task" is started! */ @@ -545,6 +547,8 @@ GNUNET_SCHEDULER_set_select (GNUNET_SCHEDULER_select new_select, void *new_select_cls); +/** @} */ /* end of group scheduler */ + #if 0 /* keep Emacsens' auto-indent happy */ { #endif diff --git a/src/include/gnunet_time_lib.h b/src/include/gnunet_time_lib.h index 298f3284a..a739d6d7f 100644 --- a/src/include/gnunet_time_lib.h +++ b/src/include/gnunet_time_lib.h @@ -21,8 +21,9 @@ /** * @file include/gnunet_time_lib.h * @brief functions related to time - * * @author Christian Grothoff + * @defgroup time Time and time calculations + * @{ */ #ifndef GNUNET_TIME_LIB_H @@ -493,6 +494,9 @@ GNUNET_TIME_get_offset (void); } #endif +/** @} */ /* end of group time */ + + /* ifndef GNUNET_TIME_LIB_H */ #endif /* end of gnunet_time_lib.h */ -- 2.25.1