+/**
+ * Set an option of type 'char *' from the command line.
+ * A pointer to this function should be passed as part of the
+ * 'struct GNUNET_GETOPT_CommandLineOption' array to initialize options
+ * of this type. It should be followed by a pointer to a value of
+ * type 'char *'.
+ *
+ * @param ctx command line processing context
+ * @param scls additional closure (will point to the 'char *',
+ * which will be allocated)
+ * @param option name of the option
+ * @param value actual value of the option (a string)
+ * @return GNUNET_OK to continue procesing; GNUNET_SYSERR to signal error
+ */
+int
+set_topology (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx,
+ void *scls, const char *option, const char *value)
+{
+ enum GNUNET_TESTBED_TopologyOption *val = scls;
+
+ if (0 == strncasecmp ("CLIQUE", value, strlen ("CLIQUE")))
+ {
+ *val = GNUNET_TESTBED_TOPOLOGY_CLIQUE;
+ return GNUNET_OK;
+ }
+ if (0 == strncasecmp ("RANDOM", value, strlen ("RANDOM")))
+ {
+ *val = GNUNET_TESTBED_TOPOLOGY_ERDOS_RENYI;
+ return GNUNET_OK;
+ }
+ FPRINTF (stderr, "%s", _("Only `CLIQUE' and `RANDOM' are permitted.\n"));
+ return GNUNET_SYSERR;
+}
+
+