gauger name
authorNathan S. Evans <evans@in.tum.de>
Thu, 3 Feb 2011 16:04:53 +0000 (16:04 +0000)
committerNathan S. Evans <evans@in.tum.de>
Thu, 3 Feb 2011 16:04:53 +0000 (16:04 +0000)
src/include/gauger.h [new file with mode: 0644]
src/include/gnunet_constants.h
src/include/gnunet_crypto_lib.h
src/include/gnunet_gauger.h [deleted file]

diff --git a/src/include/gauger.h b/src/include/gauger.h
new file mode 100644 (file)
index 0000000..063bf76
--- /dev/null
@@ -0,0 +1,10 @@
+#ifndef __GAUGER_H__
+#define __GAUGER_H__
+
+#include <unistd.h>
+#include <stdio.h>
+#include <sys/wait.h>
+
+#define GAUGER(counter, value) {char __gauger_s[32];pid_t __gauger_p;if(!(__gauger_p=fork())){if(!fork()){sprintf(__gauger_s,"%d",value);execlp("gauger-cli.py","gauger-cli.py",counter, __gauger_s,(char*)NULL);perror("gauger");_exit(1);}else{_exit(0);}}else{waitpid(__gauger_p,NULL,0);}}
+
+#endif
index 56a868e2ee68f6d429fe9f4d9b06676e0216e715..a0951b055e6bb238f26e959724e1c5f358a4c91f 100644 (file)
@@ -49,13 +49,13 @@ extern "C"
  * After how long do we consider a connection to a peer dead
  * if we don't receive messages from the peer?
  */
-#define GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MINUTES, 5)
+#define GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MINUTES, 3)
 
 /**
  * After how long do we consider a connection to a peer dead
  * if we got an explicit disconnect and were unable to reconnect?
  */
-#define GNUNET_CONSTANTS_DISCONNECT_SESSION_TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 5)
+#define GNUNET_CONSTANTS_DISCONNECT_SESSION_TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 3)
 
 /**
  * How long do we delay reading more from a peer after a quota violation?
@@ -76,7 +76,7 @@ extern "C"
 #define GNUNET_CONSTANTS_SERVICE_RETRY GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MILLISECONDS, 500)
 
 /**
- * After how long do we consider a service irresponsive
+ * After how long do we consider a service unresponsive
  * even if we assume that the service commonly does not
  * respond instantly (DNS, Database, etc.).
  */
@@ -85,7 +85,7 @@ extern "C"
 /**
  * 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)
+#define GNUNET_CONSTANTS_MAX_CORK_DELAY GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MILLISECONDS, 10)
 
 /**
  * Until which load do we consider the peer overly idle
index d0d7266091f5b8a0bbf4a8409f6642d8deced904..922dda43b81a51488be971a91524072ca00a6aeb 100644 (file)
@@ -690,6 +690,14 @@ GNUNET_CRYPTO_kdf (void *result, size_t out_len,
 struct GNUNET_CRYPTO_RsaPrivateKey *GNUNET_CRYPTO_rsa_key_create (void);
 
 
+/**
+ * Get the size of a key file.
+ *
+ * @return size of a gnunet private key
+ */
+uint32_t
+GNUNET_CRYPTO_rsa_key_size ();
+
 /**
  * Create a new private key by reading it from a file.  If the
  * files does not exist, create a new key and write it to the
diff --git a/src/include/gnunet_gauger.h b/src/include/gnunet_gauger.h
deleted file mode 100644 (file)
index 063bf76..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-#ifndef __GAUGER_H__
-#define __GAUGER_H__
-
-#include <unistd.h>
-#include <stdio.h>
-#include <sys/wait.h>
-
-#define GAUGER(counter, value) {char __gauger_s[32];pid_t __gauger_p;if(!(__gauger_p=fork())){if(!fork()){sprintf(__gauger_s,"%d",value);execlp("gauger-cli.py","gauger-cli.py",counter, __gauger_s,(char*)NULL);perror("gauger");_exit(1);}else{_exit(0);}}else{waitpid(__gauger_p,NULL,0);}}
-
-#endif