/*
This file is part of GNUnet
- (C) 2012 Christian Grothoff (and other contributing authors)
+ (C) 2008--2013 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
*/
OP_PEER_INFO,
+ /**
+ * Reconfigure a peer
+ */
+ OP_PEER_RECONFIGURE,
+
/**
* Overlay connection operation
*/
/**
* Get slave config operation
*/
- OP_GET_SLAVE_CONFIG
+ OP_GET_SLAVE_CONFIG,
+
+ /**
+ * Stop and destroy all peers
+ */
+ OP_SHUTDOWN_PEERS,
+
+ /**
+ * Start/stop service at a peer
+ */
+ OP_MANAGE_SERVICE
};
*/
struct MessageQueue;
-/**
- * Structure for a controller link
- */
-struct ControllerLink;
-
/**
* Enumeration of states of OperationContext
*/
struct OperationContext
{
- /**
- * next ptr for DLL
- */
- struct OperationContext *next;
-
- /**
- * prev ptr for DLL
- */
- struct OperationContext *prev;
-
/**
* The controller to which this operation context belongs to
*/
*/
struct MessageQueue *mq_tail;
- /**
- * The head of the ControllerLink list
- */
- struct ControllerLink *cl_head;
-
- /**
- * The tail of the ControllerLink list
- */
- struct ControllerLink *cl_tail;
-
/**
* The client transmit handle
*/
struct GNUNET_TESTBED_HostRegistrationHandle *rh;
/**
- * The head of the opeartion context queue
- */
- struct OperationContext *ocq_head;
-
- /**
- * The tail of the operation context queue
+ * The map of active operation contexts
*/
- struct OperationContext *ocq_tail;
+ struct GNUNET_CONTAINER_MultiHashMap32 *opc_map;
/**
* Operation queue for simultaneous operations
*/
int in_receive;
- /**
- * Did we create the host for this?
- */
- int aux_host;
-
/**
* The operation id counter. use current value and increment
*/
struct GNUNET_MessageHeader *msg);
+/**
+ * Inserts the given operation context into the operation context map of the
+ * given controller. Creates the operation context map if one does not exist
+ * for the controller
+ *
+ * @param c the controller
+ * @param opc the operation context to be inserted
+ */
+void
+GNUNET_TESTBED_insert_opc_ (struct GNUNET_TESTBED_Controller *c,
+ struct OperationContext *opc);
+
+
+/**
+ * Removes the given operation context from the operation context map of the
+ * given controller
+ *
+ * @param c the controller
+ * @param opc the operation context to remove
+ */
+void
+GNUNET_TESTBED_remove_opc_ (const struct GNUNET_TESTBED_Controller *c,
+ struct OperationContext *opc);
+
+
/**
* Compresses given configuration using zlib compress
*
/**
- * Adds an operation to the queue of operations
+ * Function to serialize and compress using zlib a configuration through a
+ * configuration handle
*
- * @param op the operation to add
+ * @param cfg the configuration
+ * @param size the size of configuration when serialize. Will be set on success.
+ * @param xsize the sizeo of the compressed configuration. Will be set on success.
+ * @return the serialized and compressed configuration
*/
-void
-GNUNET_TESTBED_operation_add_ (struct GNUNET_TESTBED_Operation *op);
+char *
+GNUNET_TESTBED_compress_cfg_ (const struct GNUNET_CONFIGURATION_Handle *cfg,
+ size_t *size, size_t *xsize);
/**