gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r21254 - gnunet/src/include


From: gnunet
Subject: [GNUnet-SVN] r21254 - gnunet/src/include
Date: Thu, 3 May 2012 19:43:01 +0200

Author: grothoff
Date: 2012-05-03 19:43:01 +0200 (Thu, 03 May 2012)
New Revision: 21254

Modified:
   gnunet/src/include/gnunet_testing_service.h
Log:
-fix

Modified: gnunet/src/include/gnunet_testing_service.h
===================================================================
--- gnunet/src/include/gnunet_testing_service.h 2012-05-03 17:42:37 UTC (rev 
21253)
+++ gnunet/src/include/gnunet_testing_service.h 2012-05-03 17:43:01 UTC (rev 
21254)
@@ -100,26 +100,6 @@
 
 
 /**
- * Configure shared services at a peer.  Using this function,
- * you can specify that certain services (such as "resolver")
- * should not be run for each peer but instead be shared
- * across N peers on the specified host.  This function
- * must be called before any peers are created at the host.
- * 
- * @param host host to configure
- * @param service_name name of the service to share
- * @param num_peers number of peers that should share one instance
- *        of the specified service (1 for no sharing is the default),
- *        use 0 to disable the service
- */
-void
-GNUNET_TESTING_host_configure (struct GNUNET_TESTING_Host *host,
-                              const char *service_name,
-                              uint32_t num_peers);
-// FIXME: make this controller-configure?
-
-
-/**
  * Destroy a host handle.  Must only be called once everything
  * running on that host has been stopped.
  *
@@ -169,6 +149,46 @@
 
 
 /**
+ * Types of information that can be requested about a peer.
+ */
+enum GNUNET_TESTING_PeerInformationType
+{
+
+  /**
+   * Special value (not valid for requesting information)
+   * that is used in the event struct if a 'generic' pointer
+   * is returned (for other operations not related to this
+   * enumeration).
+   */
+  GNUNET_TESTING_PIT_GENERIC = 0,
+
+  /**
+   * What host is the peer running on?  Returns a 'const struct
+   * GNUNET_TESTING_Host *'.  Valid until
+   * 'GNUNET_TESTING_operation_done' is called.
+   */
+  GNUNET_TESTING_PIT_HOST,
+
+  /**
+   * What configuration is the peer using?  Returns a 'const struct
+   * GNUNET_CONFIGURATION_Handle *'.  Valid until
+   * 'GNUNET_TESTNIG_operation_done' is called.  However, the
+   * values may be inaccurate if the peer is reconfigured in
+   * the meantime.
+   */
+  GNUNET_TESTING_PIT_CONFIGURATION,
+
+  /**
+   * What is the identity of the peer?  Returns a
+   * 'const struct GNUNET_PeerIdentity *'.  Valid until
+   * 'GNUNET_TESTNIG_operation_done' is called.
+   */
+  GNUNET_TESTING_PIT_IDENTITY
+
+};
+
+
+/**
  * Argument to GNUNET_TESTING_ControllerCallback with details about
  * the event.
  */
@@ -376,7 +396,25 @@
                                 void *cc_cls);
 
 
+/**
+ * Configure shared services at a controller.  Using this function,
+ * you can specify that certain services (such as "resolver")
+ * should not be run for each peer but instead be shared
+ * across N peers on the specified host.  This function
+ * must be called before any peers are created at the host.
+ * 
+ * @param controller controller to configure
+ * @param service_name name of the service to share
+ * @param num_peers number of peers that should share one instance
+ *        of the specified service (1 for no sharing is the default),
+ *        use 0 to disable the service
+ */
+void
+GNUNET_TESTING_controller_configure_sharing (struct GNUNET_TESTING_Controller 
*controller,
+                                            const char *service_name,
+                                            uint32_t num_peers);
 
+
 /**
  * Stop the given controller (also will terminate all peers and
  * controllers dependent on this controller).  This function 
@@ -473,46 +511,6 @@
 
 
 /**
- * Types of information that can be requested about a peer.
- */
-enum GNUNET_TESTING_PeerInformationType
-{
-
-  /**
-   * Special value (not valid for requesting information)
-   * that is used in the event struct if a 'generic' pointer
-   * is returned (for other operations not related to this
-   * enumeration).
-   */
-  GNUNET_TESTING_PIT_GENERIC = 0,
-
-  /**
-   * What host is the peer running on?  Returns a 'const struct
-   * GNUNET_TESTING_Host *'.  Valid until
-   * 'GNUNET_TESTING_operation_done' is called.
-   */
-  GNUNET_TESTING_PIT_HOST,
-
-  /**
-   * What configuration is the peer using?  Returns a 'const struct
-   * GNUNET_CONFIGURATION_Handle *'.  Valid until
-   * 'GNUNET_TESTNIG_operation_done' is called.  However, the
-   * values may be inaccurate if the peer is reconfigured in
-   * the meantime.
-   */
-  GNUNET_TESTING_PIT_CONFIGURATION,
-
-  /**
-   * What is the identity of the peer?  Returns a
-   * 'const struct GNUNET_PeerIdentity *'.  Valid until
-   * 'GNUNET_TESTNIG_operation_done' is called.
-   */
-  GNUNET_TESTING_PIT_IDENTITY
-
-};
-
-
-/**
  * Request information about a peer.
  *
  * @param peer peer to request information about
@@ -601,7 +599,7 @@
 /**
  * Topologies supported for testbeds.
  */
-enum GNUNET_TESTING_Topology
+enum GNUNET_TESTING_TopologyOption
 {
   /**
    * A clique (everyone connected to everyone else).  No options.
@@ -881,7 +879,7 @@
                                  struct GNUNET_TESTING_Host **hosts,
                                  unsigned int num_peers,
                                  const struct GNUNET_CONFIGURATION_Handle 
*peer_cfg,
-                                 enum GNUNET_TESTING_Topology 
underlay_topology,
+                                 enum GNUNET_TESTING_TopologyOption 
underlay_topology,
                                  va_list va);
 
 
@@ -907,7 +905,7 @@
                               struct GNUNET_TESTING_Host **hosts,
                               unsigned int num_peers,
                               const struct GNUNET_CONFIGURATION_Handle 
*peer_cfg,
-                              enum GNUNET_TESTING_Topology underlay_topology,
+                              enum GNUNET_TESTING_TopologyOption 
underlay_topology,
                               ...);
 
 




reply via email to

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