header files
authorNathan S. Evans <evans@in.tum.de>
Sat, 16 Jul 2011 11:21:35 +0000 (11:21 +0000)
committerNathan S. Evans <evans@in.tum.de>
Sat, 16 Jul 2011 11:21:35 +0000 (11:21 +0000)
src/include/gnunet_nse_service.h
src/include/gnunet_signatures.h

index 012a61c22fe2067fa1f07af45ccc2c19e5aed95e..99c4e34b8a80384d216a9f7095441aeaaf92ef9b 100644 (file)
@@ -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);
 
 /**
index 4c443cc00bce57b84e92eab77dd54cb0e7890c8d..9b6a3d6b6a7f3f2ad811547a13259612d4790cef 100644 (file)
@@ -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