aboutsummaryrefslogtreecommitdiff
path: root/src/ats/gnunet-ats-solver-eval.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/ats/gnunet-ats-solver-eval.h')
-rw-r--r--src/ats/gnunet-ats-solver-eval.h78
1 files changed, 30 insertions, 48 deletions
diff --git a/src/ats/gnunet-ats-solver-eval.h b/src/ats/gnunet-ats-solver-eval.h
index d5a68c5b0..e3afa02b1 100644
--- a/src/ats/gnunet-ats-solver-eval.h
+++ b/src/ats/gnunet-ats-solver-eval.h
@@ -1,19 +1,19 @@
1/* 1/*
2 This file is part of GNUnet. 2 This file is part of GNUnet.
3 Copyright (C) 2010-2013 GNUnet e.V. 3 Copyright (C) 2010-2013 GNUnet e.V.
4 4
5 GNUnet is free software: you can redistribute it and/or modify it 5 GNUnet is free software: you can redistribute it and/or modify it
6 under the terms of the GNU Affero General Public License as published 6 under the terms of the GNU Affero General Public License as published
7 by the Free Software Foundation, either version 3 of the License, 7 by the Free Software Foundation, either version 3 of the License,
8 or (at your option) any later version. 8 or (at your option) any later version.
9 9
10 GNUnet is distributed in the hope that it will be useful, but 10 GNUnet is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of 11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Affero General Public License for more details. 13 Affero General Public License for more details.
14 14
15 You should have received a copy of the GNU Affero General Public License 15 You should have received a copy of the GNU Affero General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>. 16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17 17
18 SPDX-License-Identifier: AGPL3.0-or-later 18 SPDX-License-Identifier: AGPL3.0-or-later
19 */ 19 */
@@ -34,8 +34,7 @@
34#include "gnunet-service-ats_normalization.h" 34#include "gnunet-service-ats_normalization.h"
35#include "test_ats_api_common.h" 35#include "test_ats_api_common.h"
36 36
37enum GeneratorType 37enum GeneratorType {
38{
39 GNUNET_ATS_TEST_TG_LINEAR, 38 GNUNET_ATS_TEST_TG_LINEAR,
40 GNUNET_ATS_TEST_TG_CONSTANT, 39 GNUNET_ATS_TEST_TG_CONSTANT,
41 GNUNET_ATS_TEST_TG_RANDOM, 40 GNUNET_ATS_TEST_TG_RANDOM,
@@ -43,8 +42,7 @@ enum GeneratorType
43}; 42};
44 43
45 44
46enum OperationType 45enum OperationType {
47{
48 SOLVER_OP_ADD_ADDRESS, 46 SOLVER_OP_ADD_ADDRESS,
49 SOLVER_OP_DEL_ADDRESS, 47 SOLVER_OP_DEL_ADDRESS,
50 SOLVER_OP_START_SET_PROPERTY, 48 SOLVER_OP_START_SET_PROPERTY,
@@ -55,8 +53,7 @@ enum OperationType
55 SOLVER_OP_STOP_REQUEST, 53 SOLVER_OP_STOP_REQUEST,
56}; 54};
57 55
58struct SolverHandle 56struct SolverHandle {
59{
60 /** 57 /**
61 * Solver plugin name 58 * Solver plugin name
62 */ 59 */
@@ -78,15 +75,13 @@ struct SolverHandle
78 struct GNUNET_CONTAINER_MultiPeerMap *addresses; 75 struct GNUNET_CONTAINER_MultiPeerMap *addresses;
79}; 76};
80 77
81enum GNUNET_ATS_Solvers 78enum GNUNET_ATS_Solvers {
82{
83 GNUNET_ATS_SOLVER_PROPORTIONAL, 79 GNUNET_ATS_SOLVER_PROPORTIONAL,
84 GNUNET_ATS_SOLVER_MLP, 80 GNUNET_ATS_SOLVER_MLP,
85 GNUNET_ATS_SOLVER_RIL, 81 GNUNET_ATS_SOLVER_RIL,
86}; 82};
87 83
88struct LoggingFileHandle 84struct LoggingFileHandle {
89{
90 /* DLL list for logging time steps */ 85 /* DLL list for logging time steps */
91 struct LoggingFileHandle *next; 86 struct LoggingFileHandle *next;
92 struct LoggingFileHandle *prev; 87 struct LoggingFileHandle *prev;
@@ -98,11 +93,9 @@ struct LoggingFileHandle
98 long long unsigned int aid; 93 long long unsigned int aid;
99 94
100 struct GNUNET_DISK_FileHandle *f_hd; 95 struct GNUNET_DISK_FileHandle *f_hd;
101
102}; 96};
103 97
104struct LoggingTimeStep 98struct LoggingTimeStep {
105{
106 struct LoggingTimeStep *prev; 99 struct LoggingTimeStep *prev;
107 struct LoggingTimeStep *next; 100 struct LoggingTimeStep *next;
108 101
@@ -113,8 +106,7 @@ struct LoggingTimeStep
113 struct GNUNET_TIME_Relative delta; 106 struct GNUNET_TIME_Relative delta;
114}; 107};
115 108
116struct LoggingPeer 109struct LoggingPeer {
117{
118 struct LoggingPeer *prev; 110 struct LoggingPeer *prev;
119 struct LoggingPeer *next; 111 struct LoggingPeer *next;
120 112
@@ -128,8 +120,7 @@ struct LoggingPeer
128 struct LoggingAddress *addr_tail; 120 struct LoggingAddress *addr_tail;
129}; 121};
130 122
131struct LoggingAddress 123struct LoggingAddress {
132{
133 struct LoggingAddress *next; 124 struct LoggingAddress *next;
134 struct LoggingAddress *prev; 125 struct LoggingAddress *prev;
135 126
@@ -144,8 +135,7 @@ struct LoggingAddress
144}; 135};
145 136
146 137
147struct TestPeer 138struct TestPeer {
148{
149 struct TestPeer *prev; 139 struct TestPeer *prev;
150 struct TestPeer *next; 140 struct TestPeer *next;
151 141
@@ -165,8 +155,7 @@ struct TestPeer
165}; 155};
166 156
167 157
168struct TestAddress 158struct TestAddress {
169{
170 struct TestAddress *next; 159 struct TestAddress *next;
171 struct TestAddress *prev; 160 struct TestAddress *prev;
172 161
@@ -183,16 +172,15 @@ struct Episode;
183struct Experiment; 172struct Experiment;
184 173
185typedef void (*GNUNET_ATS_TESTING_EpisodeDoneCallback) ( 174typedef void (*GNUNET_ATS_TESTING_EpisodeDoneCallback) (
186 struct Episode *e); 175 struct Episode *e);
187 176
188typedef void (*GNUNET_ATS_TESTING_ExperimentDoneCallback) (struct Experiment *e, 177typedef void (*GNUNET_ATS_TESTING_ExperimentDoneCallback) (struct Experiment *e,
189 struct GNUNET_TIME_Relative duration,int success); 178 struct GNUNET_TIME_Relative duration, int success);
190 179
191/** 180/**
192 * An operation in an experiment 181 * An operation in an experiment
193 */ 182 */
194struct GNUNET_ATS_TEST_Operation 183struct GNUNET_ATS_TEST_Operation {
195{
196 struct GNUNET_ATS_TEST_Operation *next; 184 struct GNUNET_ATS_TEST_Operation *next;
197 struct GNUNET_ATS_TEST_Operation *prev; 185 struct GNUNET_ATS_TEST_Operation *prev;
198 186
@@ -218,8 +206,7 @@ struct GNUNET_ATS_TEST_Operation
218 // enum GNUNET_ATS_Property prop_type; 206 // enum GNUNET_ATS_Property prop_type;
219}; 207};
220 208
221struct Episode 209struct Episode {
222{
223 int id; 210 int id;
224 struct Episode *next; 211 struct Episode *next;
225 struct GNUNET_TIME_Relative duration; 212 struct GNUNET_TIME_Relative duration;
@@ -228,8 +215,7 @@ struct Episode
228 struct GNUNET_ATS_TEST_Operation *tail; 215 struct GNUNET_ATS_TEST_Operation *tail;
229}; 216};
230 217
231struct LoggingHandle 218struct LoggingHandle {
232{
233 struct GNUNET_SCHEDULER_Task * logging_task; 219 struct GNUNET_SCHEDULER_Task * logging_task;
234 struct GNUNET_TIME_Relative log_freq; 220 struct GNUNET_TIME_Relative log_freq;
235 221
@@ -238,8 +224,7 @@ struct LoggingHandle
238 struct LoggingTimeStep *tail; 224 struct LoggingTimeStep *tail;
239}; 225};
240 226
241struct Experiment 227struct Experiment {
242{
243 char *name; 228 char *name;
244 char *log_prefix; 229 char *log_prefix;
245 char *cfg_file; 230 char *cfg_file;
@@ -263,8 +248,7 @@ struct Experiment
263 GNUNET_ATS_TESTING_ExperimentDoneCallback e_done_cb; 248 GNUNET_ATS_TESTING_ExperimentDoneCallback e_done_cb;
264}; 249};
265 250
266struct PreferenceGenerator 251struct PreferenceGenerator {
267{
268 struct PreferenceGenerator *prev; 252 struct PreferenceGenerator *prev;
269 struct PreferenceGenerator *next; 253 struct PreferenceGenerator *next;
270 254
@@ -302,12 +286,10 @@ struct PreferenceGenerator
302 uint32_t last_assigned_bw_in; 286 uint32_t last_assigned_bw_in;
303 uint32_t last_assigned_bw_out; 287 uint32_t last_assigned_bw_out;
304 double last_delay_value; 288 double last_delay_value;
305
306}; 289};
307 290
308 291
309struct PropertyGenerator 292struct PropertyGenerator {
310{
311 struct PropertyGenerator *prev; 293 struct PropertyGenerator *prev;
312 struct PropertyGenerator *next; 294 struct PropertyGenerator *next;
313 295