Plugin API for the ATS service. More...
Data Structures | |
struct | GNUNET_ATS_SolverFunctions |
Solver functions. More... | |
struct | GNUNET_ATS_PluginEnvironment |
The ATS plugin will pass a pointer to a struct of this type as to the initialization function of the ATS plugins. More... | |
Typedefs | |
typedef void(* | GAS_solver_address_change_preference) (void *solver, const struct GNUNET_PeerIdentity *peer, enum GNUNET_ATS_PreferenceKind kind, double pref_rel) |
Change the preference for a peer. More... | |
typedef void(* | GAS_solver_address_feedback_preference) (void *solver, struct GNUNET_SERVICE_Client *application, const struct GNUNET_PeerIdentity *peer, const struct GNUNET_TIME_Relative scope, enum GNUNET_ATS_PreferenceKind kind, double score) |
Give feedback about the current assignment. More... | |
typedef void(* | GAS_solver_bulk_start) (void *solver) |
Notify the solver about a bulk operation changing possibly a lot of values Solver will not resolve until all bulk operations are marked as done. More... | |
typedef void(* | GAS_solver_bulk_stop) (void *solver) |
Mark a bulk operation as done Solver will resolve if values have changed. More... | |
typedef void(* | GAS_solver_address_add) (void *solver, struct ATS_Address *address, uint32_t network) |
Add a single address within a network to the solver. More... | |
typedef void(* | GAS_solver_address_delete) (void *solver, struct ATS_Address *address) |
Delete an address or just the session from the solver. More... | |
typedef void(* | GAS_solver_address_property_changed) (void *solver, struct ATS_Address *address) |
Transport properties for this address have changed. More... | |
typedef void(* | GAS_solver_get_preferred_address) (void *solver, const struct GNUNET_PeerIdentity *peer) |
Get the preferred address for a peer from solver. More... | |
typedef void(* | GAS_solver_stop_get_preferred_address) (void *solver, const struct GNUNET_PeerIdentity *peer) |
Stop getting the preferred address for a peer from solver. More... | |
typedef void(* | GAS_solver_information_callback) (void *cls, enum GAS_Solver_Operation op, enum GAS_Solver_Status stat, enum GAS_Solver_Additional_Information) |
Callback to call with additional information Used for measurement. More... | |
typedef void(* | GAS_bandwidth_changed_cb) (void *cls, struct ATS_Address *address) |
Callback to call from solver when bandwidth for address has changed. More... | |
typedef const double *(* | GAS_get_preferences) (void *cls, const struct GNUNET_PeerIdentity *id) |
Callback to call from solver to obtain application preference values for a peer. More... | |
typedef unsigned int(* | GAS_get_connectivity) (void *cls, const struct GNUNET_PeerIdentity *id) |
Callback to call from solver to obtain application connectivity preferences for a peer. More... | |
Enumerations | |
enum | GAS_Solver_Operation { GAS_OP_SOLVE_START , GAS_OP_SOLVE_STOP , GAS_OP_SOLVE_SETUP_START , GAS_OP_SOLVE_SETUP_STOP , GAS_OP_SOLVE_MLP_LP_START , GAS_OP_SOLVE_MLP_LP_STOP , GAS_OP_SOLVE_MLP_MLP_START , GAS_OP_SOLVE_MLP_MLP_STOP , GAS_OP_SOLVE_UPDATE_NOTIFICATION_START , GAS_OP_SOLVE_UPDATE_NOTIFICATION_STOP } |
Operation codes for solver information callback. More... | |
enum | GAS_Solver_Status { GAS_STAT_SUCCESS , GAS_STAT_FAIL } |
Status of a GAS_Solver_Operation operation. More... | |
enum | GAS_Solver_Additional_Information { GAS_INFO_NONE , GAS_INFO_FULL , GAS_INFO_UPDATED , GAS_INFO_PROP_SINGLE , GAS_INFO_PROP_ALL } |
Status of the operation. More... | |
Plugin API for the ATS service.
Specifies the struct that is given to the plugin's entry method and the other struct that must be returned. Note that the destructors of ATS plugins will be given the value returned by the constructor and is expected to return a NULL pointer.
typedef void(* GAS_solver_address_change_preference) (void *solver, const struct GNUNET_PeerIdentity *peer, enum GNUNET_ATS_PreferenceKind kind, double pref_rel) |
Change the preference for a peer.
handle | the solver handle |
client | the client sending this request |
peer | the peer id |
kind | the preference kind to change |
score | the new preference score |
pref_rel | the normalized preference value for this kind over all clients |
Definition at line 62 of file gnunet_ats_plugin.h.
typedef void(* GAS_solver_address_feedback_preference) (void *solver, struct GNUNET_SERVICE_Client *application, const struct GNUNET_PeerIdentity *peer, const struct GNUNET_TIME_Relative scope, enum GNUNET_ATS_PreferenceKind kind, double score) |
Give feedback about the current assignment.
handle | the solver handle |
application | the application sending this request |
peer | the peer id |
scope | the time interval for this feedback: [now - scope .. now] |
kind | the preference kind for this feedback |
score | the feedback score |
Definition at line 79 of file gnunet_ats_plugin.h.
typedef void(* GAS_solver_bulk_start) (void *solver) |
Notify the solver about a bulk operation changing possibly a lot of values Solver will not resolve until all bulk operations are marked as done.
solver | the solver |
Definition at line 96 of file gnunet_ats_plugin.h.
typedef void(* GAS_solver_bulk_stop) (void *solver) |
Mark a bulk operation as done Solver will resolve if values have changed.
solver | the solver |
Definition at line 106 of file gnunet_ats_plugin.h.
typedef void(* GAS_solver_address_add) (void *solver, struct ATS_Address *address, uint32_t network) |
Add a single address within a network to the solver.
solver | the solver Handle |
address | the address to add |
network | network type of this address |
Definition at line 117 of file gnunet_ats_plugin.h.
typedef void(* GAS_solver_address_delete) (void *solver, struct ATS_Address *address) |
Delete an address or just the session from the solver.
solver | the solver Handle |
address | the address to delete |
Definition at line 129 of file gnunet_ats_plugin.h.
typedef void(* GAS_solver_address_property_changed) (void *solver, struct ATS_Address *address) |
Transport properties for this address have changed.
solver | solver handle |
address | the address |
Definition at line 140 of file gnunet_ats_plugin.h.
typedef void(* GAS_solver_get_preferred_address) (void *solver, const struct GNUNET_PeerIdentity *peer) |
Get the preferred address for a peer from solver.
solver | the solver to use |
peer | the peer |
Definition at line 151 of file gnunet_ats_plugin.h.
typedef void(* GAS_solver_stop_get_preferred_address) (void *solver, const struct GNUNET_PeerIdentity *peer) |
Stop getting the preferred address for a peer from solver.
solver | the solver to use |
peer | the peer |
Definition at line 162 of file gnunet_ats_plugin.h.
typedef void(* GAS_solver_information_callback) (void *cls, enum GAS_Solver_Operation op, enum GAS_Solver_Status stat, enum GAS_Solver_Additional_Information) |
Callback to call with additional information Used for measurement.
cls | the closure |
op | the operation |
Definition at line 376 of file gnunet_ats_plugin.h.
typedef void(* GAS_bandwidth_changed_cb) (void *cls, struct ATS_Address *address) |
Callback to call from solver when bandwidth for address has changed.
address | the with changed bandwidth assigned |
Definition at line 388 of file gnunet_ats_plugin.h.
typedef const double*(* GAS_get_preferences) (void *cls, const struct GNUNET_PeerIdentity *id) |
Callback to call from solver to obtain application preference values for a peer.
cls | the cls |
id | the peer id |
Definition at line 402 of file gnunet_ats_plugin.h.
typedef unsigned int(* GAS_get_connectivity) (void *cls, const struct GNUNET_PeerIdentity *id) |
Callback to call from solver to obtain application connectivity preferences for a peer.
cls | the cls |
id | the peer id |
Definition at line 416 of file gnunet_ats_plugin.h.
enum GAS_Solver_Operation |
Operation codes for solver information callback.
Order of calls is expected to be: GAS_OP_SOLVE_START GAS_OP_SOLVE_STOP GAS_OP_SOLVE_UPDATE_NOTIFICATION_START GAS_OP_SOLVE_UPDATE_NOTIFICATION_STOP
Definition at line 258 of file gnunet_ats_plugin.h.
enum GAS_Solver_Status |
Status of a GAS_Solver_Operation operation.
Enumerator | |
---|---|
GAS_STAT_SUCCESS | Success. |
GAS_STAT_FAIL | Failure. |
Definition at line 321 of file gnunet_ats_plugin.h.
Status of the operation.
Definition at line 338 of file gnunet_ats_plugin.h.