2 This file is part of GNUnet.
3 (C) 2015 Christian Grothoff (and other contributing authors)
5 GNUnet is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published
7 by the Free Software Foundation; either version 3, or (at your
8 option) any later version.
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 General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with GNUnet; see the file COPYING. If not, write to the
17 Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA.
21 * @file transport/gnunet-service-transport_ats.h
22 * @brief interfacing between transport and ATS service
23 * @author Christian Grothoff
26 * - add API to give ATS feedback about an address that was
27 * suggested but did not work out (without fully 'deleting'
29 * - improve ATS API to take advantage of this new subsystem
30 * when calling ATS functions, make ATS API match this API
32 * - combine with API to tell ATS about address "use"
34 #ifndef GNUNET_SERVICE_TRANSPORT_ATS_H
35 #define GNUNET_SERVICE_TRANSPORT_ATS_H
37 #include "gnunet_ats_service.h"
40 * Initialize ATS subsystem.
47 * Shutdown ATS subsystem.
54 * Notify ATS about the new address including the network this address is
57 * @param address the address
58 * @param session the session
59 * @param ats ats information
60 * @param ats_count number of @a ats information
63 GST_ats_add_address (const struct GNUNET_HELLO_Address *address,
64 struct Session *session,
65 const struct GNUNET_ATS_Information *ats,
70 * Notify ATS about a new session now existing for the given
73 * @param address the address
74 * @param session the session
77 GST_ats_new_session (const struct GNUNET_HELLO_Address *address,
78 struct Session *session);
82 * Notify ATS about property changes to an address
84 * @param address the address
85 * @param session the session
86 * @param ats performance information
87 * @param ats_count number of elements in @a ats
90 GST_ats_update_metrics (const struct GNUNET_HELLO_Address *address,
91 struct Session *session,
92 const struct GNUNET_ATS_Information *ats,
97 * Notify ATS that the session (but not the address) of
98 * a given address is no longer relevant.
100 * @param address the address
101 * @param session the session
104 GST_ats_del_session (const struct GNUNET_HELLO_Address *address,
105 struct Session *session);
109 * Notify ATS that the address has expired and thus cannot
110 * be used any longer. This function must only be called
111 * if the corresponding session is already gone.
113 * @param address the address
116 GST_ats_expire_address (const struct GNUNET_HELLO_Address *address);