From f67083411d4443bfac0abe9f4f42656936e92d9d Mon Sep 17 00:00:00 2001 From: Matthias Wachs Date: Wed, 9 Nov 2011 16:38:01 +0000 Subject: [PATCH] cancel suggests --- src/include/gnunet_ats_service.h | 10 ++++++++++ src/include/gnunet_protocols.h | 26 +++++++++++++++++--------- 2 files changed, 27 insertions(+), 9 deletions(-) diff --git a/src/include/gnunet_ats_service.h b/src/include/gnunet_ats_service.h index a6edc786c..8c9be13d4 100644 --- a/src/include/gnunet_ats_service.h +++ b/src/include/gnunet_ats_service.h @@ -496,6 +496,16 @@ GNUNET_ATS_suggest_address (struct GNUNET_ATS_SchedulingHandle *sh, const struct GNUNET_PeerIdentity *peer); +/** + * We want to cancel ATS suggesting addresses for a peer. + * + * @param sh handle + * @param peer identity of the peer + */ +void +GNUNET_ATS_suggest_address_cancel (struct GNUNET_ATS_SchedulingHandle *sh, + const struct GNUNET_PeerIdentity *peer); + /** * We have updated performance statistics for a given address. Note * that this function can be called for addresses that are currently diff --git a/src/include/gnunet_protocols.h b/src/include/gnunet_protocols.h index 160ae26f1..3e33b51e5 100644 --- a/src/include/gnunet_protocols.h +++ b/src/include/gnunet_protocols.h @@ -906,59 +906,67 @@ extern "C" */ #define GNUNET_MESSAGE_TYPE_ATS_REQUEST_ADDRESS 341 +/** + * Type of the 'struct RequestAddressMessage' sent by clients to ATS + * to request an address to help connect. + */ +#define GNUNET_MESSAGE_TYPE_ATS_REQUEST_ADDRESS_CANCEL 342 + /** * Type of the 'struct AddressUpdateMessage' sent by clients to ATS * to inform ATS about performance changes. */ -#define GNUNET_MESSAGE_TYPE_ATS_ADDRESS_UPDATE 342 +#define GNUNET_MESSAGE_TYPE_ATS_ADDRESS_UPDATE 343 /** * Type of the 'struct AddressDestroyedMessage' sent by clients to ATS * to inform ATS about an address being unavailable. */ -#define GNUNET_MESSAGE_TYPE_ATS_ADDRESS_DESTROYED 343 +#define GNUNET_MESSAGE_TYPE_ATS_ADDRESS_DESTROYED 344 /** * Type of the 'struct AddressSuggestionMessage' sent by ATS to clients * to suggest switching to a different address. */ -#define GNUNET_MESSAGE_TYPE_ATS_ADDRESS_SUGGESTION 344 +#define GNUNET_MESSAGE_TYPE_ATS_ADDRESS_SUGGESTION 345 /** * Type of the 'struct PeerInformationMessage' sent by ATS to clients * to inform about QoS for a particular connection. */ -#define GNUNET_MESSAGE_TYPE_ATS_PEER_INFORMATION 345 +#define GNUNET_MESSAGE_TYPE_ATS_PEER_INFORMATION 346 /** * Type of the 'struct ReservationRequestMessage' sent by clients to ATS * to ask for inbound bandwidth reservations. */ -#define GNUNET_MESSAGE_TYPE_ATS_RESERVATION_REQUEST 346 +#define GNUNET_MESSAGE_TYPE_ATS_RESERVATION_REQUEST 347 /** * Type of the 'struct ReservationResultMessage' sent by ATS to clients * in response to a reservation request. */ -#define GNUNET_MESSAGE_TYPE_ATS_RESERVATION_RESULT 347 +#define GNUNET_MESSAGE_TYPE_ATS_RESERVATION_RESULT 348 /** * Type of the 'struct ChangePreferenceMessage' sent by clients to ATS * to ask for allocation preference changes. */ -#define GNUNET_MESSAGE_TYPE_ATS_PREFERENCE_CHANGE 348 +#define GNUNET_MESSAGE_TYPE_ATS_PREFERENCE_CHANGE 349 /** * Type of the 'struct SessionReleaseMessage' sent by ATS to client * to confirm that a session ID was destroyed. */ -#define GNUNET_MESSAGE_TYPE_ATS_SESSION_RELEASE 349 +#define GNUNET_MESSAGE_TYPE_ATS_SESSION_RELEASE 350 /** * Type of the 'struct AddressUseMessage' sent by ATS to client * to confirm that an address is used or not used anymore */ -#define GNUNET_MESSAGE_TYPE_ATS_ADDRESS_IN_USE 350 +#define GNUNET_MESSAGE_TYPE_ATS_ADDRESS_IN_USE 351 + + /******************************************************************************* -- 2.25.1