diff options
author | Christian Grothoff <christian@grothoff.org> | 2016-07-06 22:10:48 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2016-07-06 22:10:48 +0000 |
commit | 5c862712d9c389fced47fde9abdc9458da319aef (patch) | |
tree | 3d17ba8b4fc5ef821882b65aaf6c3d1a798c6ed3 /src/include/gnunet_transport_service.h | |
parent | 55c16b6ab6a83a594303efccff1e59a022470982 (diff) | |
download | gnunet-5c862712d9c389fced47fde9abdc9458da319aef.tar.gz gnunet-5c862712d9c389fced47fde9abdc9458da319aef.zip |
removing GNUNET_TRANSPORT_monitor_validation-API
Diffstat (limited to 'src/include/gnunet_transport_service.h')
-rw-r--r-- | src/include/gnunet_transport_service.h | 120 |
1 files changed, 0 insertions, 120 deletions
diff --git a/src/include/gnunet_transport_service.h b/src/include/gnunet_transport_service.h index 3683286a5..0ff6c185a 100644 --- a/src/include/gnunet_transport_service.h +++ b/src/include/gnunet_transport_service.h | |||
@@ -628,126 +628,6 @@ void | |||
628 | GNUNET_TRANSPORT_monitor_peers_cancel (struct GNUNET_TRANSPORT_PeerMonitoringContext *pic); | 628 | GNUNET_TRANSPORT_monitor_peers_cancel (struct GNUNET_TRANSPORT_PeerMonitoringContext *pic); |
629 | 629 | ||
630 | 630 | ||
631 | /** | ||
632 | * Handle for a #GNUNET_TRANSPORT_monitor_validation_entries() operation. | ||
633 | */ | ||
634 | struct GNUNET_TRANSPORT_ValidationMonitoringContext; | ||
635 | |||
636 | |||
637 | /** | ||
638 | * Current state of a validation process. | ||
639 | * | ||
640 | * FIXME: what state is used to indicate that a validation | ||
641 | * was successful? If that is clarified/determined, "UGH" in | ||
642 | * ~gnunet-peerinfo-gtk.c:1103 should be resolved. | ||
643 | */ | ||
644 | enum GNUNET_TRANSPORT_ValidationState | ||
645 | { | ||
646 | /** | ||
647 | * Undefined state | ||
648 | * | ||
649 | * Used for final callback indicating operation done | ||
650 | */ | ||
651 | GNUNET_TRANSPORT_VS_NONE, | ||
652 | |||
653 | /** | ||
654 | * Fresh validation entry | ||
655 | * | ||
656 | * Entry was just created, no validation process was executed | ||
657 | */ | ||
658 | GNUNET_TRANSPORT_VS_NEW, | ||
659 | |||
660 | /** | ||
661 | * Updated validation entry | ||
662 | * | ||
663 | * This is an update for an existing validation entry | ||
664 | */ | ||
665 | GNUNET_TRANSPORT_VS_UPDATE, | ||
666 | |||
667 | /** | ||
668 | * Timeout for validation entry | ||
669 | * | ||
670 | * A timeout occured during the validation process | ||
671 | */ | ||
672 | GNUNET_TRANSPORT_VS_TIMEOUT, | ||
673 | |||
674 | /** | ||
675 | * Validation entry is removed | ||
676 | * | ||
677 | * The validation entry is getting removed due to a failed validation | ||
678 | */ | ||
679 | GNUNET_TRANSPORT_VS_REMOVE | ||
680 | }; | ||
681 | |||
682 | |||
683 | /** | ||
684 | * Function to call with validation information about a peer | ||
685 | * | ||
686 | * This function is called by the transport validation monitoring api to | ||
687 | * indicate a change to a validation entry. The information included represent | ||
688 | * the current state of the validation entry, | ||
689 | * | ||
690 | * If the monitoring was called with `one_shot==GNUNET_YES`, a final callback | ||
691 | * with `address==NULL` is executed. | ||
692 | * | ||
693 | * @param cls closure | ||
694 | * @param address address this update is about, | ||
695 | * NULL if this is the final last callback for a iteration operation | ||
696 | * @param last_validation when was this address last validated | ||
697 | * @param valid_until when does this address expire | ||
698 | * @param next_validation time of the next validation operation | ||
699 | * @param state state in the validation state machine | ||
700 | */ | ||
701 | typedef void | ||
702 | (*GNUNET_TRANSPORT_ValidationIterateCallback) (void *cls, | ||
703 | const struct GNUNET_HELLO_Address *address, | ||
704 | struct GNUNET_TIME_Absolute last_validation, | ||
705 | struct GNUNET_TIME_Absolute valid_until, | ||
706 | struct GNUNET_TIME_Absolute next_validation, | ||
707 | enum GNUNET_TRANSPORT_ValidationState state); | ||
708 | |||
709 | |||
710 | /** | ||
711 | * Convert validation state to human-readable string. | ||
712 | * | ||
713 | * @param state the state value | ||
714 | * @return corresponding string | ||
715 | */ | ||
716 | const char * | ||
717 | GNUNET_TRANSPORT_vs2s (enum GNUNET_TRANSPORT_ValidationState state); | ||
718 | |||
719 | |||
720 | /** | ||
721 | * Return information about pending address validation operations for a specific | ||
722 | * or all peers | ||
723 | * | ||
724 | * @param cfg configuration to use | ||
725 | * @param peer a specific peer identity to obtain validation entries for, | ||
726 | * NULL for all peers | ||
727 | * @param one_shot #GNUNET_YES to return all entries and then end (with NULL+NULL), | ||
728 | * #GNUNET_NO to monitor validation entries continuously | ||
729 | * @param timeout how long is the lookup allowed to take at most | ||
730 | * @param validation_callback function to call with the results | ||
731 | * @param validation_callback_cls closure for @a validation_callback | ||
732 | */ | ||
733 | struct GNUNET_TRANSPORT_ValidationMonitoringContext * | ||
734 | GNUNET_TRANSPORT_monitor_validation_entries (const struct GNUNET_CONFIGURATION_Handle *cfg, | ||
735 | const struct GNUNET_PeerIdentity *peer, | ||
736 | int one_shot, | ||
737 | struct GNUNET_TIME_Relative timeout, | ||
738 | GNUNET_TRANSPORT_ValidationIterateCallback validation_callback, | ||
739 | void *validation_callback_cls); | ||
740 | |||
741 | |||
742 | /** | ||
743 | * Return information about all current pending validation operations | ||
744 | * | ||
745 | * @param vic handle for the request to cancel | ||
746 | */ | ||
747 | void | ||
748 | GNUNET_TRANSPORT_monitor_validation_entries_cancel (struct GNUNET_TRANSPORT_ValidationMonitoringContext *vic); | ||
749 | |||
750 | |||
751 | /* *********************** Blacklisting ************************ */ | 631 | /* *********************** Blacklisting ************************ */ |
752 | 632 | ||
753 | /** | 633 | /** |