API for accessing the GNUnet testing service. More...
#include "platform.h"
#include "gnunet_testbed_service.h"
#include "gnunet_core_service.h"
#include "gnunet_constants.h"
#include "gnunet_transport_service.h"
#include "gnunet_hello_lib.h"
#include <zlib.h>
#include "testbed.h"
#include "testbed_api.h"
#include "testbed_api_hosts.h"
#include "testbed_api_peers.h"
#include "testbed_api_operations.h"
#include "testbed_api_sd.h"
Go to the source code of this file.
Data Structures | |
struct | ForwardedOperationData |
Context data for forwarded Operation. More... | |
struct | GetSlaveConfigData |
Context data for get slave config operations. More... | |
struct | ControllerLinkData |
Context data for controller link operations. More... | |
struct | ShutdownPeersData |
Date context for OP_SHUTDOWN_PEERS operations. More... | |
struct | ExpireOperationEntry |
An entry in the stack for keeping operations which are about to expire. More... | |
struct | SearchContext |
Context information to be used while searching for operation contexts. More... | |
Macros | |
#define | LOG(kind, ...) GNUNET_log_from (kind, "testbed-api", __VA_ARGS__) |
Generic logging shorthand. More... | |
#define | LOG_DEBUG(...) LOG (GNUNET_ERROR_TYPE_DEBUG, __VA_ARGS__) |
Debug logging. More... | |
#define | TIME_REL_SECS(sec) GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, sec) |
Relative time seconds shorthand. More... | |
#define | TIMEOUT_REL TIME_REL_SECS (1) |
Default server message sending retry timeout. More... | |
Functions | |
static void | exop_insert (struct GNUNET_TESTBED_Operation *op) |
Inserts an operation into the list of operations marked for expiry. More... | |
static int | exop_check (const struct GNUNET_TESTBED_Operation *const op) |
Checks if an operation is present in the list of operations marked for expiry. More... | |
static int | opc_search_iterator (void *cls, uint32_t key, void *value) |
Search iterator for searching an operation context. More... | |
static struct OperationContext * | find_opc (const struct GNUNET_TESTBED_Controller *c, const uint64_t id) |
Returns the operation context with the given id if found in the Operation context queues of the controller. More... | |
void | GNUNET_TESTBED_insert_opc_ (struct GNUNET_TESTBED_Controller *c, struct OperationContext *opc) |
Inserts the given operation context into the operation context map of the given controller. More... | |
void | GNUNET_TESTBED_remove_opc_ (const struct GNUNET_TESTBED_Controller *c, struct OperationContext *opc) |
Removes the given operation context from the operation context map of the given controller. More... | |
static int | check_add_host_confirm (void *cls, const struct GNUNET_TESTBED_HostConfirmedMessage *msg) |
Check #GNUNET_MESSAGE_TYPE_TESTBED_ADDHOSTCONFIRM message is well-formed. More... | |
static void | handle_add_host_confirm (void *cls, const struct GNUNET_TESTBED_HostConfirmedMessage *msg) |
Handler for #GNUNET_MESSAGE_TYPE_TESTBED_ADDHOSTCONFIRM message from controller (testbed service) More... | |
static void | handle_forwarded_operation_msg (void *cls, struct OperationContext *opc, const struct GNUNET_MessageHeader *msg) |
Handler for forwarded operations. More... | |
static void | handle_opsuccess (void *cls, const struct GNUNET_TESTBED_GenericOperationSuccessEventMessage *msg) |
Handler for GNUNET_MESSAGE_TYPE_TESTBED_ADD_HOST_SUCCESS message from controller (testbed service) More... | |
static void | handle_peer_create_success (void *cls, const struct GNUNET_TESTBED_PeerCreateSuccessEventMessage *msg) |
Handler for GNUNET_MESSAGE_TYPE_TESTBED_CREATE_PEER_SUCCESS message from controller (testbed service) More... | |
static void | handle_peer_event (void *cls, const struct GNUNET_TESTBED_PeerEventMessage *msg) |
Handler for GNUNET_MESSAGE_TYPE_TESTBED_PEER_EVENT message from controller (testbed service) More... | |
static void | handle_peer_conevent (void *cls, const struct GNUNET_TESTBED_ConnectionEventMessage *msg) |
Handler for GNUNET_MESSAGE_TYPE_TESTBED_PEER_CONNECT_EVENT message from controller (testbed service) More... | |
static int | check_peer_config (void *cls, const struct GNUNET_TESTBED_PeerConfigurationInformationMessage *msg) |
Validate GNUNET_MESSAGE_TYPE_TESTBED_PEER_INFORMATION message from controller (testbed service) More... | |
static void | handle_peer_config (void *cls, const struct GNUNET_TESTBED_PeerConfigurationInformationMessage *msg) |
Handler for GNUNET_MESSAGE_TYPE_TESTBED_PEER_INFORMATION message from controller (testbed service) More... | |
static int | check_op_fail_event (void *cls, const struct GNUNET_TESTBED_OperationFailureEventMessage *msg) |
Validate GNUNET_MESSAGE_TYPE_TESTBED_OPERATION_FAIL_EVENT message from controller (testbed service) More... | |
static void | handle_op_fail_event (void *cls, const struct GNUNET_TESTBED_OperationFailureEventMessage *msg) |
Handler for GNUNET_MESSAGE_TYPE_TESTBED_OPERATION_FAIL_EVENT message from controller (testbed service) More... | |
static struct GNUNET_TESTBED_SlaveGetConfigurationMessage * | GNUNET_TESTBED_generate_slavegetconfig_msg_ (uint64_t op_id, uint32_t slave_id) |
Function to build GET_SLAVE_CONFIG message. More... | |
static int | check_slave_config (void *cls, const struct GNUNET_TESTBED_SlaveConfiguration *msg) |
Validate #GNUNET_MESSAGE_TYPE_TESTBED_SLAVE_INFORMATION message from controller (testbed service) More... | |
static void | handle_slave_config (void *cls, const struct GNUNET_TESTBED_SlaveConfiguration *msg) |
Handler for GNUNET_MESSAGE_TYPE_TESTBED_SLAVE_CONFIGURATION message from controller (testbed service) More... | |
static int | check_link_controllers_result (void *cls, const struct GNUNET_TESTBED_ControllerLinkResponse *msg) |
Check GNUNET_MESSAGE_TYPE_TESTBED_LINK_CONTROLLERS_RESULT message from controller (testbed service) More... | |
static void | handle_link_controllers_result (void *cls, const struct GNUNET_TESTBED_ControllerLinkResponse *msg) |
Handler for GNUNET_MESSAGE_TYPE_TESTBED_LINK_CONTROLLERS_RESULT message from controller (testbed service) More... | |
static int | check_barrier_status (void *cls, const struct GNUNET_TESTBED_BarrierStatusMsg *msg) |
Validate GNUNET_MESSAGE_TYPE_TESTBED_BARRIER_STATUS message. More... | |
static void | handle_barrier_status (void *cls, const struct GNUNET_TESTBED_BarrierStatusMsg *msg) |
Handler for GNUNET_MESSAGE_TYPE_TESTBED_BARRIER_STATUS messages. More... | |
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. More... | |
struct OperationContext * | GNUNET_TESTBED_forward_operation_msg_ (struct GNUNET_TESTBED_Controller *controller, uint64_t operation_id, const struct GNUNET_MessageHeader *msg, GNUNET_MQ_MessageCallback cc, void *cc_cls) |
Sends the given message as an operation. More... | |
void | GNUNET_TESTBED_forward_operation_msg_cancel_ (struct OperationContext *opc) |
Function to cancel an operation created by simply forwarding an operation message. More... | |
static void | opstart_link_controllers (void *cls) |
Function to call to start a link-controllers type operation once all queues the operation is part of declare that the operation can be activated. More... | |
static void | oprelease_link_controllers (void *cls) |
Callback which will be called when link-controllers type operation is released. More... | |
static void | opstart_get_slave_config (void *cls) |
Function to be called when get slave config operation is ready. More... | |
static void | oprelease_get_slave_config (void *cls) |
Function to be called when get slave config operation is cancelled or finished. More... | |
static void | mq_error_handler (void *cls, enum GNUNET_MQ_Error error) |
Generic error handler, called with the appropriate error code and the same closure specified at the creation of the message queue. More... | |
struct GNUNET_TESTBED_Controller * | GNUNET_TESTBED_controller_connect (struct GNUNET_TESTBED_Host *host, uint64_t event_mask, GNUNET_TESTBED_ControllerCallback cc, void *cc_cls) |
Start a controller process using the given configuration at the given host. More... | |
static int | opc_free_iterator (void *cls, uint32_t key, void *value) |
Iterator to free opc map entries. More... | |
void | GNUNET_TESTBED_controller_disconnect (struct GNUNET_TESTBED_Controller *c) |
Stop the given controller (also will terminate all peers and controllers dependent on this controller). More... | |
size_t | GNUNET_TESTBED_compress_config_ (const char *config, size_t size, char **xconfig) |
Compresses given configuration using zlib compress. More... | |
char * | GNUNET_TESTBED_compress_cfg_ (const struct GNUNET_CONFIGURATION_Handle *cfg, size_t *size, size_t *xsize) |
Function to serialize and compress using zlib a configuration through a configuration handle. More... | |
struct GNUNET_TESTBED_Operation * | GNUNET_TESTBED_controller_link (void *op_cls, struct GNUNET_TESTBED_Controller *master, struct GNUNET_TESTBED_Host *delegated_host, struct GNUNET_TESTBED_Host *slave_host, int is_subordinate) |
Create a link from slave controller to delegated controller. More... | |
struct GNUNET_TESTBED_Operation * | GNUNET_TESTBED_get_slave_config_ (void *op_cls, struct GNUNET_TESTBED_Controller *master, uint32_t slave_host_id) |
Like GNUNET_TESTBED_get_slave_config(), however without the host registration check. More... | |
struct GNUNET_TESTBED_Operation * | GNUNET_TESTBED_get_slave_config (void *op_cls, struct GNUNET_TESTBED_Controller *master, struct GNUNET_TESTBED_Host *slave_host) |
Function to acquire the configuration of a running slave controller. More... | |
void | GNUNET_TESTBED_overlay_write_topology_to_file (struct GNUNET_TESTBED_Controller *controller, const char *filename) |
Ask the testbed controller to write the current overlay topology to a file. More... | |
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. More... | |
void | GNUNET_TESTBED_operation_done (struct GNUNET_TESTBED_Operation *operation) |
This function is used to signal that the event information (struct GNUNET_TESTBED_EventInformation) from an operation has been fully processed i.e. More... | |
struct GNUNET_CONFIGURATION_Handle * | GNUNET_TESTBED_extract_config_ (const struct GNUNET_MessageHeader *msg) |
Generates configuration by uncompressing configuration in given message. More... | |
const char * | GNUNET_TESTBED_parse_error_string_ (const struct GNUNET_TESTBED_OperationFailureEventMessage *msg) |
Checks the integrity of the OpeationFailureEventMessage and if good returns the error message it contains. More... | |
uint64_t | GNUNET_TESTBED_get_next_op_id (struct GNUNET_TESTBED_Controller *controller) |
Function to return the operation id for a controller. More... | |
static void | opstart_shutdown_peers (void *cls) |
Function called when a shutdown peers operation is ready. More... | |
static void | oprelease_shutdown_peers (void *cls) |
Callback which will be called when shutdown peers operation is released. More... | |
struct GNUNET_TESTBED_Operation * | GNUNET_TESTBED_shutdown_peers (struct GNUNET_TESTBED_Controller *c, void *op_cls, GNUNET_TESTBED_OperationCompletionCallback cb, void *cb_cls) |
Stops and destroys all peers. More... | |
uint32_t | GNUNET_TESTBED_get_index (const struct GNUNET_TESTBED_Peer *peer) |
Return the index of the peer inside of the total peer array, aka. More... | |
void | GNUNET_TESTBED_barrier_remove_ (struct GNUNET_TESTBED_Barrier *barrier) |
Remove a barrier and it was the last one in the barrier hash map, destroy the hash map. More... | |
struct GNUNET_TESTBED_Barrier * | GNUNET_TESTBED_barrier_init_ (struct GNUNET_TESTBED_Controller *controller, const char *name, unsigned int quorum, GNUNET_TESTBED_barrier_status_cb cb, void *cls, int echo) |
Initialise a barrier and call the given callback when the required percentage of peers (quorum) reach the barrier OR upon error. More... | |
struct GNUNET_TESTBED_Barrier * | GNUNET_TESTBED_barrier_init (struct GNUNET_TESTBED_Controller *controller, const char *name, unsigned int quorum, GNUNET_TESTBED_barrier_status_cb cb, void *cb_cls) |
Initialise a barrier and call the given callback when the required percentage of peers (quorum) reach the barrier OR upon error. More... | |
void | GNUNET_TESTBED_barrier_cancel (struct GNUNET_TESTBED_Barrier *barrier) |
Cancel a barrier. More... | |
Variables | |
static struct ExpireOperationEntry * | exop_head |
DLL head for list of operations marked for expiry. More... | |
static struct ExpireOperationEntry * | exop_tail |
DLL tail for list of operation marked for expiry. More... | |
API for accessing the GNUnet testing service.
This library is supposed to make it easier to write testcases and script large-scale benchmarks.
Definition in file testbed_api.c.
#define LOG | ( | kind, | |
... | |||
) | GNUNET_log_from (kind, "testbed-api", __VA_ARGS__) |
Generic logging shorthand.
Definition at line 47 of file testbed_api.c.
#define LOG_DEBUG | ( | ... | ) | LOG (GNUNET_ERROR_TYPE_DEBUG, __VA_ARGS__) |
Debug logging.
Definition at line 52 of file testbed_api.c.
#define TIME_REL_SECS | ( | sec | ) | GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, sec) |
Relative time seconds shorthand.
Definition at line 57 of file testbed_api.c.
#define TIMEOUT_REL TIME_REL_SECS (1) |
Default server message sending retry timeout.
Definition at line 64 of file testbed_api.c.
|
static |
Inserts an operation into the list of operations marked for expiry.
op | the operation to insert |
Definition at line 169 of file testbed_api.c.
References exop_head, exop_tail, GNUNET_CONTAINER_DLL_insert_tail, GNUNET_new, op, and ExpireOperationEntry::op.
Referenced by handle_op_fail_event(), handle_opsuccess(), handle_peer_conevent(), handle_peer_create_success(), and handle_peer_event().
|
static |
Checks if an operation is present in the list of operations marked for expiry.
If the operation is found, it and the tail of operations after it are removed from the list.
op | the operation to check |
Definition at line 191 of file testbed_api.c.
References exop_head, exop_tail, GNUNET_CONTAINER_DLL_remove, GNUNET_free, GNUNET_NO, GNUNET_YES, ExpireOperationEntry::next, op, and ExpireOperationEntry::op.
Referenced by GNUNET_TESTBED_operation_done(), handle_op_fail_event(), handle_opsuccess(), handle_peer_conevent(), handle_peer_create_success(), and handle_peer_event().
|
static |
Search iterator for searching an operation context.
cls | the search context |
key | current key code |
value | value in the hash map |
Definition at line 249 of file testbed_api.c.
References GNUNET_assert, GNUNET_NO, GNUNET_YES, OperationContext::id, sc, and value.
Referenced by find_opc().
|
static |
Returns the operation context with the given id if found in the Operation context queues of the controller.
c | the controller whose operation context map is searched |
id | the id which has to be checked |
Definition at line 272 of file testbed_api.c.
References GNUNET_assert, GNUNET_CONTAINER_multihashmap32_get_multiple(), GNUNET_SYSERR, id, GNUNET_TESTBED_Controller::opc_map, opc_search_iterator(), and sc.
Referenced by handle_link_controllers_result(), handle_op_fail_event(), handle_opsuccess(), handle_peer_conevent(), handle_peer_config(), handle_peer_create_success(), handle_peer_event(), and handle_slave_config().
void GNUNET_TESTBED_insert_opc_ | ( | struct GNUNET_TESTBED_Controller * | c, |
struct OperationContext * | opc | ||
) |
Inserts the given operation context into the operation context map of the given controller.
Creates the operation context map if one does not exist for the controller
c | the controller |
opc | the operation context to be inserted |
Definition at line 298 of file testbed_api.c.
References GNUNET_assert, GNUNET_CONTAINER_multihashmap32_create(), GNUNET_CONTAINER_multihashmap32_put(), GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE, GNUNET_OK, OperationContext::id, SearchContext::opc, and GNUNET_TESTBED_Controller::opc_map.
Referenced by GNUNET_TESTBED_forward_operation_msg_(), opstart_get_slave_config(), opstart_link_controllers(), opstart_manage_service(), opstart_overlay_connect(), opstart_peer_create(), opstart_peer_destroy(), opstart_peer_getinfo(), opstart_peer_reconfigure(), opstart_peer_start(), opstart_peer_stop(), and opstart_shutdown_peers().
void GNUNET_TESTBED_remove_opc_ | ( | const struct GNUNET_TESTBED_Controller * | c, |
struct OperationContext * | opc | ||
) |
Removes the given operation context from the operation context map of the given controller.
c | the controller |
opc | the operation context to remove |
Definition at line 319 of file testbed_api.c.
References GNUNET_assert, GNUNET_CONTAINER_multihashmap32_remove(), GNUNET_CONTAINER_multihashmap32_size(), GNUNET_YES, OperationContext::id, SearchContext::opc, GNUNET_TESTBED_Controller::opc_map, GNUNET_TESTBED_Controller::opcq_empty_cb, and GNUNET_TESTBED_Controller::opcq_empty_cls.
Referenced by GNUNET_TESTBED_forward_operation_msg_cancel_(), handle_forwarded_operation_msg(), handle_link_controllers_result(), handle_op_fail_event(), handle_opsuccess(), handle_peer_conevent(), handle_peer_config(), handle_peer_create_success(), handle_peer_event(), handle_slave_config(), oprelease_get_slave_config(), oprelease_link_controllers(), oprelease_manage_service(), oprelease_overlay_connect(), oprelease_peer_create(), oprelease_peer_destroy(), oprelease_peer_getinfo(), oprelease_peer_reconfigure(), oprelease_peer_start(), oprelease_peer_stop(), and oprelease_shutdown_peers().
|
static |
Check #GNUNET_MESSAGE_TYPE_TESTBED_ADDHOSTCONFIRM message is well-formed.
cls | the controller handler |
msg | message received |
Definition at line 341 of file testbed_api.c.
References GNUNET_break, GNUNET_OK, GNUNET_SYSERR, msg, and GNUNET_MessageHeader::size.
|
static |
Handler for #GNUNET_MESSAGE_TYPE_TESTBED_ADDHOSTCONFIRM message from controller (testbed service)
cls | the controller handler |
msg | message received |
Definition at line 369 of file testbed_api.c.
References _, GNUNET_TESTBED_HostRegistrationHandle::c, GNUNET_TESTBED_HostRegistrationHandle::cc, GNUNET_TESTBED_HostRegistrationHandle::cc_cls, GNUNET_ERROR_TYPE_ERROR, GNUNET_free, GNUNET_TESTBED_host_get_id_(), GNUNET_TESTBED_mark_host_registered_at_(), GNUNET_TESTBED_HostRegistrationHandle::host, LOG, LOG_DEBUG, msg, GNUNET_TESTBED_Controller::rh, and GNUNET_MessageHeader::size.
|
static |
Handler for forwarded operations.
cls | the controller handle |
opc | the operation context |
msg | the message |
Definition at line 415 of file testbed_api.c.
References ForwardedOperationData::cc, ForwardedOperationData::cc_cls, OperationContext::data, GNUNET_free, GNUNET_TESTBED_remove_opc_(), and msg.
Referenced by handle_link_controllers_result(), handle_op_fail_event(), handle_opsuccess(), handle_peer_conevent(), handle_peer_config(), handle_peer_create_success(), and handle_peer_event().
|
static |
Handler for GNUNET_MESSAGE_TYPE_TESTBED_ADD_HOST_SUCCESS message from controller (testbed service)
cls | the controller handler |
msg | message received |
Definition at line 439 of file testbed_api.c.
References OperationContext::c, GNUNET_TESTBED_Controller::cc, GNUNET_TESTBED_Controller::cc_cls, OperationContext::data, data, GNUNET_TESTBED_Controller::event_mask, exop_check(), exop_insert(), find_opc(), GNUNET_assert, GNUNET_break, GNUNET_free, GNUNET_NO, GNUNET_ntohll(), GNUNET_TESTBED_cleanup_peers_(), GNUNET_TESTBED_ET_OPERATION_FINISHED, GNUNET_TESTBED_peer_deregister_(), GNUNET_TESTBED_remove_opc_(), handle_forwarded_operation_msg(), LOG_DEBUG, msg, GNUNET_TESTBED_EventInformation::op, OperationContext::op, OperationContext::op_cls, OP_FORWARDED, OP_MANAGE_SERVICE, OP_PEER_DESTROY, OP_PEER_RECONFIGURE, OP_SHUTDOWN_PEERS, OPC_STATE_FINISHED, peer, OperationContext::state, and OperationContext::type.
|
static |
Handler for GNUNET_MESSAGE_TYPE_TESTBED_CREATE_PEER_SUCCESS message from controller (testbed service)
cls | the controller handle |
msg | message received |
Definition at line 543 of file testbed_api.c.
References OperationContext::c, GNUNET_TESTBED_Operation::cb_cls, OperationContext::data, data, exop_check(), exop_insert(), find_opc(), GNUNET_assert, GNUNET_break, GNUNET_free, GNUNET_NO, GNUNET_ntohll(), GNUNET_TESTBED_peer_register_(), GNUNET_TESTBED_remove_opc_(), handle_forwarded_operation_msg(), LOG_DEBUG, msg, op, OperationContext::op, OP_FORWARDED, OP_PEER_CREATE, OPC_STATE_FINISHED, peer, GNUNET_MessageHeader::size, OperationContext::state, GNUNET_TESTBED_Peer::state, TESTBED_PS_CREATED, OperationContext::type, and GNUNET_TESTBED_Peer::unique_id.
|
static |
Handler for GNUNET_MESSAGE_TYPE_TESTBED_PEER_EVENT message from controller (testbed service)
cls | the controller handler |
msg | message received |
Definition at line 601 of file testbed_api.c.
References OperationContext::c, GNUNET_TESTBED_Controller::cc, GNUNET_TESTBED_Controller::cc_cls, OperationContext::data, data, GNUNET_TESTBED_Controller::event_mask, exop_check(), exop_insert(), find_opc(), GNUNET_assert, GNUNET_break, GNUNET_free, GNUNET_NO, GNUNET_ntohll(), GNUNET_TESTBED_ET_PEER_START, GNUNET_TESTBED_ET_PEER_STOP, GNUNET_TESTBED_remove_opc_(), handle_forwarded_operation_msg(), GNUNET_TESTBED_Peer::host, LOG_DEBUG, msg, GNUNET_TESTBED_EventInformation::op, OperationContext::op, OperationContext::op_cls, OP_FORWARDED, OP_PEER_START, OP_PEER_STOP, OPC_STATE_FINISHED, PeerEventData::pcc, PeerEventData::pcc_cls, peer, GNUNET_MessageHeader::size, OperationContext::state, GNUNET_TESTBED_Peer::state, TESTBED_PS_STARTED, TESTBED_PS_STOPPED, GNUNET_TESTBED_EventInformation::type, and OperationContext::type.
|
static |
Handler for GNUNET_MESSAGE_TYPE_TESTBED_PEER_CONNECT_EVENT message from controller (testbed service)
cls | the controller handler |
msg | message received |
Definition at line 682 of file testbed_api.c.
References OperationContext::c, OverlayConnectData::cb, OverlayConnectData::cb_cls, GNUNET_TESTBED_Controller::cc, GNUNET_TESTBED_Controller::cc_cls, OperationContext::data, data, GNUNET_TESTBED_Controller::event_mask, exop_check(), exop_insert(), find_opc(), GNUNET_assert, GNUNET_break, GNUNET_NO, GNUNET_ntohll(), GNUNET_TESTBED_ET_CONNECT, GNUNET_TESTBED_ET_DISCONNECT, GNUNET_TESTBED_remove_opc_(), handle_forwarded_operation_msg(), LOG_DEBUG, msg, GNUNET_TESTBED_EventInformation::op, OperationContext::op, OperationContext::op_cls, OP_FORWARDED, OP_OVERLAY_CONNECT, OPC_STATE_FINISHED, OperationContext::state, GNUNET_TESTBED_EventInformation::type, and OperationContext::type.
|
static |
Validate GNUNET_MESSAGE_TYPE_TESTBED_PEER_INFORMATION message from controller (testbed service)
cls | the controller handler |
msg | message received |
Definition at line 758 of file testbed_api.c.
References GNUNET_OK.
|
static |
Handler for GNUNET_MESSAGE_TYPE_TESTBED_PEER_INFORMATION message from controller (testbed service)
cls | the controller handler |
msg | message received |
Definition at line 775 of file testbed_api.c.
References OperationContext::c, GNUNET_TESTBED_PeerInformation::cfg, OperationContext::data, data, find_opc(), GNUNET_assert, GNUNET_free, GNUNET_memcpy, GNUNET_new, GNUNET_ntohll(), GNUNET_TESTBED_extract_config_(), GNUNET_TESTBED_PIT_CONFIGURATION, GNUNET_TESTBED_PIT_GENERIC, GNUNET_TESTBED_PIT_IDENTITY, GNUNET_TESTBED_remove_opc_(), handle_forwarded_operation_msg(), GNUNET_TESTBED_PeerInformation::id, LOG_DEBUG, msg, OperationContext::op, OP_FORWARDED, OPC_STATE_FINISHED, peer, GNUNET_TESTBED_PeerInformation::pit, GNUNET_TESTBED_PeerInformation::result, OperationContext::state, OperationContext::type, and GNUNET_TESTBED_Peer::unique_id.
|
static |
Validate GNUNET_MESSAGE_TYPE_TESTBED_OPERATION_FAIL_EVENT message from controller (testbed service)
cls | the controller handler |
msg | message received |
Definition at line 848 of file testbed_api.c.
References GNUNET_OK.
|
static |
Handler for GNUNET_MESSAGE_TYPE_TESTBED_OPERATION_FAIL_EVENT message from controller (testbed service)
cls | the controller handler |
msg | message received |
Definition at line 865 of file testbed_api.c.
References OperationContext::c, ManageServiceData::cb, ManageServiceData::cb_cls, GNUNET_TESTBED_Controller::cc, GNUNET_TESTBED_Controller::cc_cls, OperationContext::data, data, GNUNET_TESTBED_EventInformation::emsg, GNUNET_TESTBED_Controller::event_mask, exop_check(), exop_insert(), find_opc(), GNUNET_assert, GNUNET_break, GNUNET_free, GNUNET_NO, GNUNET_ntohll(), GNUNET_TESTBED_ET_OPERATION_FINISHED, GNUNET_TESTBED_operation_mark_failed(), GNUNET_TESTBED_parse_error_string_(), GNUNET_TESTBED_remove_opc_(), handle_forwarded_operation_msg(), LOG_DEBUG, msg, GNUNET_TESTBED_EventInformation::op, OperationContext::op, OperationContext::op_cls, OP_FORWARDED, OP_LINK_CONTROLLERS, OP_MANAGE_SERVICE, OP_OVERLAY_CONNECT, OP_PEER_CREATE, OP_PEER_DESTROY, OP_PEER_INFO, OP_PEER_START, OP_PEER_STOP, OP_SHUTDOWN_PEERS, OPC_STATE_FINISHED, OperationContext::state, and OperationContext::type.
|
static |
Function to build GET_SLAVE_CONFIG message.
op_id | the id this message should contain in its operation id field |
slave_id | the id this message should contain in its slave id field |
Definition at line 1004 of file testbed_api.c.
References GNUNET_htonll(), GNUNET_malloc, GNUNET_MESSAGE_TYPE_TESTBED_GET_SLAVE_CONFIGURATION, msg, GNUNET_MessageHeader::size, GNUNET_TESTBED_SlaveGetConfigurationMessage::slave_id, and GNUNET_MessageHeader::type.
Referenced by opstart_get_slave_config().
|
static |
Validate #GNUNET_MESSAGE_TYPE_TESTBED_SLAVE_INFORMATION message from controller (testbed service)
c | the controller handler |
msg | message received |
Definition at line 1028 of file testbed_api.c.
References GNUNET_OK.
|
static |
Handler for GNUNET_MESSAGE_TYPE_TESTBED_SLAVE_CONFIGURATION message from controller (testbed service)
cls | the controller handler |
msg | message received |
Definition at line 1044 of file testbed_api.c.
References OperationContext::c, GNUNET_TESTBED_Controller::cc, GNUNET_TESTBED_Controller::cc_cls, OperationContext::data, GNUNET_TESTBED_Controller::event_mask, find_opc(), GNUNET_break, GNUNET_ntohll(), GNUNET_TESTBED_ET_OPERATION_FINISHED, GNUNET_TESTBED_extract_config_(), GNUNET_TESTBED_remove_opc_(), LOG_DEBUG, msg, OperationContext::op, OperationContext::op_cls, OP_GET_SLAVE_CONFIG, OPC_STATE_FINISHED, OperationContext::state, and OperationContext::type.
|
static |
Check GNUNET_MESSAGE_TYPE_TESTBED_LINK_CONTROLLERS_RESULT message from controller (testbed service)
c | the controller handler |
msg | message received |
Definition at line 1089 of file testbed_api.c.
References GNUNET_OK.
|
static |
Handler for GNUNET_MESSAGE_TYPE_TESTBED_LINK_CONTROLLERS_RESULT message from controller (testbed service)
cls | the controller handler |
msg | message received |
Definition at line 1106 of file testbed_api.c.
References OperationContext::c, GNUNET_TESTBED_Controller::cc, GNUNET_TESTBED_Controller::cc_cls, cfg, OperationContext::data, data, GNUNET_TESTBED_EventInformation::emsg, GNUNET_TESTBED_Controller::event_mask, find_opc(), GNUNET_assert, GNUNET_break, GNUNET_CONFIGURATION_destroy(), GNUNET_free, GNUNET_malloc, GNUNET_memcpy, GNUNET_NO, GNUNET_ntohll(), GNUNET_TESTBED_ET_OPERATION_FINISHED, GNUNET_TESTBED_extract_config_(), GNUNET_TESTBED_host_lookup_by_id_(), GNUNET_TESTBED_host_replace_cfg_(), GNUNET_TESTBED_remove_opc_(), handle_forwarded_operation_msg(), GNUNET_TESTBED_EventInformation::host, LOG_DEBUG, msg, OperationContext::op, OperationContext::op_cls, OP_FORWARDED, OP_LINK_CONTROLLERS, OPC_STATE_FINISHED, GNUNET_MessageHeader::size, OperationContext::state, and OperationContext::type.
|
static |
Validate GNUNET_MESSAGE_TYPE_TESTBED_BARRIER_STATUS message.
cls | the controller handle to determine the connection this message belongs to |
msg | the barrier status message |
Definition at line 1196 of file testbed_api.c.
References GNUNET_break_op, GNUNET_OK, GNUNET_SYSERR, GNUNET_TESTBED_BARRIERSTATUS_ERROR, msg, name, GNUNET_TESTBED_BarrierStatusMsg::name_len, GNUNET_MessageHeader::size, and status.
|
static |
Handler for GNUNET_MESSAGE_TYPE_TESTBED_BARRIER_STATUS messages.
cls | the controller handle to determine the connection this message belongs to |
msg | the barrier status message |
Do not remove the barrier if we did not echo the status back; this is required at the chained testbed controller setup to ensure the only the test-driver echos the status and the controller hierarchy properly propagates the status.
Definition at line 1242 of file testbed_api.c.
References GNUNET_TESTBED_Controller::barrier_map, GNUNET_TESTBED_Barrier::cb, cleanup(), GNUNET_TESTBED_Barrier::cls, GNUNET_TESTBED_Barrier::echo, GNUNET_assert, GNUNET_break_op, GNUNET_CONTAINER_multihashmap_get(), GNUNET_copy_message(), GNUNET_CRYPTO_hash(), GNUNET_free, GNUNET_malloc, GNUNET_memcpy, GNUNET_TESTBED_barrier_remove_(), GNUNET_TESTBED_BARRIERSTATUS_CROSSED, GNUNET_TESTBED_BARRIERSTATUS_ERROR, GNUNET_TESTBED_BARRIERSTATUS_INITIALISED, GNUNET_TESTBED_queue_message_(), GNUNET_YES, key, LOG_DEBUG, msg, name, GNUNET_TESTBED_BarrierStatusMsg::name_len, GNUNET_MessageHeader::size, and status.
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.
controller | the handle to the controller |
msg | the message to queue |
Definition at line 1336 of file testbed_api.c.
References env, GNUNET_assert, GNUNET_free, GNUNET_memcpy, GNUNET_MESSAGE_TYPE_TESTBED_INIT, GNUNET_MESSAGE_TYPE_TESTBED_MAX, GNUNET_MQ_msg_extra, GNUNET_MQ_send(), GNUNET_TESTBED_Controller::mq, msg, GNUNET_MessageHeader::size, size, GNUNET_MessageHeader::type, and type.
Referenced by GNUNET_TESTBED_register_host(), handle_barrier_status(), handle_remote_overlay_connect(), opstart_get_slave_config(), opstart_link_controllers(), opstart_peer_getinfo(), and send_hello_thru_rocc().
struct OperationContext* GNUNET_TESTBED_forward_operation_msg_ | ( | struct GNUNET_TESTBED_Controller * | controller, |
uint64_t | operation_id, | ||
const struct GNUNET_MessageHeader * | msg, | ||
GNUNET_MQ_MessageCallback | cc, | ||
void * | cc_cls | ||
) |
Sends the given message as an operation.
The given callback is called when a reply for the operation is available. Call GNUNET_TESTBED_forward_operation_msg_cancel_() to cleanup the returned operation context if the cc hasn't been called
controller | the controller to which the message has to be sent |
operation_id | the operation id of the message |
msg | the message to send |
cc | the callback to call when reply is available |
cc_cls | the closure for the above callback |
Definition at line 1370 of file testbed_api.c.
References OperationContext::c, OperationContext::data, data, env, GNUNET_memcpy, GNUNET_MQ_msg_extra, GNUNET_MQ_send(), GNUNET_new, GNUNET_TESTBED_insert_opc_(), OperationContext::id, GNUNET_TESTBED_Controller::mq, msg, OP_FORWARDED, GNUNET_MessageHeader::size, size, GNUNET_MessageHeader::type, OperationContext::type, and type.
Referenced by forward_overlay_connect(), GST_process_next_focc(), handle_manage_peer_service(), handle_peer_create(), handle_peer_destroy(), handle_peer_get_config(), handle_peer_reconfigure(), handle_peer_start(), handle_peer_stop(), handle_shutdown_peers(), opstart_service_connect(), and p2_controller_connect_cb().
void GNUNET_TESTBED_forward_operation_msg_cancel_ | ( | struct OperationContext * | opc | ) |
Function to cancel an operation created by simply forwarding an operation message.
opc | the operation context from GNUNET_TESTBED_forward_operation_msg_() |
Definition at line 1407 of file testbed_api.c.
References OperationContext::c, OperationContext::data, GNUNET_free, and GNUNET_TESTBED_remove_opc_().
Referenced by cleanup_occ_rp2c(), GST_clear_fopcq(), GST_forwarded_operation_timeout(), and oprelease_service_connect().
|
static |
Function to call to start a link-controllers type operation once all queues the operation is part of declare that the operation can be activated.
cls | the closure from GNUNET_TESTBED_operation_create_() |
Definition at line 1422 of file testbed_api.c.
References OperationContext::c, OperationContext::data, data, GNUNET_assert, GNUNET_TESTBED_insert_opc_(), GNUNET_TESTBED_queue_message_(), msg, OPC_STATE_STARTED, and OperationContext::state.
Referenced by GNUNET_TESTBED_controller_link().
|
static |
Callback which will be called when link-controllers type operation is released.
cls | the closure from GNUNET_TESTBED_operation_create_() |
Definition at line 1444 of file testbed_api.c.
References OperationContext::c, OperationContext::data, data, GNUNET_free, GNUNET_TESTBED_remove_opc_(), OPC_STATE_FINISHED, OPC_STATE_INIT, OPC_STATE_STARTED, and OperationContext::state.
Referenced by GNUNET_TESTBED_controller_link().
|
static |
Function to be called when get slave config operation is ready.
cls | the OperationContext of type OP_GET_SLAVE_CONFIG |
Definition at line 1474 of file testbed_api.c.
References OperationContext::c, OperationContext::data, data, GNUNET_assert, GNUNET_free, GNUNET_TESTBED_generate_slavegetconfig_msg_(), GNUNET_TESTBED_insert_opc_(), GNUNET_TESTBED_queue_message_(), OperationContext::id, msg, OPC_STATE_STARTED, and OperationContext::state.
Referenced by GNUNET_TESTBED_get_slave_config_().
|
static |
Function to be called when get slave config operation is cancelled or finished.
cls | the OperationContext of type OP_GET_SLAVE_CONFIG |
Definition at line 1497 of file testbed_api.c.
References OperationContext::c, OperationContext::data, GNUNET_CONFIGURATION_destroy(), GNUNET_free, GNUNET_TESTBED_remove_opc_(), OPC_STATE_FINISHED, OPC_STATE_INIT, OPC_STATE_STARTED, and OperationContext::state.
Referenced by GNUNET_TESTBED_get_slave_config_().
|
static |
Generic error handler, called with the appropriate error code and the same closure specified at the creation of the message queue.
Not every message queue implementation supports an error handler.
cls | closure, a struct GNUNET_TESTBED_Controller * |
error | error code |
Definition at line 1529 of file testbed_api.c.
References GNUNET_ERROR_TYPE_ERROR, GNUNET_log, and GNUNET_SCHEDULER_shutdown().
Referenced by GNUNET_TESTBED_controller_connect().
|
static |
Iterator to free opc map entries.
cls | closure |
key | current key code |
value | value in the hash map |
Definition at line 1699 of file testbed_api.c.
References GNUNET_assert, GNUNET_break, GNUNET_CONTAINER_multihashmap32_remove(), GNUNET_free, GNUNET_YES, key, map, and value.
Referenced by GNUNET_TESTBED_controller_disconnect().
size_t GNUNET_TESTBED_compress_config_ | ( | const char * | config, |
size_t | size, | ||
char ** | xconfig | ||
) |
Compresses given configuration using zlib compress.
config | the serialized configuration |
size | the size of config |
xconfig | will be set to the compressed configuration (memory is fresly allocated) |
Definition at line 1758 of file testbed_api.c.
References config, GNUNET_assert, GNUNET_malloc, and size.
Referenced by GNUNET_TESTBED_compress_cfg_(), GNUNET_TESTBED_create_helper_init_msg_(), GNUNET_TESTBED_register_host(), handle_peer_get_config(), handle_slave_get_config(), opstart_peer_create(), opstart_peer_reconfigure(), and tokenizer_cb().
char* GNUNET_TESTBED_compress_cfg_ | ( | const struct GNUNET_CONFIGURATION_Handle * | cfg, |
size_t * | size, | ||
size_t * | xsize | ||
) |
Function to serialize and compress using zlib a configuration through a configuration handle.
cfg | the configuration |
size | the size of configuration when serialize. Will be set on success. |
xsize | the sizeo of the compressed configuration. Will be set on success. |
Definition at line 1785 of file testbed_api.c.
References cfg, config, GNUNET_CONFIGURATION_serialize(), GNUNET_free, GNUNET_TESTBED_compress_config_(), and size.
Referenced by send_controller_link_response().
struct GNUNET_TESTBED_Operation* GNUNET_TESTBED_get_slave_config_ | ( | void * | op_cls, |
struct GNUNET_TESTBED_Controller * | master, | ||
uint32_t | slave_host_id | ||
) |
Like GNUNET_TESTBED_get_slave_config(), however without the host registration check.
Another difference is that this function takes the id of the slave host.
op_cls | the closure for the operation |
master | the handle to master controller |
slave_host_id | id of the host where the slave controller is running to the slave_host should remain valid until this operation is cancelled or marked as finished |
Definition at line 1894 of file testbed_api.c.
References OperationContext::c, OperationContext::data, data, GNUNET_new, GNUNET_TESTBED_get_next_op_id(), GNUNET_TESTBED_operation_begin_wait_(), GNUNET_TESTBED_operation_create_(), GNUNET_TESTBED_operation_queue_insert_(), OperationContext::id, OperationContext::op, OperationContext::op_cls, OP_GET_SLAVE_CONFIG, OPC_STATE_INIT, GNUNET_TESTBED_Controller::opq_parallel_operations, oprelease_get_slave_config(), opstart_get_slave_config(), OperationContext::state, and OperationContext::type.
Referenced by GNUNET_TESTBED_get_slave_config().
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.
This function is here because we want to use this in testing
trusted_ip | the ip address of the controller which will be set as TRUSTED HOST(all connections from this ip are permitted by the testbed) when starting testbed controller at host. This can either be a single ip address or a network address in CIDR notation. |
hostname | the hostname of the destination this message is intended for |
cfg | the configuration that has to used to start the testbed service thru helper |
Definition at line 1957 of file testbed_api.c.
References cfg, config, GNUNET_TESTBED_HelperInit::config_size, GNUNET_assert, GNUNET_CONFIGURATION_serialize(), GNUNET_free, GNUNET_memcpy, GNUNET_MESSAGE_TYPE_TESTBED_HELPER_INIT, GNUNET_realloc, GNUNET_TESTBED_compress_config_(), hostname, msg, GNUNET_MessageHeader::size, and GNUNET_MessageHeader::type.
Referenced by GNUNET_TESTBED_controller_start().
struct GNUNET_CONFIGURATION_Handle* GNUNET_TESTBED_extract_config_ | ( | const struct GNUNET_MessageHeader * | msg | ) |
Generates configuration by uncompressing configuration in given message.
The given message should be of the following types: GNUNET_MESSAGE_TYPE_TESTBED_PEER_INFORMATION, GNUNET_MESSAGE_TYPE_TESTBED_SLAVE_CONFIGURATION, GNUNET_MESSAGE_TYPE_TESTBED_ADD_HOST, GNUNET_MESSAGE_TYPE_TESTBED_LINK_CONTROLLERS, GNUNET_MESSAGE_TYPE_TESTBED_LINK_CONTROLLERS_RESULT,
FIXME: This API is incredibly ugly.
msg | the message containing compressed configuration |
Definition at line 2043 of file testbed_api.c.
References cfg, GNUNET_TESTBED_AddHostMessage::config_size, GNUNET_TESTBED_ControllerLinkResponse::config_size, GNUNET_TESTBED_PeerCreateMessage::config_size, GNUNET_TESTBED_PeerReconfigureMessage::config_size, GNUNET_TESTBED_PeerConfigurationInformationMessage::config_size, GNUNET_TESTBED_SlaveConfiguration::config_size, data, GNUNET_assert, GNUNET_break_op, GNUNET_CONFIGURATION_create(), GNUNET_CONFIGURATION_deserialize(), GNUNET_free, GNUNET_malloc, GNUNET_MESSAGE_TYPE_TESTBED_ADD_HOST, GNUNET_MESSAGE_TYPE_TESTBED_CREATE_PEER, GNUNET_MESSAGE_TYPE_TESTBED_LINK_CONTROLLERS_RESULT, GNUNET_MESSAGE_TYPE_TESTBED_PEER_INFORMATION, GNUNET_MESSAGE_TYPE_TESTBED_RECONFIGURE_PEER, GNUNET_MESSAGE_TYPE_TESTBED_SLAVE_CONFIGURATION, GNUNET_OK, GNUNET_TESTBED_AddHostMessage::header, GNUNET_TESTBED_ControllerLinkResponse::header, GNUNET_TESTBED_PeerCreateMessage::header, GNUNET_TESTBED_PeerReconfigureMessage::header, GNUNET_TESTBED_PeerConfigurationInformationMessage::header, GNUNET_TESTBED_SlaveConfiguration::header, GNUNET_TESTBED_AddHostMessage::hostname_length, msg, ret, GNUNET_MessageHeader::size, GNUNET_MessageHeader::type, and GNUNET_TESTBED_AddHostMessage::username_length.
Referenced by configuration_receiver(), handle_add_host(), handle_link_controllers_result(), handle_peer_config(), handle_peer_create(), handle_peer_reconfigure(), and handle_slave_config().
const char* GNUNET_TESTBED_parse_error_string_ | ( | const struct GNUNET_TESTBED_OperationFailureEventMessage * | msg | ) |
Checks the integrity of the OpeationFailureEventMessage and if good returns the error message it contains.
msg | the OperationFailureEventMessage |
Definition at line 2150 of file testbed_api.c.
References GNUNET_break, msg, and GNUNET_MessageHeader::size.
Referenced by configuration_receiver(), and handle_op_fail_event().
uint64_t GNUNET_TESTBED_get_next_op_id | ( | struct GNUNET_TESTBED_Controller * | controller | ) |
Function to return the operation id for a controller.
The operation id is created from the controllers host id and its internal operation counter.
controller | the handle to the controller whose operation id has to be incremented |
Definition at line 2178 of file testbed_api.c.
References GNUNET_TESTBED_host_get_id_(), GNUNET_TESTBED_Controller::host, and GNUNET_TESTBED_Controller::operation_counter.
Referenced by GNUNET_TESTBED_controller_link(), GNUNET_TESTBED_get_slave_config_(), GNUNET_TESTBED_overlay_connect(), GNUNET_TESTBED_peer_create(), GNUNET_TESTBED_peer_destroy(), GNUNET_TESTBED_peer_get_information(), GNUNET_TESTBED_peer_manage_service(), GNUNET_TESTBED_peer_start(), GNUNET_TESTBED_peer_stop(), GNUNET_TESTBED_peer_update_configuration(), GNUNET_TESTBED_shutdown_peers(), and opstart_service_connect().
|
static |
Function called when a shutdown peers operation is ready.
cls | the closure from GNUNET_TESTBED_operation_create_() |
Definition at line 2195 of file testbed_api.c.
References OperationContext::c, env, GNUNET_htonll(), GNUNET_MESSAGE_TYPE_TESTBED_SHUTDOWN_PEERS, GNUNET_MQ_msg, GNUNET_MQ_send(), GNUNET_TESTBED_insert_opc_(), OperationContext::id, GNUNET_TESTBED_Controller::mq, msg, OPC_STATE_STARTED, and OperationContext::state.
Referenced by GNUNET_TESTBED_shutdown_peers().
|
static |
Callback which will be called when shutdown peers operation is released.
cls | the closure from GNUNET_TESTBED_operation_create_() |
Definition at line 2215 of file testbed_api.c.
References OperationContext::c, OperationContext::data, GNUNET_free, GNUNET_TESTBED_remove_opc_(), OPC_STATE_FINISHED, OPC_STATE_INIT, OPC_STATE_STARTED, and OperationContext::state.
Referenced by GNUNET_TESTBED_shutdown_peers().
void GNUNET_TESTBED_barrier_remove_ | ( | struct GNUNET_TESTBED_Barrier * | barrier | ) |
Remove a barrier and it was the last one in the barrier hash map, destroy the hash map.
barrier | the barrier to remove |
Definition at line 2304 of file testbed_api.c.
References GNUNET_TESTBED_Controller::barrier_map, GNUNET_TESTBED_Barrier::c, GNUNET_assert, GNUNET_CONTAINER_multihashmap_destroy(), GNUNET_CONTAINER_multihashmap_remove(), GNUNET_CONTAINER_multihashmap_size(), GNUNET_free, GNUNET_OK, GNUNET_TESTBED_Barrier::key, and GNUNET_TESTBED_Barrier::name.
Referenced by GNUNET_TESTBED_barrier_cancel(), and handle_barrier_status().
struct GNUNET_TESTBED_Barrier* GNUNET_TESTBED_barrier_init_ | ( | struct GNUNET_TESTBED_Controller * | controller, |
const char * | name, | ||
unsigned int | quorum, | ||
GNUNET_TESTBED_barrier_status_cb | cb, | ||
void * | cls, | ||
int | echo | ||
) |
Initialise a barrier and call the given callback when the required percentage of peers (quorum) reach the barrier OR upon error.
controller | the handle to the controller |
name | identification name of the barrier |
quorum | the percentage of peers that is required to reach the barrier. Peers signal reaching a barrier by calling GNUNET_TESTBED_barrier_reached(). |
cb | the callback to call when the barrier is reached or upon error. Cannot be NULL. |
cls | closure for the above callback |
echo | GNUNET_YES to echo the barrier crossed status message back to the controller |
Definition at line 2324 of file testbed_api.c.
References GNUNET_TESTBED_Controller::barrier_map, GNUNET_TESTBED_Barrier::c, GNUNET_TESTBED_Barrier::cb, GNUNET_TESTBED_Barrier::cls, echo, GNUNET_TESTBED_Barrier::echo, env, GNUNET_assert, GNUNET_break, GNUNET_CONTAINER_multihashmap_contains(), GNUNET_CONTAINER_multihashmap_create(), GNUNET_CONTAINER_multihashmap_put(), GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_FAST, GNUNET_CRYPTO_hash(), GNUNET_memcpy, GNUNET_MESSAGE_TYPE_TESTBED_BARRIER_INIT, GNUNET_MQ_msg_extra, GNUNET_MQ_send(), GNUNET_new, GNUNET_OK, GNUNET_strdup, GNUNET_YES, key, GNUNET_TESTBED_Barrier::key, LOG_DEBUG, GNUNET_TESTBED_Controller::mq, msg, name, and GNUNET_TESTBED_Barrier::name.
Referenced by GNUNET_TESTBED_barrier_init(), and handle_barrier_init().
|
static |
DLL head for list of operations marked for expiry.
Definition at line 155 of file testbed_api.c.
Referenced by exop_check(), and exop_insert().
|
static |
DLL tail for list of operation marked for expiry.
Definition at line 160 of file testbed_api.c.
Referenced by exop_check(), and exop_insert().