[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r28638 - gnunet/src/include
From: |
gnunet |
Subject: |
[GNUnet-SVN] r28638 - gnunet/src/include |
Date: |
Thu, 15 Aug 2013 01:43:53 +0200 |
Author: grothoff
Date: 2013-08-15 01:43:53 +0200 (Thu, 15 Aug 2013)
New Revision: 28638
Modified:
gnunet/src/include/gnunet_common.h
gnunet/src/include/gnunet_configuration_lib.h
gnunet/src/include/gnunet_crypto_lib.h
gnunet/src/include/gnunet_dht_service.h
gnunet/src/include/gnunet_protocols.h
gnunet/src/include/gnunet_scheduler_lib.h
gnunet/src/include/gnunet_time_lib.h
Log:
-playing with doxygen groups
Modified: gnunet/src/include/gnunet_common.h
===================================================================
--- gnunet/src/include/gnunet_common.h 2013-08-14 23:05:42 UTC (rev 28637)
+++ gnunet/src/include/gnunet_common.h 2013-08-14 23:43:53 UTC (rev 28638)
@@ -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 @@
#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 @@
/* ****************************** logging ***************************** */
/**
+ * @ingroup logging
* Types of errors.
*/
enum GNUNET_ErrorType
@@ -304,6 +309,7 @@
/**
+ * @ingroup logging
* User-defined handler for log messages.
*
* @param cls closure
@@ -318,6 +324,7 @@
/**
+ * @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 @@
/**
+ * @ingroup logging
* Main log function.
*
* @param kind how serious is the error?
@@ -364,7 +372,9 @@
#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 @@
/**
+ * @ingroup logging
* Log error message about missing configuration option.
*
* @param kind log level
@@ -423,6 +434,7 @@
/**
+ * @ingroup logging
* Log error message about invalid configuration option value.
*
* @param kind log level
@@ -438,13 +450,16 @@
/**
+ * @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 @@
/**
+ * @ingroup logging
* Setup logging.
*
* @param comp default component to use
@@ -466,6 +482,7 @@
/**
+ * @ingroup logging
* Add a custom logger.
*
* @param logger log function
@@ -476,6 +493,7 @@
/**
+ * @ingroup logging
* Remove a custom logger.
*
* @param logger log function
@@ -486,6 +504,7 @@
/**
+ * @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 @@
/**
+ * @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 @@
/**
+ * @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 @@
/**
+ * @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 @@
/**
+ * @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 @@
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 @@
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 @@
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 @@
/**
+ * @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 @@
*/
#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 @@
/* ************************* 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 @@
#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 @@
#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 @@
#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 @@
#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 @@
#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 @@
#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 @@
#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 @@
#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 @@
#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 <tt>arr</tt> of size <tt>size</tt>
* to the new (target) size <tt>tsize</tt>.
@@ -796,12 +851,14 @@
#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 @@
/**
+ * @ingroup memory
* Like asprintf, just portable.
*
* @param buf set to a buffer of sufficient size (allocated, caller must free)
@@ -938,6 +996,7 @@
/**
+ * @ingroup memory
* Create a copy of the given message.
*
* @param msg message to copy
Modified: gnunet/src/include/gnunet_configuration_lib.h
===================================================================
--- gnunet/src/include/gnunet_configuration_lib.h 2013-08-14 23:05:42 UTC
(rev 28637)
+++ gnunet/src/include/gnunet_configuration_lib.h 2013-08-14 23:43:53 UTC
(rev 28638)
@@ -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 @@
*
* @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 @@
*
* @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 @@
*
* @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 @@
* @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 @@
*
* @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 @@
* @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 @@
* 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 @@
* @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 @@
* @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 @@
* @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 @@
* @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 @@
* @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 @@
* @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 @@
* @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 @@
* @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 @@
* @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 @@
* @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 @@
* @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 @@
* @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 @@
const char *option,
const char *value);
+/** @} */ /* end of group configuration */
#if 0 /* keep Emacsens' auto-indent happy */
{
Modified: gnunet/src/include/gnunet_crypto_lib.h
===================================================================
--- gnunet/src/include/gnunet_crypto_lib.h 2013-08-14 23:05:42 UTC (rev
28637)
+++ gnunet/src/include/gnunet_crypto_lib.h 2013-08-14 23:43:53 UTC (rev
28638)
@@ -27,6 +27,9 @@
* @author Gerd Knorr <address@hidden>
* @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 @@
/* **************** Functions and Macros ************* */
/**
+ * @ingroup crypto
* Seed a weak random generator. Only #GNUNET_CRYPTO_QUALITY_WEAK-mode
generator
* can be seeded.
*
@@ -252,6 +256,7 @@
/**
+ * @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 @@
/**
+ * @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 @@
/**
+ * @ingroup crypto
* Produce a random value.
*
* @param mode desired quality of the random number
@@ -286,6 +293,7 @@
/**
+ * @ingroup crypto
* Random on unsigned 64-bit values.
*
* @param mode desired quality of the random number
@@ -297,6 +305,7 @@
/**
+ * @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 @@
/**
- * Create a new Session key.
+ * @ingroup crypto
+ * Create a new random session key.
*
* @param key key to initialize
*/
@@ -318,8 +328,8 @@
/**
- * 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 @@
/**
- * 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 @@
/**
+ * @ingroup crypto
* @brief Derive an IV
* @param iv initialization vector
* @param skey session key
@@ -381,6 +393,7 @@
/**
+ * @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 @@
/**
+ * @ingroup hash
* Convert short hash to ASCII encoding.
*
* @param block the hash code
@@ -404,6 +418,7 @@
/**
+ * @ingroup hash
* Convert ASCII encoding back to a 'struct GNUNET_HashCode'
*
* @param enc the encoding
@@ -417,6 +432,7 @@
/**
+ * @ingroup hash
* Convert ASCII encoding back to a 'struct GNUNET_CRYPTO_ShortHash'
*
* @param enc the encoding
@@ -430,6 +446,7 @@
/**
+ * @ingroup hash
* Convert ASCII encoding back to struct GNUNET_HashCode
*
* @param enc the encoding
@@ -441,6 +458,7 @@
/**
+ * @ingroup hash
* Convert ASCII encoding back to a 'struct GNUNET_CRYPTO_ShortHash'
*
* @param enc the encoding
@@ -452,6 +470,7 @@
/**
+ * @ingroup hash
* Compare function for ShortHashCodes, producing a total ordering
* of all hashcodes.
*
@@ -464,6 +483,7 @@
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 @@
/**
+ * @ingroup hash
* Compute hash of a given block.
*
* @param block the data to hash
@@ -491,6 +512,7 @@
/**
+ * @ingroup hash
* Compute short (256-bit) hash of a given block.
*
* @param block the data to hash
@@ -503,6 +525,7 @@
/**
+ * @ingroup hash
* Double short (256-bit) hash to create a long hash.
*
* @param sh short hash to double
@@ -514,6 +537,7 @@
/**
+ * @ingroup hash
* Truncate doubled short hash back to a short hash.
*
* @param dh doubled short hash to reduce again
@@ -527,6 +551,7 @@
/**
+ * @ingroup hash
* Calculate HMAC of a message (RFC 2104)
*
* @param key secret key
@@ -557,7 +582,9 @@
*/
struct GNUNET_CRYPTO_FileHashContext;
+
/**
+ * @ingroup hash
* Compute the hash of an entire file.
*
* @param priority scheduling priority to use
@@ -584,6 +611,7 @@
/**
+ * @ingroup hash
* Create a random hash code.
*
* @param mode desired quality level
@@ -595,6 +623,7 @@
/**
+ * @ingroup hash
* compute result(delta) = b - a
*
* @param a some hash code
@@ -608,6 +637,7 @@
/**
+ * @ingroup hash
* compute result(b) = a + delta
*
* @param a some hash code
@@ -621,6 +651,7 @@
/**
+ * @ingroup hash
* compute result = a ^ b
*
* @param a some hash code
@@ -633,6 +664,7 @@
/**
+ * @ingroup hash
* Convert a hashcode into a key.
*
* @param hc hash code that serves to generate the key
@@ -647,6 +679,7 @@
/**
+ * @ingroup hash
* Obtain a bit from a hashcode.
*
* @param code the GNUNET_CRYPTO_hash to index bit-wise
@@ -658,6 +691,7 @@
/**
+ * @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 @@
/**
+ * @ingroup hash
* Compare function for HashCodes, producing a total ordering
* of all hashcodes.
*
@@ -686,6 +721,7 @@
/**
+ * @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 @@
/**
+ * @ingroup hash
* @brief Derive an authentication key
* @param key authentication key
* @param rkey root key
@@ -716,6 +753,7 @@
/**
+ * @ingroup hash
* @brief Derive an authentication key
* @param key authentication key
* @param rkey root key
@@ -730,6 +768,7 @@
/**
+ * @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 @@
/**
+ * @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 @@
/**
+ * @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 @@
/**
+ * @ingroup crypto
* Free memory occupied by ECC key
*
* @param priv pointer to the memory to free
@@ -822,6 +864,7 @@
/**
+ * @ingroup crypto
* Extract the public key for the given private key.
*
* @param priv the private key
@@ -857,6 +900,7 @@
/**
+ * @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 @@
/**
+ * @ingroup crypto
* Create a new private key by reading our peer's key from
* the file specified in the configuration.
*
@@ -886,6 +931,7 @@
/**
+ * @ingroup crypto
* Create a new private key. Caller must free return value.
*
* @return fresh private key
@@ -895,6 +941,7 @@
/**
+ * @ingroup crypto
* Get the shared private key we use for anonymous users.
*
* @return "anonymous" private key
@@ -904,6 +951,7 @@
/**
+ * @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 @@
/**
+ * @ingroup crypto
* Retrieve the identity of the host's peer.
*
* @param cfg configuration to use
@@ -929,6 +978,7 @@
/**
+ * @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 @@
/**
+ * @ingroup crypto
* Sign a given block.
*
* @param priv private key to use for the signing
@@ -957,6 +1008,7 @@
/**
+ * @ingroup crypto
* Verify signature.
*
* @param purpose what is the purpose that the signature should have?
@@ -974,6 +1026,7 @@
/**
+ * @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 @@
/**
+ * @ingroup crypto
* Derive a public key from a given public key and a label.
* Essentially calculates a public key 'V = H(l,P) * P'.
*
Modified: gnunet/src/include/gnunet_dht_service.h
===================================================================
--- gnunet/src/include/gnunet_dht_service.h 2013-08-14 23:05:42 UTC (rev
28637)
+++ gnunet/src/include/gnunet_dht_service.h 2013-08-14 23:43:53 UTC (rev
28638)
@@ -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 @@
}
#endif
+/** @} */ /* end of group dht */
+
#endif
/* gnunet_dht_service.h */
Modified: gnunet/src/include/gnunet_protocols.h
===================================================================
--- gnunet/src/include/gnunet_protocols.h 2013-08-14 23:05:42 UTC (rev
28637)
+++ gnunet/src/include/gnunet_protocols.h 2013-08-14 23:43:53 UTC (rev
28638)
@@ -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 @@
}
#endif
+/** @} */ /* end of group protocols */
+
/* ifndef GNUNET_PROTOCOLS_H */
#endif
/* end of gnunet_protocols.h */
Modified: gnunet/src/include/gnunet_scheduler_lib.h
===================================================================
--- gnunet/src/include/gnunet_scheduler_lib.h 2013-08-14 23:05:42 UTC (rev
28637)
+++ gnunet/src/include/gnunet_scheduler_lib.h 2013-08-14 23:43:53 UTC (rev
28638)
@@ -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 @@
/**
* 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 @@
* 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 @@
* 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 @@
* 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 @@
* 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 @@
* 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 @@
/**
* 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 @@
* 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 @@
* 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 @@
* 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 @@
* 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 @@
* 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 @@
* 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 @@
* 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 @@
* 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 @@
* 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 @@
* </code>
*
* @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 @@
void *new_select_cls);
+/** @} */ /* end of group scheduler */
+
#if 0 /* keep Emacsens' auto-indent happy */
{
#endif
Modified: gnunet/src/include/gnunet_time_lib.h
===================================================================
--- gnunet/src/include/gnunet_time_lib.h 2013-08-14 23:05:42 UTC (rev
28637)
+++ gnunet/src/include/gnunet_time_lib.h 2013-08-14 23:43:53 UTC (rev
28638)
@@ -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 @@
}
#endif
+/** @} */ /* end of group time */
+
+
/* ifndef GNUNET_TIME_LIB_H */
#endif
/* end of gnunet_time_lib.h */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r28638 - gnunet/src/include,
gnunet <=