106 if (NULL != GST_host_list[host_id])
108 LOG_DEBUG (
"A host with id: %u already exists\n", host_id);
111 GST_host_list[host_id] = host;
125 uint64_t operation_id,
132 emsg_len = (NULL == emsg) ? 0 : strlen (emsg) + 1;
214 struct Slave *slave = cls;
221 "Registering host %u at %u successful\n",
255 "Queueing host registration for host %u at %u\n",
284 LOG_DEBUG (
"Relaying message with type: %u, size: %u\n",
311 "A forwarded operation has timed out\n");
314 "A forwarded operation has timed out");
343 GNUNET_array_grow (slist, n, n + 1); \ 344 GNUNET_memcpy (&slist[n - 1], &ss, \ 345 sizeof(struct GNUNET_TESTING_SharedService)); \ 351 for (; NULL != (arg = strtok (ss_str,
" ")); ss_str = NULL)
355 if (2 != sscanf (arg,
"%255[^:]:%u",
360 "Ignoring shared service spec: %s",
364 LOG_DEBUG (
"Will be sharing %s service among %u peers\n",
394 const char *controller_hostname;
398 controller_hostname = (
const char *) &msg[1];
399 if (
'\0' != controller_hostname[msize - 1])
420 const char *controller_hostname;
425 if (NULL != GST_context)
427 LOG_DEBUG (
"We are being connected to laterally\n");
431 controller_hostname = (
const char *) &msg[1];
446 GST_context->
client = client;
458 for (cnt = 0; NULL != ss[cnt].
service; cnt++)
460 ss_str = (
char *) ss[cnt].
service;
473 LOG_DEBUG (
"Created master context with host ID: %u\n",
490 uint16_t username_length;
491 uint16_t hostname_length;
494 msize = ntohs (msg->
header.
size) -
sizeof(
struct 499 if ((msize <= username_length) ||
500 (0 == hostname_length))
506 if (msize <= username_length + hostname_length)
534 uint16_t username_length;
535 uint16_t hostname_length;
543 if (0 != username_length)
547 ptr += username_length;
559 host_id = ntohl (msg->
host_id);
560 LOG_DEBUG (
"Received ADDHOST %u message\n", host_id);
561 LOG_DEBUG (
"-------host id: %u\n", host_id);
562 LOG_DEBUG (
"-------hostname: %s\n", hostname);
563 if (NULL != username)
564 LOG_DEBUG (
"-------username: %s\n", username);
566 LOG_DEBUG (
"-------username: <not given>\n");
585 emsg =
"A host exists with given host-id";
605 reply->
host_id = htonl (host_id);
649 GST_host_list[slave->
host_id])));
666 reply->
config_size = htons ((uint16_t) config_size);
685 while (NULL != (fopc = fopcq_head))
740 LOG_DEBUG (
"Shutting down testbed service\n");
758 if (NULL != GST_host_list[
id])
761 if (NULL != GST_context)
764 if (NULL != GST_context->
system)
775 GST_opq_openfds = NULL;
818 for (fopc = fopcq_head; NULL != fopc; fopc = fopcn)
821 if (fopc->
client == client)
828 if (NULL == GST_context)
830 if (client == GST_context->
client)
833 "Master client disconnected\n");
834 GST_context->
client = NULL;
857 unsigned long long num;
898 LOG_DEBUG (
"Testbed startup complete\n");
struct GNUNET_SCHEDULER_Task * timeout_task
Task ID for the timeout task.
#define GNUNET_CONTAINER_DLL_remove(head, tail, element)
Remove an element from a DLL.
Context to hold data of peer.
void GST_link_notify_disconnect(struct GNUNET_SERVICE_Client *client)
Clean up client handle if we stored any via handle_link_controllers(), the given client disconnected...
#define GNUNET_MESSAGE_TYPE_TESTBED_BARRIER_STATUS
Message for signalling status of a barrier.
Interface for the barrier initialisation handler routine.
#define GNUNET_MESSAGE_TYPE_TESTBED_SLAVE_CONFIGURATION
Message which contains the configuration of slave controller.
Confirmation from the service that adding a host worked (or failed).
Message to request configuration of a slave controller.
void GST_send_operation_fail_msg(struct GNUNET_SERVICE_Client *client, uint64_t operation_id, const char *emsg)
Send operation failure message to client.
uint16_t username_length
Number of bytes in the user name that follows; 0 to use no user name; otherwise 'strlen (username)'...
static struct GNUNET_SERVICE_Handle * service
Handle to our service instance.
struct GNUNET_MQ_Envelope * GNUNET_MQ_msg_copy(const struct GNUNET_MessageHeader *hdr)
Create a new envelope by copying an existing message.
unsigned int GST_host_list_size
The size of the host list.
#define GNUNET_MESSAGE_TYPE_TESTBED_LINK_CONTROLLERS
Message to link delegated controller to slave controller.
Message sent from host controller of a peer(A) to the host controller of another peer(B) to request B...
void GST_route_list_clear(void)
Cleans up the route list.
struct GNUNET_MessageHeader * msg
void GST_barriers_destroy()
Function to stop the barrier service.
static const struct GNUNET_CONFIGURATION_Handle * cfg
Configuration we are using.
struct GNUNET_MessageHeader header
Type is GNUNET_MESSAGE_TYPE_TESTBED_INIT.
void GST_notify_client_disconnect_oc(struct GNUNET_SERVICE_Client *client)
Notify OC subsystem that client disconnected.
Message to cancel a barrier.
uint32_t slave_id
The id of the host where the slave is running.
#define GNUNET_MESSAGE_TYPE_TESTBED_GET_SLAVE_CONFIGURATION
Message to request configuration of a slave controller.
Specification of a service that is to be shared among peers.
data structures shared amongst components of TESTBED service
Message sent from client to testing service to stop a peer.
void GST_clear_fopcq()
Clears the forwarded operations queue.
struct GNUNET_MQ_Handle * GNUNET_SERVICE_client_get_mq(struct GNUNET_SERVICE_Client *c)
Obtain the message queue of c.
Message sent from client to testing service to obtain the configuration of a peer.
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.
struct GNUNET_SCHEDULER_Task * GNUNET_SCHEDULER_add_shutdown(GNUNET_SCHEDULER_TaskCallback task, void *task_cls)
Schedule a new task to be run on shutdown, that is when a CTRL-C signal is received, or when GNUNET_SCHEDULER_shutdown() is being invoked.
void GST_stats_destroy(void)
Shutdown the status calls module.
Message sent from client to testing service to destroy a (stopped) peer.
#define GNUNET_MESSAGE_TYPE_TESTBED_STOP_PEER
Message to stop a peer at a host.
void GST_slave_list_clear()
Cleans up the slave list.
#define GNUNET_assert(cond)
Use this for fatal errors that cannot be handled.
Notify the service about a host that we intend to use.
uint64_t operation_id
Operation ID.
char * master_ip
The network address of the master controller.
struct OperationContext * opc
The generated operation context.
void GST_queue_host_registration(struct Slave *slave, GNUNET_TESTBED_HostRegistrationCompletion cb, void *cb_cls, struct GNUNET_TESTBED_Host *host)
Adds a host registration's request to a slave's registration queue.
#define GNUNET_MESSAGE_TYPE_TESTBED_SHUTDOWN_PEERS
A controller receiving this message floods it to its directly-connected sub-controllers and then stop...
static void add_host(const char *hostname, uint16_t rec_type, const void *data, size_t data_size)
Add information about a host from /etc/hosts to our cache.
uint16_t hostname_length
Number of bytes in the host name (excluding 0-termination) that follows the user name; cannot be 0...
uint16_t config_size
The size of the configuration when uncompressed.
Operation queue which permits a fixed maximum number of operations to be active at any time...
struct GNUNET_TESTING_System * system
The TESTING system handle for starting peers locally.
#define GNUNET_memcpy(dst, src, n)
Call memcpy() but check for n being 0 first.
#define GNUNET_MQ_hd_fixed_size(name, code, str, ctx)
Stop and destroy all peers.
#define GNUNET_MQ_msg(mvar, type)
Allocate a GNUNET_MQ_Envelope.
enum GNUNET_GenericReturnValue GNUNET_CONFIGURATION_get_value_number(const struct GNUNET_CONFIGURATION_Handle *cfg, const char *section, const char *option, unsigned long long *number)
Get a configuration value that should be a number.
unsigned int GST_peer_list_size
The size of the peer list.
static void register_next_host(struct Slave *slave)
Attempts to register the next host in the host registration queue.
#define GNUNET_MESSAGE_TYPE_TESTBED_ADD_HOST_SUCCESS
Message to signal that a add host succeeded.
static struct GNUNET_IDENTITY_Handle * id
Handle to identity service.
#define GNUNET_new(type)
Allocate a struct or union of the given type.
static void * client_connect_cb(void *cls, struct GNUNET_SERVICE_Client *client, struct GNUNET_MQ_Handle *mq)
Callback for client connect.
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.
Structure representing a connected(directly-linked) controller.
static struct GNUNET_TESTING_SharedService * parse_shared_services(char *ss_str, struct GNUNET_CONFIGURATION_Handle *cfg)
Parse service sharing specification line.
struct GNUNET_TESTBED_HostRegistrationHandle * rhandle
The current host registration handle.
Opaque handle to a host running experiments managed by the testing framework.
Event notification from a controller to a client.
Initial message from a client to a testing control service.
void GST_free_mctxq(void)
Frees the ManageServiceContext queue.
enum GNUNET_GenericReturnValue GNUNET_CONFIGURATION_get_value_string(const struct GNUNET_CONFIGURATION_Handle *cfg, const char *section, const char *option, char **value)
Get a configuration value that should be a string.
#define GNUNET_strdup(a)
Wrapper around GNUNET_xstrdup_.
#define GNUNET_MESSAGE_TYPE_TESTBED_MANAGE_PEER_SERVICE
Message to start/stop a service of a peer.
struct GNUNET_CONFIGURATION_Handle * GNUNET_TESTBED_extract_config_(const struct GNUNET_MessageHeader *msg)
Generates configuration by uncompressing configuration in given message.
void GST_free_nccq()
Function to cleanup the neighbour connect contexts.
struct OperationQueue * GNUNET_TESTBED_operation_queue_create_(enum OperationQueueType type, unsigned int max_active)
Create an operation queue.
int32_t event_type
'enum GNUNET_TESTBED_EventType' (in NBO); GNUNET_TESTBED_ET_OPERATION_FINISHED.
#define GNUNET_break(cond)
Use this for internal assertion violations that are not fatal (can be handled) but should not occur...
struct OperationQueue * GST_opq_openfds
Operation queue for open file descriptors.
#define GST_array_grow_large_enough(ptr, size, accommodate_size)
Similar to GNUNET_array_grow(); however instead of calling GNUNET_array_grow() several times we call ...
void GST_forwarded_operation_reply_relay(void *cls, const struct GNUNET_MessageHeader *msg)
Callback to relay the reply msg of a forwarded operation back to the client.
unsigned int GST_slave_list_size
The size of directly linked neighbours list.
void GST_forwarded_operation_timeout(void *cls)
Task to free resources when forwarded operation has been timed out.
Message sent from client to testing service to start a peer.
void(* GNUNET_TESTBED_HostRegistrationCompletion)(void *cls, const char *emsg)
Callback which will be called to after a host registration succeeded or failed.
#define GNUNET_MESSAGE_TYPE_TESTBED_GENERIC_OPERATION_SUCCESS
Message to signal a generic operation has been successful.
Handle to a client that is connected to a service.
static void handle_add_host(void *cls, const struct GNUNET_TESTBED_AddHostMessage *msg)
Message handler for #GNUNET_MESSAGE_TYPE_TESTBED_ADDHOST messages.
uint64_t operation_id
Operation ID of the operation that created this event.
GNUNET_TESTBED_HostRegistrationCompletion cb
The callback to call after this registration's status is available.
static void hr_completion(void *cls, const char *emsg)
Callback which will be called after a host registration succeeded or failed.
#define GNUNET_MESSAGE_TYPE_TESTBED_OPERATION_FAIL_EVENT
Message for operation events.
#define GNUNET_MQ_msg_extra(mvar, esize, type)
Allocate an envelope, with extra space allocated after the space needed by the message struct...
void GST_neighbour_list_clean()
Cleans up the neighbour list.
static void client_disconnect_cb(void *cls, struct GNUNET_SERVICE_Client *client, void *app_ctx)
Callback for client disconnect.
Link controllers operation.
uint32_t host_id
Our host id according to this context.
struct ForwardedOperationContext * fopcq_head
DLL head for forwarded operation contexts.
#define GNUNET_MESSAGE_TYPE_TESTBED_REMOTE_OVERLAY_CONNECT
Message to request a controller to make one of its peer to connect to another peer using the containe...
uint64_t operation_id
Operation ID of the operation that created this event.
#define GNUNET_MQ_hd_var_size(name, code, str, ctx)
#define GNUNET_break_op(cond)
Use this for assertion violations caused by other peers (i.e.
void GNUNET_TESTBED_forward_operation_msg_cancel_(struct OperationContext *opc)
Function to cancel an operation created by simply forwarding an operation message.
#define GNUNET_MESSAGE_TYPE_TESTBED_RECONFIGURE_PEER
Message to reconfigure a peer.
static int check_init(void *cls, const struct GNUNET_TESTBED_InitMessage *msg)
Check GNUNET_MESSAGE_TYPE_TESTBED_INIT messages.
struct GNUNET_TESTBED_Host ** GST_host_list
Array of hosts.
enum OperationType type
The type of the operation which is forwarded.
static int host_list_add(struct GNUNET_TESTBED_Host *host)
Function to add a host to the current list of known hosts.
A DLL of host registrations to be made.
void GST_barriers_init(struct GNUNET_CONFIGURATION_Handle *cfg)
Function to initialise barrriers component.
struct GNUNET_SERVICE_Client * client
The client handle associated with this context.
A requested testbed operation has been completed.
void GNUNET_CONFIGURATION_destroy(struct GNUNET_CONFIGURATION_Handle *cfg)
Destroy configuration object.
#define GNUNET_MESSAGE_TYPE_TESTBED_DESTROY_PEER
Message to destroy a peer.
static const struct GNUNET_CONFIGURATION_Handle * config
#define GNUNET_MESSAGE_TYPE_TESTBED_ADD_HOST
Message to add host.
uint32_t GNUNET_TESTBED_host_get_id_(const struct GNUNET_TESTBED_Host *host)
Obtain the host's unique global ID.
struct HostRegistration * hr_dll_tail
Tail of the host registration DLL.
uint32_t host_id
Unique ID for the host (in NBO).
void GST_cache_clear(void)
Clear cache.
const struct GNUNET_CONFIGURATION_Handle * GNUNET_TESTBED_host_get_cfg_(const struct GNUNET_TESTBED_Host *host)
Obtain the host's configuration template.
void GST_cache_init(unsigned int size)
Initializes the cache.
void GNUNET_SERVICE_client_drop(struct GNUNET_SERVICE_Client *c)
Ask the server to disconnect from the given client.
#define GNUNET_MESSAGE_TYPE_TESTBED_OVERLAY_CONNECT
Message to connect peers in a overlay.
unsigned int share
The number of peers which share an instance of the service.
unsigned int nslaves
The number of slave we expect to hear from since we forwarded the GNUNET_MESSAGE_TYPE_TESTBED_SHUTDOW...
struct HostRegistration * hr_dll_head
Head of the host registration DLL.
void * cls
Closure pointer.
Message sent from client to testing service to create (configure, but not start) a peer...
uint64_t operation_id
Operation ID.
struct GNUNET_TESTING_System * GNUNET_TESTING_system_create(const char *testdir, const char *trusted_ip, const char *hostname, const struct GNUNET_TESTING_SharedService *shared_services)
Create a system handle.
uint64_t GNUNET_htonll(uint64_t n)
Convert unsigned 64-bit integer to network byte order.
void GNUNET_TESTBED_operation_queue_destroy_(struct OperationQueue *queue)
Destroys an operation queue.
Interface for connection pooling subroutines.
void GNUNET_TESTING_system_destroy(struct GNUNET_TESTING_System *system, int remove_paths)
Free system resources.
uint32_t host_id
Unique ID for the host (in NBO).
void GNUNET_TESTBED_host_destroy(struct GNUNET_TESTBED_Host *host)
Destroy a host handle.
Reply to GNUNET_MESSAGE_TYPE_TESTBED_GET_SLAVE_CONFIGURATION message.
Overlay connection operation.
struct GNUNET_MessageHeader header
Type is GNUNET_MESSAGE_TYPE_TESTBED_ADD_HOST.
const char * service
The name of the service.
static void testbed_run(void *cls, const struct GNUNET_CONFIGURATION_Handle *cfg, struct GNUNET_SERVICE_Handle *service)
Testbed setup.
struct GNUNET_MQ_Envelope * env
#define GNUNET_CONTAINER_DLL_insert_tail(head, tail, element)
Insert an element at the tail of a DLL.
#define GNUNET_MESSAGE_TYPE_TESTBED_GET_PEER_INFORMATION
Message to get a peer's information.
struct GNUNET_TESTBED_Host * host
The host that has to be registered.
static char * init
Set to the name of a service to start.
static void handle_slave_get_config(void *cls, const struct GNUNET_TESTBED_SlaveGetConfigurationMessage *msg)
Handler for #GNUNET_MESSAGE_TYPE_TESTBED_GETSLAVECONFIG messages.
uint32_t host_id
Host ID that the controller is either given (if this is the dominating client) or assumed to have (fo...
#define GNUNET_MESSAGE_TYPE_TESTBED_CREATE_PEER
Message to create a peer at a host.
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.
char * GNUNET_CONFIGURATION_serialize(const struct GNUNET_CONFIGURATION_Handle *cfg, size_t *size)
Serializes the given configuration.
Handle to a message queue.
Message sent from client to testing service to connect two peers.
Get slave config operation.
Start/stop service at a peer.
Queue of operations where we can only support a certain number of concurrent operations of a particul...
struct ForwardedOperationContext * fopcq_tail
DLL tail for forwarded operation contexts.
struct GNUNET_TIME_Relative GST_timeout
Timeout for operations which may take some time.
static char * hostname
Our hostname; we give this to all the peers we start.
void GST_notify_client_disconnect_peers(struct GNUNET_SERVICE_Client *client)
Notify peers subsystem that client disconnected.
uint32_t host_id
The id of the host this controller is running on.
struct GNUNET_SERVICE_Client * client
The client to which we have to reply.
enum GNUNET_GenericReturnValue GNUNET_CONFIGURATION_get_value_time(const struct GNUNET_CONFIGURATION_Handle *cfg, const char *section, const char *option, struct GNUNET_TIME_Relative *time)
Get a configuration value that should be a relative time.
struct Context * GST_context
The master context; generated with the first INIT message.
Message to start/stop services of a peer.
const struct GNUNET_CONFIGURATION_Handle * cfg
The configuration template for the service.
void GST_connection_pool_init(unsigned int size)
Initialise the connection pool.
void GST_free_prcq(void)
Cleans up the Peer reconfigure context list.
#define GNUNET_MESSAGE_TYPE_TESTBED_INIT
Initial message from a client to a testing control service.
struct GNUNET_MQ_Handle * mq
struct ForwardedOperationContext * next
The next pointer for DLL.
struct GNUNET_TESTBED_Controller * controller
The controller handle.
uint64_t operation_id
The id of the operation that has been forwarded.
void GST_stats_init(const struct GNUNET_CONFIGURATION_Handle *cfg)
Initialize logging CPU and IO statisticfs.
static void handle_init(void *cls, const struct GNUNET_TESTBED_InitMessage *msg)
Message handler for GNUNET_MESSAGE_TYPE_TESTBED_INIT messages.
Event notification from a controller to a client for a generic operational success where the operatio...
Message for signalling status changes of a barrier.
void GNUNET_MQ_send(struct GNUNET_MQ_Handle *mq, struct GNUNET_MQ_Envelope *ev)
Send a message with the given message queue.
void * cb_cls
The closure for the above callback.
GNUNET_SERVICE_MAIN("testbed", GNUNET_SERVICE_OPTION_NONE, &testbed_run, &client_connect_cb, &client_disconnect_cb, NULL, GNUNET_MQ_hd_var_size(init, GNUNET_MESSAGE_TYPE_TESTBED_INIT, struct GNUNET_TESTBED_InitMessage, NULL), GNUNET_MQ_hd_var_size(add_host, GNUNET_MESSAGE_TYPE_TESTBED_ADD_HOST, struct GNUNET_TESTBED_AddHostMessage, NULL), GNUNET_MQ_hd_fixed_size(slave_get_config, GNUNET_MESSAGE_TYPE_TESTBED_GET_SLAVE_CONFIGURATION, struct GNUNET_TESTBED_SlaveGetConfigurationMessage, NULL), GNUNET_MQ_hd_fixed_size(link_controllers, GNUNET_MESSAGE_TYPE_TESTBED_LINK_CONTROLLERS, struct GNUNET_TESTBED_ControllerLinkRequest, NULL), GNUNET_MQ_hd_var_size(remote_overlay_connect, GNUNET_MESSAGE_TYPE_TESTBED_REMOTE_OVERLAY_CONNECT, struct GNUNET_TESTBED_RemoteOverlayConnectMessage, NULL), GNUNET_MQ_hd_fixed_size(overlay_connect, GNUNET_MESSAGE_TYPE_TESTBED_OVERLAY_CONNECT, struct GNUNET_TESTBED_OverlayConnectMessage, NULL), GNUNET_MQ_hd_var_size(peer_create, GNUNET_MESSAGE_TYPE_TESTBED_CREATE_PEER, struct GNUNET_TESTBED_PeerCreateMessage, NULL), GNUNET_MQ_hd_fixed_size(peer_destroy, GNUNET_MESSAGE_TYPE_TESTBED_DESTROY_PEER, struct GNUNET_TESTBED_PeerDestroyMessage, NULL), GNUNET_MQ_hd_fixed_size(peer_start, GNUNET_MESSAGE_TYPE_TESTBED_START_PEER, struct GNUNET_TESTBED_PeerStartMessage, NULL), GNUNET_MQ_hd_fixed_size(peer_stop, GNUNET_MESSAGE_TYPE_TESTBED_STOP_PEER, struct GNUNET_TESTBED_PeerStopMessage, NULL), GNUNET_MQ_hd_fixed_size(peer_get_config, GNUNET_MESSAGE_TYPE_TESTBED_GET_PEER_INFORMATION, struct GNUNET_TESTBED_PeerGetConfigurationMessage, NULL), GNUNET_MQ_hd_var_size(manage_peer_service, GNUNET_MESSAGE_TYPE_TESTBED_MANAGE_PEER_SERVICE, struct GNUNET_TESTBED_ManagePeerServiceMessage, NULL), GNUNET_MQ_hd_fixed_size(shutdown_peers, GNUNET_MESSAGE_TYPE_TESTBED_SHUTDOWN_PEERS, struct GNUNET_TESTBED_ShutdownPeersMessage, NULL), GNUNET_MQ_hd_var_size(peer_reconfigure, GNUNET_MESSAGE_TYPE_TESTBED_RECONFIGURE_PEER, struct GNUNET_TESTBED_PeerReconfigureMessage, NULL), GNUNET_MQ_hd_var_size(barrier_init, GNUNET_MESSAGE_TYPE_TESTBED_BARRIER_INIT, struct GNUNET_TESTBED_BarrierInit, NULL), GNUNET_MQ_hd_var_size(barrier_cancel, GNUNET_MESSAGE_TYPE_TESTBED_BARRIER_CANCEL, struct GNUNET_TESTBED_BarrierCancel, NULL), GNUNET_MQ_hd_var_size(barrier_status, GNUNET_MESSAGE_TYPE_TESTBED_BARRIER_STATUS, struct GNUNET_TESTBED_BarrierStatusMsg, NULL), GNUNET_MQ_handler_end())
Define "main" method using service macro.
void GST_send_operation_success_msg(struct GNUNET_SERVICE_Client *client, uint64_t operation_id)
Function to send generic operation success message to given client.
void GST_free_lcf(void)
Cleans up the queue used for forwarding link controllers requests.
static int check_add_host(void *cls, const struct GNUNET_TESTBED_AddHostMessage *msg)
Check #GNUNET_MESSAGE_TYPE_TESTBED_ADDHOST messages.
#define GNUNET_MESSAGE_TYPE_TESTBED_BARRIER_INIT
Message to initialise a barrier.
void GST_free_occq(void)
Clears all pending overlay connect contexts in queue.
uint32_t slave_id
The id of the slave host.
Context data for GNUNET_MESSAGE_TYPE_TESTBED_SHUTDOWN_PEERS handler.
#define GNUNET_MESSAGE_TYPE_TESTBED_BARRIER_CANCEL
Message to cancel a barrier.
int GNUNET_log_setup(const char *comp, const char *loglevel, const char *logfile)
Setup logging.
struct GNUNET_CONFIGURATION_Handle * GST_config
Our configuration.
Message to initialise a barrier.
Context information for operations forwarded to subcontrollers.
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.
#define GNUNET_MESSAGE_TYPE_TESTBED_START_PEER
Message to start a peer at a host.
void GNUNET_SERVICE_client_continue(struct GNUNET_SERVICE_Client *c)
Continue receiving further messages from the given client.
Get peer information operation.
static void shutdown_task(void *cls)
Task to clean up and shutdown nicely.
#define LOG_DEBUG(...)
Debug logging shorthand.
#define GNUNET_MQ_handler_end()
End-marker for the handlers array.
#define GNUNET_malloc(size)
Wrapper around malloc.
void GST_connection_pool_destroy()
Cleanup the connection pool.
uint16_t ssh_port
SSH port to use, 0 for default (in NBO).
uint64_t GNUNET_ntohll(uint64_t n)
Convert unsigned 64-bit integer to host byte order.
#define GNUNET_free(ptr)
Wrapper around free.
Time for relative time used by GNUnet, in microseconds.
void GST_destroy_peers(void)
Stops and destroys all peers.
Client notifies controller that it should delegate requests for a particular client to a particular s...
struct Slave ** GST_slave_list
A list of directly linked neighbours.
void GST_free_roccq(void)
Clears all pending remote overlay connect contexts in queue.
void * GNUNET_SCHEDULER_cancel(struct GNUNET_SCHEDULER_Task *task)
Cancel the task with the specified identifier.
int32_t event_type
'enum GNUNET_TESTBED_EventType' (in NBO); GNUNET_TESTBED_ET_OPERATION_FINISHED.