aboutsummaryrefslogtreecommitdiff
path: root/src/ats/gnunet-service-ats_addresses.h
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2013-07-03 13:40:31 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2013-07-03 13:40:31 +0000
commit8042ec745551791cdd06aa6f7aec4a766fe0ded3 (patch)
treeca113611a8ca17e9fede53f6eaff4d7814591a68 /src/ats/gnunet-service-ats_addresses.h
parentbfa3b153493bc4d15f0be2d3dfa0b77e45065a61 (diff)
downloadgnunet-8042ec745551791cdd06aa6f7aec4a766fe0ded3.tar.gz
gnunet-8042ec745551791cdd06aa6f7aec4a766fe0ded3.zip
changing solver api: remove address hashmap from functions and pass instead with init
Diffstat (limited to 'src/ats/gnunet-service-ats_addresses.h')
-rw-r--r--src/ats/gnunet-service-ats_addresses.h22
1 files changed, 13 insertions, 9 deletions
diff --git a/src/ats/gnunet-service-ats_addresses.h b/src/ats/gnunet-service-ats_addresses.h
index 4eed02fe3..a01f67d13 100644
--- a/src/ats/gnunet-service-ats_addresses.h
+++ b/src/ats/gnunet-service-ats_addresses.h
@@ -365,6 +365,11 @@ typedef const double *
365 (*GAS_get_preferences) (void *cls, const struct GNUNET_PeerIdentity *id); 365 (*GAS_get_preferences) (void *cls, const struct GNUNET_PeerIdentity *id);
366 366
367 367
368typedef const double *
369 (*GAS_get_properties) (void *cls, const struct ATS_Address *address);
370
371
372
368/* 373/*
369 * Solver API 374 * Solver API
370 * ---------- 375 * ----------
@@ -372,6 +377,7 @@ typedef const double *
372 377
373/** 378/**
374 * Init the simplistic problem solving component 379 * Init the simplistic problem solving component
380 *==32673== by 0x40571F: GAS_addresses_request_address (gnunet-service-ats_addresses.c:1261)
375 * 381 *
376 * Quotas: 382 * Quotas:
377 * network[i] contains the network type as type GNUNET_ATS_NetworkType[i] 383 * network[i] contains the network type as type GNUNET_ATS_NetworkType[i]
@@ -386,6 +392,7 @@ typedef const double *
386 * 392 *
387 * @param cfg configuration handle 393 * @param cfg configuration handle
388 * @param stats the GNUNET_STATISTICS handle 394 * @param stats the GNUNET_STATISTICS handle
395 * @param addresses hashmap containing all addresses
389 * @param network array of GNUNET_ATS_NetworkType with length dest_length 396 * @param network array of GNUNET_ATS_NetworkType with length dest_length
390 * @param out_quota array of outbound quotas 397 * @param out_quota array of outbound quotas
391 * @param in_quota array of outbound quota 398 * @param in_quota array of outbound quota
@@ -395,6 +402,7 @@ typedef const double *
395typedef void * 402typedef void *
396 (*GAS_solver_init) (const struct GNUNET_CONFIGURATION_Handle *cfg, 403 (*GAS_solver_init) (const struct GNUNET_CONFIGURATION_Handle *cfg,
397 const struct GNUNET_STATISTICS_Handle *stats, 404 const struct GNUNET_STATISTICS_Handle *stats,
405 const struct GNUNET_CONTAINER_MultiHashMap *addresses,
398 int *network, 406 int *network,
399 unsigned long long *out_quota, 407 unsigned long long *out_quota,
400 unsigned long long *in_quota, 408 unsigned long long *in_quota,
@@ -402,7 +410,9 @@ typedef void *
402 GAS_bandwidth_changed_cb bw_changed_cb, 410 GAS_bandwidth_changed_cb bw_changed_cb,
403 void *bw_changed_cb_cls, 411 void *bw_changed_cb_cls,
404 GAS_get_preferences get_preference, 412 GAS_get_preferences get_preference,
405 void *get_preference_cls); 413 void *get_preference_cls,
414 GAS_get_properties get_properties,
415 void *get_properties_cls);
406 416
407 417
408/** 418/**
@@ -417,7 +427,6 @@ typedef void *
417 */ 427 */
418typedef void 428typedef void
419(*GAS_solver_address_change_preference) (void *solver, 429(*GAS_solver_address_change_preference) (void *solver,
420 struct GNUNET_CONTAINER_MultiHashMap *addresses,
421 const struct GNUNET_PeerIdentity *peer, 430 const struct GNUNET_PeerIdentity *peer,
422 enum GNUNET_ATS_PreferenceKind kind, 431 enum GNUNET_ATS_PreferenceKind kind,
423 double pref_rel); 432 double pref_rel);
@@ -438,9 +447,8 @@ typedef void
438 */ 447 */
439typedef void 448typedef void
440(*GAS_solver_address_add) (void *solver, 449(*GAS_solver_address_add) (void *solver,
441 struct GNUNET_CONTAINER_MultiHashMap *addresses, 450 struct ATS_Address *address,
442 struct ATS_Address *address, 451 uint32_t network);
443 uint32_t network);
444 452
445 453
446/** 454/**
@@ -453,7 +461,6 @@ typedef void
453 */ 461 */
454typedef void 462typedef void
455 (*GAS_solver_address_delete) (void *solver, 463 (*GAS_solver_address_delete) (void *solver,
456 struct GNUNET_CONTAINER_MultiHashMap *addresses,
457 struct ATS_Address *address, 464 struct ATS_Address *address,
458 int session_only); 465 int session_only);
459 466
@@ -471,7 +478,6 @@ typedef void
471 */ 478 */
472typedef void 479typedef void
473(*GAS_solver_address_update) (void *solver, 480(*GAS_solver_address_update) (void *solver,
474 struct GNUNET_CONTAINER_MultiHashMap *addresses,
475 struct ATS_Address *address, 481 struct ATS_Address *address,
476 uint32_t prev_session, 482 uint32_t prev_session,
477 int in_use, 483 int in_use,
@@ -488,7 +494,6 @@ typedef void
488 */ 494 */
489typedef const struct ATS_Address * 495typedef const struct ATS_Address *
490(*GAS_solver_get_preferred_address) (void *solver, 496(*GAS_solver_get_preferred_address) (void *solver,
491 struct GNUNET_CONTAINER_MultiHashMap *addresses,
492 const struct GNUNET_PeerIdentity *peer); 497 const struct GNUNET_PeerIdentity *peer);
493 498
494 499
@@ -501,7 +506,6 @@ typedef const struct ATS_Address *
501 */ 506 */
502typedef void 507typedef void
503(*GAS_solver_stop_get_preferred_address) (void *solver, 508(*GAS_solver_stop_get_preferred_address) (void *solver,
504 struct GNUNET_CONTAINER_MultiHashMap *addresses,
505 const struct GNUNET_PeerIdentity *peer); 509 const struct GNUNET_PeerIdentity *peer);
506 510
507/** 511/**