2 This file is part of GNUnet
3 (C) 2012 Christian Grothoff (and other contributing authors)
5 GNUnet is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published
7 by the Free Software Foundation; either version 3, or (at your
8 option) any later version.
10 GNUnet is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with GNUnet; see the file COPYING. If not, write to the
17 Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA.
22 * @file testbed/testbed_api.h
23 * @brief Interface for functions internally exported from testbed_api.c
24 * @author Sree Harsha Totakura
32 * Enumeration of operations
37 * Peer destroy operation
44 * The counter for generating unique operation ids. Use its current value and
45 * increment it (defined in testbed_api.c)
47 extern uint64_t GNUNET_TESTBED_operation_id;
50 * Testbed operation structure
52 struct GNUNET_TESTBED_Operation
55 * next pointer for DLL
57 struct GNUNET_TESTBED_Operation *next;
60 * prev pointer for DLL
62 struct GNUNET_TESTBED_Operation *prev;
65 * The ID for the operation;
67 uint64_t operation_id;
70 * The type of operation
72 enum OperationType type;
75 * Data specific to OperationType
82 * Queues a message in send queue for sending to the service
84 * @param controller the handle to the controller
85 * @param msg the message to queue
88 GNUNET_TESTBED_queue_message (struct GNUNET_TESTBED_Controller *controller,
89 struct GNUNET_MessageHeader *msg);
93 * Compresses given configuration using zlib compress
95 * @param config the serialized configuration
96 * @param size the size of config
97 * @param xconfig will be set to the compressed configuration (memory is fresly
99 * @return the size of the xconfig
102 GNUNET_TESTBED_compress_config (const char *config, size_t size,
107 * Adds an operation to the queue of operations
109 * @param op the operation to add
112 GNUNET_TESTBED_operation_add (struct GNUNET_TESTBED_Operation *op);