2 This file is part of GNUnet.
3 (C) 2008--2013 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 2, 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/gnunet-service-testbed_links.h
23 * @brief TESTBED service components that deals with starting slave controllers
24 * and establishing lateral links between controllers
25 * @author Sree Harsha Totakura
32 * Structure representing a connected(directly-linked) controller
37 * The controller process handle if we had started the controller
39 struct GNUNET_TESTBED_ControllerProc *controller_proc;
42 * The controller handle
44 struct GNUNET_TESTBED_Controller *controller;
47 * handle to lcc which is associated with this slave startup. Should be set to
48 * NULL when the slave has successfully started up
50 struct LinkControllersContext *lcc;
53 * Head of the host registration DLL
55 struct HostRegistration *hr_dll_head;
58 * Tail of the host registration DLL
60 struct HostRegistration *hr_dll_tail;
63 * The current host registration handle
65 struct GNUNET_TESTBED_HostRegistrationHandle *rhandle;
68 * Hashmap to hold Registered host contexts
70 struct GNUNET_CONTAINER_MultiHashMap *reghost_map;
73 * Operation handle for opening a lateral connection to another controller.
74 * Will be NULL if the slave controller is started by this controller
76 struct GNUNET_TESTBED_Operation *conn_op;
79 * The id of the host this controller is running on
86 * A list of directly linked neighbours
88 extern struct Slave **GST_slave_list;
91 * The size of directly linked neighbours list
93 extern unsigned int GST_slave_list_size;
96 GST_neighbour_list_clean();
99 GST_get_neighbour (uint32_t id);
104 struct NeighbourConnectNotification;
106 typedef void (*GST_NeigbourConnectNotifyCallback) (void *cls,
108 GNUNET_TESTBED_Controller
111 struct NeighbourConnectNotification *
112 GST_neighbour_get_connection (struct Neighbour *n,
113 GST_NeigbourConnectNotifyCallback cb,
117 GST_neighbour_get_connection_cancel (struct NeighbourConnectNotification *h);
120 GST_neighbour_release_connection (struct Neighbour *n);
123 GST_create_neighbour (struct GNUNET_TESTBED_Host *host);
126 * Message handler for GNUNET_MESSAGE_TYPE_TESTBED_LCONTROLLERS message
129 * @param client identification of the client
130 * @param message the actual message
133 GST_handle_link_controllers (void *cls, struct GNUNET_SERVER_Client *client,
134 const struct GNUNET_MessageHeader *message);
138 * Cleans up the slave list
141 GST_slave_list_clear ();