aboutsummaryrefslogtreecommitdiff
path: root/src/testbed/testbed_api_peers.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-05-05 15:49:25 +0000
committerChristian Grothoff <christian@grothoff.org>2012-05-05 15:49:25 +0000
commitb042203d5a4f8729bbde84447841e8531010d1aa (patch)
treefb8cf28f5db734c2ae2a8d9580c9d4f83cdd5050 /src/testbed/testbed_api_peers.h
parent16f0681acc44d732c1827492fc2b0331cdaea009 (diff)
downloadgnunet-b042203d5a4f8729bbde84447841e8531010d1aa.tar.gz
gnunet-b042203d5a4f8729bbde84447841e8531010d1aa.zip
-renaming new testing code to testbed
Diffstat (limited to 'src/testbed/testbed_api_peers.h')
-rw-r--r--src/testbed/testbed_api_peers.h71
1 files changed, 71 insertions, 0 deletions
diff --git a/src/testbed/testbed_api_peers.h b/src/testbed/testbed_api_peers.h
new file mode 100644
index 000000000..6b2ed7c8b
--- /dev/null
+++ b/src/testbed/testbed_api_peers.h
@@ -0,0 +1,71 @@
1/*
2 This file is part of GNUnet
3 (C) 2008--2012 Christian Grothoff (and other contributing authors)
4
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.
9
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.
14
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.
19 */
20
21/**
22 * @file testing/new_testing_api_peers.h
23 * @brief internal API to access the 'peers' subsystem
24 * @author Christian Grothoff
25 */
26#ifndef NEW_TESTING_API_PEERS_H
27#define NEW_TESTING_API_PEERS_H
28
29#include "gnunet_testing_service.h"
30#include "gnunet_helper_lib.h"
31
32
33/**
34 * Create the given peer at the specified host using the given
35 * controller. If the given controller is not running on the target
36 * host, it should find or create a controller at the target host and
37 * delegate creating the peer. Explicit delegation paths can be setup
38 * using 'GNUNET_TESTBED_controller_link'. If no explicit delegation
39 * path exists, a direct link with a subordinate controller is setup
40 * for the first delegated peer to a particular host; the subordinate
41 * controller is then destroyed once the last peer that was delegated
42 * to the remote host is stopped. This function is used in particular
43 * if some other controller has already assigned a unique ID to the
44 * peer.
45 *
46 * Creating the peer only creates the handle to manipulate and further
47 * configure the peer; use "GNUNET_TESTBED_peer_start" and
48 * "GNUNET_TESTBED_peer_stop" to actually start/stop the peer's
49 * processes.
50 *
51 * Note that the given configuration will be adjusted by the
52 * controller to avoid port/path conflicts with other peers.
53 * The "final" configuration can be obtained using
54 * 'GNUNET_TESTBED_peer_get_information'.
55 *
56 * @param unique_id unique ID for this peer
57 * @param controller controller process to use
58 * @param host host to run the peer on
59 * @param cfg configuration to use for the peer
60 * @return handle to the peer (actual startup will happen asynchronously)
61 */
62struct GNUNET_TESTBED_Peer *
63GNUNET_TESTBED_peer_create_with_id_ (uint32_t unique_id,
64 struct GNUNET_TESTBED_Controller *controller,
65 struct GNUNET_TESTBED_Host *host,
66 const struct GNUNET_CONFIGURATION_Handle *cfg);
67
68
69
70#endif
71/* end of new_testing_api_peers.h */