X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=src%2Fcadet%2Fgnunet-service-cadet-new_peer.h;h=e1d6fc33a5e3770d81e5a8132c180295c456c7e2;hb=cef53c8a38a628335e85dbf16c261cccc58512c5;hp=8a1d3ed5c4ea58eba3965c88dfd1ccc3414d77e2;hpb=5bf979114ebbb73014761dfb20f985a561c4876e;p=oweals%2Fgnunet.git diff --git a/src/cadet/gnunet-service-cadet-new_peer.h b/src/cadet/gnunet-service-cadet-new_peer.h index 8a1d3ed5c..e1d6fc33a 100644 --- a/src/cadet/gnunet-service-cadet-new_peer.h +++ b/src/cadet/gnunet-service-cadet-new_peer.h @@ -59,6 +59,20 @@ GCP_get (const struct GNUNET_PeerIdentity *peer_id, int create); +/** + * Calculate how desirable a path is for @a cp if + * @a cp is at offset @a off in the path. + * + * @param cp a peer reachable via a path + * @param off offset of @a cp in a path + * @return score how useful a path is to reach @a cp, + * positive scores mean path is more desirable + */ +double +GCP_get_desirability_of_path (struct CadetPeer *cp, + unsigned int off); + + /** * Obtain the peer identity for a `struct CadetPeer`. * @@ -90,6 +104,16 @@ unsigned int GCP_count_paths (const struct CadetPeer *cp); +/** + * Drop all paths owned by this peer, and do not + * allow new ones to be added: We are shutting down. + * + * @param cp peer to drop paths to + */ +void +GCP_drop_owned_paths (struct CadetPeer *cp); + + /** * Peer path iterator. *