stuff
authorChristian Grothoff <christian@grothoff.org>
Tue, 5 Oct 2010 15:26:22 +0000 (15:26 +0000)
committerChristian Grothoff <christian@grothoff.org>
Tue, 5 Oct 2010 15:26:22 +0000 (15:26 +0000)
src/include/gnunet_block_lib.h
src/include/gnunet_datacache_lib.h

index bdbaeade5b0de7679c5a1acd6ea7868236872b7d..18cb7b7f396429d01efa4a6007f5c5dcc2e1f8f9 100644 (file)
@@ -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
index e0866416d6ccfdd1bcc98b96e349d53bbf120e45..efce55af4055782054f5921af76902595044ae41 100644 (file)
@@ -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);