/*
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
+ * The map of active operation contexts
*/
- struct OperationContext *ocq_head;
-
- /**
- * The tail of the operation context queue
- */
- 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
*
size_t *size, size_t *xsize);
-/**
- * Adds an operation to the queue of operations
- *
- * @param op the operation to add
- */
-void
-GNUNET_TESTBED_operation_add_ (struct GNUNET_TESTBED_Operation *op);
-
-
/**
* Creates a helper initialization message. This function is here because we
* want to use this in testing