diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-12-23 17:10:38 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-12-23 17:10:38 +0000 |
commit | 2cdcd2373d34ffa015fe0cdfd11d722c37520d97 (patch) | |
tree | 6de976024ba8338a54b76110290c0d1ca772d1d8 /src/include/gnunet_ats_service.h | |
parent | 69f9662283ade69910b500e00f491a47c1b4eb8c (diff) | |
download | gnunet-2cdcd2373d34ffa015fe0cdfd11d722c37520d97.tar.gz gnunet-2cdcd2373d34ffa015fe0cdfd11d722c37520d97.zip |
-more logging and doxygen fixes
Diffstat (limited to 'src/include/gnunet_ats_service.h')
-rw-r--r-- | src/include/gnunet_ats_service.h | 60 |
1 files changed, 39 insertions, 21 deletions
diff --git a/src/include/gnunet_ats_service.h b/src/include/gnunet_ats_service.h index 2b654b053..329d81161 100644 --- a/src/include/gnunet_ats_service.h +++ b/src/include/gnunet_ats_service.h | |||
@@ -531,7 +531,6 @@ struct GNUNET_ATS_SchedulingHandle; | |||
531 | 531 | ||
532 | /** | 532 | /** |
533 | * Handle for address suggestion requests | 533 | * Handle for address suggestion requests |
534 | * | ||
535 | */ | 534 | */ |
536 | struct GNUNET_ATS_SuggestHandle; | 535 | struct GNUNET_ATS_SuggestHandle; |
537 | 536 | ||
@@ -550,14 +549,14 @@ struct Session; | |||
550 | * @param bandwidth_out assigned outbound bandwidth for the connection | 549 | * @param bandwidth_out assigned outbound bandwidth for the connection |
551 | * @param bandwidth_in assigned inbound bandwidth for the connection | 550 | * @param bandwidth_in assigned inbound bandwidth for the connection |
552 | * @param ats performance data for the address (as far as known) | 551 | * @param ats performance data for the address (as far as known) |
553 | * @param ats_count number of performance records in 'ats' | 552 | * @param ats_count number of performance records in @a ats |
554 | */ | 553 | */ |
555 | typedef void | 554 | typedef void |
556 | (*GNUNET_ATS_AddressSuggestionCallback) (void *cls, | 555 | (*GNUNET_ATS_AddressSuggestionCallback) (void *cls, |
557 | const struct GNUNET_HELLO_Address * address, struct Session * session, | 556 | const struct GNUNET_HELLO_Address *address, struct Session *session, |
558 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out, | 557 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out, |
559 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in, | 558 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in, |
560 | const struct GNUNET_ATS_Information * ats, uint32_t ats_count); | 559 | const struct GNUNET_ATS_Information *ats, uint32_t ats_count); |
561 | 560 | ||
562 | /** | 561 | /** |
563 | * Initialize the ATS subsystem. | 562 | * Initialize the ATS subsystem. |
@@ -588,7 +587,8 @@ GNUNET_ATS_scheduling_done (struct GNUNET_ATS_SchedulingHandle *sh); | |||
588 | */ | 587 | */ |
589 | void | 588 | void |
590 | GNUNET_ATS_reset_backoff (struct GNUNET_ATS_SchedulingHandle *sh, | 589 | GNUNET_ATS_reset_backoff (struct GNUNET_ATS_SchedulingHandle *sh, |
591 | const struct GNUNET_PeerIdentity *peer); | 590 | const struct GNUNET_PeerIdentity *peer); |
591 | |||
592 | 592 | ||
593 | /** | 593 | /** |
594 | * We would like to establish a new connection with a peer. ATS | 594 | * We would like to establish a new connection with a peer. ATS |
@@ -600,7 +600,8 @@ GNUNET_ATS_reset_backoff (struct GNUNET_ATS_SchedulingHandle *sh, | |||
600 | */ | 600 | */ |
601 | struct GNUNET_ATS_SuggestHandle * | 601 | struct GNUNET_ATS_SuggestHandle * |
602 | GNUNET_ATS_suggest_address (struct GNUNET_ATS_SchedulingHandle *sh, | 602 | GNUNET_ATS_suggest_address (struct GNUNET_ATS_SchedulingHandle *sh, |
603 | const struct GNUNET_PeerIdentity *peer); | 603 | const struct GNUNET_PeerIdentity *peer); |
604 | |||
604 | 605 | ||
605 | /** | 606 | /** |
606 | * We want to cancel ATS suggesting addresses for a peer. | 607 | * We want to cancel ATS suggesting addresses for a peer. |
@@ -610,7 +611,8 @@ GNUNET_ATS_suggest_address (struct GNUNET_ATS_SchedulingHandle *sh, | |||
610 | */ | 611 | */ |
611 | void | 612 | void |
612 | GNUNET_ATS_suggest_address_cancel (struct GNUNET_ATS_SchedulingHandle *sh, | 613 | GNUNET_ATS_suggest_address_cancel (struct GNUNET_ATS_SchedulingHandle *sh, |
613 | const struct GNUNET_PeerIdentity *peer); | 614 | const struct GNUNET_PeerIdentity *peer); |
615 | |||
614 | 616 | ||
615 | /** | 617 | /** |
616 | * Convert a ATS property to a string | 618 | * Convert a ATS property to a string |
@@ -621,6 +623,7 @@ GNUNET_ATS_suggest_address_cancel (struct GNUNET_ATS_SchedulingHandle *sh, | |||
621 | const char * | 623 | const char * |
622 | GNUNET_ATS_print_property_type (uint32_t type); | 624 | GNUNET_ATS_print_property_type (uint32_t type); |
623 | 625 | ||
626 | |||
624 | /** | 627 | /** |
625 | * Convert a GNUNET_ATS_NetworkType to a string | 628 | * Convert a GNUNET_ATS_NetworkType to a string |
626 | * | 629 | * |
@@ -630,6 +633,7 @@ GNUNET_ATS_print_property_type (uint32_t type); | |||
630 | const char * | 633 | const char * |
631 | GNUNET_ATS_print_network_type (uint32_t net); | 634 | GNUNET_ATS_print_network_type (uint32_t net); |
632 | 635 | ||
636 | |||
633 | /** | 637 | /** |
634 | * Returns where the address is located: LAN or WAN or ... | 638 | * Returns where the address is located: LAN or WAN or ... |
635 | * @param sh the GNUNET_ATS_SchedulingHandle handle | 639 | * @param sh the GNUNET_ATS_SchedulingHandle handle |
@@ -639,7 +643,9 @@ GNUNET_ATS_print_network_type (uint32_t net); | |||
639 | */ | 643 | */ |
640 | struct GNUNET_ATS_Information | 644 | struct GNUNET_ATS_Information |
641 | GNUNET_ATS_address_get_type (struct GNUNET_ATS_SchedulingHandle *sh, | 645 | GNUNET_ATS_address_get_type (struct GNUNET_ATS_SchedulingHandle *sh, |
642 | const struct sockaddr * addr, socklen_t addrlen); | 646 | const struct sockaddr * addr, |
647 | socklen_t addrlen); | ||
648 | |||
643 | 649 | ||
644 | /** | 650 | /** |
645 | * Test if a address and a session is known to ATS | 651 | * Test if a address and a session is known to ATS |
@@ -647,11 +653,13 @@ GNUNET_ATS_address_get_type (struct GNUNET_ATS_SchedulingHandle *sh, | |||
647 | * @param sh the scheduling handle | 653 | * @param sh the scheduling handle |
648 | * @param address the address | 654 | * @param address the address |
649 | * @param session the session | 655 | * @param session the session |
650 | * @return GNUNET_YES or GNUNET_NO | 656 | * @return #GNUNET_YES or #GNUNET_NO |
651 | */ | 657 | */ |
652 | int | 658 | int |
653 | GNUNET_ATS_session_known (struct GNUNET_ATS_SchedulingHandle *sh, | 659 | GNUNET_ATS_session_known (struct GNUNET_ATS_SchedulingHandle *sh, |
654 | const struct GNUNET_HELLO_Address *address, struct Session *session); | 660 | const struct GNUNET_HELLO_Address *address, |
661 | struct Session *session); | ||
662 | |||
655 | 663 | ||
656 | /** | 664 | /** |
657 | * We have a new address ATS should know. Addresses have to be added with this | 665 | * We have a new address ATS should know. Addresses have to be added with this |
@@ -661,12 +669,15 @@ GNUNET_ATS_session_known (struct GNUNET_ATS_SchedulingHandle *sh, | |||
661 | * @param address the address | 669 | * @param address the address |
662 | * @param session session handle (if available) | 670 | * @param session session handle (if available) |
663 | * @param ats performance data for the address | 671 | * @param ats performance data for the address |
664 | * @param ats_count number of performance records in 'ats' | 672 | * @param ats_count number of performance records in @a ats |
665 | */ | 673 | */ |
666 | int | 674 | int |
667 | GNUNET_ATS_address_add (struct GNUNET_ATS_SchedulingHandle *sh, | 675 | GNUNET_ATS_address_add (struct GNUNET_ATS_SchedulingHandle *sh, |
668 | const struct GNUNET_HELLO_Address *address, struct Session *session, | 676 | const struct GNUNET_HELLO_Address *address, |
669 | const struct GNUNET_ATS_Information *ats, uint32_t ats_count); | 677 | struct Session *session, |
678 | const struct GNUNET_ATS_Information *ats, | ||
679 | uint32_t ats_count); | ||
680 | |||
670 | 681 | ||
671 | /** | 682 | /** |
672 | * We have updated performance statistics for a given address. Note | 683 | * We have updated performance statistics for a given address. Note |
@@ -680,13 +691,16 @@ GNUNET_ATS_address_add (struct GNUNET_ATS_SchedulingHandle *sh, | |||
680 | * @param address updated address | 691 | * @param address updated address |
681 | * @param session session handle (if available) | 692 | * @param session session handle (if available) |
682 | * @param ats performance data for the address | 693 | * @param ats performance data for the address |
683 | * @param ats_count number of performance records in 'ats' | 694 | * @param ats_count number of performance records in @a ats |
684 | * @return GNUNET_OK or GNUNET_SYSERR | 695 | * @return #GNUNET_OK or #GNUNET_SYSERR |
685 | */ | 696 | */ |
686 | int | 697 | int |
687 | GNUNET_ATS_address_update (struct GNUNET_ATS_SchedulingHandle *sh, | 698 | GNUNET_ATS_address_update (struct GNUNET_ATS_SchedulingHandle *sh, |
688 | const struct GNUNET_HELLO_Address *address, struct Session *session, | 699 | const struct GNUNET_HELLO_Address *address, |
689 | const struct GNUNET_ATS_Information *ats, uint32_t ats_count); | 700 | struct Session *session, |
701 | const struct GNUNET_ATS_Information *ats, | ||
702 | uint32_t ats_count); | ||
703 | |||
690 | 704 | ||
691 | /** | 705 | /** |
692 | * An address is now in use or not used any more. | 706 | * An address is now in use or not used any more. |
@@ -694,13 +708,15 @@ GNUNET_ATS_address_update (struct GNUNET_ATS_SchedulingHandle *sh, | |||
694 | * @param sh handle | 708 | * @param sh handle |
695 | * @param address the address | 709 | * @param address the address |
696 | * @param session session handle | 710 | * @param session session handle |
697 | * @param in_use GNUNET_YES if this address is now used, GNUNET_NO | 711 | * @param in_use #GNUNET_YES if this address is now used, #GNUNET_NO |
698 | * if address is not used any more | 712 | * if address is not used any more |
699 | */ | 713 | */ |
700 | void | 714 | void |
701 | GNUNET_ATS_address_in_use (struct GNUNET_ATS_SchedulingHandle *sh, | 715 | GNUNET_ATS_address_in_use (struct GNUNET_ATS_SchedulingHandle *sh, |
702 | const struct GNUNET_HELLO_Address *address, struct Session *session, | 716 | const struct GNUNET_HELLO_Address *address, |
703 | int in_use); | 717 | struct Session *session, |
718 | int in_use); | ||
719 | |||
704 | 720 | ||
705 | /** | 721 | /** |
706 | * A session got destroyed, stop including it as a valid address. | 722 | * A session got destroyed, stop including it as a valid address. |
@@ -711,7 +727,9 @@ GNUNET_ATS_address_in_use (struct GNUNET_ATS_SchedulingHandle *sh, | |||
711 | */ | 727 | */ |
712 | void | 728 | void |
713 | GNUNET_ATS_address_destroyed (struct GNUNET_ATS_SchedulingHandle *sh, | 729 | GNUNET_ATS_address_destroyed (struct GNUNET_ATS_SchedulingHandle *sh, |
714 | const struct GNUNET_HELLO_Address *address, struct Session *session); | 730 | const struct GNUNET_HELLO_Address *address, |
731 | struct Session *session); | ||
732 | |||
715 | 733 | ||
716 | /* ******************************** Performance API ***************************** */ | 734 | /* ******************************** Performance API ***************************** */ |
717 | 735 | ||