diff options
author | Christian Grothoff <christian@grothoff.org> | 2014-06-16 10:10:59 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2014-06-16 10:10:59 +0000 |
commit | 1eef01cd60f92a3d77061d655c0217bd6f9ffce4 (patch) | |
tree | db83ba950eb0ece1efb9b682e379ccd1d0dd4b72 /src/include/gnunet_ats_service.h | |
parent | c1d89ed3cf92fa2492a5639e725aadd74742f135 (diff) | |
download | gnunet-1eef01cd60f92a3d77061d655c0217bd6f9ffce4.tar.gz gnunet-1eef01cd60f92a3d77061d655c0217bd6f9ffce4.zip |
notify performance monitors about destroyed addresses (for #3406)
Diffstat (limited to 'src/include/gnunet_ats_service.h')
-rw-r--r-- | src/include/gnunet_ats_service.h | 38 |
1 files changed, 22 insertions, 16 deletions
diff --git a/src/include/gnunet_ats_service.h b/src/include/gnunet_ats_service.h index 18c338c2c..c19fa40b6 100644 --- a/src/include/gnunet_ats_service.h +++ b/src/include/gnunet_ats_service.h | |||
@@ -759,8 +759,10 @@ struct GNUNET_ATS_PerformanceHandle; | |||
759 | * | 759 | * |
760 | * @param cls closure | 760 | * @param cls closure |
761 | * @param address the address, NULL if ATS service was disconnected | 761 | * @param address the address, NULL if ATS service was disconnected |
762 | * @param address_active is this address actively used to maintain a connection | 762 | * @param address_active #GNUNET_YES if this address is actively used |
763 | to a peer | 763 | * to maintain a connection to a peer; |
764 | * #GNUNET_NO if the address is not actively used; | ||
765 | * #GNUNET_SYSERR if this address is no longer available for ATS | ||
764 | * @param bandwidth_out assigned outbound bandwidth for the connection | 766 | * @param bandwidth_out assigned outbound bandwidth for the connection |
765 | * @param bandwidth_in assigned inbound bandwidth for the connection | 767 | * @param bandwidth_in assigned inbound bandwidth for the connection |
766 | * @param ats performance data for the address (as far as known) | 768 | * @param ats performance data for the address (as far as known) |
@@ -768,12 +770,13 @@ struct GNUNET_ATS_PerformanceHandle; | |||
768 | */ | 770 | */ |
769 | typedef void | 771 | typedef void |
770 | (*GNUNET_ATS_AddressInformationCallback) (void *cls, | 772 | (*GNUNET_ATS_AddressInformationCallback) (void *cls, |
771 | const struct GNUNET_HELLO_Address *address, | 773 | const struct GNUNET_HELLO_Address *address, |
772 | int address_active, | 774 | int address_active, |
773 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out, | 775 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out, |
774 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in, | 776 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in, |
775 | const struct GNUNET_ATS_Information *ats, | 777 | const struct GNUNET_ATS_Information *ats, |
776 | uint32_t ats_count); | 778 | uint32_t ats_count); |
779 | |||
777 | 780 | ||
778 | /** | 781 | /** |
779 | * Handle for an address listing operation | 782 | * Handle for an address listing operation |
@@ -792,10 +795,11 @@ struct GNUNET_ATS_AddressListHandle; | |||
792 | */ | 795 | */ |
793 | struct GNUNET_ATS_PerformanceHandle * | 796 | struct GNUNET_ATS_PerformanceHandle * |
794 | GNUNET_ATS_performance_init (const struct GNUNET_CONFIGURATION_Handle *cfg, | 797 | GNUNET_ATS_performance_init (const struct GNUNET_CONFIGURATION_Handle *cfg, |
795 | GNUNET_ATS_AddressInformationCallback addr_info_cb, | 798 | GNUNET_ATS_AddressInformationCallback addr_info_cb, |
796 | void *addr_info_cb_cls); | 799 | void *addr_info_cb_cls); |
797 | 800 | ||
798 | 801 | ||
802 | |||
799 | /** | 803 | /** |
800 | * Get information about addresses known to the ATS subsystem. | 804 | * Get information about addresses known to the ATS subsystem. |
801 | * | 805 | * |
@@ -805,14 +809,15 @@ GNUNET_ATS_performance_init (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
805 | * get only address currently used | 809 | * get only address currently used |
806 | * @param infocb callback to call with the addresses, | 810 | * @param infocb callback to call with the addresses, |
807 | * will callback with address == NULL when done | 811 | * will callback with address == NULL when done |
808 | * @param infocb_cls closure for infocb | 812 | * @param infocb_cls closure for @a infocb |
809 | * @return ats performance context | 813 | * @return ats performance context |
810 | */ | 814 | */ |
811 | struct GNUNET_ATS_AddressListHandle * | 815 | struct GNUNET_ATS_AddressListHandle * |
812 | GNUNET_ATS_performance_list_addresses ( | 816 | GNUNET_ATS_performance_list_addresses (struct GNUNET_ATS_PerformanceHandle *handle, |
813 | struct GNUNET_ATS_PerformanceHandle *handle, | 817 | const struct GNUNET_PeerIdentity *peer, |
814 | const struct GNUNET_PeerIdentity *peer, int all, | 818 | int all, |
815 | GNUNET_ATS_AddressInformationCallback infocb, void *infocb_cls); | 819 | GNUNET_ATS_AddressInformationCallback infocb, |
820 | void *infocb_cls); | ||
816 | 821 | ||
817 | 822 | ||
818 | /** | 823 | /** |
@@ -845,8 +850,9 @@ GNUNET_ATS_performance_done (struct GNUNET_ATS_PerformanceHandle *ph); | |||
845 | */ | 850 | */ |
846 | typedef void | 851 | typedef void |
847 | (*GNUNET_ATS_ReservationCallback) (void *cls, | 852 | (*GNUNET_ATS_ReservationCallback) (void *cls, |
848 | const struct GNUNET_PeerIdentity * peer, int32_t amount, | 853 | const struct GNUNET_PeerIdentity * peer, |
849 | struct GNUNET_TIME_Relative res_delay); | 854 | int32_t amount, |
855 | struct GNUNET_TIME_Relative res_delay); | ||
850 | 856 | ||
851 | 857 | ||
852 | /** | 858 | /** |