gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r27265 - gnunet/src/experimentation


From: gnunet
Subject: [GNUnet-SVN] r27265 - gnunet/src/experimentation
Date: Thu, 23 May 2013 13:28:50 +0200

Author: wachs
Date: 2013-05-23 13:28:50 +0200 (Thu, 23 May 2013)
New Revision: 27265

Modified:
   gnunet/src/experimentation/gnunet-daemon-experimentation.c
   gnunet/src/experimentation/gnunet-daemon-experimentation.h
   gnunet/src/experimentation/gnunet-daemon-experimentation_nodes.c
Log:
documentation


Modified: gnunet/src/experimentation/gnunet-daemon-experimentation.c
===================================================================
--- gnunet/src/experimentation/gnunet-daemon-experimentation.c  2013-05-23 
11:19:19 UTC (rev 27264)
+++ gnunet/src/experimentation/gnunet-daemon-experimentation.c  2013-05-23 
11:28:50 UTC (rev 27265)
@@ -31,11 +31,8 @@
 #include "gnunet_statistics_service.h"
 #include "gnunet-daemon-experimentation.h"
 
-#define EXP_RESPONSE_TIMEOUT GNUNET_TIME_relative_multiply 
(GNUNET_TIME_UNIT_SECONDS, 10)
+static struct GNUNET_STATISTICS_Handle *GSE_stats;
 
-
-static struct GNUNET_STATISTICS_Handle *stats;
-
 /**
  * Task run during shutdown.
  *
@@ -52,10 +49,12 @@
 
 
 /**
- * The main function for the experimentation daemon.
+ * Function starting all submodules of the experimentation daemon.
  *
- * @param argc number of arguments from the command line
- * @param argv command line arguments
+ * @param cls always NULL
+ * @param args temaining command line arguments
+ * @param cfgfile configuration file used
+ * @param cfg configuration handle
  */
 static void
 run (void *cls, char *const *args, const char *cfgfile,
@@ -63,8 +62,8 @@
 {
        GNUNET_log (GNUNET_ERROR_TYPE_INFO, _("Experimentation daemon starting 
...\n"));
 
-       stats = GNUNET_STATISTICS_create ("experimentation", cfg);
-       if (NULL == stats)
+       GSE_stats = GNUNET_STATISTICS_create ("experimentation", cfg);
+       if (NULL == GSE_stats)
        {
                GNUNET_log (GNUNET_ERROR_TYPE_ERROR, _("Failed to create 
statistics!\n"));
                return;

Modified: gnunet/src/experimentation/gnunet-daemon-experimentation.h
===================================================================
--- gnunet/src/experimentation/gnunet-daemon-experimentation.h  2013-05-23 
11:19:19 UTC (rev 27264)
+++ gnunet/src/experimentation/gnunet-daemon-experimentation.h  2013-05-23 
11:28:50 UTC (rev 27265)
@@ -19,7 +19,7 @@
 */
 
 /**
- * @file experimentation/gnunet-daemon-experimentation.c
+ * @file experimentation/gnunet-daemon-experimentation.h
  * @brief experimentation daemon
  * @author Christian Grothoff
  * @author Matthias Wachs
@@ -30,25 +30,47 @@
 #include "gnunet_core_service.h"
 #include "gnunet_statistics_service.h"
 
+
+/**
+ * Timeout between request and expected response
+ */
 #define EXP_RESPONSE_TIMEOUT GNUNET_TIME_relative_multiply 
(GNUNET_TIME_UNIT_SECONDS, 10)
+
+
 /**
  * A experimentation node
  */
 struct Node
 {
+       /**
+        * Peer id
+        */
        struct GNUNET_PeerIdentity id;
 
+       /**
+        * Task for response timeout
+        */
        GNUNET_SCHEDULER_TaskIdentifier timeout_task;
 
+       /**
+        * Core transmission handle
+        */
        struct GNUNET_CORE_TransmitHandle *cth;
 };
 
-
+/**
+ * Experimentation request message
+ * Used to detect experimentation capability
+ */
 struct Experimentation_Request
 {
        struct GNUNET_MessageHeader msg;
 };
 
+/**
+ * Experimentation response message
+ * Sent if peer is running the daemon
+ */
 struct Experimentation_Response
 {
        struct GNUNET_MessageHeader msg;
@@ -56,15 +78,18 @@
 
 
 /**
- * The main function for the experimentation daemon.
+ * Start the nodes management
  *
- * @param argc number of arguments from the command line
- * @param argv command line arguments
+ * @param cfg configuration handle
  */
 void
 GNUNET_EXPERIMENTATION_nodes_start (const struct GNUNET_CONFIGURATION_Handle 
*cfg);
 
+
+/**
+ * Stop the nodes management
+ */
 void
 GNUNET_EXPERIMENTATION_nodes_stop ();
 
-/* end of gnunet-daemon-experimentation.c */
+/* end of gnunet-daemon-experimentation.h */

Modified: gnunet/src/experimentation/gnunet-daemon-experimentation_nodes.c
===================================================================
--- gnunet/src/experimentation/gnunet-daemon-experimentation_nodes.c    
2013-05-23 11:19:19 UTC (rev 27264)
+++ gnunet/src/experimentation/gnunet-daemon-experimentation_nodes.c    
2013-05-23 11:28:50 UTC (rev 27265)
@@ -19,8 +19,8 @@
 */
 
 /**
- * @file experimentation/gnunet-daemon-experimentation.c
- * @brief experimentation daemon
+ * @file experimentation/gnunet-daemon-experimentation_nodes.c
+ * @brief experimentation daemon: node management
  * @author Christian Grothoff
  * @author Matthias Wachs
  */
@@ -31,8 +31,6 @@
 #include "gnunet_statistics_service.h"
 #include "gnunet-daemon-experimentation.h"
 
-#define EXP_RESPONSE_TIMEOUT GNUNET_TIME_relative_multiply 
(GNUNET_TIME_UNIT_SECONDS, 10)
-
 static struct GNUNET_CORE_Handle *ch;
 
 static struct GNUNET_PeerIdentity me;
@@ -409,16 +407,13 @@
 
 
 /**
- * The main function for the experimentation daemon.
+ * Start the nodes management
  *
- * @param argc number of arguments from the command line
- * @param argv command line arguments
+ * @param cfg configuration handle
  */
 void
 GNUNET_EXPERIMENTATION_nodes_start (const struct GNUNET_CONFIGURATION_Handle 
*cfg)
 {
-       GNUNET_log (GNUNET_ERROR_TYPE_INFO, _("Experimentation daemon starting 
...\n"));
-
        stats = GNUNET_STATISTICS_create ("experimentation", cfg);
        if (NULL == stats)
        {
@@ -444,11 +439,12 @@
        nodes_inactive = GNUNET_CONTAINER_multihashmap_create (10, GNUNET_NO);
 }
 
-
+/**
+ * Stop the nodes management
+ */
 void
 GNUNET_EXPERIMENTATION_nodes_stop ()
 {
-  GNUNET_log (GNUNET_ERROR_TYPE_INFO, _("Experimentation daemon shutting down 
...\n"));
   if (NULL != ch)
   {
                GNUNET_CORE_disconnect (ch);
@@ -492,4 +488,4 @@
   }
 }
 
-/* end of gnunet-daemon-experimentation.c */
+/* end of gnunet-daemon-experimentation_nodes.c */




reply via email to

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