45 #define LOG(kind, ...) GNUNET_log_from (kind, "testbed-api-hosts", __VA_ARGS__); 50 #define LOG_DEBUG(...) LOG (GNUNET_ERROR_TYPE_DEBUG, __VA_ARGS__); 55 #define API_VIOLATION(cond, errstr) \ 60 LOG (GNUNET_ERROR_TYPE_ERROR, "API violation detected: %s\n", errstr); \ 68 #define LOG_GAI(level, cmd, rc) \ 72 _ ("`%s' failed at %s:%d with error: %s\n"), \ 82 #define HOST_LIST_GROW_STEP 10 193 return host_list[
id];
335 unsigned int new_size;
346 host->
port = (0 ==
port) ? 22 : port;
352 while (
id >= new_size)
358 host_list[
id] = host;
380 static uint32_t uid_generator;
382 if (NULL == hostname)
419 regmatch_t pmatch[6];
438 _ (
"Hosts file %s has no data\n"),
447 _ (
"Hosts file %s cannot be read\n"),
453 starting_host = NULL;
457 "^(([[:alnum:]]+)@)?" 458 "([[:alnum:]]+[-[:alnum:]_\\.]+)" 459 "(:([[:digit:]]{1,5}))?",
460 REG_EXTENDED | REG_ICASE));
461 while (offset < (fs - 1))
464 if (((data[offset] ==
'\n')) && (buf != &data[offset]))
472 if ((REG_NOMATCH == regexec (&rex, buf, 6, pmatch, 0)) ||
473 (-1 == pmatch[3].rm_so))
476 "Error reading line `%s' in hostfile\n",
478 buf = &data[offset + 1];
481 if (-1 != pmatch[2].rm_so)
483 size = pmatch[2].rm_eo - pmatch[2].rm_so;
488 if (-1 != pmatch[5].rm_so)
490 (void) sscanf (buf + pmatch[5].rm_so,
"%5hd", &port);
492 size = pmatch[3].rm_eo - pmatch[3].rm_so;
497 "Successfully read host %s, port %d and user %s from file\n",
498 (NULL == hostname) ?
"NULL" : hostname,
500 (NULL == username) ?
"NULL" : username);
503 if (NULL == starting_host)
511 buf = &data[offset + 1];
513 else if ((data[offset] ==
'\n') || (data[offset] ==
'\0'))
514 buf = &data[offset + 1];
518 if (NULL == starting_host)
537 struct addrinfo *
res;
538 const struct sockaddr_in *in_addr;
540 struct addrinfo hint;
543 hint.ai_family = AF_INET;
544 hint.ai_socktype = 0;
545 hint.ai_protocol = 0;
548 hint.ai_canonname = NULL;
553 if (0 != (rc = getaddrinfo (host,
"22", &hint, &res)))
560 GNUNET_assert (
sizeof(
struct sockaddr_in) == res->ai_addrlen);
561 in_addr = (
const struct sockaddr_in *) res->ai_addr;
562 hostip = inet_ntoa (in_addr->sin_addr);
565 LOG_DEBUG (
"Resolved [%s] to [%s]\n", host, hostip);
587 #if ! ENABLE_SUPERMUC 589 _ (
"The function %s is only available when compiled with (--with-ll)\n"),
593 const char *hostfile;
595 if (NULL == (hostfile =
getenv (
"MP_SAVEHOSTFILE")))
616 host_list[host->
id] = NULL;
637 if (NULL != host_list[
id])
641 if (NULL != host_list[
id])
664 for (rc = host->
rc_head; NULL != rc; rc = rc->
next)
691 for (rc = host->
rc_head; NULL != rc; rc = rc->
next)
718 for (rc = host->
rc_head; NULL != rc; rc = rc->
next)
784 for (argp = 0; NULL != argv[argp]; argp++)
787 for (argp = 0; NULL != argv[argp]; argp++)
810 for (cnt = 0; NULL != argv1[cnt]; cnt++)
815 for (cnt = 0; NULL != argv2[cnt]; cnt++)
835 for (argp = 0; NULL != argv[argp]; argp++)
858 static const char *default_ssh_args[] =
863 "NoHostAuthenticationForLocalhost=yes",
865 "StrictHostKeyChecking=no",
867 "PasswordAuthentication=no",
879 if (NULL != (ssh_cmd =
getenv (
"GNUNET_TESTBED_RSH_CMD")))
882 ssh_cmd_cp = ssh_cmd;
883 for (size = 0; NULL != (arg = strtok (ssh_cmd,
" ")); ssh_cmd = NULL)
890 size = (
sizeof(default_ssh_args)) / (
sizeof(
const char *));
893 for (cnt = 0; cnt <
size; cnt++)
943 unsigned int append_cnt;
947 if (NULL != (rshell_cmd =
getenv (
"GNUNET_TESTBED_RSH_CMD_SUFFIX")))
950 rshell_cmd_cp = rshell_cmd;
951 for (; NULL != (arg = strtok (rshell_cmd,
" ")); rshell_cmd = NULL)
955 if (NULL != append_args)
957 for (append_cnt = 0; NULL != append_args[append_cnt]; append_cnt++)
995 xconfig_size = (uLongf) (ntohs (msg->
header.
size)
1000 (
const Bytef *) &msg[1],
1012 hostname =
"localhost";
1107 "Host is already locked by a previous call to GNUNET_TESTBED_controller_start()");
1111 "Attempting to start a controller on a host which is already started a controller");
1124 char *helper_binary_path_args[2];
1126 char **rsh_suffix_args;
1127 const char *username;
1136 LOG_DEBUG (
"Starting remote connection to destination %s\n", hostname);
1140 "HELPER_BINARY_PATH",
1141 &helper_binary_path_args[0]))
1142 helper_binary_path_args[0] =
1144 helper_binary_path_args[1] = NULL;
1149 join_argv ((
const char **) rsh_args, (
const char **) rsh_suffix_args);
1154 for (cnt = 0; NULL != cp->
helper_argv[cnt]; cnt++)
1161 LOG_DEBUG (
"Helper cmd str: %s\n", argstr);
1205 if (NULL != cproc->
helper)
1218 if (NULL != cproc->
helper)
1327 if (NULL != h->
auxp)
1335 cb (cb_cls, host, ret);
1359 char **rsh_suffix_args;
1372 "HELPER_BINARY_PATH",
1379 stat_args[0] =
"stat";
1380 stat_args[2] = NULL;
1384 join_argv ((
const char **) rsh_args, (
const char **) rsh_suffix_args);
1393 if (NULL == h->
auxp)
1444 const char *username;
1455 if (NULL != controller->
rh)
1461 "Host hostname: %s already registered\n",
1462 (NULL == hostname) ?
"localhost" : hostname);
1471 controller->
rh = rh;
1473 username_length = 0;
1474 if (NULL != username)
1475 username_length = strlen (username);
1477 hostname_length = strlen (hostname);
1485 msg_size += cc_size;
1492 if (NULL != username)
1523 if (handle != handle->
c->
rh)
1528 handle->
c->
rh = NULL;
1561 hostname = (
char *) host->
hostname;
struct GNUNET_OS_Process * auxp
The process handle for the SSH process.
#define GNUNET_CONTAINER_DLL_remove(head, tail, element)
Remove an element from a DLL.
int GNUNET_HELPER_kill(struct GNUNET_HELPER_Handle *h, int soft_kill)
Sends termination signal to the helper process.
void GNUNET_TESTBED_cancel_registration(struct GNUNET_TESTBED_HostRegistrationHandle *handle)
Cancel the pending registration.
struct GNUNET_TESTBED_HelperInit * GNUNET_TESTBED_create_helper_init_msg_(const char *trusted_ip, const char *hostname, const struct GNUNET_CONFIGURATION_Handle *cfg)
Creates a helper initialization message.
enum GNUNET_GenericReturnValue GNUNET_CONFIGURATION_deserialize(struct GNUNET_CONFIGURATION_Handle *cfg, const char *mem, size_t size, const char *basedir)
De-serializes configuration.
When this flag is set, the child process will inherit stderr of the parent.
uint16_t username_length
Number of bytes in the user name that follows; 0 to use no user name; otherwise 'strlen (username)'...
struct GNUNET_MessageHeader * msg
char ** helper_argv
The arguments used to start the helper.
struct GNUNET_TESTBED_HostHabitableCheckHandle * GNUNET_TESTBED_is_host_habitable(const struct GNUNET_TESTBED_Host *host, const struct GNUNET_CONFIGURATION_Handle *config, GNUNET_TESTBED_HostHabitableCallback cb, void *cb_cls)
Checks whether a host can be used to start testbed service.
struct GNUNET_OS_Process * GNUNET_OS_start_process_vap(enum GNUNET_OS_InheritStdioFlags std_inheritance, struct GNUNET_DISK_PipeHandle *pipe_stdin, struct GNUNET_DISK_PipeHandle *pipe_stdout, struct GNUNET_DISK_PipeHandle *pipe_stderr, const char *filename, char *const argv[])
Start a process.
internal API to access the 'operations' subsystem
static const struct GNUNET_CONFIGURATION_Handle * cfg
Configuration we are using.
#define GNUNET_array_append(arr, len, element)
Append an element to an array (growing the array by one).
Handle to interact with a GNUnet testbed controller.
int locked
Is this host locked by GNUNET_TESTBED_controller_start()?
void GNUNET_TESTBED_mark_host_registered_at_(struct GNUNET_TESTBED_Host *host, const struct GNUNET_TESTBED_Controller *const controller)
Marks a host as registered with a controller.
void GNUNET_OS_process_destroy(struct GNUNET_OS_Process *proc)
Cleans up process structure contents (OS-dependent) and deallocates it.
struct GNUNET_TESTBED_Host * GNUNET_TESTBED_host_create_by_id_(uint32_t id, const struct GNUNET_CONFIGURATION_Handle *cfg)
Create a host by ID; given this host handle, we could not run peers at the host, but we can talk abou...
void GNUNET_TESTBED_is_host_habitable_cancel(struct GNUNET_TESTBED_HostHabitableCheckHandle *handle)
Function to cancel a request started using GNUNET_TESTBED_is_host_habitable()
struct GNUNET_TESTBED_Host * GNUNET_TESTBED_host_create_with_id(uint32_t id, const char *hostname, const char *username, const struct GNUNET_CONFIGURATION_Handle *cfg, uint16_t port)
Create a host to run peers and controllers on.
int GNUNET_OS_process_status(struct GNUNET_OS_Process *proc, enum GNUNET_OS_ProcessStatusType *type, unsigned long *code)
Retrieve the status of a process.
The handle to a helper process.
struct GNUNET_HELPER_Handle * GNUNET_HELPER_start(int with_control_pipe, const char *binary_name, char *const binary_argv[], GNUNET_MessageTokenizerCallback cb, GNUNET_HELPER_ExceptionCallback exp_cb, void *cb_cls)
Starts a helper and begins reading from it.
struct GNUNET_TESTBED_Host * host
The host being registered.
const struct GNUNET_TESTBED_Host * host
The host to check.
void GNUNET_TESTBED_controller_kill_(struct GNUNET_TESTBED_ControllerProc *cproc)
Sends termination signal to the controller's helper process.
#define HELPER_TESTBED_BINARY
Testbed Helper binary name.
struct GNUNET_HELPER_Handle * helper
The process handle.
struct GNUNET_TESTBED_HostRegistrationHandle * rh
The host registration handle; NULL if no current registration requests are present.
void * cb_cls
The callback closure.
#define GNUNET_assert(cond)
Use this for fatal errors that cannot be handled.
void GNUNET_TESTBED_host_queue_oc_(struct GNUNET_TESTBED_Host *h, struct GNUNET_TESTBED_Operation *op)
Queues the given operation in the queue for parallel overlay connects of the given host...
struct GNUNET_HELPER_SendHandle * shandle
The send handle for the helper.
Notify the service about a host that we intend to use.
struct GNUNET_SCHEDULER_Task * habitability_check_task
Task id for the habitability check task.
uint16_t config_size
The length of the uncompressed configuration.
struct OperationQueue * opq_parallel_overlay_connect_operations
Operation queue for simultaneous overlay connect operations target at this host.
void GNUNET_TESTBED_controller_stop(struct GNUNET_TESTBED_ControllerProc *cproc)
Stop the controller process (also will terminate all peers and controllers dependent on this controll...
static char ** gen_rsh_args(const char *port, const char *hostname, const char *username)
Generates arguments for opening a remote shell.
uint16_t hostname_length
Number of bytes in the host name (excluding 0-termination) that follows the user name; cannot be 0...
int controller_started
Is a controller started on this host? FIXME: Is this needed?
Entry in the queue of messages we need to transmit to the helper.
#define GNUNET_memcpy(dst, src, n)
Call memcpy() but check for n being 0 first.
static int ret
Return value of the commandline.
void GNUNET_TESTBED_deregister_host_at_(struct GNUNET_TESTBED_Host *host, const struct GNUNET_TESTBED_Controller *const controller)
Unmarks a host registered at a controller.
A list entry for registered controllers list.
static struct GNUNET_IDENTITY_Handle * id
Handle to identity service.
#define LOG(kind,...)
Generic logging shorthand.
#define GNUNET_new(type)
Allocate a struct or union of the given type.
enum GNUNET_GenericReturnValue GNUNET_CONFIGURATION_get_value_filename(const struct GNUNET_CONFIGURATION_Handle *cfg, const char *section, const char *option, char **value)
Get a configuration value that should be the name of a file or directory.
struct GNUNET_CONFIGURATION_Handle * GNUNET_CONFIGURATION_create(void)
Create a new configuration object.
void GNUNET_TESTBED_host_replace_cfg_(struct GNUNET_TESTBED_Host *host, const struct GNUNET_CONFIGURATION_Handle *new_cfg)
Function to replace host's configuration.
Opaque handle to a host running experiments managed by the testing framework.
void GNUNET_TESTBED_operation_queue_insert_(struct OperationQueue *queue, struct GNUNET_TESTBED_Operation *op)
Add an operation to a queue.
Initialization message for gnunet-helper-testbed to start testbed service.
Handle for controller process.
#define GNUNET_strdup(a)
Wrapper around GNUNET_xstrdup_.
struct OperationQueue * GNUNET_TESTBED_operation_queue_create_(enum OperationQueueType type, unsigned int max_active)
Create an operation queue.
void * cc_cls
The closure for above callback.
#define GNUNET_break(cond)
Use this for internal assertion violations that are not fatal (can be handled) but should not occur...
static struct GNUNET_ARM_Handle * h
Connection with ARM.
Opaque handle to an abstract operation to be executed by the testing framework.
GNUNET_TESTBED_HostHabitableCallback cb
The callback to call once we have the status.
void(* GNUNET_TESTBED_HostRegistrationCompletion)(void *cls, const char *emsg)
Callback which will be called to after a host registration succeeded or failed.
void(* GNUNET_TESTBED_ControllerStatusCallback)(void *cls, const struct GNUNET_CONFIGURATION_Handle *cfg, int status)
Callback to signal successful startup of the controller process.
struct RegisteredController * rc_head
The head for the list of controllers where this host is registered.
static void clear_msg(void *cls, int result)
Continuation function from GNUNET_HELPER_send()
struct GNUNET_SCHEDULER_Task * GNUNET_SCHEDULER_add_delayed(struct GNUNET_TIME_Relative delay, GNUNET_SCHEDULER_TaskCallback task, void *task_cls)
Schedule a new task to be run with a specified delay.
struct GNUNET_CONFIGURATION_Handle * cfg
the configuration to use as a template while starting a controller on this host.
#define GNUNET_array_grow(arr, size, tsize)
Grow a well-typed (!) array.
void GNUNET_HELPER_send_cancel(struct GNUNET_HELPER_SendHandle *sh)
Cancel a GNUNET_HELPER_send operation.
const char * GNUNET_TESTBED_host_get_username_(const struct GNUNET_TESTBED_Host *host)
Obtain the host's username.
struct RegisteredController * next
The next ptr for DLL.
#define GNUNET_realloc(ptr, size)
Wrapper around realloc.
struct RegisteredController * rc_tail
The tail for the list of controllers where this host is registered.
static void free_argv(char **argv)
Frees the given NULL terminated arguments.
const char * simple_resolve(const char *host)
Resolves a hostname using getaddrinfo.
GNUNET_OS_ProcessStatusType
Process status types.
void GNUNET_TESTBED_host_resolve_(struct GNUNET_TESTBED_Host *host)
Resolves the hostname of the host to an ip address.
void(* GNUNET_TESTBED_HostHabitableCallback)(void *cls, const struct GNUNET_TESTBED_Host *host, int status)
Callbacks of this type are called by GNUNET_TESTBED_is_host_habitable to inform whether the given hos...
The handle for whether a host is habitable or not.
static void helper_exp_cb(void *cls)
Callback that will be called when the helper process dies.
void GNUNET_CONFIGURATION_destroy(struct GNUNET_CONFIGURATION_Handle *cfg)
Destroy configuration object.
static const struct GNUNET_CONFIGURATION_Handle * config
static char ** copy_argv(const char *const *argv)
Function to copy NULL terminated list of arguments.
#define GNUNET_MESSAGE_TYPE_TESTBED_ADD_HOST
Message to add host.
static struct GNUNET_DNS_Handle * handle
Handle to transport service.
static int result
Global testing status.
void GNUNET_CONFIGURATION_set_value_string(struct GNUNET_CONFIGURATION_Handle *cfg, const char *section, const char *option, const char *value)
Set a configuration value that should be a string.
uint32_t GNUNET_TESTBED_host_get_id_(const struct GNUNET_TESTBED_Host *host)
Obtain the host's unique global ID.
uint32_t id
Global ID we use to refer to a host on the network.
static struct GNUNET_TIME_Relative wait_time
How long to wait before triggering next round? Default: 60 s.
struct GNUNET_TIME_Relative wait_time
How long we wait before checking the process status.
struct RegisteredController * prev
The prev ptr for DLL.
#define LOG_GAI(level, cmd, rc)
Log an error message at log-level 'level' that indicates a failure of the command 'cmd' with the mess...
static char ** argv2
The arguments including the binary to spawn.
const struct GNUNET_CONFIGURATION_Handle * GNUNET_TESTBED_host_get_cfg_(const struct GNUNET_TESTBED_Host *host)
Obtain the host's configuration template.
void GNUNET_TESTBED_controller_destroy_(struct GNUNET_TESTBED_ControllerProc *cproc)
Cleans-up the controller's helper process handle.
uint16_t port
The port which is to be used for SSH.
Reply message from helper process.
int int GNUNET_asprintf(char **buf, const char *format,...) __attribute__((format(printf
Like asprintf, just portable.
void GNUNET_TESTBED_operation_queue_destroy_(struct OperationQueue *queue)
Destroys an operation queue.
#define GNUNET_free_nz(ptr)
Wrapper around free.
#define GNUNET_MESSAGE_TYPE_TESTBED_HELPER_REPLY
The reply message from gnunet-testbed-helper.
#define LOG_DEBUG(...)
Debug logging shorthand.
static char ** join_argv(const char *const *argv1, const char *const *argv2)
Function to join NULL terminated list of arguments.
uint32_t host_id
Unique ID for the host (in NBO).
struct GNUNET_TESTBED_Host * GNUNET_TESTBED_host_create(const char *hostname, const char *username, const struct GNUNET_CONFIGURATION_Handle *cfg, uint16_t port)
Create a host to run peers and controllers on.
int GNUNET_TESTBED_host_controller_started(const struct GNUNET_TESTBED_Host *host)
Check whether a controller is already started on the given host.
const char * username
The username to be used for SSH login.
int GNUNET_TESTBED_is_host_registered_(const struct GNUNET_TESTBED_Host *host, const struct GNUNET_TESTBED_Controller *const controller)
Checks whether a host has been registered.
void GNUNET_TESTBED_host_destroy(struct GNUNET_TESTBED_Host *host)
Destroy a host handle.
GNUNET_TESTBED_ControllerStatusCallback cb
The controller error callback.
static unsigned int size
Size of the "table".
const struct GNUNET_TESTBED_Controller * controller
The controller at which this host is registered.
void GNUNET_TESTBED_queue_message_(struct GNUNET_TESTBED_Controller *controller, struct GNUNET_MessageHeader *msg)
Queues a message in send queue for sending to the service.
#define API_VIOLATION(cond, errstr)
Prints API violation message.
#define HOST_LIST_GROW_STEP
Number of extra elements we create space for when we grow host list.
struct GNUNET_MessageHeader header
Type is GNUNET_MESSAGE_TYPE_TESTBED_HELPER_REPLY.
struct GNUNET_MessageHeader header
Type is GNUNET_MESSAGE_TYPE_TESTBED_ADD_HOST.
struct GNUNET_TESTBED_Controller * c
The controller at which this host is being registered.
#define GNUNET_CONTAINER_DLL_insert_tail(head, tail, element)
Insert an element at the tail of a DLL.
const char * hostname
The hostname of the host; NULL for localhost.
#define GNUNET_TIME_STD_BACKOFF(r)
Perform our standard exponential back-off calculation, starting at 1 ms and then going by a factor of...
static struct GNUNET_FS_Handle * fs
Handle to FS service.
GNUNET_TESTBED_HostRegistrationCompletion cc
The Registartion completion callback.
struct GNUNET_CONFIGURATION_Handle * GNUNET_CONFIGURATION_dup(const struct GNUNET_CONFIGURATION_Handle *cfg)
Duplicate an existing configuration object.
size_t GNUNET_TESTBED_compress_config_(const char *config, size_t size, char **xconfig)
Compresses given configuration using zlib compress.
Interface for functions internally exported from testbed_api.c.
char * GNUNET_CONFIGURATION_serialize(const struct GNUNET_CONFIGURATION_Handle *cfg, size_t *size)
Serializes the given configuration.
enum GNUNET_GenericReturnValue GNUNET_DISK_file_size(const char *filename, uint64_t *size, int include_symbolic_links, int single_file_mode)
Get the size of the file (or directory) of the given file (in bytes).
Queue of operations where we can only support a certain number of concurrent operations of a particul...
const char * GNUNET_TESTBED_host_get_hostname(const struct GNUNET_TESTBED_Host *host)
Obtain the host's hostname.
static char * hostname
Our hostname; we give this to all the peers we start.
struct GNUNET_TESTBED_Host * host
The host where the helper is run.
void GNUNET_HELPER_destroy(struct GNUNET_HELPER_Handle *h)
Free's the resources occupied by the helper handle.
int GNUNET_OS_process_wait(struct GNUNET_OS_Process *proc)
Wait for a process to terminate.
static unsigned int host_list_size
The size of the available hosts list.
static uint16_t port
Port number.
void * cls
The closure for the above callback.
static void habitability_check(void *cls)
Task for checking whether a host is habitable or not.
unsigned int GNUNET_TESTBED_hosts_load_from_loadleveler(const struct GNUNET_CONFIGURATION_Handle *cfg, struct GNUNET_TESTBED_Host ***hosts)
Loads the set of host allocated by the LoadLeveler Job Scheduler.
struct GNUNET_HELPER_SendHandle * GNUNET_HELPER_send(struct GNUNET_HELPER_Handle *h, const struct GNUNET_MessageHeader *msg, int can_drop, GNUNET_HELPER_Continuation cont, void *cont_cls)
Send an message to the helper.
#define GNUNET_log(kind,...)
Entry in list of pending tasks.
int GNUNET_HELPER_wait(struct GNUNET_HELPER_Handle *h)
Reap the helper process.
char * GNUNET_OS_get_libexec_binary_path(const char *progname)
Given the name of a gnunet-helper, gnunet-service or gnunet-daemon binary, try to prefix it with the ...
handle for host registration
enum GNUNET_TESTBED_UnderlayLinkModelType type
the type of this model
uint16_t GNUNET_TESTBED_host_get_ssh_port_(const struct GNUNET_TESTBED_Host *host)
Obtain the host's ssh port.
static int helper_mst(void *cls, const struct GNUNET_MessageHeader *message)
Functions with this signature are called whenever a complete message is received by the tokenizer...
internal API to access the 'hosts' subsystem
Message formats for communication between testbed api and gnunet-helper-testbed process.
char ** helper_argv
The arguments used to start the helper.
static struct GNUNET_ARM_Operation * op
Current operation.
uint32_t data
The data value.
Operation queue which adapts the number of operations to be active based on the operation completion ...
struct GNUNET_TESTBED_HostRegistrationHandle * GNUNET_TESTBED_register_host(struct GNUNET_TESTBED_Controller *controller, struct GNUNET_TESTBED_Host *host, GNUNET_TESTBED_HostRegistrationCompletion cc, void *cc_cls)
Register a host with the controller.
size_t GNUNET_strlcpy(char *dst, const char *src, size_t n)
Like strlcpy but portable.
uint16_t config_size
Size of the uncompressed configuration.
struct GNUNET_TESTBED_ControllerProc * GNUNET_TESTBED_controller_start(const char *trusted_ip, struct GNUNET_TESTBED_Host *host, GNUNET_TESTBED_ControllerStatusCallback cb, void *cls)
Starts a controller process at the given host.
enum GNUNET_GenericReturnValue GNUNET_DISK_file_test(const char *fil)
Check that fil corresponds to a filename (of a file that exists and that is not a directory)...
#define GNUNET_malloc(size)
Wrapper around malloc.
unsigned int GNUNET_TESTBED_hosts_load_from_file(const char *filename, const struct GNUNET_CONFIGURATION_Handle *cfg, struct GNUNET_TESTBED_Host ***hosts)
Load a set of hosts from a configuration file.
ssize_t GNUNET_DISK_fn_read(const char *fn, void *result, size_t len)
Read the contents of a binary file into a buffer.
uint16_t ssh_port
SSH port to use, 0 for default (in NBO).
struct GNUNET_MessageHeader header
Type is GNUNET_MESSAGE_TYPE_TESTBED_HELPER_INIT.
#define GNUNET_free(ptr)
Wrapper around free.
static struct GNUNET_TESTBED_Host ** host_list
Array of available hosts.
Time for relative time used by GNUnet, in microseconds.
struct GNUNET_TESTBED_Host * GNUNET_TESTBED_host_lookup_by_id_(uint32_t id)
Lookup a host by ID.
struct GNUNET_MessageHeader * msg
The message corresponding to send handle.
int GNUNET_OS_process_kill(struct GNUNET_OS_Process *proc, int sig)
Sends a signal to the process.
void * GNUNET_SCHEDULER_cancel(struct GNUNET_SCHEDULER_Task *task)
Cancel the task with the specified identifier.
static char ** gen_rsh_suffix_args(const char *const *append_args)
Generates the arguments needed for executing the given binary in a remote shell.