ats service, inbound bandwidth reservation management More...
Go to the source code of this file.
Functions | |
void | GAS_reservations_set_bandwidth (const struct GNUNET_PeerIdentity *peer, struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in) |
Set the amount of bandwidth the other peer could currently transmit to us (as far as we know) to the given value. More... | |
void | GAS_handle_reservation_request (struct GNUNET_SERVICE_Client *client, const struct ReservationRequestMessage *message) |
Handle 'reservation request' messages from clients. More... | |
void | GAS_reservations_init (void) |
Initialize reservations subsystem. More... | |
void | GAS_reservations_done (void) |
Shutdown reservations subsystem. More... | |
ats service, inbound bandwidth reservation management
Definition in file gnunet-service-ats_reservations.h.
void GAS_reservations_set_bandwidth | ( | const struct GNUNET_PeerIdentity * | peer, |
struct GNUNET_BANDWIDTH_Value32NBO | bandwidth_in | ||
) |
Set the amount of bandwidth the other peer could currently transmit to us (as far as we know) to the given value.
peer | identity of the peer |
bandwidth_in | currently available bandwidth from that peer to this peer (estimate) |
Definition at line 101 of file gnunet-service-ats_reservations.c.
References GNUNET_assert, GNUNET_BANDWIDTH_tracker_init(), GNUNET_BANDWIDTH_tracker_update_quota(), GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY, GNUNET_CONTAINER_multipeermap_get(), GNUNET_CONTAINER_multipeermap_put(), GNUNET_CONTAINER_multipeermap_remove(), GNUNET_free, GNUNET_new, GNUNET_OK, GNUNET_YES, MAX_BANDWIDTH_CARRY_S, peer, trackers, and GNUNET_BANDWIDTH_Value32NBO::value__.
Referenced by bandwidth_changed_cb().
void GAS_handle_reservation_request | ( | struct GNUNET_SERVICE_Client * | client, |
const struct ReservationRequestMessage * | message | ||
) |
Handle 'reservation request' messages from clients.
client | client that sent the request |
message | the request message |
Definition at line 139 of file gnunet-service-ats_reservations.c.
References ReservationResultMessage::amount, env, GNUNET_ERROR_TYPE_DEBUG, GNUNET_log, GNUNET_MESSAGE_TYPE_ATS_RESERVATION_RESULT, GNUNET_MQ_msg, GNUNET_MQ_send(), GNUNET_NO, GNUNET_SERVICE_client_get_mq(), GNUNET_STATISTICS_update(), GNUNET_TIME_relative_hton(), GSA_stats, msg, GNUNET_TIME_Relative::rel_value_us, reservations_reserve(), and result.
Referenced by handle_reservation_request().
void GAS_reservations_init | ( | void | ) |
Initialize reservations subsystem.
Definition at line 171 of file gnunet-service-ats_reservations.c.
References GNUNET_CONTAINER_multipeermap_create(), GNUNET_NO, and trackers.
Referenced by run().
void GAS_reservations_done | ( | void | ) |
Shutdown reservations subsystem.
Definition at line 202 of file gnunet-service-ats_reservations.c.
References free_tracker(), GNUNET_CONTAINER_multipeermap_destroy(), GNUNET_CONTAINER_multipeermap_iterate(), and trackers.
Referenced by cleanup_task(), and run().