clean up
[oweals/gnunet.git] / src / include / gnunet_constants.h
index 99ed7753732e389c044179b05c08b0811ad9bd84..3b56f26d66b3db872aef1962cd1d37f3f433d512 100644 (file)
@@ -35,13 +35,15 @@ extern "C"
 #endif
 #endif
 
+#include "gnunet_bandwidth_lib.h"
+
 /**
- * Amount of bytes per minute (in/out) to assume initially (before
- * either peer has communicated any particular preference).  Should be
- * rather low; set so that at least one maximum-size message can be
- * send each minute.
+ * Bandwidth (in/out) to assume initially (before either peer has
+ * communicated any particular preference).  Should be rather low; set
+ * so that at least one maximum-size message can be send roughly once
+ * per minute.
  */
-#define GNUNET_CONSTANTS_DEFAULT_BPM_IN_OUT GNUNET_SERVER_MAX_MESSAGE_SIZE
+#define GNUNET_CONSTANTS_DEFAULT_BW_IN_OUT GNUNET_BANDWIDTH_value_init (1024)
 
 /**
  * After how long do we consider a connection to a peer dead
@@ -49,6 +51,34 @@ extern "C"
  */
 #define GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MINUTES, 5)
 
+/**
+ * How long do we wait after a FORK+EXEC before testing for the
+ * resulting process to be up (port open, waitpid, etc.)?
+ */
+#define GNUNET_CONSTANTS_EXEC_WAIT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MILLISECONDS, 100)
+
+/**
+ * After how long do we consider a service irresponsive
+ * even if we assume that the service commonly does not
+ * respond instantly (DNS, Database, etc.).
+ */
+#define GNUNET_CONSTANTS_SERVICE_TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MINUTES, 10)
+
+/**
+ * How long do we delay messages to get larger packet sizes (CORKing)?
+ */
+#define GNUNET_CONSTANTS_MAX_CORK_DELAY GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 1)
+
+/**
+ * Until which load do we consider the peer overly idle
+ * (which means that we would like to use more resources).<p>
+ *
+ * Note that we use 70 to leave some room for applications
+ * to consume resources "idly" (i.e. up to 85%) and then
+ * still have some room for "paid for" resource consumption.
+ */
+#define GNUNET_CONSTANTS_IDLE_LOAD_THRESHOLD 70
+
 
 #if 0                           /* keep Emacsens' auto-indent happy */
 {