diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-10-13 11:59:13 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-10-13 11:59:13 +0000 |
commit | 86ad1393cdf6c8b37437c330fce25ebfffbc8ffd (patch) | |
tree | a74f38f8f6379361490ca8b9395d1ee161943b98 /src/ats/ats_api.c | |
parent | 0a5333c2df162d6f6f9bd35ea04d57e6abcc0b6f (diff) | |
download | gnunet-86ad1393cdf6c8b37437c330fce25ebfffbc8ffd.tar.gz gnunet-86ad1393cdf6c8b37437c330fce25ebfffbc8ffd.zip |
new ATS API -- code won't compile
Diffstat (limited to 'src/ats/ats_api.c')
-rw-r--r-- | src/ats/ats_api.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/src/ats/ats_api.c b/src/ats/ats_api.c index ef2fa1bed..29a273e3e 100644 --- a/src/ats/ats_api.c +++ b/src/ats/ats_api.c | |||
@@ -70,7 +70,7 @@ struct GNUNET_ATS_SuggestionContext | |||
70 | /** | 70 | /** |
71 | * Global ATS handle. | 71 | * Global ATS handle. |
72 | */ | 72 | */ |
73 | struct GNUNET_ATS_Handle *atc; | 73 | struct GNUNET_ATS_SchedulingHandle *atc; |
74 | 74 | ||
75 | /** | 75 | /** |
76 | * Which peer are we monitoring? | 76 | * Which peer are we monitoring? |
@@ -108,7 +108,7 @@ struct SetBandwidthContext | |||
108 | /** | 108 | /** |
109 | * ATS handle. | 109 | * ATS handle. |
110 | */ | 110 | */ |
111 | struct GNUNET_ATS_Handle *atc; | 111 | struct GNUNET_ATS_SchedulingHandle *atc; |
112 | 112 | ||
113 | /** | 113 | /** |
114 | * Inbound bandwidth to assign. | 114 | * Inbound bandwidth to assign. |
@@ -184,13 +184,13 @@ set_bw_connections (void *cls, const GNUNET_HashCode * key, void *value) | |||
184 | /** | 184 | /** |
185 | * Task run to update bandwidth assignments. | 185 | * Task run to update bandwidth assignments. |
186 | * | 186 | * |
187 | * @param cls the 'struct GNUNET_ATS_Handle' | 187 | * @param cls the 'struct GNUNET_ATS_SchedulingHandle' |
188 | * @param tc scheduler context | 188 | * @param tc scheduler context |
189 | */ | 189 | */ |
190 | static void | 190 | static void |
191 | update_bandwidth_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 191 | update_bandwidth_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) |
192 | { | 192 | { |
193 | struct GNUNET_ATS_Handle *atc = cls; | 193 | struct GNUNET_ATS_SchedulingHandle *atc = cls; |
194 | unsigned int ac = 0; | 194 | unsigned int ac = 0; |
195 | struct SetBandwidthContext bwc; | 195 | struct SetBandwidthContext bwc; |
196 | 196 | ||
@@ -218,7 +218,7 @@ update_bandwidth_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
218 | * @param change which allocation record changed? | 218 | * @param change which allocation record changed? |
219 | */ | 219 | */ |
220 | static void | 220 | static void |
221 | update_bandwidth_assignment (struct GNUNET_ATS_Handle *atc, | 221 | update_bandwidth_assignment (struct GNUNET_ATS_SchedulingHandle *atc, |
222 | struct AllocationRecord *change) | 222 | struct AllocationRecord *change) |
223 | { | 223 | { |
224 | /* FIXME: based on the 'change', update the LP-problem... */ | 224 | /* FIXME: based on the 'change', update the LP-problem... */ |
@@ -277,7 +277,7 @@ map_it (void *cls, const GNUNET_HashCode * key, void *value) | |||
277 | * @param cb_cls closure for cb | 277 | * @param cb_cls closure for cb |
278 | */ | 278 | */ |
279 | struct GNUNET_ATS_SuggestionContext * | 279 | struct GNUNET_ATS_SuggestionContext * |
280 | GNUNET_ATS_suggest_address (struct GNUNET_ATS_Handle *atc, | 280 | GNUNET_ATS_suggest_address (struct GNUNET_ATS_SchedulingHandle *atc, |
281 | const struct GNUNET_PeerIdentity *peer, | 281 | const struct GNUNET_PeerIdentity *peer, |
282 | GNUNET_ATS_AddressSuggestionCallback cb, | 282 | GNUNET_ATS_AddressSuggestionCallback cb, |
283 | void *cb_cls) | 283 | void *cb_cls) |
@@ -332,17 +332,17 @@ GNUNET_ATS_suggest_address_cancel (struct GNUNET_ATS_SuggestionContext *asc) | |||
332 | * @param alloc_cb_cls closure for 'alloc_cb' | 332 | * @param alloc_cb_cls closure for 'alloc_cb' |
333 | * @return ats context | 333 | * @return ats context |
334 | */ | 334 | */ |
335 | struct GNUNET_ATS_Handle * | 335 | struct GNUNET_ATS_SchedulingHandle * |
336 | GNUNET_ATS_init (const struct GNUNET_CONFIGURATION_Handle *cfg, | 336 | GNUNET_ATS_init (const struct GNUNET_CONFIGURATION_Handle *cfg, |
337 | GNUNET_ATS_AddressSuggestionCallback alloc_cb, | 337 | GNUNET_ATS_AddressSuggestionCallback alloc_cb, |
338 | void *alloc_cb_cls) | 338 | void *alloc_cb_cls) |
339 | { | 339 | { |
340 | struct GNUNET_ATS_Handle *atc; | 340 | struct GNUNET_ATS_SchedulingHandle *atc; |
341 | 341 | ||
342 | #if DEBUG_ATS | 342 | #if DEBUG_ATS |
343 | LOG (GNUNET_ERROR_TYPE_DEBUG, "ATS init\n"); | 343 | LOG (GNUNET_ERROR_TYPE_DEBUG, "ATS init\n"); |
344 | #endif | 344 | #endif |
345 | atc = GNUNET_malloc (sizeof (struct GNUNET_ATS_Handle)); | 345 | atc = GNUNET_malloc (sizeof (struct GNUNET_ATS_SchedulingHandle)); |
346 | atc->cfg = cfg; | 346 | atc->cfg = cfg; |
347 | atc->alloc_cb = alloc_cb; | 347 | atc->alloc_cb = alloc_cb; |
348 | atc->alloc_cb_cls = alloc_cb_cls; | 348 | atc->alloc_cb_cls = alloc_cb_cls; |
@@ -382,7 +382,7 @@ destroy_allocation_record (void *cls, const GNUNET_HashCode * key, void *value) | |||
382 | * @param atc handle | 382 | * @param atc handle |
383 | */ | 383 | */ |
384 | void | 384 | void |
385 | GNUNET_ATS_shutdown (struct GNUNET_ATS_Handle *atc) | 385 | GNUNET_ATS_shutdown (struct GNUNET_ATS_SchedulingHandle *atc) |
386 | { | 386 | { |
387 | #if DEBUG_ATS | 387 | #if DEBUG_ATS |
388 | LOG (GNUNET_ERROR_TYPE_DEBUG, "ATS shutdown\n"); | 388 | LOG (GNUNET_ERROR_TYPE_DEBUG, "ATS shutdown\n"); |
@@ -410,7 +410,7 @@ struct UpdateSessionContext | |||
410 | /** | 410 | /** |
411 | * Ats handle. | 411 | * Ats handle. |
412 | */ | 412 | */ |
413 | struct GNUNET_ATS_Handle *atc; | 413 | struct GNUNET_ATS_SchedulingHandle *atc; |
414 | 414 | ||
415 | /** | 415 | /** |
416 | * Allocation record with new information. | 416 | * Allocation record with new information. |
@@ -556,7 +556,7 @@ create_allocation_record (const char *plugin_name, struct Session *session, | |||
556 | static int | 556 | static int |
557 | disconnect_peer (void *cls, const GNUNET_HashCode * key, void *value) | 557 | disconnect_peer (void *cls, const GNUNET_HashCode * key, void *value) |
558 | { | 558 | { |
559 | struct GNUNET_ATS_Handle *atc = cls; | 559 | struct GNUNET_ATS_SchedulingHandle *atc = cls; |
560 | struct AllocationRecord *ar = value; | 560 | struct AllocationRecord *ar = value; |
561 | 561 | ||
562 | if (GNUNET_YES == ar->connected) | 562 | if (GNUNET_YES == ar->connected) |
@@ -583,7 +583,7 @@ disconnect_peer (void *cls, const GNUNET_HashCode * key, void *value) | |||
583 | * @param ats_count number of performance records in 'ats' | 583 | * @param ats_count number of performance records in 'ats' |
584 | */ | 584 | */ |
585 | void | 585 | void |
586 | GNUNET_ATS_peer_connect (struct GNUNET_ATS_Handle *atc, | 586 | GNUNET_ATS_peer_connect (struct GNUNET_ATS_SchedulingHandle *atc, |
587 | const struct GNUNET_PeerIdentity *peer, | 587 | const struct GNUNET_PeerIdentity *peer, |
588 | const char *plugin_name, struct Session *session, | 588 | const char *plugin_name, struct Session *session, |
589 | const void *plugin_addr, size_t plugin_addr_len, | 589 | const void *plugin_addr, size_t plugin_addr_len, |
@@ -628,7 +628,7 @@ GNUNET_ATS_peer_connect (struct GNUNET_ATS_Handle *atc, | |||
628 | * @param peer identity of the new peer | 628 | * @param peer identity of the new peer |
629 | */ | 629 | */ |
630 | void | 630 | void |
631 | GNUNET_ATS_peer_disconnect (struct GNUNET_ATS_Handle *atc, | 631 | GNUNET_ATS_peer_disconnect (struct GNUNET_ATS_SchedulingHandle *atc, |
632 | const struct GNUNET_PeerIdentity *peer) | 632 | const struct GNUNET_PeerIdentity *peer) |
633 | { | 633 | { |
634 | #if DEBUG_ATS | 634 | #if DEBUG_ATS |
@@ -650,7 +650,7 @@ struct SessionDestroyContext | |||
650 | /** | 650 | /** |
651 | * Ats handle. | 651 | * Ats handle. |
652 | */ | 652 | */ |
653 | struct GNUNET_ATS_Handle *atc; | 653 | struct GNUNET_ATS_SchedulingHandle *atc; |
654 | 654 | ||
655 | /** | 655 | /** |
656 | * Session being destroyed. | 656 | * Session being destroyed. |
@@ -699,7 +699,7 @@ destroy_session (void *cls, const GNUNET_HashCode * key, void *value) | |||
699 | * @param session session handle that is no longer valid | 699 | * @param session session handle that is no longer valid |
700 | */ | 700 | */ |
701 | void | 701 | void |
702 | GNUNET_ATS_session_destroyed (struct GNUNET_ATS_Handle *atc, | 702 | GNUNET_ATS_session_destroyed (struct GNUNET_ATS_SchedulingHandle *atc, |
703 | const struct GNUNET_PeerIdentity *peer, | 703 | const struct GNUNET_PeerIdentity *peer, |
704 | const struct Session *session) | 704 | const struct Session *session) |
705 | { | 705 | { |
@@ -756,7 +756,7 @@ notify_valid (void *cls, const GNUNET_HashCode * key, void *value) | |||
756 | * @param ats_count number of performance records in 'ats' | 756 | * @param ats_count number of performance records in 'ats' |
757 | */ | 757 | */ |
758 | void | 758 | void |
759 | GNUNET_ATS_address_update (struct GNUNET_ATS_Handle *atc, | 759 | GNUNET_ATS_address_update (struct GNUNET_ATS_SchedulingHandle *atc, |
760 | const struct GNUNET_PeerIdentity *peer, | 760 | const struct GNUNET_PeerIdentity *peer, |
761 | struct GNUNET_TIME_Absolute valid_until, | 761 | struct GNUNET_TIME_Absolute valid_until, |
762 | const char *plugin_name, struct Session *session, | 762 | const char *plugin_name, struct Session *session, |