GNUnet is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
- by the Free Software Foundation; either version 2, or (at your
+ by the Free Software Foundation; either version 3, or (at your
option) any later version.
GNUnet is distributed in the hope that it will be useful, but
};
-/**
- * The type for data structures which commonly arrive at the slave_event_callback
- */
-enum ClosureType
-{
- /**
- * Type for RegisteredHostContext closures
- */
- CLOSURE_TYPE_RHC = 1,
-
- /**
- * Type for LinkControllersForwardingContext closures
- */
- CLOSURE_TYPE_LCF
-};
-
-
/**
* This context information will be created for each host that is registered at
* slave controllers during overlay connects.
/**
* Our configuration
*/
-struct GNUNET_CONFIGURATION_Handle *our_config;
+extern struct GNUNET_CONFIGURATION_Handle *GST_config;
/**
* The master context; generated with the first INIT message
*/
extern unsigned int GST_peer_list_size;
+/**
+ * The current number of peers running locally under this controller
+ */
+extern unsigned int GST_num_local_peers;
+
/**
* The size of the host list
*/
extern char *GST_stats_dir;
/**
- * Condition to check if host id is invalid
+ * Condition to check if host id is valid
*/
-#define INVALID_HOST_ID(id) \
- ( ((id) >= GST_host_list_size) || (NULL == GST_host_list[id]) )
+#define VALID_HOST_ID(id) \
+ ( ((id) < GST_host_list_size) && (NULL != GST_host_list[id]) )
/**
- * Condition to check if peer id is invalid
+ * Condition to check if peer id is valid
*/
-#define INVALID_PEER_ID(id) \
- ( ((id) >= GST_peer_list_size) || (NULL == GST_peer_list[id]) )
+#define VALID_PEER_ID(id) \
+ ( ((id) < GST_peer_list_size) && (NULL != GST_peer_list[id]) )
/**
const struct GNUNET_MessageHeader *message);
+/**
+ * Handler for GNUNET_MESSAGE_TYPDE_TESTBED_RECONFIGURE_PEER type messages.
+ * Should stop the peer asyncronously, destroy it and create it again with the
+ * new configuration.
+ *
+ * @param cls NULL
+ * @param client identification of the client
+ * @param message the actual message
+ */
+void
+GST_handle_peer_reconfigure (void *cls, struct GNUNET_SERVER_Client *client,
+ const struct GNUNET_MessageHeader *message);
+
+
/**
* Frees the ManageServiceContext queue
*/
GST_free_roccq ();
+/**
+ * Cleans up the Peer reconfigure context list
+ */
+void
+GST_free_prcq ();
+
+
/**
* Initializes the cache
*