2 This file is part of GNUnet.
3 Copyright (C) 2008--2013, 2016 GNUnet e.V.
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., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
22 * @file testbed/gnunet-service-testbed.c
23 * @brief implementation of the TESTBED service
24 * @author Sree Harsha Totakura
27 #include "gnunet-service-testbed.h"
28 #include "gnunet-service-testbed_barriers.h"
29 #include "gnunet-service-testbed_connectionpool.h"
38 struct GNUNET_CONFIGURATION_Handle *GST_config;
41 * The master context; generated with the first INIT message
43 struct Context *GST_context;
48 struct GNUNET_TESTBED_Host **GST_host_list;
51 * DLL head for forwarded operation contexts
53 struct ForwardedOperationContext *fopcq_head;
56 * DLL tail for forwarded operation contexts
58 struct ForwardedOperationContext *fopcq_tail;
61 * Operation queue for open file descriptors
63 struct OperationQueue *GST_opq_openfds;
66 * Timeout for operations which may take some time
68 const struct GNUNET_TIME_Relative GST_timeout;
71 * The size of the host list
73 unsigned int GST_host_list_size;
76 * The size of the peer list
78 unsigned int GST_peer_list_size;
81 /***********************************/
82 /* Local definitions and variables */
83 /***********************************/
86 * Our hostname; we give this to all the peers we start
88 static char *hostname;
92 * Function to add a host to the current list of known hosts
94 * @param host the host to add
95 * @return #GNUNET_OK on success; #GNUNET_SYSERR on failure due to host-id
99 host_list_add (struct GNUNET_TESTBED_Host *host)
103 host_id = GNUNET_TESTBED_host_get_id_ (host);
104 if (GST_host_list_size <= host_id)
105 GST_array_grow_large_enough (GST_host_list, GST_host_list_size, host_id);
106 if (NULL != GST_host_list[host_id])
108 LOG_DEBUG ("A host with id: %u already exists\n", host_id);
109 return GNUNET_SYSERR;
111 GST_host_list[host_id] = host;
117 * Send operation failure message to client
119 * @param client the client to which the failure message has to be sent to
120 * @param operation_id the id of the failed operation
121 * @param emsg the error message; can be NULL
124 GST_send_operation_fail_msg (struct GNUNET_SERVICE_Client *client,
125 uint64_t operation_id,
128 struct GNUNET_MQ_Envelope *env;
129 struct GNUNET_TESTBED_OperationFailureEventMessage *msg;
132 emsg_len = (NULL == emsg) ? 0 : strlen (emsg) + 1;
133 env = GNUNET_MQ_msg_extra (msg,
135 GNUNET_MESSAGE_TYPE_TESTBED_OPERATION_FAIL_EVENT);
136 msg->event_type = htonl (GNUNET_TESTBED_ET_OPERATION_FINISHED);
137 msg->operation_id = GNUNET_htonll (operation_id);
138 GNUNET_memcpy (&msg[1],
141 GNUNET_MQ_send (GNUNET_SERVICE_client_get_mq (client),
147 * Function to send generic operation success message to given client
149 * @param client the client to send the message to
150 * @param operation_id the id of the operation which was successful
153 GST_send_operation_success_msg (struct GNUNET_SERVICE_Client *client,
154 uint64_t operation_id)
156 struct GNUNET_MQ_Envelope *env;
157 struct GNUNET_TESTBED_GenericOperationSuccessEventMessage *msg;
159 env = GNUNET_MQ_msg (msg,
160 GNUNET_MESSAGE_TYPE_TESTBED_GENERIC_OPERATION_SUCCESS);
161 msg->operation_id = GNUNET_htonll (operation_id);
162 msg->event_type = htonl (GNUNET_TESTBED_ET_OPERATION_FINISHED);
163 GNUNET_MQ_send (GNUNET_SERVICE_client_get_mq (client),
169 * Callback which will be called after a host registration succeeded or failed
171 * @param cls the handle to the slave at which the registration is completed
172 * @param emsg the error message; NULL if host registration is successful
175 hr_completion (void *cls,
180 * Attempts to register the next host in the host registration queue
182 * @param slave the slave controller whose host registration queue is checked
183 * for host registrations
186 register_next_host (struct Slave *slave)
188 struct HostRegistration *hr;
190 hr = slave->hr_dll_head;
191 GNUNET_assert (NULL != hr);
192 GNUNET_assert (NULL == slave->rhandle);
193 LOG (GNUNET_ERROR_TYPE_DEBUG, "Registering host %u at %u\n",
194 GNUNET_TESTBED_host_get_id_ (hr->host),
195 GNUNET_TESTBED_host_get_id_ (GST_host_list[slave->host_id]));
197 = GNUNET_TESTBED_register_host (slave->controller,
205 * Callback which will be called to after a host registration succeeded or failed
207 * @param cls the handle to the slave at which the registration is completed
208 * @param emsg the error message; NULL if host registration is successful
211 hr_completion (void *cls,
214 struct Slave *slave = cls;
215 struct HostRegistration *hr;
217 slave->rhandle = NULL;
218 hr = slave->hr_dll_head;
219 GNUNET_assert (NULL != hr);
220 LOG (GNUNET_ERROR_TYPE_DEBUG,
221 "Registering host %u at %u successful\n",
222 GNUNET_TESTBED_host_get_id_ (hr->host),
223 GNUNET_TESTBED_host_get_id_ (GST_host_list[slave->host_id]));
224 GNUNET_CONTAINER_DLL_remove (slave->hr_dll_head,
231 if (NULL != slave->hr_dll_head)
232 register_next_host (slave);
237 * Adds a host registration's request to a slave's registration queue
239 * @param slave the slave controller at which the given host has to be
241 * @param cb the host registration completion callback
242 * @param cb_cls the closure for the host registration completion callback
243 * @param host the host which has to be registered
246 GST_queue_host_registration (struct Slave *slave,
247 GNUNET_TESTBED_HostRegistrationCompletion cb,
249 struct GNUNET_TESTBED_Host *host)
251 struct HostRegistration *hr;
254 LOG (GNUNET_ERROR_TYPE_DEBUG,
255 "Queueing host registration for host %u at %u\n",
256 GNUNET_TESTBED_host_get_id_ (host),
257 GNUNET_TESTBED_host_get_id_ (GST_host_list[slave->host_id]));
258 hr = GNUNET_new (struct HostRegistration);
262 call_register = (NULL == slave->hr_dll_head) ? GNUNET_YES : GNUNET_NO;
263 GNUNET_CONTAINER_DLL_insert_tail (slave->hr_dll_head,
266 if (GNUNET_YES == call_register)
267 register_next_host (slave);
272 * Callback to relay the reply msg of a forwarded operation back to the client
274 * @param cls ForwardedOperationContext
275 * @param msg the message to relay
278 GST_forwarded_operation_reply_relay (void *cls,
279 const struct GNUNET_MessageHeader *msg)
281 struct ForwardedOperationContext *fopc = cls;
282 struct GNUNET_MQ_Envelope *env;
284 LOG_DEBUG ("Relaying message with type: %u, size: %u\n",
287 env = GNUNET_MQ_msg_copy (msg);
288 GNUNET_MQ_send (GNUNET_SERVICE_client_get_mq (fopc->client),
290 GNUNET_SCHEDULER_cancel (fopc->timeout_task);
291 GNUNET_CONTAINER_DLL_remove (fopcq_head,
299 * Task to free resources when forwarded operation has been timed out
301 * @param cls the ForwardedOperationContext
304 GST_forwarded_operation_timeout (void *cls)
306 struct ForwardedOperationContext *fopc = cls;
308 fopc->timeout_task = NULL;
309 GNUNET_TESTBED_forward_operation_msg_cancel_ (fopc->opc);
310 LOG (GNUNET_ERROR_TYPE_DEBUG,
311 "A forwarded operation has timed out\n");
312 GST_send_operation_fail_msg (fopc->client,
314 "A forwarded operation has timed out");
315 GNUNET_CONTAINER_DLL_remove (fopcq_head,
323 * Parse service sharing specification line.
324 * Format is "[<service:share>] [<service:share>] ..."
326 * @param ss_str the spec string to be parsed
327 * @param cfg the configuration to use for shared services
328 * @return an array suitable to pass to GNUNET_TESTING_system_create(). NULL
329 * upon empty service sharing specification.
331 static struct GNUNET_TESTING_SharedService *
332 parse_shared_services (char *ss_str,
333 struct GNUNET_CONFIGURATION_Handle *cfg)
335 struct GNUNET_TESTING_SharedService ss;
336 struct GNUNET_TESTING_SharedService *slist;
342 GNUNET_array_grow (slist, n, n+1); \
343 GNUNET_memcpy (&slist[n - 1], &ss, \
344 sizeof (struct GNUNET_TESTING_SharedService)); \
350 for (; NULL != (arg = strtok (ss_str, " ")); ss_str = NULL)
354 if (2 != sscanf (arg, "%255[^:]:%u",
358 LOG (GNUNET_ERROR_TYPE_WARNING,
359 "Ignoring shared service spec: %s",
363 LOG_DEBUG ("Will be sharing %s service among %u peers\n",
366 ss.service = GNUNET_strdup (service);
371 /* Add trailing NULL block */
374 sizeof (struct GNUNET_TESTING_SharedService));
383 * Check #GNUNET_MESSAGE_TYPE_TESTBED_INIT messages
385 * @param cls identification of the client
386 * @param message the actual message
387 * @return #GNUNET_OK if @a message is well-formed
390 check_init (void *cls,
391 const struct GNUNET_TESTBED_InitMessage *msg)
393 const char *controller_hostname;
396 msize = ntohs (msg->header.size) - sizeof (struct GNUNET_TESTBED_InitMessage);
397 controller_hostname = (const char *) &msg[1];
398 if ('\0' != controller_hostname[msize - 1])
401 return GNUNET_SYSERR;
408 * Message handler for #GNUNET_MESSAGE_TYPE_TESTBED_INIT messages
410 * @param cls identification of the client
411 * @param message the actual message
414 handle_init (void *cls,
415 const struct GNUNET_TESTBED_InitMessage *msg)
417 struct GNUNET_SERVICE_Client *client = cls;
418 struct GNUNET_TESTBED_Host *host;
419 const char *controller_hostname;
421 struct GNUNET_TESTING_SharedService *ss;
424 if (NULL != GST_context)
426 LOG_DEBUG ("We are being connected to laterally\n");
427 GNUNET_SERVICE_client_continue (client);
430 controller_hostname = (const char *) &msg[1];
434 GNUNET_CONFIGURATION_get_value_string (GST_config,
439 ss = parse_shared_services (ss_str,
441 GNUNET_free (ss_str);
444 GST_context = GNUNET_new (struct Context);
445 GST_context->client = client;
446 GST_context->host_id = ntohl (msg->host_id);
447 GST_context->master_ip = GNUNET_strdup (controller_hostname);
448 LOG_DEBUG ("Our IP: %s\n",
449 GST_context->master_ip);
451 = GNUNET_TESTING_system_create ("testbed",
452 GST_context->master_ip,
457 for (cnt = 0; NULL != ss[cnt].service; cnt++)
459 ss_str = (char *) ss[cnt].service;
460 GNUNET_free (ss_str);
466 GNUNET_TESTBED_host_create_with_id (GST_context->host_id,
467 GST_context->master_ip,
471 host_list_add (host);
472 LOG_DEBUG ("Created master context with host ID: %u\n",
473 GST_context->host_id);
474 GNUNET_SERVICE_client_continue (client);
479 * Check #GNUNET_MESSAGE_TYPE_TESTBED_ADDHOST messages
481 * @param cls identification of the client
482 * @param msg the actual message
483 * @return #GNUNET_OK if @a message is well-formed
486 check_add_host (void *cls,
487 const struct GNUNET_TESTBED_AddHostMessage *msg)
489 uint16_t username_length;
490 uint16_t hostname_length;
493 msize = ntohs (msg->header.size) - sizeof (struct GNUNET_TESTBED_AddHostMessage);
494 username_length = ntohs (msg->username_length);
495 hostname_length = ntohs (msg->hostname_length);
496 /* msg must contain hostname */
497 if ( (msize <= username_length) ||
498 (0 == hostname_length) )
501 return GNUNET_SYSERR;
503 /* msg must contain configuration */
504 if (msize <= username_length + hostname_length)
507 return GNUNET_SYSERR;
514 * Message handler for #GNUNET_MESSAGE_TYPE_TESTBED_ADDHOST messages
516 * @param cls identification of the client
517 * @param msg the actual message
520 handle_add_host (void *cls,
521 const struct GNUNET_TESTBED_AddHostMessage *msg)
523 struct GNUNET_SERVICE_Client *client = cls;
524 struct GNUNET_TESTBED_Host *host;
525 struct GNUNET_TESTBED_HostConfirmedMessage *reply;
526 struct GNUNET_CONFIGURATION_Handle *host_cfg;
532 uint16_t username_length;
533 uint16_t hostname_length;
534 struct GNUNET_MQ_Envelope *env;
536 username_length = ntohs (msg->username_length);
537 hostname_length = ntohs (msg->hostname_length);
541 if (0 != username_length)
543 username = GNUNET_malloc (username_length + 1);
544 strncpy (username, ptr, username_length);
545 ptr += username_length;
547 hostname = GNUNET_malloc (hostname_length + 1);
551 if (NULL == (host_cfg = GNUNET_TESTBED_extract_config_ (&msg->header)))
553 GNUNET_free_non_null (username);
554 GNUNET_free_non_null (hostname);
556 GNUNET_SERVICE_client_drop (client);
559 host_id = ntohl (msg->host_id);
560 LOG_DEBUG ("Received ADDHOST %u message\n", host_id);
561 LOG_DEBUG ("-------host id: %u\n", host_id);
562 LOG_DEBUG ("-------hostname: %s\n", hostname);
563 if (NULL != username)
564 LOG_DEBUG ("-------username: %s\n", username);
566 LOG_DEBUG ("-------username: <not given>\n");
567 LOG_DEBUG ("-------ssh port: %u\n", ntohs (msg->ssh_port));
568 host = GNUNET_TESTBED_host_create_with_id (host_id,
572 ntohs (msg->ssh_port));
573 GNUNET_free_non_null (username);
574 GNUNET_free (hostname);
575 GNUNET_CONFIGURATION_destroy (host_cfg);
579 GNUNET_SERVICE_client_drop (client);
582 if (GNUNET_OK != host_list_add (host))
584 /* We are unable to add a host */
585 emsg = "A host exists with given host-id";
589 GNUNET_TESTBED_host_destroy (host);
590 env = GNUNET_MQ_msg_extra (reply,
592 GNUNET_MESSAGE_TYPE_TESTBED_ADD_HOST_SUCCESS);
593 GNUNET_memcpy (&reply[1],
599 LOG_DEBUG ("Added host %u at %u\n",
601 GST_context->host_id);
602 env = GNUNET_MQ_msg (reply,
603 GNUNET_MESSAGE_TYPE_TESTBED_ADD_HOST_SUCCESS);
605 reply->host_id = htonl (host_id);
606 GNUNET_MQ_send (GNUNET_SERVICE_client_get_mq (client),
608 GNUNET_SERVICE_client_continue (client);
613 * Handler for #GNUNET_MESSAGE_TYPE_TESTBED_GETSLAVECONFIG messages
615 * @param cls identification of the client
616 * @param msg the actual message
619 handle_slave_get_config (void *cls,
620 const struct GNUNET_TESTBED_SlaveGetConfigurationMessage *msg)
622 struct GNUNET_SERVICE_Client *client = cls;
624 struct GNUNET_TESTBED_SlaveConfiguration *reply;
625 const struct GNUNET_CONFIGURATION_Handle *cfg;
626 struct GNUNET_MQ_Envelope *env;
634 slave_id = ntohl (msg->slave_id);
635 op_id = GNUNET_ntohll (msg->operation_id);
636 if ( (GST_slave_list_size <= slave_id) ||
637 (NULL == GST_slave_list[slave_id]) )
639 /* FIXME: Add forwardings for this type of message here.. */
640 GST_send_operation_fail_msg (client,
643 GNUNET_SERVICE_client_continue (client);
646 slave = GST_slave_list[slave_id];
647 GNUNET_assert (NULL != (cfg = GNUNET_TESTBED_host_get_cfg_ (GST_host_list[slave->host_id])));
648 config = GNUNET_CONFIGURATION_serialize (cfg,
650 /* FIXME: maybe we want to transmit the delta to the default here? */
651 xconfig_size = GNUNET_TESTBED_compress_config_ (config,
654 GNUNET_free (config);
655 GNUNET_assert (xconfig_size + sizeof (struct GNUNET_TESTBED_SlaveConfiguration) <= UINT16_MAX);
656 GNUNET_assert (xconfig_size <= UINT16_MAX);
657 env = GNUNET_MQ_msg_extra (reply,
659 GNUNET_MESSAGE_TYPE_TESTBED_SLAVE_CONFIGURATION);
660 reply->slave_id = msg->slave_id;
661 reply->operation_id = msg->operation_id;
662 reply->config_size = htons ((uint16_t) config_size);
663 GNUNET_memcpy (&reply[1],
666 GNUNET_free (xconfig);
667 GNUNET_MQ_send (GNUNET_SERVICE_client_get_mq (client),
669 GNUNET_SERVICE_client_continue (client);
674 * Clears the forwarded operations queue
679 struct ForwardedOperationContext *fopc;
681 while (NULL != (fopc = fopcq_head))
683 GNUNET_CONTAINER_DLL_remove (fopcq_head,
686 GNUNET_TESTBED_forward_operation_msg_cancel_ (fopc->opc);
687 if (NULL != fopc->timeout_task)
688 GNUNET_SCHEDULER_cancel (fopc->timeout_task);
692 GNUNET_free (fopc->cls);
694 case OP_SHUTDOWN_PEERS:
696 struct HandlerContext_ShutdownPeers *hc = fopc->cls;
698 GNUNET_assert (0 < hc->nslaves);
700 if (0 == hc->nslaves)
706 case OP_PEER_DESTROY:
708 case OP_OVERLAY_CONNECT:
709 case OP_LINK_CONTROLLERS:
710 case OP_GET_SLAVE_CONFIG:
711 case OP_MANAGE_SERVICE:
712 case OP_PEER_RECONFIGURE:
723 * Task to clean up and shutdown nicely
728 shutdown_task (void *cls)
732 LOG_DEBUG ("Shutting down testbed service\n");
733 /* cleanup any remaining forwarded operations */
740 GST_neighbour_list_clean();
742 /* Clear peer list */
743 GST_destroy_peers ();
744 /* Clear route list */
745 GST_route_list_clear ();
746 /* Clear GST_slave_list */
747 GST_slave_list_clear ();
748 /* Clear host list */
749 for (id = 0; id < GST_host_list_size; id++)
750 if (NULL != GST_host_list[id])
751 GNUNET_TESTBED_host_destroy (GST_host_list[id]);
752 GNUNET_free_non_null (GST_host_list);
753 if (NULL != GST_context)
755 GNUNET_free_non_null (GST_context->master_ip);
756 if (NULL != GST_context->system)
757 GNUNET_TESTING_system_destroy (GST_context->system,
759 GNUNET_free (GST_context);
762 GNUNET_free_non_null (hostname);
763 /* Free hello cache */
765 GST_connection_pool_destroy ();
766 GNUNET_TESTBED_operation_queue_destroy_ (GST_opq_openfds);
767 GST_opq_openfds = NULL;
768 GST_stats_destroy ();
769 GST_barriers_destroy ();
770 GNUNET_CONFIGURATION_destroy (GST_config);
775 * Callback for client connect
778 * @param client the client which has disconnected
779 * @param mq queue for sending messages to @a client
783 client_connect_cb (void *cls,
784 struct GNUNET_SERVICE_Client *client,
785 struct GNUNET_MQ_Handle *mq)
792 * Callback for client disconnect
795 * @param client the client which has disconnected
796 * @param app_ctx should match @a client
799 client_disconnect_cb (void *cls,
800 struct GNUNET_SERVICE_Client *client,
803 struct ForwardedOperationContext *fopc;
804 struct ForwardedOperationContext *fopcn;
806 GNUNET_assert (client == app_ctx);
807 GST_notify_client_disconnect_oc (client);
808 GST_link_notify_disconnect (client);
809 GST_notify_client_disconnect_peers (client);
810 for (fopc = fopcq_head; NULL != fopc; fopc = fopcn)
813 if (fopc->client == client)
815 /* handle as if it were a timeout */
816 GNUNET_SCHEDULER_cancel (fopc->timeout_task);
817 GST_forwarded_operation_timeout (fopc);
820 if (NULL == GST_context)
822 if (client == GST_context->client)
824 LOG (GNUNET_ERROR_TYPE_DEBUG,
825 "Master client disconnected\n");
826 GST_context->client = NULL;
827 /* should not be needed as we're terminated by failure to read
828 * from stdin, but if stdin fails for some reason, this shouldn't
829 * hurt for now --- might need to revise this later if we ever
830 * decide that master connections might be temporarily down
832 //GNUNET_SCHEDULER_shutdown ();
841 * @param cfg configuration to use
842 * @param service the initialized server
845 testbed_run (void *cls,
846 const struct GNUNET_CONFIGURATION_Handle *cfg,
847 struct GNUNET_SERVICE_Handle *service)
850 unsigned long long num;
852 LOG_DEBUG ("Starting testbed\n");
854 GNUNET_CONFIGURATION_get_value_filename (cfg, "TESTBED", "LOG_FILE",
857 GNUNET_break (GNUNET_OK ==
858 GNUNET_log_setup ("testbed",
861 GNUNET_free (logfile);
863 GNUNET_assert (GNUNET_OK ==
864 GNUNET_CONFIGURATION_get_value_number (cfg,
868 GST_cache_init ((unsigned int) num);
869 GST_connection_pool_init ((unsigned int) num);
870 GNUNET_assert (GNUNET_OK ==
871 GNUNET_CONFIGURATION_get_value_number (cfg,
875 GST_opq_openfds = GNUNET_TESTBED_operation_queue_create_ (OPERATION_QUEUE_TYPE_FIXED,
877 GNUNET_assert (GNUNET_OK ==
878 GNUNET_CONFIGURATION_get_value_time (cfg,
881 (struct GNUNET_TIME_Relative *)
883 GNUNET_assert (GNUNET_OK ==
884 GNUNET_CONFIGURATION_get_value_string (cfg,
888 GST_config = GNUNET_CONFIGURATION_dup (cfg);
889 GNUNET_SCHEDULER_add_shutdown (&shutdown_task,
891 LOG_DEBUG ("Testbed startup complete\n");
892 GST_stats_init (GST_config);
893 GST_barriers_init (GST_config);
898 * Define "main" method using service macro.
902 GNUNET_SERVICE_OPTION_NONE,
905 &client_disconnect_cb,
907 GNUNET_MQ_hd_var_size (init,
908 GNUNET_MESSAGE_TYPE_TESTBED_INIT,
909 struct GNUNET_TESTBED_InitMessage,
911 GNUNET_MQ_hd_var_size (add_host,
912 GNUNET_MESSAGE_TYPE_TESTBED_ADD_HOST,
913 struct GNUNET_TESTBED_AddHostMessage,
915 GNUNET_MQ_hd_fixed_size (slave_get_config,
916 GNUNET_MESSAGE_TYPE_TESTBED_GET_SLAVE_CONFIGURATION,
917 struct GNUNET_TESTBED_SlaveGetConfigurationMessage,
919 GNUNET_MQ_hd_fixed_size (link_controllers,
920 GNUNET_MESSAGE_TYPE_TESTBED_LINK_CONTROLLERS,
921 struct GNUNET_TESTBED_ControllerLinkRequest,
923 GNUNET_MQ_hd_var_size (remote_overlay_connect,
924 GNUNET_MESSAGE_TYPE_TESTBED_REMOTE_OVERLAY_CONNECT,
925 struct GNUNET_TESTBED_RemoteOverlayConnectMessage,
927 GNUNET_MQ_hd_fixed_size (overlay_connect,
928 GNUNET_MESSAGE_TYPE_TESTBED_OVERLAY_CONNECT,
929 struct GNUNET_TESTBED_OverlayConnectMessage,
931 GNUNET_MQ_hd_var_size (peer_create,
932 GNUNET_MESSAGE_TYPE_TESTBED_CREATE_PEER,
933 struct GNUNET_TESTBED_PeerCreateMessage,
935 GNUNET_MQ_hd_fixed_size (peer_destroy,
936 GNUNET_MESSAGE_TYPE_TESTBED_DESTROY_PEER,
937 struct GNUNET_TESTBED_PeerDestroyMessage,
939 GNUNET_MQ_hd_fixed_size (peer_start,
940 GNUNET_MESSAGE_TYPE_TESTBED_START_PEER,
941 struct GNUNET_TESTBED_PeerStartMessage,
943 GNUNET_MQ_hd_fixed_size (peer_stop,
944 GNUNET_MESSAGE_TYPE_TESTBED_STOP_PEER,
945 struct GNUNET_TESTBED_PeerStopMessage,
947 GNUNET_MQ_hd_fixed_size (peer_get_config,
948 GNUNET_MESSAGE_TYPE_TESTBED_GET_PEER_INFORMATION,
949 struct GNUNET_TESTBED_PeerGetConfigurationMessage,
951 GNUNET_MQ_hd_var_size (manage_peer_service,
952 GNUNET_MESSAGE_TYPE_TESTBED_MANAGE_PEER_SERVICE,
953 struct GNUNET_TESTBED_ManagePeerServiceMessage,
955 GNUNET_MQ_hd_fixed_size (shutdown_peers,
956 GNUNET_MESSAGE_TYPE_TESTBED_SHUTDOWN_PEERS,
957 struct GNUNET_TESTBED_ShutdownPeersMessage,
959 GNUNET_MQ_hd_var_size (peer_reconfigure,
960 GNUNET_MESSAGE_TYPE_TESTBED_RECONFIGURE_PEER,
961 struct GNUNET_TESTBED_PeerReconfigureMessage,
963 GNUNET_MQ_hd_var_size (barrier_init,
964 GNUNET_MESSAGE_TYPE_TESTBED_BARRIER_INIT,
965 struct GNUNET_TESTBED_BarrierInit,
967 GNUNET_MQ_hd_var_size (barrier_cancel,
968 GNUNET_MESSAGE_TYPE_TESTBED_BARRIER_CANCEL,
969 struct GNUNET_TESTBED_BarrierCancel,
971 GNUNET_MQ_hd_var_size (barrier_status,
972 GNUNET_MESSAGE_TYPE_TESTBED_BARRIER_STATUS,
973 struct GNUNET_TESTBED_BarrierStatusMsg,
975 GNUNET_MQ_handler_end ());
978 /* end of gnunet-service-testbed.c */