Merge branch 'master' of ssh://gnunet.org/gnunet
[oweals/gnunet.git] / src / rps / gnunet-service-rps_peers.h
index a6018265cbf7c868ad6c73cb03db934efc7f2068..bbac8600339c904119b36f5ce25615576e551858 100644 (file)
@@ -169,25 +169,27 @@ Peers_insert_peer (const struct GNUNET_PeerIdentity *peer);
  *                     peer was #own_identity)
  */
 int
-Peers_check_peer_live (const struct GNUNET_PeerIdentity *peer);
+Peers_issue_peer_liveliness_check (const struct GNUNET_PeerIdentity *peer);
 
 /**
- * @brief Remove unecessary data
- * 
- * If the other peer is not intending to send messages, we have messages pending
- * to be sent to this peer and we are not waiting for a reply, remove the
- * information about it (its #PeerContext).
+ * @brief Check if peer is removable.
  *
- * @param peer the peer to clean
- * @return #GNUNET_YES if peer was removed
- *         #GNUNET_NO  otherwise
+ * Check if
+ *  - a recv channel exists
+ *  - there are pending messages
+ *  - there is no pending pull reply
+ *
+ * @param peer the peer in question
+ * @return #GNUNET_YES    if peer is removable
+ *         #GNUNET_NO     if peer is NOT removable
+ *         #GNUNET_SYSERR if peer is not known
  */
 int
-Peers_clean_peer (const struct GNUNET_PeerIdentity *peer);
+Peers_check_removable (const struct GNUNET_PeerIdentity *peer);
 
 /**
  * @brief Remove peer
- * 
+ *
  * @param peer the peer to clean
  * @return #GNUNET_YES if peer was removed
  *         #GNUNET_NO  otherwise
@@ -320,7 +322,7 @@ void *
 Peers_handle_inbound_channel (void *cls,
                               struct GNUNET_CADET_Channel *channel,
                               const struct GNUNET_PeerIdentity *initiator,
-                              uint32_t port,
+                              const struct GNUNET_HashCode *port,
                               enum GNUNET_CADET_ChannelOption options);
 
 /**
@@ -380,17 +382,6 @@ Peers_cleanup_destroyed_channel (void *cls,
                                  const struct GNUNET_CADET_Channel *channel,
                                  void *channel_ctx);
 
-/**
- * @brief Issue a check whether peer is live
- *
- * This tries to establish a channel to the given peer. Once the channel is
- * established successfully, we know the peer is live.
- *
- * @param peer the peer to check liveliness
- */
-void
-Peers_issue_peer_liveliness_check (const struct GNUNET_PeerIdentity *peer);
-
 /**
  * @brief Send a message to another peer.
  *