docu
authorMatthias Wachs <wachs@net.in.tum.de>
Tue, 11 Jun 2013 08:20:33 +0000 (08:20 +0000)
committerMatthias Wachs <wachs@net.in.tum.de>
Tue, 11 Jun 2013 08:20:33 +0000 (08:20 +0000)
src/ats/gnunet-service-ats-solver_proportional.c
src/ats/gnunet-service-ats-solver_proportional.h

index 119c97bf32d49d66dbbb4949bf2820a8d5494717..261e5fb68d875a9f1248c29ae15f798d925329f4 100644 (file)
@@ -310,38 +310,112 @@ struct Network
 };
 
 
+/**
+ * Wrapper for addresses to store them in network's linked list
+ */
 struct AddressWrapper
 {
+  /**
+   * Next in DLL
+   */
   struct AddressWrapper *next;
+
+  /**
+   * Previous in DLL
+   */
   struct AddressWrapper *prev;
 
+  /**
+   * The address
+   */
   struct ATS_Address *addr;
 };
 
 
+/**
+ * Preference client
+ */
 struct PreferenceClient
 {
+  /**
+   * Next in DLL
+   */
   struct PreferenceClient *prev;
+
+  /**
+   * Next in DLL
+   */
+
   struct PreferenceClient *next;
+
+  /**
+   * Client handle
+   */
   void *client;
 
+  /**
+   * Total preference for this peer
+   */
   double f_total[GNUNET_ATS_PreferenceCount];
 
+  /**
+   * List of peer preferences for this client
+   */
+
+  /**
+   * Head of peer list
+   */
   struct PreferencePeer *p_head;
+
+  /**
+   * Tail of peer list
+   */
   struct PreferencePeer *p_tail;
 };
 
-
+/**
+ * Preference peer
+ */
 struct PreferencePeer
 {
+  /**
+   * Next in DLL
+   */
   struct PreferencePeer *next;
+
+  /**
+   * Previous in DLL
+   */
   struct PreferencePeer *prev;
+
+  /**
+   * Client
+   */
   struct PreferenceClient *client;
+
+  /**
+   * Solver handle
+   */
   struct GAS_PROPORTIONAL_Handle *s;
+
+  /**
+   * Peer id
+   */
   struct GNUNET_PeerIdentity id;
 
+  /**
+   * Preference Values
+   */
   double f[GNUNET_ATS_PreferenceCount];
+
+  /**
+   * Relative Preference Values
+   */
   double f_rel[GNUNET_ATS_PreferenceCount];
+
+  /**
+   * Relative Total Preference Value
+   */
   double f_rel_total;
 
   GNUNET_SCHEDULER_TaskIdentifier aging_task;
index 2416be795f557932ffb5c278e04aeab14065a81c..b76796c21c56dcea0111d39f2763955a0a190021 100644 (file)
 #include "gnunet-service-ats_addresses.h"
 
 /**
- * ATS simplistic solver
+ * ATS proportional solver
  *
  * General description
  */
 
-
-
-
 /**
- * Init the simplistic problem solving component
+ * Init the proportional problem solver
  *
  * Quotas:
  * network[i] contains the network type as type GNUNET_ATS_NetworkType[i]
@@ -71,12 +68,12 @@ GAS_proportional_init (const struct GNUNET_CONFIGURATION_Handle *cfg,
                      GAS_bandwidth_changed_cb bw_changed_cb,
                      void *bw_changed_cb_cls);
 
+
 /**
- * Shutdown the simplistic problem solving component
+ * Shutdown the proportional problem solver
  *
  * @param solver the respective handle to shutdown
  */
-void
 GAS_proportional_done (void * solver);
 
 /**
@@ -89,9 +86,9 @@ GAS_proportional_done (void * solver);
  */
 void
 GAS_proportional_address_add (void *solver,
-                                                                                                               struct GNUNET_CONTAINER_MultiHashMap *addresses,
-                                                                                                               struct ATS_Address *address,
-                                                                                                               uint32_t network);
+                                                       struct GNUNET_CONTAINER_MultiHashMap *addresses,
+                                                       struct ATS_Address *address,
+                                                       uint32_t network);
 
 
 /**