2 This file is part of GNUnet.
3 Copyright (C) 2011-2015 GNUnet e.V.
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.
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.
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/>.
20 * @file ats/gnunet-service-ats_performance.h
21 * @brief ats service, interaction with 'performance' API
22 * @author Matthias Wachs
23 * @author Christian Grothoff
25 #ifndef GNUNET_SERVICE_ATS_PERFORMANCE_H
26 #define GNUNET_SERVICE_ATS_PERFORMANCE_H
28 #include "gnunet_util_lib.h"
29 #include "gnunet_ats_service.h"
34 * Transmit the given performance information to all performance
37 * @param peer peer for which this is an address suggestion
38 * @param plugin_name 0-termintated string specifying the transport plugin
39 * @param plugin_addr binary address for the plugin to use
40 * @param plugin_addr_len number of bytes in @a plugin_addr
41 * @param active #GNUNET_YES if this address is actively used
42 * to maintain a connection to a peer;
43 * #GNUNET_NO if the address is not actively used;
44 * #GNUNET_SYSERR if this address is no longer available for ATS
45 * @param prop performance data for the address
46 * @param local_address_info information about the local flags for the address
47 * @param bandwidth_out assigned outbound bandwidth
48 * @param bandwidth_in assigned inbound bandwidth
51 GAS_performance_notify_all_clients (const struct GNUNET_PeerIdentity *peer,
52 const char *plugin_name,
53 const void *plugin_addr,
54 size_t plugin_addr_len,
56 const struct GNUNET_ATS_Properties *prop,
57 enum GNUNET_HELLO_AddressInfo local_address_info,
58 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out,
59 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in);
63 * Register a new performance client.
65 * @param client handle of the new client
66 * @param flag flag specifying the type of the client
69 GAS_performance_add_client (struct GNUNET_SERVICE_Client *client,
74 * Initialize performance subsystem.
76 * @param server handle to our server
77 * @param addresses the address handle to use
80 GAS_performance_init (void);
84 * Shutdown performance subsystem.
87 GAS_performance_done (void);
91 /* end of gnunet-service-ats_performance.h */