aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_transport_service.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/gnunet_transport_service.h')
-rw-r--r--src/include/gnunet_transport_service.h109
1 files changed, 50 insertions, 59 deletions
diff --git a/src/include/gnunet_transport_service.h b/src/include/gnunet_transport_service.h
index f4cc88e55..7e0656956 100644
--- a/src/include/gnunet_transport_service.h
+++ b/src/include/gnunet_transport_service.h
@@ -426,12 +426,12 @@ struct GNUNET_TRANSPORT_Handle;
426 * @param ats performance data 426 * @param ats performance data
427 * @param ats_count number of entries in ats (excluding 0-termination) 427 * @param ats_count number of entries in ats (excluding 0-termination)
428 */ 428 */
429typedef void 429typedef void (*GNUNET_TRANSPORT_NotifyConnect) (void *cls,
430 (*GNUNET_TRANSPORT_NotifyConnect) (void *cls, 430 const struct GNUNET_PeerIdentity
431 const struct GNUNET_PeerIdentity * peer, 431 * peer,
432 const struct 432 const struct
433 GNUNET_TRANSPORT_ATS_Information * ats, 433 GNUNET_TRANSPORT_ATS_Information
434 uint32_t ats_count); 434 * ats, uint32_t ats_count);
435 435
436/** 436/**
437 * Function called to notify transport users that another 437 * Function called to notify transport users that another
@@ -440,10 +440,9 @@ typedef void
440 * @param cls closure 440 * @param cls closure
441 * @param peer the peer that disconnected 441 * @param peer the peer that disconnected
442 */ 442 */
443typedef void 443typedef void (*GNUNET_TRANSPORT_NotifyDisconnect) (void *cls,
444 (*GNUNET_TRANSPORT_NotifyDisconnect) (void *cls, 444 const struct
445 const struct GNUNET_PeerIdentity * 445 GNUNET_PeerIdentity * peer);
446 peer);
447 446
448 447
449/** 448/**
@@ -452,8 +451,8 @@ typedef void
452 * @param cls closure 451 * @param cls closure
453 * @param address NULL on error, otherwise 0-terminated printable UTF-8 string 452 * @param address NULL on error, otherwise 0-terminated printable UTF-8 string
454 */ 453 */
455typedef void 454typedef void (*GNUNET_TRANSPORT_AddressLookUpCallback) (void *cls,
456 (*GNUNET_TRANSPORT_AddressLookUpCallback) (void *cls, const char *address); 455 const char *address);
457 456
458 457
459/** 458/**
@@ -498,9 +497,8 @@ void GNUNET_TRANSPORT_disconnect (struct GNUNET_TRANSPORT_Handle *handle);
498 * @param handle connection to transport service 497 * @param handle connection to transport service
499 * @param target who we should try to connect to 498 * @param target who we should try to connect to
500 */ 499 */
501void 500void GNUNET_TRANSPORT_try_connect (struct GNUNET_TRANSPORT_Handle *handle,
502GNUNET_TRANSPORT_try_connect (struct GNUNET_TRANSPORT_Handle *handle, 501 const struct GNUNET_PeerIdentity *target);
503 const struct GNUNET_PeerIdentity *target);
504 502
505 503
506/** 504/**
@@ -512,11 +510,10 @@ GNUNET_TRANSPORT_try_connect (struct GNUNET_TRANSPORT_Handle *handle,
512 * @param quota_in incoming bandwidth quota 510 * @param quota_in incoming bandwidth quota
513 * @param quota_out outgoing bandwidth quota 511 * @param quota_out outgoing bandwidth quota
514 */ 512 */
515void 513void GNUNET_TRANSPORT_set_quota (struct GNUNET_TRANSPORT_Handle *handle,
516GNUNET_TRANSPORT_set_quota (struct GNUNET_TRANSPORT_Handle *handle, 514 const struct GNUNET_PeerIdentity *target,
517 const struct GNUNET_PeerIdentity *target, 515 struct GNUNET_BANDWIDTH_Value32NBO quota_in,
518 struct GNUNET_BANDWIDTH_Value32NBO quota_in, 516 struct GNUNET_BANDWIDTH_Value32NBO quota_out);
519 struct GNUNET_BANDWIDTH_Value32NBO quota_out);
520 517
521 518
522/** 519/**
@@ -561,10 +558,9 @@ struct GNUNET_TRANSPORT_TransmitHandle
561 * 558 *
562 * @param th handle of the transmission notification request to cancel 559 * @param th handle of the transmission notification request to cancel
563 */ 560 */
564void 561void GNUNET_TRANSPORT_notify_transmit_ready_cancel (struct
565GNUNET_TRANSPORT_notify_transmit_ready_cancel (struct 562 GNUNET_TRANSPORT_TransmitHandle
566 GNUNET_TRANSPORT_TransmitHandle 563 *th);
567 *th);
568 564
569 565
570 566
@@ -588,10 +584,9 @@ typedef void (*GNUNET_TRANSPORT_HelloUpdateCallback) (void *cls,
588 * @param rec function to call with the HELLO 584 * @param rec function to call with the HELLO
589 * @param rec_cls closure for rec 585 * @param rec_cls closure for rec
590 */ 586 */
591void 587void GNUNET_TRANSPORT_get_hello (struct GNUNET_TRANSPORT_Handle *handle,
592GNUNET_TRANSPORT_get_hello (struct GNUNET_TRANSPORT_Handle *handle, 588 GNUNET_TRANSPORT_HelloUpdateCallback rec,
593 GNUNET_TRANSPORT_HelloUpdateCallback rec, 589 void *rec_cls);
594 void *rec_cls);
595 590
596 591
597/** 592/**
@@ -601,10 +596,9 @@ GNUNET_TRANSPORT_get_hello (struct GNUNET_TRANSPORT_Handle *handle,
601 * @param rec function previously registered to be called with the HELLOs 596 * @param rec function previously registered to be called with the HELLOs
602 * @param rec_cls closure for rec 597 * @param rec_cls closure for rec
603 */ 598 */
604void 599void GNUNET_TRANSPORT_get_hello_cancel (struct GNUNET_TRANSPORT_Handle *handle,
605GNUNET_TRANSPORT_get_hello_cancel (struct GNUNET_TRANSPORT_Handle *handle, 600 GNUNET_TRANSPORT_HelloUpdateCallback
606 GNUNET_TRANSPORT_HelloUpdateCallback rec, 601 rec, void *rec_cls);
607 void *rec_cls);
608 602
609 603
610/** 604/**
@@ -618,10 +612,9 @@ GNUNET_TRANSPORT_get_hello_cancel (struct GNUNET_TRANSPORT_Handle *handle,
618 * @param cls closure for continuation 612 * @param cls closure for continuation
619 * 613 *
620 */ 614 */
621void 615void GNUNET_TRANSPORT_offer_hello (struct GNUNET_TRANSPORT_Handle *handle,
622GNUNET_TRANSPORT_offer_hello (struct GNUNET_TRANSPORT_Handle *handle, 616 const struct GNUNET_MessageHeader *hello,
623 const struct GNUNET_MessageHeader *hello, 617 GNUNET_SCHEDULER_Task cont, void *cls);
624 GNUNET_SCHEDULER_Task cont, void *cls);
625 618
626 619
627/** 620/**
@@ -637,15 +630,13 @@ GNUNET_TRANSPORT_offer_hello (struct GNUNET_TRANSPORT_Handle *handle,
637 * @param aluc function to call with the results 630 * @param aluc function to call with the results
638 * @param aluc_cls closure for aluc 631 * @param aluc_cls closure for aluc
639 */ 632 */
640void 633void GNUNET_TRANSPORT_address_lookup (const struct GNUNET_CONFIGURATION_Handle
641GNUNET_TRANSPORT_address_lookup (const struct GNUNET_CONFIGURATION_Handle *cfg, 634 *cfg, const char *address,
642 const char *address, 635 size_t addressLen, int numeric,
643 size_t addressLen, 636 const char *nameTrans,
644 int numeric, 637 struct GNUNET_TIME_Relative timeout,
645 const char *nameTrans, 638 GNUNET_TRANSPORT_AddressLookUpCallback
646 struct GNUNET_TIME_Relative timeout, 639 aluc, void *aluc_cls);
647 GNUNET_TRANSPORT_AddressLookUpCallback aluc,
648 void *aluc_cls);
649 640
650 641
651/** 642/**
@@ -658,14 +649,14 @@ GNUNET_TRANSPORT_address_lookup (const struct GNUNET_CONFIGURATION_Handle *cfg,
658 * @param peer_address_callback function to call with the results 649 * @param peer_address_callback function to call with the results
659 * @param peer_address_callback_cls closure for peer_address_callback 650 * @param peer_address_callback_cls closure for peer_address_callback
660 */ 651 */
661void 652void GNUNET_TRANSPORT_peer_address_lookup (const struct
662GNUNET_TRANSPORT_peer_address_lookup (const struct GNUNET_CONFIGURATION_Handle 653 GNUNET_CONFIGURATION_Handle *cfg,
663 *cfg, 654 const struct GNUNET_PeerIdentity
664 const struct GNUNET_PeerIdentity *peer, 655 *peer,
665 struct GNUNET_TIME_Relative timeout, 656 struct GNUNET_TIME_Relative timeout,
666 GNUNET_TRANSPORT_AddressLookUpCallback 657 GNUNET_TRANSPORT_AddressLookUpCallback
667 peer_address_callback, 658 peer_address_callback,
668 void *peer_address_callback_cls); 659 void *peer_address_callback_cls);
669 660
670 661
671/** 662/**
@@ -677,12 +668,12 @@ GNUNET_TRANSPORT_peer_address_lookup (const struct GNUNET_CONFIGURATION_Handle
677 * @param peer_address_callback function to call with the results 668 * @param peer_address_callback function to call with the results
678 * @param peer_address_callback_cls closure for peer_address_callback 669 * @param peer_address_callback_cls closure for peer_address_callback
679 */ 670 */
680void 671void GNUNET_TRANSPORT_address_iterate (const struct GNUNET_CONFIGURATION_Handle
681GNUNET_TRANSPORT_address_iterate (const struct GNUNET_CONFIGURATION_Handle *cfg, 672 *cfg,
682 struct GNUNET_TIME_Relative timeout, 673 struct GNUNET_TIME_Relative timeout,
683 GNUNET_TRANSPORT_AddressLookUpCallback 674 GNUNET_TRANSPORT_AddressLookUpCallback
684 peer_address_callback, 675 peer_address_callback,
685 void *peer_address_callback_cls); 676 void *peer_address_callback_cls);
686 677
687 678
688/** 679/**