* @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"
+
+/**
+ * Capability value shared between components
+ */
uint32_t GSE_node_capabilities;
+/**
+ * Capabilities defined at the moment
+ */
#define GNUNET_EXPERIMENTATION_capabilities_count 11;
+
/**
* Capabilities a node has or an experiment requires string
*/
* @return the string to print
*/
const char *
-GNUNET_EXPERIMENTATION_capability_to_str (uint32_t cap)
+GED_capability_to_str (uint32_t cap)
{
char * capstr[] = GNUNET_EXPERIMENTATION_capabilities_string;
unsigned index = 0;
* @return GNUNET_YES or GNUNET_NO
*/
int
-GNUNET_EXPERIMENTATION_capabilities_have (uint32_t have, uint32_t desired)
+GED_capabilities_have (uint32_t have, uint32_t desired)
{
if (desired == (desired & have))
return GNUNET_YES;
* Start the detecting capabilities
*/
void
-GNUNET_EXPERIMENTATION_capabilities_start ()
+GED_capabilities_start ()
{
char *plugins;
char *pos;
/* Plugins configured */
- if (GNUNET_OK == GNUNET_CONFIGURATION_get_value_string (GSE_cfg,
+ if (GNUNET_OK == GNUNET_CONFIGURATION_get_value_string (GED_cfg,
"TRANSPORT", "PLUGINS", &plugins))
{
for (pos = strtok (plugins, " "); pos != NULL; pos = strtok (NULL, " "))
/* IPv6 enabled
* FIXE: just having it not enabled is not really sufficient */
- if (GNUNET_NO == GNUNET_CONFIGURATION_get_value_yesno (GSE_cfg,
+ if (GNUNET_NO == GNUNET_CONFIGURATION_get_value_yesno (GED_cfg,
"NAT", "DISABLEV6"))
GSE_node_capabilities |= HAVE_IPV6;
/* Behind NAT */
- if (GNUNET_YES == GNUNET_CONFIGURATION_get_value_yesno (GSE_cfg,
+ if (GNUNET_YES == GNUNET_CONFIGURATION_get_value_yesno (GED_cfg,
"NAT", "BEHIND_NAT"))
GSE_node_capabilities |= BEHIND_NAT;
{
index = 1;
index = index << c1;
- if (GNUNET_YES == GNUNET_EXPERIMENTATION_capabilities_have (GSE_node_capabilities, index))
+ if (GNUNET_YES == GED_capabilities_have (GSE_node_capabilities, index))
{
- GNUNET_log (GNUNET_ERROR_TYPE_INFO, "We have `%s'\n",
- GNUNET_EXPERIMENTATION_capability_to_str(index));
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "We have `%s'\n",
+ GED_capability_to_str(index));
}
}
}
+
/**
* Stop the detecting capabilities
*/
void
-GNUNET_EXPERIMENTATION_capabilities_stop ()
+GED_capabilities_stop ()
{
}