fix more leaks
[oweals/gnunet.git] / src / transport / gnunet-service-transport_neighbours.h
index d137c311d9efa2496d07b821b994380ff50195e0..aae0a82b820f683c034579686acd58231003f806 100644 (file)
  * @param connect_cb function to call if we connect to a peer
  * @param disconnect_cb function to call if we disconnect from a peer
  * @param peer_address_cb function to call if a neighbour's active address changes
+ * @param max_fds maximum number of fds to use
  */
 void
 GST_neighbours_start (void *cls,
-                      NotifyConnect connect_cb,
+                                                                       NotifyConnect connect_cb,
                       GNUNET_TRANSPORT_NotifyDisconnect disconnect_cb,
-                      GNUNET_TRANSPORT_PeerIterateCallback peer_address_cb);
+                      GNUNET_TRANSPORT_PeerIterateCallback peer_address_cb,
+                      unsigned int max_fds);
 
 
 /**
@@ -84,7 +86,9 @@ GST_neighbours_test_connected (const struct GNUNET_PeerIdentity *target);
  * @param cls closure
  * @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);
+typedef void (*GST_NeighbourSendContinuation) (void *cls, int success,
+                                               size_t bytes_payload,
+                                               size_t bytes_on_wire);
 
 
 /**
@@ -134,13 +138,9 @@ GST_neighbours_keepalive (const struct GNUNET_PeerIdentity *neighbour);
  * to this peer
  *
  * @param neighbour neighbour to keep alive
- * @param ats performance data
- * @param ats_count number of entries in ats
  */
 void
-GST_neighbours_keepalive_response (const struct GNUNET_PeerIdentity *neighbour,
-                                   const struct GNUNET_ATS_Information *ats,
-                                   uint32_t ats_count);
+GST_neighbours_keepalive_response (const struct GNUNET_PeerIdentity *neighbour);
 
 
 /**
@@ -168,8 +168,6 @@ GST_neighbours_force_disconnect (const struct GNUNET_PeerIdentity *target);
  *
  * @param cls closure
  * @param neighbour identity of the neighbour
- * @param ats performance data
- * @param ats_count number of entries in ats (including 0-termination)
  * @param address the address (or NULL)
  * @param bandwidth_in inbound quota in NBO
  * @param bandwidth_out outbound quota in NBO
@@ -177,8 +175,6 @@ GST_neighbours_force_disconnect (const struct GNUNET_PeerIdentity *target);
 typedef void (*GST_NeighbourIterator) (void *cls,
                                        const struct GNUNET_PeerIdentity *
                                        neighbour,
-                                       const struct GNUNET_ATS_Information *
-                                       ats, uint32_t ats_count,
                                        const struct GNUNET_HELLO_Address *
                                        address,
                                        struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in,
@@ -240,16 +236,12 @@ GST_neighbours_switch_to_address (const struct GNUNET_PeerIdentity *peer,
  * @param address address of the other peer, NULL if other peer
  *                       connected to us
  * @param session session to use (or NULL)
- * @param ats performance data
- * @param ats_count number of entries in ats (excluding 0-termination)
-  */
+ */
 void
 GST_neighbours_handle_connect (const struct GNUNET_MessageHeader *message,
                                const struct GNUNET_PeerIdentity *peer,
                                const struct GNUNET_HELLO_Address *address,
-                               struct Session *session,
-                               const struct GNUNET_ATS_Information *ats,
-                               uint32_t ats_count);
+                               struct Session *session);
 
 
 /**
@@ -261,16 +253,12 @@ GST_neighbours_handle_connect (const struct GNUNET_MessageHeader *message,
  * @param address address of the other peer, NULL if other peer
  *                       connected to us
  * @param session session to use (or NULL)
- * @param ats performance data
- * @param ats_count number of entries in ats
  */
 void
 GST_neighbours_handle_connect_ack (const struct GNUNET_MessageHeader *message,
                                    const struct GNUNET_PeerIdentity *peer,
                                    const struct GNUNET_HELLO_Address *address,
-                                   struct Session *session,
-                                   const struct GNUNET_ATS_Information *ats,
-                                   uint32_t ats_count);
+                                   struct Session *session);
 
 
 /**
@@ -282,16 +270,12 @@ GST_neighbours_handle_connect_ack (const struct GNUNET_MessageHeader *message,
  * @param address address of the other peer, NULL if other peer
  *                       connected to us
  * @param session session to use (or NULL)
- * @param ats performance data
- * @param ats_count number of entries in ats
  */
 void
 GST_neighbours_handle_session_ack (const struct GNUNET_MessageHeader *message,
                                   const struct GNUNET_PeerIdentity *peer,
                                   const struct GNUNET_HELLO_Address *address,
-                                  struct Session *session,
-                                  const struct GNUNET_ATS_Information *ats,
-                                  uint32_t ats_count);
+                                  struct Session *session);
 
 
 /**