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 {
46 
53  uint32_t goodput_out;
54 
61  uint32_t goodput_in;
62 
69  uint32_t utilization_out;
70 
77  uint32_t utilization_in;
78 
83  uint32_t distance;
84 
90  uint32_t mtu;
91 
96  uint32_t nt;
97 
102  uint32_t cc;
103 };
104 
105 
111 {
117  struct GNUNET_MessageHeader header;
118 
123  uint32_t pk GNUNET_PACKED;
124 
129 
134 };
135 
136 
141 {
146  struct GNUNET_MessageHeader header;
147 
153 
158 
162  struct PropertiesNBO properties;
163 
164  /* followed by:
165  * - char * address (including '\0'-termination).
166  */
167 };
168 
169 
175 {
179  struct GNUNET_MessageHeader header;
180 
185 
192 
196  struct PropertiesNBO properties;
197 };
198 
199 
206 {
210  struct GNUNET_MessageHeader header;
211 
216 
223 };
224 
225 
232 {
236  struct GNUNET_MessageHeader header;
237 
243 
249  struct GNUNET_PeerIdentity peer;
250 
254  struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out;
255 
259  struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in;
260 };
261 
262 
268 {
272  struct GNUNET_MessageHeader header;
273 
278 
284  struct GNUNET_PeerIdentity peer;
285 
286  /* Followed by 0-terminated address */
287 };
288 
289 
291 
292 
293 
294 #endif
Message sent by ATS client to ATS service when an session was destroyed and must thus henceforth no l...
Definition: ats2.h:205
uint32_t cc
What characteristics does this communicator have? A enum GNUNET_TRANSPORT_CommunicatorCharacteristics...
Definition: ats2.h:102
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:77
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:53
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:140
uint32_t utilization_out
Actual traffic on this connection from this peer to the other peer.
Definition: ats2.h:69
uint32_t mtu
MTU of the network layer, UINT32_MAX for no MTU (stream).
Definition: ats2.h:90
uint32_t distance
Distance on network layer (required for distance-vector routing) in hops.
Definition: ats2.h:83
Message used to notify ATS that the performance characteristics for an session have changed...
Definition: ats2.h:174
ATS Service allocates resources to an session identified by the given session_id for the given peer w...
Definition: ats2.h:231
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:96
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:244
#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:45
uint32_t goodput_in
Confirmed useful payload on this connection to this peer from the other peer.
Definition: ats2.h:61
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:110
Bandwidth allocation API for the transport service.