aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_transport_testing_ng_lib.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/gnunet_transport_testing_ng_lib.h')
-rw-r--r--src/include/gnunet_transport_testing_ng_lib.h81
1 files changed, 81 insertions, 0 deletions
diff --git a/src/include/gnunet_transport_testing_ng_lib.h b/src/include/gnunet_transport_testing_ng_lib.h
new file mode 100644
index 000000000..72ec11eaf
--- /dev/null
+++ b/src/include/gnunet_transport_testing_ng_lib.h
@@ -0,0 +1,81 @@
1/*
2 This file is part of GNUnet
3 Copyright (C) 2021-2023 GNUnet e.V.
4
5 GNUnet is free software: you can redistribute it and/or modify it
6 under the terms of the GNU Affero General Public License as published
7 by the Free Software Foundation, either version 3 of the License,
8 or (at your option) any later version.
9
10 GNUnet is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Affero General Public License for more details.
14
15 You should have received a copy of the GNU Affero General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17
18 SPDX-License-Identifier: AGPL3.0-or-later
19 */
20
21/**
22 * @brief API for cmds working with transport sub system.
23 * @author t3sserakt
24 */
25#ifndef GNUNET_TRANSPORT_TESTING_NG_LIB_H
26#define GNUNET_TRANSPORT_TESTING_NG_LIB_H
27
28
29#include "gnunet_util_lib.h"
30#include "gnunet_testing_lib.h"
31
32
33/**
34 * Create command.
35 *
36 * @param label name for command.
37 * @param system_label Label of the cmd to setup a test environment.
38 * @param no Decimal number representing the last byte of the IP address of this peer.
39 * @param node_ip The IP address of this node.
40 * @param cfgname Configuration file name for this peer.
41 * @param broadcast Flag indicating, if broadcast should be switched on.
42 * @return command.
43 */
44struct GNUNET_TESTING_Command
45GNUNET_TESTING_cmd_start_peer (const char *label,
46 const char *system_label,
47 uint32_t no,
48 const char *node_ip,
49 const char *cfgname,
50 unsigned int broadcast);
51
52
53struct GNUNET_TESTING_Command
54GNUNET_TESTING_cmd_stop_peer (const char *label,
55 const char *start_label);
56
57
58/**
59 * Create command
60 *
61 * @param label name for command
62 * @param start_peer_label Label of the cmd to start a peer.
63 * @param create_label Label of the cmd which started the test system.
64 * @param num Number globally identifying the node.
65 * @param topology The topology for the test setup.
66 * @param additional_connects Number of additional connects this cmd will wait for not triggered by this cmd.
67 * @return command.
68 */
69struct GNUNET_TESTING_Command
70GNUNET_CORE_cmd_connect_peers (
71 const char *label,
72 const char *start_peer_label,
73 const char *create_label,
74 uint32_t num,
75 struct GNUNET_TESTING_NetjailTopology *topology,
76 unsigned int additional_connects,
77 unsigned int wait_for_connect,
78 struct GNUNET_MQ_MessageHandler *handlers);
79
80
81#endif