GNUnet  0.11.x
gnunet-service-transport_ats.h
Go to the documentation of this file.
1 /*
2  This file is part of GNUnet.
3  Copyright (C) 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  */
25 #ifndef GNUNET_SERVICE_TRANSPORT_ATS_H
26 #define GNUNET_SERVICE_TRANSPORT_ATS_H
27 
28 #include "gnunet_ats_service.h"
29 
33 void
34 GST_ats_init (void);
35 
36 
40 void
41 GST_ats_done (void);
42 
43 
53 int
55  struct GNUNET_ATS_Session *session);
56 
57 
65 int
67 
68 
78 void
80  struct GNUNET_ATS_Session *session);
81 
82 
91 void
93  struct GNUNET_ATS_Session *session);
94 
95 
106 void
108  struct GNUNET_ATS_Session *session,
109  const struct GNUNET_ATS_Properties *prop);
110 
111 
119 void
121  const struct GNUNET_ATS_Properties *prop);
122 
123 
133 void
135  struct GNUNET_ATS_Session *session);
136 
137 
146 void
148  uint32_t bps_in,
149  uint32_t bps_out);
150 
151 
160 void
162  struct GNUNET_TIME_Relative delay);
163 
164 
172 void
174  uint32_t distance);
175 
176 
188 void
190  struct GNUNET_ATS_Session *session);
191 
192 
200 void
202 
203 
204 #endif
void GST_ats_block_address(const struct GNUNET_HELLO_Address *address, struct GNUNET_ATS_Session *session)
Temporarily block a valid address for use by ATS for address suggestions.
void GST_ats_init(void)
Initialize ATS subsystem.
ATS performance characteristics for an address.
void GST_ats_update_delay(const struct GNUNET_HELLO_Address *address, struct GNUNET_TIME_Relative delay)
Notify ATS about delay changes to properties of an address.
void GST_ats_add_address(const struct GNUNET_HELLO_Address *address, const struct GNUNET_ATS_Properties *prop)
Notify ATS about a new address including the network this address is located in.
Session handle for connections.
void GST_ats_done(void)
Shutdown ATS subsystem.
void GST_ats_block_reset(const struct GNUNET_HELLO_Address *address, struct GNUNET_ATS_Session *session)
Reset address blocking time.
void GST_ats_new_session(const struct GNUNET_HELLO_Address *address, struct GNUNET_ATS_Session *session)
Notify ATS about a new session now existing for the given address.
void GST_ats_update_distance(const struct GNUNET_HELLO_Address *address, uint32_t distance)
Notify ATS about DV distance change to an address.
void GST_ats_del_session(const struct GNUNET_HELLO_Address *address, struct GNUNET_ATS_Session *session)
Notify ATS that the session (but not the address) of a given address is no longer relevant...
static struct GNUNET_TIME_Relative delay
When should dkg communication start?
int GST_ats_is_known(const struct GNUNET_HELLO_Address *address, struct GNUNET_ATS_Session *session)
Test if ATS knows about this address and session.
void GST_ats_update_utilization(const struct GNUNET_HELLO_Address *address, uint32_t bps_in, uint32_t bps_out)
Notify ATS about utilization changes to an address.
void GST_ats_expire_address(const struct GNUNET_HELLO_Address *address)
Notify ATS that the address has expired and thus cannot be used any longer.
An address for communicating with a peer.
Automatic transport selection and outbound bandwidth determination.
struct GNUNET_ATS_Session * session
Session (can be NULL)
static char * address
GNS address for this phone.
void GST_ats_add_inbound_address(const struct GNUNET_HELLO_Address *address, struct GNUNET_ATS_Session *session, const struct GNUNET_ATS_Properties *prop)
Notify ATS about a new inbound address.
int GST_ats_is_known_no_session(const struct GNUNET_HELLO_Address *address)
Test if ATS knows about this address.
Time for relative time used by GNUnet, in microseconds.