GNUnet  0.11.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 {
43 
49 
55 
60 };
61 
62 
64 
70 {
75 
80 };
81 
82 
88 {
95 
99  uint32_t strength GNUNET_PACKED;
100 
105 };
106 
107 
112 {
117 
121  uint16_t address_length GNUNET_PACKED;
122 
126  uint16_t plugin_name_length GNUNET_PACKED;
127 
131  struct GNUNET_PeerIdentity peer;
132 
138 
143  uint32_t address_local_info GNUNET_PACKED;
144 
148  struct GNUNET_ATS_PropertiesNBO properties;
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 
183  struct GNUNET_ATS_PropertiesNBO properties;
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 
266  struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out;
267 
271  struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in;
272 };
273 
274 
279 {
284 
288  uint16_t address_length GNUNET_PACKED;
289 
293  uint16_t plugin_name_length GNUNET_PACKED;
294 
298  struct GNUNET_PeerIdentity peer;
299 
303  uint32_t address_active GNUNET_PACKED;
304 
308  uint32_t id GNUNET_PACKED;
309 
313  struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out;
314 
318  struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in;
319 
323  struct GNUNET_ATS_PropertiesNBO properties;
324 
329  uint32_t address_local_info GNUNET_PACKED;
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 
362  int32_t all GNUNET_PACKED;
363 };
364 
365 
370 {
375 
379  int32_t amount GNUNET_PACKED;
380 
384  struct GNUNET_PeerIdentity peer;
385 };
386 
387 
392 {
397 
401  int32_t amount GNUNET_PACKED;
402 
406  struct GNUNET_PeerIdentity peer;
407 
411  struct GNUNET_TIME_RelativeNBO res_delay;
412 };
413 
414 
420 {
424  uint32_t preference_kind GNUNET_PACKED;
425 
430  float preference_value GNUNET_PACKED;
431 };
432 
433 
438 {
443 
448  uint32_t num_preferences GNUNET_PACKED;
449 
453  struct GNUNET_PeerIdentity peer;
454 
455  /* followed by 'num_preferences'
456  * struct PreferenceInformation values */
457 };
458 
459 
464 {
469 
473  uint32_t num_feedback GNUNET_PACKED;
474 
479 
483  struct GNUNET_PeerIdentity peer;
484 
485  /* followed by 'num_feedback'
486  * struct PreferenceInformation values */
487 };
488 
490 
491 
492 #endif
Connectivity client to ATS service: we would like to have address suggestions for this peer...
Definition: ats.h:87
uint32_t start_flag
NBO value of an enum StartFlag.
Definition: ats.h:79
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:54
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:161
This is a scheduling client (aka transport service)
Definition: ats.h:42
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:74
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:341
Connection suggestion handle.
Definition: ats.h:59
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:243
#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:463
#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:419
Client to ATS: I have a performance preference for a peer.
Definition: ats.h:437
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:192
Message sent by ATS service to client to confirm that it is done using the given session ID...
Definition: ats.h:217
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:69
Performance monitoring client that wants to learn about changes in performance characteristics.
Definition: ats.h:48
Scheduling client to ATS service: here is another address you can use.
Definition: ats.h:111