aboutsummaryrefslogtreecommitdiff
path: root/src/ats/ats.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/ats/ats.h')
-rw-r--r--src/ats/ats.h58
1 files changed, 17 insertions, 41 deletions
diff --git a/src/ats/ats.h b/src/ats/ats.h
index 7c9559495..3501860f3 100644
--- a/src/ats/ats.h
+++ b/src/ats/ats.h
@@ -11,12 +11,12 @@
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 */
20/** 20/**
21 * @file ats/ats.h 21 * @file ats/ats.h
22 * @brief automatic transport selection messages 22 * @brief automatic transport selection messages
@@ -34,9 +34,7 @@
34 * Flag used to indicate which type of client is connecting 34 * Flag used to indicate which type of client is connecting
35 * to the ATS service. 35 * to the ATS service.
36 */ 36 */
37enum StartFlag 37enum StartFlag {
38{
39
40 /** 38 /**
41 * This is a scheduling client (aka transport service) 39 * This is a scheduling client (aka transport service)
42 */ 40 */
@@ -67,8 +65,7 @@ GNUNET_NETWORK_STRUCT_BEGIN
67 * First message any client sends to ATS, used to self-identify 65 * First message any client sends to ATS, used to self-identify
68 * (what type of client this is). 66 * (what type of client this is).
69 */ 67 */
70struct ClientStartMessage 68struct ClientStartMessage {
71{
72 /** 69 /**
73 * Type is #GNUNET_MESSAGE_TYPE_ATS_START. 70 * Type is #GNUNET_MESSAGE_TYPE_ATS_START.
74 */ 71 */
@@ -85,8 +82,7 @@ struct ClientStartMessage
85 * Connectivity client to ATS service: we would like to have 82 * Connectivity client to ATS service: we would like to have
86 * address suggestions for this peer. 83 * address suggestions for this peer.
87 */ 84 */
88struct RequestAddressMessage 85struct RequestAddressMessage {
89{
90 /** 86 /**
91 * Type is #GNUNET_MESSAGE_TYPE_ATS_REQUEST_ADDRESS or 87 * Type is #GNUNET_MESSAGE_TYPE_ATS_REQUEST_ADDRESS or
92 * #GNUNET_MESSAGE_TYPE_ATS_REQUEST_ADDRESS_CANCEL to stop 88 * #GNUNET_MESSAGE_TYPE_ATS_REQUEST_ADDRESS_CANCEL to stop
@@ -109,8 +105,7 @@ struct RequestAddressMessage
109/** 105/**
110 * Scheduling client to ATS service: here is another address you can use. 106 * Scheduling client to ATS service: here is another address you can use.
111 */ 107 */
112struct AddressAddMessage 108struct AddressAddMessage {
113{
114 /** 109 /**
115 * Type is #GNUNET_MESSAGE_TYPE_ATS_ADDRESS_ADD. 110 * Type is #GNUNET_MESSAGE_TYPE_ATS_ADDRESS_ADD.
116 */ 111 */
@@ -152,7 +147,6 @@ struct AddressAddMessage
152 * - char address[address_length] 147 * - char address[address_length]
153 * - char plugin_name[plugin_name_length] (including '\0'-termination). 148 * - char plugin_name[plugin_name_length] (including '\0'-termination).
154 */ 149 */
155
156}; 150};
157 151
158 152
@@ -160,8 +154,7 @@ struct AddressAddMessage
160 * Message used to notify ATS that the performance 154 * Message used to notify ATS that the performance
161 * characteristics for an address have changed. 155 * characteristics for an address have changed.
162 */ 156 */
163struct AddressUpdateMessage 157struct AddressUpdateMessage {
164{
165 /** 158 /**
166 * Message of type #GNUNET_MESSAGE_TYPE_ATS_ADDRESS_UPDATE. 159 * Message of type #GNUNET_MESSAGE_TYPE_ATS_ADDRESS_UPDATE.
167 */ 160 */
@@ -183,7 +176,6 @@ struct AddressUpdateMessage
183 * Performance properties of the address. 176 * Performance properties of the address.
184 */ 177 */
185 struct GNUNET_ATS_PropertiesNBO properties; 178 struct GNUNET_ATS_PropertiesNBO properties;
186
187}; 179};
188 180
189 181
@@ -192,8 +184,7 @@ struct AddressUpdateMessage
192 * was destroyed and must thus henceforth no longer be considered 184 * was destroyed and must thus henceforth no longer be considered
193 * for scheduling. 185 * for scheduling.
194 */ 186 */
195struct AddressDestroyedMessage 187struct AddressDestroyedMessage {
196{
197 /** 188 /**
198 * Type is #GNUNET_MESSAGE_TYPE_ATS_ADDRESS_DESTROYED. 189 * Type is #GNUNET_MESSAGE_TYPE_ATS_ADDRESS_DESTROYED.
199 */ 190 */
@@ -210,7 +201,6 @@ struct AddressDestroyedMessage
210 * to find the session faster). 201 * to find the session faster).
211 */ 202 */
212 struct GNUNET_PeerIdentity peer; 203 struct GNUNET_PeerIdentity peer;
213
214}; 204};
215 205
216 206
@@ -218,8 +208,7 @@ struct AddressDestroyedMessage
218 * Message sent by ATS service to client to confirm that it is done 208 * Message sent by ATS service to client to confirm that it is done
219 * using the given session ID. 209 * using the given session ID.
220 */ 210 */
221struct GNUNET_ATS_SessionReleaseMessage 211struct GNUNET_ATS_SessionReleaseMessage {
222{
223 /** 212 /**
224 * Type is #GNUNET_MESSAGE_TYPE_ATS_SESSION_RELEASE. 213 * Type is #GNUNET_MESSAGE_TYPE_ATS_SESSION_RELEASE.
225 */ 214 */
@@ -245,8 +234,7 @@ struct GNUNET_ATS_SessionReleaseMessage
245 * identified by the given @e session_id for the given @e peer with 234 * identified by the given @e session_id for the given @e peer with
246 * the given @e bandwidth_in and @e bandwidth_out limits from now on. 235 * the given @e bandwidth_in and @e bandwidth_out limits from now on.
247 */ 236 */
248struct AddressSuggestionMessage 237struct AddressSuggestionMessage {
249{
250 /** 238 /**
251 * A message of type #GNUNET_MESSAGE_TYPE_ATS_ADDRESS_SUGGESTION. 239 * A message of type #GNUNET_MESSAGE_TYPE_ATS_ADDRESS_SUGGESTION.
252 */ 240 */
@@ -274,15 +262,13 @@ struct AddressSuggestionMessage
274 * How much bandwidth we are allowed for receiving. 262 * How much bandwidth we are allowed for receiving.
275 */ 263 */
276 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in; 264 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in;
277
278}; 265};
279 266
280 267
281/** 268/**
282 * 269 *
283 */ 270 */
284struct PeerInformationMessage 271struct PeerInformationMessage {
285{
286 /** 272 /**
287 * Type is #GNUNET_MESSAGE_TYPE_ATS_PEER_INFORMATION 273 * Type is #GNUNET_MESSAGE_TYPE_ATS_PEER_INFORMATION
288 */ 274 */
@@ -338,15 +324,13 @@ struct PeerInformationMessage
338 * - char address[address_length] 324 * - char address[address_length]
339 * - char plugin_name[plugin_name_length] (including '\0'-termination). 325 * - char plugin_name[plugin_name_length] (including '\0'-termination).
340 */ 326 */
341
342}; 327};
343 328
344 329
345/** 330/**
346 * Client to service: please give us an overview of the addresses. 331 * Client to service: please give us an overview of the addresses.
347 */ 332 */
348struct AddressListRequestMessage 333struct AddressListRequestMessage {
349{
350 /** 334 /**
351 * Type is #GNUNET_MESSAGE_TYPE_ATS_ADDRESSLIST_REQUEST 335 * Type is #GNUNET_MESSAGE_TYPE_ATS_ADDRESSLIST_REQUEST
352 */ 336 */
@@ -367,15 +351,13 @@ struct AddressListRequestMessage
367 * #GNUNET_NO to only return addresses that are in use. 351 * #GNUNET_NO to only return addresses that are in use.
368 */ 352 */
369 int32_t all GNUNET_PACKED; 353 int32_t all GNUNET_PACKED;
370
371}; 354};
372 355
373 356
374/** 357/**
375 * 358 *
376 */ 359 */
377struct ReservationRequestMessage 360struct ReservationRequestMessage {
378{
379 /** 361 /**
380 * Type is #GNUNET_MESSAGE_TYPE_ATS_RESERVATION_REQUEST 362 * Type is #GNUNET_MESSAGE_TYPE_ATS_RESERVATION_REQUEST
381 */ 363 */
@@ -396,8 +378,7 @@ struct ReservationRequestMessage
396/** 378/**
397 * 379 *
398 */ 380 */
399struct ReservationResultMessage 381struct ReservationResultMessage {
400{
401 /** 382 /**
402 * Type is #GNUNET_MESSAGE_TYPE_ATS_RESERVATION_RESULT 383 * Type is #GNUNET_MESSAGE_TYPE_ATS_RESERVATION_RESULT
403 */ 384 */
@@ -424,9 +405,7 @@ struct ReservationResultMessage
424 * Variable-size entry in a `struct ChangePreferenceMessage` or 405 * Variable-size entry in a `struct ChangePreferenceMessage` or
425 * `struct FeedbackPreferenceMessage`. 406 * `struct FeedbackPreferenceMessage`.
426 */ 407 */
427struct PreferenceInformation 408struct PreferenceInformation {
428{
429
430 /** 409 /**
431 * An `enum GNUNET_ATS_PreferenceKind` in NBO. 410 * An `enum GNUNET_ATS_PreferenceKind` in NBO.
432 */ 411 */
@@ -437,15 +416,13 @@ struct PreferenceInformation
437 * preference_kind being expressed. 416 * preference_kind being expressed.
438 */ 417 */
439 float preference_value GNUNET_PACKED; 418 float preference_value GNUNET_PACKED;
440
441}; 419};
442 420
443 421
444/** 422/**
445 * Client to ATS: I have a performance preference for a peer. 423 * Client to ATS: I have a performance preference for a peer.
446 */ 424 */
447struct ChangePreferenceMessage 425struct ChangePreferenceMessage {
448{
449 /** 426 /**
450 * Type is #GNUNET_MESSAGE_TYPE_ATS_PREFERENCE_CHANGE. 427 * Type is #GNUNET_MESSAGE_TYPE_ATS_PREFERENCE_CHANGE.
451 */ 428 */
@@ -470,8 +447,7 @@ struct ChangePreferenceMessage
470/** 447/**
471 * Message containing application feedback for a peer 448 * Message containing application feedback for a peer
472 */ 449 */
473struct FeedbackPreferenceMessage 450struct FeedbackPreferenceMessage {
474{
475 /** 451 /**
476 * Type is #GNUNET_MESSAGE_TYPE_ATS_PREFERENCE_FEEDBACK. 452 * Type is #GNUNET_MESSAGE_TYPE_ATS_PREFERENCE_FEEDBACK.
477 */ 453 */