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 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.
17 * @file ats/gnunet-service-ats_performance.h
18 * @brief ats service, interaction with 'performance' API
19 * @author Matthias Wachs
20 * @author Christian Grothoff
22 #ifndef GNUNET_SERVICE_ATS_PERFORMANCE_H
23 #define GNUNET_SERVICE_ATS_PERFORMANCE_H
25 #include "gnunet_util_lib.h"
26 #include "gnunet_ats_service.h"
31 * Transmit the given performance information to all performance
34 * @param peer peer for which this is an address suggestion
35 * @param plugin_name 0-termintated string specifying the transport plugin
36 * @param plugin_addr binary address for the plugin to use
37 * @param plugin_addr_len number of bytes in @a plugin_addr
38 * @param active #GNUNET_YES if this address is actively used
39 * to maintain a connection to a peer;
40 * #GNUNET_NO if the address is not actively used;
41 * #GNUNET_SYSERR if this address is no longer available for ATS
42 * @param prop performance data for the address
43 * @param local_address_info information about the local flags for the address
44 * @param bandwidth_out assigned outbound bandwidth
45 * @param bandwidth_in assigned inbound bandwidth
48 GAS_performance_notify_all_clients (const struct GNUNET_PeerIdentity *peer,
49 const char *plugin_name,
50 const void *plugin_addr,
51 size_t plugin_addr_len,
53 const struct GNUNET_ATS_Properties *prop,
54 enum GNUNET_HELLO_AddressInfo local_address_info,
55 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out,
56 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in);
60 * Register a new performance client.
62 * @param client handle of the new client
63 * @param flag flag specifying the type of the client
66 GAS_performance_add_client (struct GNUNET_SERVICE_Client *client,
71 * Initialize performance subsystem.
73 * @param server handle to our server
74 * @param addresses the address handle to use
77 GAS_performance_init (void);
81 * Shutdown performance subsystem.
84 GAS_performance_done (void);
88 /* end of gnunet-service-ats_performance.h */