aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_testbed_service.h
diff options
context:
space:
mode:
authorSree Harsha Totakura <totakura@in.tum.de>2012-07-04 13:49:54 +0000
committerSree Harsha Totakura <totakura@in.tum.de>2012-07-04 13:49:54 +0000
commita93954693fef730d7a41c168b4961d19e5dff90c (patch)
treee3442617d8cc8813b5a1bb487c0bc69e5e7692ae /src/include/gnunet_testbed_service.h
parent15de701534fc172c6622397b6692974f784db3e5 (diff)
downloadgnunet-a93954693fef730d7a41c168b4961d19e5dff90c.tar.gz
gnunet-a93954693fef730d7a41c168b4961d19e5dff90c.zip
-controller startup, connect and duals
Diffstat (limited to 'src/include/gnunet_testbed_service.h')
-rw-r--r--src/include/gnunet_testbed_service.h48
1 files changed, 39 insertions, 9 deletions
diff --git a/src/include/gnunet_testbed_service.h b/src/include/gnunet_testbed_service.h
index 7dd799cf1..d36f5aa8e 100644
--- a/src/include/gnunet_testbed_service.h
+++ b/src/include/gnunet_testbed_service.h
@@ -392,15 +392,45 @@ struct GNUNET_TESTBED_EventInformation
392 * @param event information about the event 392 * @param event information about the event
393 */ 393 */
394typedef void (*GNUNET_TESTBED_ControllerCallback)(void *cls, 394typedef void (*GNUNET_TESTBED_ControllerCallback)(void *cls,
395 const struct GNUNET_TESTBED_EventInformation *event); 395 const struct GNUNET_TESTBED_EventInformation *event);
396 396
397 397
398/** 398/**
399 * Start a controller process using the given configuration at the 399 * Opaque Handle for Controller process
400 */
401struct GNUNET_TESTBED_ControllerProc;
402
403
404/**
405 * Starts a controller process at the host
406 *
407 * @param host the host where the controller has to be started; NULL for localhost
408 * @return the controller process handle
409 */
410struct GNUNET_TESTBED_ControllerProc *
411GNUNET_TESTBED_controller_start (struct GNUNET_TESTBED_Host *host);
412
413
414/**
415 * Stop the controller process (also will terminate all peers and controllers
416 * dependent on this controller). This function blocks until the testbed has
417 * been fully terminated (!).
418 *
419 * @param cproc the controller process handle
420 */
421void
422GNUNET_TESTBED_controller_stop (struct GNUNET_TESTBED_ControllerProc *cproc);
423
424
425/**
426 * Connect to a controller process using the given configuration at the
400 * given host. 427 * given host.
401 * 428 *
402 * @param cfg configuration to use 429 * @param cfg configuration to use
403 * @param host host to run the controller on, NULL for 'localhost' 430 * @param host host to run the controller on; This should be the same host if
431 * the controller was previously started with
432 * GNUNET_TESTBED_controller_start; NULL for localhost
433 * @param host host where this controller is being run;
404 * @param event_mask bit mask with set of events to call 'cc' for; 434 * @param event_mask bit mask with set of events to call 'cc' for;
405 * or-ed values of "1LL" shifted by the 435 * or-ed values of "1LL" shifted by the
406 * respective 'enum GNUNET_TESTBED_EventType' 436 * respective 'enum GNUNET_TESTBED_EventType'
@@ -410,11 +440,11 @@ typedef void (*GNUNET_TESTBED_ControllerCallback)(void *cls,
410 * @return handle to the controller 440 * @return handle to the controller
411 */ 441 */
412struct GNUNET_TESTBED_Controller * 442struct GNUNET_TESTBED_Controller *
413GNUNET_TESTBED_controller_start (const struct GNUNET_CONFIGURATION_Handle *cfg, 443GNUNET_TESTBED_controller_connect (const struct GNUNET_CONFIGURATION_Handle *cfg,
414 struct GNUNET_TESTBED_Host *host, 444 struct GNUNET_TESTBED_Host *host,
415 uint64_t event_mask, 445 uint64_t event_mask,
416 GNUNET_TESTBED_ControllerCallback cc, 446 GNUNET_TESTBED_ControllerCallback cc,
417 void *cc_cls); 447 void *cc_cls);
418 448
419 449
420/** 450/**
@@ -444,7 +474,7 @@ GNUNET_TESTBED_controller_configure_sharing (struct GNUNET_TESTBED_Controller *c
444 * @param controller handle to controller to stop 474 * @param controller handle to controller to stop
445 */ 475 */
446void 476void
447GNUNET_TESTBED_controller_stop (struct GNUNET_TESTBED_Controller *controller); 477GNUNET_TESTBED_controller_disconnect (struct GNUNET_TESTBED_Controller *controller);
448 478
449 479
450/** 480/**