check
[oweals/gnunet.git] / src / include / gnunet_transport_service.h
index fcd91e6ec132d33d701136d619408afb8b002144..0fbbf12f0f505fa088d346470ba6d0cc4680f8b6 100644 (file)
@@ -253,13 +253,13 @@ enum GNUNET_TRANSPORT_ATS_Property
    * 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,
   
@@ -268,7 +268,7 @@ enum GNUNET_TRANSPORT_ATS_Property
    * Time variations of the delay
    * 1st derivative of a delay function
    *
-   * Unit: [μs]
+   * Unit: [ms]
    */
   GNUNET_TRANSPORT_ATS_QUALITY_NET_JITTER = 1029,
   
@@ -335,6 +335,14 @@ enum GNUNET_TRANSPORT_ATS_Property
    */
   GNUNET_TRANSPORT_ATS_QUALITY_NET_THROUGHPUT = 1033,
   
+ /**
+  * Distance on network layer
+  *
+  * Unit: []
+  */
+  GNUNET_TRANSPORT_ATS_QUALITY_NET_DISTANCE = 1034,
+
+
   /* Availability related values */
   /* =========================== */
   
@@ -384,16 +392,14 @@ struct GNUNET_TRANSPORT_ATS_Information
 
 
 
-
 /**
  * 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
@@ -401,9 +407,8 @@ typedef void (*GNUNET_TRANSPORT_ReceiveCallback) (void *cls,
                                                   const struct
                                                   GNUNET_MessageHeader *
                                                   message,
-                                                 struct GNUNET_TIME_Relative
-                                                  latency,
-                                                 uint32_t distance);
+                                                  const struct GNUNET_TRANSPORT_ATS_Information *ats,
+                                                  uint32_t ats_count);
 
 
 /**
@@ -418,15 +423,14 @@ struct GNUNET_TRANSPORT_Handle;
  *
  * @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,
                                      const struct GNUNET_PeerIdentity * peer,
-                                     struct GNUNET_TIME_Relative latency,
-                                    uint32_t distance);
+                                     const struct GNUNET_TRANSPORT_ATS_Information *ats,
+                                     uint32_t ats_count);
 
 /**
  * Function called to notify transport users that another
@@ -598,15 +602,19 @@ GNUNET_TRANSPORT_get_hello_cancel (struct GNUNET_TRANSPORT_Handle *handle,
 /**
  * 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);
 
 
 /**