gnunet

Main GNUnet Logic
Log | Files | Refs | Submodules | README | LICENSE

commit 1dfca6dad60355322d2618bc1d0109d2cb6ee8a4
parent d4a1849b3f7187ec7688b39e2dced89e9e6ed502
Author: Christian Grothoff <christian@grothoff.org>
Date:   Mon, 20 May 2024 13:50:09 +0200

add missing headers

Diffstat:
Asrc/include/gnunet_testing_arm_lib.h | 36++++++++++++++++++++++++++++++++++++
Asrc/include/gnunet_testing_testbed_lib.h | 42++++++++++++++++++++++++++++++++++++++++++
Msrc/service/arm/testing_arm_cmd_start_peer.c | 3+--
3 files changed, 79 insertions(+), 2 deletions(-)

diff --git a/src/include/gnunet_testing_arm_lib.h b/src/include/gnunet_testing_arm_lib.h @@ -0,0 +1,36 @@ +#ifndef GNUNET_TESTING_ARM_LIB_H +#define GNUNET_TESTING_ARM_LIB_H + +#include "gnunet_arm_service.h" + +/** + * Create command. + * + * @param label name for command. + * @param system_label Label of the cmd to setup a test environment. + * @param no Decimal number representing the last byte of the IP address of this peer. + * @param node_ip The IP address of this node. + * @param cfgname Configuration file name for this peer. + * @param broadcast Flag indicating, if broadcast should be switched on. + * @return command. + */ +struct GNUNET_TESTING_Command +GNUNET_TESTBED_cmd_start_peer (const char *label, + const char *system_label, + uint32_t no, + const char *node_ip, + const char *cfgname, + unsigned int broadcast); + +/** + * Call #op on all simple traits. + */ +#define GNUNET_TESTING_ARM_SIMPLE_TRAITS(op, prefix) \ + op (prefix, arm_handle, const struct GNUNET_ARM_Handle) + + +GNUNET_TESTING_ARM_SIMPLE_TRAITS (GNUNET_TESTING_MAKE_DECL_SIMPLE_TRAIT, + GNUNET_TESTING_ARM) + + +#endif diff --git a/src/include/gnunet_testing_testbed_lib.h b/src/include/gnunet_testing_testbed_lib.h @@ -0,0 +1,42 @@ +#ifndef GNUNET_TESTING_TESTBED_LIB_H +#define GNUNET_TESTING_TESTBED_LIB_H + +#include "gnunet_testing_lib.h" +#include "gnunet_testbed_lib.h" + +/** + * This command destroys the ressources allocated for the test system setup. + * + * @param label Name for command. + * @param create_label Label of the cmd which started the test system. + * @param write_message Callback to write messages to the master loop. + * @return command. + */ +struct GNUNET_TESTING_Command +GNUNET_TESTBED_cmd_system_destroy (const char *label, + const char *create_label); + +/** + * This command is setting up a test environment for a peer to start. + * + * @param label Name for command. + * @param testdir Only the directory name without any path. Temporary + * directory used for all service homes. + */ +struct GNUNET_TESTING_Command +GNUNET_TESTBED_cmd_system_create (const char *label, + const char *testdir); + + +/** + * Call #op on all simple traits. + */ +#define GNUNET_TESTING_TESTBED_SIMPLE_TRAITS(op, prefix) \ + op (prefix, test_system, const struct GNUNET_TESTBED_System) + + +GNUNET_TESTING_TESTBED_SIMPLE_TRAITS (GNUNET_TESTING_MAKE_DECL_SIMPLE_TRAIT, + GNUNET_TESTING_TESTBED) + + +#endif diff --git a/src/service/arm/testing_arm_cmd_start_peer.c b/src/service/arm/testing_arm_cmd_start_peer.c @@ -27,8 +27,7 @@ #include "gnunet_util_lib.h" #include "gnunet_testing_lib.h" #include "gnunet_testbed_lib.h" -#include "gnunet_transport_testing_ng_lib.h" -#include "transport-testing-cmds.h" +#include "gnunet_testing_transport_lib.h" /**