aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgrothoff <grothoff@140774ce-b5e7-0310-ab8b-a85725594a96>2010-10-05 15:26:22 +0000
committergrothoff <grothoff@140774ce-b5e7-0310-ab8b-a85725594a96>2010-10-05 15:26:22 +0000
commit2c625d967bb222a44933e944ab22e7d30fd72a10 (patch)
tree82caf96b99449c19901473714037b4e831614b11
parenteb288902b65ca90a51e84e1e037daa0412daebb9 (diff)
stuff
git-svn-id: https://gnunet.org/svn/gnunet@13159 140774ce-b5e7-0310-ab8b-a85725594a96
-rw-r--r--src/include/gnunet_block_lib.h12
-rw-r--r--src/include/gnunet_datacache_lib.h2
2 files changed, 11 insertions, 3 deletions
diff --git a/src/include/gnunet_block_lib.h b/src/include/gnunet_block_lib.h
index bdbaeade5b..18cb7b7f39 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 e0866416d6..efce55af40 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);