From 0e027fe10f89f0431e8b223528c9a13bdd991802 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 14 Oct 2011 08:52:15 +0000 Subject: complete reservations API --- src/ats/gnunet-service-ats_reservations.c | 47 +++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) (limited to 'src/ats/gnunet-service-ats_reservations.c') diff --git a/src/ats/gnunet-service-ats_reservations.c b/src/ats/gnunet-service-ats_reservations.c index 3356aefbd..8171b71f0 100644 --- a/src/ats/gnunet-service-ats_reservations.c +++ b/src/ats/gnunet-service-ats_reservations.c @@ -27,6 +27,17 @@ #include "gnunet-service-ats_reservations.h" +/** + * Reserve the given amount of incoming bandwidth (in bytes) from the + * given peer. If a reservation is not possible right now, return how + * long the client should wait before trying again. + * + * @param peer peer to reserve bandwidth from + * @param amount number of bytes to reserve + * @return 0 if the reservation was successful, FOREVER if the + * peer is not connected, otherwise the time to wait + * until the reservation might succeed + */ struct GNUNET_TIME_Relative GAS_reservations_reserve (const struct GNUNET_PeerIdentity *peer, int32_t amount) @@ -36,4 +47,40 @@ GAS_reservations_reserve (const struct GNUNET_PeerIdentity *peer, return GNUNET_TIME_UNIT_ZERO; } + +/** + * Set the amount of bandwidth the other peer could currently transmit + * to us (as far as we know) to the given value. + * + * @param peer identity of the peer + * @param bandwidth_in currently available bandwidth from that peer to + * this peer (estimate) + */ +void +GAS_reservations_set_bandwidth (const struct GNUNET_PeerIdentity *peer, + struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in) +{ +} + + + +/** + * Initialize reservations subsystem. + */ +void +GAS_reservations_init () +{ +} + + +/** + * Shutdown reservations subsystem. + */ +void +GAS_reservations_done () +{ +} + + + /* end of gnunet-service-ats_reservations.c */ -- cgit v1.2.3