aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2012-01-13 11:39:47 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2012-01-13 11:39:47 +0000
commit592bcf569f3915d95ba806bbf004fe6c83dfcdfc (patch)
treea15c48320e6a2a68931a482b79ea9f687f949c2e
parente31812bc030130c0faf6ff6fe5ca44bee440f4fb (diff)
downloadgnunet-592bcf569f3915d95ba806bbf004fe6c83dfcdfc.tar.gz
gnunet-592bcf569f3915d95ba806bbf004fe6c83dfcdfc.zip
- more mlp
-rw-r--r--src/ats/gnunet-service-ats_addresses.h6
-rw-r--r--src/ats/gnunet-service-ats_addresses_mlp.h36
2 files changed, 40 insertions, 2 deletions
diff --git a/src/ats/gnunet-service-ats_addresses.h b/src/ats/gnunet-service-ats_addresses.h
index ad34c94f2..a5230b4f3 100644
--- a/src/ats/gnunet-service-ats_addresses.h
+++ b/src/ats/gnunet-service-ats_addresses.h
@@ -46,6 +46,8 @@ struct ATS_Address
46 46
47 char *plugin; 47 char *plugin;
48 48
49 void *mlp_information;
50
49 struct GNUNET_ATS_Information *ats; 51 struct GNUNET_ATS_Information *ats;
50 52
51 struct GNUNET_TIME_Relative atsp_latency; 53 struct GNUNET_TIME_Relative atsp_latency;
@@ -73,6 +75,10 @@ struct ATS_Address
73 */ 75 */
74 int active; 76 int active;
75 77
78 /**
79 * Is this the address for this peer in use?
80 */
81 int used;
76}; 82};
77 83
78/** 84/**
diff --git a/src/ats/gnunet-service-ats_addresses_mlp.h b/src/ats/gnunet-service-ats_addresses_mlp.h
index 2555846ff..28cffdf36 100644
--- a/src/ats/gnunet-service-ats_addresses_mlp.h
+++ b/src/ats/gnunet-service-ats_addresses_mlp.h
@@ -118,6 +118,15 @@ struct GAS_MLP_Handle
118 118
119 119
120/** 120/**
121 * Address specific MLP information
122 */
123struct MLP_information
124{
125
126};
127
128
129/**
121 * Init the MLP problem solving component 130 * Init the MLP problem solving component
122 * 131 *
123 * @param stats the GNUNET_STATISTICS handle 132 * @param stats the GNUNET_STATISTICS handle
@@ -131,10 +140,33 @@ GAS_mlp_init (const struct GNUNET_STATISTICS_Handle *stats,
131 unsigned int max_iterations); 140 unsigned int max_iterations);
132 141
133/** 142/**
134 * Update address in the MLP problem 143 * Updates a single address in the MLP problem
144 *
145 * If the address did not exist before in the problem:
146 * The MLP problem has to be recreated and the problem has to be resolved
147 *
148 * Otherwise the addresses' values can be updated and the existing base can
149 * be reused
135 */ 150 */
136void 151void
137GAS_mlp_update (struct ATS_Address *address); 152GAS_mlp_address_update (struct GNUNET_CONTAINER_MultiHashMap * addresses, struct ATS_Address *address);
153
154
155/**
156 * Deletes a single address in the MLP problem
157 *
158 * The MLP problem has to be recreated and the problem has to be resolved
159 */
160void
161GAS_mlp_address_delete (struct GNUNET_CONTAINER_MultiHashMap * addresses, struct ATS_Address *address);
162
163
164/**
165 * Deletes a single address in the MLP problem
166 */
167void
168GAS_mlp_address_change_preference (struct GNUNET_CONTAINER_MultiHashMap * addresses, struct ATS_Address *address);
169
138 170
139/** 171/**
140 * Shutdown the MLP problem solving component 172 * Shutdown the MLP problem solving component