diff options
Diffstat (limited to 'src/include/gnunet_transport_service.h')
-rw-r--r-- | src/include/gnunet_transport_service.h | 135 |
1 files changed, 66 insertions, 69 deletions
diff --git a/src/include/gnunet_transport_service.h b/src/include/gnunet_transport_service.h index 7e0656956..988d55784 100644 --- a/src/include/gnunet_transport_service.h +++ b/src/include/gnunet_transport_service.h | |||
@@ -468,18 +468,12 @@ typedef void (*GNUNET_TRANSPORT_AddressLookUpCallback) (void *cls, | |||
468 | * @param nd function to call on disconnect events | 468 | * @param nd function to call on disconnect events |
469 | * @return NULL on error | 469 | * @return NULL on error |
470 | */ | 470 | */ |
471 | struct GNUNET_TRANSPORT_Handle *GNUNET_TRANSPORT_connect (const struct | 471 | struct GNUNET_TRANSPORT_Handle * |
472 | GNUNET_CONFIGURATION_Handle | 472 | GNUNET_TRANSPORT_connect (const struct GNUNET_CONFIGURATION_Handle *cfg, |
473 | *cfg, | 473 | const struct GNUNET_PeerIdentity *self, void *cls, |
474 | const struct | 474 | GNUNET_TRANSPORT_ReceiveCallback rec, |
475 | GNUNET_PeerIdentity | 475 | GNUNET_TRANSPORT_NotifyConnect nc, |
476 | *self, void *cls, | 476 | GNUNET_TRANSPORT_NotifyDisconnect nd); |
477 | GNUNET_TRANSPORT_ReceiveCallback | ||
478 | rec, | ||
479 | GNUNET_TRANSPORT_NotifyConnect | ||
480 | nc, | ||
481 | GNUNET_TRANSPORT_NotifyDisconnect | ||
482 | nd); | ||
483 | 477 | ||
484 | 478 | ||
485 | /** | 479 | /** |
@@ -487,7 +481,8 @@ struct GNUNET_TRANSPORT_Handle *GNUNET_TRANSPORT_connect (const struct | |||
487 | * | 481 | * |
488 | * @param handle handle returned from connect | 482 | * @param handle handle returned from connect |
489 | */ | 483 | */ |
490 | void GNUNET_TRANSPORT_disconnect (struct GNUNET_TRANSPORT_Handle *handle); | 484 | void |
485 | GNUNET_TRANSPORT_disconnect (struct GNUNET_TRANSPORT_Handle *handle); | ||
491 | 486 | ||
492 | 487 | ||
493 | /** | 488 | /** |
@@ -497,8 +492,9 @@ void GNUNET_TRANSPORT_disconnect (struct GNUNET_TRANSPORT_Handle *handle); | |||
497 | * @param handle connection to transport service | 492 | * @param handle connection to transport service |
498 | * @param target who we should try to connect to | 493 | * @param target who we should try to connect to |
499 | */ | 494 | */ |
500 | void GNUNET_TRANSPORT_try_connect (struct GNUNET_TRANSPORT_Handle *handle, | 495 | void |
501 | const struct GNUNET_PeerIdentity *target); | 496 | GNUNET_TRANSPORT_try_connect (struct GNUNET_TRANSPORT_Handle *handle, |
497 | const struct GNUNET_PeerIdentity *target); | ||
502 | 498 | ||
503 | 499 | ||
504 | /** | 500 | /** |
@@ -510,10 +506,11 @@ void GNUNET_TRANSPORT_try_connect (struct GNUNET_TRANSPORT_Handle *handle, | |||
510 | * @param quota_in incoming bandwidth quota | 506 | * @param quota_in incoming bandwidth quota |
511 | * @param quota_out outgoing bandwidth quota | 507 | * @param quota_out outgoing bandwidth quota |
512 | */ | 508 | */ |
513 | void GNUNET_TRANSPORT_set_quota (struct GNUNET_TRANSPORT_Handle *handle, | 509 | void |
514 | const struct GNUNET_PeerIdentity *target, | 510 | GNUNET_TRANSPORT_set_quota (struct GNUNET_TRANSPORT_Handle *handle, |
515 | struct GNUNET_BANDWIDTH_Value32NBO quota_in, | 511 | const struct GNUNET_PeerIdentity *target, |
516 | struct GNUNET_BANDWIDTH_Value32NBO quota_out); | 512 | struct GNUNET_BANDWIDTH_Value32NBO quota_in, |
513 | struct GNUNET_BANDWIDTH_Value32NBO quota_out); | ||
517 | 514 | ||
518 | 515 | ||
519 | /** | 516 | /** |
@@ -541,16 +538,13 @@ struct GNUNET_TRANSPORT_TransmitHandle; | |||
541 | * non-NULL if the notify callback was queued (can be used to cancel | 538 | * non-NULL if the notify callback was queued (can be used to cancel |
542 | * using GNUNET_TRANSPORT_notify_transmit_ready_cancel) | 539 | * using GNUNET_TRANSPORT_notify_transmit_ready_cancel) |
543 | */ | 540 | */ |
544 | struct GNUNET_TRANSPORT_TransmitHandle | 541 | struct GNUNET_TRANSPORT_TransmitHandle * |
545 | *GNUNET_TRANSPORT_notify_transmit_ready (struct GNUNET_TRANSPORT_Handle | 542 | GNUNET_TRANSPORT_notify_transmit_ready (struct GNUNET_TRANSPORT_Handle *handle, |
546 | *handle, | 543 | const struct GNUNET_PeerIdentity |
547 | const struct GNUNET_PeerIdentity | 544 | *target, size_t size, uint32_t priority, |
548 | *target, size_t size, | 545 | struct GNUNET_TIME_Relative timeout, |
549 | uint32_t priority, | 546 | GNUNET_CONNECTION_TransmitReadyNotify |
550 | struct GNUNET_TIME_Relative | 547 | notify, void *notify_cls); |
551 | timeout, | ||
552 | GNUNET_CONNECTION_TransmitReadyNotify | ||
553 | notify, void *notify_cls); | ||
554 | 548 | ||
555 | 549 | ||
556 | /** | 550 | /** |
@@ -558,9 +552,10 @@ struct GNUNET_TRANSPORT_TransmitHandle | |||
558 | * | 552 | * |
559 | * @param th handle of the transmission notification request to cancel | 553 | * @param th handle of the transmission notification request to cancel |
560 | */ | 554 | */ |
561 | void GNUNET_TRANSPORT_notify_transmit_ready_cancel (struct | 555 | void |
562 | GNUNET_TRANSPORT_TransmitHandle | 556 | GNUNET_TRANSPORT_notify_transmit_ready_cancel (struct |
563 | *th); | 557 | GNUNET_TRANSPORT_TransmitHandle |
558 | *th); | ||
564 | 559 | ||
565 | 560 | ||
566 | 561 | ||
@@ -584,9 +579,10 @@ typedef void (*GNUNET_TRANSPORT_HelloUpdateCallback) (void *cls, | |||
584 | * @param rec function to call with the HELLO | 579 | * @param rec function to call with the HELLO |
585 | * @param rec_cls closure for rec | 580 | * @param rec_cls closure for rec |
586 | */ | 581 | */ |
587 | void GNUNET_TRANSPORT_get_hello (struct GNUNET_TRANSPORT_Handle *handle, | 582 | void |
588 | GNUNET_TRANSPORT_HelloUpdateCallback rec, | 583 | GNUNET_TRANSPORT_get_hello (struct GNUNET_TRANSPORT_Handle *handle, |
589 | void *rec_cls); | 584 | GNUNET_TRANSPORT_HelloUpdateCallback rec, |
585 | void *rec_cls); | ||
590 | 586 | ||
591 | 587 | ||
592 | /** | 588 | /** |
@@ -596,9 +592,10 @@ void GNUNET_TRANSPORT_get_hello (struct GNUNET_TRANSPORT_Handle *handle, | |||
596 | * @param rec function previously registered to be called with the HELLOs | 592 | * @param rec function previously registered to be called with the HELLOs |
597 | * @param rec_cls closure for rec | 593 | * @param rec_cls closure for rec |
598 | */ | 594 | */ |
599 | void GNUNET_TRANSPORT_get_hello_cancel (struct GNUNET_TRANSPORT_Handle *handle, | 595 | void |
600 | GNUNET_TRANSPORT_HelloUpdateCallback | 596 | GNUNET_TRANSPORT_get_hello_cancel (struct GNUNET_TRANSPORT_Handle *handle, |
601 | rec, void *rec_cls); | 597 | GNUNET_TRANSPORT_HelloUpdateCallback rec, |
598 | void *rec_cls); | ||
602 | 599 | ||
603 | 600 | ||
604 | /** | 601 | /** |
@@ -612,9 +609,10 @@ void GNUNET_TRANSPORT_get_hello_cancel (struct GNUNET_TRANSPORT_Handle *handle, | |||
612 | * @param cls closure for continuation | 609 | * @param cls closure for continuation |
613 | * | 610 | * |
614 | */ | 611 | */ |
615 | void GNUNET_TRANSPORT_offer_hello (struct GNUNET_TRANSPORT_Handle *handle, | 612 | void |
616 | const struct GNUNET_MessageHeader *hello, | 613 | GNUNET_TRANSPORT_offer_hello (struct GNUNET_TRANSPORT_Handle *handle, |
617 | GNUNET_SCHEDULER_Task cont, void *cls); | 614 | const struct GNUNET_MessageHeader *hello, |
615 | GNUNET_SCHEDULER_Task cont, void *cls); | ||
618 | 616 | ||
619 | 617 | ||
620 | /** | 618 | /** |
@@ -630,13 +628,13 @@ void GNUNET_TRANSPORT_offer_hello (struct GNUNET_TRANSPORT_Handle *handle, | |||
630 | * @param aluc function to call with the results | 628 | * @param aluc function to call with the results |
631 | * @param aluc_cls closure for aluc | 629 | * @param aluc_cls closure for aluc |
632 | */ | 630 | */ |
633 | void GNUNET_TRANSPORT_address_lookup (const struct GNUNET_CONFIGURATION_Handle | 631 | void |
634 | *cfg, const char *address, | 632 | GNUNET_TRANSPORT_address_lookup (const struct GNUNET_CONFIGURATION_Handle *cfg, |
635 | size_t addressLen, int numeric, | 633 | const char *address, size_t addressLen, |
636 | const char *nameTrans, | 634 | int numeric, const char *nameTrans, |
637 | struct GNUNET_TIME_Relative timeout, | 635 | struct GNUNET_TIME_Relative timeout, |
638 | GNUNET_TRANSPORT_AddressLookUpCallback | 636 | GNUNET_TRANSPORT_AddressLookUpCallback aluc, |
639 | aluc, void *aluc_cls); | 637 | void *aluc_cls); |
640 | 638 | ||
641 | 639 | ||
642 | /** | 640 | /** |
@@ -649,14 +647,14 @@ void GNUNET_TRANSPORT_address_lookup (const struct GNUNET_CONFIGURATION_Handle | |||
649 | * @param peer_address_callback function to call with the results | 647 | * @param peer_address_callback function to call with the results |
650 | * @param peer_address_callback_cls closure for peer_address_callback | 648 | * @param peer_address_callback_cls closure for peer_address_callback |
651 | */ | 649 | */ |
652 | void GNUNET_TRANSPORT_peer_address_lookup (const struct | 650 | void |
653 | GNUNET_CONFIGURATION_Handle *cfg, | 651 | GNUNET_TRANSPORT_peer_address_lookup (const struct GNUNET_CONFIGURATION_Handle |
654 | const struct GNUNET_PeerIdentity | 652 | *cfg, |
655 | *peer, | 653 | const struct GNUNET_PeerIdentity *peer, |
656 | struct GNUNET_TIME_Relative timeout, | 654 | struct GNUNET_TIME_Relative timeout, |
657 | GNUNET_TRANSPORT_AddressLookUpCallback | 655 | GNUNET_TRANSPORT_AddressLookUpCallback |
658 | peer_address_callback, | 656 | peer_address_callback, |
659 | void *peer_address_callback_cls); | 657 | void *peer_address_callback_cls); |
660 | 658 | ||
661 | 659 | ||
662 | /** | 660 | /** |
@@ -668,12 +666,12 @@ void GNUNET_TRANSPORT_peer_address_lookup (const struct | |||
668 | * @param peer_address_callback function to call with the results | 666 | * @param peer_address_callback function to call with the results |
669 | * @param peer_address_callback_cls closure for peer_address_callback | 667 | * @param peer_address_callback_cls closure for peer_address_callback |
670 | */ | 668 | */ |
671 | void GNUNET_TRANSPORT_address_iterate (const struct GNUNET_CONFIGURATION_Handle | 669 | void |
672 | *cfg, | 670 | GNUNET_TRANSPORT_address_iterate (const struct GNUNET_CONFIGURATION_Handle *cfg, |
673 | struct GNUNET_TIME_Relative timeout, | 671 | struct GNUNET_TIME_Relative timeout, |
674 | GNUNET_TRANSPORT_AddressLookUpCallback | 672 | GNUNET_TRANSPORT_AddressLookUpCallback |
675 | peer_address_callback, | 673 | peer_address_callback, |
676 | void *peer_address_callback_cls); | 674 | void *peer_address_callback_cls); |
677 | 675 | ||
678 | 676 | ||
679 | /** | 677 | /** |
@@ -708,12 +706,10 @@ typedef int (*GNUNET_TRANSPORT_BlacklistCallback) (void *cls, | |||
708 | * @param cb_cls closure for cb | 706 | * @param cb_cls closure for cb |
709 | * @return NULL on error, otherwise handle for cancellation | 707 | * @return NULL on error, otherwise handle for cancellation |
710 | */ | 708 | */ |
711 | struct GNUNET_TRANSPORT_Blacklist *GNUNET_TRANSPORT_blacklist (const struct | 709 | struct GNUNET_TRANSPORT_Blacklist * |
712 | GNUNET_CONFIGURATION_Handle | 710 | GNUNET_TRANSPORT_blacklist (const struct GNUNET_CONFIGURATION_Handle *cfg, |
713 | *cfg, | 711 | GNUNET_TRANSPORT_BlacklistCallback cb, |
714 | GNUNET_TRANSPORT_BlacklistCallback | 712 | void *cb_cls); |
715 | cb, | ||
716 | void *cb_cls); | ||
717 | 713 | ||
718 | 714 | ||
719 | /** | 715 | /** |
@@ -722,7 +718,8 @@ struct GNUNET_TRANSPORT_Blacklist *GNUNET_TRANSPORT_blacklist (const struct | |||
722 | * | 718 | * |
723 | * @param br handle of the request that is to be cancelled | 719 | * @param br handle of the request that is to be cancelled |
724 | */ | 720 | */ |
725 | void GNUNET_TRANSPORT_blacklist_cancel (struct GNUNET_TRANSPORT_Blacklist *br); | 721 | void |
722 | GNUNET_TRANSPORT_blacklist_cancel (struct GNUNET_TRANSPORT_Blacklist *br); | ||
726 | 723 | ||
727 | 724 | ||
728 | 725 | ||