aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2013-04-02 14:48:02 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2013-04-02 14:48:02 +0000
commit690ce06e4dff30f4e337b93d285d9ad090f5b03b (patch)
treef9d6d75368af347624718510156254919ab63671 /src
parent2b0ae8e74d1f6851e7b323cf066e5038b0980544 (diff)
downloadgnunet-690ce06e4dff30f4e337b93d285d9ad090f5b03b.tar.gz
gnunet-690ce06e4dff30f4e337b93d285d9ad090f5b03b.zip
docue
Diffstat (limited to 'src')
-rw-r--r--src/ats/gnunet-service-ats_addresses.h59
1 files changed, 58 insertions, 1 deletions
diff --git a/src/ats/gnunet-service-ats_addresses.h b/src/ats/gnunet-service-ats_addresses.h
index dffd2a824..b2fc7b798 100644
--- a/src/ats/gnunet-service-ats_addresses.h
+++ b/src/ats/gnunet-service-ats_addresses.h
@@ -224,6 +224,10 @@
224 224
225 */ 225 */
226 226
227
228/*
229 * How long will address suggestions blocked after a suggestion
230 */
227#define ATS_BLOCKING_DELTA GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_MILLISECONDS, 100) 231#define ATS_BLOCKING_DELTA GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_MILLISECONDS, 100)
228 232
229struct GAS_Addresses_Handle; 233struct GAS_Addresses_Handle;
@@ -339,6 +343,11 @@ struct ATS_Address
339typedef void 343typedef void
340 (*GAS_bandwidth_changed_cb) (void *cls, struct ATS_Address *address); 344 (*GAS_bandwidth_changed_cb) (void *cls, struct ATS_Address *address);
341 345
346/*
347 * Solver API
348 * ----------
349 */
350
342/** 351/**
343 * Init the simplistic problem solving component 352 * Init the simplistic problem solving component
344 * 353 *
@@ -372,6 +381,15 @@ typedef void *
372 void *bw_changed_cb_cls); 381 void *bw_changed_cb_cls);
373 382
374 383
384/**
385 * Change the preference for a peer
386 *
387 * @param handle the solver handle
388 * @param client the client sending this request
389 * @param peer the peer id
390 * @param kind the preference kind to change
391 * @param score the new preference score
392 */
375typedef void 393typedef void
376(*GAS_solver_address_change_preference) (void *solver, 394(*GAS_solver_address_change_preference) (void *solver,
377 void *client, 395 void *client,
@@ -392,13 +410,32 @@ typedef void
392 struct ATS_Address *address); 410 struct ATS_Address *address);
393 411
394 412
395 413/**
414 * Delete an address or just the session from the solver
415 *
416 * @param solver the solver Handle
417 * @param addresses the address hashmap containing all addresses
418 * @param address the address to delete
419 * @param session_only remove address or just session
420 */
396typedef void 421typedef void
397 (*GAS_solver_address_delete) (void *solver, 422 (*GAS_solver_address_delete) (void *solver,
398 struct GNUNET_CONTAINER_MultiHashMap *addresses, 423 struct GNUNET_CONTAINER_MultiHashMap *addresses,
399 struct ATS_Address *address, 424 struct ATS_Address *address,
400 int session_only); 425 int session_only);
401 426
427/**
428 * Notify the solver about an update for an address
429 *
430 * @param solver the solver to use
431 * @param addresses the address hashmap containing all addresses
432 * @param address the address
433 * @param session the session
434 * @param in_use address used: yes or no
435 * @param atsi ats performance information
436 * @param atsi_count number of ats performance information
437 *
438 */
402typedef void 439typedef void
403(*GAS_solver_address_update) (void *solver, 440(*GAS_solver_address_update) (void *solver,
404 struct GNUNET_CONTAINER_MultiHashMap *addresses, 441 struct GNUNET_CONTAINER_MultiHashMap *addresses,
@@ -409,16 +446,36 @@ typedef void
409 uint32_t atsi_count); 446 uint32_t atsi_count);
410 447
411 448
449/**
450 * Get the prefered address for a peer from solver
451 *
452 * @param solver the solver to use
453 * @param addresses the address hashmap containing all addresses
454 * @param peer the peer
455 */
412typedef const struct ATS_Address * 456typedef const struct ATS_Address *
413(*GAS_solver_get_preferred_address) (void *solver, 457(*GAS_solver_get_preferred_address) (void *solver,
414 struct GNUNET_CONTAINER_MultiHashMap *addresses, 458 struct GNUNET_CONTAINER_MultiHashMap *addresses,
415 const struct GNUNET_PeerIdentity *peer); 459 const struct GNUNET_PeerIdentity *peer);
416 460
461
462/**
463 * Stop getting the prefered address for a peer from solver
464 *
465 * @param solver the solver to use
466 * @param addresses the address hashmap containing all addresses
467 * @param peer the peer
468 */
417typedef void 469typedef void
418(*GAS_solver_stop_get_preferred_address) (void *solver, 470(*GAS_solver_stop_get_preferred_address) (void *solver,
419 struct GNUNET_CONTAINER_MultiHashMap *addresses, 471 struct GNUNET_CONTAINER_MultiHashMap *addresses,
420 const struct GNUNET_PeerIdentity *peer); 472 const struct GNUNET_PeerIdentity *peer);
421 473
474/**
475 * Shutdown solver
476 *
477 * @param solver the solver to shutdown
478 */
422 479
423typedef void 480typedef void
424 (*GAS_solver_done) (void *solver); 481 (*GAS_solver_done) (void *solver);