aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/include/gnunet_nse_service.h18
-rw-r--r--src/include/gnunet_signatures.h5
2 files changed, 20 insertions, 3 deletions
diff --git a/src/include/gnunet_nse_service.h b/src/include/gnunet_nse_service.h
index 012a61c22f..99c4e34b8a 100644
--- a/src/include/gnunet_nse_service.h
+++ b/src/include/gnunet_nse_service.h
@@ -56,7 +56,19 @@ extern "C"
*
* There are 86400000 milliseconds in a day.
*/
-#define GNUNET_NSE_INTERVAL 3600000 /* Once per hour */
+/*#define GNUNET_NSE_INTERVAL 360000*/ /* Every six minutes */
+#define GNUNET_NSE_INTERVAL 30000 /* Every minute */
+
+/**
+ * How much clock skew (in milliseconds) will we allow
+ * for received messages. We check our current time
+ * with the timestamp received as part of the message
+ * and if the difference is greater than this tolerance
+ * we will discard the message as invalid.
+ *
+ * There are 86400000 milliseconds in a day.
+ */
+#define GNUNET_NSE_DRIFT_TOLERANCE 600000 /* Ten minutes. */
/**
* Number of bits
@@ -76,9 +88,9 @@ struct GNUNET_NSE_Handle;
* @param estimate the value of the current network size estimate
* @param std_dev standard deviation (rounded down to nearest integer)
* of the size estimation values seen
- * @return GNUNET_OK to continue, GNUNET_SYSERR to abort iteration
+ *
*/
-typedef int
+typedef void
(*GNUNET_NSE_Callback) (void *cls, double estimate, double std_dev);
/**
diff --git a/src/include/gnunet_signatures.h b/src/include/gnunet_signatures.h
index 4c443cc00b..9b6a3d6b6a 100644
--- a/src/include/gnunet_signatures.h
+++ b/src/include/gnunet_signatures.h
@@ -112,6 +112,11 @@ extern "C"
*/
#define GNUNET_SIGNATURE_PURPOSE_CHAT_RECEIPT 13
+/**
+ * Signature of a network size estimate message.
+ */
+#define GNUNET_SIGNATURE_PURPOSE_NSE_SEND 14
+
#if 0 /* keep Emacsens' auto-indent happy */
{
#endif