aboutsummaryrefslogtreecommitdiff
path: root/src/rps/gnunet-service-rps_sampler_elem.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/rps/gnunet-service-rps_sampler_elem.h')
-rw-r--r--src/rps/gnunet-service-rps_sampler_elem.h30
1 files changed, 14 insertions, 16 deletions
diff --git a/src/rps/gnunet-service-rps_sampler_elem.h b/src/rps/gnunet-service-rps_sampler_elem.h
index 3f33a6816..c22b7413c 100644
--- a/src/rps/gnunet-service-rps_sampler_elem.h
+++ b/src/rps/gnunet-service-rps_sampler_elem.h
@@ -11,12 +11,12 @@
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
18 SPDX-License-Identifier: AGPL3.0-or-later 18 SPDX-License-Identifier: AGPL3.0-or-later
19*/ 19 */
20 20
21/** 21/**
22 * @file rps/gnunet-service-rps_sampler_elem.h 22 * @file rps/gnunet-service-rps_sampler_elem.h
@@ -30,15 +30,14 @@
30 30
31 31
32/*********************************************************************** 32/***********************************************************************
33 * WARNING: This section needs to be reviewed regarding the use of 33* WARNING: This section needs to be reviewed regarding the use of
34 * functions providing (pseudo)randomness! 34* functions providing (pseudo)randomness!
35 ***********************************************************************/ 35***********************************************************************/
36 36
37/** 37/**
38 * Used to indicate whether a sampler element is empty. 38 * Used to indicate whether a sampler element is empty.
39 */ 39 */
40enum RPS_SamplerEmpty 40enum RPS_SamplerEmpty {
41{
42 NOT_EMPTY = 0x0, 41 NOT_EMPTY = 0x0,
43 EMPTY = 0x1 42 EMPTY = 0x1
44}; 43};
@@ -46,8 +45,7 @@ enum RPS_SamplerEmpty
46/** 45/**
47 * A sampler element sampling one PeerID at a time. 46 * A sampler element sampling one PeerID at a time.
48 */ 47 */
49struct RPS_SamplerElement 48struct RPS_SamplerElement {
50{
51 /** 49 /**
52 * Min-wise linear permutation used by this sampler. 50 * Min-wise linear permutation used by this sampler.
53 * 51 *
@@ -104,7 +102,7 @@ struct RPS_SamplerElement
104 * @param sampler_el The sampler element to (re-) initialise 102 * @param sampler_el The sampler element to (re-) initialise
105 */ 103 */
106void 104void
107RPS_sampler_elem_reinit (struct RPS_SamplerElement *sampler_elem); 105RPS_sampler_elem_reinit(struct RPS_SamplerElement *sampler_elem);
108 106
109 107
110/** 108/**
@@ -116,7 +114,7 @@ RPS_sampler_elem_reinit (struct RPS_SamplerElement *sampler_elem);
116 * @return a newly created RPS_SamplerElement which currently holds no id. 114 * @return a newly created RPS_SamplerElement which currently holds no id.
117 */ 115 */
118struct RPS_SamplerElement * 116struct RPS_SamplerElement *
119RPS_sampler_elem_create (void); 117RPS_sampler_elem_create(void);
120 118
121 119
122/** 120/**
@@ -125,7 +123,7 @@ RPS_sampler_elem_create (void);
125 * @param sampler_elem the element to destroy 123 * @param sampler_elem the element to destroy
126 */ 124 */
127void 125void
128RPS_sampler_elem_destroy (struct RPS_SamplerElement *sampler_elem); 126RPS_sampler_elem_destroy(struct RPS_SamplerElement *sampler_elem);
129 127
130 128
131/** 129/**
@@ -135,8 +133,8 @@ RPS_sampler_elem_destroy (struct RPS_SamplerElement *sampler_elem);
135 * @param new_ID The PeerID to update with 133 * @param new_ID The PeerID to update with
136 */ 134 */
137void 135void
138RPS_sampler_elem_next (struct RPS_SamplerElement *sampler_elem, 136RPS_sampler_elem_next(struct RPS_SamplerElement *sampler_elem,
139 const struct GNUNET_PeerIdentity *new_ID); 137 const struct GNUNET_PeerIdentity *new_ID);
140 138
141/** 139/**
142 * Set the min-wise independent function of the given sampler element. 140 * Set the min-wise independent function of the given sampler element.
@@ -145,8 +143,8 @@ RPS_sampler_elem_next (struct RPS_SamplerElement *sampler_elem,
145 * @param auth_key the key to use 143 * @param auth_key the key to use
146 */ 144 */
147void 145void
148RPS_sampler_elem_set (struct RPS_SamplerElement *sampler_elem, 146RPS_sampler_elem_set(struct RPS_SamplerElement *sampler_elem,
149 struct GNUNET_CRYPTO_AuthKey auth_key); 147 struct GNUNET_CRYPTO_AuthKey auth_key);
150 148
151 149
152#endif /* RPS_SAMPLER_ELEM_H */ 150#endif /* RPS_SAMPLER_ELEM_H */