ats service, interaction with 'scheduling' API More...
#include "gnunet_util_lib.h"
Go to the source code of this file.
Functions | |
int | GAS_scheduling_add_client (struct GNUNET_SERVICE_Client *client) |
Register a new scheduling client. More... | |
void | GAS_scheduling_remove_client (struct GNUNET_SERVICE_Client *client) |
Unregister a client (which may have been a scheduling client, but this is not assured). More... | |
void | GAS_scheduling_transmit_address_suggestion (const struct GNUNET_PeerIdentity *peer, uint32_t session_id, struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out, struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in) |
Transmit the given address suggestion and bandwidth update to all scheduling clients. More... | |
void | GAS_handle_address_add (const struct AddressAddMessage *m) |
Handle 'address add' messages from clients. More... | |
void | GAS_handle_address_update (const struct AddressUpdateMessage *m) |
Handle 'address update' messages from clients. More... | |
void | GAS_handle_address_destroyed (const struct AddressDestroyedMessage *m) |
Handle 'address destroyed' messages from clients. More... | |
ats service, interaction with 'scheduling' API
Definition in file gnunet-service-ats_scheduling.h.
int GAS_scheduling_add_client | ( | struct GNUNET_SERVICE_Client * | client | ) |
Register a new scheduling client.
client | handle of the new client |
Definition at line 45 of file gnunet-service-ats_scheduling.c.
References GNUNET_ERROR_TYPE_DEBUG, GNUNET_log, GNUNET_OK, GNUNET_SYSERR, and my_client.
Referenced by handle_ats_start().
void GAS_scheduling_remove_client | ( | struct GNUNET_SERVICE_Client * | client | ) |
Unregister a client (which may have been a scheduling client, but this is not assured).
client | handle of the (now dead) client |
Definition at line 65 of file gnunet-service-ats_scheduling.c.
References GAS_addresses_destroy_all(), and my_client.
Referenced by client_disconnect_cb().
void GAS_scheduling_transmit_address_suggestion | ( | const struct GNUNET_PeerIdentity * | peer, |
uint32_t | session_id, | ||
struct GNUNET_BANDWIDTH_Value32NBO | bandwidth_out, | ||
struct GNUNET_BANDWIDTH_Value32NBO | bandwidth_in | ||
) |
Transmit the given address suggestion and bandwidth update to all scheduling clients.
peer | peer for which this is an address suggestion |
session_id | session ID to use for the given client |
bandwidth_out | assigned outbound bandwidth |
bandwidth_in | assigned inbound bandwidth |
Definition at line 75 of file gnunet-service-ats_scheduling.c.
References AddressSuggestionMessage::bandwidth_in, AddressSuggestionMessage::bandwidth_out, env, GNUNET_ERROR_TYPE_DEBUG, GNUNET_i2s(), GNUNET_log, GNUNET_MESSAGE_TYPE_ATS_ADDRESS_SUGGESTION, GNUNET_MQ_msg, GNUNET_MQ_send(), GNUNET_NO, GNUNET_SERVICE_client_get_mq(), GNUNET_STATISTICS_update(), GSA_stats, msg, my_client, peer, session_id, and GNUNET_BANDWIDTH_Value32NBO::value__.
Referenced by bandwidth_changed_cb().
void GAS_handle_address_add | ( | const struct AddressAddMessage * | m | ) |
Handle 'address add' messages from clients.
m | the request message |
Definition at line 109 of file gnunet-service-ats_scheduling.c.
References address, GAS_addresses_add(), GNUNET_ATS_properties_ntoh(), GNUNET_break, GNUNET_ERROR_TYPE_DEBUG, GNUNET_log, GNUNET_NO, GNUNET_NT_UNSPECIFIED, GNUNET_STATISTICS_update(), GSA_stats, m, plugin_name, and GNUNET_ATS_Properties::scope.
Referenced by handle_address_add().
void GAS_handle_address_update | ( | const struct AddressUpdateMessage * | m | ) |
Handle 'address update' messages from clients.
m | the request message |
Definition at line 150 of file gnunet-service-ats_scheduling.c.
References GAS_addresses_update(), GNUNET_ATS_properties_ntoh(), GNUNET_NO, GNUNET_STATISTICS_update(), GSA_stats, and m.
Referenced by handle_address_update().
void GAS_handle_address_destroyed | ( | const struct AddressDestroyedMessage * | m | ) |
Handle 'address destroyed' messages from clients.
m | the request message |
Definition at line 172 of file gnunet-service-ats_scheduling.c.
References env, GAS_addresses_destroy(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_log, GNUNET_MESSAGE_TYPE_ATS_SESSION_RELEASE, GNUNET_MQ_msg, GNUNET_MQ_send(), GNUNET_NO, GNUNET_SERVICE_client_get_mq(), GNUNET_STATISTICS_update(), GSA_stats, m, my_client, GNUNET_ATS_SessionReleaseMessage::peer, and GNUNET_ATS_SessionReleaseMessage::session_id.
Referenced by handle_address_destroyed().