/*
This file is part of GNUnet.
- Copyright (C) 2009-2014 Christian Grothoff (and other contributing authors)
+ Copyright (C) 2009-2014 GNUnet e.V.
GNUnet is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
*
* @defgroup transport Transport service
* Low-level P2P IO
+ *
+ * @see [Documentation](https://gnunet.org/transport-service)
+ *
* @{
*/
/**
* Cancel request for address conversion.
*
- * @param pic the context handle
+ * @param alc the context handle
*/
void
-GNUNET_TRANSPORT_address_to_string_cancel (struct GNUNET_TRANSPORT_AddressToStringContext *pic);
+GNUNET_TRANSPORT_address_to_string_cancel (struct GNUNET_TRANSPORT_AddressToStringContext *alc);
/* *********************** Monitoring ************************** */
* NULL for all peers
* @param one_shot #GNUNET_YES to return the current state and then end (with NULL+NULL),
* #GNUNET_NO to monitor peers continuously
- * @param timeout how long is the lookup allowed to take at most
* @param peer_callback function to call with the results
* @param peer_callback_cls closure for @a peer_callback
*/
GNUNET_TRANSPORT_monitor_peers (const struct GNUNET_CONFIGURATION_Handle *cfg,
const struct GNUNET_PeerIdentity *peer,
int one_shot,
- struct GNUNET_TIME_Relative timeout,
GNUNET_TRANSPORT_PeerIterateCallback peer_callback,
void *peer_callback_cls);
GNUNET_TRANSPORT_monitor_peers_cancel (struct GNUNET_TRANSPORT_PeerMonitoringContext *pic);
-/**
- * Handle for a #GNUNET_TRANSPORT_monitor_validation_entries() operation.
- */
-struct GNUNET_TRANSPORT_ValidationMonitoringContext;
-
-
-/**
- * Current state of a validation process.
- *
- * FIXME: what state is used to indicate that a validation
- * was successful? If that is clarified/determined, "UGH" in
- * ~gnunet-peerinfo-gtk.c:1103 should be resolved.
- */
-enum GNUNET_TRANSPORT_ValidationState
-{
- /**
- * Undefined state
- *
- * Used for final callback indicating operation done
- */
- GNUNET_TRANSPORT_VS_NONE,
-
- /**
- * Fresh validation entry
- *
- * Entry was just created, no validation process was executed
- */
- GNUNET_TRANSPORT_VS_NEW,
-
- /**
- * Updated validation entry
- *
- * This is an update for an existing validation entry
- */
- GNUNET_TRANSPORT_VS_UPDATE,
-
- /**
- * Timeout for validation entry
- *
- * A timeout occured during the validation process
- */
- GNUNET_TRANSPORT_VS_TIMEOUT,
-
- /**
- * Validation entry is removed
- *
- * The validation entry is getting removed due to a failed validation
- */
- GNUNET_TRANSPORT_VS_REMOVE
-};
-
-
-/**
- * Function to call with validation information about a peer
- *
- * This function is called by the transport validation monitoring api to
- * indicate a change to a validation entry. The information included represent
- * the current state of the validation entry,
- *
- * If the monitoring was called with `one_shot==GNUNET_YES`, a final callback
- * with `address==NULL` is executed.
- *
- * @param cls closure
- * @param address address this update is about,
- * NULL if this is the final last callback for a iteration operation
- * @param last_validation when was this address last validated
- * @param valid_until when does this address expire
- * @param next_validation time of the next validation operation
- * @param state state in the validation state machine
- */
-typedef void
-(*GNUNET_TRANSPORT_ValidationIterateCallback) (void *cls,
- const struct GNUNET_HELLO_Address *address,
- struct GNUNET_TIME_Absolute last_validation,
- struct GNUNET_TIME_Absolute valid_until,
- struct GNUNET_TIME_Absolute next_validation,
- enum GNUNET_TRANSPORT_ValidationState state);
-
-
-/**
- * Convert validation state to human-readable string.
- *
- * @param state the state value
- * @return corresponding string
- */
-const char *
-GNUNET_TRANSPORT_vs2s (enum GNUNET_TRANSPORT_ValidationState state);
-
-
-/**
- * Return information about pending address validation operations for a specific
- * or all peers
- *
- * @param cfg configuration to use
- * @param peer a specific peer identity to obtain validation entries for,
- * NULL for all peers
- * @param one_shot #GNUNET_YES to return all entries and then end (with NULL+NULL),
- * #GNUNET_NO to monitor validation entries continuously
- * @param timeout how long is the lookup allowed to take at most
- * @param validation_callback function to call with the results
- * @param validation_callback_cls closure for @a validation_callback
- */
-struct GNUNET_TRANSPORT_ValidationMonitoringContext *
-GNUNET_TRANSPORT_monitor_validation_entries (const struct GNUNET_CONFIGURATION_Handle *cfg,
- const struct GNUNET_PeerIdentity *peer,
- int one_shot,
- struct GNUNET_TIME_Relative timeout,
- GNUNET_TRANSPORT_ValidationIterateCallback validation_callback,
- void *validation_callback_cls);
-
-
-/**
- * Return information about all current pending validation operations
- *
- * @param vic handle for the request to cancel
- */
-void
-GNUNET_TRANSPORT_monitor_validation_entries_cancel (struct GNUNET_TRANSPORT_ValidationMonitoringContext *vic);
-
-
/* *********************** Blacklisting ************************ */
/**