aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJulius Bünger <buenger@mytum.de>2019-04-08 01:04:19 +0200
committerJulius Bünger <buenger@mytum.de>2019-04-08 01:04:19 +0200
commit200d05b44a96d6fec00e28736038c838c679f650 (patch)
treee31478a7c56fec38033252a00cee7cd0f6764716 /src
parent3afe1a3435697b01fee557420a701fba1821dbe5 (diff)
downloadgnunet-200d05b44a96d6fec00e28736038c838c679f650.tar.gz
gnunet-200d05b44a96d6fec00e28736038c838c679f650.zip
RPS: Forgot to add header
Diffstat (limited to 'src')
-rw-r--r--src/include/gnunet_rps_service.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/src/include/gnunet_rps_service.h b/src/include/gnunet_rps_service.h
index b1dd1b5af..c88e75cc7 100644
--- a/src/include/gnunet_rps_service.h
+++ b/src/include/gnunet_rps_service.h
@@ -67,6 +67,21 @@ typedef void (* GNUNET_RPS_NotifyReadyCB) (void *cls,
67 67
68 68
69/** 69/**
70 * Callback called when requested random peer with additional information is
71 * available.
72 *
73 * @param cls the closure given with the request
74 * @param peer The Peer ID
75 * @param probability The probability with which all elements have been observed
76 * @param num_observed Number of IDs this sampler has observed
77 */
78typedef void (* GNUNET_RPS_NotifyReadySingleInfoCB) (void *cls,
79 const struct GNUNET_PeerIdentity *peer,
80 double probability,
81 uint32_t num_observed);
82
83
84/**
70 * Connect to the rps service 85 * Connect to the rps service
71 * 86 *
72 * @param cfg configuration to use 87 * @param cfg configuration to use
@@ -117,6 +132,21 @@ GNUNET_RPS_request_peers (struct GNUNET_RPS_Handle *h, uint32_t n,
117 GNUNET_RPS_NotifyReadyCB ready_cb, 132 GNUNET_RPS_NotifyReadyCB ready_cb,
118 void *cls); 133 void *cls);
119 134
135
136/**
137 * Request one random peer, getting additional information.
138 *
139 * @param rps_handle handle to the rps service
140 * @param ready_cb the callback called when the peers are available
141 * @param cls closure given to the callback
142 * @return a handle to cancel this request
143 */
144struct GNUNET_RPS_Request_Handle_Single_Info *
145GNUNET_RPS_request_peer_info (struct GNUNET_RPS_Handle *rps_handle,
146 GNUNET_RPS_NotifyReadySingleInfoCB ready_cb,
147 void *cls);
148
149
120/** 150/**
121 * Seed rps service with peerIDs. 151 * Seed rps service with peerIDs.
122 * 152 *
@@ -137,6 +167,16 @@ GNUNET_RPS_seed_ids (struct GNUNET_RPS_Handle *h, uint32_t n,
137GNUNET_RPS_request_cancel (struct GNUNET_RPS_Request_Handle *rh); 167GNUNET_RPS_request_cancel (struct GNUNET_RPS_Request_Handle *rh);
138 168
139 169
170/**
171 * Cancle an issued single info request.
172 *
173 * @param rhs request handle of request to cancle
174 */
175void
176GNUNET_RPS_request_single_info_cancel (
177 struct GNUNET_RPS_Request_Handle_Single_Info *rhs);
178
179
140#if ENABLE_MALICIOUS 180#if ENABLE_MALICIOUS
141/** 181/**
142 * Turn RPS service to act malicious. 182 * Turn RPS service to act malicious.