34#ifndef GNUNET_RPS_SERVICE_H
35#define GNUNET_RPS_SERVICE_H
48#define GNUNET_RPS_VERSION 0x00000000
86 uint32_t num_observed);
107 const char *shared_value);
118 const char *shared_value);
222 uint32_t num_updates,
static struct GNUNET_ARM_Handle * h
Connection with ARM.
static struct GNUNET_CONFIGURATION_Handle * cfg
Our configuration.
static uint32_t type
Type string converted to DNS type value.
static struct GNUNET_RPS_Handle * rps_handle
RPS handle.
struct GNUNET_CONTAINER_MultiPeerMap * peers
Map from PIDs to struct CadetPeer entries.
static unsigned int num_peers
Number of peers.
void GNUNET_RPS_sub_stop(struct GNUNET_RPS_Handle *h, const char *shared_value)
Stop a sub with the given shared value.
void GNUNET_RPS_sub_start(struct GNUNET_RPS_Handle *h, const char *shared_value)
Start a sub with the given shared value.
void GNUNET_RPS_request_cancel(struct GNUNET_RPS_Request_Handle *rh)
Cancel an issued request.
void GNUNET_RPS_stream_cancel(struct GNUNET_RPS_StreamRequestHandle *srh)
Cancel a specific request for updates from the biased peer stream.
void(* GNUNET_RPS_NotifyReadySingleInfoCB)(void *cls, const struct GNUNET_PeerIdentity *peer, double probability, uint32_t num_observed)
Callback called when requested random peer with additional information is available.
struct GNUNET_RPS_Handle * GNUNET_RPS_connect(const struct GNUNET_CONFIGURATION_Handle *cfg)
Connect to the rps service.
struct GNUNET_RPS_StreamRequestHandle * GNUNET_RPS_stream_request(struct GNUNET_RPS_Handle *rps_handle, GNUNET_RPS_NotifyReadyCB stream_input_cb, void *cls)
Request biased stream of peers that are being put into the sampler.
void GNUNET_RPS_view_request(struct GNUNET_RPS_Handle *rps_handle, uint32_t num_updates, GNUNET_RPS_NotifyReadyCB view_update_cb, void *cls)
Request updates of view.
void GNUNET_RPS_seed_ids(struct GNUNET_RPS_Handle *h, uint32_t n, const struct GNUNET_PeerIdentity *ids)
Seed rps service with peerIDs.
void(* GNUNET_RPS_NotifyReadyCB)(void *cls, uint64_t num_peers, const struct GNUNET_PeerIdentity *peers)
Callback called when requested random peers are available.
void GNUNET_RPS_disconnect(struct GNUNET_RPS_Handle *h)
Disconnect from the rps service.
struct GNUNET_RPS_Request_Handle_Single_Info * GNUNET_RPS_request_peer_info(struct GNUNET_RPS_Handle *rps_handle, GNUNET_RPS_NotifyReadySingleInfoCB ready_cb, void *cls)
Request one random peer, getting additional information.
struct GNUNET_RPS_Request_Handle * GNUNET_RPS_request_peers(struct GNUNET_RPS_Handle *h, uint32_t n, GNUNET_RPS_NotifyReadyCB ready_cb, void *cls)
Request n random peers.
void GNUNET_RPS_request_single_info_cancel(struct GNUNET_RPS_Request_Handle_Single_Info *rhs)
Cancel an issued single info request.
The identity of the host (wraps the signing key of the peer).
Handler to handle requests from a client.
Handler for a single request from a client.
GNUNET_RPS_NotifyReadySingleInfoCB ready_cb
The callback to be called when we receive an answer.
Handler for a single request from a client.
GNUNET_RPS_NotifyReadyCB ready_cb
The callback to be called when we receive an answer.
Handle for a request to get peers from biased stream of ids.