gnunet-svn
[Top][All Lists]
Advanced

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

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


From: gnunet
Subject: [GNUnet-SVN] r27275 - gnunet/src/experimentation
Date: Thu, 23 May 2013 17:25:05 +0200

Author: wachs
Date: 2013-05-23 17:25:05 +0200 (Thu, 23 May 2013)
New Revision: 27275

Modified:
   gnunet/src/experimentation/gnunet-daemon-experimentation_capabilites.c
Log:
changes


Modified: gnunet/src/experimentation/gnunet-daemon-experimentation_capabilites.c
===================================================================
--- gnunet/src/experimentation/gnunet-daemon-experimentation_capabilites.c      
2013-05-23 14:57:20 UTC (rev 27274)
+++ gnunet/src/experimentation/gnunet-daemon-experimentation_capabilites.c      
2013-05-23 15:25:05 UTC (rev 27275)
@@ -31,6 +31,19 @@
 #include "gnunet_statistics_service.h"
 #include "gnunet-daemon-experimentation.h"
 
+enum ExperimentationCapabilities
+{
+       NONE = 0,
+       PLUGIN_TCP = 1,
+       PLUGIN_UDP = 2,
+       PLUGIN_UNIX = 4,
+       PLUGIN_HTTP_CLIENT = 8,
+       PLUGIN_HTTP_SERVER = 16,
+       PLUGIN_HTTPS_CLIENT = 32,
+       PLUGIN_HTTPS_SERVER = 64,
+       PLUGIN_WLAN = 128,
+};
+
 /**
  * Start the detecting capabilities
  *
@@ -39,7 +52,42 @@
 void
 GNUNET_EXPERIMENTATION_capabilities_start ()
 {
+       char *plugins;
+  char *pos;
+  uint32_t 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, " 
"))
+         {
+             GNUNET_log (GNUNET_ERROR_TYPE_INFO, _("Found `%s' transport 
plugin\n"),
+                         pos);
+             if (0 == strcmp (pos, "tcp"))
+               capabilities |= PLUGIN_TCP;
+             else if (0 == strcmp (pos, "udp"))
+               capabilities |= PLUGIN_UDP;
+                                       else if (0 == strcmp (pos, "unix"))
+                                               capabilities |= PLUGIN_UNIX;
+                                       else if (0 == strcmp (pos, 
"http_client"))
+                                               capabilities |= 
PLUGIN_HTTP_CLIENT;
+                                       else if (0 == strcmp (pos, 
"http_server"))
+                                               capabilities |= 
PLUGIN_HTTP_SERVER;
+                                       else if (0 == strcmp (pos, 
"https_client"))
+                                               capabilities |= 
PLUGIN_HTTP_CLIENT;
+                                       else if (0 == strcmp (pos, 
"https_server"))
+                                               capabilities |= 
PLUGIN_HTTPS_SERVER;
+                                       else if (0 == strcmp (pos, "wlan"))
+                                               capabilities |= PLUGIN_WLAN;
+         }
+         GNUNET_free (plugins);
+  }
+
+       /* IPv6 enabled */
+
+       /* Behind NAT */
 }
 
 /**




reply via email to

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