gnunet-svn
[Top][All Lists]
Advanced

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

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


From: gnunet
Subject: [GNUnet-SVN] r27291 - gnunet/src/experimentation
Date: Fri, 24 May 2013 14:27:28 +0200

Author: wachs
Date: 2013-05-24 14:27:28 +0200 (Fri, 24 May 2013)
New Revision: 27291

Added:
   gnunet/src/experimentation/gnunet-daemon-experimentation_capabilities.c
   gnunet/src/experimentation/gnunet-daemon-experimentation_experiments.c
Removed:
   gnunet/src/experimentation/gnunet-daemon-experimentation_capabilites.c
Modified:
   gnunet/src/experimentation/Makefile.am
   gnunet/src/experimentation/experimentation.conf.in
   gnunet/src/experimentation/gnunet-daemon-experimentation.c
   gnunet/src/experimentation/gnunet-daemon-experimentation.h
   gnunet/src/experimentation/gnunet-daemon-experimentation_nodes.c
   gnunet/src/experimentation/test_experimentation_clique.c
   gnunet/src/experimentation/test_experimentation_clique.conf
Log:
issuer


Modified: gnunet/src/experimentation/Makefile.am
===================================================================
--- gnunet/src/experimentation/Makefile.am      2013-05-24 12:21:57 UTC (rev 
27290)
+++ gnunet/src/experimentation/Makefile.am      2013-05-24 12:27:28 UTC (rev 
27291)
@@ -34,8 +34,9 @@
 
 gnunet_daemon_experimentation_SOURCES = \
  gnunet-daemon-experimentation.c \
- gnunet-daemon-experimentation_capabilites.c \
- gnunet-daemon-experimentation_nodes.c 
+ gnunet-daemon-experimentation_capabilities.c \
+ gnunet-daemon-experimentation_nodes.c \
+ gnunet-daemon-experimentation_experiments.c
 gnunet_daemon_experimentation_LDADD = \
   $(top_builddir)/src/core/libgnunetcore.la \
   $(top_builddir)/src/statistics/libgnunetstatistics.la \

Modified: gnunet/src/experimentation/experimentation.conf.in
===================================================================
--- gnunet/src/experimentation/experimentation.conf.in  2013-05-24 12:21:57 UTC 
(rev 27290)
+++ gnunet/src/experimentation/experimentation.conf.in  2013-05-24 12:27:28 UTC 
(rev 27291)
@@ -9,3 +9,4 @@
 UNIXPATH = /tmp/gnunet-daemon-experimentation.sock
 UNIX_MATCH_UID = YES
 UNIX_MATCH_GID = YES
+ISSUERS = 
TFRM29O2RQNKLVBQIGODJ6GD58LSQ2NM9TNFBC6N48BRJHQO38Q73N2OM3V4CLKDM6CILQV4CU8PMJDRG0FNB0PDI057DBRANMLPLRG
\ No newline at end of file

Modified: gnunet/src/experimentation/gnunet-daemon-experimentation.c
===================================================================
--- gnunet/src/experimentation/gnunet-daemon-experimentation.c  2013-05-24 
12:21:57 UTC (rev 27290)
+++ gnunet/src/experimentation/gnunet-daemon-experimentation.c  2013-05-24 
12:27:28 UTC (rev 27291)
@@ -46,6 +46,7 @@
 {
   GNUNET_log (GNUNET_ERROR_TYPE_INFO, _("Experimentation daemon shutting down 
...\n"));
   GNUNET_EXPERIMENTATION_nodes_stop ();
+  GNUNET_EXPERIMENTATION_experiments_stop ();
   GNUNET_EXPERIMENTATION_capabilities_stop ();
 }
 
@@ -73,12 +74,16 @@
                return;
        }
 
-       GNUNET_EXPERIMENTATION_capabilities_start();
+       GNUNET_EXPERIMENTATION_capabilities_start ();
+       if (GNUNET_SYSERR == GNUNET_EXPERIMENTATION_experiments_start ())
+       {
+         GNUNET_SCHEDULER_add_now (&shutdown_task, NULL);
+         return;
+       }
        GNUNET_EXPERIMENTATION_nodes_start ();
 
   GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, &shutdown_task,
                                 NULL);
-
 }
 
 

Modified: gnunet/src/experimentation/gnunet-daemon-experimentation.h
===================================================================
--- gnunet/src/experimentation/gnunet-daemon-experimentation.h  2013-05-24 
12:21:57 UTC (rev 27290)
+++ gnunet/src/experimentation/gnunet-daemon-experimentation.h  2013-05-24 
12:27:28 UTC (rev 27291)
@@ -120,6 +120,14 @@
 void
 GNUNET_EXPERIMENTATION_nodes_stop ();
 
+/**
+ * Are the capabilities provided?
+ *
+ * @param have bitstring containing the provided capabilities
+ * @param have bitstring containing the desired capabilities
+ */
+int
+GNUNET_EXPERIMENTATION_capabilities_have (uint32_t have, uint32_t desired);
 
 /**
  * Start the detecting capabilities
@@ -134,4 +142,28 @@
 GNUNET_EXPERIMENTATION_capabilities_stop ();
 
 
+/**
+ * Start experiments management
+ *
+ * @return GNUNET_YES or GNUNET_NO
+ */
+int
+GNUNET_EXPERIMENTATION_experiments_issuer_accepted (struct GNUNET_PeerIdentity 
*issuer_ID);
+
+
+/**
+ * Start experiments management
+ *
+ * @return GNUNET_OK on success, GNUNET_SYSERR on error
+ */
+int
+GNUNET_EXPERIMENTATION_experiments_start ();
+
+/**
+ * Stop experiments management
+ */
+void
+GNUNET_EXPERIMENTATION_experiments_stop ();
+
+
 /* end of gnunet-daemon-experimentation.h */

Deleted: gnunet/src/experimentation/gnunet-daemon-experimentation_capabilites.c
===================================================================
--- gnunet/src/experimentation/gnunet-daemon-experimentation_capabilites.c      
2013-05-24 12:21:57 UTC (rev 27290)
+++ gnunet/src/experimentation/gnunet-daemon-experimentation_capabilites.c      
2013-05-24 12:27:28 UTC (rev 27291)
@@ -1,152 +0,0 @@
-/*
-     This file is part of GNUnet.
-     (C) 2009 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
-     by the Free Software Foundation; either version 3, or (at your
-     option) any later version.
-
-     GNUnet is distributed in the hope that it will be useful, but
-     WITHOUT ANY WARRANTY; without even the implied warranty of
-     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-     General Public License for more details.
-
-     You should have received a copy of the GNU General Public License
-     along with GNUnet; see the file COPYING.  If not, write to the
-     Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-     Boston, MA 02111-1307, USA.
-*/
-
-/**
- * @file experimentation/gnunet-daemon-experimentation_capabilities.c
- * @brief experimentation daemon: capabilities management
- * @author Christian Grothoff
- * @author Matthias Wachs
- */
-#include "platform.h"
-#include "gnunet_getopt_lib.h"
-#include "gnunet_util_lib.h"
-#include "gnunet_core_service.h"
-#include "gnunet_statistics_service.h"
-#include "gnunet-daemon-experimentation.h"
-
-uint32_t GSE_node_capabilities;
-
-
-#define GNUNET_EXPERIMENTATION_capabilities_count 11;
-
-/**
- * Capabilities a node has or an experiment requires string
- */
-#define GNUNET_EXPERIMENTATION_capabilities_string {"NONE", "PLUGIN_TCP", 
"PLUGIN_UDP", "PLUGIN_UNIX", "PLUGIN_HTTP_CLIENT", "PLUGIN_HTTP_SERVER", 
"PLUGIN_HTTPS_CLIENT", "PLUGIN_HTTPS_SERVER", "PLUGIN_WLAN", "HAVE_IPV6", 
"BEHIND_NAT"}
-
-const char *
-GNUNET_EXPERIMENTATION_capability_to_str (uint32_t cap)
-{
-       char * capstr[] = GNUNET_EXPERIMENTATION_capabilities_string;
-       unsigned index = 0;
-       uint32_t test = 0;
-
-       if (0 == cap)
-               return capstr[0];
-
-       index = (log(cap) / log (2)) + 1;
-
-       test = 1 << (index - 1);
-       if (test != cap)
-               return "UNDEFINED";
-
-       if (index <= 11)
-               return capstr[index];
-       else
-        return "UNDEFINED";
-
-
-}
-
-
-uint32_t
-GNUNET_EXPERIMENTATION_capabilities_have (uint32_t cap)
-{
-       if (cap == (cap & GSE_node_capabilities))
-               return GNUNET_YES;
-       else
-               return GNUNET_NO;
-}
-
-
-/**
- * Start the detecting capabilities
- *
- * @param cfg configuration handle
- */
-void
-GNUNET_EXPERIMENTATION_capabilities_start ()
-{
-       char *plugins;
-  char *pos;
-  unsigned int c1;
-  uint32_t index;
-  GSE_node_capabilities = NONE;
-
-       /* Plugins configured */
-
-  if (GNUNET_OK == GNUNET_CONFIGURATION_get_value_string (GSE_cfg,
-                       "TRANSPORT", "PLUGINS", &plugins))
-  {
-         for (pos = strtok (plugins, " "); pos != NULL; pos = strtok (NULL, " 
"))
-         {
-             if (0 == strcmp (pos, "tcp"))
-               GSE_node_capabilities |= PLUGIN_TCP;
-             else if (0 == strcmp (pos, "udp"))
-               GSE_node_capabilities |= PLUGIN_UDP;
-                                       else if (0 == strcmp (pos, "unix"))
-                                               GSE_node_capabilities |= 
PLUGIN_UNIX;
-                                       else if (0 == strcmp (pos, 
"http_client"))
-                                               GSE_node_capabilities |= 
PLUGIN_HTTP_CLIENT;
-                                       else if (0 == strcmp (pos, 
"http_server"))
-                                               GSE_node_capabilities |= 
PLUGIN_HTTP_SERVER;
-                                       else if (0 == strcmp (pos, 
"https_client"))
-                                               GSE_node_capabilities |= 
PLUGIN_HTTP_CLIENT;
-                                       else if (0 == strcmp (pos, 
"https_server"))
-                                               GSE_node_capabilities |= 
PLUGIN_HTTPS_SERVER;
-                                       else if (0 == strcmp (pos, "wlan"))
-                                               GSE_node_capabilities |= 
PLUGIN_WLAN;
-         }
-         GNUNET_free (plugins);
-  }
-
-       /* IPv6 enabled
-        * FIXE: just having it not enabled is not really sufficient */
-  if (GNUNET_NO == GNUNET_CONFIGURATION_get_value_yesno (GSE_cfg,
-                       "NAT", "DISABLEV6"))
-       GSE_node_capabilities |= HAVE_IPV6;
-
-  /* Behind NAT */
-  if (GNUNET_YES == GNUNET_CONFIGURATION_get_value_yesno (GSE_cfg,
-                       "NAT", "BEHIND_NAT"))
-       GSE_node_capabilities |= BEHIND_NAT;
-
-  for (c1 = 0 ; c1 < 32; c1++)
-  {
-               index = 1;
-               index = index << c1;
-               if (GNUNET_YES == GNUNET_EXPERIMENTATION_capabilities_have 
(index))
-               {
-                       GNUNET_log (GNUNET_ERROR_TYPE_INFO, "We have `%s'\n",
-                                       
GNUNET_EXPERIMENTATION_capability_to_str(index));
-               }
-  }
-}
-
-/**
- * Stop the detecting capabilities
- */
-void
-GNUNET_EXPERIMENTATION_capabilities_stop ()
-{
-
-}
-
-/* end of gnunet-daemon-experimentation_capabilities.c */

Copied: gnunet/src/experimentation/gnunet-daemon-experimentation_capabilities.c 
(from rev 27286, 
gnunet/src/experimentation/gnunet-daemon-experimentation_capabilites.c)
===================================================================
--- gnunet/src/experimentation/gnunet-daemon-experimentation_capabilities.c     
                        (rev 0)
+++ gnunet/src/experimentation/gnunet-daemon-experimentation_capabilities.c     
2013-05-24 12:27:28 UTC (rev 27291)
@@ -0,0 +1,157 @@
+/*
+     This file is part of GNUnet.
+     (C) 2009 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
+     by the Free Software Foundation; either version 3, or (at your
+     option) any later version.
+
+     GNUnet is distributed in the hope that it will be useful, but
+     WITHOUT ANY WARRANTY; without even the implied warranty of
+     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+     General Public License for more details.
+
+     You should have received a copy of the GNU General Public License
+     along with GNUnet; see the file COPYING.  If not, write to the
+     Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+     Boston, MA 02111-1307, USA.
+*/
+
+/**
+ * @file experimentation/gnunet-daemon-experimentation_capabilities.c
+ * @brief experimentation daemon: capabilities management
+ * @author Christian Grothoff
+ * @author Matthias Wachs
+ */
+#include "platform.h"
+#include "gnunet_getopt_lib.h"
+#include "gnunet_util_lib.h"
+#include "gnunet_core_service.h"
+#include "gnunet_statistics_service.h"
+#include "gnunet-daemon-experimentation.h"
+
+uint32_t GSE_node_capabilities;
+
+
+#define GNUNET_EXPERIMENTATION_capabilities_count 11;
+
+/**
+ * Capabilities a node has or an experiment requires string
+ */
+#define GNUNET_EXPERIMENTATION_capabilities_string {"NONE", "PLUGIN_TCP", 
"PLUGIN_UDP", "PLUGIN_UNIX", "PLUGIN_HTTP_CLIENT", "PLUGIN_HTTP_SERVER", 
"PLUGIN_HTTPS_CLIENT", "PLUGIN_HTTPS_SERVER", "PLUGIN_WLAN", "HAVE_IPV6", 
"BEHIND_NAT"}
+
+const char *
+GNUNET_EXPERIMENTATION_capability_to_str (uint32_t cap)
+{
+       char * capstr[] = GNUNET_EXPERIMENTATION_capabilities_string;
+       unsigned index = 0;
+       uint32_t test = 0;
+
+       if (0 == cap)
+               return capstr[0];
+
+       index = (log(cap) / log (2)) + 1;
+
+       test = 1 << (index - 1);
+       if (test != cap)
+               return "UNDEFINED";
+
+       if (index <= 11)
+               return capstr[index];
+       else
+        return "UNDEFINED";
+
+
+}
+
+/**
+ * Are the capabilities provided?
+ *
+ * @param have bitstring containing the provided capabilities
+ * @param have bitstring containing the desired capabilities
+ */
+int
+GNUNET_EXPERIMENTATION_capabilities_have (uint32_t have, uint32_t desired)
+{
+       if (desired == (desired & have))
+               return GNUNET_YES;
+       else
+               return GNUNET_NO;
+}
+
+
+/**
+ * Start the detecting capabilities
+ *
+ * @param cfg configuration handle
+ */
+void
+GNUNET_EXPERIMENTATION_capabilities_start ()
+{
+       char *plugins;
+  char *pos;
+  unsigned int c1;
+  uint32_t index;
+  GSE_node_capabilities = NONE;
+
+       /* Plugins configured */
+
+  if (GNUNET_OK == GNUNET_CONFIGURATION_get_value_string (GSE_cfg,
+                       "TRANSPORT", "PLUGINS", &plugins))
+  {
+         for (pos = strtok (plugins, " "); pos != NULL; pos = strtok (NULL, " 
"))
+         {
+             if (0 == strcmp (pos, "tcp"))
+               GSE_node_capabilities |= PLUGIN_TCP;
+             else if (0 == strcmp (pos, "udp"))
+               GSE_node_capabilities |= PLUGIN_UDP;
+                                       else if (0 == strcmp (pos, "unix"))
+                                               GSE_node_capabilities |= 
PLUGIN_UNIX;
+                                       else if (0 == strcmp (pos, 
"http_client"))
+                                               GSE_node_capabilities |= 
PLUGIN_HTTP_CLIENT;
+                                       else if (0 == strcmp (pos, 
"http_server"))
+                                               GSE_node_capabilities |= 
PLUGIN_HTTP_SERVER;
+                                       else if (0 == strcmp (pos, 
"https_client"))
+                                               GSE_node_capabilities |= 
PLUGIN_HTTP_CLIENT;
+                                       else if (0 == strcmp (pos, 
"https_server"))
+                                               GSE_node_capabilities |= 
PLUGIN_HTTPS_SERVER;
+                                       else if (0 == strcmp (pos, "wlan"))
+                                               GSE_node_capabilities |= 
PLUGIN_WLAN;
+         }
+         GNUNET_free (plugins);
+  }
+
+       /* IPv6 enabled
+        * FIXE: just having it not enabled is not really sufficient */
+  if (GNUNET_NO == GNUNET_CONFIGURATION_get_value_yesno (GSE_cfg,
+                       "NAT", "DISABLEV6"))
+       GSE_node_capabilities |= HAVE_IPV6;
+
+  /* Behind NAT */
+  if (GNUNET_YES == GNUNET_CONFIGURATION_get_value_yesno (GSE_cfg,
+                       "NAT", "BEHIND_NAT"))
+       GSE_node_capabilities |= BEHIND_NAT;
+
+  for (c1 = 0 ; c1 < 32; c1++)
+  {
+               index = 1;
+               index = index << c1;
+               if (GNUNET_YES == GNUNET_EXPERIMENTATION_capabilities_have 
(GSE_node_capabilities, index))
+               {
+                       GNUNET_log (GNUNET_ERROR_TYPE_INFO, "We have `%s'\n",
+                                       
GNUNET_EXPERIMENTATION_capability_to_str(index));
+               }
+  }
+}
+
+/**
+ * Stop the detecting capabilities
+ */
+void
+GNUNET_EXPERIMENTATION_capabilities_stop ()
+{
+
+}
+
+/* end of gnunet-daemon-experimentation_capabilities.c */

Added: gnunet/src/experimentation/gnunet-daemon-experimentation_experiments.c
===================================================================
--- gnunet/src/experimentation/gnunet-daemon-experimentation_experiments.c      
                        (rev 0)
+++ gnunet/src/experimentation/gnunet-daemon-experimentation_experiments.c      
2013-05-24 12:27:28 UTC (rev 27291)
@@ -0,0 +1,108 @@
+/*
+     This file is part of GNUnet.
+     (C) 2009 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
+     by the Free Software Foundation; either version 3, or (at your
+     option) any later version.
+
+     GNUnet is distributed in the hope that it will be useful, but
+     WITHOUT ANY WARRANTY; without even the implied warranty of
+     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+     General Public License for more details.
+
+     You should have received a copy of the GNU General Public License
+     along with GNUnet; see the file COPYING.  If not, write to the
+     Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+     Boston, MA 02111-1307, USA.
+*/
+
+/**
+ * @file experimentation/gnunet-daemon-experimentation_experiments.c
+ * @brief experimentation daemon: experiment management
+ * @author Christian Grothoff
+ * @author Matthias Wachs
+ */
+#include "platform.h"
+#include "gnunet_getopt_lib.h"
+#include "gnunet_util_lib.h"
+#include "gnunet_core_service.h"
+#include "gnunet_statistics_service.h"
+#include "gnunet-daemon-experimentation.h"
+
+struct GNUNET_CONTAINER_MultiHashMap *issuer;
+
+/**
+ * Is peer a valid issuer
+ *
+ * @return GNUNET_YES or GNUNET_NO
+ */
+int
+GNUNET_EXPERIMENTATION_experiments_issuer_accepted (struct GNUNET_PeerIdentity 
*issuer_ID)
+{
+       if (GNUNET_CONTAINER_multihashmap_contains (issuer, 
&issuer_ID->hashPubKey))
+               return GNUNET_YES;
+       else
+               return GNUNET_NO;
+}
+
+
+/**
+ * Start experiments management
+ */
+int
+GNUNET_EXPERIMENTATION_experiments_start ()
+{
+       char *issuers;
+       char *pos;
+       struct GNUNET_PeerIdentity issuer_ID;
+
+       /* Load valid issuer */
+       if (GNUNET_SYSERR == GNUNET_CONFIGURATION_get_value_string (GSE_cfg, 
"EXPERIMENTATION", "ISSUERS", &issuers))
+       {
+                       GNUNET_log (GNUNET_ERROR_TYPE_ERROR, _("No valid 
experiment issuers configured! Set value to peer id of issuer! Exit...\n"));
+                       return GNUNET_SYSERR;
+       }
+
+       issuer = GNUNET_CONTAINER_multihashmap_create (10, GNUNET_NO);
+
+  for (pos = strtok (issuers, " "); pos != NULL; pos = strtok (NULL, " "))
+  {
+
+               if (GNUNET_SYSERR == GNUNET_CRYPTO_hash_from_string (pos, 
&issuer_ID.hashPubKey))
+               {
+                       GNUNET_log (GNUNET_ERROR_TYPE_ERROR, _("Invalid value 
`%s'\n"), pos);
+               }
+               else
+               {
+                               GNUNET_log (GNUNET_ERROR_TYPE_INFO, "`%s' is a 
valid issuer \n", GNUNET_i2s (&issuer_ID));
+                               GNUNET_CONTAINER_multihashmap_put (issuer, 
&issuer_ID.hashPubKey,
+                                               NULL, 
GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_FAST);
+               }
+  }
+  GNUNET_free (issuers);
+
+  if (0 == GNUNET_CONTAINER_multihashmap_size (issuer))
+  {
+               GNUNET_log (GNUNET_ERROR_TYPE_ERROR, _("No valid experiment 
issuers configured! Set value to peer id of issuer! Exit...\n"));
+               GNUNET_EXPERIMENTATION_experiments_stop ();
+               return GNUNET_SYSERR;
+  }
+
+  GNUNET_STATISTICS_set (GSE_stats, "# issuer", 
GNUNET_CONTAINER_multihashmap_size (issuer), GNUNET_NO);
+       return GNUNET_OK;
+}
+
+/**
+ * Stop experiments management
+ */
+void
+GNUNET_EXPERIMENTATION_experiments_stop ()
+{
+       if (NULL != issuer)
+               GNUNET_CONTAINER_multihashmap_destroy (issuer);
+       issuer = NULL;
+}
+
+/* end of gnunet-daemon-experimentation_experiments.c */

Modified: gnunet/src/experimentation/gnunet-daemon-experimentation_nodes.c
===================================================================
--- gnunet/src/experimentation/gnunet-daemon-experimentation_nodes.c    
2013-05-24 12:21:57 UTC (rev 27290)
+++ gnunet/src/experimentation/gnunet-daemon-experimentation_nodes.c    
2013-05-24 12:27:28 UTC (rev 27291)
@@ -410,8 +410,6 @@
 
 /**
  * Start the nodes management
- *
- * @param cfg configuration handle
  */
 void
 GNUNET_EXPERIMENTATION_nodes_start ()

Modified: gnunet/src/experimentation/test_experimentation_clique.c
===================================================================
--- gnunet/src/experimentation/test_experimentation_clique.c    2013-05-24 
12:21:57 UTC (rev 27290)
+++ gnunet/src/experimentation/test_experimentation_clique.c    2013-05-24 
12:27:28 UTC (rev 27291)
@@ -85,6 +85,7 @@
   unsigned int active_nodes;
   unsigned int requested_nodes;
   unsigned int inactive_nodes;
+  unsigned int issuer;
 };
 
 
@@ -160,18 +161,23 @@
   unsigned int total_active = 0;
   unsigned int total_inactive = 0;
   unsigned int total_requested = 0;
+  unsigned int issuer = 0;
 
        for (peer = 0; peer < NUM_PEERS; peer++)
        {
                        total_active += ph[peer].active_nodes;
                        total_requested += ph[peer].requested_nodes;
                        total_inactive += ph[peer].inactive_nodes;
+                       if (1 == ph[peer].issuer)
+                               issuer ++;
+
        }
        if (last_value < total_active)
                fprintf (stderr, ".");
 
        if ((total_active == (NUM_PEERS * (NUM_PEERS -1))) &&
-                (total_requested == 0) && (total_inactive == 0))
+                (total_requested == 0) && (total_inactive == 0) &&
+                (issuer == NUM_PEERS))
        {
                        fprintf (stderr, "\n");
                        GNUNET_log (GNUNET_ERROR_TYPE_INFO, "All %u peers 
active in a clique\n", NUM_PEERS);
@@ -209,6 +215,11 @@
        {
                        peer->requested_nodes = value;
        }
+       if (0 == strcmp (name, "# issuer"))
+       {
+                       peer->issuer = value;
+       }
+
        check_end ();
 
        return GNUNET_OK;
@@ -246,6 +257,9 @@
   GNUNET_break (GNUNET_OK == GNUNET_STATISTICS_watch
                 (sh, "experimentation", "# nodes requested",
                  stat_iterator, peer));
+  GNUNET_break (GNUNET_OK == GNUNET_STATISTICS_watch
+                (sh, "experimentation", "# issuer",
+                 stat_iterator, peer));
 }
 
 /**

Modified: gnunet/src/experimentation/test_experimentation_clique.conf
===================================================================
--- gnunet/src/experimentation/test_experimentation_clique.conf 2013-05-24 
12:21:57 UTC (rev 27290)
+++ gnunet/src/experimentation/test_experimentation_clique.conf 2013-05-24 
12:27:28 UTC (rev 27291)
@@ -17,8 +17,10 @@
 AUTOSTART = NO
 
 [dht]
-AUTOSTART = NO
+AUTOSTART = YES
+DISABLE_TRY_CONNECT = NO
 
+
 [block]
 plugins = dht test
 
@@ -35,6 +37,7 @@
 
 [experimentation]
 #PREFIX = valgrind --leak-check=full
+ISSUERS = 
TFRM29O2RQNKLVBQIGODJ6GD58LSQ2NM9TNFBC6N48BRJHQO38Q73N2OM3V4CLKDM6CILQV4CU8PMJDRG0FNB0PDI057DBRANMLPLRG
 
 [ats]
 WAN_QUOTA_OUT = 3932160
@@ -46,7 +49,7 @@
 USE_EPHEMERAL_KEYS = NO
 
 [arm]
-DEFAULTSERVICES = core transport experimentation
+DEFAULTSERVICES = core transport experimentation dht
 PORT = 12366
 
 [transport-udp]




reply via email to

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