From 2539b4aa84fa51da71cf51c9fd9ac1a7668f27b3 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 14 Sep 2009 07:28:56 +0000 Subject: fs hacking --- src/include/gnunet_bio_lib.h | 2 +- src/include/gnunet_constants.h | 11 +++++++++++ src/include/gnunet_core_service.h | 3 ++- src/include/gnunet_protocols.h | 12 ++++++++++++ 4 files changed, 26 insertions(+), 2 deletions(-) (limited to 'src/include') diff --git a/src/include/gnunet_bio_lib.h b/src/include/gnunet_bio_lib.h index 2765b4695..2a2639f05 100644 --- a/src/include/gnunet_bio_lib.h +++ b/src/include/gnunet_bio_lib.h @@ -88,7 +88,7 @@ int GNUNET_BIO_read (struct GNUNET_BIO_ReadHandle *h, * @param maxLen maximum allowed length for the string * @return GNUNET_OK on success, GNUNET_SYSERR on failure */ -int GNUNET_BIO_read_string (struct GNUNET_BIO_ReadHandle *h, +int GNUNET_BIO_read_string (struct GNUNET_BIO_ReadHandle *h, const char *what, char **result, size_t maxLen); diff --git a/src/include/gnunet_constants.h b/src/include/gnunet_constants.h index bb122eb64..eb8addf5f 100644 --- a/src/include/gnunet_constants.h +++ b/src/include/gnunet_constants.h @@ -63,6 +63,17 @@ extern "C" #define GNUNET_CONSTANTS_SERVICE_TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MINUTES, 10) +/** + * Until which load do we consider the peer overly idle + * (which means that we would like to use more resources).

+ * + * 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 */ { #endif diff --git a/src/include/gnunet_core_service.h b/src/include/gnunet_core_service.h index 5d08552f4..b5dceca3a 100644 --- a/src/include/gnunet_core_service.h +++ b/src/include/gnunet_core_service.h @@ -77,7 +77,8 @@ typedef unsigned int (*GNUNET_CORE_BufferFillCallback) (void *cls, const struct GNUNET_PeerIdentity * receiver, - void *position, unsigned int padding); + void *position, + size_t padding); /** diff --git a/src/include/gnunet_protocols.h b/src/include/gnunet_protocols.h index 664b10636..ff35c6b97 100644 --- a/src/include/gnunet_protocols.h +++ b/src/include/gnunet_protocols.h @@ -420,6 +420,18 @@ extern "C" */ #define GNUNET_MESSAGE_TYPE_FS_CONTENT 137 +/** + * P2P request for content (one FS to another). + */ +#define GNUNET_MESSAGE_TYPE_FS_GET 138 + + +/** + * P2P response with content or active + * migration of content. + */ +#define GNUNET_MESSAGE_TYPE_FS_PUT 139 + /* TODO: - DV -- cgit v1.2.3