diff options
Diffstat (limited to 'src/ats/test_ats_lib.h')
-rw-r--r-- | src/ats/test_ats_lib.h | 42 |
1 files changed, 40 insertions, 2 deletions
diff --git a/src/ats/test_ats_lib.h b/src/ats/test_ats_lib.h index 590aac750..099fa9b45 100644 --- a/src/ats/test_ats_lib.h +++ b/src/ats/test_ats_lib.h | |||
@@ -111,9 +111,13 @@ enum CommandCode | |||
111 | * Obtain list of all addresses, testing | 111 | * Obtain list of all addresses, testing |
112 | * #GNUNET_ATS_performance_list_addresses(). | 112 | * #GNUNET_ATS_performance_list_addresses(). |
113 | */ | 113 | */ |
114 | CMD_LIST_ADDRESSES | 114 | CMD_LIST_ADDRESSES, |
115 | 115 | ||
116 | /* TODO: reserve bandwidth */ | 116 | /** |
117 | * Reserve bandwidth, testing | ||
118 | * #GNUNET_ATS_reserve_bandwidth(). | ||
119 | */ | ||
120 | CMD_RESERVE_BANDWIDTH | ||
117 | 121 | ||
118 | }; | 122 | }; |
119 | 123 | ||
@@ -399,6 +403,38 @@ struct CommandListAddresses | |||
399 | 403 | ||
400 | 404 | ||
401 | /** | 405 | /** |
406 | * Details for the #CMD_RESERVE_BANDWIDTH command. | ||
407 | */ | ||
408 | struct CommandReserveBandwidth | ||
409 | { | ||
410 | /** | ||
411 | * For which peer do we reserve bandwidth? | ||
412 | */ | ||
413 | unsigned int pid; | ||
414 | |||
415 | /** | ||
416 | * How much should we try to reserve? | ||
417 | */ | ||
418 | int32_t amount; | ||
419 | |||
420 | /** | ||
421 | * Should we expect this to work or fail? | ||
422 | * #GNUNET_YES: must work | ||
423 | * #GNUNET_NO: may work or fail | ||
424 | * #GNUNET_SYSERR: must fail | ||
425 | */ | ||
426 | int expected_result; | ||
427 | |||
428 | /** | ||
429 | * Location where we store the return value from | ||
430 | * #GNUNET_ATS_reserve_bandwidth(). | ||
431 | */ | ||
432 | struct GNUNET_ATS_ReservationContext *rc; | ||
433 | |||
434 | }; | ||
435 | |||
436 | |||
437 | /** | ||
402 | * A command for the test case interpreter. | 438 | * A command for the test case interpreter. |
403 | */ | 439 | */ |
404 | struct Command | 440 | struct Command |
@@ -444,6 +480,8 @@ struct Command | |||
444 | 480 | ||
445 | struct CommandListAddresses list_addresses; | 481 | struct CommandListAddresses list_addresses; |
446 | 482 | ||
483 | struct CommandReserveBandwidth reserve_bandwidth; | ||
484 | |||
447 | } details; | 485 | } details; |
448 | 486 | ||
449 | }; | 487 | }; |