doxygen documentation
authorMatthias Wachs <wachs@net.in.tum.de>
Fri, 5 Jul 2013 14:00:50 +0000 (14:00 +0000)
committerMatthias Wachs <wachs@net.in.tum.de>
Fri, 5 Jul 2013 14:00:50 +0000 (14:00 +0000)
src/ats/gnunet-service-ats-solver_mlp.c
src/ats/gnunet-service-ats-solver_mlp.h
src/ats/gnunet-service-ats-solver_proportional.c
src/ats/gnunet-service-ats-solver_proportional.h
src/ats/gnunet-service-ats_addresses.c
src/ats/gnunet-service-ats_addresses.h
src/ats/perf_ats_mlp.c

index 27ff63ea3e56dc9f830b79db32c45c7c7abf3cc5..84cacd01768fb340deb2cc967d1ec23a824b965a 100644 (file)
@@ -421,7 +421,7 @@ static int mlp_create_problem_count_addresses (
  * @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
@@ -803,7 +803,6 @@ mlp_create_problem_add_invariant_columns (struct GAS_MLP_Handle *mlp, struct MLP
  * Create the MLP problem
  *
  * @param mlp the MLP handle
- * @param addresses the hashmap containing all adresses
  * @return GNUNET_OK or GNUNET_SYSERR
  */
 static int
@@ -1150,7 +1149,6 @@ GAS_mlp_solve_problem (void *solver)
  * 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
  */
@@ -1288,13 +1286,11 @@ GAS_mlp_address_session_changed (void *solver,
  *
  * @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 */
@@ -1406,8 +1402,6 @@ GAS_mlp_address_change_network (void *solver,
  * 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
  */
@@ -1502,7 +1496,6 @@ static double get_peer_pref_value (struct GAS_MLP_Handle *mlp, const struct GNUN
  * Get the preferred address for a specific peer
  *
  * @param solver the MLP Handle
- * @param addresses address hashmap
  * @param peer the peer
  * @return suggested address
  */
@@ -1589,7 +1582,6 @@ GAS_mlp_bulk_stop (void *solver)
  * Stop notifying about address and bandwidth changes for this peer
  *
  * @param solver the MLP handle
- * @param addresses address hashmap
  * @param peer the peer
  */
 void
@@ -1614,7 +1606,6 @@ GAS_mlp_stop_get_preferred_address (void *solver,
  * 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
@@ -1699,6 +1690,7 @@ GAS_mlp_done (void *solver)
  *
  * @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
@@ -1707,6 +1699,8 @@ GAS_mlp_done (void *solver)
  * @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 *
index 960f63186b04a3b7ec2163ceee413c0c0186d416..4a5d35b000eb1994dbbe695fcac35f06f5ca5a22 100644 (file)
@@ -371,7 +371,9 @@ GAS_mlp_solve_problem (void *solver);
  * @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 *
@@ -394,7 +396,6 @@ GAS_mlp_init (const struct GNUNET_CONFIGURATION_Handle *cfg,
  * 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
  */
@@ -439,19 +440,17 @@ GAS_mlp_address_session_changed (void *solver,
 
 
 /**
- * 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);
 
 
@@ -477,8 +476,6 @@ GAS_mlp_address_change_network (void *solver,
  * 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
  */
@@ -492,7 +489,6 @@ GAS_mlp_address_delete (void *solver,
  * 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
@@ -524,7 +520,6 @@ GAS_mlp_bulk_stop (void *solver);
  * Get the preferred address for a specific peer
  *
  * @param solver the MLP Handle
- * @param addresses address hashmap
  * @param peer the peer
  * @return suggested address
  */
@@ -537,10 +532,8 @@ GAS_mlp_get_preferred_address (void *solver,
  * 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);
index d248638ca8addb93dec513114a335f4b31c3ed20..4fe5b3559e478a8e24c620c2841404b51bf6fa69 100644 (file)
@@ -888,7 +888,6 @@ GAS_proportional_address_change_preference (void *solver,
  * 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 *
@@ -970,7 +969,6 @@ GAS_proportional_get_preferred_address (void *solver,
  * Stop notifying about address and bandwidth changes for this peer
  *
  * @param solver the solver handle
- * @param addresses address hashmap
  * @param peer the peer
  */
 void
@@ -985,7 +983,6 @@ GAS_proportional_stop_get_preferred_address (void *solver,
  * 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
  */
@@ -1251,7 +1248,6 @@ GAS_proportional_address_change_network (void *solver,
  * 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
  */
@@ -1310,6 +1306,8 @@ GAS_proportional_address_add (void *solver,
  * @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 *
index 8ce34184772969e4becc32152b05ac69fd9ab4f1..f09c4e2be18d255e1866630e79d710158f2f0f54 100644 (file)
@@ -38,7 +38,6 @@
  * 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
@@ -75,6 +74,8 @@ GAS_proportional_address_change_preference (void *solver,
  * @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 *
@@ -105,7 +106,6 @@ GAS_proportional_done (void * solver);
  * 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
  */
@@ -114,6 +114,16 @@ GAS_proportional_address_add (void *solver,
                                                        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,
@@ -122,18 +132,47 @@ GAS_proportional_address_property_changed (void *solver,
                                                                                                                        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,
@@ -144,7 +183,6 @@ GAS_proportional_address_change_network (void *solver,
  * 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
  */
@@ -172,7 +210,6 @@ GAS_proportional_bulk_stop (void *solver);
  * Stop notifying about address and bandwidth changes for this peer
  *
  * @param solver the proportional handle
- * @param addresses address hashmap
  * @param peer the peer
  */
 void
@@ -184,7 +221,6 @@ GAS_proportional_stop_get_preferred_address (void *solver,
  * 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 *
index 781ef2f8d7f06f2e99083a71e0698ee39066ee57..717daa5769019af0b1d212fffebdf9de31ba0872 100644 (file)
@@ -678,8 +678,6 @@ find_equivalent_address (struct GAS_Addresses_Handle *handle,
  * @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
  */
 
@@ -1179,7 +1177,7 @@ GAS_addresses_in_use (struct GAS_Addresses_Handle *handle,
 
   /* 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;
 }
 
@@ -1356,7 +1354,7 @@ normalized_preference_changed_cb (void *cls,
  * 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
  */
@@ -1402,7 +1400,7 @@ get_preferences_cb (void *cls, const struct GNUNET_PeerIdentity *id)
  * 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 *
index fa9a2663f0a69427896f6896f3b7abce8fa49261..3c2e040f2363506cde134a02637a8e1555e6ade1 100644 (file)
@@ -536,13 +536,11 @@ typedef void
  *
  * @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);
 
 /**
index 5f39c24d78b98b0ab9ba38e8bde98f2556ff6066..13e7e9f04434c24bf163325b13ae060c21d72c1a 100644 (file)
@@ -222,7 +222,7 @@ update_single_addresses (struct ATS_Address *cur)
                default:
                        break;
        }
-       GAS_mlp_address_inuse_changed(mlp, cur, 0, GNUNET_YES);
+       GAS_mlp_address_inuse_changed(mlp, cur, GNUNET_YES);
 
 }