/*
- This file is part of GNUnet.
- Copyright (C) 2010-2013 GNUnet e.V.
+ This file is part of GNUnet.
+ Copyright (C) 2010-2013 GNUnet e.V.
- GNUnet is free software: you can redistribute it and/or modify it
- under the terms of the GNU Affero General Public License as published
- by the Free Software Foundation, either version 3 of the License,
- or (at your option) any later version.
+ GNUnet is free software: you can redistribute it and/or modify it
+ under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License,
+ or (at your option) any later version.
- GNUnet is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Affero General Public License for more details.
+ GNUnet is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Affero General Public License for more details.
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
SPDX-License-Identifier: AGPL3.0-or-later
*/
#include "gnunet-service-ats_normalization.h"
#include "test_ats_api_common.h"
-enum GeneratorType
-{
+enum GeneratorType {
GNUNET_ATS_TEST_TG_LINEAR,
GNUNET_ATS_TEST_TG_CONSTANT,
GNUNET_ATS_TEST_TG_RANDOM,
};
-enum OperationType
-{
+enum OperationType {
SOLVER_OP_ADD_ADDRESS,
SOLVER_OP_DEL_ADDRESS,
SOLVER_OP_START_SET_PROPERTY,
SOLVER_OP_STOP_REQUEST,
};
-struct SolverHandle
-{
+struct SolverHandle {
/**
* Solver plugin name
*/
struct GNUNET_CONTAINER_MultiPeerMap *addresses;
};
-enum GNUNET_ATS_Solvers
-{
+enum GNUNET_ATS_Solvers {
GNUNET_ATS_SOLVER_PROPORTIONAL,
GNUNET_ATS_SOLVER_MLP,
GNUNET_ATS_SOLVER_RIL,
};
-struct LoggingFileHandle
-{
+struct LoggingFileHandle {
/* DLL list for logging time steps */
struct LoggingFileHandle *next;
struct LoggingFileHandle *prev;
long long unsigned int aid;
struct GNUNET_DISK_FileHandle *f_hd;
-
};
-struct LoggingTimeStep
-{
+struct LoggingTimeStep {
struct LoggingTimeStep *prev;
struct LoggingTimeStep *next;
struct GNUNET_TIME_Relative delta;
};
-struct LoggingPeer
-{
+struct LoggingPeer {
struct LoggingPeer *prev;
struct LoggingPeer *next;
struct LoggingAddress *addr_tail;
};
-struct LoggingAddress
-{
+struct LoggingAddress {
struct LoggingAddress *next;
struct LoggingAddress *prev;
};
-struct TestPeer
-{
+struct TestPeer {
struct TestPeer *prev;
struct TestPeer *next;
};
-struct TestAddress
-{
+struct TestAddress {
struct TestAddress *next;
struct TestAddress *prev;
struct Experiment;
typedef void (*GNUNET_ATS_TESTING_EpisodeDoneCallback) (
- struct Episode *e);
+ struct Episode *e);
typedef void (*GNUNET_ATS_TESTING_ExperimentDoneCallback) (struct Experiment *e,
- struct GNUNET_TIME_Relative duration,int success);
+ struct GNUNET_TIME_Relative duration, int success);
/**
* An operation in an experiment
*/
-struct GNUNET_ATS_TEST_Operation
-{
+struct GNUNET_ATS_TEST_Operation {
struct GNUNET_ATS_TEST_Operation *next;
struct GNUNET_ATS_TEST_Operation *prev;
// enum GNUNET_ATS_Property prop_type;
};
-struct Episode
-{
+struct Episode {
int id;
struct Episode *next;
struct GNUNET_TIME_Relative duration;
struct GNUNET_ATS_TEST_Operation *tail;
};
-struct LoggingHandle
-{
+struct LoggingHandle {
struct GNUNET_SCHEDULER_Task * logging_task;
struct GNUNET_TIME_Relative log_freq;
struct LoggingTimeStep *tail;
};
-struct Experiment
-{
+struct Experiment {
char *name;
char *log_prefix;
char *cfg_file;
GNUNET_ATS_TESTING_ExperimentDoneCallback e_done_cb;
};
-struct PreferenceGenerator
-{
+struct PreferenceGenerator {
struct PreferenceGenerator *prev;
struct PreferenceGenerator *next;
uint32_t last_assigned_bw_in;
uint32_t last_assigned_bw_out;
double last_delay_value;
-
};
-struct PropertyGenerator
-{
+struct PropertyGenerator {
struct PropertyGenerator *prev;
struct PropertyGenerator *next;