GNUnet  0.10.x
Data Structures | Macros | Typedefs | Enumerations | Functions
gnunet_ats_service.h File Reference

Automatic transport selection and outbound bandwidth determination. More...

#include "gnunet_constants.h"
#include "gnunet_util_lib.h"
#include "gnunet_hello_lib.h"
Include dependency graph for gnunet_ats_service.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  GNUNET_ATS_Properties
 ATS performance characteristics for an address. More...
 
struct  GNUNET_ATS_PropertiesNBO
 ATS performance characteristics for an address in network byte order (for IPC). More...
 

Macros

#define GNUNET_ATS_DefaultBandwidth   65536
 Default bandwidth assigned to a network : 64 KB/s. More...
 
#define GNUNET_ATS_VALUE_UNDEFINED   UINT32_MAX
 Undefined value for an enum GNUNET_ATS_Property More...
 
#define GNUNET_ATS_VALUE_UNDEFINED_STR   "undefined"
 String representation for GNUNET_ATS_VALUE_UNDEFINED. More...
 
#define GNUNET_ATS_MaxBandwidth   UINT32_MAX
 Maximum bandwidth assigned to a network : 4095 MB/s. More...
 
#define GNUNET_ATS_MaxBandwidthString   "unlimited"
 Textual equivalent for GNUNET_ATS_MaxBandwidth. More...
 
#define GNUNET_ATS_PreferenceType   {GNUNET_ATS_PREFERENCE_BANDWIDTH, GNUNET_ATS_PREFERENCE_LATENCY, GNUNET_ATS_PREFERENCE_END}
 ATS preference types as array initializer. More...
 
#define GNUNET_ATS_PreferenceTypeString   {"BANDWIDTH", "LATENCY", "END" }
 ATS preference types as string array initializer. More...
 

Typedefs

typedef void(* GNUNET_ATS_AddressSuggestionCallback) (void *cls, const struct GNUNET_PeerIdentity *peer, const struct GNUNET_HELLO_Address *address, struct GNUNET_ATS_Session *session, struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out, struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in)
 Signature of a function called by ATS with the current bandwidth and address preferences as determined by ATS. More...
 
typedef void(* GNUNET_ATS_AddressInformationCallback) (void *cls, const struct GNUNET_HELLO_Address *address, int address_active, struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out, struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in, const struct GNUNET_ATS_Properties *prop)
 Signature of a function that is called with QoS information about an address. More...
 
typedef void(* GNUNET_ATS_ReservationCallback) (void *cls, const struct GNUNET_PeerIdentity *peer, int32_t amount, struct GNUNET_TIME_Relative res_delay)
 Function called with reservation result. More...
 

Enumerations

enum  GNUNET_ATS_PreferenceKind { GNUNET_ATS_PREFERENCE_BANDWIDTH = 0, GNUNET_ATS_PREFERENCE_LATENCY = 1, GNUNET_ATS_PREFERENCE_END = 2 }
 Enum defining all known preference categories. More...
 

Functions

void GNUNET_ATS_properties_hton (struct GNUNET_ATS_PropertiesNBO *nbo, const struct GNUNET_ATS_Properties *hbo)
 Convert ATS properties from host to network byte order. More...
 
void GNUNET_ATS_properties_ntoh (struct GNUNET_ATS_Properties *hbo, const struct GNUNET_ATS_PropertiesNBO *nbo)
 Convert ATS properties from network to host byte order. More...
 
struct GNUNET_ATS_ConnectivityHandleGNUNET_ATS_connectivity_init (const struct GNUNET_CONFIGURATION_Handle *cfg)
 Initialize the ATS connectivity suggestion client handle. More...
 
void GNUNET_ATS_connectivity_done (struct GNUNET_ATS_ConnectivityHandle *ch)
 Shutdown ATS connectivity suggestion client. More...
 
struct GNUNET_ATS_ConnectivitySuggestHandleGNUNET_ATS_connectivity_suggest (struct GNUNET_ATS_ConnectivityHandle *ch, const struct GNUNET_PeerIdentity *peer, uint32_t strength)
 We would like to establish a new connection with a peer. More...
 
void GNUNET_ATS_connectivity_suggest_cancel (struct GNUNET_ATS_ConnectivitySuggestHandle *sh)
 We no longer care about being connected to a peer. More...
 
struct GNUNET_ATS_SchedulingHandleGNUNET_ATS_scheduling_init (const struct GNUNET_CONFIGURATION_Handle *cfg, GNUNET_ATS_AddressSuggestionCallback suggest_cb, void *suggest_cb_cls)
 Initialize the ATS scheduling subsystem. More...
 
void GNUNET_ATS_scheduling_done (struct GNUNET_ATS_SchedulingHandle *sh)
 Client is done with ATS scheduling, release resources. More...
 
struct GNUNET_ATS_AddressRecordGNUNET_ATS_address_add (struct GNUNET_ATS_SchedulingHandle *sh, const struct GNUNET_HELLO_Address *address, struct GNUNET_ATS_Session *session, const struct GNUNET_ATS_Properties *prop)
 We have a new address ATS should know. More...
 
void GNUNET_ATS_address_add_session (struct GNUNET_ATS_AddressRecord *ar, struct GNUNET_ATS_Session *session)
 An address was used to initiate a session. More...
 
int GNUNET_ATS_address_del_session (struct GNUNET_ATS_AddressRecord *ar, struct GNUNET_ATS_Session *session)
 A session was destroyed, disassociate it from the given address record. More...
 
void GNUNET_ATS_address_update (struct GNUNET_ATS_AddressRecord *ar, const struct GNUNET_ATS_Properties *prop)
 We have updated performance statistics for a given address. More...
 
void GNUNET_ATS_address_destroy (struct GNUNET_ATS_AddressRecord *ar)
 An address got destroyed, stop using it as a valid address. More...
 
struct GNUNET_ATS_PerformanceHandleGNUNET_ATS_performance_init (const struct GNUNET_CONFIGURATION_Handle *cfg, GNUNET_ATS_AddressInformationCallback addr_info_cb, void *addr_info_cb_cls)
 Get handle to access performance API of the ATS subsystem. More...
 
struct GNUNET_ATS_AddressListHandleGNUNET_ATS_performance_list_addresses (struct GNUNET_ATS_PerformanceHandle *ph, const struct GNUNET_PeerIdentity *peer, int all, GNUNET_ATS_AddressInformationCallback infocb, void *infocb_cls)
 Get information about addresses known to the ATS subsystem. More...
 
void GNUNET_ATS_performance_list_addresses_cancel (struct GNUNET_ATS_AddressListHandle *alh)
 Cancel a pending address listing operation. More...
 
void GNUNET_ATS_performance_done (struct GNUNET_ATS_PerformanceHandle *ph)
 Client is done using the ATS performance subsystem, release resources. More...
 
struct GNUNET_ATS_ReservationContextGNUNET_ATS_reserve_bandwidth (struct GNUNET_ATS_PerformanceHandle *ph, const struct GNUNET_PeerIdentity *peer, int32_t amount, GNUNET_ATS_ReservationCallback rcb, void *rcb_cls)
 Reserve inbound bandwidth from the given peer. More...
 
void GNUNET_ATS_reserve_bandwidth_cancel (struct GNUNET_ATS_ReservationContext *rc)
 Cancel request for reserving bandwidth. More...
 
const char * GNUNET_ATS_print_preference_type (enum GNUNET_ATS_PreferenceKind type)
 Convert a GNUNET_ATS_PreferenceType to a string. More...
 
void GNUNET_ATS_performance_change_preference (struct GNUNET_ATS_PerformanceHandle *ph, const struct GNUNET_PeerIdentity *peer,...)
 Change preferences for the given peer. More...
 
void GNUNET_ATS_performance_give_feedback (struct GNUNET_ATS_PerformanceHandle *ph, const struct GNUNET_PeerIdentity *peer, const struct GNUNET_TIME_Relative scope,...)
 Application feedback on how good preference requirements are fulfilled for the preferences included in the given time scope [now - scope . More...
 

Detailed Description

Automatic transport selection and outbound bandwidth determination.

Author
Christian Grothoff
Matthias Wachs

Definition in file gnunet_ats_service.h.