SHUTDOWN
[oweals/gnunet.git] / src / include / gnunet_testing_lib.h
index f08dd9d20be98a2592091704f16905a2cf3c820d..8c76457e3f050abfbf5a29d69ba9208450f07f6e 100644 (file)
@@ -970,6 +970,33 @@ GNUNET_TESTING_daemons_vary (struct GNUNET_TESTING_PeerGroup *pg,
                             GNUNET_TESTING_NotifyCompletion cb,
                             void *cb_cls);
 
+/**
+ * Start a peer group with a given number of peers.  Notify
+ * on completion of peer startup and connection based on given
+ * topological constraints.  Optionally notify on each
+ * established connection.
+ *
+ * @param cfg configuration template to use
+ * @param total number of daemons to start
+ * @param timeout total time allowed for peers to start
+ * @param connect_cb function to call each time two daemons are connected
+ * @param peergroup_cb function to call once all peers are up and connected
+ * @param peergroup_cls closure for peergroup callbacks
+ * @param hostnames linked list of host structs to use to start peers on
+ *                  (NULL to run on localhost only)
+ *
+ * @return NULL on error, otherwise handle to control peer group
+ */
+struct GNUNET_TESTING_PeerGroup *
+GNUNET_TESTING_peergroup_start(
+                               const struct GNUNET_CONFIGURATION_Handle *cfg,
+                               unsigned int total,
+                               struct GNUNET_TIME_Relative timeout,
+                               GNUNET_TESTING_NotifyConnection connect_cb,
+                               GNUNET_TESTING_NotifyCompletion peergroup_cb,
+                               void *peergroup_cls,
+                               const struct GNUNET_TESTING_Host *hostnames);
+
 
 #if 0                           /* keep Emacsens' auto-indent happy */
 {