diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2014-01-09 14:09:29 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2014-01-09 14:09:29 +0000 |
commit | 9f0dcc2fb248ea2507832ab999739359ee1dbf60 (patch) | |
tree | a9d05435fd949a479862fb6a898dc2a57f2a6da5 /src/include/gnunet_ats_service.h | |
parent | 2de6e2211c31d2911c7d1dc6d445a41fd9ae3429 (diff) | |
download | gnunet-9f0dcc2fb248ea2507832ab999739359ee1dbf60.tar.gz gnunet-9f0dcc2fb248ea2507832ab999739359ee1dbf60.zip |
extending ATS api suggest callback with peer id
adding suggest continuation
Diffstat (limited to 'src/include/gnunet_ats_service.h')
-rw-r--r-- | src/include/gnunet_ats_service.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/include/gnunet_ats_service.h b/src/include/gnunet_ats_service.h index 329d81161..932446400 100644 --- a/src/include/gnunet_ats_service.h +++ b/src/include/gnunet_ats_service.h | |||
@@ -543,6 +543,11 @@ struct Session; | |||
543 | * Signature of a function called by ATS with the current bandwidth | 543 | * Signature of a function called by ATS with the current bandwidth |
544 | * and address preferences as determined by ATS. | 544 | * and address preferences as determined by ATS. |
545 | * | 545 | * |
546 | * If an address is available immediately the address will be included. If no | ||
547 | * address can be suggested, address, session, bandwidth and ATS information will | ||
548 | * be NULL/0. ATS will suggest an address as soon as it can provide such an | ||
549 | * address | ||
550 | * | ||
546 | * @param cls closure | 551 | * @param cls closure |
547 | * @param address suggested address (including peer identity of the peer) | 552 | * @param address suggested address (including peer identity of the peer) |
548 | * @param session session to use | 553 | * @param session session to use |
@@ -553,11 +558,13 @@ struct Session; | |||
553 | */ | 558 | */ |
554 | typedef void | 559 | typedef void |
555 | (*GNUNET_ATS_AddressSuggestionCallback) (void *cls, | 560 | (*GNUNET_ATS_AddressSuggestionCallback) (void *cls, |
561 | const struct GNUNET_PeerIdentity *peer, | ||
556 | const struct GNUNET_HELLO_Address *address, struct Session *session, | 562 | const struct GNUNET_HELLO_Address *address, struct Session *session, |
557 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out, | 563 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out, |
558 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in, | 564 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in, |
559 | const struct GNUNET_ATS_Information *ats, uint32_t ats_count); | 565 | const struct GNUNET_ATS_Information *ats, uint32_t ats_count); |
560 | 566 | ||
567 | |||
561 | /** | 568 | /** |
562 | * Initialize the ATS subsystem. | 569 | * Initialize the ATS subsystem. |
563 | * | 570 | * |
@@ -596,11 +603,15 @@ GNUNET_ATS_reset_backoff (struct GNUNET_ATS_SchedulingHandle *sh, | |||
596 | * | 603 | * |
597 | * @param sh handle | 604 | * @param sh handle |
598 | * @param peer identity of the peer we need an address for | 605 | * @param peer identity of the peer we need an address for |
606 | * @param cont the continuation to indicate success to call with the address | ||
607 | * @param cont_cls the cls for the continuation | ||
599 | * @return suggestion handle | 608 | * @return suggestion handle |
600 | */ | 609 | */ |
601 | struct GNUNET_ATS_SuggestHandle * | 610 | struct GNUNET_ATS_SuggestHandle * |
602 | GNUNET_ATS_suggest_address (struct GNUNET_ATS_SchedulingHandle *sh, | 611 | GNUNET_ATS_suggest_address (struct GNUNET_ATS_SchedulingHandle *sh, |
603 | const struct GNUNET_PeerIdentity *peer); | 612 | const struct GNUNET_PeerIdentity *peer, |
613 | GNUNET_ATS_AddressSuggestionCallback cont, | ||
614 | void *cont_cls); | ||
604 | 615 | ||
605 | 616 | ||
606 | /** | 617 | /** |