142 c =
data->peer->controller;
155 emsg =
"Unknown error";
156 info.details.operation_finished.emsg =
emsg;
157 info.details.operation_finished.generic = NULL;
163 info.details.operation_finished.emsg = NULL;
164 info.details.operation_finished.generic =
data->op_result;
171 if (NULL !=
data->cb)
191 c =
data->peer->controller;
227 if (NULL !=
data->da)
281 opq_parallel_service_connections,
284 controller->opq_parallel_operations,
287 return data->operation;
struct GNUNET_MessageHeader * msg
uint32_t data
The data value.
State
Available states during profiling.
static char * service_name
Option -s: service name (hash to get service descriptor)
void GNUNET_CONFIGURATION_destroy(struct GNUNET_CONFIGURATION_Handle *cfg)
Destroy configuration object.
#define GNUNET_assert(cond)
Use this for fatal errors that cannot be handled.
#define GNUNET_new(type)
Allocate a struct or union of the given type.
#define GNUNET_free(ptr)
Wrapper around free.
#define GNUNET_MESSAGE_TYPE_TESTBED_OPERATION_FAIL_EVENT
Message for operation events.
void(* GNUNET_TESTBED_DisconnectAdapter)(void *cls, void *op_result)
Adapter function called to destroy a connection to a service.
void(* GNUNET_TESTBED_ServiceConnectCompletionCallback)(void *cls, struct GNUNET_TESTBED_Operation *op, void *ca_result, const char *emsg)
Callback to be called when a service connect operation is completed.
struct GNUNET_TESTBED_Operation * GNUNET_TESTBED_service_connect(void *op_cls, struct GNUNET_TESTBED_Peer *peer, const char *service_name, GNUNET_TESTBED_ServiceConnectCompletionCallback cb, void *cb_cls, GNUNET_TESTBED_ConnectAdapter ca, GNUNET_TESTBED_DisconnectAdapter da, void *cada_cls)
Connect to a service offered by the given peer.
void *(* GNUNET_TESTBED_ConnectAdapter)(void *cls, const struct GNUNET_CONFIGURATION_Handle *cfg)
Adapter function called to establish a connection to a service.
@ GNUNET_TESTBED_ET_OPERATION_FINISHED
A requested testbed operation has been completed.
Handle to interact with a GNUnet testbed controller.
uint64_t event_mask
The controller event mask.
void * cc_cls
The closure for controller callback.
GNUNET_TESTBED_ControllerCallback cc
The controller callback.
Event notification from a controller to a client.
Opaque handle to an abstract operation to be executed by the testing framework.
void * cb_cls
Closure for callbacks.
Message sent from client to testing service to obtain the configuration of a peer.
A peer controlled by the testing framework.
Context information for GNUNET_TESTBED_Operation.
Data accessed during service connections.
GNUNET_TESTBED_ConnectAdapter ca
helper function callback to establish the connection
struct GNUNET_CONFIGURATION_Handle * cfg
The acquired configuration of the peer.
enum State state
State information.
char * service_name
Service name.
GNUNET_TESTBED_ServiceConnectCompletionCallback cb
The operation completion callback.
struct OperationContext * opc
The operation context from GNUNET_TESTBED_forward_operation_msg_()
void * op_result
The op_result pointer from ConnectAdapter.
GNUNET_TESTBED_DisconnectAdapter da
helper function callback to close the connection
struct GNUNET_TESTBED_Operation * operation
The operation which created this structure.
void * op_cls
Closure for operation event.
void * cb_cls
The closure for operation completion callback.
void * cada_cls
Closure to the above callbacks.
struct GNUNET_TESTBED_Peer * peer
The peer handle.
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 cont...
void GNUNET_TESTBED_forward_operation_msg_cancel_(struct OperationContext *opc)
Function to cancel an operation created by simply forwarding an operation message.
uint64_t GNUNET_TESTBED_get_next_op_id(struct GNUNET_TESTBED_Controller *controller)
Function to return the operation id for a controller.
struct GNUNET_CONFIGURATION_Handle * GNUNET_TESTBED_extract_config_(const struct GNUNET_MessageHeader *msg)
Generates configuration by uncompressing configuration in given message.
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.
Interface for functions internally exported from testbed_api.c.
struct GNUNET_TESTBED_Operation * GNUNET_TESTBED_operation_create_(void *cls, OperationStart start, OperationRelease release)
Create an 'operation' to be performed.
void GNUNET_TESTBED_operation_queue_insert_(struct OperationQueue *queue, struct GNUNET_TESTBED_Operation *op)
Add an operation to a queue.
void GNUNET_TESTBED_operation_begin_wait_(struct GNUNET_TESTBED_Operation *op)
Marks the given operation as waiting on the queues.
internal API to access the 'operations' subsystem
struct GNUNET_TESTBED_PeerGetConfigurationMessage * GNUNET_TESTBED_generate_peergetconfig_msg_(uint32_t peer_id, uint64_t operation_id)
Generate PeerGetConfigurationMessage.
internal API to access the 'peers' subsystem
@ CFG_REQUEST_QUEUED
The configuration request has been sent.
@ SERVICE_CONNECTED
connected to service
static void opstart_service_connect(void *cls)
Function called when a service connect operation is ready.
static void configuration_receiver(void *cls, const struct GNUNET_MessageHeader *msg)
Type of a function to call when we receive a message from the service.
static void oprelease_service_connect(void *cls)
Callback which will be called when service connect type operation is released.
struct GNUNET_TESTBED_Peer * peer
The peer associated with this model.