/**
* Mingle hash with the mingle_number to produce different bits.
- *
+ *
* @param in original hash code
* @param mingle_number number for hash permutation
* @param hc where to store the result.
*/
void
-GNUNET_BLOCK_mingle_hash (const GNUNET_HashCode * in,
- uint32_t mingle_number, GNUNET_HashCode * hc)
+GNUNET_BLOCK_mingle_hash (const GNUNET_HashCode * in, uint32_t mingle_number,
+ GNUNET_HashCode * hc)
{
GNUNET_HashCode m;
if (GNUNET_OK ==
GNUNET_CONFIGURATION_get_value_string (cfg, "block", "PLUGINS", &plugs))
{
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- _("Loading block plugins `%s'\n"), plugs);
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO, _("Loading block plugins `%s'\n"),
+ plugs);
pos = strtok (plugs, " ");
while (pos != NULL)
{
/**
* Function called to validate a reply or a request. For
* request evaluation, simply pass "NULL" for the reply_block.
- * Note that it is assumed that the reply has already been
+ * Note that it is assumed that the reply has already been
* matched to the key (and signatures checked) as it would
* be done with the "get_key" function.
*
enum GNUNET_BLOCK_Type type,
const GNUNET_HashCode * query,
struct GNUNET_CONTAINER_BloomFilter **bf,
- int32_t bf_mutator,
- const void *xquery,
- size_t xquery_size,
- const void *reply_block, size_t reply_block_size)
+ int32_t bf_mutator, const void *xquery,
+ size_t xquery_size, const void *reply_block,
+ size_t reply_block_size)
{
struct GNUNET_BLOCK_PluginFunctions *plugin = find_plugin (ctx, type);
if (plugin == NULL)
return GNUNET_BLOCK_EVALUATION_TYPE_NOT_SUPPORTED;
- return plugin->evaluate (plugin->cls,
- type, query, bf, bf_mutator,
- xquery, xquery_size, reply_block, reply_block_size);
+ return plugin->evaluate (plugin->cls, type, query, bf, bf_mutator, xquery,
+ xquery_size, reply_block, reply_block_size);
}
*/
int
GNUNET_BLOCK_get_key (struct GNUNET_BLOCK_Context *ctx,
- enum GNUNET_BLOCK_Type type,
- const void *block,
+ enum GNUNET_BLOCK_Type type, const void *block,
size_t block_size, GNUNET_HashCode * key)
{
struct GNUNET_BLOCK_PluginFunctions *plugin = find_plugin (ctx, type);
}
+
+/**
+ * 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)
+{
+ GNUNET_break (0);
+ return NULL;
+}
+
+
/* end of block.c */