GNUnet  0.10.x
Data Fields
GNUNET_ATS_SolverFunctions Struct Reference

Solver functions. More...

#include <gnunet_ats_plugin.h>

Collaboration diagram for GNUNET_ATS_SolverFunctions:
[legend]

Data Fields

void * cls
 Closure to pass to all solver functions in this struct. More...
 
GAS_solver_address_add s_add
 Add a new address for a peer to the solver. More...
 
GAS_solver_address_property_changed s_address_update_property
 Update the properties of an address in the solver. More...
 
GAS_solver_get_preferred_address s_get
 Tell solver to notify ATS if the address to use changes for a specific peer using the bandwidth changed callback. More...
 
GAS_solver_stop_get_preferred_address s_get_stop
 Tell solver stop notifying ATS about changes for this peers. More...
 
GAS_solver_address_delete s_del
 Delete an address in the solver. More...
 
GAS_solver_address_change_preference s_pref
 Change relative preference for quality in solver. More...
 
GAS_solver_address_feedback_preference s_feedback
 Give feedback about the current assignment. More...
 
GAS_solver_bulk_start s_bulk_start
 Start a bulk operation. More...
 
GAS_solver_bulk_stop s_bulk_stop
 Bulk operation done. More...
 
struct GNUNET_ATS_PreferenceHandle *(* preference_add )(void *cls, const struct GNUNET_ATS_Preference *pref)
 The plugin should begin to respect a new preference. More...
 
void(* preference_del )(void *cls, struct GNUNET_ATS_PreferenceHandle *ph, const struct GNUNET_ATS_Preference *pref)
 The plugin should end respecting a preference. More...
 
struct GNUNET_ATS_SessionHandle *(* session_add )(void *cls, const struct GNUNET_ATS_SessionData *data, const char *address)
 Transport established a new session with performance characteristics given in data. More...
 
void(* session_update )(void *cls, struct GNUNET_ATS_SessionHandle *sh, const struct GNUNET_ATS_SessionData *data)
 data changed for a given sh, solver should consider the updated performance characteristics. More...
 
void(* session_del )(void *cls, struct GNUNET_ATS_SessionHandle *sh, const struct GNUNET_ATS_SessionData *data)
 A session went away. More...
 

Detailed Description

Solver functions.

Each solver is required to set up and return an instance of this struct during initialization.

Definition at line 166 of file gnunet_ats_plugin.h.

Field Documentation

◆ cls

void * GNUNET_ATS_SolverFunctions::cls

◆ s_add

GAS_solver_address_add GNUNET_ATS_SolverFunctions::s_add

Add a new address for a peer to the solver.

The address is already contained in the addresses hashmap!

Definition at line 179 of file gnunet_ats_plugin.h.

Referenced by enforce_add_address(), GAS_plugin_new_address(), libgnunet_plugin_ats_mlp_init(), libgnunet_plugin_ats_proportional_init(), and libgnunet_plugin_ats_ril_init().

◆ s_address_update_property

GAS_solver_address_property_changed GNUNET_ATS_SolverFunctions::s_address_update_property

◆ s_get

GAS_solver_get_preferred_address GNUNET_ATS_SolverFunctions::s_get

Tell solver to notify ATS if the address to use changes for a specific peer using the bandwidth changed callback.

The solver must only notify about changes for peers with pending address requests!

Definition at line 193 of file gnunet_ats_plugin.h.

Referenced by enforce_start_request(), GAS_plugin_request_connect_start(), libgnunet_plugin_ats_mlp_init(), libgnunet_plugin_ats_proportional_init(), and libgnunet_plugin_ats_ril_init().

◆ s_get_stop

GAS_solver_stop_get_preferred_address GNUNET_ATS_SolverFunctions::s_get_stop

Tell solver stop notifying ATS about changes for this peers.

The solver must only notify about changes for peers with pending address requests!

Definition at line 201 of file gnunet_ats_plugin.h.

Referenced by enforce_stop_request(), GAS_plugin_request_connect_stop(), libgnunet_plugin_ats_mlp_init(), libgnunet_plugin_ats_proportional_init(), and libgnunet_plugin_ats_ril_init().

◆ s_del

GAS_solver_address_delete GNUNET_ATS_SolverFunctions::s_del

Delete an address in the solver.

The address is not contained in the address hashmap anymore!

Definition at line 208 of file gnunet_ats_plugin.h.

Referenced by enforce_del_address(), GAS_plugin_delete_address(), libgnunet_plugin_ats_mlp_init(), libgnunet_plugin_ats_proportional_init(), and libgnunet_plugin_ats_ril_init().

◆ s_pref

GAS_solver_address_change_preference GNUNET_ATS_SolverFunctions::s_pref

◆ s_feedback

GAS_solver_address_feedback_preference GNUNET_ATS_SolverFunctions::s_feedback

◆ s_bulk_start

GAS_solver_bulk_start GNUNET_ATS_SolverFunctions::s_bulk_start

Start a bulk operation.

Used if many values have to be updated at the same time. When a bulk operation is pending the solver does not have to resolve the problem since more updates will follow anyway

For each call to bulk_start, a call to bulk_stop is required!

Definition at line 229 of file gnunet_ats_plugin.h.

Referenced by GAS_plugin_solver_lock(), libgnunet_plugin_ats_mlp_init(), libgnunet_plugin_ats_proportional_init(), libgnunet_plugin_ats_ril_init(), and set_prop_task().

◆ s_bulk_stop

GAS_solver_bulk_stop GNUNET_ATS_SolverFunctions::s_bulk_stop

Bulk operation done.

If no more bulk operations are pending, the solver can solve the problem with the updated values

Definition at line 237 of file gnunet_ats_plugin.h.

Referenced by GAS_plugin_solver_unlock(), libgnunet_plugin_ats_mlp_init(), libgnunet_plugin_ats_proportional_init(), libgnunet_plugin_ats_ril_init(), and set_prop_task().

◆ preference_add

struct GNUNET_ATS_PreferenceHandle*(* GNUNET_ATS_SolverFunctions::preference_add) (void *cls, const struct GNUNET_ATS_Preference *pref)

The plugin should begin to respect a new preference.

Parameters
clsthe closure
prefthe preference to add
Returns
plugin's internal representation, or NULL

Definition at line 135 of file gnunet_ats_plugin_new.h.

Referenced by handle_suggest(), and libgnunet_plugin_ats2_simple_init().

◆ preference_del

void(* GNUNET_ATS_SolverFunctions::preference_del) (void *cls, struct GNUNET_ATS_PreferenceHandle *ph, const struct GNUNET_ATS_Preference *pref)

The plugin should end respecting a preference.

Parameters
clsthe closure
phwhatever preference_add returned
prefthe preference to delete
Returns
plugin's internal representation, or NULL

Definition at line 147 of file gnunet_ats_plugin_new.h.

Referenced by client_disconnect_cb(), handle_suggest_cancel(), and libgnunet_plugin_ats2_simple_init().

◆ session_add

struct GNUNET_ATS_SessionHandle*(* GNUNET_ATS_SolverFunctions::session_add) (void *cls, const struct GNUNET_ATS_SessionData *data, const char *address)

Transport established a new session with performance characteristics given in data.

Parameters
clsclosure
dataperformance characteristics of sh
addressaddress information (for debugging)
Returns
handle by which the plugin will identify this session

Definition at line 161 of file gnunet_ats_plugin_new.h.

Referenced by handle_session_add(), and libgnunet_plugin_ats2_simple_init().

◆ session_update

void(* GNUNET_ATS_SolverFunctions::session_update) (void *cls, struct GNUNET_ATS_SessionHandle *sh, const struct GNUNET_ATS_SessionData *data)

data changed for a given sh, solver should consider the updated performance characteristics.

Parameters
clsclosure
shsession this is about
dataperformance characteristics of sh

Definition at line 174 of file gnunet_ats_plugin_new.h.

Referenced by handle_session_update(), and libgnunet_plugin_ats2_simple_init().

◆ session_del

void(* GNUNET_ATS_SolverFunctions::session_del) (void *cls, struct GNUNET_ATS_SessionHandle *sh, const struct GNUNET_ATS_SessionData *data)

A session went away.

Solver should update accordingly.

Parameters
clsclosure
shsession this is about
data(last) performance characteristics of sh

Definition at line 186 of file gnunet_ats_plugin_new.h.

Referenced by free_session(), handle_session_del(), and libgnunet_plugin_ats2_simple_init().


The documentation for this struct was generated from the following files: