+/**
+ * Callback that is called from _get_rand_peer() when the PeerID is ready.
+ *
+ * @param cls the closure given alongside this function.
+ * @param id the PeerID that was returned
+ */
+typedef void
+(*RPS_sampler_rand_peer_ready_cont) (void *cls,
+ const struct GNUNET_PeerIdentity *id);
+
+
+/**
+ * Closure for #sampler_mod_get_rand_peer() and #sampler_get_rand_peer
+ */
+struct GetPeerCls
+{
+ /**
+ * DLL
+ */
+ struct GetPeerCls *next;
+
+ /**
+ * DLL
+ */
+ struct GetPeerCls *prev;
+
+ /**
+ * The sampler this function operates on.
+ */
+ struct RPS_Sampler *sampler;
+
+ /**
+ * The task for this function.
+ */
+ struct GNUNET_SCHEDULER_Task *get_peer_task;
+
+ /**
+ * The callback
+ */
+ RPS_sampler_rand_peer_ready_cont cont;
+
+ /**
+ * The closure to the callback @e cont
+ */
+ void *cont_cls;
+
+ /**
+ * The address of the id to be stored at
+ */
+ struct GNUNET_PeerIdentity *id;
+};
+
+
+/**
+ * Type of function used to differentiate between modified and not modified
+ * Sampler.
+ */
+typedef void
+(*RPS_get_peers_type) (void *cls,
+ const struct GNUNET_SCHEDULER_TaskContext *tc);
+
+/**
+ * Get one random peer out of the sampled peers.
+ *
+ * We might want to reinitialise this sampler after giving the
+ * corrsponding peer to the client.
+ * Only used internally
+ */
+static void
+sampler_get_rand_peer (void *cls,
+ const struct GNUNET_SCHEDULER_TaskContext *tc);
+
+/**
+ * Get one random peer out of the sampled peers.
+ *
+ * We might want to reinitialise this sampler after giving the
+ * corrsponding peer to the client.
+ */
+static void
+sampler_mod_get_rand_peer (void *cls,
+ const struct GNUNET_SCHEDULER_TaskContext *tc);
+
+