From: Nathan S. Evans Date: Thu, 3 Feb 2011 16:04:53 +0000 (+0000) Subject: gauger name X-Git-Tag: initial-import-from-subversion-38251~19198 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=d212b98f15bc7950985da14b2768264fc6492a5c;p=oweals%2Fgnunet.git gauger name --- diff --git a/src/include/gauger.h b/src/include/gauger.h new file mode 100644 index 000000000..063bf763d --- /dev/null +++ b/src/include/gauger.h @@ -0,0 +1,10 @@ +#ifndef __GAUGER_H__ +#define __GAUGER_H__ + +#include +#include +#include + +#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 diff --git a/src/include/gnunet_constants.h b/src/include/gnunet_constants.h index 56a868e2e..a0951b055 100644 --- a/src/include/gnunet_constants.h +++ b/src/include/gnunet_constants.h @@ -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 diff --git a/src/include/gnunet_crypto_lib.h b/src/include/gnunet_crypto_lib.h index d0d726609..922dda43b 100644 --- a/src/include/gnunet_crypto_lib.h +++ b/src/include/gnunet_crypto_lib.h @@ -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 index 063bf763d..000000000 --- a/src/include/gnunet_gauger.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef __GAUGER_H__ -#define __GAUGER_H__ - -#include -#include -#include - -#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