- more mlp
authorMatthias Wachs <wachs@net.in.tum.de>
Fri, 13 Jan 2012 11:39:47 +0000 (11:39 +0000)
committerMatthias Wachs <wachs@net.in.tum.de>
Fri, 13 Jan 2012 11:39:47 +0000 (11:39 +0000)
src/ats/gnunet-service-ats_addresses.h
src/ats/gnunet-service-ats_addresses_mlp.h

index ad34c94f257f525ec9f22efd0c60c60d0e9c6b88..a5230b4f3995990b297dd70f560ca9d28534bd9f 100644 (file)
@@ -46,6 +46,8 @@ struct ATS_Address
 
   char *plugin;
 
+  void *mlp_information;
+
   struct GNUNET_ATS_Information *ats;
 
   struct GNUNET_TIME_Relative atsp_latency;
@@ -73,6 +75,10 @@ struct ATS_Address
    */
   int active;
 
+  /**
+   * Is this the address for this peer in use?
+   */
+  int used;
 };
 
 /**
index 2555846ff0ea535e3b08ecd3b7e6474057a7dec9..28cffdf369e3a903ce606ee8f874ec6faed6b0fb 100644 (file)
@@ -117,6 +117,15 @@ struct GAS_MLP_Handle
 };
 
 
+/**
+ * Address specific MLP information
+ */
+struct MLP_information
+{
+
+};
+
+
 /**
  * Init the MLP problem solving component
  *
@@ -131,10 +140,33 @@ GAS_mlp_init (const struct GNUNET_STATISTICS_Handle *stats,
               unsigned int max_iterations);
 
 /**
- * Update address in the MLP problem
+ * Updates a single address in the MLP problem
+ *
+ * If the address did not exist before in the problem:
+ * The MLP problem has to be recreated and the problem has to be resolved
+ *
+ * Otherwise the addresses' values can be updated and the existing base can
+ * be reused
  */
 void
-GAS_mlp_update (struct ATS_Address *address);
+GAS_mlp_address_update (struct GNUNET_CONTAINER_MultiHashMap * addresses, struct ATS_Address *address);
+
+
+/**
+ * Deletes a single address in the MLP problem
+ *
+ * The MLP problem has to be recreated and the problem has to be resolved
+ */
+void
+GAS_mlp_address_delete (struct GNUNET_CONTAINER_MultiHashMap * addresses, struct ATS_Address *address);
+
+
+/**
+ * Deletes a single address in the MLP problem
+ */
+void
+GAS_mlp_address_change_preference (struct GNUNET_CONTAINER_MultiHashMap * addresses, struct ATS_Address *address);
+
 
 /**
  * Shutdown the MLP problem solving component