diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-05-05 15:49:25 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-05-05 15:49:25 +0000 |
commit | b042203d5a4f8729bbde84447841e8531010d1aa (patch) | |
tree | fb8cf28f5db734c2ae2a8d9580c9d4f83cdd5050 /src/testbed/testbed_api_topology.c | |
parent | 16f0681acc44d732c1827492fc2b0331cdaea009 (diff) | |
download | gnunet-b042203d5a4f8729bbde84447841e8531010d1aa.tar.gz gnunet-b042203d5a4f8729bbde84447841e8531010d1aa.zip |
-renaming new testing code to testbed
Diffstat (limited to 'src/testbed/testbed_api_topology.c')
-rw-r--r-- | src/testbed/testbed_api_topology.c | 127 |
1 files changed, 127 insertions, 0 deletions
diff --git a/src/testbed/testbed_api_topology.c b/src/testbed/testbed_api_topology.c new file mode 100644 index 000000000..12def3a1f --- /dev/null +++ b/src/testbed/testbed_api_topology.c | |||
@@ -0,0 +1,127 @@ | |||
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_topology.c | ||
23 | * @brief topology-generation functions | ||
24 | * @author Christian Grothoff | ||
25 | */ | ||
26 | #include "platform.h" | ||
27 | #include "gnunet_testing_service.h" | ||
28 | |||
29 | |||
30 | /** | ||
31 | * Configure overall network topology to have a particular shape. | ||
32 | * | ||
33 | * @param op_cls closure argument to give with the operation event | ||
34 | * @param num_peers number of peers in 'peers' | ||
35 | * @param peers array of 'num_peers' with the peers to configure | ||
36 | * @param topo desired underlay topology to use | ||
37 | * @param ap topology-specific options | ||
38 | * @return handle to the operation, NULL if configuring the topology | ||
39 | * is not allowed at this time | ||
40 | */ | ||
41 | struct GNUNET_TESTBED_Operation * | ||
42 | GNUNET_TESTBED_underlay_configure_topology_va (void *op_cls, | ||
43 | unsigned int num_peers, | ||
44 | struct GNUNET_TESTBED_Peer **peers, | ||
45 | enum GNUNET_TESTBED_TopologyOption topo, | ||
46 | va_list ap) | ||
47 | { | ||
48 | GNUNET_break (0); | ||
49 | return NULL; | ||
50 | } | ||
51 | |||
52 | |||
53 | /** | ||
54 | * Configure overall network topology to have a particular shape. | ||
55 | * | ||
56 | * @param op_cls closure argument to give with the operation event | ||
57 | * @param num_peers number of peers in 'peers' | ||
58 | * @param peers array of 'num_peers' with the peers to configure | ||
59 | * @param topo desired underlay topology to use | ||
60 | * @param ... topology-specific options | ||
61 | * @return handle to the operation, NULL if configuring the topology | ||
62 | * is not allowed at this time | ||
63 | */ | ||
64 | struct GNUNET_TESTBED_Operation * | ||
65 | GNUNET_TESTBED_underlay_configure_topology (void *op_cls, | ||
66 | unsigned int num_peers, | ||
67 | struct GNUNET_TESTBED_Peer **peers, | ||
68 | enum GNUNET_TESTBED_TopologyOption topo, | ||
69 | ...) | ||
70 | { | ||
71 | GNUNET_break (0); | ||
72 | return NULL; | ||
73 | } | ||
74 | |||
75 | |||
76 | /** | ||
77 | * All peers must have been started before calling this function. | ||
78 | * This function then connects the given peers in the P2P overlay | ||
79 | * using the given topology. | ||
80 | * | ||
81 | * @param op_cls closure argument to give with the operation event | ||
82 | * @param num_peers number of peers in 'peers' | ||
83 | * @param peers array of 'num_peers' with the peers to configure | ||
84 | * @param topo desired underlay topology to use | ||
85 | * @param va topology-specific options | ||
86 | * @return handle to the operation, NULL if connecting these | ||
87 | * peers is fundamentally not possible at this time (peers | ||
88 | * not running or underlay disallows) | ||
89 | */ | ||
90 | struct GNUNET_TESTBED_Operation * | ||
91 | GNUNET_TESTBED_overlay_configure_topology_va (void *op_cls, | ||
92 | unsigned int num_peers, | ||
93 | struct GNUNET_TESTBED_Peer *peers, | ||
94 | enum GNUNET_TESTBED_TopologyOption topo, | ||
95 | va_list va) | ||
96 | { | ||
97 | GNUNET_break (0); | ||
98 | return NULL; | ||
99 | } | ||
100 | |||
101 | |||
102 | /** | ||
103 | * All peers must have been started before calling this function. | ||
104 | * This function then connects the given peers in the P2P overlay | ||
105 | * using the given topology. | ||
106 | * | ||
107 | * @param op_cls closure argument to give with the operation event | ||
108 | * @param num_peers number of peers in 'peers' | ||
109 | * @param peers array of 'num_peers' with the peers to configure | ||
110 | * @param topo desired underlay topology to use | ||
111 | * @param ... topology-specific options | ||
112 | * @return handle to the operation, NULL if connecting these | ||
113 | * peers is fundamentally not possible at this time (peers | ||
114 | * not running or underlay disallows) | ||
115 | */ | ||
116 | struct GNUNET_TESTBED_Operation * | ||
117 | GNUNET_TESTBED_overlay_configure_topology (void *op_cls, | ||
118 | unsigned int num_peers, | ||
119 | struct GNUNET_TESTBED_Peer *peers, | ||
120 | enum GNUNET_TESTBED_TopologyOption topo, | ||
121 | ...) | ||
122 | { | ||
123 | GNUNET_break (0); | ||
124 | return NULL; | ||
125 | } | ||
126 | |||
127 | /* end of new_testing_api_topology.c */ | ||