* @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"
SOLVER_OP_START_SET_PROPERTY,
SOLVER_OP_STOP_SET_PROPERTY,
SOLVER_OP_START_SET_PREFERENCE,
- SOLVER_OP_STOP_SET_PREFERENCE
+ SOLVER_OP_STOP_SET_PREFERENCE,
+ SOLVER_OP_START_REQUEST,
+ SOLVER_OP_STOP_REQUEST,
+};
+
+struct SolverHandle
+{
+ /**
+ * Solver plugin name
+ */
+ char *plugin;
+
+ /**
+ * Solver environment
+ */
+ struct GNUNET_ATS_PluginEnvironment env;
+
+ /**
+ * Solver handle
+ */
+ void *solver;
+
+ /**
+ * Address hashmap
+ */
+ struct GNUNET_CONTAINER_MultiPeerMap *addresses;
+};
+
+enum GNUNET_ATS_Solvers
+{
+ GNUNET_ATS_SOLVER_PROPORTIONAL,
+ GNUNET_ATS_SOLVER_MLP,
+ GNUNET_ATS_SOLVER_RIL,
+};
+
+
+struct LoggingTimeStep
+{
+ struct LoggingTimeStep *prev;
+ struct LoggingTimeStep *next;
+
+ struct GNUNET_TIME_Absolute timestamp;
+};
+
+
+struct TestPeer
+{
+ struct TestPeer *prev;
+ struct TestPeer *next;
+
+ 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;
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;
struct GNUNET_TIME_Relative frequency;
enum OperationType type;
- enum GeneratorType tg_type;
+ enum GeneratorType gen_type;
enum GNUNET_ATS_PreferenceKind pref_type;
enum GNUNET_ATS_Property prop_type;
};
struct GNUNET_ATS_TEST_Operation *tail;
};
+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;
unsigned int peer;
unsigned int address_id;
+ unsigned int client_id;
enum GNUNET_ATS_PreferenceKind kind;
};
+struct PropertyGenerator
+{
+ struct PropertyGenerator *prev;
+ struct PropertyGenerator *next;
+
+ enum GeneratorType type;
+
+ unsigned int peer;
+ unsigned int address_id;
+
+ struct TestPeer *test_peer;
+ struct TestAddress *test_address;
+ uint32_t ats_property;
+
+ long int base_value;
+ long int max_value;
+ struct GNUNET_TIME_Relative duration_period;
+ struct GNUNET_TIME_Relative frequency;
+
+ GNUNET_SCHEDULER_TaskIdentifier set_task;
+ struct GNUNET_TIME_Absolute next_ping_transmission;
+ struct GNUNET_TIME_Absolute time_start;
+};
+
/* LEGACY */
void
GNUNET_ATS_TEST_shutdown_topology (void);
#endif
+#endif /* #ifndef GNUNET_ATS_SOLVER_EVAL_H */
/* end of file ats-testing.h */