* @param col the column to create the value in
* @param val the value to set
* @param line calling line for debbuging
- * @param GNUNET_YES value changed, GNUNET_NO value did not change, GNUNET_SYSERR
+ * @return GNUNET_YES value changed, GNUNET_NO value did not change, GNUNET_SYSERR
* on error
*/
static int
* Create the MLP problem
*
* @param mlp the MLP handle
- * @param addresses the hashmap containing all adresses
* @return GNUNET_OK or GNUNET_SYSERR
*/
static int
* Add a single address to the solve
*
* @param solver the solver Handle
- * @param addresses the address hashmap containing all addresses
* @param address the address to add
* @param network network type of this address
*/
*
* @param solver solver handle
* @param address the address
- * @param cur_session the current session
- * @param new_session the new session
+ * @param in_use usage state
*/
void
GAS_mlp_address_inuse_changed (void *solver,
struct ATS_Address *address,
- uint32_t session,
int in_use)
{
/* Nothing to do here */
* The MLP problem has to be recreated and the problem has to be resolved
*
* @param solver the MLP Handle
- * @param addresses the address hashmap
- * the address has to be already removed from the hashmap
* @param address the address to delete
* @param session_only delete only session not whole address
*/
* Get the preferred address for a specific peer
*
* @param solver the MLP Handle
- * @param addresses address hashmap
* @param peer the peer
* @return suggested address
*/
* Stop notifying about address and bandwidth changes for this peer
*
* @param solver the MLP handle
- * @param addresses address hashmap
* @param peer the peer
*/
void
* Changes the preferences for a peer in the MLP problem
*
* @param solver the MLP Handle
- * @param addresses the address hashmap
* @param peer the peer
* @param kind the kind to change the preference
* @param pref_rel the relative score
*
* @param cfg the GNUNET_CONFIGURATION_Handle handle
* @param stats the GNUNET_STATISTICS handle
+ * @param addresses the address hashmap
* @param network array of GNUNET_ATS_NetworkType with length dest_length
* @param out_dest array of outbound quotas
* @param in_dest array of outbound quota
* @param bw_changed_cb_cls cls for callback
* @param get_preference callback to get relative preferences for a peer
* @param get_preference_cls cls for callback to get relative preferences
+ * @param get_properties callback to get relative properties
+ * @param get_properties_cls cls for callback to get relative properties
* @return struct GAS_MLP_Handle on success, NULL on fail
*/
void *
* @param bw_changed_cb callback for changed bandwidth amounts
* @param bw_changed_cb_cls cls for callback
* @param get_preference callback to get relative preferences for a peer
- * @param get_preference_cls cls for callback to get relative preferences
+ * @param get_preference callback to get relative preferences for a peer
+ * @param get_properties_cls for callback to get relative properties
+ * @param get_properties_cls cls for callback to get relative properties
* @return struct GAS_MLP_Handle on success, NULL on fail
*/
void *
* Add a single address within a network to the solver
*
* @param solver the solver Handle
- * @param addresses the address hashmap containing all addresses
* @param address the address to add
* @param network network type of this address
*/
/**
- * Transport session for this address has changed
+ * Usage for this address has changed
*
* NOTE: values in addresses are already updated
*
* @param solver solver handle
* @param address the address
- * @param cur_session the current session
- * @param new_session the new session
+ * @param in_use usage state
*/
void
GAS_mlp_address_inuse_changed (void *solver,
struct ATS_Address *address,
- uint32_t session,
int in_use);
* The MLP problem has to be recreated and the problem has to be resolved
*
* @param solver the MLP Handle
- * @param addresses the address hashmap
- * the address has to be already removed from the hashmap
* @param address the address to delete
* @param session_only delete only session not whole address
*/
* Changes the preferences for a peer in the MLP problem
*
* @param solver the MLP Handle
- * @param addresses the address hashmap
* @param peer the peer
* @param kind the kind to change the preference
* @param pref_rel the relative score
* Get the preferred address for a specific peer
*
* @param solver the MLP Handle
- * @param addresses address hashmap
* @param peer the peer
* @return suggested address
*/
* Stop notifying about address and bandwidth changes for this peer
*
* @param solver the MLP handle
- * @param addresses address hashmap
* @param peer the peer
*/
-
void
GAS_mlp_stop_get_preferred_address (void *solver,
const struct GNUNET_PeerIdentity *peer);
* Get the preferred address for a specific peer
*
* @param solver the solver handle
- * @param addresses the address hashmap containing all addresses
* @param peer the identity of the peer
*/
const struct ATS_Address *
* Stop notifying about address and bandwidth changes for this peer
*
* @param solver the solver handle
- * @param addresses address hashmap
* @param peer the peer
*/
void
* Remove an address from the solver
*
* @param solver the solver handle
- * @param addresses the address hashmap containing all addresses
* @param address the address to remove
* @param session_only delete only session not whole address
*/
* Add a new single address to a network
*
* @param solver the solver Handle
- * @param addresses the address hashmap containing all addresses
* @param address the address to add
* @param network network type of this address
*/
* @param bw_changed_cb_cls cls for callback
* @param get_preference callback to get relative preferences for a peer
* @param get_preference_cls cls for callback to get relative preferences
+ * @param get_properties for callback to get relative properties
+ * @param get_properties_cls cls for callback to get relative properties
* @return handle for the solver on success, NULL on fail
*/
void *
* Changes the preferences for a peer in the problem
*
* @param solver the solver handle
- * @param addresses the address hashmap
* @param peer the peer to change the preference for
* @param kind the kind to change the preference
* @param pref_rel the normalized preference value for this kind over all clients
* @param bw_changed_cb_cls cls for callback
* @param get_preference callback to get relative preferences for a peer
* @param get_preference_cls cls for callback to get relative preferences
+ * @param get_properties_cls for callback to get relative properties
+ * @param get_properties_cls cls for callback to get relative properties
* @return handle for the solver on success, NULL on fail
*/
void *
* Add a single address within a network to the solver
*
* @param solver the solver Handle
- * @param addresses the address hashmap containing all addresses
* @param address the address to add
* @param network network type of this address
*/
struct ATS_Address *address,
uint32_t network);
+
+/**
+ * Transport properties for this address have changed
+ *
+ * @param solver solver handle
+ * @param address the address
+ * @param type the ATSI type in HBO
+ * @param abs_value the absolute value of the property
+ * @param rel_value the normalized value
+ */
void
GAS_proportional_address_property_changed (void *solver,
struct ATS_Address *address,
double rel_value);
+/**
+ * Transport session for this address has changed
+ *
+ * NOTE: values in addresses are already updated
+ *
+ * @param solver solver handle
+ * @param address the address
+ * @param cur_session the current session
+ * @param new_session the new session
+ */
void
GAS_proportional_address_session_changed (void *solver,
struct ATS_Address *address,
uint32_t cur_session,
uint32_t new_session);
+
+/**
+ * Usage for this address has changed
+ *
+ * NOTE: values in addresses are already updated
+ *
+ * @param solver solver handle
+ * @param address the address
+ * @param in_use usage state
+ */
void
GAS_proportional_address_inuse_changed (void *solver,
struct ATS_Address *address,
- uint32_t session,
int in_use);
+/**
+ * Network scope for this address has changed
+ *
+ * NOTE: values in addresses are already updated
+ *
+ * @param solver solver handle
+ * @param address the address
+ * @param current_network the current network
+ * @param new_network the new network
+ */
void
GAS_proportional_address_change_network (void *solver,
struct ATS_Address *address,
* Remove an address from the solver
*
* @param solver the solver handle
- * @param addresses the address hashmap containing all addresses
* @param address the address to remove
* @param session_only delete only session not whole address
*/
* Stop notifying about address and bandwidth changes for this peer
*
* @param solver the proportional handle
- * @param addresses address hashmap
* @param peer the peer
*/
void
* Get the prefered address for a specific peer
*
* @param solver the solver handle
- * @param addresses the address hashmap containing all addresses
* @param peer the identity of the peer
*/
const struct ATS_Address *
* @param plugin_addr plugin address
* @param plugin_addr_len length of the plugin address
* @param session_id session id, can be 0
- * @param atsi performance information for this address
- * @param atsi_count number of performance information contained
* @return an ATS_address or NULL
*/
/* Tell solver about update */
ea->used = in_use;
- handle->s_address_update_inuse (handle->solver, ea, ea->session_id, ea->used);
+ handle->s_address_update_inuse (handle->solver, ea, ea->used);
return GNUNET_OK;
}
* The relative value for a property changed
*
* @param cls the address handle
- * @param peer the peer
+ * @param address the peer
* @param type the ATS type
* @param prop_rel the new relative preference value
*/
* values for an address from solver
*
* @param cls unused
- * @param id the peer to return the normalized properties for
+ * @param address the address
* @return array of double values with |GNUNET_ATS_QualityPropertiesCount| elements
*/
const double *
*
* @param solver solver handle
* @param address the address
- * @param cur_session the current session
- * @param new_session the new session
+ * @param in_use usage state
*/
typedef void
(*GAS_solver_address_inuse_changed) (void *solver,
struct ATS_Address *address,
- uint32_t session,
int in_use);
/**
default:
break;
}
- GAS_mlp_address_inuse_changed(mlp, cur, 0, GNUNET_YES);
+ GAS_mlp_address_inuse_changed(mlp, cur, GNUNET_YES);
}