aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_ats_service.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-02-03 14:11:03 +0000
committerChristian Grothoff <christian@grothoff.org>2015-02-03 14:11:03 +0000
commitb2e99dd91c01b5fcc16b3b1031df897aeec05eef (patch)
tree31caea8a19fd943f8a9f7f7f3c19e52e11d95a77 /src/include/gnunet_ats_service.h
parent55cecdea8638fa23c68e7ade7a8d5629da658f9e (diff)
downloadgnunet-b2e99dd91c01b5fcc16b3b1031df897aeec05eef.tar.gz
gnunet-b2e99dd91c01b5fcc16b3b1031df897aeec05eef.zip
separate ATS connectivity suggestions from ATS scheduling API
Diffstat (limited to 'src/include/gnunet_ats_service.h')
-rw-r--r--src/include/gnunet_ats_service.h87
1 files changed, 57 insertions, 30 deletions
diff --git a/src/include/gnunet_ats_service.h b/src/include/gnunet_ats_service.h
index 74e7c7c80..d506f41ff 100644
--- a/src/include/gnunet_ats_service.h
+++ b/src/include/gnunet_ats_service.h
@@ -304,17 +304,68 @@ struct GNUNET_ATS_Information
304}; 304};
305GNUNET_NETWORK_STRUCT_END 305GNUNET_NETWORK_STRUCT_END
306 306
307/* ******************************** Scheduling API ***************************** */ 307
308/* ********************Connection Suggestion API ***************************** */
308 309
309/** 310/**
310 * Handle to the ATS subsystem for bandwidth/transport scheduling information. 311 * Handle to the ATS subsystem for making suggestions about
312 * connections the peer would like to have.
311 */ 313 */
312struct GNUNET_ATS_SchedulingHandle; 314struct GNUNET_ATS_ConnectivityHandle;
315
316/**
317 * Handle for address suggestion requests.
318 */
319struct GNUNET_ATS_ConnectivitySuggestHandle;
320
321
322/**
323 * Initialize the ATS connectivity suggestion client handle.
324 *
325 * @param cfg configuration to use
326 * @return ats connectivity handle, NULL on error
327 */
328struct GNUNET_ATS_ConnectivityHandle *
329GNUNET_ATS_connectivity_init (const struct GNUNET_CONFIGURATION_Handle *cfg);
330
313 331
314/** 332/**
315 * Handle for address suggestion requests 333 * Shutdown ATS connectivity suggestion client.
334 *
335 * @param ch handle to destroy
336 */
337void
338GNUNET_ATS_connectivity_done (struct GNUNET_ATS_ConnectivityHandle *ch);
339
340
341/**
342 * We would like to establish a new connection with a peer. ATS
343 * should suggest a good address to begin with.
344 *
345 * @param ch handle
346 * @param peer identity of the peer we need an address for
347 * @return suggestion handle, NULL if request is already pending
316 */ 348 */
317struct GNUNET_ATS_SuggestHandle; 349struct GNUNET_ATS_ConnectivitySuggestHandle *
350GNUNET_ATS_connectivity_suggest (struct GNUNET_ATS_ConnectivityHandle *ch,
351 const struct GNUNET_PeerIdentity *peer);
352
353
354/**
355 * We no longer care about being connected to a peer.
356 *
357 * @param sh handle
358 */
359void
360GNUNET_ATS_connectivity_suggest_cancel (struct GNUNET_ATS_ConnectivitySuggestHandle *sh);
361
362
363/* ******************************** Scheduling API ***************************** */
364
365/**
366 * Handle to the ATS subsystem for bandwidth/transport scheduling information.
367 */
368struct GNUNET_ATS_SchedulingHandle;
318 369
319/** 370/**
320 * Opaque session handle, defined by plugins. Contents not known to ATS. 371 * Opaque session handle, defined by plugins. Contents not known to ATS.
@@ -343,7 +394,7 @@ typedef void
343 394
344 395
345/** 396/**
346 * Initialize the ATS subsystem. 397 * Initialize the ATS scheduling subsystem.
347 * 398 *
348 * @param cfg configuration to use 399 * @param cfg configuration to use
349 * @param suggest_cb notification to call whenever the suggestation changed 400 * @param suggest_cb notification to call whenever the suggestation changed
@@ -377,30 +428,6 @@ GNUNET_ATS_reset_backoff (struct GNUNET_ATS_SchedulingHandle *sh,
377 428
378 429
379/** 430/**
380 * We would like to establish a new connection with a peer. ATS
381 * should suggest a good address to begin with.
382 *
383 * @param sh handle
384 * @param peer identity of the peer we need an address for
385 * @return suggestion handle, NULL if a request is already pending
386 */
387struct GNUNET_ATS_SuggestHandle *
388GNUNET_ATS_suggest_address (struct GNUNET_ATS_SchedulingHandle *sh,
389 const struct GNUNET_PeerIdentity *peer);
390
391
392/**
393 * We want to cancel ATS suggesting addresses for a peer.
394 *
395 * @param sh handle
396 * @param peer identity of the peer
397 */
398void
399GNUNET_ATS_suggest_address_cancel (struct GNUNET_ATS_SchedulingHandle *sh,
400 const struct GNUNET_PeerIdentity *peer);
401
402
403/**
404 * Convert a ATS property to a string 431 * Convert a ATS property to a string
405 * 432 *
406 * @param type the property type 433 * @param type the property type