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 
37 enum StartFlag {
42 
48 
54 
59 };
60 
61 
63 
73 
78 };
79 
80 
92 
96  uint32_t strength GNUNET_PACKED;
97 
102 };
103 
104 
113 
117  uint16_t address_length GNUNET_PACKED;
118 
122  uint16_t plugin_name_length GNUNET_PACKED;
123 
127  struct GNUNET_PeerIdentity peer;
128 
134 
139  uint32_t address_local_info GNUNET_PACKED;
140 
144  struct GNUNET_ATS_PropertiesNBO properties;
145 
146  /* followed by:
147  * - char address[address_length]
148  * - char plugin_name[plugin_name_length] (including '\0'-termination).
149  */
150 };
151 
152 
162 
167 
173  struct GNUNET_PeerIdentity peer;
174 
178  struct GNUNET_ATS_PropertiesNBO properties;
179 };
180 
181 
192 
197 
203  struct GNUNET_PeerIdentity peer;
204 };
205 
206 
216 
221 
227  struct GNUNET_PeerIdentity peer;
228 };
229 
230 
231 
242 
248 
254  struct GNUNET_PeerIdentity peer;
255 
259  struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out;
260 
264  struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in;
265 };
266 
267 
276 
280  uint16_t address_length GNUNET_PACKED;
281 
285  uint16_t plugin_name_length GNUNET_PACKED;
286 
290  struct GNUNET_PeerIdentity peer;
291 
295  uint32_t address_active GNUNET_PACKED;
296 
300  uint32_t id GNUNET_PACKED;
301 
305  struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out;
306 
310  struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in;
311 
315  struct GNUNET_ATS_PropertiesNBO properties;
316 
321  uint32_t address_local_info GNUNET_PACKED;
322 
323  /* followed by:
324  * - char address[address_length]
325  * - char plugin_name[plugin_name_length] (including '\0'-termination).
326  */
327 };
328 
329 
338 
342  uint32_t id GNUNET_PACKED;
343 
347  struct GNUNET_PeerIdentity peer;
348 
353  int32_t all GNUNET_PACKED;
354 };
355 
356 
365 
369  int32_t amount GNUNET_PACKED;
370 
374  struct GNUNET_PeerIdentity peer;
375 };
376 
377 
386 
390  int32_t amount GNUNET_PACKED;
391 
395  struct GNUNET_PeerIdentity peer;
396 
400  struct GNUNET_TIME_RelativeNBO res_delay;
401 };
402 
403 
412  uint32_t preference_kind GNUNET_PACKED;
413 
418  float preference_value GNUNET_PACKED;
419 };
420 
421 
430 
435  uint32_t num_preferences GNUNET_PACKED;
436 
440  struct GNUNET_PeerIdentity peer;
441 
442  /* followed by 'num_preferences'
443  * struct PreferenceInformation values */
444 };
445 
446 
455 
459  uint32_t num_feedback GNUNET_PACKED;
460 
465 
469  struct GNUNET_PeerIdentity peer;
470 
471  /* followed by 'num_feedback'
472  * struct PreferenceInformation values */
473 };
474 
476 
477 
478 
479 #endif
Connectivity client to ATS service: we would like to have address suggestions for this peer...
Definition: ats.h:85
uint32_t start_flag
NBO value of an enum StartFlag.
Definition: ats.h:77
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:53
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:157
This is a scheduling client (aka transport service)
Definition: ats.h:41
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:72
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:333
Connection suggestion handle.
Definition: ats.h:58
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:237
#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:450
#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:408
Client to ATS: I have a performance preference for a peer.
Definition: ats.h:425
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:187
Message sent by ATS service to client to confirm that it is done using the given session ID...
Definition: ats.h:211
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:68
Performance monitoring client that wants to learn about changes in performance characteristics.
Definition: ats.h:47
Scheduling client to ATS service: here is another address you can use.
Definition: ats.h:108