- msg
[oweals/gnunet.git] / src / testbed / testbed_api_topology.c
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 testbed/testbed_api_topology.c
23  * @brief topology-generation functions
24  * @author Christian Grothoff
25  */
26 #include "platform.h"
27 #include "gnunet_testbed_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
45                                                **peers,
46                                                enum
47                                                GNUNET_TESTBED_TopologyOption
48                                                topo, va_list ap)
49 {
50   GNUNET_break (0);
51   return NULL;
52 }
53
54
55 /**
56  * Configure overall network topology to have a particular shape.
57  *
58  * @param op_cls closure argument to give with the operation event
59  * @param num_peers number of peers in 'peers'
60  * @param peers array of 'num_peers' with the peers to configure
61  * @param topo desired underlay topology to use
62  * @param ... topology-specific options
63  * @return handle to the operation, NULL if configuring the topology
64  *         is not allowed at this time
65  */
66 struct GNUNET_TESTBED_Operation *
67 GNUNET_TESTBED_underlay_configure_topology (void *op_cls,
68                                             unsigned int num_peers,
69                                             struct GNUNET_TESTBED_Peer **peers,
70                                             enum GNUNET_TESTBED_TopologyOption
71                                             topo, ...)
72 {
73   GNUNET_break (0);
74   return NULL;
75 }
76
77
78 /**
79  * All peers must have been started before calling this function.
80  * This function then connects the given peers in the P2P overlay
81  * using the given topology.
82  *
83  * @param op_cls closure argument to give with the operation event
84  * @param num_peers number of peers in 'peers'
85  * @param peers array of 'num_peers' with the peers to configure
86  * @param topo desired underlay topology to use
87  * @param va topology-specific options
88  * @return handle to the operation, NULL if connecting these
89  *         peers is fundamentally not possible at this time (peers
90  *         not running or underlay disallows)
91  */
92 struct GNUNET_TESTBED_Operation *
93 GNUNET_TESTBED_overlay_configure_topology_va (void *op_cls,
94                                               unsigned int num_peers,
95                                               struct GNUNET_TESTBED_Peer *peers,
96                                               enum GNUNET_TESTBED_TopologyOption
97                                               topo, va_list va)
98 {
99   GNUNET_break (0);
100   return NULL;
101 }
102
103
104 /**
105  * All peers must have been started before calling this function.
106  * This function then connects the given peers in the P2P overlay
107  * using the given topology.
108  *
109  * @param op_cls closure argument to give with the operation event
110  * @param num_peers number of peers in 'peers'
111  * @param peers array of 'num_peers' with the peers to configure
112  * @param topo desired underlay topology to use
113  * @param ... topology-specific options
114  * @return handle to the operation, NULL if connecting these
115  *         peers is fundamentally not possible at this time (peers
116  *         not running or underlay disallows)
117  */
118 struct GNUNET_TESTBED_Operation *
119 GNUNET_TESTBED_overlay_configure_topology (void *op_cls, unsigned int num_peers,
120                                            struct GNUNET_TESTBED_Peer *peers,
121                                            enum GNUNET_TESTBED_TopologyOption
122                                            topo, ...)
123 {
124   GNUNET_break (0);
125   return NULL;
126 }
127
128 /* end of testbed_api_topology.c */