diff options
Diffstat (limited to 'src/ats/gnunet-service-ats-solver_mlp.h')
-rw-r--r-- | src/ats/gnunet-service-ats-solver_mlp.h | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/ats/gnunet-service-ats-solver_mlp.h b/src/ats/gnunet-service-ats-solver_mlp.h index c31d44b5e..1f4f0ec8c 100644 --- a/src/ats/gnunet-service-ats-solver_mlp.h +++ b/src/ats/gnunet-service-ats-solver_mlp.h | |||
@@ -212,7 +212,7 @@ struct GAS_MLP_Handle | |||
212 | /** | 212 | /** |
213 | * Address hashmap for lookups | 213 | * Address hashmap for lookups |
214 | */ | 214 | */ |
215 | const struct GNUNET_CONTAINER_MultiHashMap *addresses; | 215 | const struct GNUNET_CONTAINER_MultiPeerMap *addresses; |
216 | 216 | ||
217 | /** | 217 | /** |
218 | * Addresses' bandwidth changed callback | 218 | * Addresses' bandwidth changed callback |
@@ -296,7 +296,7 @@ struct GAS_MLP_Handle | |||
296 | /** | 296 | /** |
297 | * Peers with pending address requests | 297 | * Peers with pending address requests |
298 | */ | 298 | */ |
299 | struct GNUNET_CONTAINER_MultiHashMap *requested_peers; | 299 | struct GNUNET_CONTAINER_MultiPeerMap *requested_peers; |
300 | 300 | ||
301 | /** | 301 | /** |
302 | * Was the problem updated since last solution | 302 | * Was the problem updated since last solution |
@@ -355,15 +355,17 @@ struct MLP_information | |||
355 | unsigned int r_c3; | 355 | unsigned int r_c3; |
356 | }; | 356 | }; |
357 | 357 | ||
358 | |||
358 | /** | 359 | /** |
359 | * Solves the MLP problem | 360 | * Solves the MLP problem |
360 | * | 361 | * |
361 | * @param solver the MLP Handle | 362 | * @param solver the MLP Handle |
362 | * @return GNUNET_OK if could be solved, GNUNET_SYSERR on failure | 363 | * @return #GNUNET_OK if could be solved, GNUNET_SYSERR on failure |
363 | */ | 364 | */ |
364 | int | 365 | int |
365 | GAS_mlp_solve_problem (void *solver); | 366 | GAS_mlp_solve_problem (void *solver); |
366 | 367 | ||
368 | |||
367 | /** | 369 | /** |
368 | * Init the MLP problem solving component | 370 | * Init the MLP problem solving component |
369 | * | 371 | * |
@@ -383,13 +385,14 @@ GAS_mlp_solve_problem (void *solver); | |||
383 | */ | 385 | */ |
384 | void * | 386 | void * |
385 | GAS_mlp_init (const struct GNUNET_CONFIGURATION_Handle *cfg, | 387 | GAS_mlp_init (const struct GNUNET_CONFIGURATION_Handle *cfg, |
386 | const struct GNUNET_STATISTICS_Handle *stats, | 388 | const struct GNUNET_STATISTICS_Handle *stats, |
387 | const struct GNUNET_CONTAINER_MultiHashMap *addresses, int *network, | 389 | const struct GNUNET_CONTAINER_MultiPeerMap *addresses, int *network, |
388 | unsigned long long *out_dest, unsigned long long *in_dest, int dest_length, | 390 | unsigned long long *out_dest, unsigned long long *in_dest, int dest_length, |
389 | GAS_bandwidth_changed_cb bw_changed_cb, void *bw_changed_cb_cls, | 391 | GAS_bandwidth_changed_cb bw_changed_cb, void *bw_changed_cb_cls, |
390 | GAS_get_preferences get_preference, void *get_preference_cls, | 392 | GAS_get_preferences get_preference, void *get_preference_cls, |
391 | GAS_get_properties get_properties, void *get_properties_cls); | 393 | GAS_get_properties get_properties, void *get_properties_cls); |
392 | 394 | ||
395 | |||
393 | /** | 396 | /** |
394 | * Add a single address within a network to the solver | 397 | * Add a single address within a network to the solver |
395 | * | 398 | * |
@@ -401,6 +404,7 @@ void | |||
401 | GAS_mlp_address_add (void *solver, struct ATS_Address *address, | 404 | GAS_mlp_address_add (void *solver, struct ATS_Address *address, |
402 | uint32_t network); | 405 | uint32_t network); |
403 | 406 | ||
407 | |||
404 | /** | 408 | /** |
405 | * Transport properties for this address have changed | 409 | * Transport properties for this address have changed |
406 | * | 410 | * |
@@ -414,6 +418,7 @@ void | |||
414 | GAS_mlp_address_property_changed (void *solver, struct ATS_Address *address, | 418 | GAS_mlp_address_property_changed (void *solver, struct ATS_Address *address, |
415 | uint32_t type, uint32_t abs_value, double rel_value); | 419 | uint32_t type, uint32_t abs_value, double rel_value); |
416 | 420 | ||
421 | |||
417 | /** | 422 | /** |
418 | * Transport session for this address has changed | 423 | * Transport session for this address has changed |
419 | * | 424 | * |
@@ -426,7 +431,8 @@ GAS_mlp_address_property_changed (void *solver, struct ATS_Address *address, | |||
426 | */ | 431 | */ |
427 | void | 432 | void |
428 | GAS_mlp_address_session_changed (void *solver, struct ATS_Address *address, | 433 | GAS_mlp_address_session_changed (void *solver, struct ATS_Address *address, |
429 | uint32_t cur_session, uint32_t new_session); | 434 | uint32_t cur_session, uint32_t new_session); |
435 | |||
430 | 436 | ||
431 | /** | 437 | /** |
432 | * Usage for this address has changed | 438 | * Usage for this address has changed |