diff options
author | Sree Harsha Totakura <totakura@in.tum.de> | 2012-06-26 19:07:46 +0000 |
---|---|---|
committer | Sree Harsha Totakura <totakura@in.tum.de> | 2012-06-26 19:07:46 +0000 |
commit | 5c9fac9cafe7d0911b80cc1aeab52b2e0d0cff9b (patch) | |
tree | 83d36490d61f8bb6d74bd21818aa47b2f7c37e95 /src/include/gnunet_testbed_service.h | |
parent | 7eb788695c1411f6fbeb05d4fbef302d2a4dd7ee (diff) | |
download | gnunet-5c9fac9cafe7d0911b80cc1aeab52b2e0d0cff9b.tar.gz gnunet-5c9fac9cafe7d0911b80cc1aeab52b2e0d0cff9b.zip |
testbed host registration
Diffstat (limited to 'src/include/gnunet_testbed_service.h')
-rw-r--r-- | src/include/gnunet_testbed_service.h | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/src/include/gnunet_testbed_service.h b/src/include/gnunet_testbed_service.h index a3f092172..7dd799cf1 100644 --- a/src/include/gnunet_testbed_service.h +++ b/src/include/gnunet_testbed_service.h | |||
@@ -448,6 +448,56 @@ GNUNET_TESTBED_controller_stop (struct GNUNET_TESTBED_Controller *controller); | |||
448 | 448 | ||
449 | 449 | ||
450 | /** | 450 | /** |
451 | * Opaque handle for host registration | ||
452 | */ | ||
453 | struct GNUNET_TESTBED_HostRegistrationHandle; | ||
454 | |||
455 | |||
456 | /** | ||
457 | * Callback which will be called to after a host registration succeeded or failed | ||
458 | * | ||
459 | * @param cls the closure | ||
460 | * @param emsg the error message; NULL if host registration is successful | ||
461 | */ | ||
462 | typedef void (* GNUNET_TESTBED_HostRegistrationCompletion) (void *cls, | ||
463 | const char *emsg); | ||
464 | |||
465 | |||
466 | /** | ||
467 | * Register a host with the controller | ||
468 | * | ||
469 | * @param controller the controller handle | ||
470 | * @param host the host to register | ||
471 | * @param cc the completion callback to call to inform the status of | ||
472 | * registration. After calling this callback the registration handle | ||
473 | * will be invalid. Cannot be NULL | ||
474 | * @param cc_cls the closure for the cc | ||
475 | * @return handle to the host registration which can be used to cancel the | ||
476 | * registration; NULL if another registration handle is present and | ||
477 | * is not cancelled | ||
478 | */ | ||
479 | struct GNUNET_TESTBED_HostRegistrationHandle * | ||
480 | GNUNET_TESTBED_register_host (struct GNUNET_TESTBED_Controller *controller, | ||
481 | struct GNUNET_TESTBED_Host *host, | ||
482 | GNUNET_TESTBED_HostRegistrationCompletion cc, | ||
483 | void *cc_cls); | ||
484 | |||
485 | |||
486 | /** | ||
487 | * Cancel the pending registration. Note that the registration message will | ||
488 | * already be queued to be sent to the service, cancellation has only the | ||
489 | * effect that the registration completion callback for the registration is | ||
490 | * never called and from our perspective the host is not registered until the | ||
491 | * completion callback is called. | ||
492 | * | ||
493 | * @param handle the registration handle to cancel | ||
494 | */ | ||
495 | void | ||
496 | GNUNET_TESTBED_cancel_registration (struct GNUNET_TESTBED_HostRegistrationHandle | ||
497 | *handle); | ||
498 | |||
499 | |||
500 | /** | ||
451 | * Create a link from a 'master' controller to a slave controller. | 501 | * Create a link from a 'master' controller to a slave controller. |
452 | * Whenever the master controller is asked to start a peer at the | 502 | * Whenever the master controller is asked to start a peer at the |
453 | * given 'delegated_host', it will delegate the request to the | 503 | * given 'delegated_host', it will delegate the request to the |