drft
authorChristian Grothoff <christian@grothoff.org>
Mon, 27 Jul 2009 21:28:58 +0000 (21:28 +0000)
committerChristian Grothoff <christian@grothoff.org>
Mon, 27 Jul 2009 21:28:58 +0000 (21:28 +0000)
src/testing/testing_group.c

index 1a4a7f6e96d6dacfd42ddc528bbddaf4d4ac267f..917a524de6e5f93b62f0b92ea53b6304dedb381a 100644 (file)
  */
 struct GNUNET_TESTING_PeerGroup
 {
+  /**
+   * Our scheduler.
+   */ 
+  struct GNUNET_SCHEDULER_Handle *sched;
+
+  /**
+   * Configuration template.
+   */
+  struct GNUNET_CONFIGURATION_Handle *cfg;
+
+  /**
+   * Function to call on each started daemon.
+   */ 
+  GNUNET_TESTING_NotifyDaemonRunning cb;
+
+  /**
+   * Closure for cb.
+   */
+  void *cb_cls;
+
+  /**
+   * NULL-terminated array of hostnames.
+   */
+  char **hostnames;
+
+  /**
+   * Array of "total" peers.
+   */
+  struct GNUNET_TESTING_Daemon **peers;
+
+  /**
+   * Number of peers in this group.
+   */ 
+  unsigned int total;
+
 };
 
 
@@ -63,7 +98,10 @@ GNUNET_TESTING_daemons_start_va (struct GNUNET_SCHEDULER_Handle *sched,
                                 const char *hostname,
                                 va_list va)
 {
-  return NULL;
+  struct GNUNET_TESTING_PeerGroup *pg;
+  
+  pg = GNUNET_malloc (sizeof(struct GNUNET_TESTING_PeerGroup));
+  return pg;
 }
 
 
@@ -115,8 +153,9 @@ GNUNET_TESTING_daemons_start (struct GNUNET_SCHEDULER_Handle *sched,
  */
 void
 GNUNET_TESTING_daemons_stop (struct GNUNET_TESTING_PeerGroup *pg)
-
 {
+  
+  GNUNET_free (pg);
 }