gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r5895 - in GNUnet/src: applications/dht/module applications


From: gnunet
Subject: [GNUnet-SVN] r5895 - in GNUnet/src: applications/dht/module applications/dht/tools applications/fs/module include
Date: Thu, 13 Dec 2007 22:22:02 -0700 (MST)

Author: grothoff
Date: 2007-12-13 22:22:01 -0700 (Thu, 13 Dec 2007)
New Revision: 5895

Modified:
   GNUnet/src/applications/dht/module/cs.c
   GNUnet/src/applications/dht/module/routing.c
   GNUnet/src/applications/dht/module/routing.h
   GNUnet/src/applications/dht/tools/dht-query.c
   GNUnet/src/applications/dht/tools/dht_api.c
   GNUnet/src/applications/dht/tools/dhttest.c
   GNUnet/src/applications/dht/tools/dhttest2.c
   GNUnet/src/applications/fs/module/dht_push.c
   GNUnet/src/applications/fs/module/fs.c
   GNUnet/src/include/dht.h
   GNUnet/src/include/gnunet_dht_lib.h
   GNUnet/src/include/gnunet_dht_service.h
   GNUnet/src/include/gnunet_protocols.h
Log:
serious DHT API changes

Modified: GNUnet/src/applications/dht/module/cs.c
===================================================================
--- GNUnet/src/applications/dht/module/cs.c     2007-12-14 04:55:50 UTC (rev 
5894)
+++ GNUnet/src/applications/dht/module/cs.c     2007-12-14 05:22:01 UTC (rev 
5895)
@@ -33,7 +33,7 @@
 #include "dht.h"
 #include "gnunet_dht_service.h"
 
-#define DEBUG_CS GNUNET_NO
+#define DEBUG_CS GNUNET_YES
 
 /**
  * Global core API.
@@ -87,7 +87,7 @@
                  "`%s' at %s:%d processes put '%.*s'\n",
                  __FUNCTION__, __FILE__, __LINE__, size, &req[1]);
 #endif
-  dhtAPI->put (&req->key, ntohl (req->type), size, GNUNET_ntohll (req->expire) 
+ GNUNET_get_time (),    /* convert to absolute time */
+  dhtAPI->put (&req->key, ntohl (req->type), size,
                (const char *) &req[1]);
   return GNUNET_OK;
 }
@@ -113,7 +113,6 @@
   msg = GNUNET_malloc (n);
   msg->header.size = htons (n);
   msg->header.type = htons (GNUNET_CS_PROTO_DHT_REQUEST_PUT);
-  msg->expire = 0;              /* unknown */
   msg->key = *key;
   memcpy (&msg[1], &value[1],
           ntohl (value->size) - sizeof (GNUNET_DataContainer));

Modified: GNUnet/src/applications/dht/module/routing.c
===================================================================
--- GNUnet/src/applications/dht/module/routing.c        2007-12-14 04:55:50 UTC 
(rev 5894)
+++ GNUnet/src/applications/dht/module/routing.c        2007-12-14 05:22:01 UTC 
(rev 5895)
@@ -36,10 +36,15 @@
 #include "table.h"
 #include "dstore.h"
 #include "gnunet_protocols.h"
+#include "gnunet_core.h"
 #include "gnunet_stats_service.h"
 
-#define DEBUG_ROUTING GNUNET_NO
+#define DEBUG_ROUTING GNUNET_YES
 
+#define DHT_PRIORITY 0
+
+#define DHT_DELAY (5 * GNUNET_CRON_SECONDS)
+
 /**
  * Larger factors will result in more aggressive routing of GET
  * operations (each peer will either forward to GET_TRIES peers that
@@ -222,7 +227,16 @@
   unsigned int tracked;
   DHT_Source_Route *pos;
   GNUNET_CronTime now;
+#if DEBUG_ROUTING
+  GNUNET_EncName enc;
+#endif
 
+#if DEBUG_ROUTING
+  GNUNET_hash_to_enc (key, &enc);
+  GNUNET_GE_LOG (coreAPI->ectx,
+                 GNUNET_GE_DEBUG | GNUNET_GE_REQUEST | GNUNET_GE_DEVELOPER,
+                 "DHT-Routing of result for key `%s'.\n", &enc);
+#endif
   if (cls != NULL)
     {
       result = cls;
@@ -249,8 +263,8 @@
       if (q == NULL)
         continue;
       tracked++;
-      if ((ntohl (q->get->type) != type) ||
-          (0 != memcmp (key, &q->get->key, sizeof (GNUNET_HashCode))))
+      if ( (ntohl (q->get->type) != type) ||
+          (0 != memcmp (key, &q->get->key, sizeof (GNUNET_HashCode))) )
         continue;
       found = GNUNET_NO;
       for (j = 0; j < q->result_count; j++)
@@ -260,29 +274,50 @@
             break;
           }
       if (found == GNUNET_YES)
-        continue;
+       {
+#if DEBUG_ROUTING
+         GNUNET_GE_LOG (coreAPI->ectx,
+                        GNUNET_GE_DEBUG | GNUNET_GE_REQUEST |
+                        GNUNET_GE_DEVELOPER,
+                        "Seen the same result earlier, not routing it 
again.\n");
+#endif
+         continue;
+       }
       routed++;
       GNUNET_array_grow (q->results, q->result_count, q->result_count + 1);
       q->results[q->result_count - 1] = hc;
       pos = q->sources;
       while (pos != NULL)
         {
-          if ( (pos->expires < now) &&
-              (0 != memcmp (&pos->source,
-                            coreAPI->myIdentity, sizeof 
(GNUNET_PeerIdentity))) )
-            {
+          if (pos->expires < now) {
 #if DEBUG_ROUTING
-              GNUNET_GE_LOG (coreAPI->ectx,
+             GNUNET_hash_to_enc (&pos->source.hashPubKey, &enc);
+             GNUNET_GE_LOG (coreAPI->ectx,
                              GNUNET_GE_DEBUG | GNUNET_GE_REQUEST |
                              GNUNET_GE_DEVELOPER,
-                             "Routing result to other peer\n");
+                             "Route to peer `%s' has expired (%llu < %llu)\n",
+                            &enc,
+                            pos->expires, now);
 #endif
+             continue;
+         }       
+         if (0 != memcmp (&pos->source,
+                          coreAPI->myIdentity, sizeof (GNUNET_PeerIdentity)))
+           {
+#if DEBUG_ROUTING
+             GNUNET_hash_to_enc (&pos->source.hashPubKey, &enc);
+             GNUNET_GE_LOG (coreAPI->ectx,
+                             GNUNET_GE_DEBUG | GNUNET_GE_REQUEST |
+                             GNUNET_GE_DEVELOPER,
+                             "Routing result to `%s'\n",
+                            &enc);
+#endif
               coreAPI->unicast (&pos->source,
-                               &result->header, 0,  
+                               &result->header, DHT_PRIORITY,  
                                 pos->expires - now);
               if (stats != NULL)
                 stats->change (stat_replies_routed, 1);
-            }
+            } 
          if (pos->receiver != NULL)
             {
 #if DEBUG_ROUTING
@@ -412,6 +447,7 @@
   int i;
 #if DEBUG_ROUTING
   GNUNET_EncName enc;
+  GNUNET_EncName henc;
 #endif
 
   if (ntohs (msg->size) != sizeof (DHT_MESSAGE))
@@ -422,14 +458,24 @@
   get = (const DHT_MESSAGE *) msg;
 #if DEBUG_ROUTING
   GNUNET_hash_to_enc (&get->key, &enc);
+  if (sender != NULL)
+    GNUNET_hash_to_enc (&sender->hashPubKey, &henc);
   GNUNET_GE_LOG (coreAPI->ectx,
                  GNUNET_GE_DEBUG | GNUNET_GE_REQUEST | GNUNET_GE_DEVELOPER,
-                 "Received DHT GET for key `%s'.\n", &enc);
+                 "Received DHT GET for key `%s' from `%s'.\n", &enc, sender == 
NULL ? "me" : (char*) &henc);
 #endif
   if (stats != NULL)
     stats->change (stat_get_requests_received, 1);
-  if ((sender != NULL) && (GNUNET_OK != addRoute (sender, NULL, NULL, get)))
-    return GNUNET_OK;           /* could not route */
+  if ( (sender != NULL) &&
+       (GNUNET_OK != addRoute (sender, NULL, NULL, get)) )
+    {
+#if DEBUG_ROUTING
+      GNUNET_GE_LOG (coreAPI->ectx,
+                    GNUNET_GE_DEBUG | GNUNET_GE_REQUEST | GNUNET_GE_DEVELOPER,
+                    "Failed to add entry in routing table for request.\n");
+#endif
+      return GNUNET_OK;           /* could not route */
+    }
   total = dht_store_get (&get->key, ntohl (get->type), &routeResult, NULL);
   if ((total > GET_TRIES) && (sender != NULL))
     {
@@ -447,11 +493,38 @@
   for (i = 0; i < GET_TRIES; i++)
     {
       if (GNUNET_OK != select_dht_peer (&next[i], &get->key, &next[0], i))
-        break;
+       {
+#if DEBUG_ROUTING
+         GNUNET_GE_LOG (coreAPI->ectx,
+                        GNUNET_GE_DEBUG | GNUNET_GE_REQUEST |
+                        GNUNET_GE_DEVELOPER,
+                        "Failed to select peer for fowarding in round %d/%d\n",
+                        i,
+                        GET_TRIES);
+#endif
+         break;
+       }
       if (-1 == GNUNET_hash_xorcmp (&next[i].hashPubKey,
                                     &coreAPI->myIdentity->hashPubKey,
-                                    &get->key))        
-       coreAPI->unicast (&next[i], &aget.header, 0, 5 * GNUNET_CRON_SECONDS);  
      
+                                    &get->key)) 
+       {
+#if DEBUG_ROUTING
+         GNUNET_hash_to_enc (&next[i].hashPubKey, &enc);
+         GNUNET_GE_LOG (coreAPI->ectx,
+                        GNUNET_GE_DEBUG | GNUNET_GE_REQUEST | 
GNUNET_GE_DEVELOPER,
+                        "Forwarding DHT GET request to peer `%s'.\n", &enc);
+#endif
+         coreAPI->unicast (&next[i], &aget.header, DHT_PRIORITY, DHT_DELAY);   
     
+       }
+      else
+       {
+#if DEBUG_ROUTING
+         GNUNET_GE_LOG (coreAPI->ectx,
+                        GNUNET_GE_DEBUG | GNUNET_GE_REQUEST |
+                        GNUNET_GE_DEVELOPER,
+                        "Will not foward message to peer, we are closer!\n");
+#endif
+       }
     }
   return GNUNET_OK;
 }
@@ -492,15 +565,41 @@
     {
       if (GNUNET_OK != select_dht_peer (&next[i], &put->key, &next[0], i))
         {
-          store = 1;
+#if DEBUG_ROUTING
+         GNUNET_GE_LOG (coreAPI->ectx,
+                        GNUNET_GE_DEBUG | GNUNET_GE_REQUEST |
+                        GNUNET_GE_DEVELOPER,
+                        "Failed to select peer for PUT fowarding in round 
%d/%d\n",
+                        i,
+                        PUT_TRIES);
+#endif
+         store = 1;
           break;
         }
       if (1 == GNUNET_hash_xorcmp (&next[i].hashPubKey,
                                    &coreAPI->myIdentity->hashPubKey,
                                    &put->key))
-        store = 1;              /* we're closer than the selected target */
+       {
+#if DEBUG_ROUTING
+         GNUNET_GE_LOG (coreAPI->ectx,
+                        GNUNET_GE_DEBUG | GNUNET_GE_REQUEST |
+                        GNUNET_GE_DEVELOPER,
+                        "We are closer than selected peer for PUT in round 
%d/%d\n",
+                        i,
+                        PUT_TRIES);
+#endif
+         store = 1;              /* we're closer than the selected target */
+       }
       else
-        coreAPI->unicast (&next[i], msg, 0, 5 * GNUNET_CRON_SECONDS); 
+       {
+#if DEBUG_ROUTING
+         GNUNET_hash_to_enc (&next[i].hashPubKey, &enc);
+         GNUNET_GE_LOG (coreAPI->ectx,
+                        GNUNET_GE_DEBUG | GNUNET_GE_REQUEST | 
GNUNET_GE_DEVELOPER,
+                        "Forwarding DHT PUT request to peer `%s'.\n", &enc);
+#endif
+         coreAPI->unicast (&next[i], msg, DHT_PRIORITY, DHT_DELAY); 
+       }
     }
   if (store != 0)
     {
@@ -512,7 +611,7 @@
                      "Decided to cache data `%.*s' locally until %llu (for 
%llu ms)\n",
                      ntohs (put->header.size) - sizeof (DHT_MESSAGE),
                      &put[1], CONTENT_LIFETIME + now,
-                     GNUNET_ntohll (put->timeout));
+                     CONTENT_LIFETIME);
 #endif
       dht_store_put (ntohl (put->type),
                      &put->key,
@@ -558,7 +657,7 @@
   GNUNET_hash_to_enc (&result->key, &enc);
   GNUNET_GE_LOG (coreAPI->ectx,
                  GNUNET_GE_DEBUG | GNUNET_GE_REQUEST | GNUNET_GE_DEVELOPER,
-                 "Received DHT RESULT for key `%s'.\n", &enc);
+                 "Received REMOTE DHT RESULT for key `%s'.\n", &enc);
 #endif
   routeResult (&result->key,
                ntohl (result->type),
@@ -575,6 +674,9 @@
                unsigned int type, GNUNET_ResultProcessor handler, void *cls)
 {
   DHT_MESSAGE get;
+#if DEBUG_ROUTING
+  GNUNET_EncName enc;
+#endif
 
   get.header.size = htons (sizeof (DHT_MESSAGE));
   get.header.type = htons (GNUNET_P2P_PROTO_DHT_GET);
@@ -582,6 +684,12 @@
   get.hop_count = htonl(0);
   get.reserved = htonl(0);
   get.key = *key;
+#if DEBUG_ROUTING
+  GNUNET_hash_to_enc (&get.key, &enc);
+  GNUNET_GE_LOG (coreAPI->ectx,
+                 GNUNET_GE_DEBUG | GNUNET_GE_REQUEST | GNUNET_GE_DEVELOPER,
+                 "Initiating DHT GET (based on local request) for key 
`%s'.\n", &enc);
+#endif
   if (GNUNET_OK != addRoute (NULL, handler, cls, &get))
     return GNUNET_SYSERR;
   handleGet (NULL, &get.header);  
@@ -654,7 +762,7 @@
 int
 GNUNET_DHT_put (const GNUNET_HashCode * key,
                unsigned int type,
-               unsigned int size, GNUNET_CronTime expirationTime, const char 
*data)
+               unsigned int size, const char *data)
 {
   DHT_MESSAGE *put;
 

Modified: GNUnet/src/applications/dht/module/routing.h
===================================================================
--- GNUnet/src/applications/dht/module/routing.h        2007-12-14 04:55:50 UTC 
(rev 5894)
+++ GNUnet/src/applications/dht/module/routing.h        2007-12-14 05:22:01 UTC 
(rev 5895)
@@ -50,15 +50,13 @@
 /**
  * Perform a DHT put operation.  Note that PUT operations always
  * expire after a period of time and the client is responsible for
- * doing periodic refreshs.  The given expiration time is ONLY used to
- * ensure that the datum is certainly deleted by that time (it maybe
- * deleted earlier).
+ * doing periodic refreshs. 
  *
  * @param expirationTime absolute expiration time
  */
 int GNUNET_DHT_put (const GNUNET_HashCode * key,
                    unsigned int type,
-                   unsigned int size, GNUNET_CronTime expirationTime,
+                   unsigned int size,
                    const char *data);
 
 /**

Modified: GNUnet/src/applications/dht/tools/dht-query.c
===================================================================
--- GNUnet/src/applications/dht/tools/dht-query.c       2007-12-14 04:55:50 UTC 
(rev 5894)
+++ GNUnet/src/applications/dht/tools/dht-query.c       2007-12-14 05:22:01 UTC 
(rev 5895)
@@ -54,7 +54,7 @@
   GNUNET_COMMAND_LINE_OPTION_LOGGING,   /* -L */
   {'T', "timeout", "TIME",
    gettext_noop
-   ("allow TIME ms to process a GET command or expire PUT content after ms 
TIME"),
+   ("allow TIME ms to process a GET command"),
    1, &GNUNET_getopt_configure_set_ulong, &timeout},
   GNUNET_COMMAND_LINE_OPTION_VERSION (PACKAGE_VERSION), /* -v */
   GNUNET_COMMAND_LINE_OPTION_VERBOSE,
@@ -114,7 +114,7 @@
 #endif
   if (timeout == 0)
     timeout = 30 * GNUNET_CRON_MINUTES;
-  if (GNUNET_OK == GNUNET_DHT_put (cfg, ectx, &hc, 
GNUNET_ECRS_BLOCKTYPE_DHT_STRING2STRING, timeout + GNUNET_get_time (),        
/* convert to absolute time */
+  if (GNUNET_OK == GNUNET_DHT_put (cfg, ectx, &hc, 
GNUNET_ECRS_BLOCKTYPE_DHT_STRING2STRING,
                                    dc))
     {
       printf (_("'%s(%s,%s)' succeeded\n"), "put", key, value);

Modified: GNUnet/src/applications/dht/tools/dht_api.c
===================================================================
--- GNUnet/src/applications/dht/tools/dht_api.c 2007-12-14 04:55:50 UTC (rev 
5894)
+++ GNUnet/src/applications/dht/tools/dht_api.c 2007-12-14 05:22:01 UTC (rev 
5895)
@@ -191,7 +191,6 @@
   GNUNET_thread_join (thread, &unused);
   GNUNET_thread_release_self (info.parent);
   GNUNET_client_connection_destroy (sock);
-  fprintf (stderr, "Returning %d\n", info.total);
   return info.total;
 }
 
@@ -209,7 +208,7 @@
 GNUNET_DHT_put (struct GNUNET_GC_Configuration *cfg,
                 struct GNUNET_GE_Context *ectx,
                 const GNUNET_HashCode * key,
-                unsigned int type, GNUNET_CronTime expire,
+                unsigned int type,
                 const GNUNET_DataContainer * value)
 {
   struct GNUNET_ClientServerConnection *sock;
@@ -218,11 +217,6 @@
   GNUNET_CronTime now;
 
   now = GNUNET_get_time ();
-  if (expire < now)
-    {
-      GNUNET_GE_BREAK (ectx, 0);        /* content already expired!? */
-      return GNUNET_SYSERR;
-    }
 #if DEBUG_DHT_API
   GNUNET_GE_LOG (ectx,
                  GNUNET_GE_DEBUG | GNUNET_GE_REQUEST | GNUNET_GE_USER,
@@ -243,7 +237,6 @@
   req->header.type = htons (GNUNET_CS_PROTO_DHT_REQUEST_PUT);
   req->key = *key;
   req->type = htonl (type);
-  req->expire = GNUNET_htonll (expire - now);   /* convert to relative time */
   memcpy (&req[1], &value[1],
           ntohl (value->size) - sizeof (GNUNET_DataContainer));
   ret = GNUNET_client_connection_write (sock, &req->header);

Modified: GNUnet/src/applications/dht/tools/dhttest.c
===================================================================
--- GNUnet/src/applications/dht/tools/dhttest.c 2007-12-14 04:55:50 UTC (rev 
5894)
+++ GNUnet/src/applications/dht/tools/dhttest.c 2007-12-14 05:22:01 UTC (rev 
5895)
@@ -138,9 +138,6 @@
                                           ectx,
                                           &key,
                                           
GNUNET_ECRS_BLOCKTYPE_DHT_STRING2STRING,
-                                          GNUNET_get_time () +
-                                          15 * GNUNET_CRON_MINUTES *
-                                          NUM_ROUNDS * NUM_PEERS * NUM_PEERS,
                                           value));
     }
 

Modified: GNUnet/src/applications/dht/tools/dhttest2.c
===================================================================
--- GNUnet/src/applications/dht/tools/dhttest2.c        2007-12-14 04:55:50 UTC 
(rev 5894)
+++ GNUnet/src/applications/dht/tools/dhttest2.c        2007-12-14 05:22:01 UTC 
(rev 5895)
@@ -161,8 +161,7 @@
                                       ectx,
                                       &key,
                                       GNUNET_ECRS_BLOCKTYPE_DHT_STRING2STRING,
-                                      GNUNET_get_time () +
-                                      5 * GNUNET_CRON_MINUTES, value));
+                                      value));
   printf ("Peer1 gets key2\n");
   CHECK (1 == GNUNET_DHT_get (cfg,
                               ectx,
@@ -182,30 +181,40 @@
                                       ectx,
                                       &key,
                                       GNUNET_ECRS_BLOCKTYPE_DHT_STRING2STRING,
-                                      GNUNET_get_time () +
-                                      5 * GNUNET_CRON_MINUTES, value));
+                                      value));
   printf ("Peer2 gets key.\n");
   CHECK (1 == GNUNET_DHT_get (cfg,
                               ectx,
                               GNUNET_ECRS_BLOCKTYPE_DHT_STRING2STRING,
                               &key, 2 * GNUNET_CRON_SECONDS, NULL, NULL));
-
   GNUNET_hash ("key2", 4, &key);
   printf ("Peer2 gets key2.\n");
-  CHECK (1 == GNUNET_DHT_get (cfg,
-                              ectx,
-                              GNUNET_ECRS_BLOCKTYPE_DHT_STRING2STRING,
-                              &key, 30 * GNUNET_CRON_SECONDS, NULL, NULL));
+  left = 10;
+  do {
+    if (1 == GNUNET_DHT_get (cfg,
+                            ectx,
+                            GNUNET_ECRS_BLOCKTYPE_DHT_STRING2STRING,
+                            &key, 30 * GNUNET_CRON_SECONDS, NULL, NULL))
+      break;
+    left--;
+  } while (left > 0);
+  CHECK (left > 0);
   /* switch to peer1 */
   GNUNET_GC_set_configuration_value_string (cfg,
                                             ectx,
                                             "NETWORK", "HOST",
                                             "localhost:2087");
   printf ("Peer1 gets key\n");
-  CHECK (1 == GNUNET_DHT_get (cfg,
-                              ectx,
-                              GNUNET_ECRS_BLOCKTYPE_DHT_STRING2STRING,
-                              &key, 30 * GNUNET_CRON_SECONDS, NULL, NULL));
+  left = 10;
+  do {
+    if (1 == GNUNET_DHT_get (cfg,
+                            ectx,
+                            GNUNET_ECRS_BLOCKTYPE_DHT_STRING2STRING,
+                            &key, 300 * GNUNET_CRON_SECONDS, NULL, NULL))
+      break;
+    left--;
+  } while (left > 0);
+  CHECK(left > 0);
   /* end of actual test code */
 
 FAILURE:

Modified: GNUnet/src/applications/fs/module/dht_push.c
===================================================================
--- GNUnet/src/applications/fs/module/dht_push.c        2007-12-14 04:55:50 UTC 
(rev 5894)
+++ GNUnet/src/applications/fs/module/dht_push.c        2007-12-14 05:22:01 UTC 
(rev 5895)
@@ -95,7 +95,7 @@
   dht->put (key,
             ntohl (value->type),
             ntohl (value->size) - sizeof (GNUNET_DatastoreValue),
-            GNUNET_ntohll (value->expirationTime), (const char *) &value[1]);
+            (const char *) &value[1]);
   if (stats != NULL)
     stats->change (stat_push_count, 1);
   if (dht == NULL)

Modified: GNUnet/src/applications/fs/module/fs.c
===================================================================
--- GNUnet/src/applications/fs/module/fs.c      2007-12-14 04:55:50 UTC (rev 
5894)
+++ GNUnet/src/applications/fs/module/fs.c      2007-12-14 05:22:01 UTC (rev 
5895)
@@ -424,7 +424,7 @@
         }
       else
         {
-          dht->put (&query, type, size, et, (const char *) gw);
+          dht->put (&query, type, size, (const char *) gw);
         }
       GNUNET_free (gw);
     }

Modified: GNUnet/src/include/dht.h
===================================================================
--- GNUnet/src/include/dht.h    2007-12-14 04:55:50 UTC (rev 5894)
+++ GNUnet/src/include/dht.h    2007-12-14 05:22:01 UTC (rev 5895)
@@ -58,8 +58,6 @@
 
   GNUNET_HashCode key;
 
-  unsigned long long expire;    /* nbo */
-
 } CS_dht_request_put_MESSAGE;
 
 /**

Modified: GNUnet/src/include/gnunet_dht_lib.h
===================================================================
--- GNUnet/src/include/gnunet_dht_lib.h 2007-12-14 04:55:50 UTC (rev 5894)
+++ GNUnet/src/include/gnunet_dht_lib.h 2007-12-14 05:22:01 UTC (rev 5895)
@@ -62,7 +62,6 @@
  * Perform a synchronous put operation.
  *
  * @param key the key to store
- * @param expire when should the content expire
  * @param value what to store
  * @return GNUNET_OK on success, GNUNET_SYSERR on error
  */
@@ -70,7 +69,6 @@
                     struct GNUNET_GE_Context *ectx,
                     const GNUNET_HashCode * key,
                     unsigned int type,
-                    GNUNET_CronTime expire,
                     const GNUNET_DataContainer * value);
 
 #if 0                           /* keep Emacsens' auto-indent happy */

Modified: GNUnet/src/include/gnunet_dht_service.h
===================================================================
--- GNUnet/src/include/gnunet_dht_service.h     2007-12-14 04:55:50 UTC (rev 
5894)
+++ GNUnet/src/include/gnunet_dht_service.h     2007-12-14 05:22:01 UTC (rev 
5895)
@@ -90,7 +90,7 @@
    */
   int (*put) (const GNUNET_HashCode * key,
              unsigned int type,
-             unsigned int size, GNUNET_CronTime expire, const char *data);
+             unsigned int size, const char *data);
 
 } GNUNET_DHT_ServiceAPI;
 

Modified: GNUnet/src/include/gnunet_protocols.h
===================================================================
--- GNUnet/src/include/gnunet_protocols.h       2007-12-14 04:55:50 UTC (rev 
5894)
+++ GNUnet/src/include/gnunet_protocols.h       2007-12-14 05:22:01 UTC (rev 
5895)
@@ -382,6 +382,14 @@
  */
 #define GNUNET_P2P_PROTO_GAP_RESULT 17
 
+/************** p2p DHT application messages ************/
+
+#define GNUNET_P2P_PROTO_DHT_DISCOVERY 18
+#define GNUNET_P2P_PROTO_DHT_ASK_HELLO 19
+#define GNUNET_P2P_PROTO_DHT_GET       20
+#define GNUNET_P2P_PROTO_DHT_PUT       21
+#define GNUNET_P2P_PROTO_DHT_RESULT    22
+
 /* ************** p2p CHAT application messages *********** */
 
 /**
@@ -409,15 +417,6 @@
 #define GNUNET_P2P_PROTO_RPC_RES 43
 #define GNUNET_P2P_PROTO_RPC_ACK 44
 
-/************** p2p DHT application messages ************/
-
-#define GNUNET_P2P_PROTO_DHT_DISCOVERY 45
-#define GNUNET_P2P_PROTO_DHT_ASK_HELLO 46
-#define GNUNET_P2P_PROTO_DHT_GET       47
-#define GNUNET_P2P_PROTO_DHT_PUT       48
-#define GNUNET_P2P_PROTO_DHT_RESULT    49
-
-
 /* ************* p2p VPN messages ************* */
 
 #define GNUNET_P2P_PROTO_AIP_IP 64      /* contains IPv6 frame */





reply via email to

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