aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_testing_lib.h
diff options
context:
space:
mode:
authorng0 <ng0@n0.is>2019-09-08 12:33:09 +0000
committerng0 <ng0@n0.is>2019-09-08 12:33:09 +0000
commitd41ed82a4ea0cc8e1674b6d5d2c49fd6462610bb (patch)
tree9efd18ea7d425652085ed0bd5e8e45604bc5f6b9 /src/include/gnunet_testing_lib.h
parenta0fce305c565c0937d917a92712f15e9c5736260 (diff)
downloadgnunet-d41ed82a4ea0cc8e1674b6d5d2c49fd6462610bb.tar.gz
gnunet-d41ed82a4ea0cc8e1674b6d5d2c49fd6462610bb.zip
uncrustify as demanded.
Diffstat (limited to 'src/include/gnunet_testing_lib.h')
-rw-r--r--src/include/gnunet_testing_lib.h101
1 files changed, 50 insertions, 51 deletions
diff --git a/src/include/gnunet_testing_lib.h b/src/include/gnunet_testing_lib.h
index 0317b2007..370360eb1 100644
--- a/src/include/gnunet_testing_lib.h
+++ b/src/include/gnunet_testing_lib.h
@@ -11,7 +11,7 @@
11 WITHOUT ANY WARRANTY; without even the implied warranty of 11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Affero General Public License for more details. 13 Affero General Public License for more details.
14 14
15 You should have received a copy of the GNU Affero General Public License 15 You should have received a copy of the GNU Affero General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>. 16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17 17
@@ -56,7 +56,7 @@ extern "C"
56/** 56/**
57 * Size of each hostkey in the hostkey file (in BYTES). 57 * Size of each hostkey in the hostkey file (in BYTES).
58 */ 58 */
59#define GNUNET_TESTING_HOSTKEYFILESIZE sizeof (struct GNUNET_CRYPTO_EddsaPrivateKey) 59#define GNUNET_TESTING_HOSTKEYFILESIZE sizeof(struct GNUNET_CRYPTO_EddsaPrivateKey)
60 60
61/** 61/**
62 * The environmental variable, if set, that dictates where testing should place 62 * The environmental variable, if set, that dictates where testing should place
@@ -81,8 +81,7 @@ struct GNUNET_TESTING_Peer;
81/** 81/**
82 * Specification of a service that is to be shared among peers 82 * Specification of a service that is to be shared among peers
83 */ 83 */
84struct GNUNET_TESTING_SharedService 84struct GNUNET_TESTING_SharedService {
85{
86 /** 85 /**
87 * The name of the service. 86 * The name of the service.
88 */ 87 */
@@ -122,11 +121,11 @@ struct GNUNET_TESTING_SharedService
122 * @return handle to this system, NULL on error 121 * @return handle to this system, NULL on error
123 */ 122 */
124struct GNUNET_TESTING_System * 123struct GNUNET_TESTING_System *
125GNUNET_TESTING_system_create (const char *testdir, 124GNUNET_TESTING_system_create(const char *testdir,
126 const char *trusted_ip, 125 const char *trusted_ip,
127 const char *hostname, 126 const char *hostname,
128 const struct GNUNET_TESTING_SharedService * 127 const struct GNUNET_TESTING_SharedService *
129 shared_services); 128 shared_services);
130 129
131 130
132/** 131/**
@@ -154,12 +153,12 @@ GNUNET_TESTING_system_create (const char *testdir,
154 * @return handle to this system, NULL on error 153 * @return handle to this system, NULL on error
155 */ 154 */
156struct GNUNET_TESTING_System * 155struct GNUNET_TESTING_System *
157GNUNET_TESTING_system_create_with_portrange (const char *testdir, 156GNUNET_TESTING_system_create_with_portrange(const char *testdir,
158 const char *trusted_ip, 157 const char *trusted_ip,
159 const char *hostname, 158 const char *hostname,
160 const struct GNUNET_TESTING_SharedService *shared_services, 159 const struct GNUNET_TESTING_SharedService *shared_services,
161 uint16_t lowport, 160 uint16_t lowport,
162 uint16_t highport); 161 uint16_t highport);
163 162
164 163
165/** 164/**
@@ -170,8 +169,8 @@ GNUNET_TESTING_system_create_with_portrange (const char *testdir,
170 * be removed (clean up on shutdown)? 169 * be removed (clean up on shutdown)?
171 */ 170 */
172void 171void
173GNUNET_TESTING_system_destroy (struct GNUNET_TESTING_System *system, 172GNUNET_TESTING_system_destroy(struct GNUNET_TESTING_System *system,
174 int remove_paths); 173 int remove_paths);
175 174
176 175
177/** 176/**
@@ -192,9 +191,9 @@ GNUNET_TESTING_system_destroy (struct GNUNET_TESTING_System *system,
192 * @return NULL on error (not enough keys) 191 * @return NULL on error (not enough keys)
193 */ 192 */
194struct GNUNET_CRYPTO_EddsaPrivateKey * 193struct GNUNET_CRYPTO_EddsaPrivateKey *
195GNUNET_TESTING_hostkey_get (const struct GNUNET_TESTING_System *system, 194GNUNET_TESTING_hostkey_get(const struct GNUNET_TESTING_System *system,
196 uint32_t key_number, 195 uint32_t key_number,
197 struct GNUNET_PeerIdentity *id); 196 struct GNUNET_PeerIdentity *id);
198 197
199 198
200/** 199/**
@@ -204,7 +203,7 @@ GNUNET_TESTING_hostkey_get (const struct GNUNET_TESTING_System *system,
204 * @return 0 if no free port was available 203 * @return 0 if no free port was available
205 */ 204 */
206uint16_t 205uint16_t
207GNUNET_TESTING_reserve_port (struct GNUNET_TESTING_System *system); 206GNUNET_TESTING_reserve_port(struct GNUNET_TESTING_System *system);
208 207
209 208
210/** 209/**
@@ -215,8 +214,8 @@ GNUNET_TESTING_reserve_port (struct GNUNET_TESTING_System *system);
215 * @param port reserved port to release 214 * @param port reserved port to release
216 */ 215 */
217void 216void
218GNUNET_TESTING_release_port (struct GNUNET_TESTING_System *system, 217GNUNET_TESTING_release_port(struct GNUNET_TESTING_System *system,
219 uint16_t port); 218 uint16_t port);
220 219
221 220
222/** 221/**
@@ -237,8 +236,8 @@ GNUNET_TESTING_release_port (struct GNUNET_TESTING_System *system,
237 * be incomplete and should not be used there upon 236 * be incomplete and should not be used there upon
238 */ 237 */
239int 238int
240GNUNET_TESTING_configuration_create (struct GNUNET_TESTING_System *system, 239GNUNET_TESTING_configuration_create(struct GNUNET_TESTING_System *system,
241 struct GNUNET_CONFIGURATION_Handle *cfg); 240 struct GNUNET_CONFIGURATION_Handle *cfg);
242// FIXME: add dual to 'release' ports again... 241// FIXME: add dual to 'release' ports again...
243 242
244 243
@@ -256,11 +255,11 @@ GNUNET_TESTING_configuration_create (struct GNUNET_TESTING_System *system,
256 * @return handle to the peer, NULL on error 255 * @return handle to the peer, NULL on error
257 */ 256 */
258struct GNUNET_TESTING_Peer * 257struct GNUNET_TESTING_Peer *
259GNUNET_TESTING_peer_configure (struct GNUNET_TESTING_System *system, 258GNUNET_TESTING_peer_configure(struct GNUNET_TESTING_System *system,
260 struct GNUNET_CONFIGURATION_Handle *cfg, 259 struct GNUNET_CONFIGURATION_Handle *cfg,
261 uint32_t key_number, 260 uint32_t key_number,
262 struct GNUNET_PeerIdentity *id, 261 struct GNUNET_PeerIdentity *id,
263 char **emsg); 262 char **emsg);
264 263
265 264
266/** 265/**
@@ -270,8 +269,8 @@ GNUNET_TESTING_peer_configure (struct GNUNET_TESTING_System *system,
270 * @param id identifier for the daemon, will be set 269 * @param id identifier for the daemon, will be set
271 */ 270 */
272void 271void
273GNUNET_TESTING_peer_get_identity (struct GNUNET_TESTING_Peer *peer, 272GNUNET_TESTING_peer_get_identity(struct GNUNET_TESTING_Peer *peer,
274 struct GNUNET_PeerIdentity *id); 273 struct GNUNET_PeerIdentity *id);
275 274
276 275
277/** 276/**
@@ -282,7 +281,7 @@ GNUNET_TESTING_peer_get_identity (struct GNUNET_TESTING_Peer *peer,
282 * #GNUNET_SYSERR on error (i.e. peer already running) 281 * #GNUNET_SYSERR on error (i.e. peer already running)
283 */ 282 */
284int 283int
285GNUNET_TESTING_peer_start (struct GNUNET_TESTING_Peer *peer); 284GNUNET_TESTING_peer_start(struct GNUNET_TESTING_Peer *peer);
286 285
287 286
288/** 287/**
@@ -295,7 +294,7 @@ GNUNET_TESTING_peer_start (struct GNUNET_TESTING_Peer *peer);
295 * #GNUNET_SYSERR on error (i.e. peer not running) 294 * #GNUNET_SYSERR on error (i.e. peer not running)
296 */ 295 */
297int 296int
298GNUNET_TESTING_peer_stop (struct GNUNET_TESTING_Peer *peer); 297GNUNET_TESTING_peer_stop(struct GNUNET_TESTING_Peer *peer);
299 298
300 299
301/** 300/**
@@ -306,7 +305,7 @@ GNUNET_TESTING_peer_stop (struct GNUNET_TESTING_Peer *peer);
306 * @param peer peer to destroy 305 * @param peer peer to destroy
307 */ 306 */
308void 307void
309GNUNET_TESTING_peer_destroy (struct GNUNET_TESTING_Peer *peer); 308GNUNET_TESTING_peer_destroy(struct GNUNET_TESTING_Peer *peer);
310 309
311 310
312/** 311/**
@@ -317,7 +316,7 @@ GNUNET_TESTING_peer_destroy (struct GNUNET_TESTING_Peer *peer);
317 * or upon any error while sending SIGTERM 316 * or upon any error while sending SIGTERM
318 */ 317 */
319int 318int
320GNUNET_TESTING_peer_kill (struct GNUNET_TESTING_Peer *peer); 319GNUNET_TESTING_peer_kill(struct GNUNET_TESTING_Peer *peer);
321 320
322 321
323/** 322/**
@@ -328,7 +327,7 @@ GNUNET_TESTING_peer_kill (struct GNUNET_TESTING_Peer *peer);
328 * or upon any error while waiting 327 * or upon any error while waiting
329 */ 328 */
330int 329int
331GNUNET_TESTING_peer_wait (struct GNUNET_TESTING_Peer *peer); 330GNUNET_TESTING_peer_wait(struct GNUNET_TESTING_Peer *peer);
332 331
333 332
334/** 333/**
@@ -357,9 +356,9 @@ typedef void
357 * upon any error. 356 * upon any error.
358 */ 357 */
359int 358int
360GNUNET_TESTING_peer_stop_async (struct GNUNET_TESTING_Peer *peer, 359GNUNET_TESTING_peer_stop_async(struct GNUNET_TESTING_Peer *peer,
361 GNUNET_TESTING_PeerStopCallback cb, 360 GNUNET_TESTING_PeerStopCallback cb,
362 void *cb_cls); 361 void *cb_cls);
363 362
364 363
365/** 364/**
@@ -372,7 +371,7 @@ GNUNET_TESTING_peer_stop_async (struct GNUNET_TESTING_Peer *peer,
372 * before. 371 * before.
373 */ 372 */
374void 373void
375GNUNET_TESTING_peer_stop_async_cancel (struct GNUNET_TESTING_Peer *peer); 374GNUNET_TESTING_peer_stop_async_cancel(struct GNUNET_TESTING_Peer *peer);
376 375
377 376
378/** 377/**
@@ -406,10 +405,10 @@ typedef void
406 * @return 0 on success, 1 on error 405 * @return 0 on success, 1 on error
407 */ 406 */
408int 407int
409GNUNET_TESTING_peer_run (const char *testdir, 408GNUNET_TESTING_peer_run(const char *testdir,
410 const char *cfgfilename, 409 const char *cfgfilename,
411 GNUNET_TESTING_TestMain tm, 410 GNUNET_TESTING_TestMain tm,
412 void *tm_cls); 411 void *tm_cls);
413 412
414 413
415/** 414/**
@@ -434,11 +433,11 @@ GNUNET_TESTING_peer_run (const char *testdir,
434 * @return 0 on success, 1 on error 433 * @return 0 on success, 1 on error
435 */ 434 */
436int 435int
437GNUNET_TESTING_service_run (const char *testdir, 436GNUNET_TESTING_service_run(const char *testdir,
438 const char *service_name, 437 const char *service_name,
439 const char *cfgfilename, 438 const char *cfgfilename,
440 GNUNET_TESTING_TestMain tm, 439 GNUNET_TESTING_TestMain tm,
441 void *tm_cls); 440 void *tm_cls);
442 441
443 442
444/** 443/**
@@ -455,7 +454,7 @@ GNUNET_TESTING_service_run (const char *testdir,
455 * NULL if argv0 has no '_' 454 * NULL if argv0 has no '_'
456 */ 455 */
457char * 456char *
458GNUNET_TESTING_get_testname_from_underscore (const char *argv0); 457GNUNET_TESTING_get_testname_from_underscore(const char *argv0);
459 458
460 459
461#if 0 /* keep Emacsens' auto-indent happy */ 460#if 0 /* keep Emacsens' auto-indent happy */