From: Christian Grothoff Date: Wed, 21 Sep 2011 05:51:49 +0000 (+0000) Subject: extend X-Git-Tag: initial-import-from-subversion-38251~16994 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=3419a38c90bf6fb4a92990fad739b2c1c7b72041;p=oweals%2Fgnunet.git extend --- diff --git a/src/include/gnunet_block_lib.h b/src/include/gnunet_block_lib.h index 01a1ec2fc..a362e5b77 100644 --- a/src/include/gnunet_block_lib.h +++ b/src/include/gnunet_block_lib.h @@ -232,6 +232,23 @@ GNUNET_BLOCK_get_key (struct GNUNET_BLOCK_Context *ctx, size_t block_size, GNUNET_HashCode * key); + +/** + * Construct a bloom filter that would filter out the given + * results. + * + * @param bf_mutator mutation value to use + * @param seen_results results already seen + * @param seen_results_count number of entries in 'seen_results' + * @return NULL if seen_results_count is 0, otherwise a BF + * that would match the given results. + */ +struct GNUNET_CONTAINER_BloomFilter * +GNUNET_BLOCK_construct_bloomfilter (int32_t bf_mutator, + const GNUNET_HashCode *seen_results, + unsigned int seen_results_count); + + #if 0 /* keep Emacsens' auto-indent happy */ { #endif diff --git a/src/include/gnunet_protocols.h b/src/include/gnunet_protocols.h index 1b03835bf..a9a60dde6 100644 --- a/src/include/gnunet_protocols.h +++ b/src/include/gnunet_protocols.h @@ -628,11 +628,13 @@ extern "C" * Local DHT route request type */ #define GNUNET_MESSAGE_TYPE_DHT_LOCAL_ROUTE 142 +#define GNUNET_MESSAGE_TYPE_DHT_CLIENT_GET 142 /** * Local generic DHT route result type */ #define GNUNET_MESSAGE_TYPE_DHT_LOCAL_ROUTE_RESULT 143 +#define GNUNET_MESSAGE_TYPE_DHT_CLIENT_RESULT 142 /** * P2P DHT route request type @@ -648,12 +650,14 @@ extern "C" * Local generic DHT message stop type */ #define GNUNET_MESSAGE_TYPE_DHT_LOCAL_ROUTE_STOP 146 +#define GNUNET_MESSAGE_TYPE_DHT_CLIENT_GET_STOP 146 /** * Local and P2P DHT PUT message * (encapsulated in DHT_ROUTE message) */ #define GNUNET_MESSAGE_TYPE_DHT_PUT 147 +#define GNUNET_MESSAGE_TYPE_DHT_CLIENT_PUT 147 /** * Local and P2P DHT GET message