GNUnet  0.17.6
gnunet-ats-solver-eval.h
Go to the documentation of this file.
1 /*
2  This file is part of GNUnet.
3  Copyright (C) 2010-2013 GNUnet e.V.
4 
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
7  by the Free Software Foundation, either version 3 of the License,
8  or (at your option) any later version.
9 
10  GNUnet is distributed in the hope that it will be useful, but
11  WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Affero General Public License for more details.
14 
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/>.
17 
18  SPDX-License-Identifier: AGPL3.0-or-later
19  */
26 #ifndef GNUNET_ATS_SOLVER_EVAL_H
27 #define GNUNET_ATS_SOLVER_EVAL_H
28 
29 #include "platform.h"
30 #include "gnunet_util_lib.h"
31 #include "gnunet_ats_plugin.h"
32 #include "gnunet_ats_service.h"
35 #include "test_ats_api_common.h"
36 
38 {
43 };
44 
45 
47 {
56 };
57 
59 {
63  char *plugin;
64 
69 
74 
79 };
80 
82 {
86 };
87 
89 {
90  /* DLL list for logging time steps */
93 
94  /* peer id */
95  long long unsigned int pid;
96 
97  /* address id */
98  long long unsigned int aid;
99 
101 };
102 
104 {
107 
108  struct LoggingPeer *head;
109  struct LoggingPeer *tail;
110 
113 };
114 
116 {
117  struct LoggingPeer *prev;
118  struct LoggingPeer *next;
119 
120  long long unsigned int id;
125 
128 };
129 
131 {
134 
135  long long unsigned int aid;
136  int active;
137  uint32_t network;
138  uint32_t assigned_bw_in;
139  uint32_t assigned_bw_out;
140 
141  double prop_abs[GNUNET_ATS_PropertyCount];
142  double prop_norm[GNUNET_ATS_PropertyCount];
143 };
144 
145 
146 struct TestPeer
147 {
148  struct TestPeer *prev;
149  struct TestPeer *next;
150 
151 
152  long long unsigned int id;
155 
156  double pref_abs[GNUNET_ATS_PreferenceCount];
157  double pref_norm[GNUNET_ATS_PreferenceCount];
158 
159  uint32_t assigned_bw_in;
160  uint32_t assigned_bw_out;
161 
164 };
165 
166 
168 {
169  struct TestAddress *next;
170  struct TestAddress *prev;
171 
172  long long unsigned int aid;
174  uint32_t network;
175 
176  double prop_abs[GNUNET_ATS_PropertyCount];
177  double prop_norm[GNUNET_ATS_PropertyCount];
178 };
179 
180 struct Episode;
181 
182 struct Experiment;
183 
185  struct Episode *e);
186 
188  struct
190  duration, int
191  success);
192 
197 {
200 
201  long long unsigned int address_id;
202  long long unsigned int peer_id;
203  long long unsigned int client_id;
204 
205  long long unsigned int address_session;
206  unsigned int address_network;
207  char*address;
208  char*plugin;
209 
210 
211  long long unsigned int base_rate;
212  long long unsigned int max_rate;
216 
217  enum OperationType type;
218  enum GeneratorType gen_type;
220  // enum GNUNET_ATS_Property prop_type;
221 };
222 
223 struct Episode
224 {
225  int id;
226  struct Episode *next;
228 
231 };
232 
234 {
237 
238  /* DLL list for logging time steps */
241 };
242 
244 {
245  char *name;
246  char *log_prefix;
247  char *cfg_file;
250 
255  unsigned int num_episodes;
256  struct Episode *start;
257 
259 
262  struct Episode *cur;
263 
266 };
267 
269 {
272 
273  enum GeneratorType type;
274 
275  long long unsigned int peer;
276  unsigned int client_id;
277 
279 
280  long int base_value;
281  long int max_value;
285 
290 
291 
292  /* Feedback */
296 
297  double pref_bw_old;
299 
301 
307 };
308 
309 
311 {
314 
315  enum GeneratorType type;
316 
317  long long unsigned int peer;
318  long long unsigned int address_id;
319 
322  uint32_t ats_property;
323 
324  long int base_value;
325  long int max_value;
328 
332 };
333 
334 #endif /* #ifndef GNUNET_ATS_SOLVER_EVAL_H */
335 /* end of file ats-testing.h */
static struct Experiment * e
void(* GNUNET_ATS_TESTING_ExperimentDoneCallback)(struct Experiment *e, struct GNUNET_TIME_Relative duration, int success)
GNUNET_ATS_Solvers
@ GNUNET_ATS_SOLVER_PROPORTIONAL
@ GNUNET_ATS_SOLVER_RIL
@ GNUNET_ATS_SOLVER_MLP
@ SOLVER_OP_STOP_SET_PREFERENCE
@ SOLVER_OP_DEL_ADDRESS
@ SOLVER_OP_START_REQUEST
@ SOLVER_OP_STOP_SET_PROPERTY
@ SOLVER_OP_START_SET_PREFERENCE
@ SOLVER_OP_STOP_REQUEST
@ SOLVER_OP_ADD_ADDRESS
@ SOLVER_OP_START_SET_PROPERTY
@ GNUNET_ATS_TEST_TG_RANDOM
@ GNUNET_ATS_TEST_TG_CONSTANT
@ GNUNET_ATS_TEST_TG_SINUS
@ GNUNET_ATS_TEST_TG_LINEAR
void(* GNUNET_ATS_TESTING_EpisodeDoneCallback)(struct Episode *e)
static struct GNUNET_TIME_Relative duration
How long do we run the test?
ats service address management
ats service address: management of ATS properties and preferences normalization
API for the ATS solvers.
Automatic transport selection and outbound bandwidth determination.
GNUNET_ATS_PreferenceKind
Enum defining all known preference categories.
@ GNUNET_ATS_PREFERENCE_END
End of preference list.
Address with additional information.
struct Episode * next
struct GNUNET_TIME_Relative duration
struct GNUNET_ATS_TEST_Operation * head
struct GNUNET_ATS_TEST_Operation * tail
struct GNUNET_SCHEDULER_Task * episode_timeout_task
GNUNET_ATS_TESTING_ExperimentDoneCallback e_done_cb
struct Episode * start
GNUNET_ATS_TESTING_EpisodeDoneCallback ep_done_cb
struct GNUNET_TIME_Relative max_duration
struct GNUNET_TIME_Relative total_duration
struct GNUNET_TIME_Absolute start_time
struct Episode * cur
unsigned int num_episodes
struct GNUNET_TIME_Relative log_freq
struct GNUNET_SCHEDULER_Task * experiment_timeout_task
struct GNUNET_CONFIGURATION_Handle * cfg
The ATS plugin will pass a pointer to a struct of this type as to the initialization function of the ...
An operation in an experiment.
struct GNUNET_ATS_TEST_Operation * prev
struct GNUNET_TIME_Relative period
long long unsigned int peer_id
struct GNUNET_TIME_Relative feedback_delay
struct GNUNET_ATS_TEST_Operation * next
long long unsigned int address_id
long long unsigned int client_id
long long unsigned int max_rate
enum GNUNET_ATS_PreferenceKind pref_type
long long unsigned int base_rate
struct GNUNET_TIME_Relative frequency
long long unsigned int address_session
Internal representation of the hash map.
Handle used to access files (and pipes).
The identity of the host (wraps the signing key of the peer).
Entry in list of pending tasks.
Definition: scheduler.c:135
Time for absolute times used by GNUnet, in microseconds.
Time for relative time used by GNUnet, in microseconds.
struct LoggingAddress * prev
long long unsigned int aid
double prop_abs[GNUNET_ATS_PropertyCount]
struct LoggingAddress * next
double prop_norm[GNUNET_ATS_PropertyCount]
struct GNUNET_DISK_FileHandle * f_hd
long long unsigned int pid
struct LoggingFileHandle * prev
long long unsigned int aid
struct LoggingFileHandle * next
struct GNUNET_TIME_Relative log_freq
struct LoggingTimeStep * head
struct GNUNET_SCHEDULER_Task * logging_task
struct LoggingTimeStep * tail
struct GNUNET_PeerIdentity peer_id
struct LoggingAddress * addr_tail
struct LoggingAddress * addr_head
double pref_abs[GNUNET_ATS_PREFERENCE_END]
struct LoggingPeer * prev
double pref_norm[GNUNET_ATS_PREFERENCE_END]
long long unsigned int id
struct LoggingPeer * next
struct LoggingTimeStep * next
struct GNUNET_TIME_Absolute timestamp
struct LoggingPeer * head
struct LoggingPeer * tail
struct LoggingTimeStep * prev
struct GNUNET_TIME_Relative delta
struct PreferenceGenerator * prev
struct GNUNET_SCHEDULER_Task * feedback_task
struct GNUNET_TIME_Absolute feedback_last_delay_update
struct GNUNET_TIME_Relative frequency
struct GNUNET_SCHEDULER_Task * set_task
long long unsigned int peer
struct GNUNET_TIME_Absolute next_ping_transmission
enum GNUNET_ATS_PreferenceKind kind
struct PreferenceGenerator * next
struct GNUNET_TIME_Absolute feedback_last
struct GNUNET_TIME_Relative duration_period
struct GNUNET_TIME_Absolute time_start
struct GNUNET_TIME_Relative feedback_frequency
struct GNUNET_TIME_Absolute feedback_last_bw_update
struct TestPeer * test_peer
struct GNUNET_TIME_Relative duration_period
struct GNUNET_TIME_Absolute next_ping_transmission
struct GNUNET_TIME_Relative frequency
struct PropertyGenerator * next
struct PropertyGenerator * prev
struct GNUNET_TIME_Absolute time_start
struct GNUNET_SCHEDULER_Task * set_task
long long unsigned int address_id
long long unsigned int peer
struct TestAddress * test_address
enum GeneratorType type
struct GNUNET_ATS_PluginEnvironment env
Solver environment.
struct GNUNET_ATS_SolverFunctions * sf
Solver handle.
char * plugin
Solver plugin name.
struct GNUNET_CONTAINER_MultiPeerMap * addresses
Address hashmap.
struct TestAddress * next
double prop_norm[GNUNET_ATS_PropertyCount]
struct ATS_Address * ats_addr
long long unsigned int aid
double prop_abs[GNUNET_ATS_PropertyCount]
struct TestAddress * prev
uint32_t assigned_bw_out
struct TestAddress * addr_head
struct TestPeer * prev
uint32_t assigned_bw_in
double pref_norm[GNUNET_ATS_PreferenceCount]
struct GNUNET_PeerIdentity peer_id
double pref_abs[GNUNET_ATS_PreferenceCount]
struct TestAddress * addr_tail
struct TestPeer * next
long long unsigned int id