2 This file is part of GNUnet
3 (C) 2008--2012 Christian Grothoff (and other contributing authors)
5 GNUnet is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published
7 by the Free Software Foundation; either version 3, or (at your
8 option) any later version.
10 GNUnet is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with GNUnet; see the file COPYING. If not, write to the
17 Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA.
22 * @file testbed/testbed_api_peers.c
23 * @brief management of the knowledge about peers in this library
24 * (we know the peer ID, its host, pending operations, etc.)
25 * @author Christian Grothoff
26 * @author Sree Harsha Totakura
30 #include "testbed_api_peers.h"
31 #include "testbed_api.h"
33 #include "testbed_api_hosts.h"
34 #include "testbed_api_operations.h"
40 static struct GNUNET_TESTBED_Peer *peer_list_head;
45 static struct GNUNET_TESTBED_Peer *peer_list_tail;
49 * Adds a peer to the peer list
51 * @param peer the peer to add to the peer list
54 GNUNET_TESTBED_peer_register_ (struct GNUNET_TESTBED_Peer *peer)
56 GNUNET_CONTAINER_DLL_insert_tail (peer_list_head, peer_list_tail, peer);
61 * Removes a peer from the peer list
63 * @param peer the peer to remove
66 GNUNET_TESTBED_peer_deregister_ (struct GNUNET_TESTBED_Peer *peer)
68 GNUNET_CONTAINER_DLL_remove (peer_list_head, peer_list_tail, peer);
76 GNUNET_TESTBED_cleanup_peers_ (void)
78 struct GNUNET_TESTBED_Peer *peer;
80 while (NULL != (peer = peer_list_head))
82 GNUNET_TESTBED_peer_deregister_ (peer);
90 * Function to call to start a peer_create type operation once all
91 * queues the operation is part of declare that the
92 * operation can be activated.
94 * @param cls the closure from GNUNET_TESTBED_operation_create_()
97 opstart_peer_create (void *cls)
99 struct OperationContext *opc = cls;
100 struct PeerCreateData *data;
101 struct GNUNET_TESTBED_PeerCreateMessage *msg;
108 GNUNET_assert (OP_PEER_CREATE == opc->type);
109 GNUNET_assert (NULL != (data = opc->data));
110 GNUNET_assert (NULL != data->peer);
111 opc->state = OPC_STATE_STARTED;
112 config = GNUNET_CONFIGURATION_serialize (data->cfg, &c_size);
113 xc_size = GNUNET_TESTBED_compress_config_ (config, c_size, &xconfig);
114 GNUNET_free (config);
115 msize = xc_size + sizeof (struct GNUNET_TESTBED_PeerCreateMessage);
116 msg = GNUNET_realloc (xconfig, msize);
117 memmove (&msg[1], msg, xc_size);
118 msg->header.size = htons (msize);
119 msg->header.type = htons (GNUNET_MESSAGE_TYPE_TESTBED_CREATE_PEER);
120 msg->operation_id = GNUNET_htonll (opc->id);
121 msg->host_id = htonl (GNUNET_TESTBED_host_get_id_ (data->peer->host));
122 msg->peer_id = htonl (data->peer->unique_id);
123 msg->config_size = htonl (c_size);
124 GNUNET_CONTAINER_DLL_insert_tail (opc->c->ocq_head, opc->c->ocq_tail, opc);
125 GNUNET_TESTBED_queue_message_ (opc->c, &msg->header);
130 * Callback which will be called when peer_create type operation is released
132 * @param cls the closure from GNUNET_TESTBED_operation_create_()
135 oprelease_peer_create (void *cls)
137 struct OperationContext *opc = cls;
141 case OPC_STATE_STARTED:
142 GNUNET_CONTAINER_DLL_remove (opc->c->ocq_head, opc->c->ocq_tail, opc);
143 /* No break we continue flow */
145 GNUNET_free (((struct PeerCreateData *) opc->data)->peer);
146 GNUNET_free (opc->data);
148 case OPC_STATE_FINISHED:
156 * Function called when a peer destroy operation is ready
158 * @param cls the closure from GNUNET_TESTBED_operation_create_()
161 opstart_peer_destroy (void *cls)
163 struct OperationContext *opc = cls;
164 struct GNUNET_TESTBED_Peer *peer;
165 struct GNUNET_TESTBED_PeerDestroyMessage *msg;
167 GNUNET_assert (OP_PEER_DESTROY == opc->type);
168 GNUNET_assert (NULL != (peer = opc->data));
169 opc->state = OPC_STATE_STARTED;
170 msg = GNUNET_malloc (sizeof (struct GNUNET_TESTBED_PeerDestroyMessage));
171 msg->header.size = htons (sizeof (struct GNUNET_TESTBED_PeerDestroyMessage));
172 msg->header.type = htons (GNUNET_MESSAGE_TYPE_TESTBED_DESTROY_PEER);
173 msg->peer_id = htonl (peer->unique_id);
174 msg->operation_id = GNUNET_htonll (opc->id);
175 GNUNET_CONTAINER_DLL_insert_tail (opc->c->ocq_head, opc->c->ocq_tail, opc);
176 GNUNET_TESTBED_queue_message_ (peer->controller, &msg->header);
181 * Callback which will be called when peer_create type operation is released
183 * @param cls the closure from GNUNET_TESTBED_operation_create_()
186 oprelease_peer_destroy (void *cls)
188 struct OperationContext *opc = cls;
192 case OPC_STATE_STARTED:
193 GNUNET_CONTAINER_DLL_remove (opc->c->ocq_head, opc->c->ocq_tail, opc);
194 /* no break; continue */
197 case OPC_STATE_FINISHED:
205 * Function called when a peer start operation is ready
207 * @param cls the closure from GNUNET_TESTBED_operation_create_()
210 opstart_peer_start (void *cls)
212 struct OperationContext *opc = cls;
213 struct GNUNET_TESTBED_PeerStartMessage *msg;
214 struct PeerEventData *data;
215 struct GNUNET_TESTBED_Peer *peer;
217 GNUNET_assert (OP_PEER_START == opc->type);
218 GNUNET_assert (NULL != (data = opc->data));
219 GNUNET_assert (NULL != (peer = data->peer));
220 GNUNET_assert ((PS_CREATED == peer->state) || (PS_STOPPED == peer->state));
221 opc->state = OPC_STATE_STARTED;
222 msg = GNUNET_malloc (sizeof (struct GNUNET_TESTBED_PeerStartMessage));
223 msg->header.size = htons (sizeof (struct GNUNET_TESTBED_PeerStartMessage));
224 msg->header.type = htons (GNUNET_MESSAGE_TYPE_TESTBED_START_PEER);
225 msg->peer_id = htonl (peer->unique_id);
226 msg->operation_id = GNUNET_htonll (opc->id);
227 GNUNET_CONTAINER_DLL_insert_tail (opc->c->ocq_head, opc->c->ocq_tail, opc);
228 GNUNET_TESTBED_queue_message_ (peer->controller, &msg->header);
233 * Callback which will be called when peer start type operation is released
235 * @param cls the closure from GNUNET_TESTBED_operation_create_()
238 oprelease_peer_start (void *cls)
240 struct OperationContext *opc = cls;
244 case OPC_STATE_STARTED:
245 GNUNET_CONTAINER_DLL_remove (opc->c->ocq_head, opc->c->ocq_tail, opc);
246 /* no break; continue */
248 GNUNET_free (opc->data);
250 case OPC_STATE_FINISHED:
258 * Function called when a peer stop operation is ready
260 * @param cls the closure from GNUNET_TESTBED_operation_create_()
263 opstart_peer_stop (void *cls)
265 struct OperationContext *opc = cls;
266 struct GNUNET_TESTBED_PeerStopMessage *msg;
267 struct PeerEventData *data;
268 struct GNUNET_TESTBED_Peer *peer;
270 GNUNET_assert (NULL != (data = opc->data));
271 GNUNET_assert (NULL != (peer = data->peer));
272 GNUNET_assert (PS_STARTED == peer->state);
273 opc->state = OPC_STATE_STARTED;
274 msg = GNUNET_malloc (sizeof (struct GNUNET_TESTBED_PeerStopMessage));
275 msg->header.type = htons (GNUNET_MESSAGE_TYPE_TESTBED_STOP_PEER);
276 msg->header.size = htons (sizeof (struct GNUNET_TESTBED_PeerStopMessage));
277 msg->peer_id = htonl (peer->unique_id);
278 msg->operation_id = GNUNET_htonll (opc->id);
279 GNUNET_CONTAINER_DLL_insert_tail (opc->c->ocq_head, opc->c->ocq_tail, opc);
280 GNUNET_TESTBED_queue_message_ (peer->controller, &msg->header);
285 * Callback which will be called when peer stop type operation is released
287 * @param cls the closure from GNUNET_TESTBED_operation_create_()
290 oprelease_peer_stop (void *cls)
292 struct OperationContext *opc = cls;
296 case OPC_STATE_STARTED:
297 GNUNET_CONTAINER_DLL_remove (opc->c->ocq_head, opc->c->ocq_tail, opc);
298 /* no break; continue */
300 GNUNET_free (opc->data);
302 case OPC_STATE_FINISHED:
310 * Generate PeerGetConfigurationMessage
312 * @param peer_id the id of the peer whose information we have to get
313 * @param operation_id the ip of the operation that should be represented in the
315 * @return the PeerGetConfigurationMessage
317 struct GNUNET_TESTBED_PeerGetConfigurationMessage *
318 GNUNET_TESTBED_generate_peergetconfig_msg_ (uint32_t peer_id,
319 uint64_t operation_id)
321 struct GNUNET_TESTBED_PeerGetConfigurationMessage *msg;
324 GNUNET_malloc (sizeof
325 (struct GNUNET_TESTBED_PeerGetConfigurationMessage));
327 htons (sizeof (struct GNUNET_TESTBED_PeerGetConfigurationMessage));
328 msg->header.type = htons (GNUNET_MESSAGE_TYPE_TESTBED_GET_PEER_CONFIGURATION);
329 msg->peer_id = htonl (peer_id);
330 msg->operation_id = GNUNET_htonll (operation_id);
336 * Function called when a peer get information operation is ready
338 * @param cls the closure from GNUNET_TESTBED_operation_create_()
341 opstart_peer_getinfo (void *cls)
343 struct OperationContext *opc = cls;
344 struct PeerInfoData *data;
345 struct GNUNET_TESTBED_PeerGetConfigurationMessage *msg;
347 GNUNET_assert (NULL != (data = opc->data));
348 opc->state = OPC_STATE_STARTED;
350 GNUNET_TESTBED_generate_peergetconfig_msg_ (data->peer->unique_id,
352 GNUNET_CONTAINER_DLL_insert_tail (opc->c->ocq_head, opc->c->ocq_tail, opc);
353 GNUNET_TESTBED_queue_message_ (opc->c, &msg->header);
358 * Callback which will be called when peer stop type operation is released
360 * @param cls the closure from GNUNET_TESTBED_operation_create_()
363 oprelease_peer_getinfo (void *cls)
365 struct OperationContext *opc = cls;
366 struct GNUNET_TESTBED_PeerInformation *data;
370 case OPC_STATE_STARTED:
371 GNUNET_CONTAINER_DLL_remove (opc->c->ocq_head, opc->c->ocq_tail, opc);
372 /* no break; continue */
374 GNUNET_free (opc->data);
376 case OPC_STATE_FINISHED:
377 GNUNET_assert (NULL != (data = opc->data));
380 case GNUNET_TESTBED_PIT_CONFIGURATION:
381 if (NULL != data->result.cfg)
382 GNUNET_CONFIGURATION_destroy (data->result.cfg);
384 case GNUNET_TESTBED_PIT_IDENTITY:
385 GNUNET_free (data->result.id);
388 GNUNET_assert (0); /* We should never reach here */
398 * Function called when a overlay connect operation is ready
400 * @param cls the closure from GNUNET_TESTBED_operation_create_()
403 opstart_overlay_connect (void *cls)
405 struct OperationContext *opc = cls;
406 struct GNUNET_TESTBED_OverlayConnectMessage *msg;
407 struct OverlayConnectData *data;
409 opc->state = OPC_STATE_STARTED;
411 GNUNET_assert (NULL != data);
412 data->tslot_index = GNUNET_TESTBED_get_tslot_ (data->p1->host, data);
413 data->tstart = GNUNET_TIME_absolute_get ();
414 msg = GNUNET_malloc (sizeof (struct GNUNET_TESTBED_OverlayConnectMessage));
416 htons (sizeof (struct GNUNET_TESTBED_OverlayConnectMessage));
417 msg->header.type = htons (GNUNET_MESSAGE_TYPE_TESTBED_OVERLAY_CONNECT);
418 msg->peer1 = htonl (data->p1->unique_id);
419 msg->peer2 = htonl (data->p2->unique_id);
420 msg->operation_id = GNUNET_htonll (opc->id);
421 msg->peer2_host_id = htonl (GNUNET_TESTBED_host_get_id_ (data->p2->host));
422 GNUNET_CONTAINER_DLL_insert_tail (opc->c->ocq_head, opc->c->ocq_tail, opc);
423 GNUNET_TESTBED_queue_message_ (opc->c, &msg->header);
428 * Callback which will be called when overlay connect operation is released
430 * @param cls the closure from GNUNET_TESTBED_operation_create_()
433 oprelease_overlay_connect (void *cls)
435 struct OperationContext *opc = cls;
436 struct GNUNET_TIME_Relative duration;
437 struct OverlayConnectData *data;
444 case OPC_STATE_STARTED:
445 (void) GNUNET_TESTBED_release_time_slot_ (data->p1->host, data->tslot_index,
447 GNUNET_CONTAINER_DLL_remove (opc->c->ocq_head, opc->c->ocq_tail, opc);
449 case OPC_STATE_FINISHED:
450 duration = GNUNET_TIME_absolute_get_duration (data->tstart);
451 GNUNET_TESTBED_update_time_slot_ (data->p1->host, data->tslot_index, data,
452 duration, data->failed);
460 * Lookup a peer by ID.
462 * @param id global peer ID assigned to the peer
463 * @return handle to the host, NULL on error
465 struct GNUNET_TESTBED_Peer *
466 GNUNET_TESTBED_peer_lookup_by_id_ (uint32_t id)
474 * Create the given peer at the specified host using the given
475 * controller. If the given controller is not running on the target
476 * host, it should find or create a controller at the target host and
477 * delegate creating the peer. Explicit delegation paths can be setup
478 * using 'GNUNET_TESTBED_controller_link'. If no explicit delegation
479 * path exists, a direct link with a subordinate controller is setup
480 * for the first delegated peer to a particular host; the subordinate
481 * controller is then destroyed once the last peer that was delegated
482 * to the remote host is stopped.
484 * Creating the peer only creates the handle to manipulate and further
485 * configure the peer; use "GNUNET_TESTBED_peer_start" and
486 * "GNUNET_TESTBED_peer_stop" to actually start/stop the peer's
489 * Note that the given configuration will be adjusted by the
490 * controller to avoid port/path conflicts with other peers.
491 * The "final" configuration can be obtained using
492 * 'GNUNET_TESTBED_peer_get_information'.
494 * @param controller controller process to use
495 * @param host host to run the peer on; cannot be NULL
496 * @param cfg Template configuration to use for the peer. Should exist until
497 * operation is cancelled or GNUNET_TESTBED_operation_done() is called
498 * @param cb the callback to call when the peer has been created
499 * @param cls the closure to the above callback
500 * @return the operation handle
502 struct GNUNET_TESTBED_Operation *
503 GNUNET_TESTBED_peer_create (struct GNUNET_TESTBED_Controller *controller,
504 struct GNUNET_TESTBED_Host *host,
505 const struct GNUNET_CONFIGURATION_Handle *cfg,
506 GNUNET_TESTBED_PeerCreateCallback cb, void *cls)
509 struct GNUNET_TESTBED_Peer *peer;
510 struct PeerCreateData *data;
511 struct OperationContext *opc;
512 static uint32_t id_gen;
514 peer = GNUNET_malloc (sizeof (struct GNUNET_TESTBED_Peer));
515 peer->controller = controller;
517 peer->unique_id = id_gen++;
518 peer->state = PS_INVALID;
519 data = GNUNET_malloc (sizeof (struct PeerCreateData));
525 opc = GNUNET_malloc (sizeof (struct OperationContext));
528 opc->id = GNUNET_TESTBED_get_next_op_id (controller);
529 opc->type = OP_PEER_CREATE;
531 GNUNET_TESTBED_operation_create_ (opc, &opstart_peer_create,
532 &oprelease_peer_create);
533 GNUNET_TESTBED_operation_queue_insert_ (controller->opq_parallel_operations,
535 GNUNET_TESTBED_operation_begin_wait_ (opc->op);
541 * Start the given peer.
543 * @param op_cls the closure for this operation; will be set in
544 * event->details.operation_finished.op_cls when this operation fails.
545 * @param peer peer to start
546 * @param pcc function to call upon completion
547 * @param pcc_cls closure for 'pcc'
548 * @return handle to the operation
550 struct GNUNET_TESTBED_Operation *
551 GNUNET_TESTBED_peer_start (void *op_cls, struct GNUNET_TESTBED_Peer *peer,
552 GNUNET_TESTBED_PeerChurnCallback pcc, void *pcc_cls)
554 struct OperationContext *opc;
555 struct PeerEventData *data;
557 data = GNUNET_malloc (sizeof (struct PeerEventData));
560 data->pcc_cls = pcc_cls;
561 opc = GNUNET_malloc (sizeof (struct OperationContext));
562 opc->c = peer->controller;
564 opc->op_cls = op_cls;
565 opc->id = GNUNET_TESTBED_get_next_op_id (opc->c);
566 opc->type = OP_PEER_START;
568 GNUNET_TESTBED_operation_create_ (opc, &opstart_peer_start,
569 &oprelease_peer_start);
570 GNUNET_TESTBED_operation_queue_insert_ (opc->c->opq_parallel_operations,
572 GNUNET_TESTBED_operation_begin_wait_ (opc->op);
578 * Stop the given peer. The handle remains valid (use
579 * "GNUNET_TESTBED_peer_destroy" to fully clean up the
580 * state of the peer).
582 * @param op_cls the closure for this operation; will be set in the event
584 * @param peer peer to stop
585 * @param pcc function to call upon completion
586 * @param pcc_cls closure for 'pcc'
587 * @return handle to the operation
589 struct GNUNET_TESTBED_Operation *
590 GNUNET_TESTBED_peer_stop (void *op_cls,
591 struct GNUNET_TESTBED_Peer *peer,
592 GNUNET_TESTBED_PeerChurnCallback pcc, void *pcc_cls)
594 struct OperationContext *opc;
595 struct PeerEventData *data;
597 data = GNUNET_malloc (sizeof (struct PeerEventData));
600 data->pcc_cls = pcc_cls;
601 opc = GNUNET_malloc (sizeof (struct OperationContext));
602 opc->c = peer->controller;
604 opc->op_cls = op_cls;
605 opc->id = GNUNET_TESTBED_get_next_op_id (opc->c);
606 opc->type = OP_PEER_STOP;
608 GNUNET_TESTBED_operation_create_ (opc, &opstart_peer_stop,
609 &oprelease_peer_stop);
610 GNUNET_TESTBED_operation_queue_insert_ (opc->c->opq_parallel_operations,
612 GNUNET_TESTBED_operation_begin_wait_ (opc->op);
618 * Request information about a peer. The controller callback will not be called
619 * with event type GNUNET_TESTBED_ET_OPERATION_FINISHED when result for this
620 * operation is available. Instead, the GNUNET_TESTBED_PeerInfoCallback() will
623 * @param peer peer to request information about
624 * @param pit desired information
625 * @param cb the convenience callback to be called when results for this
626 * operation are available
627 * @param cb_cls the closure for the above callback
628 * @return handle to the operation
630 struct GNUNET_TESTBED_Operation *
631 GNUNET_TESTBED_peer_get_information (struct GNUNET_TESTBED_Peer *peer,
632 enum GNUNET_TESTBED_PeerInformationType
633 pit, GNUNET_TESTBED_PeerInfoCallback cb,
636 struct OperationContext *opc;
637 struct PeerInfoData *data;
639 GNUNET_assert (GNUNET_TESTBED_PIT_GENERIC != pit);
640 GNUNET_assert (NULL != cb);
641 data = GNUNET_malloc (sizeof (struct PeerInfoData));
645 data->cb_cls = cb_cls;
646 opc = GNUNET_malloc (sizeof (struct OperationContext));
647 opc->c = peer->controller;
649 opc->type = OP_PEER_INFO;
650 opc->id = GNUNET_TESTBED_get_next_op_id (opc->c);
652 GNUNET_TESTBED_operation_create_ (opc, &opstart_peer_getinfo,
653 &oprelease_peer_getinfo);
654 GNUNET_TESTBED_operation_queue_insert_ (opc->c->opq_parallel_operations,
656 GNUNET_TESTBED_operation_begin_wait_ (opc->op);
662 * Change peer configuration. Must only be called while the
663 * peer is stopped. Ports and paths cannot be changed this
666 * @param peer peer to change configuration for
667 * @param cfg new configuration (differences to existing
668 * configuration only)
669 * @return handle to the operation
671 struct GNUNET_TESTBED_Operation *
672 GNUNET_TESTBED_peer_update_configuration (struct GNUNET_TESTBED_Peer *peer,
674 GNUNET_CONFIGURATION_Handle *cfg)
676 // FIXME: handle locally or delegate...
683 * Destroy the given peer; the peer should have been
684 * stopped first (if it was started).
686 * @param peer peer to stop
687 * @return handle to the operation
689 struct GNUNET_TESTBED_Operation *
690 GNUNET_TESTBED_peer_destroy (struct GNUNET_TESTBED_Peer *peer)
692 struct OperationContext *opc;
694 opc = GNUNET_malloc (sizeof (struct OperationContext));
696 opc->c = peer->controller;
697 opc->id = GNUNET_TESTBED_get_next_op_id (peer->controller);
698 opc->type = OP_PEER_DESTROY;
700 GNUNET_TESTBED_operation_create_ (opc, &opstart_peer_destroy,
701 &oprelease_peer_destroy);
702 GNUNET_TESTBED_operation_queue_insert_ (opc->c->opq_parallel_operations,
704 GNUNET_TESTBED_operation_begin_wait_ (opc->op);
710 * Manipulate the P2P underlay topology by configuring a link
713 * @param op_cls closure argument to give with the operation event
714 * @param p1 first peer
715 * @param p2 second peer
716 * @param co option to change
717 * @param ... option-specific values
718 * @return handle to the operation, NULL if configuring the link at this
719 * time is not allowed
721 struct GNUNET_TESTBED_Operation *
722 GNUNET_TESTBED_underlay_configure_link (void *op_cls,
723 struct GNUNET_TESTBED_Peer *p1,
724 struct GNUNET_TESTBED_Peer *p2,
725 enum GNUNET_TESTBED_ConnectOption co,
734 * Both peers must have been started before calling this function.
735 * This function then obtains a HELLO from 'p1', gives it to 'p2'
736 * and asks 'p2' to connect to 'p1'.
738 * @param op_cls closure argument to give with the operation event
739 * @param cb the callback to call when this operation has finished
740 * @param cb_cls the closure for the above callback
741 * @param p1 first peer
742 * @param p2 second peer
743 * @return handle to the operation, NULL if connecting these two
744 * peers is fundamentally not possible at this time (peers
745 * not running or underlay disallows)
747 struct GNUNET_TESTBED_Operation *
748 GNUNET_TESTBED_overlay_connect (void *op_cls,
749 GNUNET_TESTBED_OperationCompletionCallback cb,
750 void *cb_cls, struct GNUNET_TESTBED_Peer *p1,
751 struct GNUNET_TESTBED_Peer *p2)
753 struct OperationContext *opc;
754 struct OverlayConnectData *data;
756 GNUNET_assert ((PS_STARTED == p1->state) && (PS_STARTED == p2->state));
757 data = GNUNET_malloc (sizeof (struct OverlayConnectData));
761 data->cb_cls = cb_cls;
762 opc = GNUNET_malloc (sizeof (struct OperationContext));
764 opc->c = p1->controller;
765 opc->id = GNUNET_TESTBED_get_next_op_id (opc->c);
766 opc->type = OP_OVERLAY_CONNECT;
767 opc->op_cls = op_cls;
769 GNUNET_TESTBED_operation_create_ (opc, &opstart_overlay_connect,
770 &oprelease_overlay_connect);
771 GNUNET_TESTBED_host_queue_oc_ (p1->host, opc->op);
772 GNUNET_TESTBED_operation_begin_wait_ (opc->op);
778 /* end of testbed_api_peers.c */