gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r14830 - in gnunet: contrib doc/man src/datastore src/fs sr


From: gnunet
Subject: [GNUnet-SVN] r14830 - in gnunet: contrib doc/man src/datastore src/fs src/include
Date: Sun, 3 Apr 2011 15:47:56 +0200

Author: grothoff
Date: 2011-04-03 15:47:56 +0200 (Sun, 03 Apr 2011)
New Revision: 14830

Modified:
   gnunet/contrib/defaults.conf
   gnunet/doc/man/gnunet-pseudonym.1
   gnunet/doc/man/gnunet-publish.1
   gnunet/src/datastore/datastore_api.c
   gnunet/src/datastore/perf_datastore_api.c
   gnunet/src/datastore/test_datastore_api.c
   gnunet/src/datastore/test_datastore_api_management.c
   gnunet/src/fs/fs.c
   gnunet/src/fs/fs.h
   gnunet/src/fs/fs_file_information.c
   gnunet/src/fs/fs_namespace.c
   gnunet/src/fs/fs_publish.c
   gnunet/src/fs/fs_test_lib.c
   gnunet/src/fs/gnunet-pseudonym.c
   gnunet/src/fs/gnunet-publish.c
   gnunet/src/fs/gnunet-service-fs.c
   gnunet/src/fs/gnunet-service-fs_new.c
   gnunet/src/fs/gnunet-service-fs_pr.c
   gnunet/src/fs/gnunet-service-fs_push.c
   gnunet/src/fs/test_fs_download.c
   gnunet/src/fs/test_fs_download_indexed.c
   gnunet/src/fs/test_fs_download_persistence.c
   gnunet/src/fs/test_fs_file_information.c
   gnunet/src/fs/test_fs_list_indexed.c
   gnunet/src/fs/test_fs_namespace.c
   gnunet/src/fs/test_fs_namespace_list_updateable.c
   gnunet/src/fs/test_fs_publish.c
   gnunet/src/fs/test_fs_publish_persistence.c
   gnunet/src/fs/test_fs_search.c
   gnunet/src/fs/test_fs_search_persistence.c
   gnunet/src/fs/test_fs_unindex.c
   gnunet/src/fs/test_fs_unindex_persistence.c
   gnunet/src/include/gnunet_datastore_service.h
   gnunet/src/include/gnunet_fs_service.h
Log:
changing datastore API to support replication level --- not fully implemented 
--- and adding GNUNET_FS_BlockOptions struct to replace 
prio/anonymity/expiration+replication args

Modified: gnunet/contrib/defaults.conf
===================================================================
--- gnunet/contrib/defaults.conf        2011-04-03 12:17:09 UTC (rev 14829)
+++ gnunet/contrib/defaults.conf        2011-04-03 13:47:56 UTC (rev 14830)
@@ -295,7 +295,7 @@
 HOSTNAME = localhost
 HOME = $SERVICEHOME
 CONFIG = $DEFAULTCONFIG
-BINARY = gnunet-service-fs
+BINARY = gnunet-service-fs-new
 ACCEPT_FROM = 127.0.0.1;
 ACCEPT_FROM6 = ::1;
 

Modified: gnunet/doc/man/gnunet-pseudonym.1
===================================================================
--- gnunet/doc/man/gnunet-pseudonym.1   2011-04-03 12:17:09 UTC (rev 14829)
+++ gnunet/doc/man/gnunet-pseudonym.1   2011-04-03 13:47:56 UTC (rev 14830)
@@ -55,7 +55,11 @@
 Do not print the list of pseudonyms (only perform create or delete operation).
 
 .TP
-\fB\-r IDENTIFIER\fR, \fB\-\-root=IDENTIFIER\fR
+\fB\-r \fILEVEL\fR, \fB\-\-replication=\fILEVEL\fR
+Set the desired replication level.  If CONTENT_PUSHING is set to YES, GNUnet 
will push each block (for the file) LEVEL times to other peers before doing 
nomral "random" replication of all content.  This option can be used to push 
some content out into the network harder. Note that pushing content LEVEL times 
into the network does not guarantee that there will actually be LEVEL replicas.
+
+.TP
+\fB\-R IDENTIFIER\fR, \fB\-\-root=IDENTIFIER\fR
 Specify the identifier for the root of the namespace.  Used in the namespace 
advertisement to tell users that find the namespace advertisement about an 
entry\-point into the namespace (use with \-C).  Advertisements are only 
created if "\-C" and "\-r" are specified.
 
 .TP

Modified: gnunet/doc/man/gnunet-publish.1
===================================================================
--- gnunet/doc/man/gnunet-publish.1     2011-04-03 12:17:09 UTC (rev 14829)
+++ gnunet/doc/man/gnunet-publish.1     2011-04-03 13:47:56 UTC (rev 14830)
@@ -78,6 +78,10 @@
 For the top\-level directory or file, create an SBlock that places the file 
into the namespace specified by the pseudonym NAME.
 
 .TP
+\fB\-r \fILEVEL\fR, \fB\-\-replication=\fILEVEL\fR
+Set the desired replication level.  If CONTENT_PUSHING is set to YES, GNUnet 
will push each block (for the file) LEVEL times to other peers before doing 
nomral "random" replication of all content.  This option can be used to push 
some content out into the network harder. Note that pushing content LEVEL times 
into the network does not guarantee that there will actually be LEVEL replicas.
+
+.TP
 \fB\-s\fR, \fB\-\-simulate-only\fR
 When this option is used, gnunet\-publish will not actually publish the file 
but just simulate what would be done.  This can be used to compute the GNUnet 
URI for a file without actually sharing it.
 

Modified: gnunet/src/datastore/datastore_api.c
===================================================================
--- gnunet/src/datastore/datastore_api.c        2011-04-03 12:17:09 UTC (rev 
14829)
+++ gnunet/src/datastore/datastore_api.c        2011-04-03 13:47:56 UTC (rev 
14830)
@@ -792,6 +792,7 @@
  * @param type type of the content
  * @param priority priority of the content
  * @param anonymity anonymity-level for the content
+ * @param replication how often should the content be replicated to other 
peers?
  * @param expiration expiration time for the content
  * @param queue_priority ranking of this request in the priority queue
  * @param max_queue_size at what queue size should this request be dropped
@@ -812,6 +813,7 @@
                       enum GNUNET_BLOCK_Type type,
                       uint32_t priority,
                       uint32_t anonymity,
+                     uint32_t replication,
                       struct GNUNET_TIME_Absolute expiration,
                      unsigned int queue_priority,
                      unsigned int max_queue_size,
@@ -1274,7 +1276,11 @@
 
 
 /**
- * Get a random value from the datastore.
+ * Get a random value from the datastore for content replication.
+ * Returns a single, random value among those with the highest
+ * replication score, lowering positive replication scores by one for
+ * the chosen value (if only content with a replication score exists,
+ * a random value is returned and replication scores are not changed).
  *
  * @param h handle to the datastore
  * @param queue_priority ranking of this request in the priority queue
@@ -1290,12 +1296,12 @@
  *         (or rather, will already have been invoked)
  */
 struct GNUNET_DATASTORE_QueueEntry *
-GNUNET_DATASTORE_get_random (struct GNUNET_DATASTORE_Handle *h,
-                            unsigned int queue_priority,
-                            unsigned int max_queue_size,
-                            struct GNUNET_TIME_Relative timeout,
-                             GNUNET_DATASTORE_Iterator iter, 
-                            void *iter_cls)
+GNUNET_DATASTORE_get_for_replication (struct GNUNET_DATASTORE_Handle *h,
+                                     unsigned int queue_priority,
+                                     unsigned int max_queue_size,
+                                     struct GNUNET_TIME_Relative timeout,
+                                     GNUNET_DATASTORE_Iterator iter, 
+                                     void *iter_cls)
 {
   struct GNUNET_DATASTORE_QueueEntry *qe;
   struct GNUNET_MessageHeader *m;

Modified: gnunet/src/datastore/perf_datastore_api.c
===================================================================
--- gnunet/src/datastore/perf_datastore_api.c   2011-04-03 12:17:09 UTC (rev 
14829)
+++ gnunet/src/datastore/perf_datastore_api.c   2011-04-03 13:47:56 UTC (rev 
14830)
@@ -269,7 +269,7 @@
                            data,
                            i+1,
                            GNUNET_CRYPTO_random_u32 
(GNUNET_CRYPTO_QUALITY_WEAK, 100),
-                           i,
+                           i, 0,
                            GNUNET_TIME_relative_to_absolute 
                            (GNUNET_TIME_relative_multiply 
(GNUNET_TIME_UNIT_SECONDS,
                                                            
GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, 1000))),
@@ -279,10 +279,10 @@
       break;
     case RP_CUT:
       /* trim down below MAX_SIZE again */
-      GNUNET_DATASTORE_get_random (datastore, 
-                                  1, 1, TIMEOUT,
-                                  &delete_value,
-                                  crc);
+      GNUNET_DATASTORE_get_for_replication (datastore, 
+                                           1, 1, TIMEOUT,
+                                           &delete_value,
+                                           crc);
       break;
     case RP_REPORT:
       printf (
@@ -355,7 +355,7 @@
       GNUNET_DATASTORE_put (datastore, 0,
                            &zkey, 4, "TEST",
                            GNUNET_BLOCK_TYPE_TEST,
-                           0, 0, GNUNET_TIME_relative_to_absolute 
(GNUNET_TIME_UNIT_SECONDS),
+                           0, 0, 0, GNUNET_TIME_relative_to_absolute 
(GNUNET_TIME_UNIT_SECONDS),
                            0, 1, GNUNET_TIME_UNIT_MINUTES,
                            &run_tests, crc))
     {

Modified: gnunet/src/datastore/test_datastore_api.c
===================================================================
--- gnunet/src/datastore/test_datastore_api.c   2011-04-03 12:17:09 UTC (rev 
14829)
+++ gnunet/src/datastore/test_datastore_api.c   2011-04-03 13:47:56 UTC (rev 
14830)
@@ -402,6 +402,7 @@
                            get_type (crc->i),
                            get_priority (crc->i),
                            get_anonymity (crc->i),
+                           0,
                            get_expiration (crc->i),
                            1, 1, TIMEOUT,
                            &check_success,
@@ -502,6 +503,7 @@
                            get_type (42),
                            get_priority (42),
                            get_anonymity (42),
+                           0,
                            get_expiration (42),
                            1, 1, TIMEOUT,
                            &check_success,
@@ -517,6 +519,7 @@
                            get_type (42),
                            get_priority (43),
                            get_anonymity (43),
+                           0,
                            get_expiration (43),
                            1, 1, TIMEOUT,
                            &check_success,
@@ -613,7 +616,7 @@
       GNUNET_DATASTORE_put (datastore, 0,
                            &zkey, 4, "TEST",
                            GNUNET_BLOCK_TYPE_TEST,
-                           0, 0, GNUNET_TIME_relative_to_absolute 
(GNUNET_TIME_UNIT_SECONDS),
+                           0, 0, 0, GNUNET_TIME_relative_to_absolute 
(GNUNET_TIME_UNIT_SECONDS),
                            0, 1, GNUNET_TIME_UNIT_MINUTES,
                            &run_tests, crc))
     {

Modified: gnunet/src/datastore/test_datastore_api_management.c
===================================================================
--- gnunet/src/datastore/test_datastore_api_management.c        2011-04-03 
12:17:09 UTC (rev 14829)
+++ gnunet/src/datastore/test_datastore_api_management.c        2011-04-03 
13:47:56 UTC (rev 14830)
@@ -231,6 +231,7 @@
                            get_type (crc->i),
                            get_priority (crc->i),
                            get_anonymity (crc->i),
+                           0,
                            get_expiration (crc->i),
                            1, 1, TIMEOUT,
                            &check_success,
@@ -327,7 +328,7 @@
       GNUNET_DATASTORE_put (datastore, 0,
                            &zkey, 4, "TEST",
                            GNUNET_BLOCK_TYPE_TEST,
-                           0, 0, GNUNET_TIME_relative_to_absolute 
(GNUNET_TIME_UNIT_SECONDS),
+                           0, 0, 0, GNUNET_TIME_relative_to_absolute 
(GNUNET_TIME_UNIT_SECONDS),
                            0, 1, GNUNET_TIME_UNIT_MINUTES,
                            &run_tests, crc))
     {

Modified: gnunet/src/fs/fs.c
===================================================================
--- gnunet/src/fs/fs.c  2011-04-03 12:17:09 UTC (rev 14829)
+++ gnunet/src/fs/fs.c  2011-04-03 13:47:56 UTC (rev 14830)
@@ -1,6 +1,6 @@
 /*
      This file is part of GNUnet.
-     (C) 2001, 2002, 2003, 2004, 2005, 2006, 2008, 2009, 2010 Christian 
Grothoff (and other contributing authors)
+     (C) 2001, 2002, 2003, 2004, 2005, 2006, 2008, 2009, 2010, 2011 Christian 
Grothoff (and other contributing authors)
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
@@ -769,17 +769,19 @@
           (GNUNET_YES !=
            GNUNET_FS_uri_test_chk (ret->chk_uri)) ) ) ||
        (GNUNET_OK !=
-       GNUNET_BIO_read_int64 (rh, &ret->expirationTime.abs_value)) ||
-       (GNUNET_OK !=
        read_start_time (rh, &ret->start_time)) ||
        (GNUNET_OK !=
        GNUNET_BIO_read_string (rh, "emsg", &ret->emsg, 16*1024)) ||
        (GNUNET_OK !=
        GNUNET_BIO_read_string (rh, "fn", &ret->filename, 16*1024)) ||
        (GNUNET_OK !=
-       GNUNET_BIO_read_int32 (rh, &ret->anonymity)) ||
+       GNUNET_BIO_read_int64 (rh, &ret->bo.expiration_time.abs_value)) ||
        (GNUNET_OK !=
-       GNUNET_BIO_read_int32 (rh, &ret->priority)) )
+       GNUNET_BIO_read_int32 (rh, &ret->bo.anonymity_level)) ||
+       (GNUNET_OK !=
+       GNUNET_BIO_read_int32 (rh, &ret->bo.content_priority)) ||
+       (GNUNET_OK !=
+       GNUNET_BIO_read_int32 (rh, &ret->bo.replication_level)) )
     {
       GNUNET_break (0);      
       goto cleanup;
@@ -1181,17 +1183,19 @@
        (GNUNET_OK !=
        GNUNET_BIO_write_string (wh, chks)) ||
        (GNUNET_OK != 
-       GNUNET_BIO_write_int64 (wh, fi->expirationTime.abs_value)) ||
-       (GNUNET_OK != 
        write_start_time (wh, fi->start_time)) ||
        (GNUNET_OK !=
        GNUNET_BIO_write_string (wh, fi->emsg)) ||
        (GNUNET_OK !=
        GNUNET_BIO_write_string (wh, fi->filename)) ||
        (GNUNET_OK != 
-       GNUNET_BIO_write_int32 (wh, fi->anonymity)) ||
+       GNUNET_BIO_write_int64 (wh, fi->bo.expiration_time.abs_value)) ||
        (GNUNET_OK != 
-       GNUNET_BIO_write_int32 (wh, fi->priority)) )
+       GNUNET_BIO_write_int32 (wh, fi->bo.anonymity_level)) ||
+       (GNUNET_OK != 
+       GNUNET_BIO_write_int32 (wh, fi->bo.content_priority)) ||
+       (GNUNET_OK != 
+       GNUNET_BIO_write_int32 (wh, fi->bo.replication_level)) )
     {
       GNUNET_break (0);
       goto cleanup;
@@ -1340,10 +1344,8 @@
  * @param length length of the file or directory
  * @param meta metadata for the file or directory (can be modified)
  * @param uri pointer to the keywords that will be used for this entry (can be 
modified)
- * @param anonymity pointer to selected anonymity level (can be modified)
- * @param priority pointer to selected priority (can be modified)
+ * @param bo block options (can be modified)
  * @param do_index should we index?
- * @param expirationTime pointer to selected expiration time (can be modified)
  * @param client_info pointer to client context set upon creation (can be 
modified)
  * @return GNUNET_OK to continue (always)
  */
@@ -1353,10 +1355,8 @@
                  uint64_t length,
                  struct GNUNET_CONTAINER_MetaData *meta,
                  struct GNUNET_FS_Uri **uri,
-                 uint32_t *anonymity,
-                 uint32_t *priority,
+                 struct GNUNET_FS_BlockOptions *bo,
                  int *do_index,
-                 struct GNUNET_TIME_Absolute *expirationTime,
                  void **client_info)
 {
   struct GNUNET_FS_PublishContext *sc = cls;

Modified: gnunet/src/fs/fs.h
===================================================================
--- gnunet/src/fs/fs.h  2011-04-03 12:17:09 UTC (rev 14829)
+++ gnunet/src/fs/fs.h  2011-04-03 13:47:56 UTC (rev 14830)
@@ -438,9 +438,9 @@
   struct GNUNET_FS_Uri *chk_uri;
 
   /**
-   * At what time should the content expire?
+   * Block options for the file.
    */
-  struct GNUNET_TIME_Absolute expirationTime;
+  struct GNUNET_FS_BlockOptions bo;
 
   /**
    * At what time did we start this upload?
@@ -548,16 +548,6 @@
   } data;
 
   /**
-   * Desired anonymity level.
-   */
-  uint32_t anonymity;
-
-  /**
-   * Desired priority (for keeping the content in the DB).
-   */
-  uint32_t priority;
-
-  /**
    * Is this struct for a file or directory?
    */
   int is_directory;

Modified: gnunet/src/fs/fs_file_information.c
===================================================================
--- gnunet/src/fs/fs_file_information.c 2011-04-03 12:17:09 UTC (rev 14829)
+++ gnunet/src/fs/fs_file_information.c 2011-04-03 13:47:56 UTC (rev 14830)
@@ -1,6 +1,6 @@
 /*
      This file is part of GNUnet.
-     (C) 2009 Christian Grothoff (and other contributing authors)
+     (C) 2009, 2011 Christian Grothoff (and other contributing authors)
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
@@ -132,11 +132,7 @@
  * @param meta metadata for the file
  * @param do_index GNUNET_YES for index, GNUNET_NO for insertion,
  *                GNUNET_SYSERR for simulation
- * @param anonymity what is the desired anonymity level for sharing?
- * @param priority what is the priority for OUR node to
- *   keep this file available?  Use 0 for maximum anonymity and
- *   minimum reliability...
- * @param expirationTime when should this content expire?
+ * @param bo block options
  * @return publish structure entry for the file
  */
 struct GNUNET_FS_FileInformation *
@@ -146,9 +142,7 @@
                                             const struct GNUNET_FS_Uri 
*keywords,
                                             const struct 
GNUNET_CONTAINER_MetaData *meta,
                                             int do_index,
-                                            uint32_t anonymity,
-                                            uint32_t priority,
-                                            struct GNUNET_TIME_Absolute 
expirationTime)
+                                            const struct 
GNUNET_FS_BlockOptions *bo)
 {
   struct FileInfo *fi;
   struct stat sbuf;
@@ -177,9 +171,7 @@
                                                       keywords,
                                                       meta,
                                                       do_index,
-                                                      anonymity,
-                                                      priority,
-                                                      expirationTime);
+                                                      bo);
   if (ret == NULL)
     return NULL;
   ret->h = h;
@@ -212,11 +204,7 @@
  * @param meta metadata for the file
  * @param do_index GNUNET_YES for index, GNUNET_NO for insertion,
  *                GNUNET_SYSERR for simulation
- * @param anonymity what is the desired anonymity level for sharing?
- * @param priority what is the priority for OUR node to
- *   keep this file available?  Use 0 for maximum anonymity and
- *   minimum reliability...
- * @param expirationTime when should this content expire?
+ * @param bo block options
  * @return publish structure entry for the file
  */
 struct GNUNET_FS_FileInformation *
@@ -227,9 +215,7 @@
                                             const struct GNUNET_FS_Uri 
*keywords,
                                             const struct 
GNUNET_CONTAINER_MetaData *meta,
                                             int do_index,
-                                            uint32_t anonymity,
-                                            uint32_t priority,
-                                            struct GNUNET_TIME_Absolute 
expirationTime)
+                                            const struct 
GNUNET_FS_BlockOptions *bo)
 {
   if (GNUNET_YES == do_index)        
     {
@@ -244,9 +230,7 @@
                                                        keywords,
                                                        meta,
                                                        do_index,
-                                                       anonymity,
-                                                       priority,
-                                                       expirationTime);
+                                                       bo);
 }
 
 
@@ -263,11 +247,7 @@
  * @param meta metadata for the file
  * @param do_index GNUNET_YES for index, GNUNET_NO for insertion,
  *                GNUNET_SYSERR for simulation
- * @param anonymity what is the desired anonymity level for sharing?
- * @param priority what is the priority for OUR node to
- *   keep this file available?  Use 0 for maximum anonymity and
- *   minimum reliability...
- * @param expirationTime when should this content expire?
+ * @param bo block options
  * @return publish structure entry for the file
  */
 struct GNUNET_FS_FileInformation *
@@ -279,9 +259,7 @@
                                               const struct GNUNET_FS_Uri 
*keywords,
                                               const struct 
GNUNET_CONTAINER_MetaData *meta,
                                               int do_index,
-                                              uint32_t anonymity,
-                                              uint32_t priority,
-                                              struct GNUNET_TIME_Absolute 
expirationTime)
+                                              const struct 
GNUNET_FS_BlockOptions *bo)
 {
   struct GNUNET_FS_FileInformation *ret;
 
@@ -298,13 +276,11 @@
   if (ret->meta == NULL)
     ret->meta = GNUNET_CONTAINER_meta_data_create ();
   ret->keywords = (keywords == NULL) ? NULL : GNUNET_FS_uri_dup (keywords);
-  ret->expirationTime = expirationTime;
   ret->data.file.reader = reader; 
   ret->data.file.reader_cls = reader_cls;
   ret->data.file.do_index = do_index;
   ret->data.file.file_size = length;
-  ret->anonymity = anonymity;
-  ret->priority = priority;
+  ret->bo = *bo;
   return ret;
 }
 
@@ -350,24 +326,15 @@
   char *emsg; 
 
   /**
+   * Block options.
+   */
+  const struct GNUNET_FS_BlockOptions *bo;
+
+  /**
    * Should files be indexed?
    */ 
   int do_index;
 
-  /**
-   * Desired anonymity level.
-   */
-  uint32_t anonymity;
-
-  /**
-   * Desired publishing priority.
-   */
-  uint32_t priority;
-
-  /**
-   * Expiration time for publication.
-   */
-  struct GNUNET_TIME_Absolute expiration;
 };
 
 
@@ -406,9 +373,7 @@
                                                             dsc->scanner,
                                                             dsc->scanner_cls,
                                                             dsc->do_index,
-                                                            dsc->anonymity,
-                                                            dsc->priority,
-                                                            dsc->expiration,
+                                                            dsc->bo,
                                                             &dsc->emsg);
       if (NULL == fi)
        {
@@ -430,9 +395,7 @@
                                                        ksk_uri,
                                                        meta,
                                                        dsc->do_index,
-                                                       dsc->anonymity,
-                                                       dsc->priority,
-                                                       dsc->expiration);
+                                                       dsc->bo);
       GNUNET_CONTAINER_meta_data_destroy (meta);
       GNUNET_FS_uri_destroy (keywords);
       GNUNET_FS_uri_destroy (ksk_uri);
@@ -459,9 +422,7 @@
  * @param h handle to the file sharing subsystem
  * @param dirname name of the directory to scan
  * @param do_index should files be indexed or inserted
- * @param anonymity desired anonymity level
- * @param priority priority for publishing
- * @param expirationTime expiration for publication
+ * @param bo block options
  * @param proc function called on each entry
  * @param proc_cls closure for proc
  * @param emsg where to store an error message (on errors)
@@ -472,9 +433,7 @@
                                     struct GNUNET_FS_Handle *h,
                                     const char *dirname,
                                     int do_index,
-                                    uint32_t anonymity,
-                                    uint32_t priority,
-                                    struct GNUNET_TIME_Absolute expirationTime,
+                                    const struct GNUNET_FS_BlockOptions *bo,
                                     GNUNET_FS_FileProcessor proc,
                                     void *proc_cls,
                                     char **emsg)
@@ -489,9 +448,7 @@
   dsc.scanner = &GNUNET_FS_directory_scanner_default;
   dsc.scanner_cls = cls;
   dsc.do_index = do_index;
-  dsc.anonymity = anonymity;
-  dsc.priority = priority;
-  dsc.expiration = expirationTime;
+  dsc.bo = bo;
   if (-1 == GNUNET_DISK_directory_scan (dirname,
                                        &dir_scan_cb,
                                        &dsc))
@@ -555,11 +512,7 @@
  * @param scanner function used to get a list of files in a directory
  * @param scanner_cls closure for scanner
  * @param do_index should files in the hierarchy be indexed?
- * @param anonymity what is the desired anonymity level for sharing?
- * @param priority what is the priority for OUR node to
- *   keep this file available?  Use 0 for maximum anonymity and
- *   minimum reliability...
- * @param expirationTime when should this content expire?
+ * @param bo block options
  * @param emsg where to store an error message
  * @return publish structure entry for the directory, NULL on error
  */
@@ -570,9 +523,7 @@
                                                  GNUNET_FS_DirectoryScanner 
scanner,
                                                  void *scanner_cls,
                                                  int do_index,
-                                                 uint32_t anonymity,
-                                                 uint32_t priority,
-                                                 struct GNUNET_TIME_Absolute 
expirationTime,
+                                                 const struct 
GNUNET_FS_BlockOptions *bo,
                                                  char **emsg)
 {
   struct GNUNET_FS_FileInformation *ret;
@@ -590,9 +541,7 @@
           h,
           filename,
           do_index,
-          anonymity,
-          priority,
-          expirationTime,
+          bo,
           &dirproc,
           &dc,
           emsg);
@@ -602,9 +551,7 @@
                                                           client_info,
                                                           ksk,
                                                           meta,
-                                                          anonymity,
-                                                          priority,
-                                                          expirationTime);
+                                                          bo);
   GNUNET_CONTAINER_meta_data_destroy (meta);
   ret->data.dir.entries = dc.entries;
   while (dc.entries != NULL)
@@ -657,11 +604,7 @@
  * @param meta metadata for the directory
  * @param keywords under which keywords should this directory be available
  *         directly; can be NULL
- * @param anonymity what is the desired anonymity level for sharing?
- * @param priority what is the priority for OUR node to
- *   keep this file available?  Use 0 for maximum anonymity and
- *   minimum reliability...
- * @param expirationTime when should this content expire?
+ * @param bo block options
  * @return publish structure entry for the directory , NULL on error
  */
 struct GNUNET_FS_FileInformation *
@@ -669,9 +612,7 @@
                                                   void *client_info,
                                                   const struct GNUNET_FS_Uri 
*keywords,
                                                   const struct 
GNUNET_CONTAINER_MetaData *meta,
-                                                  uint32_t anonymity,
-                                                  uint32_t priority,
-                                                  struct GNUNET_TIME_Absolute 
expirationTime)
+                                                  const struct 
GNUNET_FS_BlockOptions *bo)
 {
   struct GNUNET_FS_FileInformation *ret;
 
@@ -680,10 +621,8 @@
   ret->client_info = client_info;
   ret->meta = GNUNET_CONTAINER_meta_data_duplicate (meta);
   ret->keywords = GNUNET_FS_uri_dup (keywords);
-  ret->expirationTime = expirationTime;
+  ret->bo = *bo;
   ret->is_directory = GNUNET_YES;
-  ret->anonymity = anonymity;
-  ret->priority = priority;
   return ret;
 }
 
@@ -747,10 +686,8 @@
            (dir->is_directory) ? dir->data.dir.dir_size : 
dir->data.file.file_size,
            dir->meta,
            &dir->keywords,
-           &dir->anonymity,
-           &dir->priority,
+           &dir->bo,
            (dir->is_directory) ? &no : &dir->data.file.do_index,
-           &dir->expirationTime,
            &dir->client_info))
     return;
   if (! dir->is_directory)
@@ -765,10 +702,8 @@
                (pos->is_directory) ? pos->data.dir.dir_size : 
pos->data.file.file_size,
                pos->meta,
                &pos->keywords,
-               &pos->anonymity,
-               &pos->priority,
+               &pos->bo,
                (dir->is_directory) ? &no : &dir->data.file.do_index,
-               &pos->expirationTime,
                &pos->client_info))
        break;
       pos = pos->next;
@@ -810,10 +745,8 @@
                 fi->data.dir.dir_size,
                 fi->meta,
                 &fi->keywords,
-                &fi->anonymity,
-                &fi->priority,
+                &fi->bo,
                 &no,
-                &fi->expirationTime,
                 &fi->client_info);
       GNUNET_free_non_null (fi->data.dir.dir_data);
     }
@@ -830,10 +763,8 @@
                 fi->data.file.file_size,
                 fi->meta,
                 &fi->keywords,
-                &fi->anonymity,
-                &fi->priority,
+                &fi->bo,
                 &fi->data.file.do_index,
-                &fi->expirationTime,
                 &fi->client_info);
     }
   GNUNET_free_non_null (fi->filename);

Modified: gnunet/src/fs/fs_namespace.c
===================================================================
--- gnunet/src/fs/fs_namespace.c        2011-04-03 12:17:09 UTC (rev 14829)
+++ gnunet/src/fs/fs_namespace.c        2011-04-03 13:47:56 UTC (rev 14830)
@@ -285,9 +285,9 @@
   struct GNUNET_FS_Namespace *ns;
 
   /**
-   * Expiration time.
+   * Block options.
    */
-  struct GNUNET_TIME_Absolute expiration;
+  struct GNUNET_FS_BlockOptions bo;
 
   /**
    * Number of bytes of plaintext.
@@ -295,16 +295,6 @@
   size_t pt_size;
 
   /**
-   * Anonymity level.
-   */
-  uint32_t anonymity;
-
-  /**
-   * Content priority.
-   */
-  uint32_t priority;
-
-  /**
    * Current keyword offset.
    */
   unsigned int pos;
@@ -410,9 +400,10 @@
                        ac->pt_size + sizeof (struct NBlock),
                        ac->nb,
                        GNUNET_BLOCK_TYPE_FS_NBLOCK,
-                       ac->priority,
-                       ac->anonymity,
-                       ac->expiration,
+                       ac->bo.content_priority,
+                       ac->bo.anonymity_level,
+                       ac->bo.replication_level,
+                       ac->bo.expiration_time,
                        -2, 1,
                        GNUNET_CONSTANTS_SERVICE_TIMEOUT, 
                        &advertisement_cont,
@@ -427,9 +418,7 @@
  * @param ksk_uri keywords to use for advertisment
  * @param namespace handle for the namespace that should be advertised
  * @param meta meta-data for the namespace advertisement
- * @param anonymity for the namespace advertismement
- * @param priority for the namespace advertisement
- * @param expiration for the namespace advertisement
+ * @param bo block options
  * @param rootEntry name of the root of the namespace
  * @param cont continuation
  * @param cont_cls closure for cont
@@ -439,9 +428,7 @@
                               struct GNUNET_FS_Uri *ksk_uri,
                               struct GNUNET_FS_Namespace *namespace,
                               const struct GNUNET_CONTAINER_MetaData *meta,
-                              uint32_t anonymity,
-                              uint32_t priority,
-                              struct GNUNET_TIME_Absolute expiration,
+                              const struct GNUNET_FS_BlockOptions *bo,
                               const char *rootEntry,
                               GNUNET_FS_PublishContinuation cont,
                               void *cont_cls)
@@ -512,9 +499,7 @@
   ctx->pt_size = mdsize + reslen;
   ctx->ns = namespace;
   ctx->ns->rc++;
-  ctx->anonymity = anonymity;
-  ctx->priority = priority;
-  ctx->expiration = expiration;
+  ctx->bo = *bo;
   advertisement_cont (ctx, GNUNET_OK, NULL);
 }
 
@@ -828,9 +813,7 @@
  * @param update update identifier to use
  * @param meta metadata to use
  * @param uri URI to refer to in the SBlock
- * @param expirationTime when the SBlock expires
- * @param anonymity anonymity level for the SBlock
- * @param priority priority for the SBlock
+ * @param bo block options
  * @param options publication options
  * @param cont continuation
  * @param cont_cls closure for cont
@@ -842,9 +825,7 @@
                       const char *update,
                       const struct GNUNET_CONTAINER_MetaData *meta,
                       const struct GNUNET_FS_Uri *uri,
-                      struct GNUNET_TIME_Absolute expirationTime,
-                      uint32_t anonymity,
-                      uint32_t priority,
+                      const struct GNUNET_FS_BlockOptions *bo,
                       enum GNUNET_FS_PublishOptions options,
                       GNUNET_FS_PublishContinuation cont,
                       void *cont_cls)
@@ -975,9 +956,10 @@
                        size,
                        sb_enc,
                        GNUNET_BLOCK_TYPE_FS_SBLOCK, 
-                       priority,
-                       anonymity,
-                       expirationTime,
+                       bo->content_priority,
+                       bo->anonymity_level,
+                       bo->replication_level,
+                       bo->expiration_time,
                        -2, 1,
                        GNUNET_CONSTANTS_SERVICE_TIMEOUT,
                        &sb_put_cont,

Modified: gnunet/src/fs/fs_publish.c
===================================================================
--- gnunet/src/fs/fs_publish.c  2011-04-03 12:17:09 UTC (rev 14829)
+++ gnunet/src/fs/fs_publish.c  2011-04-03 13:47:56 UTC (rev 14830)
@@ -95,7 +95,7 @@
                                 pi->value.publish.size);
   pi->value.publish.completed = offset;
   pi->value.publish.duration = GNUNET_TIME_absolute_get_duration 
(p->start_time);
-  pi->value.publish.anonymity = p->anonymity;
+  pi->value.publish.anonymity = p->bo.anonymity_level;
   return sc->h->upcb (sc->h->upcb_cls,
                      pi);
 }
@@ -324,9 +324,7 @@
                           sc->nuid,
                           sc->fi->meta,
                           sc->fi->chk_uri,
-                          sc->fi->expirationTime,
-                          sc->fi->anonymity,
-                          sc->fi->priority,
+                          &sc->fi->bo,
                           sc->options,
                           &publish_sblocks_cont,
                           sc);
@@ -569,9 +567,10 @@
                            sizeof (struct OnDemandBlock),
                            &odb,
                            GNUNET_BLOCK_TYPE_FS_ONDEMAND,
-                           p->priority,
-                           p->anonymity,
-                           p->expirationTime,
+                           p->bo.content_priority,
+                           p->bo.anonymity_level,
+                           p->bo.replication_level,
+                           p->bo.expiration_time,
                            -2, 1,
                            GNUNET_CONSTANTS_SERVICE_TIMEOUT,
                            &ds_put_cont,
@@ -591,9 +590,10 @@
                        block_size,
                        block,
                        type,
-                       p->priority,
-                       p->anonymity,
-                       p->expirationTime,
+                       p->bo.content_priority,
+                       p->bo.anonymity_level,
+                       p->bo.replication_level,
+                       p->bo.expiration_time,
                        -2, 1,
                        GNUNET_CONSTANTS_SERVICE_TIMEOUT,
                        &ds_put_cont,
@@ -990,12 +990,12 @@
       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                  "File upload complete, now publishing KSK blocks.\n");
 #endif
-      if (0 == p->anonymity)
+      if (0 == p->bo.anonymity_level)
        {
          /* zero anonymity, box CHK URI in LOC URI */
          loc = GNUNET_FS_uri_loc_create (p->chk_uri,
                                          pc->h->cfg,
-                                         p->expirationTime);
+                                         p->bo.expiration_time);
          GNUNET_FS_uri_destroy (p->chk_uri);
          p->chk_uri = loc;
        }
@@ -1007,9 +1007,7 @@
                                 p->keywords,
                                 p->meta,
                                 p->chk_uri,
-                                p->expirationTime,
-                                p->anonymity,
-                                p->priority,
+                                &p->bo,
                                 pc->options,
                                 &publish_kblocks_cont,
                                 pc);
@@ -1065,10 +1063,8 @@
  * @param length length of the file or directory
  * @param meta metadata for the file or directory (can be modified)
  * @param uri pointer to the keywords that will be used for this entry (can be 
modified)
- * @param anonymity pointer to selected anonymity level (can be modified)
- * @param priority pointer to selected priority (can be modified)
+ * @param bo block options
  * @param do_index should we index?
- * @param expirationTime pointer to selected expiration time (can be modified)
  * @param client_info pointer to client context set upon creation (can be 
modified)
  * @return GNUNET_OK to continue (always)
  */
@@ -1078,10 +1074,8 @@
                 uint64_t length,
                 struct GNUNET_CONTAINER_MetaData *meta,
                 struct GNUNET_FS_Uri **uri,
-                uint32_t *anonymity,
-                uint32_t *priority,
+                struct GNUNET_FS_BlockOptions *bo,
                 int *do_index,
-                struct GNUNET_TIME_Absolute *expirationTime,
                 void **client_info)
 {
   struct GNUNET_FS_PublishContext *sc = cls;
@@ -1134,10 +1128,8 @@
  * @param length length of the file or directory
  * @param meta metadata for the file or directory (can be modified)
  * @param uri pointer to the keywords that will be used for this entry (can be 
modified)
- * @param anonymity pointer to selected anonymity level (can be modified)
- * @param priority pointer to selected priority (can be modified)
+ * @param bo block options
  * @param do_index should we index?
- * @param expirationTime pointer to selected expiration time (can be modified)
  * @param client_info pointer to client context set upon creation (can be 
modified)
  * @return GNUNET_OK to continue (always)
  */
@@ -1147,10 +1139,8 @@
                   uint64_t length,
                   struct GNUNET_CONTAINER_MetaData *meta,
                   struct GNUNET_FS_Uri **uri,
-                  uint32_t *anonymity,
-                  uint32_t *priority,
+                  struct GNUNET_FS_BlockOptions *bo,
                   int *do_index,
-                  struct GNUNET_TIME_Absolute *expirationTime,
                   void **client_info)
 {
   struct GNUNET_FS_PublishContext*sc = cls;
@@ -1322,10 +1312,8 @@
  * @param length length of the file or directory
  * @param meta metadata for the file or directory (can be modified)
  * @param uri pointer to the keywords that will be used for this entry (can be 
modified)
- * @param anonymity pointer to selected anonymity level (can be modified)
- * @param priority pointer to selected priority (can be modified)
+ * @param bo block options (can be modified)
  * @param do_index should we index?
- * @param expirationTime pointer to selected expiration time (can be modified)
  * @param client_info pointer to client context set upon creation (can be 
modified)
  * @return GNUNET_OK to continue (always)
  */
@@ -1335,10 +1323,8 @@
                uint64_t length,
                struct GNUNET_CONTAINER_MetaData *meta,
                struct GNUNET_FS_Uri **uri,
-               uint32_t *anonymity,
-               uint32_t *priority,
+               struct GNUNET_FS_BlockOptions *bo,
                int *do_index,
-               struct GNUNET_TIME_Absolute *expirationTime,
                void **client_info)
 {
   struct GNUNET_FS_PublishContext*sc = cls;
@@ -1454,7 +1440,7 @@
   /**
    * When should the KBlocks expire?
    */
-  struct GNUNET_TIME_Absolute expirationTime;
+  struct GNUNET_FS_BlockOptions bo;
 
   /**
    * Size of the serialized metadata.
@@ -1471,15 +1457,6 @@
    */
   unsigned int i;
 
-  /**
-   * Anonymity level for the KBlocks.
-   */
-  uint32_t anonymity;
-
-  /**
-   * Priority for the KBlocks.
-   */
-  uint32_t priority;
 };
 
 
@@ -1604,9 +1581,10 @@
                        pkc->slen,
                        pkc->cpy,
                        GNUNET_BLOCK_TYPE_FS_KBLOCK, 
-                       pkc->priority,
-                       pkc->anonymity,
-                       pkc->expirationTime,
+                       pkc->bo.content_priority,
+                       pkc->bo.anonymity_level,
+                       pkc->bo.replication_level,
+                       pkc->bo.expiration_time,
                        -2, 1,
                        GNUNET_CONSTANTS_SERVICE_TIMEOUT,
                        &kb_put_cont,
@@ -1621,9 +1599,7 @@
  * @param ksk_uri keywords to use
  * @param meta metadata to use
  * @param uri URI to refer to in the KBlock
- * @param expirationTime when the KBlock expires
- * @param anonymity anonymity level for the KBlock
- * @param priority priority for the KBlock
+ * @param bo per-block options
  * @param options publication options
  * @param cont continuation
  * @param cont_cls closure for cont
@@ -1633,9 +1609,7 @@
                       const struct GNUNET_FS_Uri *ksk_uri,
                       const struct GNUNET_CONTAINER_MetaData *meta,
                       const struct GNUNET_FS_Uri *uri,
-                      struct GNUNET_TIME_Absolute expirationTime,
-                      uint32_t anonymity,
-                      uint32_t priority,
+                      const struct GNUNET_FS_BlockOptions *bo,
                       enum GNUNET_FS_PublishOptions options,
                       GNUNET_FS_PublishContinuation cont,
                       void *cont_cls)
@@ -1649,9 +1623,7 @@
   GNUNET_assert (NULL != uri);
   pkc = GNUNET_malloc (sizeof (struct PublishKskContext));
   pkc->h = h;
-  pkc->expirationTime = expirationTime;
-  pkc->anonymity = anonymity;
-  pkc->priority = priority;
+  pkc->bo = *bo;
   pkc->cont = cont;
   pkc->cont_cls = cont_cls;
   if (0 == (options & GNUNET_FS_PUBLISH_OPTION_SIMULATE_ONLY))

Modified: gnunet/src/fs/fs_test_lib.c
===================================================================
--- gnunet/src/fs/fs_test_lib.c 2011-04-03 12:17:09 UTC (rev 14829)
+++ gnunet/src/fs/fs_test_lib.c 2011-04-03 13:47:56 UTC (rev 14830)
@@ -1,6 +1,6 @@
 /*
      This file is part of GNUnet.
-     (C) 2010 Christian Grothoff (and other contributing authors)
+     (C) 2010, 2011 Christian Grothoff (and other contributing authors)
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
@@ -637,12 +637,17 @@
   uint64_t off;
   char buf[DBLOCK_SIZE];
   size_t bsize;
-
+  struct GNUNET_FS_BlockOptions bo;
+ 
   GNUNET_assert (daemon->publish_cont == NULL);
   daemon->publish_cont = cont;
   daemon->publish_cont_cls = cont_cls;
   daemon->publish_seed = seed;
   daemon->verbose = verbose;
+  bo.expiration_time = GNUNET_TIME_relative_to_absolute (CONTENT_LIFETIME);
+  bo.anonymity_level = anonymity;
+  bo.content_priority = 42;
+  bo.replication_level = 1;
   if (GNUNET_YES == do_index)
     {
       GNUNET_assert (daemon->publish_tmp_file == NULL);
@@ -678,9 +683,7 @@
                                                        
daemon->publish_tmp_file,
                                                        NULL, NULL,
                                                        do_index,
-                                                       anonymity,
-                                                       42 /* priority */,
-                                                       
GNUNET_TIME_relative_to_absolute (CONTENT_LIFETIME));
+                                                       &bo);
     }
   else
     {
@@ -692,9 +695,7 @@
                                                          NULL,
                                                          NULL,
                                                          do_index,
-                                                         anonymity,
-                                                         42 /* priority */,
-                                                         
GNUNET_TIME_relative_to_absolute (CONTENT_LIFETIME));
+                                                         &bo);
     }
   daemon->publish_context = GNUNET_FS_publish_start (daemon->fs,
                                                     fi,

Modified: gnunet/src/fs/gnunet-pseudonym.c
===================================================================
--- gnunet/src/fs/gnunet-pseudonym.c    2011-04-03 12:17:09 UTC (rev 14829)
+++ gnunet/src/fs/gnunet-pseudonym.c    2011-04-03 13:47:56 UTC (rev 14830)
@@ -26,11 +26,6 @@
 #include "gnunet_fs_service.h"
 
 /**
- * -a optiton.
- */
-static unsigned int anonymity;
-
-/**
  * -C option
  */
 static char *create_ns;
@@ -56,9 +51,9 @@
 static struct GNUNET_CONTAINER_MetaData *adv_metadata;
 
 /**
- * -p option.
+ * Our block options (-p, -r, -a).
  */
-static unsigned int priority = 365;
+static struct GNUNET_FS_BlockOptions bo = { { 2 * 365 * 24 * 60 * 60 * 1000LL  
}, 1, 365, 1 };
 
 /**
  * -q option given.
@@ -279,9 +274,7 @@
                                             ksk_uri,
                                             ns,
                                             adv_metadata,
-                                            anonymity,
-                                            priority,                          
             
-                                            expiration,
+                                            &bo,
                                             root_identifier,
                                             &post_advertising,
                                             NULL);
@@ -307,7 +300,8 @@
 
 
 /**
- * The main function to inspect GNUnet directories.
+ * The main function to manipulate GNUnet pseudonyms (and publish
+ * to namespaces).
  *
  * @param argc number of arguments from the command line
  * @param argv command line arguments
@@ -319,7 +313,7 @@
   static const struct GNUNET_GETOPT_CommandLineOption options[] = {
     {'a', "anonymity", "LEVEL",
      gettext_noop ("set the desired LEVEL of sender-anonymity"),
-     1, &GNUNET_GETOPT_set_uint, &anonymity},
+     1, &GNUNET_GETOPT_set_uint, &bo.anonymity_level},
     {'C', "create", "NAME",
      gettext_noop
      ("create or advertise namespace NAME"),
@@ -341,11 +335,14 @@
      0, &GNUNET_GETOPT_set_one, &print_local_only},
     {'p', "priority", "PRIORITY",
      gettext_noop ("use the given PRIORITY for the advertisments"),
-     1, &GNUNET_GETOPT_set_uint, &priority},
+     1, &GNUNET_GETOPT_set_uint, &bo.content_priority},
     {'q', "quiet", NULL,
      gettext_noop ("do not print names of remote namespaces"),
      0, &GNUNET_GETOPT_set_one, &no_remote_printing},
-    {'r', "root", "ID",
+    {'r', "replication", "LEVEL",
+     gettext_noop ("set the desired replication LEVEL"),
+     0, &GNUNET_GETOPT_set_uint, &bo.replication_level},
+    {'R', "root", "ID",
      gettext_noop
      ("specify ID of the root of the namespace"),
      1, &GNUNET_GETOPT_set_string, &root_identifier},

Modified: gnunet/src/fs/gnunet-publish.c
===================================================================
--- gnunet/src/fs/gnunet-publish.c      2011-04-03 12:17:09 UTC (rev 14829)
+++ gnunet/src/fs/gnunet-publish.c      2011-04-03 13:47:56 UTC (rev 14830)
@@ -1,6 +1,6 @@
 /*
      This file is part of GNUnet.
-     (C) 2001, 2002, 2004, 2005, 2006, 2007, 2009, 2010 Christian Grothoff 
(and other contributing authors)
+     (C) 2001, 2002, 2004, 2005, 2006, 2007, 2009, 2010, 2011 Christian 
Grothoff (and other contributing authors)
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
@@ -28,8 +28,6 @@
 #include "platform.h"
 #include "gnunet_fs_service.h"
 
-#define DEFAULT_EXPIRATION GNUNET_TIME_relative_multiply 
(GNUNET_TIME_UNIT_YEARS, 2)
-
 static int ret;
 
 static int verbose;
@@ -46,10 +44,8 @@
 
 static struct GNUNET_FS_Uri *uri;
 
-static unsigned int anonymity = 1;
+static struct GNUNET_FS_BlockOptions bo = { { 2 * 365 * 24 * 60 * 60 * 1000LL  
}, 1, 365, 1 };
 
-static unsigned int priority = 365;
-
 static char *uri_string;
 
 static char *next_id;
@@ -240,10 +236,8 @@
  * @param length length of the file or directory
  * @param m metadata for the file or directory (can be modified)
  * @param uri pointer to the keywords that will be used for this entry (can be 
modified)
- * @param anonymity pointer to selected anonymity level (can be modified)
- * @param priority pointer to selected priority (can be modified)
+ * @param bo block options
  * @param do_index should we index?
- * @param expirationTime pointer to selected expiration time (can be modified)
  * @param client_info pointer to client context set upon creation (can be 
modified)
  * @return GNUNET_OK to continue, GNUNET_NO to remove
  *         this entry from the directory, GNUNET_SYSERR
@@ -255,10 +249,8 @@
                   uint64_t length,
                   struct GNUNET_CONTAINER_MetaData *m,
                   struct GNUNET_FS_Uri **uri,
-                  unsigned int *anonymity,
-                  unsigned int *priority,
+                  struct GNUNET_FS_BlockOptions *bo,
                   int *do_index,
-                  struct GNUNET_TIME_Absolute *expirationTime,
                   void **client_info)
 {
   char *fn;
@@ -375,9 +367,7 @@
                                 next_id,
                                 meta,
                                 uri,
-                                GNUNET_TIME_relative_to_absolute 
(DEFAULT_EXPIRATION),
-                                anonymity,
-                                priority,
+                                &bo,
                                 GNUNET_FS_PUBLISH_OPTION_NONE,
                                 uri_sks_continuation,
                                 NULL);
@@ -517,9 +507,7 @@
                             topKeywords,
                             meta,
                             uri,
-                            GNUNET_TIME_relative_to_absolute 
(DEFAULT_EXPIRATION),
-                            anonymity,
-                            priority,
+                            &bo,
                             GNUNET_FS_PUBLISH_OPTION_NONE,
                             &uri_ksk_continuation,
                             NULL);
@@ -557,9 +545,7 @@
                                                             
&GNUNET_FS_directory_scanner_default,
                                                             plugins,
                                                             !do_insert,
-                                                            anonymity,
-                                                            priority,
-                                                            
GNUNET_TIME_relative_to_absolute (DEFAULT_EXPIRATION),
+                                                            &bo,
                                                             &emsg);
     }
   else
@@ -576,9 +562,7 @@
                                                        keywords,
                                                        NULL,
                                                        !do_insert,
-                                                       anonymity,
-                                                       priority,
-                                                       
GNUNET_TIME_relative_to_absolute (DEFAULT_EXPIRATION));
+                                                       &bo);
       GNUNET_break (fi != NULL);
       GNUNET_FS_uri_destroy (keywords);
     }
@@ -644,7 +628,7 @@
   static const struct GNUNET_GETOPT_CommandLineOption options[] = {
     {'a', "anonymity", "LEVEL",
      gettext_noop ("set the desired LEVEL of sender-anonymity"),
-     1, &GNUNET_GETOPT_set_uint, &anonymity},
+     1, &GNUNET_GETOPT_set_uint, &bo.anonymity_level},
     {'d', "disable-creation-time", NULL,
      gettext_noop
      ("disable adding the creation time to the metadata of the uploaded file"),
@@ -676,11 +660,14 @@
      1, &GNUNET_GETOPT_set_string, &next_id},
     {'p', "priority", "PRIORITY",
      gettext_noop ("specify the priority of the content"),
-     1, &GNUNET_GETOPT_set_uint, &priority},
+     1, &GNUNET_GETOPT_set_uint, &bo.content_priority},
     {'P', "pseudonym", "NAME",
      gettext_noop
      ("publish the files under the pseudonym NAME (place file into 
namespace)"),
      1, &GNUNET_GETOPT_set_string, &pseudonym},
+    {'r', "replication", "LEVEL",
+     gettext_noop ("set the desired replication LEVEL"),
+     0, &GNUNET_GETOPT_set_uint, &bo.replication_level},
     {'s', "simulate-only", NULL,
      gettext_noop ("only simulate the process but do not do any "
                   "actual publishing (useful to compute URIs)"),

Modified: gnunet/src/fs/gnunet-service-fs.c
===================================================================
--- gnunet/src/fs/gnunet-service-fs.c   2011-04-03 12:17:09 UTC (rev 14829)
+++ gnunet/src/fs/gnunet-service-fs.c   2011-04-03 13:47:56 UTC (rev 14830)
@@ -1432,9 +1432,9 @@
   mig_task = GNUNET_SCHEDULER_NO_TASK;
   if (dsh != NULL)
     {
-      mig_qe = GNUNET_DATASTORE_get_random (dsh, 0, UINT_MAX,
-                                           GNUNET_TIME_UNIT_FOREVER_REL,
-                                           &process_migration_content, NULL);
+      mig_qe = GNUNET_DATASTORE_get_for_replication (dsh, 0, UINT_MAX,
+                                                    
GNUNET_TIME_UNIT_FOREVER_REL,
+                                                    
&process_migration_content, NULL);
       GNUNET_assert (mig_qe != NULL);
     }
 }
@@ -3764,8 +3764,10 @@
       GNUNET_DATASTORE_put (dsh,
                            0, &query, dsize, &put[1],
                            type, prq.priority, 1 /* anonymity */, 
+                           0 /* replication */,
                            expiration, 
-                           1 + prq.priority, MAX_DATASTORE_QUEUE,
+                           1 + prq.priority, 
+                           MAX_DATASTORE_QUEUE,
                            GNUNET_CONSTANTS_SERVICE_TIMEOUT,
                            &put_migration_continuation, 
                            start);

Modified: gnunet/src/fs/gnunet-service-fs_new.c
===================================================================
--- gnunet/src/fs/gnunet-service-fs_new.c       2011-04-03 12:17:09 UTC (rev 
14829)
+++ gnunet/src/fs/gnunet-service-fs_new.c       2011-04-03 13:47:56 UTC (rev 
14830)
@@ -523,7 +523,7 @@
   };
 
   GSF_core = GNUNET_CORE_connect (GSF_cfg,
-                                 1, /* larger? */
+                                 2, /* larger? */
                                  NULL,
                                  &peer_init_handler,
                                  &peer_connect_handler,

Modified: gnunet/src/fs/gnunet-service-fs_pr.c
===================================================================
--- gnunet/src/fs/gnunet-service-fs_pr.c        2011-04-03 12:17:09 UTC (rev 
14829)
+++ gnunet/src/fs/gnunet-service-fs_pr.c        2011-04-03 13:47:56 UTC (rev 
14830)
@@ -915,6 +915,7 @@
       GNUNET_DATASTORE_put (GSF_dsh,
                            0, key, size, data,
                            type, prq.priority, 1 /* anonymity */, 
+                           0 /* replication */,
                            exp, 
                            1 + prq.priority, MAX_DATASTORE_QUEUE,
                            GNUNET_CONSTANTS_SERVICE_TIMEOUT,
@@ -1237,6 +1238,7 @@
       GNUNET_DATASTORE_put (GSF_dsh,
                            0, &query, dsize, &put[1],
                            type, prq.priority, 1 /* anonymity */, 
+                           0 /* replication */,
                            expiration, 
                            1 + prq.priority, MAX_DATASTORE_QUEUE,
                            GNUNET_CONSTANTS_SERVICE_TIMEOUT,

Modified: gnunet/src/fs/gnunet-service-fs_push.c
===================================================================
--- gnunet/src/fs/gnunet-service-fs_push.c      2011-04-03 12:17:09 UTC (rev 
14829)
+++ gnunet/src/fs/gnunet-service-fs_push.c      2011-04-03 13:47:56 UTC (rev 
14830)
@@ -576,10 +576,10 @@
     return;
   if (GSF_dsh != NULL)
     {
-      mig_qe = GNUNET_DATASTORE_get_random (GSF_dsh, 
-                                           0, UINT_MAX,
-                                           GNUNET_TIME_UNIT_FOREVER_REL,
-                                           &process_migration_content, NULL);
+      mig_qe = GNUNET_DATASTORE_get_for_replication (GSF_dsh, 
+                                                    0, UINT_MAX,
+                                                    
GNUNET_TIME_UNIT_FOREVER_REL,
+                                                    
&process_migration_content, NULL);
       GNUNET_assert (mig_qe != NULL);
     }
 }

Modified: gnunet/src/fs/test_fs_download.c
===================================================================
--- gnunet/src/fs/test_fs_download.c    2011-04-03 12:17:09 UTC (rev 14829)
+++ gnunet/src/fs/test_fs_download.c    2011-04-03 13:47:56 UTC (rev 14830)
@@ -295,6 +295,7 @@
   struct GNUNET_FS_Uri *kuri;
   struct GNUNET_FS_FileInformation *fi;
   size_t i;
+  struct GNUNET_FS_BlockOptions bo;
 
   setup_peer (&p1, "test_fs_download_data.conf");
   fs = GNUNET_FS_start (cfg,
@@ -309,6 +310,10 @@
     buf[i] = GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, 256);
   meta = GNUNET_CONTAINER_meta_data_create ();
   kuri = GNUNET_FS_uri_ksk_create_from_args (2, keywords);
+  bo.content_priority = 42;
+  bo.anonymity_level = 1;
+  bo.replication_level = 0;
+  bo.expiration_time = GNUNET_TIME_relative_to_absolute (LIFETIME); 
   fi = GNUNET_FS_file_information_create_from_data (fs,
                                                    "publish-context",
                                                    FILESIZE,
@@ -316,9 +321,7 @@
                                                    kuri,
                                                    meta,
                                                    GNUNET_NO,
-                                                   1,
-                                                   42,
-                                                   
GNUNET_TIME_relative_to_absolute (LIFETIME)); 
+                                                   &bo);
   GNUNET_FS_uri_destroy (kuri);
   GNUNET_CONTAINER_meta_data_destroy (meta);
   GNUNET_assert (NULL != fi);

Modified: gnunet/src/fs/test_fs_download_indexed.c
===================================================================
--- gnunet/src/fs/test_fs_download_indexed.c    2011-04-03 12:17:09 UTC (rev 
14829)
+++ gnunet/src/fs/test_fs_download_indexed.c    2011-04-03 13:47:56 UTC (rev 
14830)
@@ -294,6 +294,7 @@
   struct GNUNET_CONTAINER_MetaData *meta;
   struct GNUNET_FS_Uri *kuri;
   struct GNUNET_FS_FileInformation *fi;
+  struct GNUNET_FS_BlockOptions bo;
   size_t i;
 
   setup_peer (&p1, "test_fs_download_data.conf");
@@ -317,15 +318,17 @@
   GNUNET_free (buf);
   meta = GNUNET_CONTAINER_meta_data_create ();
   kuri = GNUNET_FS_uri_ksk_create_from_args (2, keywords);
+  bo.content_priority = 42;
+  bo.anonymity_level = 1;
+  bo.replication_level = 0;
+  bo.expiration_time = GNUNET_TIME_relative_to_absolute (LIFETIME); 
   fi = GNUNET_FS_file_information_create_from_file (fs,
                                                    "publish-context",
                                                    fn1,
                                                    kuri,
                                                    meta,
                                                    GNUNET_YES,
-                                                   1,
-                                                   42,
-                                                   
GNUNET_TIME_relative_to_absolute (LIFETIME)); 
+                                                   &bo);
   GNUNET_FS_uri_destroy (kuri);
   GNUNET_CONTAINER_meta_data_destroy (meta);
   GNUNET_assert (NULL != fi);

Modified: gnunet/src/fs/test_fs_download_persistence.c
===================================================================
--- gnunet/src/fs/test_fs_download_persistence.c        2011-04-03 12:17:09 UTC 
(rev 14829)
+++ gnunet/src/fs/test_fs_download_persistence.c        2011-04-03 13:47:56 UTC 
(rev 14830)
@@ -359,6 +359,7 @@
   struct GNUNET_FS_Uri *kuri;
   struct GNUNET_FS_FileInformation *fi;
   size_t i;
+  struct GNUNET_FS_BlockOptions bo;
 
   cfg = c;
   setup_peer (&p1, "test_fs_download_data.conf");
@@ -374,6 +375,10 @@
     buf[i] = GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, 256);
   meta = GNUNET_CONTAINER_meta_data_create ();
   kuri = GNUNET_FS_uri_ksk_create_from_args (2, keywords);
+  bo.content_priority = 42;
+  bo.anonymity_level = 1;
+  bo.replication_level = 0;
+  bo.expiration_time = GNUNET_TIME_relative_to_absolute (LIFETIME); 
   fi = GNUNET_FS_file_information_create_from_data (fs,
                                                    "publish-context",
                                                    FILESIZE,
@@ -381,9 +386,7 @@
                                                    kuri,
                                                    meta,
                                                    GNUNET_NO,
-                                                   1,
-                                                   42,
-                                                   
GNUNET_TIME_relative_to_absolute (LIFETIME)); 
+                                                   &bo);
   GNUNET_FS_uri_destroy (kuri);
   GNUNET_CONTAINER_meta_data_destroy (meta);
   GNUNET_assert (NULL != fi);

Modified: gnunet/src/fs/test_fs_file_information.c
===================================================================
--- gnunet/src/fs/test_fs_file_information.c    2011-04-03 12:17:09 UTC (rev 
14829)
+++ gnunet/src/fs/test_fs_file_information.c    2011-04-03 13:47:56 UTC (rev 
14830)
@@ -55,10 +55,8 @@
          uint64_t length,
          struct GNUNET_CONTAINER_MetaData *meta,
          struct GNUNET_FS_Uri **uri,
-         uint32_t *anonymity,
-         uint32_t *priority,
+         struct GNUNET_FS_BlockOptions *bo,
          int *do_index,
-         struct GNUNET_TIME_Absolute *expirationTime,
          void **client_info)
 {
   return GNUNET_OK;
@@ -85,6 +83,7 @@
   struct GNUNET_FS_FileInformation *fidir;
   struct GNUNET_FS_Handle *fs;
   size_t i;
+  struct GNUNET_FS_BlockOptions bo;
 
   fs = GNUNET_FS_start (cfg, "test-fs-file-information", NULL, NULL,
                        GNUNET_FS_FLAGS_NONE,
@@ -112,16 +111,18 @@
   GNUNET_free (buf);
 
   meta = GNUNET_CONTAINER_meta_data_create ();
-  kuri = GNUNET_FS_uri_ksk_create_from_args (2, keywords);
+  kuri = GNUNET_FS_uri_ksk_create_from_args (2, keywords); 
+  bo.content_priority = 42;
+  bo.anonymity_level = 1;
+  bo.replication_level = 0;
+  bo.expiration_time = GNUNET_TIME_relative_to_absolute (LIFETIME); 
   fi1 = GNUNET_FS_file_information_create_from_file (fs,
                                                     
"file_information-context1",
                                                     fn1,
                                                     kuri,
                                                     meta,
                                                     GNUNET_YES,
-                                                    1,
-                                                    42,
-                                                    
GNUNET_TIME_relative_to_absolute (LIFETIME)); 
+                                                    &bo);
   GNUNET_assert (fi1 != NULL);
   fi2 = GNUNET_FS_file_information_create_from_file (fs,
                                                     
"file_information-context2",
@@ -129,17 +130,13 @@
                                                     kuri,
                                                     meta,
                                                     GNUNET_YES,
-                                                    1,
-                                                    42,
-                                                    
GNUNET_TIME_relative_to_absolute (LIFETIME)); 
+                                                    &bo);
   GNUNET_assert (fi2 != NULL);
   fidir = GNUNET_FS_file_information_create_empty_directory (fs,
                                                             
"file_information-context-dir",
                                                             kuri,
                                                             meta,
-                                                            1,
-                                                            42,
-                                                            
GNUNET_TIME_relative_to_absolute (LIFETIME)); 
+                                                            &bo);
   GNUNET_assert (GNUNET_OK == GNUNET_FS_file_information_add (fidir, fi1));
   GNUNET_assert (GNUNET_OK == GNUNET_FS_file_information_add (fidir, fi2));
   GNUNET_FS_uri_destroy (kuri);

Modified: gnunet/src/fs/test_fs_list_indexed.c
===================================================================
--- gnunet/src/fs/test_fs_list_indexed.c        2011-04-03 12:17:09 UTC (rev 
14829)
+++ gnunet/src/fs/test_fs_list_indexed.c        2011-04-03 13:47:56 UTC (rev 
14830)
@@ -239,6 +239,7 @@
   struct GNUNET_FS_FileInformation *fi2;
   struct GNUNET_FS_FileInformation *fidir;
   size_t i;
+  struct GNUNET_FS_BlockOptions bo;
 
   setup_peer (&p1, "test_fs_list_indexed_data.conf");
   fs = GNUNET_FS_start (cfg,
@@ -272,33 +273,33 @@
 
   meta = GNUNET_CONTAINER_meta_data_create ();
   kuri = GNUNET_FS_uri_ksk_create_from_args (2, keywords);
+  bo.content_priority = 42;
+  bo.anonymity_level = 1;
+  bo.replication_level = 0;
+  bo.expiration_time = GNUNET_TIME_relative_to_absolute (LIFETIME); 
   fi1 = GNUNET_FS_file_information_create_from_file (fs,
                                                     "list_indexed-context1",
                                                     fn1,
                                                     kuri,
                                                     meta,
                                                     GNUNET_YES,
-                                                    1,
-                                                    42,
-                                                    
GNUNET_TIME_relative_to_absolute (LIFETIME)); 
+                                                    &bo);
   GNUNET_assert (NULL != fi1);
+  bo.anonymity_level = 2;
   fi2 = GNUNET_FS_file_information_create_from_file (fs,
                                                     "list_indexed-context2",
                                                     fn2,
                                                     kuri,
                                                     meta,
                                                     GNUNET_YES,
-                                                    2,
-                                                    42,
-                                                    
GNUNET_TIME_relative_to_absolute (LIFETIME)); 
+                                                    &bo);
   GNUNET_assert (NULL != fi2);
+  bo.anonymity_level = 3;
   fidir = GNUNET_FS_file_information_create_empty_directory (fs,
                                                             
"list_indexed-context-dir",
                                                             kuri,
                                                             meta,
-                                                            3,
-                                                            42,
-                                                            
GNUNET_TIME_relative_to_absolute (LIFETIME)); 
+                                                            &bo);
   GNUNET_assert (GNUNET_OK == GNUNET_FS_file_information_add (fidir, fi1));
   GNUNET_assert (GNUNET_OK == GNUNET_FS_file_information_add (fidir, fi2));
   GNUNET_FS_uri_destroy (kuri);

Modified: gnunet/src/fs/test_fs_namespace.c
===================================================================
--- gnunet/src/fs/test_fs_namespace.c   2011-04-03 12:17:09 UTC (rev 14829)
+++ gnunet/src/fs/test_fs_namespace.c   2011-04-03 13:47:56 UTC (rev 14830)
@@ -275,22 +275,24 @@
          const char *emsg)
 {
   struct GNUNET_CONTAINER_MetaData *meta;
-  struct GNUNET_TIME_Absolute expiration;
   struct GNUNET_FS_Uri *ksk_uri;
   char * msg;
+  struct GNUNET_FS_BlockOptions bo;
 
-  expiration = GNUNET_TIME_relative_to_absolute (GNUNET_TIME_UNIT_MINUTES);
   meta = GNUNET_CONTAINER_meta_data_create ();
   msg = NULL;
   ksk_uri = GNUNET_FS_uri_parse ("gnunet://fs/ksk/ns-search", &msg);
   GNUNET_assert (NULL == msg);
   ksk_expect_uri = GNUNET_FS_uri_dup (uri);
+  bo.content_priority = 1;
+  bo.anonymity_level = 1;
+  bo.replication_level = 0;
+  bo.expiration_time = GNUNET_TIME_relative_to_absolute 
(GNUNET_TIME_UNIT_MINUTES);
   GNUNET_FS_publish_ksk (fs,
                         ksk_uri,
                         meta,
                         uri,
-                        expiration,
-                        1, 1,
+                        &bo,
                         GNUNET_FS_PUBLISH_OPTION_NONE,
                         &publish_cont,
                         NULL);
@@ -306,7 +308,7 @@
 {
   struct GNUNET_CONTAINER_MetaData *meta;
   struct GNUNET_FS_Namespace *ns;
-  struct GNUNET_TIME_Absolute expiration;
+  struct GNUNET_FS_BlockOptions bo;
 
   if (NULL != emsg)
     {
@@ -315,21 +317,23 @@
       GNUNET_FS_stop (fs);
       return;
     }
-  expiration = GNUNET_TIME_relative_to_absolute (GNUNET_TIME_UNIT_MINUTES);
   ns = GNUNET_FS_namespace_create (fs,
                                   "testNamespace");
   GNUNET_assert (NULL != ns);
   meta = GNUNET_CONTAINER_meta_data_create ();
   GNUNET_assert (NULL == emsg);
   sks_expect_uri = GNUNET_FS_uri_dup (uri);
+  bo.content_priority = 1;
+  bo.anonymity_level = 1;
+  bo.replication_level = 0;
+  bo.expiration_time = GNUNET_TIME_relative_to_absolute 
(GNUNET_TIME_UNIT_MINUTES);
   GNUNET_FS_publish_sks (fs,
                         ns,
                         "this",
                         "next",
                         meta,
                         uri, /* FIXME: this is non-sense (use CHK URI!?) */
-                        expiration,
-                        1, 1,
+                        &bo,
                         GNUNET_FS_PUBLISH_OPTION_NONE,
                         &sks_cont,
                         NULL);
@@ -357,7 +361,7 @@
 testNamespace ()
 {
   struct GNUNET_FS_Namespace *ns;
-  struct GNUNET_TIME_Absolute expiration;
+  struct GNUNET_FS_BlockOptions bo;
   struct GNUNET_CONTAINER_MetaData *meta;
   struct GNUNET_FS_Uri *ksk_uri;
   int ok;
@@ -375,15 +379,17 @@
       err = 1;
       return;
     }
-  expiration = GNUNET_TIME_relative_to_absolute (GNUNET_TIME_UNIT_MINUTES);
   meta = GNUNET_CONTAINER_meta_data_create ();
   ksk_uri = GNUNET_FS_uri_parse ("gnunet://fs/ksk/testnsa", NULL);
+  bo.content_priority = 1;
+  bo.anonymity_level = 1;
+  bo.replication_level = 0;
+  bo.expiration_time = GNUNET_TIME_relative_to_absolute 
(GNUNET_TIME_UNIT_MINUTES);
   GNUNET_FS_namespace_advertise (fs,
                                 ksk_uri,
                                 ns,
                                 meta,
-                                1, 1,
-                                expiration,                                    
   
+                                &bo,
                                 "root",
                                 &adv_cont, NULL);
   kill_task = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_MINUTES,

Modified: gnunet/src/fs/test_fs_namespace_list_updateable.c
===================================================================
--- gnunet/src/fs/test_fs_namespace_list_updateable.c   2011-04-03 12:17:09 UTC 
(rev 14829)
+++ gnunet/src/fs/test_fs_namespace_list_updateable.c   2011-04-03 13:47:56 UTC 
(rev 14830)
@@ -40,15 +40,15 @@
 
 static struct GNUNET_FS_Namespace *ns;
 
-static struct GNUNET_TIME_Absolute expiration;
-
 static struct GNUNET_CONTAINER_MetaData *meta;
 
 static struct GNUNET_FS_Uri *uri_this;
 
 static struct GNUNET_FS_Uri *uri_next;
 
+static struct GNUNET_FS_BlockOptions bo;
 
+
 struct PeerContext
 {
   struct GNUNET_CONFIGURATION_Handle *cfg;
@@ -172,6 +172,7 @@
               const struct GNUNET_FS_Uri *uri,
               const char *emsg)
 {
+
   GNUNET_assert (NULL == emsg);
   err = 1;
   GNUNET_FS_namespace_list_updateable (ns,
@@ -184,8 +185,7 @@
                         "future",
                         meta,
                         uri_next,
-                        expiration,
-                        1, 1,
+                        &bo,
                         GNUNET_FS_PUBLISH_OPTION_NONE,
                         &sks_cont_next,
                         NULL);
@@ -201,7 +201,10 @@
   ns = GNUNET_FS_namespace_create (fs,
                                   "testNamespace");
   GNUNET_assert (NULL != ns);
-  expiration = GNUNET_TIME_relative_to_absolute (GNUNET_TIME_UNIT_MINUTES);
+  bo.content_priority = 1;
+  bo.anonymity_level = 1;
+  bo.replication_level = 0;
+  bo.expiration_time = GNUNET_TIME_relative_to_absolute 
(GNUNET_TIME_UNIT_MINUTES);
   meta = GNUNET_CONTAINER_meta_data_create ();
 
   uri_this =
@@ -214,8 +217,7 @@
                         "next",
                         meta,
                         uri_this,
-                        expiration,
-                        1, 1,
+                        &bo,
                         GNUNET_FS_PUBLISH_OPTION_NONE,
                         &sks_cont_this,
                         NULL);

Modified: gnunet/src/fs/test_fs_publish.c
===================================================================
--- gnunet/src/fs/test_fs_publish.c     2011-04-03 12:17:09 UTC (rev 14829)
+++ gnunet/src/fs/test_fs_publish.c     2011-04-03 13:47:56 UTC (rev 14830)
@@ -225,6 +225,7 @@
   struct GNUNET_FS_FileInformation *fi2;
   struct GNUNET_FS_FileInformation *fidir;
   size_t i;
+  struct GNUNET_FS_BlockOptions bo;
 
   setup_peer (&p1, "test_fs_publish_data.conf");
   fs = GNUNET_FS_start (cfg,
@@ -258,33 +259,35 @@
 
   meta = GNUNET_CONTAINER_meta_data_create ();
   kuri = GNUNET_FS_uri_ksk_create_from_args (2, keywords);
+  bo.content_priority = 42;
+  bo.anonymity_level = 1;
+  bo.replication_level = 0;
+  bo.expiration_time = GNUNET_TIME_relative_to_absolute (LIFETIME);
+
   fi1 = GNUNET_FS_file_information_create_from_file (fs,
                                                     "publish-context1",
                                                     fn1,
                                                     kuri,
                                                     meta,
                                                     GNUNET_YES,
-                                                    1,
-                                                    42,
-                                                    
GNUNET_TIME_relative_to_absolute (LIFETIME)); 
+                                                    &bo);
+                                                    
   GNUNET_assert (NULL != fi1);
+  bo.anonymity_level = 2;
   fi2 = GNUNET_FS_file_information_create_from_file (fs,
                                                     "publish-context2",
                                                     fn2,
                                                     kuri,
                                                     meta,
                                                     GNUNET_YES,
-                                                    2,
-                                                    42,
-                                                    
GNUNET_TIME_relative_to_absolute (LIFETIME)); 
+                                                    &bo);
   GNUNET_assert (NULL != fi2);
+  bo.anonymity_level = 3;
   fidir = GNUNET_FS_file_information_create_empty_directory (fs,
                                                             
"publish-context-dir",
                                                             kuri,
                                                             meta,
-                                                            3,
-                                                            42,
-                                                            
GNUNET_TIME_relative_to_absolute (LIFETIME)); 
+                                                            &bo);
   GNUNET_assert (GNUNET_OK == GNUNET_FS_file_information_add (fidir, fi1));
   GNUNET_assert (GNUNET_OK == GNUNET_FS_file_information_add (fidir, fi2));
   GNUNET_FS_uri_destroy (kuri);

Modified: gnunet/src/fs/test_fs_publish_persistence.c
===================================================================
--- gnunet/src/fs/test_fs_publish_persistence.c 2011-04-03 12:17:09 UTC (rev 
14829)
+++ gnunet/src/fs/test_fs_publish_persistence.c 2011-04-03 13:47:56 UTC (rev 
14830)
@@ -282,6 +282,7 @@
   struct GNUNET_FS_FileInformation *fi2;
   struct GNUNET_FS_FileInformation *fidir;
   size_t i;
+  struct GNUNET_FS_BlockOptions bo;
 
   cfg = c;
   setup_peer (&p1, "test_fs_publish_data.conf");
@@ -316,33 +317,33 @@
 
   meta = GNUNET_CONTAINER_meta_data_create ();
   kuri = GNUNET_FS_uri_ksk_create_from_args (2, keywords);
+  bo.content_priority = 42;
+  bo.anonymity_level = 1;
+  bo.replication_level = 0;
+  bo.expiration_time = GNUNET_TIME_relative_to_absolute (LIFETIME); 
   fi1 = GNUNET_FS_file_information_create_from_file (fs,
                                                     "publish-context1",
                                                     fn1,
                                                     kuri,
                                                     meta,
                                                     GNUNET_YES,
-                                                    1,
-                                                    42,
-                                                    
GNUNET_TIME_relative_to_absolute (LIFETIME)); 
+                                                    &bo);
   GNUNET_assert (NULL != fi1);
+  bo.anonymity_level = 2;
   fi2 = GNUNET_FS_file_information_create_from_file (fs,
                                                     "publish-context2",
                                                     fn2,
                                                     kuri,
                                                     meta,
                                                     GNUNET_YES,
-                                                    2,
-                                                    42,
-                                                    
GNUNET_TIME_relative_to_absolute (LIFETIME)); 
+                                                    &bo);
   GNUNET_assert (NULL != fi2);
+  bo.anonymity_level = 3;
   fidir = GNUNET_FS_file_information_create_empty_directory (fs,
                                                             
"publish-context-dir",
                                                             kuri,
                                                             meta,
-                                                            3,
-                                                            42,
-                                                            
GNUNET_TIME_relative_to_absolute (LIFETIME)); 
+                                                            &bo);
   GNUNET_assert (GNUNET_OK == GNUNET_FS_file_information_add (fidir, fi1));
   GNUNET_assert (GNUNET_OK == GNUNET_FS_file_information_add (fidir, fi2));
   GNUNET_FS_uri_destroy (kuri);

Modified: gnunet/src/fs/test_fs_search.c
===================================================================
--- gnunet/src/fs/test_fs_search.c      2011-04-03 12:17:09 UTC (rev 14829)
+++ gnunet/src/fs/test_fs_search.c      2011-04-03 13:47:56 UTC (rev 14830)
@@ -226,6 +226,7 @@
   char *buf;
   struct GNUNET_CONTAINER_MetaData *meta;
   struct GNUNET_FS_Uri *kuri;
+  struct GNUNET_FS_BlockOptions bo;
   struct GNUNET_FS_FileInformation *fi;
   size_t i;
 
@@ -242,6 +243,10 @@
     buf[i] = GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, 256);
   meta = GNUNET_CONTAINER_meta_data_create ();
   kuri = GNUNET_FS_uri_ksk_create_from_args (2, keywords);
+  bo.content_priority = 42;
+  bo.anonymity_level = 1;
+  bo.replication_level = 0;
+  bo.expiration_time = GNUNET_TIME_relative_to_absolute (LIFETIME);
   fi = GNUNET_FS_file_information_create_from_data (fs,
                                                    "publish-context",
                                                    FILESIZE,
@@ -249,9 +254,7 @@
                                                    kuri,
                                                    meta,
                                                    GNUNET_NO,
-                                                   1,
-                                                   42,
-                                                   
GNUNET_TIME_relative_to_absolute (LIFETIME)); 
+                                                   &bo);
   GNUNET_FS_uri_destroy (kuri);
   GNUNET_CONTAINER_meta_data_destroy (meta);
   GNUNET_assert (NULL != fi);

Modified: gnunet/src/fs/test_fs_search_persistence.c
===================================================================
--- gnunet/src/fs/test_fs_search_persistence.c  2011-04-03 12:17:09 UTC (rev 
14829)
+++ gnunet/src/fs/test_fs_search_persistence.c  2011-04-03 13:47:56 UTC (rev 
14830)
@@ -297,6 +297,7 @@
   struct GNUNET_FS_Uri *kuri;
   struct GNUNET_FS_FileInformation *fi;
   size_t i;
+  struct GNUNET_FS_BlockOptions bo;
 
   cfg = c;
   setup_peer (&p1, "test_fs_search_data.conf");
@@ -312,6 +313,10 @@
     buf[i] = GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, 256);
   meta = GNUNET_CONTAINER_meta_data_create ();
   kuri = GNUNET_FS_uri_ksk_create_from_args (2, keywords);
+  bo.content_priority = 42;
+  bo.anonymity_level = 1;
+  bo.replication_level = 0;
+  bo.expiration_time = GNUNET_TIME_relative_to_absolute (LIFETIME);
   fi = GNUNET_FS_file_information_create_from_data (fs,
                                                    "publish-context",
                                                    FILESIZE,
@@ -319,9 +324,7 @@
                                                    kuri,
                                                    meta,
                                                    GNUNET_NO,
-                                                   1,
-                                                   42,
-                                                   
GNUNET_TIME_relative_to_absolute (LIFETIME)); 
+                                                   &bo);
   GNUNET_FS_uri_destroy (kuri);
   GNUNET_CONTAINER_meta_data_destroy (meta);
   GNUNET_assert (NULL != fi);

Modified: gnunet/src/fs/test_fs_unindex.c
===================================================================
--- gnunet/src/fs/test_fs_unindex.c     2011-04-03 12:17:09 UTC (rev 14829)
+++ gnunet/src/fs/test_fs_unindex.c     2011-04-03 13:47:56 UTC (rev 14830)
@@ -233,6 +233,7 @@
   struct GNUNET_FS_Uri *kuri;
   struct GNUNET_FS_FileInformation *fi;
   size_t i;
+  struct GNUNET_FS_BlockOptions bo;
 
   setup_peer (&p1, "test_fs_unindex_data.conf");
   fn = GNUNET_DISK_mktemp ("gnunet-unindex-test-dst");
@@ -254,15 +255,17 @@
   GNUNET_free (buf);
   meta = GNUNET_CONTAINER_meta_data_create ();
   kuri = GNUNET_FS_uri_ksk_create_from_args (2, keywords);
+  bo.content_priority = 42;
+  bo.anonymity_level = 1;
+  bo.replication_level = 0;
+  bo.expiration_time = GNUNET_TIME_relative_to_absolute (LIFETIME);
   fi = GNUNET_FS_file_information_create_from_file (fs,
                                                    "publish-context",
                                                    fn,
                                                    kuri,
                                                    meta,
                                                    GNUNET_YES,
-                                                   1,
-                                                   42,
-                                                   
GNUNET_TIME_relative_to_absolute (LIFETIME)); 
+                                                   &bo);
   GNUNET_FS_uri_destroy (kuri);
   GNUNET_CONTAINER_meta_data_destroy (meta);
   GNUNET_assert (NULL != fi);

Modified: gnunet/src/fs/test_fs_unindex_persistence.c
===================================================================
--- gnunet/src/fs/test_fs_unindex_persistence.c 2011-04-03 12:17:09 UTC (rev 
14829)
+++ gnunet/src/fs/test_fs_unindex_persistence.c 2011-04-03 13:47:56 UTC (rev 
14830)
@@ -301,6 +301,7 @@
   struct GNUNET_FS_Uri *kuri;
   struct GNUNET_FS_FileInformation *fi;
   size_t i;
+  struct GNUNET_FS_BlockOptions bo;
 
   cfg = c;
   setup_peer (&p1, "test_fs_unindex_data.conf");
@@ -323,15 +324,17 @@
   GNUNET_free (buf);
   meta = GNUNET_CONTAINER_meta_data_create ();
   kuri = GNUNET_FS_uri_ksk_create_from_args (2, keywords);
+  bo.content_priority = 42;
+  bo.anonymity_level = 1;
+  bo.replication_level = 0;
+  bo.expiration_time = GNUNET_TIME_relative_to_absolute (LIFETIME);
   fi = GNUNET_FS_file_information_create_from_file (fs,
                                                    "publish-context",
                                                    fn,
                                                    kuri,
                                                    meta,
                                                    GNUNET_YES,
-                                                   1,
-                                                   42,
-                                                   
GNUNET_TIME_relative_to_absolute (LIFETIME)); 
+                                                   &bo);
   GNUNET_FS_uri_destroy (kuri);
   GNUNET_CONTAINER_meta_data_destroy (meta);
   GNUNET_assert (NULL != fi);

Modified: gnunet/src/include/gnunet_datastore_service.h
===================================================================
--- gnunet/src/include/gnunet_datastore_service.h       2011-04-03 12:17:09 UTC 
(rev 14829)
+++ gnunet/src/include/gnunet_datastore_service.h       2011-04-03 13:47:56 UTC 
(rev 14830)
@@ -1,6 +1,6 @@
 /*
      This file is part of GNUnet
-     (C) 2004, 2005, 2006, 2007, 2009, 2010 Christian Grothoff (and other 
contributing authors)
+     (C) 2004, 2005, 2006, 2007, 2009, 2010, 2011 Christian Grothoff (and 
other contributing authors)
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
@@ -122,8 +122,8 @@
 
 /**
  * Store an item in the datastore.  If the item is already present,
- * the priorities are summed up and the higher expiration time and
- * lower anonymity level is used.
+ * the priorities and replication values are summed up and the higher
+ * expiration time and lower anonymity level is used.
  *
  * @param h handle to the datastore
  * @param rid reservation ID to use (from "reserve"); use 0 if no
@@ -134,6 +134,7 @@
  * @param type type of the content
  * @param priority priority of the content
  * @param anonymity anonymity-level for the content
+ * @param replication how often should the content be replicated to other 
peers?
  * @param expiration expiration time for the content
  * @param queue_priority ranking of this request in the priority queue
  * @param max_queue_size at what queue size should this request be dropped
@@ -154,6 +155,7 @@
                       enum GNUNET_BLOCK_Type type,
                       uint32_t priority,
                       uint32_t anonymity,
+                     uint32_t replication,
                       struct GNUNET_TIME_Absolute expiration,
                      unsigned int queue_priority,
                      unsigned int max_queue_size,
@@ -323,7 +325,11 @@
 
 
 /**
- * Get a random value from the datastore.
+ * Get a random value from the datastore for content replication.
+ * Returns a single, random value among those with the highest
+ * replication score, lowering positive replication scores by one for
+ * the chosen value (if only content with a replication score exists,
+ * a random value is returned and replication scores are not changed).
  *
  * @param h handle to the datastore
  * @param queue_priority ranking of this request in the priority queue
@@ -339,12 +345,12 @@
  *         (or rather, will already have been invoked)
  */
 struct GNUNET_DATASTORE_QueueEntry *
-GNUNET_DATASTORE_get_random (struct GNUNET_DATASTORE_Handle *h,
-                            unsigned int queue_priority,
-                            unsigned int max_queue_size,
-                            struct GNUNET_TIME_Relative timeout,
-                             GNUNET_DATASTORE_Iterator iter, 
-                            void *iter_cls);
+GNUNET_DATASTORE_get_for_replication (struct GNUNET_DATASTORE_Handle *h,
+                                     unsigned int queue_priority,
+                                     unsigned int max_queue_size,
+                                     struct GNUNET_TIME_Relative timeout,
+                                     GNUNET_DATASTORE_Iterator iter, 
+                                     void *iter_cls);
 
 
 /**

Modified: gnunet/src/include/gnunet_fs_service.h
===================================================================
--- gnunet/src/include/gnunet_fs_service.h      2011-04-03 12:17:09 UTC (rev 
14829)
+++ gnunet/src/include/gnunet_fs_service.h      2011-04-03 13:47:56 UTC (rev 
14830)
@@ -1574,6 +1574,52 @@
 
 
 /**
+ * Settings for publishing a block (which may of course also
+ * apply to an entire directory or file).
+ */
+struct GNUNET_FS_BlockOptions
+{
+
+  /**
+   * At what time should the block expire?  Data blocks (DBLOCKS and
+   * IBLOCKS) may still be used even if they are expired (however,
+   * they'd be removed quickly from the datastore if we are short on
+   * space), all other types of blocks will no longer be returned
+   * after they expire.
+   */
+  struct GNUNET_TIME_Absolute expiration_time;
+
+  /**
+   * At which anonymity level should the block be shared?
+   * (0: no anonymity, 1: normal GAP, >1: with cover traffic).
+   */
+  uint32_t anonymity_level;
+
+  /**
+   * How important is it for us to store the block?  If we run
+   * out of space, the highest-priority, non-expired blocks will
+   * be kept.
+   */
+  uint32_t content_priority;
+
+  /**
+   * How often should we try to migrate the block to other peers?
+   * Only used if "CONTENT_PUSHING" is set to YES, in which case we
+   * first push each block to other peers according to their
+   * replication levels.  Once each block has been pushed that many
+   * times to other peers, blocks are chosen for migration at random.
+   * Naturally, there is no guarantee that the other peers will keep
+   * these blocks for any period of time (since they won't have any
+   * priority or might be too busy to even store the block in the
+   * first place).
+   */
+  uint32_t replication_level;
+
+};
+
+
+
+/**
  * Handle to the file-sharing service.
  */
 struct GNUNET_FS_Handle;
@@ -1635,10 +1681,8 @@
  * @param length length of the file or directory
  * @param meta metadata for the file or directory (can be modified)
  * @param uri pointer to the keywords that will be used for this entry (can be 
modified)
- * @param anonymity pointer to selected anonymity level (can be modified)
- * @param priority pointer to selected priority (can be modified)
+ * @param bo block options (can be modified)
  * @param do_index should we index (can be modified)
- * @param expirationTime pointer to selected expiration time (can be modified)
  * @param client_info pointer to client context set upon creation (can be 
modified)
  * @return GNUNET_OK to continue, GNUNET_NO to remove
  *         this entry from the directory, GNUNET_SYSERR
@@ -1649,10 +1693,8 @@
                                                  uint64_t length,
                                                  struct 
GNUNET_CONTAINER_MetaData *meta,
                                                  struct GNUNET_FS_Uri **uri,
-                                                 uint32_t *anonymity,
-                                                 uint32_t *priority,
+                                                 struct GNUNET_FS_BlockOptions 
*bo,
                                                  int *do_index,
-                                                 struct GNUNET_TIME_Absolute 
*expirationTime,
                                                  void **client_info);
 
 
@@ -1682,11 +1724,7 @@
  * @param meta metadata for the file
  * @param do_index GNUNET_YES for index, GNUNET_NO for insertion,
  *                GNUNET_SYSERR for simulation
- * @param anonymity what is the desired anonymity level for sharing?
- * @param priority what is the priority for OUR node to
- *   keep this file available?  Use 0 for maximum anonymity and
- *   minimum reliability...
- * @param expirationTime when should this content expire?
+ * @param bo block options
  * @return publish structure entry for the file
  */
 struct GNUNET_FS_FileInformation *
@@ -1696,9 +1734,7 @@
                                             const struct GNUNET_FS_Uri 
*keywords,
                                             const struct 
GNUNET_CONTAINER_MetaData *meta,
                                             int do_index,
-                                            uint32_t anonymity,
-                                            uint32_t priority,
-                                            struct GNUNET_TIME_Absolute 
expirationTime);
+                                            const struct 
GNUNET_FS_BlockOptions *bo);
 
 
 /**
@@ -1714,11 +1750,7 @@
  * @param meta metadata for the file
  * @param do_index GNUNET_YES for index, GNUNET_NO for insertion,
  *                GNUNET_SYSERR for simulation
- * @param anonymity what is the desired anonymity level for sharing?
- * @param priority what is the priority for OUR node to
- *   keep this file available?  Use 0 for maximum anonymity and
- *   minimum reliability...
- * @param expirationTime when should this content expire?
+ * @param bo block options
  * @return publish structure entry for the file
  */
 struct GNUNET_FS_FileInformation *
@@ -1729,9 +1761,7 @@
                                             const struct GNUNET_FS_Uri 
*keywords,
                                             const struct 
GNUNET_CONTAINER_MetaData *meta,
                                             int do_index,
-                                            uint32_t anonymity,
-                                            uint32_t priority,
-                                            struct GNUNET_TIME_Absolute 
expirationTime);
+                                            const struct 
GNUNET_FS_BlockOptions *bo);
 
 
 /**
@@ -1770,11 +1800,7 @@
  * @param meta metadata for the file
  * @param do_index GNUNET_YES for index, GNUNET_NO for insertion,
  *                GNUNET_SYSERR for simulation
- * @param anonymity what is the desired anonymity level for sharing?
- * @param priority what is the priority for OUR node to
- *   keep this file available?  Use 0 for maximum anonymity and
- *   minimum reliability...
- * @param expirationTime when should this content expire?
+ * @param bo block options
  * @return publish structure entry for the file
  */
 struct GNUNET_FS_FileInformation *
@@ -1786,9 +1812,7 @@
                                               const struct GNUNET_FS_Uri 
*keywords,
                                               const struct 
GNUNET_CONTAINER_MetaData *meta,
                                               int do_index,
-                                              uint32_t anonymity,
-                                              uint32_t priority,
-                                              struct GNUNET_TIME_Absolute 
expirationTime);
+                                              const struct 
GNUNET_FS_BlockOptions *bo);
 
 
 /**
@@ -1813,9 +1837,7 @@
  * @param h handle to the file sharing subsystem
  * @param dirname name of the directory to scan
  * @param do_index should files be indexed or inserted
- * @param anonymity desired anonymity level
- * @param priority priority for publishing
- * @param expirationTime expiration for publication
+ * @param bo block options
  * @param proc function to call on each entry
  * @param proc_cls closure for proc
  * @param emsg where to store an error message (on errors)
@@ -1825,9 +1847,7 @@
                                          struct GNUNET_FS_Handle *h,
                                          const char *dirname,
                                          int do_index,
-                                         uint32_t anonymity,
-                                         uint32_t priority,
-                                         struct GNUNET_TIME_Absolute 
expirationTime,
+                                         const struct GNUNET_FS_BlockOptions 
*bo,
                                          GNUNET_FS_FileProcessor proc,
                                          void *proc_cls,
                                          char **emsg);
@@ -1849,9 +1869,7 @@
  * @param h handle to the file sharing subsystem
  * @param dirname name of the directory to scan
  * @param do_index should files be indexed or inserted
- * @param anonymity desired anonymity level
- * @param priority priority for publishing
- * @param expirationTime expiration for publication
+ * @param bo block options
  * @param proc function called on each entry
  * @param proc_cls closure for proc
  * @param emsg where to store an error message (on errors)
@@ -1862,9 +1880,7 @@
                                     struct GNUNET_FS_Handle *h,
                                     const char *dirname,
                                     int do_index,
-                                    uint32_t anonymity,
-                                    uint32_t priority,
-                                    struct GNUNET_TIME_Absolute expirationTime,
+                                    const struct GNUNET_FS_BlockOptions *bo,
                                     GNUNET_FS_FileProcessor proc,
                                     void *proc_cls,
                                     char **emsg);
@@ -1886,11 +1902,7 @@
  * @param scanner function used to get a list of files in a directory
  * @param scanner_cls closure for scanner
  * @param do_index should files in the hierarchy be indexed?
- * @param anonymity what is the desired anonymity level for sharing?
- * @param priority what is the priority for OUR node to
- *   keep this file available?  Use 0 for maximum anonymity and
- *   minimum reliability...
- * @param expirationTime when should this content expire?
+ * @param bo block options
  * @param emsg where to store an error message
  * @return publish structure entry for the directory, NULL on error
  */
@@ -1901,9 +1913,7 @@
                                                  GNUNET_FS_DirectoryScanner 
scanner,
                                                  void *scanner_cls,
                                                  int do_index,
-                                                 uint32_t anonymity,
-                                                 uint32_t priority,
-                                                 struct GNUNET_TIME_Absolute 
expirationTime,
+                                                 const struct 
GNUNET_FS_BlockOptions *bo,
                                                  char **emsg);
 
 
@@ -1918,11 +1928,7 @@
  * @param keywords under which keywords should this directory be available
  *         directly; can be NULL
  * @param meta metadata for the directory
- * @param anonymity what is the desired anonymity level for sharing?
- * @param priority what is the priority for OUR node to
- *   keep this file available?  Use 0 for maximum anonymity and
- *   minimum reliability...
- * @param expirationTime when should this content expire?
+ * @param bo block options
  * @return publish structure entry for the directory , NULL on error
  */
 struct GNUNET_FS_FileInformation *
@@ -1930,9 +1936,7 @@
                                                   void *client_info,
                                                   const struct GNUNET_FS_Uri 
*keywords,
                                                   const struct 
GNUNET_CONTAINER_MetaData *meta,
-                                                  uint32_t anonymity,
-                                                  uint32_t priority,
-                                                  struct GNUNET_TIME_Absolute 
expirationTime);
+                                                  const struct 
GNUNET_FS_BlockOptions *bo);
 
 
 /**
@@ -2069,9 +2073,8 @@
  * @param ksk_uri keywords to use
  * @param meta metadata to use
  * @param uri URI to refer to in the KBlock
- * @param expirationTime when the KBlock expires
- * @param anonymity anonymity level for the KBlock
- * @param priority priority for the KBlock
+ * @param bo block options
+ * @param options publication options
  * @param cont continuation
  * @param cont_cls closure for cont
  */
@@ -2080,9 +2083,7 @@
                       const struct GNUNET_FS_Uri *ksk_uri,
                       const struct GNUNET_CONTAINER_MetaData *meta,
                       const struct GNUNET_FS_Uri *uri,
-                      struct GNUNET_TIME_Absolute expirationTime,
-                      uint32_t anonymity,
-                      uint32_t priority,
+                      const struct GNUNET_FS_BlockOptions *bo,
                       enum GNUNET_FS_PublishOptions options,
                       GNUNET_FS_PublishContinuation cont,
                       void *cont_cls);
@@ -2097,9 +2098,8 @@
  * @param update update identifier to use
  * @param meta metadata to use
  * @param uri URI to refer to in the SBlock
- * @param expirationTime when the SBlock expires
- * @param anonymity anonymity level for the SBlock
- * @param priority priority for the SBlock
+ * @param bo block options
+ * @param options publication options
  * @param cont continuation
  * @param cont_cls closure for cont
  */
@@ -2110,9 +2110,7 @@
                       const char *update,
                       const struct GNUNET_CONTAINER_MetaData *meta,
                       const struct GNUNET_FS_Uri *uri,
-                      struct GNUNET_TIME_Absolute expirationTime,
-                      uint32_t anonymity,
-                      uint32_t priority,
+                      const struct GNUNET_FS_BlockOptions *bo,
                       enum GNUNET_FS_PublishOptions options,
                       GNUNET_FS_PublishContinuation cont,
                       void *cont_cls);
@@ -2180,9 +2178,7 @@
  * @param ksk_uri keywords to use for advertisment
  * @param namespace handle for the namespace that should be advertised
  * @param meta meta-data for the namespace advertisement
- * @param anonymity for the namespace advertismement
- * @param priority for the namespace advertisement
- * @param expiration for the namespace advertisement
+ * @param bo block options
  * @param rootEntry name of the root of the namespace
  * @param cont continuation
  * @param cont_cls closure for cont
@@ -2192,9 +2188,7 @@
                               struct GNUNET_FS_Uri *ksk_uri,
                               struct GNUNET_FS_Namespace *namespace,
                               const struct GNUNET_CONTAINER_MetaData *meta,
-                              uint32_t anonymity,
-                              uint32_t priority,
-                              struct GNUNET_TIME_Absolute expiration,
+                              const struct GNUNET_FS_BlockOptions *bo,
                               const char *rootEntry,
                               GNUNET_FS_PublishContinuation cont,
                               void *cont_cls);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]