diff options
author | Christian Grothoff <christian@grothoff.org> | 2019-10-06 21:03:33 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2019-10-06 21:03:33 +0200 |
commit | 622fd12c7101c53c1fa0f9563a831f3196732dc5 (patch) | |
tree | d86047807232d9921341b8ed84558dea2b9df929 /src/ats/ats2.h | |
parent | 6c38429f96ff9128ebd983a85aa6a2024112ed25 (diff) | |
download | gnunet-622fd12c7101c53c1fa0f9563a831f3196732dc5.tar.gz gnunet-622fd12c7101c53c1fa0f9563a831f3196732dc5.zip |
remove dead, obsolete or never-to-become ATS logic (DCE)
Diffstat (limited to 'src/ats/ats2.h')
-rw-r--r-- | src/ats/ats2.h | 294 |
1 files changed, 0 insertions, 294 deletions
diff --git a/src/ats/ats2.h b/src/ats/ats2.h deleted file mode 100644 index df402dba2..000000000 --- a/src/ats/ats2.h +++ /dev/null | |||
@@ -1,294 +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 | * @file ats/ats2.h | ||
22 | * @brief automatic transport selection messages | ||
23 | * @author Christian Grothoff | ||
24 | * @author Matthias Wachs | ||
25 | */ | ||
26 | #ifndef ATS2_H | ||
27 | #define ATS2_H | ||
28 | |||
29 | #include "gnunet_util_lib.h" | ||
30 | #include "gnunet_ats_transport_service.h" | ||
31 | |||
32 | |||
33 | GNUNET_NETWORK_STRUCT_BEGIN | ||
34 | |||
35 | |||
36 | /** | ||
37 | * ATS performance characteristics for an address. | ||
38 | */ | ||
39 | struct PropertiesNBO | ||
40 | { | ||
41 | /** | ||
42 | * Delay. Time between when the time packet is sent and the packet | ||
43 | * arrives. FOREVER if we did not (successfully) measure yet. | ||
44 | */ | ||
45 | struct GNUNET_TIME_RelativeNBO delay; | ||
46 | |||
47 | /** | ||
48 | * Confirmed successful payload on this connection from this peer to | ||
49 | * the other peer. In NBO. | ||
50 | * | ||
51 | * Unit: [bytes/second] | ||
52 | */ | ||
53 | uint32_t goodput_out; | ||
54 | |||
55 | /** | ||
56 | * Confirmed useful payload on this connection to this peer from | ||
57 | * the other peer. In NBO. | ||
58 | * | ||
59 | * Unit: [bytes/second] | ||
60 | */ | ||
61 | uint32_t goodput_in; | ||
62 | |||
63 | /** | ||
64 | * Actual traffic on this connection from this peer to the other peer. | ||
65 | * Includes transport overhead. In NBO. | ||
66 | * | ||
67 | * Unit: [bytes/second] | ||
68 | */ | ||
69 | uint32_t utilization_out; | ||
70 | |||
71 | /** | ||
72 | * Actual traffic on this connection from the other peer to this peer. | ||
73 | * Includes transport overhead. In NBO. | ||
74 | * | ||
75 | * Unit: [bytes/second] | ||
76 | */ | ||
77 | uint32_t utilization_in; | ||
78 | |||
79 | /** | ||
80 | * Distance on network layer (required for distance-vector routing) | ||
81 | * in hops. Zero for direct connections (i.e. plain TCP/UDP). In NBO. | ||
82 | */ | ||
83 | uint32_t distance; | ||
84 | |||
85 | /** | ||
86 | * MTU of the network layer, UINT32_MAX for no MTU (stream). | ||
87 | * | ||
88 | * Unit: [bytes]. In NBO. | ||
89 | */ | ||
90 | uint32_t mtu; | ||
91 | |||
92 | /** | ||
93 | * Which network scope does the respective address belong to? | ||
94 | * A `enum GNUNET_NetworkType nt` in NBO. | ||
95 | */ | ||
96 | uint32_t nt; | ||
97 | |||
98 | /** | ||
99 | * What characteristics does this communicator have? | ||
100 | * A `enum GNUNET_TRANSPORT_CommunicatorCharacteristics` in NBO. | ||
101 | */ | ||
102 | uint32_t cc; | ||
103 | }; | ||
104 | |||
105 | |||
106 | /** | ||
107 | * Application client to ATS service: we would like to have | ||
108 | * address suggestions for this peer. | ||
109 | */ | ||
110 | struct ExpressPreferenceMessage | ||
111 | { | ||
112 | /** | ||
113 | * Type is #GNUNET_MESSAGE_TYPE_ATS_SUGGEST or | ||
114 | * #GNUNET_MESSAGE_TYPE_ATS_SUGGEST_CANCEL to stop | ||
115 | * suggestions. | ||
116 | */ | ||
117 | struct GNUNET_MessageHeader header; | ||
118 | |||
119 | /** | ||
120 | * What type of performance preference does the client have? | ||
121 | * A `enum GNUNET_MQ_PreferenceKind` in NBO. | ||
122 | */ | ||
123 | uint32_t pk GNUNET_PACKED; | ||
124 | |||
125 | /** | ||
126 | * Peer to get address suggestions for. | ||
127 | */ | ||
128 | struct GNUNET_PeerIdentity peer; | ||
129 | |||
130 | /** | ||
131 | * How much bandwidth in bytes/second does the application expect? | ||
132 | */ | ||
133 | struct GNUNET_BANDWIDTH_Value32NBO bw; | ||
134 | }; | ||
135 | |||
136 | |||
137 | /** | ||
138 | * Transport client to ATS service: here is another session you can use. | ||
139 | */ | ||
140 | struct SessionAddMessage | ||
141 | { | ||
142 | /** | ||
143 | * Type is #GNUNET_MESSAGE_TYPE_ATS_SESSION_ADD or | ||
144 | * #GNUNET_MESSAGE_TYPE_ATS_SESSION_ADD_INBOUND_ONLY | ||
145 | */ | ||
146 | struct GNUNET_MessageHeader header; | ||
147 | |||
148 | /** | ||
149 | * Internal number this client will henceforth use to | ||
150 | * refer to this session. | ||
151 | */ | ||
152 | uint32_t session_id GNUNET_PACKED; | ||
153 | |||
154 | /** | ||
155 | * Identity of the peer that this session is for. | ||
156 | */ | ||
157 | struct GNUNET_PeerIdentity peer; | ||
158 | |||
159 | /** | ||
160 | * Performance properties of the session. | ||
161 | */ | ||
162 | struct PropertiesNBO properties; | ||
163 | |||
164 | /* followed by: | ||
165 | * - char * address (including '\0'-termination). | ||
166 | */ | ||
167 | }; | ||
168 | |||
169 | |||
170 | /** | ||
171 | * Message used to notify ATS that the performance | ||
172 | * characteristics for an session have changed. | ||
173 | */ | ||
174 | struct SessionUpdateMessage | ||
175 | { | ||
176 | /** | ||
177 | * Message of type #GNUNET_MESSAGE_TYPE_ATS_SESSION_UPDATE. | ||
178 | */ | ||
179 | struct GNUNET_MessageHeader header; | ||
180 | |||
181 | /** | ||
182 | * Internal number this client uses to refer to this session. | ||
183 | */ | ||
184 | uint32_t session_id GNUNET_PACKED; | ||
185 | |||
186 | /** | ||
187 | * Which peer is this about? (Technically redundant, as the | ||
188 | * @e session_id should be sufficient, but enables ATS service | ||
189 | * to find the session faster). | ||
190 | */ | ||
191 | struct GNUNET_PeerIdentity peer; | ||
192 | |||
193 | /** | ||
194 | * Performance properties of the session. | ||
195 | */ | ||
196 | struct PropertiesNBO properties; | ||
197 | }; | ||
198 | |||
199 | |||
200 | /** | ||
201 | * Message sent by ATS client to ATS service when an session | ||
202 | * was destroyed and must thus henceforth no longer be considered | ||
203 | * for scheduling. | ||
204 | */ | ||
205 | struct SessionDelMessage | ||
206 | { | ||
207 | /** | ||
208 | * Type is #GNUNET_MESSAGE_TYPE_ATS_SESSION_DEL. | ||
209 | */ | ||
210 | struct GNUNET_MessageHeader header; | ||
211 | |||
212 | /** | ||
213 | * Internal number this client uses to refer to this session. | ||
214 | */ | ||
215 | uint32_t session_id GNUNET_PACKED; | ||
216 | |||
217 | /** | ||
218 | * Which peer is this about? (Technically redundant, as the | ||
219 | * @e session_id should be sufficient, but enables ATS service | ||
220 | * to find the session faster). | ||
221 | */ | ||
222 | struct GNUNET_PeerIdentity peer; | ||
223 | }; | ||
224 | |||
225 | |||
226 | /** | ||
227 | * ATS Service allocates resources to an session | ||
228 | * identified by the given @e session_id for the given @e peer with | ||
229 | * the given @e bandwidth_in and @e bandwidth_out limits from now on. | ||
230 | */ | ||
231 | struct SessionAllocationMessage | ||
232 | { | ||
233 | /** | ||
234 | * A message of type #GNUNET_MESSAGE_TYPE_ATS_SESSION_ALLOCATION. | ||
235 | */ | ||
236 | struct GNUNET_MessageHeader header; | ||
237 | |||
238 | /** | ||
239 | * Internal number this client uses to refer to the session this | ||
240 | * suggestion is about. | ||
241 | */ | ||
242 | uint32_t session_id GNUNET_PACKED; | ||
243 | |||
244 | /** | ||
245 | * Which peer is this about? (Technically redundant, as the | ||
246 | * @e session_id should be sufficient, but may enable client | ||
247 | * to find the session faster and/or check consistency). | ||
248 | */ | ||
249 | struct GNUNET_PeerIdentity peer; | ||
250 | |||
251 | /** | ||
252 | * How much bandwidth we are allowed for sending. | ||
253 | */ | ||
254 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out; | ||
255 | |||
256 | /** | ||
257 | * How much bandwidth we are allowed for receiving. | ||
258 | */ | ||
259 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in; | ||
260 | }; | ||
261 | |||
262 | |||
263 | /** | ||
264 | * ATS Service suggests to the transport service to try the address | ||
265 | * for the given @e peer. | ||
266 | */ | ||
267 | struct AddressSuggestionMessage | ||
268 | { | ||
269 | /** | ||
270 | * A message of type #GNUNET_MESSAGE_TYPE_ATS_ADDRESS_SUGGESTION. | ||
271 | */ | ||
272 | struct GNUNET_MessageHeader header; | ||
273 | |||
274 | /** | ||
275 | * Zero. | ||
276 | */ | ||
277 | uint32_t reserved GNUNET_PACKED; | ||
278 | |||
279 | /** | ||
280 | * Which peer is this about? (Technically redundant, as the | ||
281 | * @e session_id should be sufficient, but may enable client | ||
282 | * to find the session faster and/or check consistency). | ||
283 | */ | ||
284 | struct GNUNET_PeerIdentity peer; | ||
285 | |||
286 | /* Followed by 0-terminated address */ | ||
287 | }; | ||
288 | |||
289 | |||
290 | GNUNET_NETWORK_STRUCT_END | ||
291 | |||
292 | |||
293 | |||
294 | #endif | ||