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 
39 struct PropertiesNBO {
45 
52  uint32_t goodput_out;
53 
60  uint32_t goodput_in;
61 
68  uint32_t utilization_out;
69 
76  uint32_t utilization_in;
77 
82  uint32_t distance;
83 
89  uint32_t mtu;
90 
95  uint32_t nt;
96 
101  uint32_t cc;
102 };
103 
104 
115  struct GNUNET_MessageHeader header;
116 
121  uint32_t pk GNUNET_PACKED;
122 
127 
132 };
133 
134 
143  struct GNUNET_MessageHeader header;
144 
150 
155 
159  struct PropertiesNBO properties;
160 
161  /* followed by:
162  * - char * address (including '\0'-termination).
163  */
164 };
165 
166 
175  struct GNUNET_MessageHeader header;
176 
181 
188 
192  struct PropertiesNBO properties;
193 };
194 
195 
205  struct GNUNET_MessageHeader header;
206 
211 
218 };
219 
220 
230  struct GNUNET_MessageHeader header;
231 
237 
243  struct GNUNET_PeerIdentity peer;
244 
248  struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out;
249 
253  struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in;
254 };
255 
256 
265  struct GNUNET_MessageHeader header;
266 
271 
277  struct GNUNET_PeerIdentity peer;
278 
279  /* Followed by 0-terminated address */
280 };
281 
282 
284 
285 
286 
287 #endif
Message sent by ATS client to ATS service when an session was destroyed and must thus henceforth no l...
Definition: ats2.h:201
uint32_t cc
What characteristics does this communicator have? A enum GNUNET_TRANSPORT_CommunicatorCharacteristics...
Definition: ats2.h:101
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:76
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:52
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:138
uint32_t utilization_out
Actual traffic on this connection from this peer to the other peer.
Definition: ats2.h:68
uint32_t mtu
MTU of the network layer, UINT32_MAX for no MTU (stream).
Definition: ats2.h:89
uint32_t distance
Distance on network layer (required for distance-vector routing) in hops.
Definition: ats2.h:82
Message used to notify ATS that the performance characteristics for an session have changed...
Definition: ats2.h:171
ATS Service allocates resources to an session identified by the given session_id for the given peer w...
Definition: ats2.h:226
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:95
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).
#define GNUNET_PACKED
gcc-ism to get packed structs.
struct GNUNET_TIME_RelativeNBO delay
Delay.
Definition: ats2.h:44
uint32_t goodput_in
Confirmed useful payload on this connection to this peer from the other peer.
Definition: ats2.h:60
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:109
Bandwidth allocation API for the transport service.