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 it
6 under the terms of the GNU Affero General Public License as published
7 by the Free Software Foundation, either version 3 of the License,
8 or (at your 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 Affero General Public License for more details.
15 You should have received a copy of the GNU Affero General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
18 SPDX-License-Identifier: AGPL3.0-or-later
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 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;
343 GNUNET_array_grow (slist, n, n + 1); \
344 GNUNET_memcpy (&slist[n - 1], &ss, \
345 sizeof(struct GNUNET_TESTING_SharedService)); \
351 for (; NULL != (arg = strtok (ss_str, " ")); ss_str = NULL)
355 if (2 != sscanf (arg, "%255[^:]:%u",
359 LOG (GNUNET_ERROR_TYPE_WARNING,
360 "Ignoring shared service spec: %s",
364 LOG_DEBUG ("Will be sharing %s service among %u peers\n",
367 ss.service = GNUNET_strdup (service);
372 /* Add trailing NULL block */
375 sizeof(struct GNUNET_TESTING_SharedService));
384 * Check #GNUNET_MESSAGE_TYPE_TESTBED_INIT messages
386 * @param cls identification of the client
387 * @param message the actual message
388 * @return #GNUNET_OK if @a message is well-formed
391 check_init (void *cls,
392 const struct GNUNET_TESTBED_InitMessage *msg)
394 const char *controller_hostname;
397 msize = ntohs (msg->header.size) - sizeof(struct GNUNET_TESTBED_InitMessage);
398 controller_hostname = (const char *) &msg[1];
399 if ('\0' != controller_hostname[msize - 1])
402 return GNUNET_SYSERR;
409 * Message handler for #GNUNET_MESSAGE_TYPE_TESTBED_INIT messages
411 * @param cls identification of the client
412 * @param message the actual message
415 handle_init (void *cls,
416 const struct GNUNET_TESTBED_InitMessage *msg)
418 struct GNUNET_SERVICE_Client *client = cls;
419 struct GNUNET_TESTBED_Host *host;
420 const char *controller_hostname;
422 struct GNUNET_TESTING_SharedService *ss;
425 if (NULL != GST_context)
427 LOG_DEBUG ("We are being connected to laterally\n");
428 GNUNET_SERVICE_client_continue (client);
431 controller_hostname = (const char *) &msg[1];
435 GNUNET_CONFIGURATION_get_value_string (GST_config,
440 ss = parse_shared_services (ss_str,
442 GNUNET_free (ss_str);
445 GST_context = GNUNET_new (struct Context);
446 GST_context->client = client;
447 GST_context->host_id = ntohl (msg->host_id);
448 GST_context->master_ip = GNUNET_strdup (controller_hostname);
449 LOG_DEBUG ("Our IP: %s\n",
450 GST_context->master_ip);
452 = GNUNET_TESTING_system_create ("testbed",
453 GST_context->master_ip,
458 for (cnt = 0; NULL != ss[cnt].service; cnt++)
460 ss_str = (char *) ss[cnt].service;
461 GNUNET_free (ss_str);
467 GNUNET_TESTBED_host_create_with_id (GST_context->host_id,
468 GST_context->master_ip,
472 host_list_add (host);
473 LOG_DEBUG ("Created master context with host ID: %u\n",
474 GST_context->host_id);
475 GNUNET_SERVICE_client_continue (client);
480 * Check #GNUNET_MESSAGE_TYPE_TESTBED_ADDHOST messages
482 * @param cls identification of the client
483 * @param msg the actual message
484 * @return #GNUNET_OK if @a message is well-formed
487 check_add_host (void *cls,
488 const struct GNUNET_TESTBED_AddHostMessage *msg)
490 uint16_t username_length;
491 uint16_t hostname_length;
494 msize = ntohs (msg->header.size) - sizeof(struct
495 GNUNET_TESTBED_AddHostMessage);
496 username_length = ntohs (msg->username_length);
497 hostname_length = ntohs (msg->hostname_length);
498 /* msg must contain hostname */
499 if ((msize <= username_length) ||
500 (0 == hostname_length))
503 return GNUNET_SYSERR;
505 /* msg must contain configuration */
506 if (msize <= username_length + hostname_length)
509 return GNUNET_SYSERR;
516 * Message handler for #GNUNET_MESSAGE_TYPE_TESTBED_ADDHOST messages
518 * @param cls identification of the client
519 * @param msg the actual message
522 handle_add_host (void *cls,
523 const struct GNUNET_TESTBED_AddHostMessage *msg)
525 struct GNUNET_SERVICE_Client *client = cls;
526 struct GNUNET_TESTBED_Host *host;
527 struct GNUNET_TESTBED_HostConfirmedMessage *reply;
528 struct GNUNET_CONFIGURATION_Handle *host_cfg;
534 uint16_t username_length;
535 uint16_t hostname_length;
536 struct GNUNET_MQ_Envelope *env;
538 username_length = ntohs (msg->username_length);
539 hostname_length = ntohs (msg->hostname_length);
543 if (0 != username_length)
545 username = GNUNET_malloc (username_length + 1);
546 GNUNET_strlcpy (username, ptr, username_length + 1);
547 ptr += username_length;
549 hostname = GNUNET_malloc (hostname_length + 1);
550 GNUNET_strlcpy (hostname, ptr, 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,
621 GNUNET_TESTBED_SlaveGetConfigurationMessage *msg)
623 struct GNUNET_SERVICE_Client *client = cls;
625 struct GNUNET_TESTBED_SlaveConfiguration *reply;
626 const struct GNUNET_CONFIGURATION_Handle *cfg;
627 struct GNUNET_MQ_Envelope *env;
635 slave_id = ntohl (msg->slave_id);
636 op_id = GNUNET_ntohll (msg->operation_id);
637 if ((GST_slave_list_size <= slave_id) ||
638 (NULL == GST_slave_list[slave_id]))
640 /* FIXME: Add forwardings for this type of message here.. */
641 GST_send_operation_fail_msg (client,
644 GNUNET_SERVICE_client_continue (client);
647 slave = GST_slave_list[slave_id];
648 GNUNET_assert (NULL != (cfg = GNUNET_TESTBED_host_get_cfg_ (
649 GST_host_list[slave->host_id])));
650 config = GNUNET_CONFIGURATION_serialize (cfg,
652 /* FIXME: maybe we want to transmit the delta to the default here? */
653 xconfig_size = GNUNET_TESTBED_compress_config_ (config,
656 GNUNET_free (config);
657 GNUNET_assert (xconfig_size + sizeof(struct
658 GNUNET_TESTBED_SlaveConfiguration) <=
660 GNUNET_assert (xconfig_size <= UINT16_MAX);
661 env = GNUNET_MQ_msg_extra (reply,
663 GNUNET_MESSAGE_TYPE_TESTBED_SLAVE_CONFIGURATION);
664 reply->slave_id = msg->slave_id;
665 reply->operation_id = msg->operation_id;
666 reply->config_size = htons ((uint16_t) config_size);
667 GNUNET_memcpy (&reply[1],
670 GNUNET_free (xconfig);
671 GNUNET_MQ_send (GNUNET_SERVICE_client_get_mq (client),
673 GNUNET_SERVICE_client_continue (client);
678 * Clears the forwarded operations queue
683 struct ForwardedOperationContext *fopc;
685 while (NULL != (fopc = fopcq_head))
687 GNUNET_CONTAINER_DLL_remove (fopcq_head,
690 GNUNET_TESTBED_forward_operation_msg_cancel_ (fopc->opc);
691 if (NULL != fopc->timeout_task)
692 GNUNET_SCHEDULER_cancel (fopc->timeout_task);
696 GNUNET_free (fopc->cls);
699 case OP_SHUTDOWN_PEERS:
701 struct HandlerContext_ShutdownPeers *hc = fopc->cls;
703 GNUNET_assert (0 < hc->nslaves);
705 if (0 == hc->nslaves)
712 case OP_PEER_DESTROY:
714 case OP_OVERLAY_CONNECT:
715 case OP_LINK_CONTROLLERS:
716 case OP_GET_SLAVE_CONFIG:
717 case OP_MANAGE_SERVICE:
718 case OP_PEER_RECONFIGURE:
731 * Task to clean up and shutdown nicely
736 shutdown_task (void *cls)
740 LOG_DEBUG ("Shutting down testbed service\n");
741 /* cleanup any remaining forwarded operations */
748 GST_neighbour_list_clean ();
750 /* Clear peer list */
751 GST_destroy_peers ();
752 /* Clear route list */
753 GST_route_list_clear ();
754 /* Clear GST_slave_list */
755 GST_slave_list_clear ();
756 /* Clear host list */
757 for (id = 0; id < GST_host_list_size; id++)
758 if (NULL != GST_host_list[id])
759 GNUNET_TESTBED_host_destroy (GST_host_list[id]);
760 GNUNET_free_non_null (GST_host_list);
761 if (NULL != GST_context)
763 GNUNET_free_non_null (GST_context->master_ip);
764 if (NULL != GST_context->system)
765 GNUNET_TESTING_system_destroy (GST_context->system,
767 GNUNET_free (GST_context);
770 GNUNET_free_non_null (hostname);
771 /* Free hello cache */
773 GST_connection_pool_destroy ();
774 GNUNET_TESTBED_operation_queue_destroy_ (GST_opq_openfds);
775 GST_opq_openfds = NULL;
776 GST_stats_destroy ();
777 GST_barriers_destroy ();
778 GNUNET_CONFIGURATION_destroy (GST_config);
783 * Callback for client connect
786 * @param client the client which has disconnected
787 * @param mq queue for sending messages to @a client
791 client_connect_cb (void *cls,
792 struct GNUNET_SERVICE_Client *client,
793 struct GNUNET_MQ_Handle *mq)
800 * Callback for client disconnect
803 * @param client the client which has disconnected
804 * @param app_ctx should match @a client
807 client_disconnect_cb (void *cls,
808 struct GNUNET_SERVICE_Client *client,
811 struct ForwardedOperationContext *fopc;
812 struct ForwardedOperationContext *fopcn;
814 GNUNET_assert (client == app_ctx);
815 GST_notify_client_disconnect_oc (client);
816 GST_link_notify_disconnect (client);
817 GST_notify_client_disconnect_peers (client);
818 for (fopc = fopcq_head; NULL != fopc; fopc = fopcn)
821 if (fopc->client == client)
823 /* handle as if it were a timeout */
824 GNUNET_SCHEDULER_cancel (fopc->timeout_task);
825 GST_forwarded_operation_timeout (fopc);
828 if (NULL == GST_context)
830 if (client == GST_context->client)
832 LOG (GNUNET_ERROR_TYPE_DEBUG,
833 "Master client disconnected\n");
834 GST_context->client = NULL;
835 /* should not be needed as we're terminated by failure to read
836 * from stdin, but if stdin fails for some reason, this shouldn't
837 * hurt for now --- might need to revise this later if we ever
838 * decide that master connections might be temporarily down
839 * for some reason */// GNUNET_SCHEDULER_shutdown ();
848 * @param cfg configuration to use
849 * @param service the initialized server
852 testbed_run (void *cls,
853 const struct GNUNET_CONFIGURATION_Handle *cfg,
854 struct GNUNET_SERVICE_Handle *service)
857 unsigned long long num;
859 LOG_DEBUG ("Starting testbed\n");
861 GNUNET_CONFIGURATION_get_value_filename (cfg, "TESTBED", "LOG_FILE",
864 GNUNET_break (GNUNET_OK ==
865 GNUNET_log_setup ("testbed",
868 GNUNET_free (logfile);
870 GNUNET_assert (GNUNET_OK ==
871 GNUNET_CONFIGURATION_get_value_number (cfg,
875 GST_cache_init ((unsigned int) num);
876 GST_connection_pool_init ((unsigned int) num);
877 GNUNET_assert (GNUNET_OK ==
878 GNUNET_CONFIGURATION_get_value_number (cfg,
882 GST_opq_openfds = GNUNET_TESTBED_operation_queue_create_ (
883 OPERATION_QUEUE_TYPE_FIXED,
885 GNUNET_assert (GNUNET_OK ==
886 GNUNET_CONFIGURATION_get_value_time (cfg,
890 GNUNET_assert (GNUNET_OK ==
891 GNUNET_CONFIGURATION_get_value_string (cfg,
895 GST_config = GNUNET_CONFIGURATION_dup (cfg);
896 GNUNET_SCHEDULER_add_shutdown (&shutdown_task,
898 LOG_DEBUG ("Testbed startup complete\n");
899 GST_stats_init (GST_config);
900 GST_barriers_init (GST_config);
905 * Define "main" method using service macro.
909 GNUNET_SERVICE_OPTION_NONE,
912 &client_disconnect_cb,
914 GNUNET_MQ_hd_var_size (init,
915 GNUNET_MESSAGE_TYPE_TESTBED_INIT,
916 struct GNUNET_TESTBED_InitMessage,
918 GNUNET_MQ_hd_var_size (add_host,
919 GNUNET_MESSAGE_TYPE_TESTBED_ADD_HOST,
920 struct GNUNET_TESTBED_AddHostMessage,
922 GNUNET_MQ_hd_fixed_size (slave_get_config,
923 GNUNET_MESSAGE_TYPE_TESTBED_GET_SLAVE_CONFIGURATION,
924 struct GNUNET_TESTBED_SlaveGetConfigurationMessage,
926 GNUNET_MQ_hd_fixed_size (link_controllers,
927 GNUNET_MESSAGE_TYPE_TESTBED_LINK_CONTROLLERS,
928 struct GNUNET_TESTBED_ControllerLinkRequest,
930 GNUNET_MQ_hd_var_size (remote_overlay_connect,
931 GNUNET_MESSAGE_TYPE_TESTBED_REMOTE_OVERLAY_CONNECT,
932 struct GNUNET_TESTBED_RemoteOverlayConnectMessage,
934 GNUNET_MQ_hd_fixed_size (overlay_connect,
935 GNUNET_MESSAGE_TYPE_TESTBED_OVERLAY_CONNECT,
936 struct GNUNET_TESTBED_OverlayConnectMessage,
938 GNUNET_MQ_hd_var_size (peer_create,
939 GNUNET_MESSAGE_TYPE_TESTBED_CREATE_PEER,
940 struct GNUNET_TESTBED_PeerCreateMessage,
942 GNUNET_MQ_hd_fixed_size (peer_destroy,
943 GNUNET_MESSAGE_TYPE_TESTBED_DESTROY_PEER,
944 struct GNUNET_TESTBED_PeerDestroyMessage,
946 GNUNET_MQ_hd_fixed_size (peer_start,
947 GNUNET_MESSAGE_TYPE_TESTBED_START_PEER,
948 struct GNUNET_TESTBED_PeerStartMessage,
950 GNUNET_MQ_hd_fixed_size (peer_stop,
951 GNUNET_MESSAGE_TYPE_TESTBED_STOP_PEER,
952 struct GNUNET_TESTBED_PeerStopMessage,
954 GNUNET_MQ_hd_fixed_size (peer_get_config,
955 GNUNET_MESSAGE_TYPE_TESTBED_GET_PEER_INFORMATION,
956 struct GNUNET_TESTBED_PeerGetConfigurationMessage,
958 GNUNET_MQ_hd_var_size (manage_peer_service,
959 GNUNET_MESSAGE_TYPE_TESTBED_MANAGE_PEER_SERVICE,
960 struct GNUNET_TESTBED_ManagePeerServiceMessage,
962 GNUNET_MQ_hd_fixed_size (shutdown_peers,
963 GNUNET_MESSAGE_TYPE_TESTBED_SHUTDOWN_PEERS,
964 struct GNUNET_TESTBED_ShutdownPeersMessage,
966 GNUNET_MQ_hd_var_size (peer_reconfigure,
967 GNUNET_MESSAGE_TYPE_TESTBED_RECONFIGURE_PEER,
968 struct GNUNET_TESTBED_PeerReconfigureMessage,
970 GNUNET_MQ_hd_var_size (barrier_init,
971 GNUNET_MESSAGE_TYPE_TESTBED_BARRIER_INIT,
972 struct GNUNET_TESTBED_BarrierInit,
974 GNUNET_MQ_hd_var_size (barrier_cancel,
975 GNUNET_MESSAGE_TYPE_TESTBED_BARRIER_CANCEL,
976 struct GNUNET_TESTBED_BarrierCancel,
978 GNUNET_MQ_hd_var_size (barrier_status,
979 GNUNET_MESSAGE_TYPE_TESTBED_BARRIER_STATUS,
980 struct GNUNET_TESTBED_BarrierStatusMsg,
982 GNUNET_MQ_handler_end ());
985 /* end of gnunet-service-testbed.c */