GNUnet  0.10.x
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 {
39 
44 
50 
56 
61 };
62 
63 
65 
71 {
76 
81 };
82 
83 
89 {
96 
100  uint32_t strength GNUNET_PACKED;
101 
106 };
107 
108 
113 {
118 
122  uint16_t address_length GNUNET_PACKED;
123 
127  uint16_t plugin_name_length GNUNET_PACKED;
128 
132  struct GNUNET_PeerIdentity peer;
133 
139 
144  uint32_t address_local_info GNUNET_PACKED;
145 
149  struct GNUNET_ATS_PropertiesNBO properties;
150 
151  /* followed by:
152  * - char address[address_length]
153  * - char plugin_name[plugin_name_length] (including '\0'-termination).
154  */
155 
156 };
157 
158 
164 {
169 
174 
180  struct GNUNET_PeerIdentity peer;
181 
185  struct GNUNET_ATS_PropertiesNBO properties;
186 
187 };
188 
189 
196 {
201 
206 
212  struct GNUNET_PeerIdentity peer;
213 
214 };
215 
216 
222 {
227 
232 
238  struct GNUNET_PeerIdentity peer;
239 };
240 
241 
242 
249 {
254 
260 
266  struct GNUNET_PeerIdentity peer;
267 
271  struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out;
272 
276  struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in;
277 
278 };
279 
280 
285 {
290 
294  uint16_t address_length GNUNET_PACKED;
295 
299  uint16_t plugin_name_length GNUNET_PACKED;
300 
304  struct GNUNET_PeerIdentity peer;
305 
309  uint32_t address_active GNUNET_PACKED;
310 
314  uint32_t id GNUNET_PACKED;
315 
319  struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out;
320 
324  struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in;
325 
329  struct GNUNET_ATS_PropertiesNBO properties;
330 
335  uint32_t address_local_info GNUNET_PACKED;
336 
337  /* followed by:
338  * - char address[address_length]
339  * - char plugin_name[plugin_name_length] (including '\0'-termination).
340  */
341 
342 };
343 
344 
349 {
354 
358  uint32_t id GNUNET_PACKED;
359 
363  struct GNUNET_PeerIdentity peer;
364 
369  int32_t all GNUNET_PACKED;
370 
371 };
372 
373 
378 {
383 
387  int32_t amount GNUNET_PACKED;
388 
392  struct GNUNET_PeerIdentity peer;
393 };
394 
395 
400 {
405 
409  int32_t amount GNUNET_PACKED;
410 
414  struct GNUNET_PeerIdentity peer;
415 
419  struct GNUNET_TIME_RelativeNBO res_delay;
420 };
421 
422 
428 {
429 
433  uint32_t preference_kind GNUNET_PACKED;
434 
439  float preference_value GNUNET_PACKED;
440 
441 };
442 
443 
448 {
453 
458  uint32_t num_preferences GNUNET_PACKED;
459 
463  struct GNUNET_PeerIdentity peer;
464 
465  /* followed by 'num_preferences'
466  * struct PreferenceInformation values */
467 };
468 
469 
474 {
479 
483  uint32_t num_feedback GNUNET_PACKED;
484 
489 
493  struct GNUNET_PeerIdentity peer;
494 
495  /* followed by 'num_feedback'
496  * struct PreferenceInformation values */
497 };
498 
500 
501 
502 
503 #endif
Connectivity client to ATS service: we would like to have address suggestions for this peer...
Definition: ats.h:88
uint32_t start_flag
NBO value of an enum StartFlag.
Definition: ats.h:80
StartFlag
Flag used to indicate which type of client is connecting to the ATS service.
Definition: ats.h:37
static struct GNUNET_HashCode session_id
Performance monitoring client that does NOT want to learn about changes in performance characteristic...
Definition: ats.h:55
Time for relative time used by GNUnet, in microseconds and in network byte order. ...
#define GNUNET_NETWORK_STRUCT_BEGIN
Define as empty, GNUNET_PACKED should suffice, but this won&#39;t work on W32.
Message used to notify ATS that the performance characteristics for an address have changed...
Definition: ats.h:163
This is a scheduling client (aka transport service)
Definition: ats.h:43
static enum GNUNET_NetworkType scope
Which network scope do we belong to?
struct GNUNET_MessageHeader header
Type is GNUNET_MESSAGE_TYPE_ATS_START.
Definition: ats.h:75
struct GNUNET_TESTBED_Peer * peer
The peer associated with this model.
Client to service: please give us an overview of the addresses.
Definition: ats.h:348
Connection suggestion handle.
Definition: ats.h:60
32-bit bandwidth used for network exchange by GNUnet, in bytes per second.
ATS Service suggests to the transport service to use the address identified by the given session_id f...
Definition: ats.h:248
#define GNUNET_NETWORK_STRUCT_END
Define as empty, GNUNET_PACKED should suffice, but this won&#39;t work on W32;.
The identity of the host (wraps the signing key of the peer).
Message containing application feedback for a peer.
Definition: ats.h:473
#define GNUNET_PACKED
gcc-ism to get packed structs.
Automatic transport selection and outbound bandwidth determination.
Variable-size entry in a struct ChangePreferenceMessage or struct FeedbackPreferenceMessage.
Definition: ats.h:427
Client to ATS: I have a performance preference for a peer.
Definition: ats.h:447
Header for all communications.
Message sent by ATS client to ATS service when an address was destroyed and must thus henceforth no l...
Definition: ats.h:195
Message sent by ATS service to client to confirm that it is done using the given session ID...
Definition: ats.h:221
ATS performance characteristics for an address in network byte order (for IPC).
First message any client sends to ATS, used to self-identify (what type of client this is)...
Definition: ats.h:70
Performance monitoring client that wants to learn about changes in performance characteristics.
Definition: ats.h:49
Scheduling client to ATS service: here is another address you can use.
Definition: ats.h:112