* Delay
* Time between when the time packet is sent and the packet arrives
*
- * Unit: [μs]
+ * Unit: [ms]
*
* Examples:
*
- * LAN : 180
- * Dialup: 4000
- * WLAN : 7000
+ * LAN : 1
+ * WLAN : 2
+ * Dialup: 500
*/
GNUNET_TRANSPORT_ATS_QUALITY_NET_DELAY = 1028,
* Time variations of the delay
* 1st derivative of a delay function
*
- * Unit: [μs]
+ * Unit: [ms]
*/
GNUNET_TRANSPORT_ATS_QUALITY_NET_JITTER = 1029,
*/
GNUNET_TRANSPORT_ATS_QUALITY_NET_THROUGHPUT = 1033,
+ /**
+ * Distance on network layer
+ *
+ * Unit: []
+ */
+ GNUNET_TRANSPORT_ATS_QUALITY_NET_DISTANCE = 1034,
+
+
/* Availability related values */
/* =========================== */
-
/**
* Function called by the transport for each received message.
*
* @param cls closure
* @param peer (claimed) identity of the other peer
* @param message the message
- * @param latency estimated latency for communicating with the
- * given peer (round-trip)
- * @param distance in overlay hops, as given by transport plugin
+ * @param ats performance data
+ * @param ats_count number of entries in ats (excluding 0-termination)
*/
typedef void (*GNUNET_TRANSPORT_ReceiveCallback) (void *cls,
const struct
const struct
GNUNET_MessageHeader *
message,
- const struct GNUNET_TRANSPORT_ATS_Information *ats,
+ const struct GNUNET_TRANSPORT_ATS_Information *ats,
uint32_t ats_count);
*
* @param cls closure
* @param peer the peer that connected
- * @param latency estimated latency for communicating with the
- * given peer (round-trip)
- * @param distance in overlay hops, as given by transport plugin
+ * @param ats performance data
+ * @param ats_count number of entries in ats (excluding 0-termination)
*/
typedef void
(*GNUNET_TRANSPORT_NotifyConnect) (void *cls,
void GNUNET_TRANSPORT_disconnect (struct GNUNET_TRANSPORT_Handle *handle);
+/**
+ * Ask the transport service to establish a connection to
+ * the given peer.
+ *
+ * @param handle connection to transport service
+ * @param target who we should try to connect to
+ */
+void
+GNUNET_TRANSPORT_try_connect (struct GNUNET_TRANSPORT_Handle *handle,
+ const struct GNUNET_PeerIdentity *target);
+
+
/**
* Set the share of incoming/outgoing bandwidth for the given
* peer to the specified amount.
* @param target who's bandwidth quota is being changed
* @param quota_in incoming bandwidth quota
* @param quota_out outgoing bandwidth quota
- * @param timeout how long to wait until signaling failure if
- * we can not communicate the quota change
- * @param cont continuation to call when done, will be called
- * either with reason "TIMEOUT" or with reason "PREREQ_DONE"
- * @param cont_cls closure for continuation
*/
void
GNUNET_TRANSPORT_set_quota (struct GNUNET_TRANSPORT_Handle *handle,
const struct GNUNET_PeerIdentity *target,
struct GNUNET_BANDWIDTH_Value32NBO quota_in,
- struct GNUNET_BANDWIDTH_Value32NBO quota_out,
- struct GNUNET_TIME_Relative timeout,
- GNUNET_SCHEDULER_Task cont, void *cont_cls);
+ struct GNUNET_BANDWIDTH_Value32NBO quota_out);
/**
/**
* Cancel the specified transmission-ready notification.
*
- * @param h handle of the transmission notification request to cancel
+ * @param th handle of the transmission notification request to cancel
*/
void
GNUNET_TRANSPORT_notify_transmit_ready_cancel (struct
GNUNET_TRANSPORT_TransmitHandle
- *h);
+ *th);
/**
* Offer the transport service the HELLO of another peer. Note that
* the transport service may just ignore this message if the HELLO is
- * malformed or useless due to our local configuration. If the HELLO
- * is working, we should add it to PEERINFO.
+ * malformed or useless due to our local configuration.
*
* @param handle connection to transport service
* @param hello the hello message
+ * @param cont continuation to call when HELLO has been sent
+ * @param cls closure for continuation
+ *
*/
void
GNUNET_TRANSPORT_offer_hello (struct GNUNET_TRANSPORT_Handle *handle,
- const struct GNUNET_MessageHeader *hello);
+ const struct GNUNET_MessageHeader *hello,
+ GNUNET_SCHEDULER_Task cont,
+ void *cls);
/**
GNUNET_TRANSPORT_AddressLookUpCallback aluc,
void *aluc_cls);
+/**
+ * Return all the known addresses for a peer.
+ *
+ * @param cfg configuration to use
+ * @param peer peer identity to look up the addresses of
+ * @param timeout how long is the lookup allowed to take at most
+ * @param peer_address_callback function to call with the results
+ * @param peer_address_callback_cls closure for peer_address_callback
+ */
+void
+GNUNET_TRANSPORT_peer_address_lookup (const struct GNUNET_CONFIGURATION_Handle *cfg,
+ const struct GNUNET_PeerIdentity *peer,
+ struct GNUNET_TIME_Relative timeout,
+ GNUNET_TRANSPORT_AddressLookUpCallback peer_address_callback,
+ void *peer_address_callback_cls);
+
+/**
+ * Return all the known addresses for a peer.
+ *
+ * @param cfg configuration to use
+ * @param timeout how long is the lookup allowed to take at most
+ * @param peer_address_callback function to call with the results
+ * @param peer_address_callback_cls closure for peer_address_callback
+ */
+void
+GNUNET_TRANSPORT_address_iterate (const struct GNUNET_CONFIGURATION_Handle *cfg,
+ struct GNUNET_TIME_Relative timeout,
+ GNUNET_TRANSPORT_AddressLookUpCallback peer_address_callback,
+ void *peer_address_callback_cls);
/**
* Handle for blacklisting peers.