ats service, interaction with 'performance' API More...
Go to the source code of this file.
Functions | |
void | GAS_performance_notify_all_clients (const struct GNUNET_PeerIdentity *peer, const char *plugin_name, const void *plugin_addr, size_t plugin_addr_len, int active, const struct GNUNET_ATS_Properties *prop, enum GNUNET_HELLO_AddressInfo local_address_info, struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out, struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in) |
Transmit the given performance information to all performance clients. More... | |
void | GAS_performance_add_client (struct GNUNET_SERVICE_Client *client, enum StartFlag flag) |
Register a new performance client. More... | |
void | GAS_performance_init (void) |
Initialize performance subsystem. More... | |
void | GAS_performance_done (void) |
Shutdown performance subsystem. More... | |
ats service, interaction with 'performance' API
Definition in file gnunet-service-ats_performance.h.
void GAS_performance_notify_all_clients | ( | const struct GNUNET_PeerIdentity * | peer, |
const char * | plugin_name, | ||
const void * | plugin_addr, | ||
size_t | plugin_addr_len, | ||
int | active, | ||
const struct GNUNET_ATS_Properties * | prop, | ||
enum GNUNET_HELLO_AddressInfo | local_address_info, | ||
struct GNUNET_BANDWIDTH_Value32NBO | bandwidth_out, | ||
struct GNUNET_BANDWIDTH_Value32NBO | bandwidth_in | ||
) |
Transmit the given performance information to all performance clients.
peer | peer for which this is an address suggestion |
plugin_name | 0-termintated string specifying the transport plugin |
plugin_addr | binary address for the plugin to use |
plugin_addr_len | number of bytes in plugin_addr |
active | GNUNET_YES if this address is actively used to maintain a connection to a peer; GNUNET_NO if the address is not actively used; GNUNET_SYSERR if this address is no longer available for ATS |
prop | performance data for the address |
local_address_info | information about the local flags for the address |
bandwidth_out | assigned outbound bandwidth |
bandwidth_in | assigned inbound bandwidth |
Definition at line 145 of file gnunet-service-ats_performance.c.
References GNUNET_break, GNUNET_NO, GNUNET_NT_UNSPECIFIED, GNUNET_STATISTICS_update(), GSA_stats, notify_client(), peer, plugin_name, and GNUNET_ATS_Properties::scope.
Referenced by bandwidth_changed_cb(), free_address(), GAS_addresses_add(), and GAS_addresses_update().
void GAS_performance_add_client | ( | struct GNUNET_SERVICE_Client * | client, |
enum StartFlag | flag | ||
) |
Register a new performance client.
client | handle of the new client |
flag | flag specifying the type of the client |
Definition at line 234 of file gnunet-service-ats_performance.c.
References GAS_addresses_get_peer_info(), GNUNET_notification_context_add(), GNUNET_SERVICE_client_get_mq(), mq, nc_no_pic, nc_pic, peerinfo_it(), and START_FLAG_PERFORMANCE_WITH_PIC.
Referenced by handle_ats_start().
void GAS_performance_init | ( | void | ) |
Initialize performance subsystem.
server | handle to our server |
addresses | the address handle to use |
server | handle to our server |
Definition at line 262 of file gnunet-service-ats_performance.c.
References GNUNET_notification_context_create(), nc_no_pic, and nc_pic.
Referenced by run().
void GAS_performance_done | ( | void | ) |
Shutdown performance subsystem.
Definition at line 273 of file gnunet-service-ats_performance.c.
References GNUNET_notification_context_destroy(), nc_no_pic, and nc_pic.
Referenced by cleanup_task().