char *hostkeys_data;
/**
- * memory map for 'hostkeys_data'.
+ * memory map for @e hostkeys_data.
*/
struct GNUNET_DISK_MapHandle *map;
* startup. This function loads such keys into memory from a file.
*
* @param system the testing system handle
- * @return GNUNET_OK on success; GNUNET_SYSERR on error
+ * @return #GNUNET_OK on success; #GNUNET_SYSERR on error
*/
static int
hostkeys_load (struct GNUNET_TESTING_System *system)
HIGH_PORT);
}
+
static void
cleanup_shared_service_instance (struct SharedServiceInstance *i)
{
GNUNET_free (i);
}
+
static int
start_shared_service_instance (struct SharedServiceInstance *i)
{
/**
* Release reservation of a TCP or UDP port for a peer
- * (used during GNUNET_TESTING_peer_destroy).
+ * (used during #GNUNET_TESTING_peer_destroy()).
*
* @param system system to use for reservation tracking
* @param port reserved port to release
* @param system the testing system handle
* @param key_number desired pre-created hostkey to obtain
* @param id set to the peer's identity (hash of the public
- * key; if NULL, GNUNET_SYSERR is returned immediately
+ * key; if NULL, NULL is returned immediately
* @return NULL on error (not enough keys)
*/
struct GNUNET_CRYPTO_EddsaPrivateKey *
if (key_number >= system->total_hostkeys)
{
LOG (GNUNET_ERROR_TYPE_ERROR,
- _("Key number %u does not exist\n"), key_number);
+ _("Key number %u does not exist\n"),
+ key_number);
return NULL;
}
private_key = GNUNET_new (struct GNUNET_CRYPTO_EddsaPrivateKey);
(key_number * GNUNET_TESTING_HOSTKEYFILESIZE),
GNUNET_TESTING_HOSTKEYFILESIZE);
GNUNET_CRYPTO_eddsa_key_get_public (private_key,
- &id->public_key);
+ &id->public_key);
return private_key;
}
* @param value value of the option
*/
static void
-update_config (void *cls, const char *section, const char *option,
+update_config (void *cls,
+ const char *section,
+ const char *option,
const char *value)
{
struct UpdateContext *uc = cls;
GNUNET_free (allowed_hosts);
}
+
static struct SharedServiceInstance *
associate_shared_service (struct GNUNET_TESTING_System *system,
struct SharedService *ss,
* system. The default configuration will be available in PATHS section under
* the option DEFAULTCONFIG after the call. GNUNET_HOME is also set in PATHS
* section to the temporary directory specific to this configuration. If we run
- * out of "*port" numbers, return SYSERR.
+ * out of "*port" numbers, return #GNUNET_SYSERR.
*
* This is primarily a helper function used internally
- * by 'GNUNET_TESTING_peer_configure'.
+ * by #GNUNET_TESTING_peer_configure().
*
* @param system system to use to coordinate resource usage
* @param cfg template configuration to update
- * @return GNUNET_OK on success, GNUNET_SYSERR on error - the configuration will
+ * @return #GNUNET_OK on success, #GNUNET_SYSERR on error - the configuration will
* be incomplete and should not be used there upon
*/
int
* Start the peer.
*
* @param peer peer to start
- * @return GNUNET_OK on success, GNUNET_SYSERR on error (i.e. peer already running)
+ * @return #GNUNET_OK on success, #GNUNET_SYSERR on error (i.e. peer already running)
*/
int
GNUNET_TESTING_peer_start (struct GNUNET_TESTING_Peer *peer)
* the service
* @param cont the callback to call with result and status from ARM API
* @param cont_cls the closure for the above callback
- * @return GNUNET_OK upon successfully queuing the service start request;
- * GNUNET_SYSERR upon error
+ * @return #GNUNET_OK upon successfully queuing the service start request;
+ * #GNUNET_SYSERR upon error
*/
int
GNUNET_TESTING_peer_service_start (struct GNUNET_TESTING_Peer *peer,
* the service
* @param cont the callback to call with result and status from ARM API
* @param cont_cls the closure for the above callback
- * @return GNUNET_OK upon successfully queuing the service stop request;
- * GNUNET_SYSERR upon error
+ * @return #GNUNET_OK upon successfully queuing the service stop request;
+ * #GNUNET_SYSERR upon error
*/
int
GNUNET_TESTING_peer_service_stop (struct GNUNET_TESTING_Peer *peer,
* Sends SIGTERM to the peer's main process
*
* @param peer the handle to the peer
- * @return GNUNET_OK if successful; GNUNET_SYSERR if the main process is NULL
+ * @return #GNUNET_OK if successful; #GNUNET_SYSERR if the main process is NULL
* or upon any error while sending SIGTERM
*/
int
* Waits for a peer to terminate. The peer's main process will also be destroyed.
*
* @param peer the handle to the peer
- * @return GNUNET_OK if successful; GNUNET_SYSERR if the main process is NULL
+ * @return #GNUNET_OK if successful; #GNUNET_SYSERR if the main process is NULL
* or upon any error while waiting
*/
int
* Stop the peer.
*
* @param peer peer to stop
- * @return GNUNET_OK on success, GNUNET_SYSERR on error
+ * @return #GNUNET_OK on success, #GNUNET_SYSERR on error
*/
int
GNUNET_TESTING_peer_stop (struct GNUNET_TESTING_Peer *peer)
* Function called whenever we connect to or disconnect from ARM.
*
* @param cls closure
- * @param connected GNUNET_YES if connected, GNUNET_NO if disconnected,
- * GNUNET_SYSERR on error.
+ * @param connected #GNUNET_YES if connected, #GNUNET_NO if disconnected,
+ * #GNUNET_SYSERR on error.
*/
static void
disconn_status (void *cls,
* @param peer the peer to stop
* @param cb the callback to signal peer shutdown
* @param cb_cls closure for the above callback
- * @return GNUNET_OK upon successfully giving the request to the ARM API (this
- * does not mean that the peer is successfully stopped); GNUNET_SYSERR
+ * @return #GNUNET_OK upon successfully giving the request to the ARM API (this
+ * does not mean that the peer is successfully stopped); #GNUNET_SYSERR
* upon any error.
*/
int
* Starts a peer using the given configuration and then invokes the
* given callback. This function ALSO initializes the scheduler loop
* and should thus be called directly from "main". The testcase
- * should self-terminate by invoking 'GNUNET_SCHEDULER_shutdown'.
+ * should self-terminate by invoking #GNUNET_SCHEDULER_shutdown().
*
* @param testdir only the directory name without any path. This is used for
* all service homes; the directory will be created in a temporary
* @param cfgfilename name of the configuration file to use;
* use NULL to only run with defaults
* @param tm main function of the testcase
- * @param tm_cls closure for 'tm'
+ * @param tm_cls closure for @a tm
* @return 0 on success, 1 on error
*/
int
* Starts a service using the given configuration and then invokes the
* given callback. This function ALSO initializes the scheduler loop
* and should thus be called directly from "main". The testcase
- * should self-terminate by invoking 'GNUNET_SCHEDULER_shutdown'.
+ * should self-terminate by invoking #GNUNET_SCHEDULER_shutdown().
*
* This function is useful if the testcase is for a single service
* and if that service doesn't itself depend on other services.
* @param cfgfilename name of the configuration file to use;
* use NULL to only run with defaults
* @param tm main function of the testcase
- * @param tm_cls closure for 'tm'
+ * @param tm_cls closure for @a tm
* @return 0 on success, 1 on error
*/
int