X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=src%2Ffs%2Fgnunet-service-fs.h;h=e4efbb8f534cad872b1b1430ec7af43191c598d2;hb=bf886ddf525b991c6a11c9bd0be10e9aa0dd1c80;hp=ee4cea8e23322fb964907bc1434b5fd618afb0a4;hpb=562b33143ee9fa431a68ea6741e4feb3ba388f83;p=oweals%2Fgnunet.git diff --git a/src/fs/gnunet-service-fs.h b/src/fs/gnunet-service-fs.h index ee4cea8e2..e4efbb8f5 100644 --- a/src/fs/gnunet-service-fs.h +++ b/src/fs/gnunet-service-fs.h @@ -33,6 +33,10 @@ #include "gnunet_block_lib.h" #include "fs.h" +#define DEBUG_FS GNUNET_YES + +#define DEBUG_FS_CLIENT GNUNET_EXTRA_LOGGING + /** * Should we introduce random latency in processing? Required for proper @@ -54,6 +58,14 @@ #define SUPPORT_DELAYS GNUNET_NO +/** + * At what frequency should our datastore load decrease + * automatically (since if we don't use it, clearly the + * load must be going down). + */ +#define DATASTORE_LOAD_AUTODECLINE GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MILLISECONDS, 250) + + /** * A connected peer. @@ -75,6 +87,12 @@ struct GSF_LocalClient; */ struct GSF_RequestPlan; +/** + * DLL of request plans a particular pending request is + * involved with. + */ +struct GSF_RequestPlanReference; + /** * Our connection to the datastore. */ @@ -106,6 +124,11 @@ extern struct GNUNET_DHT_Handle *GSF_dht; */ extern struct GNUNET_LOAD_Value *GSF_rt_entry_lifetime; +/** + * Running average of the observed latency to other peers (round trip). + */ +extern struct GNUNET_TIME_Relative GSF_avg_latency; + /** * Typical priorities we're seeing from other peers right now. Since * most priorities will be zero, this value is the weighted average of @@ -119,13 +142,13 @@ extern struct GNUNET_LOAD_Value *GSF_rt_entry_lifetime; extern double GSF_current_priorities; /** - * How many query messages have we received 'recently' that + * How many query messages have we received 'recently' that * have not yet been claimed as cover traffic? */ extern unsigned int GSF_cover_query_count; /** - * How many content messages have we received 'recently' that + * How many content messages have we received 'recently' that * have not yet been claimed as cover traffic? */ extern unsigned int GSF_cover_content_count; @@ -135,12 +158,16 @@ extern unsigned int GSF_cover_content_count; */ extern struct GNUNET_BLOCK_Context *GSF_block_ctx; +/** + * Are we introducing randomized delays for better anonymity? + */ +extern int GSF_enable_randomized_delays; /** * Test if the DATABASE (GET) load on this peer is too high * to even consider processing the query at - * all. - * + * all. + * * @return GNUNET_YES if the load is too high to do anything (load high) * GNUNET_NO to process normally (load normal) * GNUNET_SYSERR to process for free (load low)