[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r35660 - gnunet/src/dht
From: |
gnunet |
Subject: |
[GNUnet-SVN] r35660 - gnunet/src/dht |
Date: |
Tue, 28 Apr 2015 11:33:06 +0200 |
Author: arthur
Date: 2015-04-28 11:33:05 +0200 (Tue, 28 Apr 2015)
New Revision: 35660
Modified:
gnunet/src/dht/gnunet-service-wdht_neighbours.c
Log:
Add some comments in the handler functions.
Modified: gnunet/src/dht/gnunet-service-wdht_neighbours.c
===================================================================
--- gnunet/src/dht/gnunet-service-wdht_neighbours.c 2015-04-27 19:45:34 UTC
(rev 35659)
+++ gnunet/src/dht/gnunet-service-wdht_neighbours.c 2015-04-28 09:33:05 UTC
(rev 35660)
@@ -51,7 +51,17 @@
*/
#define FOO_TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MINUTES, 2)
+/**
+ * The number of layered ID to use.
+ */
+#define NUMBER_LAYERED_ID 8
+/**
+ * Contains all the layered ID.
+ */
+struct GNUNET_PeerIdentity layered_id[NUMBER_LAYERED_ID];
+
+
GNUNET_NETWORK_STRUCT_BEGIN
/**
@@ -618,6 +628,14 @@
fsm = (const struct FingerSetupMessage *) message;
+ /*
+ * Steps :
+ * 1 check if the hops_taken is < to log(honest node)
+ * 1.a.1 if true : increments the hops_taken
+ * 1.a.2 send the same structure
+ * 1.b if false : drop the message
+ */
+
return GNUNET_OK;
}
@@ -639,6 +657,13 @@
fsm = (const struct FingerSetupResponseMessage *) message;
+ /*
+ * Steps :
+ * 1 check if we are the correct layer
+ * 1.a if true : add the return value in the db structure
+ * 1.b if true : do nothing
+ */
+
return GNUNET_OK;
}
@@ -660,6 +685,15 @@
fdm = (const struct FingerDestroyMessage *) message;
+ /*
+ * Steps :
+ * 1 check if message comme from a trail
+ * 1.a.1 if true: send the destroy message to the rest trail
+ * 1.a.2 clean the trail structure
+ * 1.a.3 did i have to remove the trail and ID from the db structure?
+ * 1.b if false: do nothing
+ */
+
return GNUNET_OK;
}
@@ -681,6 +715,12 @@
frm = (const struct FingerRouteMessage *) message;
/* FIXME: check the size of the message */
+ /*
+ * steps :
+ * 1 find the good trail
+ * 2 send the finger route message
+ */
+
return GNUNET_OK;
}
@@ -743,10 +783,10 @@
pgm = (const struct PeerGetMessage *) message;
- /*
+ /*
* steps :
* 1 extract the result
- * 2 create a peerGetResult struct
+ * 2 save the peer
* 3 send it using the good trail
*
* What do i do when i don't have the key/value?
@@ -772,6 +812,15 @@
pgrm = (const struct PeerGetResultMessage *) message;
+ /*
+ * steps :
+ * 1 extract the result
+ * 2 create a peerGetResult struct
+ * 3 send it using the good trail
+ *
+ * What do i do when i don't have the key/value?
+ */
+
return GNUNET_OK;
}
@@ -792,6 +841,12 @@
pgrm = (const struct PeerGetResultMessage *) message;
+ /*
+ * steps :
+ * 1 check the size of the message
+ * 2 use the API to add the value in the "database". Check on the xdht file,
how to do it.
+ * 3 Did i a have to return a notification or did i have to return
GNUNET_[OK|SYSERR]?
+ */
return GNUNET_OK;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r35660 - gnunet/src/dht,
gnunet <=