GNUnet  0.10.x
ats2.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 ATS2_H
27 #define ATS2_H
28 
29 #include "gnunet_util_lib.h"
31 
32 
34 
35 
40 {
41 
47 
54  uint32_t goodput_out;
55 
62  uint32_t goodput_in;
63 
70  uint32_t utilization_out;
71 
78  uint32_t utilization_in;
79 
84  uint32_t distance;
85 
91  uint32_t mtu;
92 
97  uint32_t nt;
98 
103  uint32_t cc;
104 
105 };
106 
107 
113 {
119  struct GNUNET_MessageHeader header;
120 
125  uint32_t pk GNUNET_PACKED;
126 
131 
136 
137 };
138 
139 
144 {
149  struct GNUNET_MessageHeader header;
150 
156 
161 
165  struct PropertiesNBO properties;
166 
167  /* followed by:
168  * - char * address (including '\0'-termination).
169  */
170 
171 };
172 
173 
179 {
183  struct GNUNET_MessageHeader header;
184 
189 
196 
200  struct PropertiesNBO properties;
201 
202 };
203 
204 
211 {
215  struct GNUNET_MessageHeader header;
216 
221 
228 
229 };
230 
231 
238 {
242  struct GNUNET_MessageHeader header;
243 
249 
255  struct GNUNET_PeerIdentity peer;
256 
260  struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out;
261 
265  struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in;
266 
267 };
268 
269 
275 {
279  struct GNUNET_MessageHeader header;
280 
285 
291  struct GNUNET_PeerIdentity peer;
292 
293  /* Followed by 0-terminated address */
294 };
295 
296 
298 
299 
300 
301 #endif
Message sent by ATS client to ATS service when an session was destroyed and must thus henceforth no l...
Definition: ats2.h:210
uint32_t cc
What characteristics does this communicator have? A enum GNUNET_TRANSPORT_CommunicatorCharacteristics...
Definition: ats2.h:103
static struct GNUNET_CRYPTO_EddsaPrivateKey * pk
Private key of this peer.
uint32_t utilization_in
Actual traffic on this connection from the other peer to this peer.
Definition: ats2.h:78
struct GNUNET_BIO_WriteHandle * bw
hanlde to the file to write the load statistics to
uint32_t goodput_out
Confirmed successful payload on this connection from this peer to the other peer. ...
Definition: ats2.h:54
static struct GNUNET_HashCode session_id
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.
Transport client to ATS service: here is another session you can use.
Definition: ats2.h:143
uint32_t utilization_out
Actual traffic on this connection from this peer to the other peer.
Definition: ats2.h:70
uint32_t mtu
MTU of the network layer, UINT32_MAX for no MTU (stream).
Definition: ats2.h:91
uint32_t distance
Distance on network layer (required for distance-vector routing) in hops.
Definition: ats2.h:84
Message used to notify ATS that the performance characteristics for an session have changed...
Definition: ats2.h:178
ATS Service allocates resources to an session identified by the given session_id for the given peer w...
Definition: ats2.h:237
struct GNUNET_TESTBED_Peer * peer
The peer associated with this model.
uint32_t nt
Which network scope does the respective address belong to? A enum GNUNET_NetworkType nt in NBO...
Definition: ats2.h:97
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).
#define GNUNET_PACKED
gcc-ism to get packed structs.
struct GNUNET_TIME_RelativeNBO delay
Delay.
Definition: ats2.h:46
uint32_t goodput_in
Confirmed useful payload on this connection to this peer from the other peer.
Definition: ats2.h:62
Header for all communications.
static unsigned long long reserved
How much space have we currently reserved?
ATS performance characteristics for an address.
Definition: ats2.h:39
Application client to ATS service: we would like to have address suggestions for this peer...
Definition: ats2.h:112
Bandwidth allocation API for the transport service.