aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_rps_service.h
diff options
context:
space:
mode:
authorJulius Bünger <buenger@mytum.de>2018-03-05 18:25:39 +0100
committerJulius Bünger <buenger@mytum.de>2018-03-05 18:34:35 +0100
commit132597e5050e591617cd4e303015608ff503d879 (patch)
treef8cebacaf2915bdcf812a89608ec90d540cca170 /src/include/gnunet_rps_service.h
parentd036b626b8eea15f99d91faf309843936289fde7 (diff)
downloadgnunet-132597e5050e591617cd4e303015608ff503d879.tar.gz
gnunet-132597e5050e591617cd4e303015608ff503d879.zip
rps: add debug function to api to get view of service
Diffstat (limited to 'src/include/gnunet_rps_service.h')
-rw-r--r--src/include/gnunet_rps_service.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/include/gnunet_rps_service.h b/src/include/gnunet_rps_service.h
index c91804a60..8267e28b2 100644
--- a/src/include/gnunet_rps_service.h
+++ b/src/include/gnunet_rps_service.h
@@ -66,6 +66,16 @@ typedef void (* GNUNET_RPS_NotifyReadyCB) (void *cls,
66 const struct GNUNET_PeerIdentity *peers); 66 const struct GNUNET_PeerIdentity *peers);
67 67
68/** 68/**
69 * Callback called when view was updated
70 *
71 * @param num_peers the number of peers returned
72 * @param peers array with num_peers PeerIDs
73 */
74typedef void (* GNUNET_RPS_ViewUpdateCB) (void *cls,
75 uint64_t num_peers,
76 const struct GNUNET_PeerIdentity *peers);
77
78/**
69 * Connect to the rps service 79 * Connect to the rps service
70 * 80 *
71 * @param cfg configuration to use 81 * @param cfg configuration to use
@@ -136,6 +146,22 @@ GNUNET_RPS_act_malicious (struct GNUNET_RPS_Handle *h,
136 const struct GNUNET_PeerIdentity *target_peer); 146 const struct GNUNET_PeerIdentity *target_peer);
137#endif /* ENABLE_MALICIOUS */ 147#endif /* ENABLE_MALICIOUS */
138 148
149/* Get internals for debugging/profiling purposes */
150
151/**
152 * Request updates of view
153 *
154 * @param rps_handle handle to the rps service
155 * @param num_req_peers number of peers we want to receive
156 * (0 for infinite updates)
157 * @param cls a closure that will be given to the callback
158 * @param ready_cb the callback called when the peers are available
159 */
160void
161GNUNET_RPS_view_request (struct GNUNET_RPS_Handle *rps_handle,
162 uint32_t num_updates,
163 GNUNET_RPS_ViewUpdateCB view_update_cb,
164 void *cls);
139 165
140/** 166/**
141 * Disconnect from the rps service 167 * Disconnect from the rps service