GNUnet  0.11.x
gnunet_testbed_ng_service.h
Go to the documentation of this file.
1 /*
2  This file is part of GNUnet
3  Copyright (C) 2021 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 
35 #ifndef GNUNET_TESTBED_NG_SERVICE_H
36 #define GNUNET_TESTBED_NG_SERVICE_H
37 
38 #include "gnunet_util_lib.h"
39 #include "gnunet_testing_ng_lib.h"
40 
41 struct TngState;
42 
44 {
48  const char *controller_label;
49 
54 
58  const char *hostname;
59 
63  const char *username;
64 
68  uint16_t port;
69 
76 
81 
86 
91 
96 
101 
106 };
107 
109 {
116  const char *trusted_ip;
117 
121  const char *hostname;
122 
126  const char *username;
127 
131  uint16_t port;
132 
139 
144 
149 
154 
158  uint64_t event_mask;
159 
164 
169 
174 
179 
184 };
185 
193 int
195  struct GNUNET_TESTBED_Controller **
196  controller);
197 
200  const char *trusted_ip,
201  const char *hostname,
202  const char *username,
203  uint16_t port,
205  uint64_t event_mask);
206 
207 void
209 
210 void
212 
213 void
215 
216 #endif
struct GNUNET_TESTBED_Peer * peer
Peer to start.
struct GNUNET_TESTING_Interpreter * is
Interpreter state.
Handle to interact with a GNUnet testbed controller.
Definition: testbed_api.h:193
int GNUNET_TESTBED_get_trait_controller(const struct GNUNET_TESTING_Command *cmd, struct GNUNET_TESTBED_Controller **controller)
Offer data from trait.
int peer_going_down
Flag indicating controller is going down.
int host_ready
Flag indicating if host create with controller is ready.
const char * username
Username to use for the login; may be NULL.
const char * label
Label for the command.
struct GNUNET_SCHEDULER_Task * abort_task
Abort task identifier.
struct GNUNET_TESTING_Command GNUNET_TESTBED_cmd_controller(const char *label, const char *trusted_ip, const char *hostname, const char *username, uint16_t port, struct GNUNET_CONFIGURATION_Handle *cfg, uint64_t event_mask)
A command to be run by the interpreter.
void GNUNET_TESTBED_shutdown_service(struct TngState *ss)
Shutdown nicely.
const char * username
Username to use for the login; may be NULL.
uint16_t port
Port number to use for ssh; use 0 to let ssh decide.
struct GNUNET_TESTBED_Operation * operation
Handle to operation.
void GNUNET_TESTBED_shutdown_peer(struct PeerCmdState *ps)
Shutdown nicely.
Opaque handle to a host running experiments managed by the testing framework.
Handle for controller process.
uint16_t port
Port number to use for ssh; use 0 to let ssh decide.
struct GNUNET_TESTING_Interpreter * is
Interpreter state.
Opaque handle to an abstract operation to be executed by the testing framework.
struct GNUNET_TESTBED_HostRegistrationHandle * reg_handle
Handle for host registration.
struct GNUNET_CONFIGURATION_Handle * cfg
The configuration to use as a template while starting a controller on this host.
int controller_going_down
Flag indicating controller is going down.
Global state of the interpreter, used by a command to access information about other commands...
Definition: testing.h:34
const char * controller_label
The label of a controller command.
struct GNUNET_TESTBED_Host * host
The host to run peers and controllers on.
struct GNUNET_TESTBED_Host * host
The host to run peers and controllers on.
int peer_ready
Flag indicating if peer is ready.
uint64_t event_mask
Global event mask for all testbed events.
struct GNUNET_TESTBED_ControllerProc * cp
The controller process.
struct GNUNET_SCHEDULER_Task * abort_task
Abort task identifier.
struct GNUNET_CONFIGURATION_Handle * cfg
The configuration to use as a template while starting a controller on this host.
uint64_t event_mask
A bit mask with set of events to call the controller for.
configuration data
Definition: configuration.c:84
Entry in list of pending tasks.
Definition: scheduler.c:134
handle for host registration
A peer controlled by the testing framework.
void GNUNET_TESTBED_shutdown_controller(struct ControllerState *cs)
Shutdown nicely.
const char * hostname
Name of the host, use "NULL" for localhost.
const char * hostname
Name of the host, use "NULL" for localhost.
struct GNUNET_TESTBED_Controller * controller
The controller handle.
const char * trusted_ip
The ip address of the controller which will be set as TRUSTED HOST(all connections form this ip are p...