aboutsummaryrefslogtreecommitdiff
path: root/src/testbed/testbed_api.h
diff options
context:
space:
mode:
authorSree Harsha Totakura <totakura@in.tum.de>2013-09-05 09:49:58 +0000
committerSree Harsha Totakura <totakura@in.tum.de>2013-09-05 09:49:58 +0000
commit96884ee94297035e20e29eed83d15e38e9e7797b (patch)
tree4ca00d5688e998cce07f7149473bc767869f5a53 /src/testbed/testbed_api.h
parent49f7d44deb51f4cd7f8027d5a1fac9d7ddef1f27 (diff)
downloadgnunet-96884ee94297035e20e29eed83d15e38e9e7797b.tar.gz
gnunet-96884ee94297035e20e29eed83d15e38e9e7797b.zip
- warn and wait for all operations to be completed
Diffstat (limited to 'src/testbed/testbed_api.h')
-rw-r--r--src/testbed/testbed_api.h74
1 files changed, 19 insertions, 55 deletions
diff --git a/src/testbed/testbed_api.h b/src/testbed/testbed_api.h
index 39a2f711a..f09bb61b9 100644
--- a/src/testbed/testbed_api.h
+++ b/src/testbed/testbed_api.h
@@ -27,6 +27,7 @@
27#ifndef TESTBED_API_H 27#ifndef TESTBED_API_H
28#define TESTBED_API_H 28#define TESTBED_API_H
29 29
30#include "gnunet_scheduler_lib.h"
30#include "gnunet_testbed_service.h" 31#include "gnunet_testbed_service.h"
31#include "testbed.h" 32#include "testbed.h"
32#include "testbed_helper.h" 33#include "testbed_helper.h"
@@ -178,6 +179,14 @@ struct OperationContext
178 179
179 180
180/** 181/**
182 * Operation empty callback
183 *
184 * @param cls closure
185 */
186typedef void (*TESTBED_opcq_empty_cb) (void *cls);
187
188
189/**
181 * Handle to interact with a GNUnet testbed controller. Each 190 * Handle to interact with a GNUnet testbed controller. Each
182 * controller has at least one master handle which is created when the 191 * controller has at least one master handle which is created when the
183 * controller is created; this master handle interacts with the 192 * controller is created; this master handle interacts with the
@@ -240,6 +249,16 @@ struct GNUNET_TESTBED_Controller
240 struct GNUNET_CONTAINER_MultiHashMap32 *opc_map; 249 struct GNUNET_CONTAINER_MultiHashMap32 *opc_map;
241 250
242 /** 251 /**
252 * If this callback is not NULL, schedule it as a task when opc_map gets empty
253 */
254 TESTBED_opcq_empty_cb opcq_empty_cb;
255
256 /**
257 * Closure for the above task
258 */
259 void *opcq_empty_cls;
260
261 /**
243 * Operation queue for simultaneous operations 262 * Operation queue for simultaneous operations
244 */ 263 */
245 struct OperationQueue *opq_parallel_operations; 264 struct OperationQueue *opq_parallel_operations;
@@ -442,61 +461,6 @@ GNUNET_TESTBED_get_slave_config_ (void *op_cls,
442 461
443 462
444/** 463/**
445 * Same as the GNUNET_TESTBED_controller_link_2, but with ids for delegated host
446 * and slave host
447 *
448 * @param op_cls the operation closure for the event which is generated to
449 * signal success or failure of this operation
450 * @param master handle to the master controller who creates the association
451 * @param delegated_host_id id of the host to which requests should be delegated
452 * @param slave_host_id id of the host which is used to run the slave controller
453 * @param sxcfg serialized and compressed configuration
454 * @param sxcfg_size the size sxcfg
455 * @param scfg_size the size of uncompressed serialized configuration
456 * @param is_subordinate GNUNET_YES if the controller at delegated_host should
457 * be started by the slave controller; GNUNET_NO if the slave
458 * controller has to connect to the already started delegated
459 * controller via TCP/IP
460 * @return the operation handle
461 */
462struct GNUNET_TESTBED_Operation *
463GNUNET_TESTBED_controller_link_2_ (void *op_cls,
464 struct GNUNET_TESTBED_Controller *master,
465 uint32_t delegated_host_id,
466 uint32_t slave_host_id, const char *sxcfg,
467 size_t sxcfg_size, size_t scfg_size,
468 int is_subordinate);
469
470
471/**
472 * Same as the GNUNET_TESTBED_controller_link, but with ids for delegated host
473 * and slave host
474 *
475 * @param op_cls the operation closure for the event which is generated to
476 * signal success or failure of this operation
477 * @param master handle to the master controller who creates the association
478 * @param delegated_host_id id of the host to which requests should be
479 * delegated; cannot be NULL
480 * @param slave_host_id id of the host which should connect to controller
481 * running on delegated host ; use NULL to make the master controller
482 * connect to the delegated host
483 * @param slave_cfg configuration to use for the slave controller
484 * @param is_subordinate GNUNET_YES if the controller at delegated_host should
485 * be started by the slave controller; GNUNET_NO if the slave
486 * controller has to connect to the already started delegated
487 * controller via TCP/IP
488 * @return the operation handle
489 */
490struct GNUNET_TESTBED_Operation *
491GNUNET_TESTBED_controller_link_ (void *op_cls,
492 struct GNUNET_TESTBED_Controller *master,
493 uint32_t delegated_host_id,
494 uint32_t slave_host_id,
495 const struct GNUNET_CONFIGURATION_Handle
496 *slave_cfg, int is_subordinate);
497
498
499/**
500 * Handler for GNUNET_MESSAGE_TYPE_TESTBED_BARRIER_STATUS messages. This 464 * Handler for GNUNET_MESSAGE_TYPE_TESTBED_BARRIER_STATUS messages. This
501 * function is defined in @file testbed_api_barriers.c 465 * function is defined in @file testbed_api_barriers.c
502 * 466 *