summaryrefslogtreecommitdiff
path: root/src/include/gnunet_rps_service.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/gnunet_rps_service.h')
-rw-r--r--src/include/gnunet_rps_service.h76
1 files changed, 38 insertions, 38 deletions
diff --git a/src/include/gnunet_rps_service.h b/src/include/gnunet_rps_service.h
index b669c55ef..a580d1cc2 100644
--- a/src/include/gnunet_rps_service.h
+++ b/src/include/gnunet_rps_service.h
@@ -11,7 +11,7 @@
11 WITHOUT ANY WARRANTY; without even the implied warranty of 11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Affero General Public License for more details. 13 Affero General Public License for more details.
14 14
15 You should have received a copy of the GNU Affero General Public License 15 You should have received a copy of the GNU Affero General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>. 16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17 17
@@ -62,8 +62,8 @@ struct GNUNET_RPS_Request_Handle;
62 * @param peers array with num_peers PeerIDs 62 * @param peers array with num_peers PeerIDs
63 */ 63 */
64typedef void (* GNUNET_RPS_NotifyReadyCB) (void *cls, 64typedef void (* GNUNET_RPS_NotifyReadyCB) (void *cls,
65 uint64_t num_peers, 65 uint64_t num_peers,
66 const struct GNUNET_PeerIdentity *peers); 66 const struct GNUNET_PeerIdentity *peers);
67 67
68 68
69/** 69/**
@@ -76,9 +76,9 @@ typedef void (* GNUNET_RPS_NotifyReadyCB) (void *cls,
76 * @param num_observed Number of IDs this sampler has observed 76 * @param num_observed Number of IDs this sampler has observed
77 */ 77 */
78typedef void (* GNUNET_RPS_NotifyReadySingleInfoCB) (void *cls, 78typedef void (* GNUNET_RPS_NotifyReadySingleInfoCB) (void *cls,
79 const struct GNUNET_PeerIdentity *peer, 79 const struct GNUNET_PeerIdentity *peer,
80 double probability, 80 double probability,
81 uint32_t num_observed); 81 uint32_t num_observed);
82 82
83 83
84/** 84/**
@@ -88,7 +88,7 @@ typedef void (* GNUNET_RPS_NotifyReadySingleInfoCB) (void *cls,
88 * @return handle to the rps service 88 * @return handle to the rps service
89 */ 89 */
90struct GNUNET_RPS_Handle * 90struct GNUNET_RPS_Handle *
91GNUNET_RPS_connect (const struct GNUNET_CONFIGURATION_Handle *cfg); 91GNUNET_RPS_connect(const struct GNUNET_CONFIGURATION_Handle *cfg);
92 92
93 93
94/** 94/**
@@ -98,8 +98,8 @@ GNUNET_RPS_connect (const struct GNUNET_CONFIGURATION_Handle *cfg);
98 * @param shared_value The shared value that defines the members of the sub (-group) 98 * @param shared_value The shared value that defines the members of the sub (-group)
99 */ 99 */
100void 100void
101GNUNET_RPS_sub_start (struct GNUNET_RPS_Handle *h, 101GNUNET_RPS_sub_start(struct GNUNET_RPS_Handle *h,
102 const char *shared_value); 102 const char *shared_value);
103 103
104 104
105/** 105/**
@@ -109,8 +109,8 @@ GNUNET_RPS_sub_start (struct GNUNET_RPS_Handle *h,
109 * @param shared_value The shared value that defines the members of the sub (-group) 109 * @param shared_value The shared value that defines the members of the sub (-group)
110 */ 110 */
111void 111void
112GNUNET_RPS_sub_stop (struct GNUNET_RPS_Handle *h, 112GNUNET_RPS_sub_stop(struct GNUNET_RPS_Handle *h,
113 const char *shared_value); 113 const char *shared_value);
114 114
115 115
116/** 116/**
@@ -128,9 +128,9 @@ GNUNET_RPS_sub_stop (struct GNUNET_RPS_Handle *h,
128 * @return handle to this request 128 * @return handle to this request
129 */ 129 */
130struct GNUNET_RPS_Request_Handle * 130struct GNUNET_RPS_Request_Handle *
131GNUNET_RPS_request_peers (struct GNUNET_RPS_Handle *h, uint32_t n, 131GNUNET_RPS_request_peers(struct GNUNET_RPS_Handle *h, uint32_t n,
132 GNUNET_RPS_NotifyReadyCB ready_cb, 132 GNUNET_RPS_NotifyReadyCB ready_cb,
133 void *cls); 133 void *cls);
134 134
135 135
136/** 136/**
@@ -142,9 +142,9 @@ GNUNET_RPS_request_peers (struct GNUNET_RPS_Handle *h, uint32_t n,
142 * @return a handle to cancel this request 142 * @return a handle to cancel this request
143 */ 143 */
144struct GNUNET_RPS_Request_Handle_Single_Info * 144struct GNUNET_RPS_Request_Handle_Single_Info *
145GNUNET_RPS_request_peer_info (struct GNUNET_RPS_Handle *rps_handle, 145GNUNET_RPS_request_peer_info(struct GNUNET_RPS_Handle *rps_handle,
146 GNUNET_RPS_NotifyReadySingleInfoCB ready_cb, 146 GNUNET_RPS_NotifyReadySingleInfoCB ready_cb,
147 void *cls); 147 void *cls);
148 148
149 149
150/** 150/**
@@ -155,8 +155,8 @@ GNUNET_RPS_request_peer_info (struct GNUNET_RPS_Handle *rps_handle,
155 * @param ids the ids of the peers seeded 155 * @param ids the ids of the peers seeded
156 */ 156 */
157void 157void
158GNUNET_RPS_seed_ids (struct GNUNET_RPS_Handle *h, uint32_t n, 158GNUNET_RPS_seed_ids(struct GNUNET_RPS_Handle *h, uint32_t n,
159 const struct GNUNET_PeerIdentity * ids); 159 const struct GNUNET_PeerIdentity * ids);
160 160
161/** 161/**
162 * Cancle an issued request. 162 * Cancle an issued request.
@@ -164,7 +164,7 @@ GNUNET_RPS_seed_ids (struct GNUNET_RPS_Handle *h, uint32_t n,
164 * @param rh handle of the pending request to be canceled 164 * @param rh handle of the pending request to be canceled
165 */ 165 */
166void 166void
167GNUNET_RPS_request_cancel (struct GNUNET_RPS_Request_Handle *rh); 167GNUNET_RPS_request_cancel(struct GNUNET_RPS_Request_Handle *rh);
168 168
169 169
170/** 170/**
@@ -173,8 +173,8 @@ GNUNET_RPS_request_cancel (struct GNUNET_RPS_Request_Handle *rh);
173 * @param rhs request handle of request to cancle 173 * @param rhs request handle of request to cancle
174 */ 174 */
175void 175void
176GNUNET_RPS_request_single_info_cancel ( 176GNUNET_RPS_request_single_info_cancel(
177 struct GNUNET_RPS_Request_Handle_Single_Info *rhs); 177 struct GNUNET_RPS_Request_Handle_Single_Info *rhs);
178 178
179 179
180#if ENABLE_MALICIOUS 180#if ENABLE_MALICIOUS
@@ -192,12 +192,12 @@ GNUNET_RPS_request_single_info_cancel (
192 * if @type is 2 the last id is the id of the 192 * if @type is 2 the last id is the id of the
193 * peer to be isolated from the rest 193 * peer to be isolated from the rest
194 */ 194 */
195 void 195void
196GNUNET_RPS_act_malicious (struct GNUNET_RPS_Handle *h, 196GNUNET_RPS_act_malicious(struct GNUNET_RPS_Handle *h,
197 uint32_t type, 197 uint32_t type,
198 uint32_t num_peers, 198 uint32_t num_peers,
199 const struct GNUNET_PeerIdentity *ids, 199 const struct GNUNET_PeerIdentity *ids,
200 const struct GNUNET_PeerIdentity *target_peer); 200 const struct GNUNET_PeerIdentity *target_peer);
201#endif /* ENABLE_MALICIOUS */ 201#endif /* ENABLE_MALICIOUS */
202 202
203/* Get internals for debugging/profiling purposes */ 203/* Get internals for debugging/profiling purposes */
@@ -212,10 +212,10 @@ GNUNET_RPS_act_malicious (struct GNUNET_RPS_Handle *h,
212 * @param ready_cb the callback called when the peers are available 212 * @param ready_cb the callback called when the peers are available
213 */ 213 */
214void 214void
215GNUNET_RPS_view_request (struct GNUNET_RPS_Handle *rps_handle, 215GNUNET_RPS_view_request(struct GNUNET_RPS_Handle *rps_handle,
216 uint32_t num_updates, 216 uint32_t num_updates,
217 GNUNET_RPS_NotifyReadyCB view_update_cb, 217 GNUNET_RPS_NotifyReadyCB view_update_cb,
218 void *cls); 218 void *cls);
219 219
220 220
221/** 221/**
@@ -226,9 +226,9 @@ GNUNET_RPS_view_request (struct GNUNET_RPS_Handle *rps_handle,
226 * @param ready_cb the callback called when the peers are available 226 * @param ready_cb the callback called when the peers are available
227 */ 227 */
228struct GNUNET_RPS_StreamRequestHandle * 228struct GNUNET_RPS_StreamRequestHandle *
229GNUNET_RPS_stream_request (struct GNUNET_RPS_Handle *rps_handle, 229GNUNET_RPS_stream_request(struct GNUNET_RPS_Handle *rps_handle,
230 GNUNET_RPS_NotifyReadyCB stream_input_cb, 230 GNUNET_RPS_NotifyReadyCB stream_input_cb,
231 void *cls); 231 void *cls);
232 232
233 233
234/** 234/**
@@ -237,7 +237,7 @@ GNUNET_RPS_stream_request (struct GNUNET_RPS_Handle *rps_handle,
237 * @param srh The request handle to cancel 237 * @param srh The request handle to cancel
238 */ 238 */
239void 239void
240GNUNET_RPS_stream_cancel (struct GNUNET_RPS_StreamRequestHandle *srh); 240GNUNET_RPS_stream_cancel(struct GNUNET_RPS_StreamRequestHandle *srh);
241 241
242 242
243/** 243/**
@@ -245,8 +245,8 @@ GNUNET_RPS_stream_cancel (struct GNUNET_RPS_StreamRequestHandle *srh);
245 * 245 *
246 * @param h the handle to the rps service 246 * @param h the handle to the rps service
247 */ 247 */
248 void 248void
249GNUNET_RPS_disconnect (struct GNUNET_RPS_Handle *h); 249GNUNET_RPS_disconnect(struct GNUNET_RPS_Handle *h);
250 250
251 251
252#if 0 /* keep Emacsens' auto-indent happy */ 252#if 0 /* keep Emacsens' auto-indent happy */