GNUnet  0.19.4
ats.h
Go to the documentation of this file.
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  */
26 #ifndef ATS_H
27 #define ATS_H
28 
29 #include "gnunet_util_lib.h"
30 #include "gnunet_ats_service.h"
31 
32 
38 {
43 
49 
55 
60 };
61 
62 
64 
70 {
75 
80 };
81 
82 
88 {
95 
100 
104  struct GNUNET_PeerIdentity peer;
105 };
106 
107 
112 {
117 
122 
127 
131  struct GNUNET_PeerIdentity peer;
132 
138 
144 
149 
150  /* followed by:
151  * - char address[address_length]
152  * - char plugin_name[plugin_name_length] (including '\0'-termination).
153  */
154 };
155 
156 
162 {
167 
172 
178  struct GNUNET_PeerIdentity peer;
179 
184 };
185 
186 
193 {
198 
203 
209  struct GNUNET_PeerIdentity peer;
210 };
211 
212 
218 {
223 
228 
234  struct GNUNET_PeerIdentity peer;
235 };
236 
237 
244 {
249 
255 
261  struct GNUNET_PeerIdentity peer;
262 
267 
272 };
273 
274 
279 {
284 
289 
294 
298  struct GNUNET_PeerIdentity peer;
299 
304 
308  uint32_t id GNUNET_PACKED;
309 
314 
319 
324 
330 
331  /* followed by:
332  * - char address[address_length]
333  * - char plugin_name[plugin_name_length] (including '\0'-termination).
334  */
335 };
336 
337 
342 {
347 
351  uint32_t id GNUNET_PACKED;
352 
356  struct GNUNET_PeerIdentity peer;
357 
363 };
364 
365 
370 {
375 
380 
384  struct GNUNET_PeerIdentity peer;
385 };
386 
387 
392 {
397 
402 
406  struct GNUNET_PeerIdentity peer;
407 
412 };
413 
414 
420 {
425 
431 };
432 
433 
438 {
443 
449 
453  struct GNUNET_PeerIdentity peer;
454 
455  /* followed by 'num_preferences'
456  * struct PreferenceInformation values */
457 };
458 
459 
464 {
469 
474 
479 
483  struct GNUNET_PeerIdentity peer;
484 
485  /* followed by 'num_feedback'
486  * struct PreferenceInformation values */
487 };
488 
490 
491 
492 #endif
StartFlag
Flag used to indicate which type of client is connecting to the ATS service.
Definition: ats.h:38
@ START_FLAG_PERFORMANCE_NO_PIC
Performance monitoring client that does NOT want to learn about changes in performance characteristic...
Definition: ats.h:54
@ START_FLAG_CONNECTION_SUGGESTION
Connection suggestion handle.
Definition: ats.h:59
@ START_FLAG_SCHEDULING
This is a scheduling client (aka transport service)
Definition: ats.h:42
@ START_FLAG_PERFORMANCE_WITH_PIC
Performance monitoring client that wants to learn about changes in performance characteristics.
Definition: ats.h:48
Automatic transport selection and outbound bandwidth determination.
#define GNUNET_NETWORK_STRUCT_BEGIN
Define as empty, GNUNET_PACKED should suffice, but this won't work on W32.
#define GNUNET_NETWORK_STRUCT_END
Define as empty, GNUNET_PACKED should suffice, but this won't work on W32;.
#define GNUNET_PACKED
gcc-ism to get packed structs.
Scheduling client to ATS service: here is another address you can use.
Definition: ats.h:112
struct GNUNET_MessageHeader header
Type is GNUNET_MESSAGE_TYPE_ATS_ADDRESS_ADD.
Definition: ats.h:116
uint32_t address_local_info
Local-only information of the address, see enum GNUNET_HELLO_AddressInfo.
Definition: ats.h:143
uint32_t session_id
Internal number this client will henceforth use to refer to this address.
Definition: ats.h:137
struct GNUNET_PeerIdentity peer
Identity of the peer that this address is for.
Definition: ats.h:131
struct GNUNET_ATS_PropertiesNBO properties
Performance properties of the address.
Definition: ats.h:148
uint16_t plugin_name_length
Number of bytes in the plugin name that follows this struct.
Definition: ats.h:126
uint16_t address_length
Number of bytes in the address that follows this struct.
Definition: ats.h:121
Message sent by ATS client to ATS service when an address was destroyed and must thus henceforth no l...
Definition: ats.h:193
struct GNUNET_PeerIdentity peer
Which peer is this about? (Technically redundant, as the session_id should be sufficient,...
Definition: ats.h:209
struct GNUNET_MessageHeader header
Type is GNUNET_MESSAGE_TYPE_ATS_ADDRESS_DESTROYED.
Definition: ats.h:197
uint32_t session_id
Internal number this client uses to refer to this address.
Definition: ats.h:202
Client to service: please give us an overview of the addresses.
Definition: ats.h:342
struct GNUNET_MessageHeader header
Type is GNUNET_MESSAGE_TYPE_ATS_ADDRESSLIST_REQUEST.
Definition: ats.h:346
struct GNUNET_PeerIdentity peer
Which peer do we care about? All zeros for all.
Definition: ats.h:356
int32_t all
GNUNET_YES to get information about all addresses, GNUNET_NO to only return addresses that are in use...
Definition: ats.h:362
ATS Service suggests to the transport service to use the address identified by the given session_id f...
Definition: ats.h:244
struct GNUNET_MessageHeader header
A message of type GNUNET_MESSAGE_TYPE_ATS_ADDRESS_SUGGESTION.
Definition: ats.h:248
uint32_t session_id
Internal number this client uses to refer to the address this suggestion is about.
Definition: ats.h:254
struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in
How much bandwidth we are allowed for receiving.
Definition: ats.h:271
struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out
How much bandwidth we are allowed for sending.
Definition: ats.h:266
struct GNUNET_PeerIdentity peer
Which peer is this about? (Technically redundant, as the session_id should be sufficient,...
Definition: ats.h:261
Message used to notify ATS that the performance characteristics for an address have changed.
Definition: ats.h:162
struct GNUNET_PeerIdentity peer
Which peer is this about? (Technically redundant, as the session_id should be sufficient,...
Definition: ats.h:178
struct GNUNET_MessageHeader header
Message of type GNUNET_MESSAGE_TYPE_ATS_ADDRESS_UPDATE.
Definition: ats.h:166
uint32_t session_id
Internal number this client uses to refer to this address.
Definition: ats.h:171
struct GNUNET_ATS_PropertiesNBO properties
Performance properties of the address.
Definition: ats.h:183
Client to ATS: I have a performance preference for a peer.
Definition: ats.h:438
uint32_t num_preferences
How many struct PreferenceInformation entries follow this struct?
Definition: ats.h:448
struct GNUNET_PeerIdentity peer
Which peer is the preference being expressed for?
Definition: ats.h:453
struct GNUNET_MessageHeader header
Type is GNUNET_MESSAGE_TYPE_ATS_PREFERENCE_CHANGE.
Definition: ats.h:442
First message any client sends to ATS, used to self-identify (what type of client this is).
Definition: ats.h:70
struct GNUNET_MessageHeader header
Type is GNUNET_MESSAGE_TYPE_ATS_START.
Definition: ats.h:74
uint32_t start_flag
NBO value of an enum StartFlag.
Definition: ats.h:79
Message containing application feedback for a peer.
Definition: ats.h:464
struct GNUNET_PeerIdentity peer
Peer this feedback is for.
Definition: ats.h:483
struct GNUNET_MessageHeader header
Type is GNUNET_MESSAGE_TYPE_ATS_PREFERENCE_FEEDBACK.
Definition: ats.h:468
uint32_t num_feedback
Number of feedback values included.
Definition: ats.h:473
struct GNUNET_TIME_RelativeNBO scope
Relative time describing for which time interval this feedback is.
Definition: ats.h:478
ATS performance characteristics for an address in network byte order (for IPC).
Message sent by ATS service to client to confirm that it is done using the given session ID.
Definition: ats.h:218
struct GNUNET_PeerIdentity peer
Which peer is this about? (Technically redundant, as the session_id should be sufficient,...
Definition: ats.h:234
struct GNUNET_MessageHeader header
Type is GNUNET_MESSAGE_TYPE_ATS_SESSION_RELEASE.
Definition: ats.h:222
uint32_t session_id
Number the client used to identify the session.
Definition: ats.h:227
32-bit bandwidth used for network exchange by GNUnet, in bytes per second.
Header for all communications.
The identity of the host (wraps the signing key of the peer).
Time for relative time used by GNUnet, in microseconds and in network byte order.
struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in
Definition: ats.h:318
struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out
Definition: ats.h:313
uint32_t address_active
Definition: ats.h:303
struct GNUNET_MessageHeader header
Type is GNUNET_MESSAGE_TYPE_ATS_PEER_INFORMATION.
Definition: ats.h:283
struct GNUNET_ATS_PropertiesNBO properties
Performance properties of the address.
Definition: ats.h:323
uint32_t address_local_info
Local-only information of the address, see enum GNUNET_HELLO_AddressInfo.
Definition: ats.h:329
uint16_t plugin_name_length
Definition: ats.h:293
struct GNUNET_PeerIdentity peer
Definition: ats.h:298
uint16_t address_length
Definition: ats.h:288
Variable-size entry in a struct ChangePreferenceMessage or struct FeedbackPreferenceMessage.
Definition: ats.h:420
uint32_t preference_kind
An enum GNUNET_ATS_PreferenceKind in NBO.
Definition: ats.h:424
float preference_value
Degree of preference (or appreciation) for this preference_kind being expressed.
Definition: ats.h:430
Connectivity client to ATS service: we would like to have address suggestions for this peer.
Definition: ats.h:88
struct GNUNET_PeerIdentity peer
Peer to get address suggestions for.
Definition: ats.h:104
uint32_t strength
How "strong" is our need for an address for this peer?
Definition: ats.h:99
struct GNUNET_MessageHeader header
Type is GNUNET_MESSAGE_TYPE_ATS_REQUEST_ADDRESS or GNUNET_MESSAGE_TYPE_ATS_REQUEST_ADDRESS_CANCEL to ...
Definition: ats.h:94
struct GNUNET_MessageHeader header
Type is GNUNET_MESSAGE_TYPE_ATS_RESERVATION_REQUEST.
Definition: ats.h:374
struct GNUNET_PeerIdentity peer
Definition: ats.h:384
struct GNUNET_TIME_RelativeNBO res_delay
Definition: ats.h:411
struct GNUNET_MessageHeader header
Type is GNUNET_MESSAGE_TYPE_ATS_RESERVATION_RESULT.
Definition: ats.h:396
struct GNUNET_PeerIdentity peer
Definition: ats.h:406