stuff
[oweals/gnunet.git] / src / transport / gnunet-service-transport_neighbours.h
index 26b3a11b8fd9fb22b53cdb2b50d87e8ab0dc03dc..1b0a98a2b93d411ee6f8f420135bc21e27cf343c 100644 (file)
@@ -28,6 +28,7 @@
 
 #include "gnunet_statistics_service.h"
 #include "gnunet_transport_service.h"
+#include "gnunet_transport_plugin.h"
 #include "gnunet_util_lib.h"
 
 // TODO:
@@ -78,7 +79,7 @@ GST_neighbours_test_connected (const struct GNUNET_PeerIdentity *target);
  * Function called after the transmission is done.
  *
  * @param cls closure
- * @param success GNUNET_OK on success, GNUNET_NO on failure
+ * @param success GNUNET_OK on success, GNUNET_NO on failure, GNUNET_SYSERR if we're not connected
  */
 typedef void (*GST_NeighbourSendContinuation)(void *cls,
                                              int success);
@@ -89,12 +90,14 @@ typedef void (*GST_NeighbourSendContinuation)(void *cls,
  *
  * @param target destination
  * @param msg message to send
+ * @param timeout when to fail with timeout
  * @param cont function to call when done
  * @param cont_cls closure for 'cont'
  */
 void
 GST_neighbours_send (const struct GNUNET_PeerIdentity *target,
                     const struct GNUNET_MessageHeader *msg,
+                    struct GNUNET_TIME_Relative timeout,
                     GST_NeighbourSendContinuation cont,
                     void *cont_cls);
 
@@ -152,6 +155,8 @@ GST_neighbours_iterate (GST_NeighbourIterator cb,
  * @param sender_address address of the other peer, NULL if other peer
  *                       connected to us
  * @param sender_address_len number of bytes in sender_address
+ * @param ats performance data
+ * @param ats_count number of entries in ats (excluding 0-termination)
  * @return GNUNET_OK if the message was well-formed, GNUNET_SYSERR if not
  */
 int
@@ -159,7 +164,9 @@ GST_neighbours_handle_pong (const struct GNUNET_PeerIdentity *sender,
                            const struct GNUNET_MessageHeader *hdr,
                            const char *plugin_name,
                            const void *sender_address,
-                           size_t sender_address_len);
+                           size_t sender_address_len,
+                           const struct GNUNET_TRANSPORT_ATS_Information *ats,
+                           uint32_t ats_count);
 
 
 /**
@@ -171,6 +178,8 @@ GST_neighbours_handle_pong (const struct GNUNET_PeerIdentity *sender,
  * @param sender_address address of the other peer, NULL if other peer
  *                       connected to us
  * @param sender_address_len number of bytes in sender_address
+ * @param ats performance data
+ * @param ats_count number of entries in ats (excluding 0-termination)
  * @return GNUNET_OK if the message was well-formed, GNUNET_SYSERR if not
  */
 int
@@ -178,7 +187,10 @@ GST_neighbours_handle_connect (const struct GNUNET_PeerIdentity *sender,
                               const struct GNUNET_MessageHeader *hdr,
                               const char *plugin_name,
                               const void *sender_address,
-                              size_t sender_address_len);
+                              size_t sender_address_len,
+                              struct Session *session,
+                              const struct GNUNET_TRANSPORT_ATS_Information *ats,
+                              uint32_t ats_count);
 
 
 /**