diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2013-03-25 16:06:07 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2013-03-25 16:06:07 +0000 |
commit | 4596a20eb4c61cf84e3a88a881597ba05114d482 (patch) | |
tree | 4659b0eac3f0d4ee862516e59372c0c568b98ffd /src/include | |
parent | cc67bae38c54cbaf2122ee3aa0762e7f2cb04edf (diff) | |
download | gnunet-4596a20eb4c61cf84e3a88a881597ba05114d482.tar.gz gnunet-4596a20eb4c61cf84e3a88a881597ba05114d482.zip |
ats api change
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/gnunet_ats_service.h | 42 | ||||
-rw-r--r-- | src/include/gnunet_protocols.h | 7 |
2 files changed, 23 insertions, 26 deletions
diff --git a/src/include/gnunet_ats_service.h b/src/include/gnunet_ats_service.h index 1e5643794..6f6f9ee9e 100644 --- a/src/include/gnunet_ats_service.h +++ b/src/include/gnunet_ats_service.h | |||
@@ -707,9 +707,11 @@ struct GNUNET_ATS_PerformanceHandle; | |||
707 | */ | 707 | */ |
708 | typedef void | 708 | typedef void |
709 | (*GNUNET_ATS_PerformanceMonitorCb) (void *cls, | 709 | (*GNUNET_ATS_PerformanceMonitorCb) (void *cls, |
710 | struct GNUNET_PeerIdentity *peer, | 710 | const struct GNUNET_PeerIdentity *peer, |
711 | struct GNUNET_ATS_Information *ats, | 711 | const struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out, |
712 | uint32_t ats_count); | 712 | const struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in, |
713 | const struct GNUNET_ATS_Information *ats, | ||
714 | uint32_t ats_count); | ||
713 | 715 | ||
714 | 716 | ||
715 | /** | 717 | /** |
@@ -717,24 +719,20 @@ typedef void | |||
717 | * | 719 | * |
718 | * @param cls closure | 720 | * @param cls closure |
719 | * @param address the address | 721 | * @param address the address |
722 | * @param address_active is this address actively used to maintain a connection | ||
723 | * to a peer | ||
720 | * @param bandwidth_out assigned outbound bandwidth for the connection | 724 | * @param bandwidth_out assigned outbound bandwidth for the connection |
721 | * @param bandwidth_in assigned inbound bandwidth for the connection | 725 | * @param bandwidth_in assigned inbound bandwidth for the connection |
722 | * @param ats performance data for the address (as far as known) | 726 | * @param ats performance data for the address (as far as known) |
723 | * @param ats_count number of performance records in 'ats' | 727 | * @param ats_count number of performance records in 'ats' |
724 | */ | 728 | */ |
725 | typedef void (*GNUNET_ATS_AddressInformationCallback) (void *cls, | 729 | typedef void (*GNUNET_ATS_AddressInformationCallback) (void *cls, |
726 | const struct | 730 | const struct GNUNET_HELLO_Address *address, |
727 | GNUNET_HELLO_Address * | 731 | unsigned int address_active, |
728 | address, | 732 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out, |
729 | struct | 733 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in, |
730 | GNUNET_BANDWIDTH_Value32NBO | 734 | const struct GNUNET_ATS_Information *ats, |
731 | bandwidth_out, | 735 | uint32_t ats_count); |
732 | struct | ||
733 | GNUNET_BANDWIDTH_Value32NBO | ||
734 | bandwidth_in, | ||
735 | const struct | ||
736 | GNUNET_ATS_Information * | ||
737 | ats, uint32_t ats_count); | ||
738 | 736 | ||
739 | /** | 737 | /** |
740 | * Handle for an address listing operation | 738 | * Handle for an address listing operation |
@@ -746,14 +744,20 @@ struct GNUNET_ATS_AddressListHandle; | |||
746 | * Get handle to access performance API of the ATS subsystem. | 744 | * Get handle to access performance API of the ATS subsystem. |
747 | * | 745 | * |
748 | * @param cfg configuration to use | 746 | * @param cfg configuration to use |
749 | * @param infocb function to call on performance changes, can be NULL | 747 | * @param perf_monitor_cb callback called when performance characteristics for |
750 | * @param infocb_cls closure for infocb | 748 | * a peer change |
749 | * @param perf_monitor_cb closure for the perf_monitor_cb | ||
750 | * @param addr_info_cb callback called when performance characteristics for | ||
751 | * an address change | ||
752 | * @param addr_info_cb_cls closure for infocb | ||
751 | * @return ats performance context | 753 | * @return ats performance context |
752 | */ | 754 | */ |
753 | struct GNUNET_ATS_PerformanceHandle * | 755 | struct GNUNET_ATS_PerformanceHandle * |
754 | GNUNET_ATS_performance_init (const struct GNUNET_CONFIGURATION_Handle *cfg, | 756 | GNUNET_ATS_performance_init (const struct GNUNET_CONFIGURATION_Handle *cfg, |
755 | GNUNET_ATS_AddressInformationCallback infocb, | 757 | GNUNET_ATS_PerformanceMonitorCb perf_monitor_cb, |
756 | void *infocb_cls); | 758 | void *perf_monitor_cb_cls, |
759 | GNUNET_ATS_AddressInformationCallback addr_info_cb, | ||
760 | void *addr_info_cb_cls); | ||
757 | 761 | ||
758 | 762 | ||
759 | /** | 763 | /** |
diff --git a/src/include/gnunet_protocols.h b/src/include/gnunet_protocols.h index 21dfdfdf8..7f8d02be9 100644 --- a/src/include/gnunet_protocols.h +++ b/src/include/gnunet_protocols.h | |||
@@ -1149,13 +1149,6 @@ extern "C" | |||
1149 | */ | 1149 | */ |
1150 | #define GNUNET_MESSAGE_TYPE_ATS_ADDRESSLIST_RESPONSE 355 | 1150 | #define GNUNET_MESSAGE_TYPE_ATS_ADDRESSLIST_RESPONSE 355 |
1151 | 1151 | ||
1152 | /** | ||
1153 | * Type of the 'struct AddressListRequestMessage' sent by client to ATS | ||
1154 | * to request information about addresses | ||
1155 | */ | ||
1156 | #define GNUNET_MESSAGE_TYPE_ATS_MONITOR 356 | ||
1157 | |||
1158 | #define GNUNET_MESSAGE_TYPE_ATS_MONITOR_RESPONSE 357 | ||
1159 | 1152 | ||
1160 | 1153 | ||
1161 | /******************************************************************************* | 1154 | /******************************************************************************* |