aboutsummaryrefslogtreecommitdiff
path: root/src/rps
diff options
context:
space:
mode:
authorWillow Liquorice <willow@howhill.com>2022-09-07 20:53:34 +0100
committerWillow Liquorice <willow@howhill.com>2022-10-03 00:44:35 +0100
commitac453afa5e8827759653b76dcd3c5f4317330285 (patch)
tree09dc1e73d6e907e8480c25260e10d714029b171f /src/rps
parentf246a9aa87ad07b480323ffa107839a4dc5c6dc3 (diff)
downloadgnunet-ac453afa5e8827759653b76dcd3c5f4317330285.tar.gz
gnunet-ac453afa5e8827759653b76dcd3c5f4317330285.zip
-DOC: Documentation cleanup pass through RPS subsystem
Diffstat (limited to 'src/rps')
-rw-r--r--src/rps/gnunet-rps-profiler.c2
-rw-r--r--src/rps/gnunet-rps.c2
-rw-r--r--src/rps/gnunet-service-rps.c12
-rw-r--r--src/rps/gnunet-service-rps_sampler_elem.c2
-rw-r--r--src/rps/rps-sampler_common.c22
-rw-r--r--src/rps/rps-sampler_common.h2
-rw-r--r--src/rps/rps_api.c2
7 files changed, 10 insertions, 34 deletions
diff --git a/src/rps/gnunet-rps-profiler.c b/src/rps/gnunet-rps-profiler.c
index 6d1236f08..df10ad5da 100644
--- a/src/rps/gnunet-rps-profiler.c
+++ b/src/rps/gnunet-rps-profiler.c
@@ -2206,7 +2206,7 @@ get_idx_of_pid (const struct GNUNET_PeerIdentity *pid)
2206 * @brief Counts number of peers in view of a that have b in their view 2206 * @brief Counts number of peers in view of a that have b in their view
2207 * 2207 *
2208 * @param a 2208 * @param a
2209 * @param uint32_tb 2209 * @param b
2210 * 2210 *
2211 * @return 2211 * @return
2212 */ 2212 */
diff --git a/src/rps/gnunet-rps.c b/src/rps/gnunet-rps.c
index 33c03f006..f90fc0d88 100644
--- a/src/rps/gnunet-rps.c
+++ b/src/rps/gnunet-rps.c
@@ -149,7 +149,7 @@ view_update_handle (void *cls,
149/** 149/**
150 * Callback called on receipt of peer from biased stream 150 * Callback called on receipt of peer from biased stream
151 * 151 *
152 * @param n number of peers 152 * @param num_peers number of peers
153 * @param recv_peers the received peers 153 * @param recv_peers the received peers
154 */ 154 */
155static void 155static void
diff --git a/src/rps/gnunet-service-rps.c b/src/rps/gnunet-service-rps.c
index f6fcf3ae7..be9324af9 100644
--- a/src/rps/gnunet-service-rps.c
+++ b/src/rps/gnunet-service-rps.c
@@ -1191,7 +1191,7 @@ check_operation_scheduled (const struct PeerContext *peer_ctx,
1191/** 1191/**
1192 * @brief Callback for scheduler to destroy a channel 1192 * @brief Callback for scheduler to destroy a channel
1193 * 1193 *
1194 * @param cls Context of the channel 1194 * @param channel_ctx Context of the channel
1195 */ 1195 */
1196static void 1196static void
1197destroy_channel (struct ChannelCtx *channel_ctx) 1197destroy_channel (struct ChannelCtx *channel_ctx)
@@ -3324,7 +3324,7 @@ check_client_seed (void *cls, const struct GNUNET_RPS_CS_SeedMessage *msg)
3324 * Handle seed from the client. 3324 * Handle seed from the client.
3325 * 3325 *
3326 * @param cls closure 3326 * @param cls closure
3327 * @param message the actual message 3327 * @param msg the actual message
3328 */ 3328 */
3329static void 3329static void
3330handle_client_seed (void *cls, 3330handle_client_seed (void *cls,
@@ -3362,7 +3362,7 @@ handle_client_seed (void *cls,
3362 * Handle RPS request from the client. 3362 * Handle RPS request from the client.
3363 * 3363 *
3364 * @param cls Client context 3364 * @param cls Client context
3365 * @param message Message containing the number of updates the client wants to 3365 * @param msg Message containing the number of updates the client wants to
3366 * receive 3366 * receive
3367 */ 3367 */
3368static void 3368static void
@@ -3416,7 +3416,7 @@ handle_client_view_cancel (void *cls,
3416 * Handle RPS request for biased stream from the client. 3416 * Handle RPS request for biased stream from the client.
3417 * 3417 *
3418 * @param cls Client context 3418 * @param cls Client context
3419 * @param message unused 3419 * @param msg unused
3420 */ 3420 */
3421static void 3421static void
3422handle_client_stream_request (void *cls, 3422handle_client_stream_request (void *cls,
@@ -4691,7 +4691,7 @@ valid_peers_iterator (void *cls,
4691 * @param cls Closure - Sub 4691 * @param cls Closure - Sub
4692 * @param peer id of the peer, NULL for last call 4692 * @param peer id of the peer, NULL for last call
4693 * @param hello hello message for the peer (can be NULL) 4693 * @param hello hello message for the peer (can be NULL)
4694 * @param error message 4694 * @param err_msg error message
4695 */ 4695 */
4696void 4696void
4697process_peerinfo_peers (void *cls, 4697process_peerinfo_peers (void *cls,
@@ -4823,7 +4823,7 @@ client_connect_cb (void *cls,
4823 * Callback called when a client disconnected from the service 4823 * Callback called when a client disconnected from the service
4824 * 4824 *
4825 * @param cls closure for the service 4825 * @param cls closure for the service
4826 * @param c the client that disconnected 4826 * @param client the client that disconnected
4827 * @param internal_cls should be equal to @a c 4827 * @param internal_cls should be equal to @a c
4828 */ 4828 */
4829static void 4829static void
diff --git a/src/rps/gnunet-service-rps_sampler_elem.c b/src/rps/gnunet-service-rps_sampler_elem.c
index aa8b72445..a6dc755a3 100644
--- a/src/rps/gnunet-service-rps_sampler_elem.c
+++ b/src/rps/gnunet-service-rps_sampler_elem.c
@@ -44,7 +44,7 @@
44/** 44/**
45 * Reinitialise a previously initialised sampler element. 45 * Reinitialise a previously initialised sampler element.
46 * 46 *
47 * @param sampler_el The sampler element to (re-) initialise 47 * @param sampler_elem The sampler element to (re-) initialise
48 */ 48 */
49void 49void
50RPS_sampler_elem_reinit (struct RPS_SamplerElement *sampler_elem) 50RPS_sampler_elem_reinit (struct RPS_SamplerElement *sampler_elem)
diff --git a/src/rps/rps-sampler_common.c b/src/rps/rps-sampler_common.c
index a30ba06a1..e3fb79501 100644
--- a/src/rps/rps-sampler_common.c
+++ b/src/rps/rps-sampler_common.c
@@ -191,15 +191,6 @@ RPS_sampler_set_desired_probability (struct RPS_Sampler *sampler,
191} 191}
192 192
193 193
194/**
195 * @brief Set the deficiency factor.
196 *
197 * Only used/useful with the client sampler
198 * (Maybe move to rps-sampler_client.{h|c} ?)
199 *
200 * @param sampler
201 * @param desired_probability
202 */
203void 194void
204RPS_sampler_set_deficiency_factor (struct RPS_Sampler *sampler, 195RPS_sampler_set_deficiency_factor (struct RPS_Sampler *sampler,
205 double deficiency_factor) 196 double deficiency_factor)
@@ -440,7 +431,6 @@ RPS_sampler_resize (struct RPS_Sampler *sampler, unsigned int new_size)
440 * Empty the sampler. 431 * Empty the sampler.
441 * 432 *
442 * @param sampler the sampler to empty. 433 * @param sampler the sampler to empty.
443 * @param new_size the new size of the sampler
444 */ 434 */
445static void 435static void
446sampler_empty (struct RPS_Sampler *sampler) 436sampler_empty (struct RPS_Sampler *sampler)
@@ -555,18 +545,6 @@ check_peer_info_ready (void *cls,
555} 545}
556 546
557 547
558/**
559 * Get n random peers out of the sampled peers.
560 *
561 * We might want to reinitialise this sampler after giving the
562 * corrsponding peer to the client.
563 * Random with or without consumption?
564 *
565 * @param sampler the sampler to get peers from.
566 * @param cb callback that will be called once the ids are ready.
567 * @param cls closure given to @a cb
568 * @param num_peers the number of peers requested
569 */
570struct RPS_SamplerRequestHandle * 548struct RPS_SamplerRequestHandle *
571RPS_sampler_get_n_rand_peers (struct RPS_Sampler *sampler, 549RPS_sampler_get_n_rand_peers (struct RPS_Sampler *sampler,
572 uint32_t num_peers, 550 uint32_t num_peers,
diff --git a/src/rps/rps-sampler_common.h b/src/rps/rps-sampler_common.h
index c60d37217..94727028a 100644
--- a/src/rps/rps-sampler_common.h
+++ b/src/rps/rps-sampler_common.h
@@ -325,8 +325,6 @@ RPS_sampler_resize (struct RPS_Sampler *sampler, unsigned int new_size);
325 * @param sampler the sampler to get peers from. 325 * @param sampler the sampler to get peers from.
326 * @param cb callback that will be called once the ids are ready. 326 * @param cb callback that will be called once the ids are ready.
327 * @param cls closure given to @a cb 327 * @param cls closure given to @a cb
328 * @param for_client #GNUNET_YES if result is used for client,
329 * #GNUNET_NO if used internally
330 * @param num_peers the number of peers requested 328 * @param num_peers the number of peers requested
331 */ 329 */
332struct RPS_SamplerRequestHandle * 330struct RPS_SamplerRequestHandle *
diff --git a/src/rps/rps_api.c b/src/rps/rps_api.c
index bb4c3597e..c4166745a 100644
--- a/src/rps/rps_api.c
+++ b/src/rps/rps_api.c
@@ -745,7 +745,7 @@ mq_error_handler (void *cls,
745 * (-group) 745 * (-group)
746 * 746 *
747 * @param share_val Share value 747 * @param share_val Share value
748 * @param hash[out] Pointer to the location in which the hash will be stored. 748 * @param[out] hash Pointer to the location in which the hash will be stored.
749 */ 749 */
750static void 750static void
751hash_from_share_val (const char *share_val, 751hash_from_share_val (const char *share_val,