-doxygen
[oweals/gnunet.git] / src / transport / transport.h
index 338783585f628b30ca80fed7b035b759b880fe95..f1376f5a763dfab70c1f95a6d0072c9ca509a668 100644 (file)
  */
 #define MIN_QUOTA_REFRESH_TIME 2000
 
+/**
+ * What's the maximum number of sockets transport uses for validation and
+ * neighbors
+ */
+#define DEFAULT_MAX_FDS 256
+
 /**
  * Maximum frequency for re-evaluating latencies for all transport addresses.
  */
@@ -62,8 +68,6 @@
  *
  * @param cls closure
  * @param peer the peer that connected
- * @param ats performance data
- * @param ats_count number of entries in ats (excluding 0-termination)
  * @param bandwidth_in inbound bandwidth in NBO
  * @param bandwidth_out outbound bandwidth in NBO
  *
@@ -71,8 +75,6 @@
 
 typedef void (*NotifyConnect) (void *cls,
                               const struct GNUNET_PeerIdentity *peer,
-                              const struct GNUNET_ATS_Information *ats,
-                              uint32_t ats_count,
                               struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in,
                               struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out);
 
@@ -119,12 +121,6 @@ struct ConnectInfoMessage
    */
   struct GNUNET_MessageHeader header;
 
-  /**
-   * Number of ATS key-value pairs that follow this struct
-   * (excluding the 0-terminator).
-   */
-  uint32_t ats_count GNUNET_PACKED;
-
   /**
    * Identity of the new neighbour.
    */
@@ -228,12 +224,6 @@ struct InboundMessage
    */
   struct GNUNET_MessageHeader header;
 
-  /**
-   * Number of ATS key-value pairs that follow this struct
-   * (excluding the 0-terminator).
-   */
-  uint32_t ats_count GNUNET_PACKED;
-
   /**
    * Which peer sent the message?
    */
@@ -408,6 +398,34 @@ struct AddressIterateMessage
 };
 
 
+/**
+ * Message from the library to the transport service
+ * asking for binary addresses known for a peer.
+ */
+struct TrafficMetricMessage
+{
+  /**
+   * Type will be GNUNET_MESSAGE_TYPE_TRANSPORT_TRAFFIC_METRIC
+   */
+  struct GNUNET_MessageHeader header;
+
+  /**
+   * SEND, RECEIVE or BOTH?
+   */
+  uint16_t direction;
+
+  /**
+   * Traffic metrics count
+   */
+  uint16_t ats_count;
+
+  /**
+   * The identity of the peer to look up.
+   */
+  struct GNUNET_PeerIdentity peer;
+};
+
+
 /**
  * Message from the transport service to the library
  * containing binary addresses known for a peer.