fixing resource leaks
[oweals/gnunet.git] / src / ats / gnunet-ats-solver-eval.h
index 4fa69e59d5807f3855037f81085b5f28b66d58d2..ab62f50001ed1645021d616728907504d3a5c5fb 100644 (file)
@@ -23,6 +23,8 @@
  * @author Christian Grothoff
  * @author Matthias Wachs
  */
+#ifndef GNUNET_ATS_SOLVER_EVAL_H
+#define GNUNET_ATS_SOLVER_EVAL_H
 #include "platform.h"
 #include "gnunet_util_lib.h"
 #include "gnunet_ats_plugin.h"
@@ -83,6 +85,15 @@ enum GNUNET_ATS_Solvers
 };
 
 
+struct LoggingTimeStep
+{
+  struct LoggingTimeStep *prev;
+  struct LoggingTimeStep *next;
+
+  struct GNUNET_TIME_Absolute timestamp;
+};
+
+
 struct TestPeer
 {
   struct TestPeer *prev;
@@ -90,9 +101,21 @@ struct TestPeer
 
   int id;
   struct GNUNET_PeerIdentity peer_id;
+
+  struct TestAddress *addr_head;
+  struct TestAddress *addr_tail;
 };
 
 
+struct TestAddress
+{
+  struct TestAddress *next;
+  struct TestAddress *prev;
+
+  int aid;
+  struct ATS_Address *ats_addr;
+};
+
 struct Episode;
 
 struct Experiment;
@@ -113,6 +136,7 @@ struct GNUNET_ATS_TEST_Operation
 
   long long unsigned int address_id;
   long long unsigned int peer_id;
+  long long unsigned int client_id;
   long long unsigned int address_session;
   long long unsigned int address_network;
   char*address;
@@ -144,14 +168,16 @@ struct LoggingHandle
 {
   GNUNET_SCHEDULER_TaskIdentifier logging_task;
   struct GNUNET_TIME_Relative log_freq;
+
+  struct LoggingTimeStep *head;
+
+  struct LoggingTimeStep *tail;
 };
 
 struct Experiment
 {
   char *name;
   char *cfg_file;
-  unsigned long long int num_masters;
-  unsigned long long int num_slaves;
   struct GNUNET_TIME_Relative log_freq;
   struct GNUNET_TIME_Relative max_duration;
   struct GNUNET_TIME_Relative total_duration;
@@ -178,6 +204,7 @@ struct PreferenceGenerator
 
   unsigned int peer;
   unsigned int address_id;
+  unsigned int client_id;
 
   enum GNUNET_ATS_PreferenceKind kind;
 
@@ -202,7 +229,8 @@ struct PropertyGenerator
   unsigned int peer;
   unsigned int address_id;
 
-  struct ATS_Address *address;
+  struct TestPeer *test_peer;
+  struct TestAddress *test_address;
   uint32_t ats_property;
 
   long int base_value;
@@ -784,4 +812,5 @@ GNUNET_ATS_TEST_create_topology (char *name, char *cfg_file,
 void
 GNUNET_ATS_TEST_shutdown_topology (void);
 #endif
+#endif /* #ifndef GNUNET_ATS_SOLVER_EVAL_H */
 /* end of file ats-testing.h */