From: Christian Grothoff Date: Tue, 5 Oct 2010 15:26:22 +0000 (+0000) Subject: stuff X-Git-Tag: initial-import-from-subversion-38251~20178 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=a64be7c7ae18efb4214e7335e39cf90348d1039f;p=oweals%2Fgnunet.git stuff --- diff --git a/src/include/gnunet_block_lib.h b/src/include/gnunet_block_lib.h index bdbaeade5..18cb7b7f3 100644 --- a/src/include/gnunet_block_lib.h +++ b/src/include/gnunet_block_lib.h @@ -87,8 +87,14 @@ enum GNUNET_BLOCK_Type /** * Block for testing. */ - GNUNET_BLOCK_TYPE_TEST = 8 + GNUNET_BLOCK_TYPE_TEST = 8, +#if HAVE_MALICIOUS + /** + * Block for simulating malicious peers. + */ + GNUNET_BLOCK_DHT_MALICIOUS_MESSAGE_TYPE = 9 +#endif }; @@ -212,7 +218,9 @@ GNUNET_BLOCK_evaluate (struct GNUNET_BLOCK_Context *ctx, * @param block block to get the key for * @param block_size number of bytes in block * @param key set to the key (query) for the given block - * @return GNUNET_OK on success, GNUNET_SYSERR if type not supported + * @return GNUNET_OK on success, + * GNUNET_NO if the block is malformed, FIXME: cg! + * GNUNET_SYSERR if type not supported * (or if extracting a key from a block of this type does not work) */ int diff --git a/src/include/gnunet_datacache_lib.h b/src/include/gnunet_datacache_lib.h index e0866416d..efce55af4 100644 --- a/src/include/gnunet_datacache_lib.h +++ b/src/include/gnunet_datacache_lib.h @@ -85,7 +85,7 @@ void GNUNET_DATACACHE_destroy (struct GNUNET_DATACACHE_Handle *h); typedef int (*GNUNET_DATACACHE_Iterator) (void *cls, struct GNUNET_TIME_Absolute exp, const GNUNET_HashCode * key, - uint32_t size, + uint32_t size, /* FIXME: use size_t? */ const char *data, enum GNUNET_BLOCK_Type type);