tolerate additional IPv4 address now available for gnunet.org
[oweals/gnunet.git] / src / rps / gnunet-service-rps_sampler_elem.h
index 861a579bc0b8bbafb5f24443485f322d1b6078aa..3f33a6816f00399f1f821daa446de33b7a5b6712 100644 (file)
@@ -2,20 +2,20 @@
      This file is part of GNUnet.
      Copyright (C)
 
-     GNUnet is free software; you can redistribute it and/or modify
-     it under the terms of the GNU General Public License as published
-     by the Free Software Foundation; either version 3, or (at your
-     option) any later version.
+     GNUnet is free software: you can redistribute it and/or modify it
+     under the terms of the GNU Affero General Public License as published
+     by the Free Software Foundation, either version 3 of the License,
+     or (at your option) any later version.
 
      GNUnet is distributed in the hope that it will be useful, but
      WITHOUT ANY WARRANTY; without even the implied warranty of
      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-     General Public License for more details.
+     Affero General Public License for more details.
+    
+     You should have received a copy of the GNU Affero General Public License
+     along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-     You should have received a copy of the GNU General Public License
-     along with GNUnet; see the file COPYING.  If not, write to the
-     Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-     Boston, MA 02110-1301, USA.
+     SPDX-License-Identifier: AGPL3.0-or-later
 */
 
 /**
@@ -101,10 +101,10 @@ struct RPS_SamplerElement
 /**
  * Reinitialise a previously initialised sampler element.
  *
- * @param sampler pointer to the memory that keeps the value.
+ * @param sampler_el The sampler element to (re-) initialise
  */
 void
-RPS_sampler_elem_reinit (struct RPS_SamplerElement *sampler_el);
+RPS_sampler_elem_reinit (struct RPS_SamplerElement *sampler_elem);
 
 
 /**
@@ -120,23 +120,32 @@ RPS_sampler_elem_create (void);
 
 
 /**
- * Input an PeerID into the given sampler element.
+ * Destroy a sampler element.
  *
- * @param sampler the sampler the @a s_elem belongs to.
- *                Needed to know the
+ * @param sampler_elem the element to destroy
  */
 void
-RPS_sampler_elem_next (struct RPS_SamplerElement *s_elem,
+RPS_sampler_elem_destroy (struct RPS_SamplerElement *sampler_elem);
+
+
+/**
+ * Update a sampler element with a PeerID
+ *
+ * @param sampler_elem The sampler element to update
+ * @param new_ID The PeerID to update with
+ */
+void
+RPS_sampler_elem_next (struct RPS_SamplerElement *sampler_elem,
                        const struct GNUNET_PeerIdentity *new_ID);
 
 /**
- * Initialise the min-wise independent function of the given sampler element.
+ * Set the min-wise independent function of the given sampler element.
  *
- * @param s_elem the sampler element
+ * @param sampler_elem the sampler element
  * @param auth_key the key to use
  */
 void
-RPS_sampler_elem_set (struct RPS_SamplerElement *s_elem,
+RPS_sampler_elem_set (struct RPS_SamplerElement *sampler_elem,
                       struct GNUNET_CRYPTO_AuthKey auth_key);