X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=src%2Ftestbed%2Ftestbed_api_hosts.h;h=f83ffd148ba9299f47b733f49bac2499b4ffc69b;hb=27c12911f4f2aba2d90099270d70de846e83854f;hp=6e2889eee9df90ea5062c47aa2e301905a20c255;hpb=468fea92f64d600ed635c417d91a235535098372;p=oweals%2Fgnunet.git diff --git a/src/testbed/testbed_api_hosts.h b/src/testbed/testbed_api_hosts.h index 6e2889eee..f83ffd148 100644 --- a/src/testbed/testbed_api_hosts.h +++ b/src/testbed/testbed_api_hosts.h @@ -125,6 +125,18 @@ GNUNET_TESTBED_mark_host_registered_at_ (struct GNUNET_TESTBED_Host *host, *controller); +/** + * Unmarks a host registered at a controller + * + * @param host the host to unmark + * @param controller the controller at which this host has to be unmarked + */ +void +GNUNET_TESTBED_deregister_host_at_ (struct GNUNET_TESTBED_Host *host, + const struct GNUNET_TESTBED_Controller + *const controller); + + /** * Checks whether a host has been registered with the given controller * @@ -139,87 +151,61 @@ GNUNET_TESTBED_is_host_registered_ (const struct GNUNET_TESTBED_Host *host, /** - * (re)sets the operation queue for parallel overlay connects + * Queues the given operation in the queue for parallel overlay connects of the + * given host * * @param h the host handle - * @param npoc the number of parallel overlay connects - the queue size + * @param op the operation to queue in the given host's parally overlay connect + * queue */ void -GNUNET_TESTBED_set_num_parallel_overlay_connects_ (struct - GNUNET_TESTBED_Host *h, - unsigned int npoc); +GNUNET_TESTBED_host_queue_oc_ (struct GNUNET_TESTBED_Host *h, + struct GNUNET_TESTBED_Operation *op); /** - * Releases a time slot thus making it available for be used again + * Handler for GNUNET_MESSAGE_TYPE_TESTBED_ADDHOSTCONFIRM message from + * controller (testbed service) * - * @param h the host handle - * @param index the index of the the time slot - * @param key the key to prove ownership of the timeslot - * @return GNUNET_YES if the time slot is successfully removed; GNUNET_NO if the - * time slot cannot be removed - this could be because of the index - * greater than existing number of time slots or `key' being different + * @param c the controller handler + * @param msg message received + * @return GNUNET_YES if we can continue receiving from service; GNUNET_NO if + * not */ int -GNUNET_TESTBED_release_time_slot_ (struct GNUNET_TESTBED_Host *h, - unsigned int index, void *key); +GNUNET_TESTBED_host_handle_addhostconfirm_ (struct GNUNET_TESTBED_Controller *c, + const struct + GNUNET_TESTBED_HostConfirmedMessage + *msg); /** - * Function to update a time slot + * Sends termination signal to the controller's helper process * - * @param h the host handle - * @param index the index of the time slot to update - * @param key the key to identify ownership of the slot - * @param time the new time - * @param failed should this reading be treated as coming from a fail event + * @param cproc the handle to the controller's helper process */ void -GNUNET_TESTBED_update_time_slot_ (struct GNUNET_TESTBED_Host *h, - unsigned int index, void *key, - struct GNUNET_TIME_Relative time, int failed); +GNUNET_TESTBED_controller_kill_ (struct GNUNET_TESTBED_ControllerProc *cproc); /** - * Returns a timing slot which will be exclusively locked + * Cleans-up the controller's helper process handle * - * @param h the host handle - * @param key a pointer which is associated to the returned slot; should not be - * NULL. It serves as a key to determine the correct owner of the slot - * @return the time slot index in the array of time slots in the controller - * handle + * @param cproc the handle to the controller's helper process */ -unsigned int -GNUNET_TESTBED_get_tslot_ (struct GNUNET_TESTBED_Host *h, void *key); +void +GNUNET_TESTBED_controller_destroy_ (struct GNUNET_TESTBED_ControllerProc + *cproc); /** - * Queues the given operation in the queue for parallel overlay connects of the - * given host + * Resolves the hostname of the host to an ip address * - * @param h the host handle - * @param op the operation to queue in the given host's parally overlay connect - * queue + * @param host the host whose hostname is to be resolved */ void -GNUNET_TESTBED_host_queue_oc_ (struct GNUNET_TESTBED_Host *h, - struct GNUNET_TESTBED_Operation *op); - +GNUNET_TESTBED_host_resolve_ (struct GNUNET_TESTBED_Host *host); -/** - * Handler for GNUNET_MESSAGE_TYPE_TESTBED_ADDHOSTCONFIRM message from - * controller (testbed service) - * - * @param c the controller handler - * @param msg message received - * @return GNUNET_YES if we can continue receiving from service; GNUNET_NO if - * not - */ -int -GNUNET_TESTBED_host_handle_addhostconfirm_ (struct GNUNET_TESTBED_Controller *c, - const struct - GNUNET_TESTBED_HostConfirmedMessage - *msg); #endif /* end of testbed_api_hosts.h */