diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/cadet/gnunet-service-cadet_peer.c | 3 | ||||
-rw-r--r-- | src/hello/hello-ng.c | 1 | ||||
-rw-r--r-- | src/include/Makefile.am | 6 | ||||
-rw-r--r-- | src/include/gnunet_ats_application_service.h | 115 | ||||
-rw-r--r-- | src/include/gnunet_ats_plugin.h | 492 | ||||
-rw-r--r-- | src/include/gnunet_ats_service.h | 652 | ||||
-rw-r--r-- | src/include/gnunet_ats_transport_service.h | 247 | ||||
-rw-r--r-- | src/include/gnunet_transport_manipulation_service.h | 123 | ||||
-rw-r--r-- | src/include/gnunet_transport_monitor_service.h | 1 | ||||
-rw-r--r-- | src/topology/gnunet-daemon-topology.c | 1 | ||||
-rw-r--r-- | src/transport/transport-testing-communicator.c | 1 | ||||
-rw-r--r-- | src/transport/transport-testing-communicator.h | 2 | ||||
-rw-r--r-- | src/transport/transport-testing2.h | 1 | ||||
-rw-r--r-- | src/transport/transport_api2_communication.c | 1 |
14 files changed, 2 insertions, 1644 deletions
diff --git a/src/cadet/gnunet-service-cadet_peer.c b/src/cadet/gnunet-service-cadet_peer.c index 5c810e926..48e288495 100644 --- a/src/cadet/gnunet-service-cadet_peer.c +++ b/src/cadet/gnunet-service-cadet_peer.c | |||
@@ -36,7 +36,6 @@ | |||
36 | #include "gnunet_hello_uri_lib.h" | 36 | #include "gnunet_hello_uri_lib.h" |
37 | #include "gnunet_signatures.h" | 37 | #include "gnunet_signatures.h" |
38 | #include "gnunet_transport_application_service.h" | 38 | #include "gnunet_transport_application_service.h" |
39 | #include "gnunet_ats_service.h" | ||
40 | #include "gnunet_core_service.h" | 39 | #include "gnunet_core_service.h" |
41 | #include "gnunet_statistics_service.h" | 40 | #include "gnunet_statistics_service.h" |
42 | #include "gnunet-service-cadet_peer.h" | 41 | #include "gnunet-service-cadet_peer.h" |
@@ -1321,7 +1320,7 @@ GCP_set_hello (struct CadetPeer *cp, | |||
1321 | if (NULL != cp->hello) | 1320 | if (NULL != cp->hello) |
1322 | { | 1321 | { |
1323 | struct GNUNET_TIME_Absolute now = GNUNET_TIME_absolute_get (); | 1322 | struct GNUNET_TIME_Absolute now = GNUNET_TIME_absolute_get (); |
1324 | 1323 | ||
1325 | struct GNUNET_TIME_Absolute new_hello_exp = | 1324 | struct GNUNET_TIME_Absolute new_hello_exp = |
1326 | GNUNET_HELLO_builder_get_expiration_time (hello); | 1325 | GNUNET_HELLO_builder_get_expiration_time (hello); |
1327 | struct GNUNET_TIME_Absolute old_hello_exp = | 1326 | struct GNUNET_TIME_Absolute old_hello_exp = |
diff --git a/src/hello/hello-ng.c b/src/hello/hello-ng.c index 9d77e4f80..9c255b361 100644 --- a/src/hello/hello-ng.c +++ b/src/hello/hello-ng.c | |||
@@ -28,7 +28,6 @@ | |||
28 | #include "gnunet_hello_lib.h" | 28 | #include "gnunet_hello_lib.h" |
29 | #include "gnunet_protocols.h" | 29 | #include "gnunet_protocols.h" |
30 | #include "gnunet_util_lib.h" | 30 | #include "gnunet_util_lib.h" |
31 | #include "gnunet_ats_service.h" | ||
32 | 31 | ||
33 | GNUNET_NETWORK_STRUCT_BEGIN | 32 | GNUNET_NETWORK_STRUCT_BEGIN |
34 | /** | 33 | /** |
diff --git a/src/include/Makefile.am b/src/include/Makefile.am index f8092f966..7c1b59b3a 100644 --- a/src/include/Makefile.am +++ b/src/include/Makefile.am | |||
@@ -17,10 +17,6 @@ gnunetinclude_HEADERS = \ | |||
17 | gnunet_abd_service.h \ | 17 | gnunet_abd_service.h \ |
18 | gnunet_applications.h \ | 18 | gnunet_applications.h \ |
19 | gnunet_arm_service.h \ | 19 | gnunet_arm_service.h \ |
20 | gnunet_ats_service.h \ | ||
21 | gnunet_ats_application_service.h \ | ||
22 | gnunet_ats_transport_service.h \ | ||
23 | gnunet_ats_plugin.h \ | ||
24 | gnunet_bandwidth_lib.h \ | 20 | gnunet_bandwidth_lib.h \ |
25 | gnunet_bio_lib.h \ | 21 | gnunet_bio_lib.h \ |
26 | gnunet_dht_block_types.h \ | 22 | gnunet_dht_block_types.h \ |
@@ -128,8 +124,6 @@ gnunetinclude_HEADERS = \ | |||
128 | gnunet_transport_communication_service.h \ | 124 | gnunet_transport_communication_service.h \ |
129 | gnunet_transport_core_service.h \ | 125 | gnunet_transport_core_service.h \ |
130 | gnunet_transport_hello_service.h \ | 126 | gnunet_transport_hello_service.h \ |
131 | gnunet_transport_manipulation_service.h \ | ||
132 | gnunet_transport_monitor_service.h \ | ||
133 | gnunet_transport_plugin.h \ | 127 | gnunet_transport_plugin.h \ |
134 | gnunet_transport_testing_ng_lib.h \ | 128 | gnunet_transport_testing_ng_lib.h \ |
135 | gnunet_tun_lib.h \ | 129 | gnunet_tun_lib.h \ |
diff --git a/src/include/gnunet_ats_application_service.h b/src/include/gnunet_ats_application_service.h deleted file mode 100644 index 77edbdf6c..000000000 --- a/src/include/gnunet_ats_application_service.h +++ /dev/null | |||
@@ -1,115 +0,0 @@ | |||
1 | /* | ||
2 | This file is part of GNUnet. | ||
3 | Copyright (C) 2010-2015, 2018 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 | */ | ||
20 | /** | ||
21 | * @addtogroup Backbone | ||
22 | * @{ | ||
23 | * | ||
24 | * @file | ||
25 | * Bandwidth allocation API for applications to interact with | ||
26 | * | ||
27 | * @author Christian Grothoff | ||
28 | * @author Matthias Wachs | ||
29 | * | ||
30 | * @defgroup ats ATS service | ||
31 | * Bandwidth allocation | ||
32 | * | ||
33 | * @see [Documentation](https://gnunet.org/ats-subsystem) | ||
34 | * | ||
35 | * @{ | ||
36 | */ | ||
37 | #ifndef GNUNET_ATS_APPLICATION_SERVICE_H | ||
38 | #define GNUNET_ATS_APPLICATION_SERVICE_H | ||
39 | |||
40 | |||
41 | #include "gnunet_constants.h" | ||
42 | #include "gnunet_util_lib.h" | ||
43 | |||
44 | /** | ||
45 | * Handle to the ATS subsystem for making suggestions about | ||
46 | * connections the peer would like to have. | ||
47 | */ | ||
48 | struct GNUNET_ATS_ApplicationHandle; | ||
49 | |||
50 | |||
51 | /** | ||
52 | * Initialize the ATS application client handle. | ||
53 | * | ||
54 | * @param cfg configuration to use | ||
55 | * @return ats application handle, NULL on error | ||
56 | */ | ||
57 | struct GNUNET_ATS_ApplicationHandle * | ||
58 | GNUNET_ATS_application_init (const struct | ||
59 | GNUNET_CONFIGURATION_Handle *cfg) __attribute__( | ||
60 | (deprecated)); | ||
61 | |||
62 | |||
63 | /** | ||
64 | * Shutdown ATS application client. | ||
65 | * | ||
66 | * @param ch handle to destroy | ||
67 | */ | ||
68 | void | ||
69 | GNUNET_ATS_application_done (struct | ||
70 | GNUNET_ATS_ApplicationHandle *ch) __attribute__( | ||
71 | (deprecated)); | ||
72 | |||
73 | |||
74 | /** | ||
75 | * Handle for suggestion requests. | ||
76 | */ | ||
77 | struct GNUNET_ATS_ApplicationSuggestHandle; | ||
78 | |||
79 | |||
80 | /** | ||
81 | * An application would like to communicate with a peer. ATS should | ||
82 | * allocate bandwidth using a suitable address for requiremetns @a pk | ||
83 | * to transport. | ||
84 | * | ||
85 | * @param ch handle | ||
86 | * @param peer identity of the peer we need an address for | ||
87 | * @param pk what kind of application will the application require (can be | ||
88 | * #GNUNET_MQ_PREFERENCE_NONE, we will still try to connect) | ||
89 | * @param bw desired bandwidth, can be zero (we will still try to connect) | ||
90 | * @return suggestion handle, NULL if request is already pending | ||
91 | */ | ||
92 | struct GNUNET_ATS_ApplicationSuggestHandle * | ||
93 | GNUNET_ATS_application_suggest (struct GNUNET_ATS_ApplicationHandle *ch, | ||
94 | const struct GNUNET_PeerIdentity *peer, | ||
95 | enum GNUNET_MQ_PreferenceKind pk, | ||
96 | struct GNUNET_BANDWIDTH_Value32NBO | ||
97 | bw) __attribute__((deprecated)); | ||
98 | |||
99 | |||
100 | /** | ||
101 | * We no longer care about communicating with a peer. | ||
102 | * | ||
103 | * @param sh handle | ||
104 | */ | ||
105 | void | ||
106 | GNUNET_ATS_application_suggest_cancel (struct | ||
107 | GNUNET_ATS_ApplicationSuggestHandle *sh) | ||
108 | __attribute__((deprecated)); | ||
109 | |||
110 | /** @} */ /* end of group */ | ||
111 | |||
112 | /** @} */ /* end of Backbone addition*/ | ||
113 | |||
114 | #endif | ||
115 | /* end of file gnunet_ats_application_service.h */ | ||
diff --git a/src/include/gnunet_ats_plugin.h b/src/include/gnunet_ats_plugin.h deleted file mode 100644 index 206f2dd52..000000000 --- a/src/include/gnunet_ats_plugin.h +++ /dev/null | |||
@@ -1,492 +0,0 @@ | |||
1 | /* | ||
2 | This file is part of GNUnet | ||
3 | Copyright (C) 2009-2015 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 | */ | ||
20 | |||
21 | /** | ||
22 | * @addtogroup Backbone | ||
23 | * @{ | ||
24 | * | ||
25 | * @author Christian Grothoff | ||
26 | * | ||
27 | * @file | ||
28 | * API for the ATS solvers. | ||
29 | * | ||
30 | * @defgroup ats-plugin ATS service plugin API | ||
31 | * Plugin API for the ATS service. | ||
32 | * | ||
33 | * Specifies the struct that is given to the plugin's entry method and the other | ||
34 | * struct that must be returned. Note that the destructors of ATS plugins will | ||
35 | * be given the value returned by the constructor and is expected to return a | ||
36 | * NULL pointer. | ||
37 | * | ||
38 | * @{ | ||
39 | */ | ||
40 | #ifndef PLUGIN_ATS_H | ||
41 | #define PLUGIN_ATS_H | ||
42 | |||
43 | |||
44 | #include "gnunet_ats_service.h" | ||
45 | #include "gnunet_statistics_service.h" | ||
46 | |||
47 | /** | ||
48 | * Representation of an address the plugin can choose from. | ||
49 | */ | ||
50 | struct ATS_Address; | ||
51 | |||
52 | /** | ||
53 | * Change the preference for a peer | ||
54 | * | ||
55 | * @param handle the solver handle | ||
56 | * @param client the client sending this request | ||
57 | * @param peer the peer id | ||
58 | * @param kind the preference kind to change | ||
59 | * @param score the new preference score | ||
60 | * @param pref_rel the normalized preference value for this kind over all clients | ||
61 | */ | ||
62 | typedef void | ||
63 | (*GAS_solver_address_change_preference) (void *solver, | ||
64 | const struct GNUNET_PeerIdentity *peer, | ||
65 | enum GNUNET_ATS_PreferenceKind kind, | ||
66 | double pref_rel); | ||
67 | |||
68 | |||
69 | /** | ||
70 | * Give feedback about the current assignment | ||
71 | * | ||
72 | * @param handle the solver handle | ||
73 | * @param application the application sending this request | ||
74 | * @param peer the peer id | ||
75 | * @param scope the time interval for this feedback: [now - scope .. now] | ||
76 | * @param kind the preference kind for this feedback | ||
77 | * @param score the feedback score | ||
78 | */ | ||
79 | typedef void | ||
80 | (*GAS_solver_address_feedback_preference) (void *solver, | ||
81 | struct GNUNET_SERVICE_Client * | ||
82 | application, | ||
83 | const struct | ||
84 | GNUNET_PeerIdentity *peer, | ||
85 | const struct GNUNET_TIME_Relative | ||
86 | scope, | ||
87 | enum GNUNET_ATS_PreferenceKind kind, | ||
88 | double score); | ||
89 | |||
90 | /** | ||
91 | * Notify the solver about a bulk operation changing possibly a lot of values | ||
92 | * Solver will not resolve until all bulk operations are marked as done | ||
93 | * | ||
94 | * @param solver the solver | ||
95 | */ | ||
96 | typedef void | ||
97 | (*GAS_solver_bulk_start) (void *solver); | ||
98 | |||
99 | |||
100 | /** | ||
101 | * Mark a bulk operation as done | ||
102 | * Solver will resolve if values have changed | ||
103 | * | ||
104 | * @param solver the solver | ||
105 | */ | ||
106 | typedef void | ||
107 | (*GAS_solver_bulk_stop) (void *solver); | ||
108 | |||
109 | |||
110 | /** | ||
111 | * Add a single address within a network to the solver | ||
112 | * | ||
113 | * @param solver the solver Handle | ||
114 | * @param address the address to add | ||
115 | * @param network network type of this address | ||
116 | */ | ||
117 | typedef void | ||
118 | (*GAS_solver_address_add) (void *solver, | ||
119 | struct ATS_Address *address, | ||
120 | uint32_t network); | ||
121 | |||
122 | |||
123 | /** | ||
124 | * Delete an address or just the session from the solver | ||
125 | * | ||
126 | * @param solver the solver Handle | ||
127 | * @param address the address to delete | ||
128 | */ | ||
129 | typedef void | ||
130 | (*GAS_solver_address_delete) (void *solver, | ||
131 | struct ATS_Address *address); | ||
132 | |||
133 | |||
134 | /** | ||
135 | * Transport properties for this address have changed | ||
136 | * | ||
137 | * @param solver solver handle | ||
138 | * @param address the address | ||
139 | */ | ||
140 | typedef void | ||
141 | (*GAS_solver_address_property_changed) (void *solver, | ||
142 | struct ATS_Address *address); | ||
143 | |||
144 | |||
145 | /** | ||
146 | * Get the preferred address for a peer from solver | ||
147 | * | ||
148 | * @param solver the solver to use | ||
149 | * @param peer the peer | ||
150 | */ | ||
151 | typedef void | ||
152 | (*GAS_solver_get_preferred_address) (void *solver, | ||
153 | const struct GNUNET_PeerIdentity *peer); | ||
154 | |||
155 | |||
156 | /** | ||
157 | * Stop getting the preferred address for a peer from solver | ||
158 | * | ||
159 | * @param solver the solver to use | ||
160 | * @param peer the peer | ||
161 | */ | ||
162 | typedef void | ||
163 | (*GAS_solver_stop_get_preferred_address) (void *solver, | ||
164 | const struct | ||
165 | GNUNET_PeerIdentity *peer); | ||
166 | |||
167 | |||
168 | /** | ||
169 | * Solver functions. | ||
170 | * | ||
171 | * Each solver is required to set up and return an instance | ||
172 | * of this struct during initialization. | ||
173 | */ | ||
174 | struct GNUNET_ATS_SolverFunctions | ||
175 | { | ||
176 | /** | ||
177 | * Closure to pass to all solver functions in this struct. | ||
178 | */ | ||
179 | void *cls; | ||
180 | |||
181 | /** | ||
182 | * Add a new address for a peer to the solver | ||
183 | * | ||
184 | * The address is already contained in the addresses hashmap! | ||
185 | */ | ||
186 | GAS_solver_address_add s_add; | ||
187 | |||
188 | /** | ||
189 | * Update the properties of an address in the solver | ||
190 | */ | ||
191 | GAS_solver_address_property_changed s_address_update_property; | ||
192 | |||
193 | /** | ||
194 | * Tell solver to notify ATS if the address to use changes for a specific | ||
195 | * peer using the bandwidth changed callback | ||
196 | * | ||
197 | * The solver must only notify about changes for peers with pending address | ||
198 | * requests! | ||
199 | */ | ||
200 | GAS_solver_get_preferred_address s_get; | ||
201 | |||
202 | /** | ||
203 | * Tell solver stop notifying ATS about changes for this peers | ||
204 | * | ||
205 | * The solver must only notify about changes for peers with pending address | ||
206 | * requests! | ||
207 | */ | ||
208 | GAS_solver_stop_get_preferred_address s_get_stop; | ||
209 | |||
210 | /** | ||
211 | * Delete an address in the solver | ||
212 | * | ||
213 | * The address is not contained in the address hashmap anymore! | ||
214 | */ | ||
215 | GAS_solver_address_delete s_del; | ||
216 | |||
217 | /** | ||
218 | * Change relative preference for quality in solver | ||
219 | */ | ||
220 | GAS_solver_address_change_preference s_pref; | ||
221 | |||
222 | /** | ||
223 | * Give feedback about the current assignment | ||
224 | */ | ||
225 | GAS_solver_address_feedback_preference s_feedback; | ||
226 | |||
227 | /** | ||
228 | * Start a bulk operation | ||
229 | * | ||
230 | * Used if many values have to be updated at the same time. | ||
231 | * When a bulk operation is pending the solver does not have to resolve | ||
232 | * the problem since more updates will follow anyway | ||
233 | * | ||
234 | * For each call to bulk_start, a call to bulk_stop is required! | ||
235 | */ | ||
236 | GAS_solver_bulk_start s_bulk_start; | ||
237 | |||
238 | /** | ||
239 | * Bulk operation done | ||
240 | * | ||
241 | * If no more bulk operations are pending, the solver can solve the problem | ||
242 | * with the updated values | ||
243 | */ | ||
244 | GAS_solver_bulk_stop s_bulk_stop; | ||
245 | }; | ||
246 | |||
247 | |||
248 | /** | ||
249 | * Operation codes for solver information callback | ||
250 | * | ||
251 | * Order of calls is expected to be: | ||
252 | * #GAS_OP_SOLVE_START | ||
253 | * #GAS_OP_SOLVE_STOP | ||
254 | * #GAS_OP_SOLVE_UPDATE_NOTIFICATION_START | ||
255 | * #GAS_OP_SOLVE_UPDATE_NOTIFICATION_STOP | ||
256 | * | ||
257 | */ | ||
258 | enum GAS_Solver_Operation | ||
259 | { | ||
260 | /** | ||
261 | * A solution iteration has been started | ||
262 | */ | ||
263 | GAS_OP_SOLVE_START, | ||
264 | |||
265 | /** | ||
266 | * A solution iteration has been finished | ||
267 | */ | ||
268 | GAS_OP_SOLVE_STOP, | ||
269 | |||
270 | /** | ||
271 | * The setup of the problem as a preparation to solve it was started | ||
272 | */ | ||
273 | GAS_OP_SOLVE_SETUP_START, | ||
274 | |||
275 | /** | ||
276 | * The setup of the problem as a preparation to solve is finished | ||
277 | */ | ||
278 | GAS_OP_SOLVE_SETUP_STOP, | ||
279 | |||
280 | /** | ||
281 | * Solving of the LP problem was started | ||
282 | * MLP solver only | ||
283 | */ | ||
284 | GAS_OP_SOLVE_MLP_LP_START, | ||
285 | |||
286 | /** | ||
287 | * Solving of the LP problem is done | ||
288 | * MLP solver only | ||
289 | */ | ||
290 | GAS_OP_SOLVE_MLP_LP_STOP, | ||
291 | |||
292 | /** | ||
293 | * Solving of the MLP problem was started | ||
294 | * MLP solver only | ||
295 | */ | ||
296 | GAS_OP_SOLVE_MLP_MLP_START, | ||
297 | |||
298 | /** | ||
299 | * Solving of the MLP problem is done | ||
300 | * MLP solver only | ||
301 | */ | ||
302 | GAS_OP_SOLVE_MLP_MLP_STOP, | ||
303 | |||
304 | /** | ||
305 | * After the problem was finished, start notifications about changes | ||
306 | * to addresses | ||
307 | */ | ||
308 | GAS_OP_SOLVE_UPDATE_NOTIFICATION_START, | ||
309 | |||
310 | /** | ||
311 | * After the problem was finished, notifications about changes to addresses | ||
312 | * are done | ||
313 | */ | ||
314 | GAS_OP_SOLVE_UPDATE_NOTIFICATION_STOP | ||
315 | }; | ||
316 | |||
317 | |||
318 | /** | ||
319 | * Status of a GAS_Solver_Operation operation | ||
320 | */ | ||
321 | enum GAS_Solver_Status | ||
322 | { | ||
323 | /** | ||
324 | * Success | ||
325 | */ | ||
326 | GAS_STAT_SUCCESS, | ||
327 | |||
328 | /** | ||
329 | * Failure | ||
330 | */ | ||
331 | GAS_STAT_FAIL | ||
332 | }; | ||
333 | |||
334 | |||
335 | /** | ||
336 | * Status of the operation | ||
337 | */ | ||
338 | enum GAS_Solver_Additional_Information | ||
339 | { | ||
340 | /** | ||
341 | * No more specific information | ||
342 | */ | ||
343 | GAS_INFO_NONE, | ||
344 | |||
345 | /** | ||
346 | * A full solution process is performed | ||
347 | * Quite specific to the MLP solver | ||
348 | */ | ||
349 | GAS_INFO_FULL, | ||
350 | |||
351 | /** | ||
352 | * An existing solution was reused | ||
353 | * Quite specific to the MLP solver | ||
354 | */ | ||
355 | GAS_INFO_UPDATED, | ||
356 | |||
357 | /** | ||
358 | * The proportional solver had to recalculate for a single network | ||
359 | */ | ||
360 | GAS_INFO_PROP_SINGLE, | ||
361 | |||
362 | /** | ||
363 | * The proportional solver had to recalculate for all networks | ||
364 | */ | ||
365 | GAS_INFO_PROP_ALL | ||
366 | }; | ||
367 | |||
368 | |||
369 | /** | ||
370 | * Callback to call with additional information | ||
371 | * Used for measurement | ||
372 | * | ||
373 | * @param cls the closure | ||
374 | * @param op the operation | ||
375 | */ | ||
376 | typedef void | ||
377 | (*GAS_solver_information_callback) (void *cls, | ||
378 | enum GAS_Solver_Operation op, | ||
379 | enum GAS_Solver_Status stat, | ||
380 | enum GAS_Solver_Additional_Information); | ||
381 | |||
382 | |||
383 | /** | ||
384 | * Callback to call from solver when bandwidth for address has changed | ||
385 | * | ||
386 | * @param address the with changed bandwidth assigned | ||
387 | */ | ||
388 | typedef void | ||
389 | (*GAS_bandwidth_changed_cb) (void *cls, | ||
390 | struct ATS_Address *address); | ||
391 | |||
392 | |||
393 | /** | ||
394 | * Callback to call from solver to obtain application preference | ||
395 | * values for a peer. | ||
396 | * | ||
397 | * @param cls the cls | ||
398 | * @param id the peer id | ||
399 | * @return carry of double values containing the preferences with | ||
400 | * GNUNET_ATS_PreferenceCount elements | ||
401 | */ | ||
402 | typedef const double * | ||
403 | (*GAS_get_preferences) (void *cls, | ||
404 | const struct GNUNET_PeerIdentity *id); | ||
405 | |||
406 | |||
407 | /** | ||
408 | * Callback to call from solver to obtain application connectivity | ||
409 | * preferences for a peer. | ||
410 | * | ||
411 | * @param cls the cls | ||
412 | * @param id the peer id | ||
413 | * @return 0 if connectivity is not desired, non-null if address | ||
414 | * suggestions are requested | ||
415 | */ | ||
416 | typedef unsigned int | ||
417 | (*GAS_get_connectivity) (void *cls, | ||
418 | const struct GNUNET_PeerIdentity *id); | ||
419 | |||
420 | |||
421 | /** | ||
422 | * The ATS plugin will pass a pointer to a struct | ||
423 | * of this type as to the initialization function | ||
424 | * of the ATS plugins. | ||
425 | */ | ||
426 | struct GNUNET_ATS_PluginEnvironment | ||
427 | { | ||
428 | /** | ||
429 | * Configuration handle to be used by the solver | ||
430 | */ | ||
431 | const struct GNUNET_CONFIGURATION_Handle *cfg; | ||
432 | |||
433 | /** | ||
434 | * Statistics handle to be used by the solver | ||
435 | */ | ||
436 | struct GNUNET_STATISTICS_Handle *stats; | ||
437 | |||
438 | /** | ||
439 | * Closure to pass to all callbacks in this struct. | ||
440 | */ | ||
441 | void *cls; | ||
442 | |||
443 | /** | ||
444 | * Hashmap containing all addresses available | ||
445 | */ | ||
446 | struct GNUNET_CONTAINER_MultiPeerMap *addresses; | ||
447 | |||
448 | /** | ||
449 | * ATS addresses callback to be notified about bandwidth assignment changes | ||
450 | */ | ||
451 | GAS_bandwidth_changed_cb bandwidth_changed_cb; | ||
452 | |||
453 | /** | ||
454 | * ATS addresses function to obtain preference values | ||
455 | */ | ||
456 | GAS_get_preferences get_preferences; | ||
457 | |||
458 | /** | ||
459 | * ATS addresses function to obtain preference values | ||
460 | */ | ||
461 | GAS_get_connectivity get_connectivity; | ||
462 | |||
463 | /** | ||
464 | * Callback for solver to call with status information, | ||
465 | * can be NULL | ||
466 | */ | ||
467 | GAS_solver_information_callback info_cb; | ||
468 | |||
469 | /** | ||
470 | * Number of networks available, size of the @e out_quota | ||
471 | * and @e in_quota arrays. | ||
472 | */ | ||
473 | unsigned int network_count; | ||
474 | |||
475 | /** | ||
476 | * Array of configured outbound quotas | ||
477 | * Order according to networks in network array | ||
478 | */ | ||
479 | unsigned long long out_quota[GNUNET_NT_COUNT]; | ||
480 | |||
481 | /** | ||
482 | * Array of configured inbound quotas | ||
483 | * Order according to networks in network array | ||
484 | */ | ||
485 | unsigned long long in_quota[GNUNET_NT_COUNT]; | ||
486 | }; | ||
487 | |||
488 | #endif | ||
489 | |||
490 | /** @} */ /* end of group */ | ||
491 | |||
492 | /** @} */ /* end of group addition */ | ||
diff --git a/src/include/gnunet_ats_service.h b/src/include/gnunet_ats_service.h deleted file mode 100644 index 1bf5d40b0..000000000 --- a/src/include/gnunet_ats_service.h +++ /dev/null | |||
@@ -1,652 +0,0 @@ | |||
1 | /* | ||
2 | This file is part of GNUnet. | ||
3 | Copyright (C) 2010-2015 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 | */ | ||
20 | /** | ||
21 | * @addtogroup Backbone | ||
22 | * @{ | ||
23 | * | ||
24 | * @file | ||
25 | * Automatic transport selection and outbound bandwidth determination | ||
26 | * | ||
27 | * @author Christian Grothoff | ||
28 | * @author Matthias Wachs | ||
29 | * | ||
30 | * @defgroup ats ATS service | ||
31 | * Automatic Transport Selection and outbound bandwidth determination | ||
32 | * | ||
33 | * @see [Documentation](https://gnunet.org/ats-subsystem) | ||
34 | * | ||
35 | * @{ | ||
36 | */ | ||
37 | #ifndef GNUNET_ATS_SERVICE_H | ||
38 | #define GNUNET_ATS_SERVICE_H | ||
39 | |||
40 | |||
41 | #include "gnunet_constants.h" | ||
42 | #include "gnunet_util_lib.h" | ||
43 | #include "gnunet_hello_lib.h" | ||
44 | |||
45 | |||
46 | /** | ||
47 | * Default bandwidth assigned to a network : 64 KB/s | ||
48 | */ | ||
49 | #define GNUNET_ATS_DefaultBandwidth 65536 | ||
50 | |||
51 | /** | ||
52 | * Undefined value for an `enum GNUNET_ATS_Property` | ||
53 | */ | ||
54 | #define GNUNET_ATS_VALUE_UNDEFINED UINT32_MAX | ||
55 | |||
56 | /** | ||
57 | * String representation for GNUNET_ATS_VALUE_UNDEFINED | ||
58 | */ | ||
59 | #define GNUNET_ATS_VALUE_UNDEFINED_STR "undefined" | ||
60 | |||
61 | /** | ||
62 | * Maximum bandwidth assigned to a network : 4095 MB/s | ||
63 | */ | ||
64 | #define GNUNET_ATS_MaxBandwidth UINT32_MAX | ||
65 | |||
66 | /** | ||
67 | * Textual equivalent for GNUNET_ATS_MaxBandwidth | ||
68 | */ | ||
69 | #define GNUNET_ATS_MaxBandwidthString "unlimited" | ||
70 | |||
71 | |||
72 | /** | ||
73 | * ATS performance characteristics for an address. | ||
74 | */ | ||
75 | struct GNUNET_ATS_Properties | ||
76 | { | ||
77 | /** | ||
78 | * Delay. Time between when the time packet is sent and the packet | ||
79 | * arrives. FOREVER if we did not measure yet. | ||
80 | */ | ||
81 | struct GNUNET_TIME_Relative delay; | ||
82 | |||
83 | /** | ||
84 | * Actual traffic on this connection from this peer to the other peer. | ||
85 | * Includes transport overhead. | ||
86 | * | ||
87 | * Unit: [bytes/second] | ||
88 | */ | ||
89 | uint32_t utilization_out; | ||
90 | |||
91 | /** | ||
92 | * Actual traffic on this connection from the other peer to this peer. | ||
93 | * Includes transport overhead. | ||
94 | * | ||
95 | * Unit: [bytes/second] | ||
96 | */ | ||
97 | uint32_t utilization_in; | ||
98 | |||
99 | /** | ||
100 | * Distance on network layer (required for distance-vector routing) | ||
101 | * in hops. Zero for direct connections (e.g. plain TCP/UDP). | ||
102 | */ | ||
103 | unsigned int distance; | ||
104 | |||
105 | /** | ||
106 | * Which network scope does the respective address belong to? | ||
107 | * This property does not change. | ||
108 | */ | ||
109 | enum GNUNET_NetworkType scope; | ||
110 | }; | ||
111 | |||
112 | |||
113 | /** | ||
114 | * ATS performance characteristics for an address in | ||
115 | * network byte order (for IPC). | ||
116 | */ | ||
117 | struct GNUNET_ATS_PropertiesNBO | ||
118 | { | ||
119 | /** | ||
120 | * Actual traffic on this connection from this peer to the other peer. | ||
121 | * Includes transport overhead. | ||
122 | * | ||
123 | * Unit: [bytes/second] | ||
124 | */ | ||
125 | uint32_t utilization_out GNUNET_PACKED; | ||
126 | |||
127 | /** | ||
128 | * Actual traffic on this connection from the other peer to this peer. | ||
129 | * Includes transport overhead. | ||
130 | * | ||
131 | * Unit: [bytes/second] | ||
132 | */ | ||
133 | uint32_t utilization_in GNUNET_PACKED; | ||
134 | |||
135 | /** | ||
136 | * Which network scope does the respective address belong to? | ||
137 | * This property does not change. | ||
138 | */ | ||
139 | uint32_t scope GNUNET_PACKED; | ||
140 | |||
141 | /** | ||
142 | * Distance on network layer (required for distance-vector routing) | ||
143 | * in hops. Zero for direct connections (e.g. plain TCP/UDP). | ||
144 | */ | ||
145 | uint32_t distance GNUNET_PACKED; | ||
146 | |||
147 | /** | ||
148 | * Delay. Time between when the time packet is sent and the packet | ||
149 | * arrives. FOREVER if we did not measure yet. | ||
150 | */ | ||
151 | struct GNUNET_TIME_RelativeNBO delay; | ||
152 | }; | ||
153 | |||
154 | |||
155 | /* ********************* LAN Characterization library ************************ */ | ||
156 | /* Note: these functions do not really communicate with the ATS service */ | ||
157 | |||
158 | |||
159 | /** | ||
160 | * Convert ATS properties from host to network byte order. | ||
161 | * | ||
162 | * @param nbo[out] value written | ||
163 | * @param hbo value read | ||
164 | */ | ||
165 | void | ||
166 | GNUNET_ATS_properties_hton (struct GNUNET_ATS_PropertiesNBO *nbo, | ||
167 | const struct GNUNET_ATS_Properties *hbo); | ||
168 | |||
169 | |||
170 | /** | ||
171 | * Convert ATS properties from network to host byte order. | ||
172 | * | ||
173 | * @param hbo[out] value written | ||
174 | * @param nbo value read | ||
175 | */ | ||
176 | void | ||
177 | GNUNET_ATS_properties_ntoh (struct GNUNET_ATS_Properties *hbo, | ||
178 | const struct GNUNET_ATS_PropertiesNBO *nbo); | ||
179 | |||
180 | |||
181 | /* ********************Connection Suggestion API ***************************** */ | ||
182 | |||
183 | /** | ||
184 | * Handle to the ATS subsystem for making suggestions about | ||
185 | * connections the peer would like to have. | ||
186 | */ | ||
187 | struct GNUNET_ATS_ConnectivityHandle; | ||
188 | |||
189 | /** | ||
190 | * Handle for address suggestion requests. | ||
191 | */ | ||
192 | struct GNUNET_ATS_ConnectivitySuggestHandle; | ||
193 | |||
194 | |||
195 | /** | ||
196 | * Initialize the ATS connectivity suggestion client handle. | ||
197 | * | ||
198 | * @param cfg configuration to use | ||
199 | * @return ats connectivity handle, NULL on error | ||
200 | */ | ||
201 | struct GNUNET_ATS_ConnectivityHandle * | ||
202 | GNUNET_ATS_connectivity_init (const struct | ||
203 | GNUNET_CONFIGURATION_Handle *cfg) __attribute__( | ||
204 | (deprecated)); | ||
205 | |||
206 | |||
207 | /** | ||
208 | * Shutdown ATS connectivity suggestion client. | ||
209 | * | ||
210 | * @param ch handle to destroy | ||
211 | */ | ||
212 | void | ||
213 | GNUNET_ATS_connectivity_done (struct | ||
214 | GNUNET_ATS_ConnectivityHandle *ch) __attribute__( | ||
215 | (deprecated)); | ||
216 | |||
217 | |||
218 | /** | ||
219 | * We would like to establish a new connection with a peer. ATS | ||
220 | * should suggest a good address to begin with. | ||
221 | * | ||
222 | * @param ch handle | ||
223 | * @param peer identity of the peer we need an address for | ||
224 | * @param strength how urgent is the need for such a suggestion | ||
225 | * @return suggestion handle, NULL if request is already pending | ||
226 | */ | ||
227 | struct GNUNET_ATS_ConnectivitySuggestHandle * | ||
228 | GNUNET_ATS_connectivity_suggest (struct GNUNET_ATS_ConnectivityHandle *ch, | ||
229 | const struct GNUNET_PeerIdentity *peer, | ||
230 | uint32_t strength) __attribute__((deprecated)); | ||
231 | |||
232 | |||
233 | /** | ||
234 | * We no longer care about being connected to a peer. | ||
235 | * | ||
236 | * @param sh handle to stop | ||
237 | */ | ||
238 | void | ||
239 | GNUNET_ATS_connectivity_suggest_cancel (struct | ||
240 | GNUNET_ATS_ConnectivitySuggestHandle *sh) | ||
241 | __attribute__((deprecated)); | ||
242 | |||
243 | |||
244 | /* ******************************** Scheduling API ***************************** */ | ||
245 | |||
246 | /** | ||
247 | * Handle to the ATS subsystem for bandwidth/transport scheduling information. | ||
248 | */ | ||
249 | struct GNUNET_ATS_SchedulingHandle; | ||
250 | |||
251 | /** | ||
252 | * Opaque session handle, defined by plugins. Contents not known to ATS. | ||
253 | */ | ||
254 | struct GNUNET_ATS_Session; | ||
255 | |||
256 | |||
257 | /** | ||
258 | * Signature of a function called by ATS with the current bandwidth | ||
259 | * and address preferences as determined by ATS. If our connection | ||
260 | * to ATS dies and thus all suggestions become invalid, this function | ||
261 | * is called ONCE with all arguments (except @a cls) being NULL/0. | ||
262 | * | ||
263 | * @param cls closure | ||
264 | * @param peer for which we suggest an address, NULL if ATS connection died | ||
265 | * @param address suggested address (including peer identity of the peer), | ||
266 | * may be NULL to signal disconnect from peer | ||
267 | * @param session session to use, NULL to establish a new outgoing session | ||
268 | * @param bandwidth_out assigned outbound bandwidth for the connection, | ||
269 | * 0 to signal disconnect | ||
270 | * @param bandwidth_in assigned inbound bandwidth for the connection, | ||
271 | * 0 to signal disconnect | ||
272 | */ | ||
273 | typedef void | ||
274 | (*GNUNET_ATS_AddressSuggestionCallback) (void *cls, | ||
275 | const struct GNUNET_PeerIdentity *peer, | ||
276 | const struct | ||
277 | GNUNET_HELLO_Address *address, | ||
278 | struct GNUNET_ATS_Session *session, | ||
279 | struct GNUNET_BANDWIDTH_Value32NBO | ||
280 | bandwidth_out, | ||
281 | struct GNUNET_BANDWIDTH_Value32NBO | ||
282 | bandwidth_in); | ||
283 | |||
284 | |||
285 | /** | ||
286 | * Initialize the ATS scheduling subsystem. | ||
287 | * | ||
288 | * @param cfg configuration to use | ||
289 | * @param suggest_cb notification to call whenever the suggestation changed | ||
290 | * @param suggest_cb_cls closure for @a suggest_cb | ||
291 | * @return ats context | ||
292 | */ | ||
293 | struct GNUNET_ATS_SchedulingHandle * | ||
294 | GNUNET_ATS_scheduling_init (const struct GNUNET_CONFIGURATION_Handle *cfg, | ||
295 | GNUNET_ATS_AddressSuggestionCallback suggest_cb, | ||
296 | void *suggest_cb_cls) __attribute__((deprecated)); | ||
297 | |||
298 | |||
299 | /** | ||
300 | * Client is done with ATS scheduling, release resources. | ||
301 | * | ||
302 | * @param sh handle to release | ||
303 | */ | ||
304 | void | ||
305 | GNUNET_ATS_scheduling_done (struct | ||
306 | GNUNET_ATS_SchedulingHandle *sh) __attribute__( | ||
307 | (deprecated)); | ||
308 | |||
309 | |||
310 | /** | ||
311 | * Handle used within ATS to track an address. | ||
312 | */ | ||
313 | struct GNUNET_ATS_AddressRecord; | ||
314 | |||
315 | |||
316 | /** | ||
317 | * We have a new address ATS should know. Addresses have to be added with this | ||
318 | * function before they can be: updated, set in use and destroyed | ||
319 | * | ||
320 | * @param sh handle | ||
321 | * @param address the address | ||
322 | * @param session session handle (if available, e.g for incoming connections) | ||
323 | * @param prop performance data for the address | ||
324 | * @return handle to the address representation inside ATS, NULL | ||
325 | * on error (i.e. ATS knows this exact address already, or | ||
326 | * address is invalid) | ||
327 | */ | ||
328 | struct GNUNET_ATS_AddressRecord * | ||
329 | GNUNET_ATS_address_add (struct GNUNET_ATS_SchedulingHandle *sh, | ||
330 | const struct GNUNET_HELLO_Address *address, | ||
331 | struct GNUNET_ATS_Session *session, | ||
332 | const struct GNUNET_ATS_Properties *prop) __attribute__( | ||
333 | (deprecated)); | ||
334 | |||
335 | |||
336 | /** | ||
337 | * An address was used to initiate a session. | ||
338 | * | ||
339 | * @param ar address record to update information for | ||
340 | * @param session session handle | ||
341 | */ | ||
342 | void | ||
343 | GNUNET_ATS_address_add_session (struct GNUNET_ATS_AddressRecord *ar, | ||
344 | struct GNUNET_ATS_Session *session) | ||
345 | __attribute__((deprecated)); | ||
346 | |||
347 | |||
348 | /** | ||
349 | * A @a session was destroyed, disassociate it from the given address | ||
350 | * record. If this was an incoming address, destroys the address as | ||
351 | * well. | ||
352 | * | ||
353 | * @param ar address record to update information for | ||
354 | * @param session session handle | ||
355 | * @return #GNUNET_YES if the @a ar was destroyed because | ||
356 | * it was an incoming address, | ||
357 | * #GNUNET_NO if the @a ar was kept because we can | ||
358 | * use it still to establish a new session | ||
359 | */ | ||
360 | int | ||
361 | GNUNET_ATS_address_del_session (struct GNUNET_ATS_AddressRecord *ar, | ||
362 | struct GNUNET_ATS_Session *session) | ||
363 | __attribute__((deprecated)); | ||
364 | |||
365 | |||
366 | /** | ||
367 | * We have updated performance statistics for a given address. Note | ||
368 | * that this function can be called for addresses that are currently | ||
369 | * in use as well as addresses that are valid but not actively in use. | ||
370 | * Furthermore, the peer may not even be connected to us right now (@a | ||
371 | * session value of NULL used to signal disconnect, or somehow we | ||
372 | * otherwise got updated on @a ats information). Based on the | ||
373 | * information provided, ATS may update bandwidth assignments and | ||
374 | * suggest to switch addresses. | ||
375 | * | ||
376 | * @param ar address record to update information for | ||
377 | * @param prop performance data for the address | ||
378 | */ | ||
379 | void | ||
380 | GNUNET_ATS_address_update (struct GNUNET_ATS_AddressRecord *ar, | ||
381 | const struct | ||
382 | GNUNET_ATS_Properties *prop) __attribute__( | ||
383 | (deprecated)); | ||
384 | |||
385 | |||
386 | /** | ||
387 | * An address got destroyed, stop using it as a valid address. | ||
388 | * | ||
389 | * @param ar address record to destroy, its validation has | ||
390 | * expired and ATS may no longer use it | ||
391 | */ | ||
392 | void | ||
393 | GNUNET_ATS_address_destroy (struct GNUNET_ATS_AddressRecord *ar) __attribute__( | ||
394 | (deprecated)); | ||
395 | |||
396 | |||
397 | /* ******************************** Performance API ***************************** */ | ||
398 | |||
399 | /** | ||
400 | * ATS Handle to obtain and/or modify performance information. | ||
401 | */ | ||
402 | struct GNUNET_ATS_PerformanceHandle; | ||
403 | |||
404 | /** | ||
405 | * Signature of a function that is called with QoS information about an address. | ||
406 | * | ||
407 | * @param cls closure | ||
408 | * @param address the address, NULL if ATS service was disconnected or | ||
409 | * when the iteration is completed in the case of | ||
410 | * #GNUNET_ATS_performance_list_addresses() | ||
411 | * @param address_active #GNUNET_YES if this address is actively used | ||
412 | * to maintain a connection to a peer; | ||
413 | * #GNUNET_NO if the address is not actively used; | ||
414 | * #GNUNET_SYSERR if this address is no longer available for ATS | ||
415 | * @param bandwidth_out assigned outbound bandwidth for the connection | ||
416 | * @param bandwidth_in assigned inbound bandwidth for the connection | ||
417 | * @param prop performance data for the address | ||
418 | */ | ||
419 | typedef void | ||
420 | (*GNUNET_ATS_AddressInformationCallback) (void *cls, | ||
421 | const struct | ||
422 | GNUNET_HELLO_Address *address, | ||
423 | int address_active, | ||
424 | struct GNUNET_BANDWIDTH_Value32NBO | ||
425 | bandwidth_out, | ||
426 | struct GNUNET_BANDWIDTH_Value32NBO | ||
427 | bandwidth_in, | ||
428 | const struct | ||
429 | GNUNET_ATS_Properties *prop); | ||
430 | |||
431 | |||
432 | /** | ||
433 | * Handle for an address listing operation | ||
434 | */ | ||
435 | struct GNUNET_ATS_AddressListHandle; | ||
436 | |||
437 | |||
438 | /** | ||
439 | * Get handle to access performance API of the ATS subsystem. | ||
440 | * | ||
441 | * @param cfg configuration to use | ||
442 | * @param addr_info_cb callback called when performance characteristics for | ||
443 | * an address change | ||
444 | * @param addr_info_cb_cls closure for @a addr_info_cb | ||
445 | * @return ats performance context | ||
446 | */ | ||
447 | struct GNUNET_ATS_PerformanceHandle * | ||
448 | GNUNET_ATS_performance_init (const struct GNUNET_CONFIGURATION_Handle *cfg, | ||
449 | GNUNET_ATS_AddressInformationCallback addr_info_cb, | ||
450 | void *addr_info_cb_cls) __attribute__( | ||
451 | (deprecated)); | ||
452 | |||
453 | |||
454 | /** | ||
455 | * Get information about addresses known to the ATS subsystem. | ||
456 | * | ||
457 | * @param ph the performance handle to use | ||
458 | * @param peer peer idm can be NULL for all peers | ||
459 | * @param all #GNUNET_YES to get information about all addresses or #GNUNET_NO to | ||
460 | * get only address currently used | ||
461 | * @param infocb callback to call with the addresses, | ||
462 | * will callback with address == NULL when done | ||
463 | * @param infocb_cls closure for @a infocb | ||
464 | * @return handle to abort the operation | ||
465 | */ | ||
466 | struct GNUNET_ATS_AddressListHandle * | ||
467 | GNUNET_ATS_performance_list_addresses (struct GNUNET_ATS_PerformanceHandle *ph, | ||
468 | const struct GNUNET_PeerIdentity *peer, | ||
469 | int all, | ||
470 | GNUNET_ATS_AddressInformationCallback | ||
471 | infocb, | ||
472 | void *infocb_cls) __attribute__( | ||
473 | (deprecated)); | ||
474 | |||
475 | |||
476 | /** | ||
477 | * Cancel a pending address listing operation | ||
478 | * | ||
479 | * @param alh the `struct GNUNET_ATS_AddressListHandle` handle to cancel | ||
480 | */ | ||
481 | void | ||
482 | GNUNET_ATS_performance_list_addresses_cancel (struct | ||
483 | GNUNET_ATS_AddressListHandle *alh) | ||
484 | __attribute__((deprecated)); | ||
485 | |||
486 | |||
487 | /** | ||
488 | * Client is done using the ATS performance subsystem, release resources. | ||
489 | * | ||
490 | * @param ph handle | ||
491 | */ | ||
492 | void | ||
493 | GNUNET_ATS_performance_done (struct | ||
494 | GNUNET_ATS_PerformanceHandle *ph) __attribute__( | ||
495 | (deprecated)); | ||
496 | |||
497 | |||
498 | /** | ||
499 | * Function called with reservation result. | ||
500 | * | ||
501 | * @param cls closure | ||
502 | * @param peer identifies the peer | ||
503 | * @param amount set to the amount that was actually reserved or unreserved; | ||
504 | * either the full requested amount or zero (no partial reservations) | ||
505 | * @param res_delay if the reservation could not be satisfied (amount was 0), how | ||
506 | * long should the client wait until re-trying? | ||
507 | */ | ||
508 | typedef void | ||
509 | (*GNUNET_ATS_ReservationCallback) (void *cls, | ||
510 | const struct GNUNET_PeerIdentity *peer, | ||
511 | int32_t amount, | ||
512 | struct GNUNET_TIME_Relative res_delay); | ||
513 | |||
514 | |||
515 | /** | ||
516 | * Context that can be used to cancel a peer information request. | ||
517 | */ | ||
518 | struct GNUNET_ATS_ReservationContext; | ||
519 | |||
520 | |||
521 | /** | ||
522 | * Reserve inbound bandwidth from the given peer. ATS will look at | ||
523 | * the current amount of traffic we receive from the peer and ensure | ||
524 | * that the peer could add 'amount' of data to its stream. | ||
525 | * | ||
526 | * @param ph performance handle | ||
527 | * @param peer identifies the peer | ||
528 | * @param amount reserve N bytes for receiving, negative | ||
529 | * amounts can be used to undo a (recent) reservation; | ||
530 | * @param rcb function to call with the resulting reservation information | ||
531 | * @param rcb_cls closure for @a rcb | ||
532 | * @return NULL on error | ||
533 | * @deprecated will be replaced soon | ||
534 | */ | ||
535 | struct GNUNET_ATS_ReservationContext * | ||
536 | GNUNET_ATS_reserve_bandwidth (struct GNUNET_ATS_PerformanceHandle *ph, | ||
537 | const struct GNUNET_PeerIdentity *peer, | ||
538 | int32_t amount, | ||
539 | GNUNET_ATS_ReservationCallback rcb, | ||
540 | void *rcb_cls) __attribute__((deprecated)); | ||
541 | |||
542 | |||
543 | /** | ||
544 | * Cancel request for reserving bandwidth. | ||
545 | * | ||
546 | * @param rc context returned by the original #GNUNET_ATS_reserve_bandwidth() call | ||
547 | */ | ||
548 | void | ||
549 | GNUNET_ATS_reserve_bandwidth_cancel (struct | ||
550 | GNUNET_ATS_ReservationContext *rc) | ||
551 | __attribute__((deprecated)); | ||
552 | |||
553 | |||
554 | /** | ||
555 | * ATS preference types as array initializer | ||
556 | */ | ||
557 | #define GNUNET_ATS_PreferenceType { GNUNET_ATS_PREFERENCE_BANDWIDTH, \ | ||
558 | GNUNET_ATS_PREFERENCE_LATENCY, \ | ||
559 | GNUNET_ATS_PREFERENCE_END } | ||
560 | |||
561 | /** | ||
562 | * ATS preference types as string array initializer | ||
563 | */ | ||
564 | #define GNUNET_ATS_PreferenceTypeString { "BANDWIDTH", "LATENCY", "END" } | ||
565 | |||
566 | /** | ||
567 | * Enum defining all known preference categories. | ||
568 | */ | ||
569 | enum GNUNET_ATS_PreferenceKind | ||
570 | { | ||
571 | /** | ||
572 | * Change the peer's bandwidth value (value per byte of bandwidth in | ||
573 | * the goal function) to the given amount. The argument is followed | ||
574 | * by a double value giving the desired value (can be negative). | ||
575 | * Preference changes are forgotten if peers disconnect. | ||
576 | */ | ||
577 | GNUNET_ATS_PREFERENCE_BANDWIDTH = 0, | ||
578 | |||
579 | /** | ||
580 | * Change the peer's latency value to the given amount. The | ||
581 | * argument is followed by a double value giving the desired value | ||
582 | * (can be negative). The absolute score in the goal function is | ||
583 | * the inverse of the latency in microseconds (minimum: 1 | ||
584 | * microsecond) multiplied by the latency preferences. | ||
585 | */ | ||
586 | GNUNET_ATS_PREFERENCE_LATENCY = 1, | ||
587 | |||
588 | /** | ||
589 | * End of preference list. | ||
590 | */ | ||
591 | GNUNET_ATS_PREFERENCE_END = 2 | ||
592 | }; | ||
593 | |||
594 | |||
595 | /** | ||
596 | * Convert an `enum GNUNET_ATS_PreferenceType` to a string | ||
597 | * | ||
598 | * @param type the preference type | ||
599 | * @return a string or NULL if invalid | ||
600 | */ | ||
601 | const char * | ||
602 | GNUNET_ATS_print_preference_type (enum GNUNET_ATS_PreferenceKind | ||
603 | type) __attribute__((deprecated)); | ||
604 | |||
605 | |||
606 | /** | ||
607 | * Change preferences for the given peer. Preference changes are | ||
608 | * forgotten if peers disconnect. | ||
609 | * | ||
610 | * @param ph performance handle | ||
611 | * @param peer identifies the peer | ||
612 | * @param ... #GNUNET_ATS_PREFERENCE_END-terminated specification of the | ||
613 | * desired changes | ||
614 | */ | ||
615 | void | ||
616 | GNUNET_ATS_performance_change_preference (struct | ||
617 | GNUNET_ATS_PerformanceHandle *ph, | ||
618 | const struct | ||
619 | GNUNET_PeerIdentity *peer, | ||
620 | ...) __attribute__((deprecated)); | ||
621 | |||
622 | |||
623 | /** | ||
624 | * Application feedback on how good preference requirements are fulfilled | ||
625 | * for the preferences included in the given time scope [now - scope .. now] | ||
626 | * | ||
627 | * An application notifies ATS if (and only if) it has feedback information | ||
628 | * for specific properties. This values are valid until the feedback scores are | ||
629 | * updated by the application. | ||
630 | * | ||
631 | * If the application has no feedback for this preference kind the application | ||
632 | * will not explicitly call for this property and will not include it in this | ||
633 | * function call. | ||
634 | * | ||
635 | * @param ph performance handle | ||
636 | * @param scope the time interval this valid for: [now - scope .. now] | ||
637 | * @param peer identifies the peer | ||
638 | * @param ... #GNUNET_ATS_PREFERENCE_END-terminated specification of the desired changes | ||
639 | */ | ||
640 | void | ||
641 | GNUNET_ATS_performance_give_feedback (struct GNUNET_ATS_PerformanceHandle *ph, | ||
642 | const struct GNUNET_PeerIdentity *peer, | ||
643 | const struct GNUNET_TIME_Relative scope, | ||
644 | ...) __attribute__((deprecated)); | ||
645 | |||
646 | #endif | ||
647 | |||
648 | /** @} */ /* end of group */ | ||
649 | |||
650 | /** @} */ /* end of Backbone addition */ | ||
651 | |||
652 | /* end of file gnunet-service-transport_ats.h */ | ||
diff --git a/src/include/gnunet_ats_transport_service.h b/src/include/gnunet_ats_transport_service.h deleted file mode 100644 index 24594f44b..000000000 --- a/src/include/gnunet_ats_transport_service.h +++ /dev/null | |||
@@ -1,247 +0,0 @@ | |||
1 | /* | ||
2 | This file is part of GNUnet. | ||
3 | Copyright (C) 2010-2015, 2018 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 | */ | ||
20 | /** | ||
21 | * @file | ||
22 | * Bandwidth allocation API for the transport service | ||
23 | * | ||
24 | * @author Christian Grothoff | ||
25 | * @author Matthias Wachs | ||
26 | * | ||
27 | * @defgroup ats ATS service | ||
28 | * Bandwidth allocation for transport service | ||
29 | * | ||
30 | * @see [Documentation](https://gnunet.org/ats-subsystem) | ||
31 | * | ||
32 | * @{ | ||
33 | */ | ||
34 | #ifndef GNUNET_ATS_TRANSPORT_SERVICE_H | ||
35 | #define GNUNET_ATS_TRANSPORT_SERVICE_H | ||
36 | |||
37 | |||
38 | #include "gnunet_constants.h" | ||
39 | #include "gnunet_util_lib.h" | ||
40 | #include "gnunet_nt_lib.h" | ||
41 | #include "gnunet_transport_communication_service.h" | ||
42 | |||
43 | |||
44 | /** | ||
45 | * ATS performance characteristics for a session. | ||
46 | */ | ||
47 | struct GNUNET_ATS_Properties | ||
48 | { | ||
49 | /** | ||
50 | * Delay. Time between when the time packet is sent and the packet | ||
51 | * arrives. FOREVER if we did not (successfully) measure yet. | ||
52 | */ | ||
53 | struct GNUNET_TIME_Relative delay; | ||
54 | |||
55 | /** | ||
56 | * Confirmed successful payload on this connection from this peer to | ||
57 | * the other peer. | ||
58 | * | ||
59 | * Unit: [bytes/second] | ||
60 | */ | ||
61 | uint32_t goodput_out; | ||
62 | |||
63 | /** | ||
64 | * Confirmed useful payload on this connection to this peer from | ||
65 | * the other peer. | ||
66 | * | ||
67 | * Unit: [bytes/second] | ||
68 | */ | ||
69 | uint32_t goodput_in; | ||
70 | |||
71 | /** | ||
72 | * Actual traffic on this connection from this peer to the other peer. | ||
73 | * Includes transport overhead. | ||
74 | * | ||
75 | * Unit: [bytes/second] | ||
76 | */ | ||
77 | uint32_t utilization_out; | ||
78 | |||
79 | /** | ||
80 | * Actual traffic on this connection from the other peer to this peer. | ||
81 | * Includes transport overhead. | ||
82 | * | ||
83 | * Unit: [bytes/second] | ||
84 | */ | ||
85 | uint32_t utilization_in; | ||
86 | |||
87 | /** | ||
88 | * Distance on network layer (required for distance-vector routing) | ||
89 | * in hops. Zero for direct connections (e.g. plain TCP/UDP). | ||
90 | */ | ||
91 | uint32_t distance; | ||
92 | |||
93 | /** | ||
94 | * MTU of the network layer, UINT32_MAX for no MTU (stream). | ||
95 | * | ||
96 | * Unit: [bytes] | ||
97 | */ | ||
98 | uint32_t mtu; | ||
99 | |||
100 | /** | ||
101 | * Which network scope does the respective address belong to? | ||
102 | */ | ||
103 | enum GNUNET_NetworkType nt; | ||
104 | |||
105 | /** | ||
106 | * What characteristics does this communicator have? | ||
107 | */ | ||
108 | enum GNUNET_TRANSPORT_CommunicatorCharacteristics cc; | ||
109 | }; | ||
110 | |||
111 | |||
112 | /* ******************************** Transport API ***************************** */ | ||
113 | |||
114 | /** | ||
115 | * Handle to the ATS subsystem for bandwidth/transport transport information. | ||
116 | */ | ||
117 | struct GNUNET_ATS_TransportHandle; | ||
118 | |||
119 | /** | ||
120 | * Opaque session handle, to be defined by transport. Contents not known to ATS. | ||
121 | */ | ||
122 | struct GNUNET_ATS_Session; | ||
123 | |||
124 | |||
125 | /** | ||
126 | * Signature of a function called by ATS with the current bandwidth | ||
127 | * allocation to be used as determined by ATS. | ||
128 | * | ||
129 | * @param cls closure | ||
130 | * @param session session this is about | ||
131 | * @param bandwidth_out assigned outbound bandwidth for the connection, | ||
132 | * 0 to signal disconnect | ||
133 | * @param bandwidth_in assigned inbound bandwidth for the connection, | ||
134 | * 0 to signal disconnect | ||
135 | */ | ||
136 | typedef void | ||
137 | (*GNUNET_ATS_AllocationCallback) (void *cls, | ||
138 | struct GNUNET_ATS_Session *session, | ||
139 | struct GNUNET_BANDWIDTH_Value32NBO | ||
140 | bandwidth_out, | ||
141 | struct GNUNET_BANDWIDTH_Value32NBO | ||
142 | bandwidth_in); | ||
143 | |||
144 | |||
145 | /** | ||
146 | * Signature of a function called by ATS suggesting transport to | ||
147 | * try connecting with a particular address. | ||
148 | * | ||
149 | * @param cls closure | ||
150 | * @param pid target peer | ||
151 | * @param address the address to try | ||
152 | */ | ||
153 | typedef void | ||
154 | (*GNUNET_ATS_SuggestionCallback) (void *cls, | ||
155 | const struct GNUNET_PeerIdentity *pid, | ||
156 | const char *address); | ||
157 | |||
158 | |||
159 | /** | ||
160 | * Initialize the ATS transport subsystem. | ||
161 | * | ||
162 | * @param cfg configuration to use | ||
163 | * @param alloc_cb notification to call whenever the allocation changed | ||
164 | * @param alloc_cb_cls closure for @a alloc_cb | ||
165 | * @param suggest_cb notification to call whenever the suggestation is made | ||
166 | * @param suggest_cb_cls closure for @a suggest_cb | ||
167 | * @return ats context | ||
168 | */ | ||
169 | struct GNUNET_ATS_TransportHandle * | ||
170 | GNUNET_ATS_transport_init (const struct GNUNET_CONFIGURATION_Handle *cfg, | ||
171 | GNUNET_ATS_AllocationCallback alloc_cb, | ||
172 | void *alloc_cb_cls, | ||
173 | GNUNET_ATS_SuggestionCallback suggest_cb, | ||
174 | void *suggest_cb_cls) __attribute__((deprecated)); | ||
175 | |||
176 | |||
177 | /** | ||
178 | * Client is done with ATS transport, release resources. | ||
179 | * | ||
180 | * @param ath handle to release | ||
181 | */ | ||
182 | void | ||
183 | GNUNET_ATS_transport_done (struct | ||
184 | GNUNET_ATS_TransportHandle *ath) __attribute__( | ||
185 | (deprecated)); | ||
186 | |||
187 | |||
188 | /** | ||
189 | * Handle used within ATS to track an session. | ||
190 | */ | ||
191 | struct GNUNET_ATS_SessionRecord; | ||
192 | |||
193 | |||
194 | /** | ||
195 | * We have a new session ATS should know. Sessiones have to be added with this | ||
196 | * function before they can be: updated, set in use and destroyed | ||
197 | * | ||
198 | * @param ath handle | ||
199 | * @param pid peer we connected to | ||
200 | * @param address the address (human readable version), | ||
201 | * @param session transport-internal handle for the session/queue, NULL if | ||
202 | * the session is inbound-only | ||
203 | * @param prop performance data for the session | ||
204 | * @return handle to the session representation inside ATS, NULL | ||
205 | * on error (i.e. ATS knows this exact session already, or | ||
206 | * session is invalid) | ||
207 | */ | ||
208 | struct GNUNET_ATS_SessionRecord * | ||
209 | GNUNET_ATS_session_add (struct GNUNET_ATS_TransportHandle *ath, | ||
210 | const struct GNUNET_PeerIdentity *pid, | ||
211 | const char *address, | ||
212 | struct GNUNET_ATS_Session *session, | ||
213 | const struct GNUNET_ATS_Properties *prop) __attribute__( | ||
214 | (deprecated)); | ||
215 | |||
216 | |||
217 | /** | ||
218 | * We have updated performance statistics for a given session. Based | ||
219 | * on the information provided, ATS may update bandwidth assignments. | ||
220 | * | ||
221 | * @param ar session record to update information for | ||
222 | * @param prop performance data for the session | ||
223 | */ | ||
224 | void | ||
225 | GNUNET_ATS_session_update (struct GNUNET_ATS_SessionRecord *ar, | ||
226 | const struct | ||
227 | GNUNET_ATS_Properties *prop) __attribute__( | ||
228 | (deprecated)); | ||
229 | |||
230 | |||
231 | /** | ||
232 | * A session was destroyed, ATS should now schedule and | ||
233 | * allocate under the assumption that this @a ar is no | ||
234 | * longer in use. | ||
235 | * | ||
236 | * @param ar session record to drop | ||
237 | */ | ||
238 | void | ||
239 | GNUNET_ATS_session_del (struct GNUNET_ATS_SessionRecord *ar) __attribute__( | ||
240 | (deprecated)); | ||
241 | |||
242 | |||
243 | #endif | ||
244 | |||
245 | /** @} */ /* end of group */ | ||
246 | |||
247 | /* end of file gnunet-service-transport_ats.h */ | ||
diff --git a/src/include/gnunet_transport_manipulation_service.h b/src/include/gnunet_transport_manipulation_service.h deleted file mode 100644 index 694ca7dca..000000000 --- a/src/include/gnunet_transport_manipulation_service.h +++ /dev/null | |||
@@ -1,123 +0,0 @@ | |||
1 | /* | ||
2 | This file is part of GNUnet. | ||
3 | Copyright (C) 2009-2014, 2016 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 | */ | ||
20 | |||
21 | /** | ||
22 | * @addtogroup Backbone | ||
23 | * @{ | ||
24 | * | ||
25 | * @author Christian Grothoff | ||
26 | * | ||
27 | * @file | ||
28 | * Low-level P2P IO | ||
29 | * | ||
30 | * @defgroup transport Transport service | ||
31 | * Low-level P2P IO | ||
32 | * | ||
33 | * @see [Documentation](https://gnunet.org/transport-service) | ||
34 | * | ||
35 | * @{ | ||
36 | */ | ||
37 | |||
38 | #ifndef GNUNET_TRANSPORT_MANIPULATION_SERVICE_H | ||
39 | #define GNUNET_TRANSPORT_MANIPULATION_SERVICE_H | ||
40 | |||
41 | |||
42 | #ifdef __cplusplus | ||
43 | extern "C" | ||
44 | { | ||
45 | #if 0 /* keep Emacsens' auto-indent happy */ | ||
46 | } | ||
47 | #endif | ||
48 | #endif | ||
49 | |||
50 | |||
51 | #include "gnunet_util_lib.h" | ||
52 | #include "gnunet_ats_service.h" | ||
53 | |||
54 | /** | ||
55 | * Version number of the transport API. | ||
56 | */ | ||
57 | #define GNUNET_TRANSPORT_MANIPULATION_VERSION 0x00000003 | ||
58 | |||
59 | /** | ||
60 | * Handle for transport manipulation. | ||
61 | */ | ||
62 | struct GNUNET_TRANSPORT_ManipulationHandle; | ||
63 | |||
64 | |||
65 | /** | ||
66 | * Connect to the transport service. Note that the connection may | ||
67 | * complete (or fail) asynchronously. | ||
68 | * | ||
69 | * @param cfg configuration to use | ||
70 | * @return NULL on error | ||
71 | */ | ||
72 | struct GNUNET_TRANSPORT_ManipulationHandle * | ||
73 | GNUNET_TRANSPORT_manipulation_connect (const struct | ||
74 | GNUNET_CONFIGURATION_Handle *cfg); | ||
75 | |||
76 | |||
77 | /** | ||
78 | * Disconnect from the transport service. | ||
79 | * | ||
80 | * @param handle handle returned from connect | ||
81 | */ | ||
82 | void | ||
83 | GNUNET_TRANSPORT_manipulation_disconnect (struct | ||
84 | GNUNET_TRANSPORT_ManipulationHandle * | ||
85 | handle); | ||
86 | |||
87 | |||
88 | /** | ||
89 | * Set transport metrics for a peer and a direction | ||
90 | * | ||
91 | * @param handle transport handle | ||
92 | * @param peer the peer to set the metric for | ||
93 | * @param prop the performance metrics to set | ||
94 | * @param delay_in inbound delay to introduce | ||
95 | * @param delay_out outbound delay to introduce | ||
96 | * | ||
97 | * Note: Delay restrictions in receiving direction will be enforced | ||
98 | * with one message delay. | ||
99 | */ | ||
100 | void | ||
101 | GNUNET_TRANSPORT_manipulation_set (struct | ||
102 | GNUNET_TRANSPORT_ManipulationHandle *handle, | ||
103 | const struct GNUNET_PeerIdentity *peer, | ||
104 | const struct GNUNET_ATS_Properties *prop, | ||
105 | struct GNUNET_TIME_Relative delay_in, | ||
106 | struct GNUNET_TIME_Relative delay_out); | ||
107 | |||
108 | |||
109 | #if 0 /* keep Emacsens' auto-indent happy */ | ||
110 | { | ||
111 | #endif | ||
112 | #ifdef __cplusplus | ||
113 | } | ||
114 | #endif | ||
115 | |||
116 | /* ifndef GNUNET_TRANSPORT_MANIPULATION_SERVICE_H */ | ||
117 | #endif | ||
118 | |||
119 | /** @} */ /* end of group */ | ||
120 | |||
121 | /** @} */ /* end of group addition */ | ||
122 | |||
123 | /* end of gnunet_transport_manipulation_service.h */ | ||
diff --git a/src/include/gnunet_transport_monitor_service.h b/src/include/gnunet_transport_monitor_service.h index 6b9eb8076..7c586b51e 100644 --- a/src/include/gnunet_transport_monitor_service.h +++ b/src/include/gnunet_transport_monitor_service.h | |||
@@ -47,7 +47,6 @@ extern "C" | |||
47 | 47 | ||
48 | 48 | ||
49 | #include "gnunet_util_lib.h" | 49 | #include "gnunet_util_lib.h" |
50 | #include "gnunet_ats_transport_service.h" | ||
51 | #include "gnunet_transport_communication_service.h" | 50 | #include "gnunet_transport_communication_service.h" |
52 | 51 | ||
53 | 52 | ||
diff --git a/src/topology/gnunet-daemon-topology.c b/src/topology/gnunet-daemon-topology.c index fa8640bf4..ca4df0911 100644 --- a/src/topology/gnunet-daemon-topology.c +++ b/src/topology/gnunet-daemon-topology.c | |||
@@ -46,7 +46,6 @@ | |||
46 | #include "gnunet_peerstore_service.h" | 46 | #include "gnunet_peerstore_service.h" |
47 | #include "gnunet_statistics_service.h" | 47 | #include "gnunet_statistics_service.h" |
48 | #include "gnunet_transport_application_service.h" | 48 | #include "gnunet_transport_application_service.h" |
49 | #include "gnunet_ats_service.h" | ||
50 | 49 | ||
51 | 50 | ||
52 | // TODO Remove all occurrencies of friends_only and minimum_friend_count. | 51 | // TODO Remove all occurrencies of friends_only and minimum_friend_count. |
diff --git a/src/transport/transport-testing-communicator.c b/src/transport/transport-testing-communicator.c index 196dbdc39..553426b66 100644 --- a/src/transport/transport-testing-communicator.c +++ b/src/transport/transport-testing-communicator.c | |||
@@ -29,7 +29,6 @@ | |||
29 | #include "gnunet_protocols.h" | 29 | #include "gnunet_protocols.h" |
30 | #include "gnunet_constants.h" | 30 | #include "gnunet_constants.h" |
31 | #include "transport-testing-communicator.h" | 31 | #include "transport-testing-communicator.h" |
32 | #include "gnunet_ats_transport_service.h" | ||
33 | #include "gnunet_hello_lib.h" | 32 | #include "gnunet_hello_lib.h" |
34 | #include "gnunet_signatures.h" | 33 | #include "gnunet_signatures.h" |
35 | #include "transport.h" | 34 | #include "transport.h" |
diff --git a/src/transport/transport-testing-communicator.h b/src/transport/transport-testing-communicator.h index 122ac3efa..7460aab8e 100644 --- a/src/transport/transport-testing-communicator.h +++ b/src/transport/transport-testing-communicator.h | |||
@@ -26,7 +26,7 @@ | |||
26 | */ | 26 | */ |
27 | #include "platform.h" | 27 | #include "platform.h" |
28 | #include "gnunet_util_lib.h" | 28 | #include "gnunet_util_lib.h" |
29 | #include "gnunet_ats_transport_service.h" | 29 | #include "gnunet_transport_communication_service.h" |
30 | #include "transport.h" | 30 | #include "transport.h" |
31 | 31 | ||
32 | /** | 32 | /** |
diff --git a/src/transport/transport-testing2.h b/src/transport/transport-testing2.h index bfd9f3d33..8f1071e8f 100644 --- a/src/transport/transport-testing2.h +++ b/src/transport/transport-testing2.h | |||
@@ -32,7 +32,6 @@ | |||
32 | #include "gnunet_peerstore_service.h" | 32 | #include "gnunet_peerstore_service.h" |
33 | #include "gnunet_transport_core_service.h" | 33 | #include "gnunet_transport_core_service.h" |
34 | #include "gnunet_transport_application_service.h" | 34 | #include "gnunet_transport_application_service.h" |
35 | #include "gnunet_transport_manipulation_service.h" | ||
36 | #include "gnunet_testing_lib.h" | 35 | #include "gnunet_testing_lib.h" |
37 | 36 | ||
38 | 37 | ||
diff --git a/src/transport/transport_api2_communication.c b/src/transport/transport_api2_communication.c index 35ef039da..0a7636843 100644 --- a/src/transport/transport_api2_communication.c +++ b/src/transport/transport_api2_communication.c | |||
@@ -27,7 +27,6 @@ | |||
27 | #include "gnunet_util_lib.h" | 27 | #include "gnunet_util_lib.h" |
28 | #include "gnunet_protocols.h" | 28 | #include "gnunet_protocols.h" |
29 | #include "gnunet_transport_communication_service.h" | 29 | #include "gnunet_transport_communication_service.h" |
30 | #include "gnunet_ats_transport_service.h" | ||
31 | #include "transport.h" | 30 | #include "transport.h" |
32 | 31 | ||
33 | 32 | ||