aboutsummaryrefslogtreecommitdiff
path: root/src/ats/test_ats_lib.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/ats/test_ats_lib.h')
-rw-r--r--src/ats/test_ats_lib.h62
1 files changed, 40 insertions, 22 deletions
diff --git a/src/ats/test_ats_lib.h b/src/ats/test_ats_lib.h
index db083d2d7..60b459f79 100644
--- a/src/ats/test_ats_lib.h
+++ b/src/ats/test_ats_lib.h
@@ -33,7 +33,8 @@
33/** 33/**
34 * Commands for the interpreter. 34 * Commands for the interpreter.
35 */ 35 */
36enum CommandCode { 36enum CommandCode
37{
37 /** 38 /**
38 * End the test (passing). 39 * End the test (passing).
39 */ 40 */
@@ -128,7 +129,8 @@ enum CommandCode {
128/** 129/**
129 * Details for the #CMD_ADD_ADDRESS command. 130 * Details for the #CMD_ADD_ADDRESS command.
130 */ 131 */
131struct CommandAddAddress { 132struct CommandAddAddress
133{
132 /** 134 /**
133 * Number of the peer (used to generate PID). 135 * Number of the peer (used to generate PID).
134 */ 136 */
@@ -169,7 +171,8 @@ struct CommandAddAddress {
169/** 171/**
170 * Details for the #CMD_DEL_ADDRESS command. 172 * Details for the #CMD_DEL_ADDRESS command.
171 */ 173 */
172struct CommandDelAddress { 174struct CommandDelAddress
175{
173 /** 176 /**
174 * Label of the corresponding #CMD_ADD_ADDRESS that 177 * Label of the corresponding #CMD_ADD_ADDRESS that
175 * we are now to remove. 178 * we are now to remove.
@@ -181,7 +184,8 @@ struct CommandDelAddress {
181/** 184/**
182 * Details for the #CMD_AWAIT_ADDRESS_SUGGESTION command. 185 * Details for the #CMD_AWAIT_ADDRESS_SUGGESTION command.
183 */ 186 */
184struct CommandAwaitAddressSuggestion { 187struct CommandAwaitAddressSuggestion
188{
185 /** 189 /**
186 * For which peer do we expect a suggestion? 190 * For which peer do we expect a suggestion?
187 */ 191 */
@@ -199,7 +203,8 @@ struct CommandAwaitAddressSuggestion {
199/** 203/**
200 * Details for the #CMD_AWAIT_DISCONNECT_SUGGESTION command. 204 * Details for the #CMD_AWAIT_DISCONNECT_SUGGESTION command.
201 */ 205 */
202struct CommandAwaitDisconnectSuggestion { 206struct CommandAwaitDisconnectSuggestion
207{
203 /** 208 /**
204 * For which peer do we expect the disconnect? 209 * For which peer do we expect the disconnect?
205 */ 210 */
@@ -210,7 +215,8 @@ struct CommandAwaitDisconnectSuggestion {
210/** 215/**
211 * Details for the #CMD_REQUEST_CONNECTION_START command. 216 * Details for the #CMD_REQUEST_CONNECTION_START command.
212 */ 217 */
213struct CommandRequestConnectionStart { 218struct CommandRequestConnectionStart
219{
214 /** 220 /**
215 * Identity of the peer we would like to connect to. 221 * Identity of the peer we would like to connect to.
216 */ 222 */
@@ -227,7 +233,8 @@ struct CommandRequestConnectionStart {
227/** 233/**
228 * Details for the #CMD_REQUEST_CONNECTION_STOP command. 234 * Details for the #CMD_REQUEST_CONNECTION_STOP command.
229 */ 235 */
230struct CommandRequestConnectionStop { 236struct CommandRequestConnectionStop
237{
231 /** 238 /**
232 * Label of the corresponding #CMD_REQUEST_CONNECTION_START that 239 * Label of the corresponding #CMD_REQUEST_CONNECTION_START that
233 * we are now stopping. 240 * we are now stopping.
@@ -239,7 +246,8 @@ struct CommandRequestConnectionStop {
239/** 246/**
240 * Details for the #CMD_AWAIT_ADDRESS_INFORMATION command. 247 * Details for the #CMD_AWAIT_ADDRESS_INFORMATION command.
241 */ 248 */
242struct CommandAwaitAddressInformation { 249struct CommandAwaitAddressInformation
250{
243 /** 251 /**
244 * For which address do we expect information? 252 * For which address do we expect information?
245 * The address is identified by the respective 253 * The address is identified by the respective
@@ -259,7 +267,8 @@ struct CommandAwaitAddressInformation {
259/** 267/**
260 * Details for the #CMD_UPDATE_ADDRESS command. 268 * Details for the #CMD_UPDATE_ADDRESS command.
261 */ 269 */
262struct CommandUpdateAddress { 270struct CommandUpdateAddress
271{
263 /** 272 /**
264 * Label of the addresses's add operation. 273 * Label of the addresses's add operation.
265 */ 274 */
@@ -275,7 +284,8 @@ struct CommandUpdateAddress {
275/** 284/**
276 * Details for the #CMD_ADD_SESSION command. 285 * Details for the #CMD_ADD_SESSION command.
277 */ 286 */
278struct CommandAddSession { 287struct CommandAddSession
288{
279 /** 289 /**
280 * Label of the addresses's add operation. 290 * Label of the addresses's add operation.
281 */ 291 */
@@ -291,7 +301,8 @@ struct CommandAddSession {
291/** 301/**
292 * Details for the #CMD_DEL_SESSION command. 302 * Details for the #CMD_DEL_SESSION command.
293 */ 303 */
294struct CommandDelSession { 304struct CommandDelSession
305{
295 /** 306 /**
296 * Label of the addresses's add operation. 307 * Label of the addresses's add operation.
297 */ 308 */
@@ -302,7 +313,8 @@ struct CommandDelSession {
302/** 313/**
303 * Details for the #CMD_CHANGE_PREFERENCE command. 314 * Details for the #CMD_CHANGE_PREFERENCE command.
304 */ 315 */
305struct CommandChangePreference { 316struct CommandChangePreference
317{
306 /** 318 /**
307 * Identity of the peer we have a preference change towards. 319 * Identity of the peer we have a preference change towards.
308 */ 320 */
@@ -315,7 +327,8 @@ struct CommandChangePreference {
315/** 327/**
316 * Details for the #CMD_PROVIDE_FEEDBACK command. 328 * Details for the #CMD_PROVIDE_FEEDBACK command.
317 */ 329 */
318struct CommandProvideFeedback { 330struct CommandProvideFeedback
331{
319 /** 332 /**
320 * Identity of the peer we have a feedback for. 333 * Identity of the peer we have a feedback for.
321 */ 334 */
@@ -333,7 +346,8 @@ struct CommandProvideFeedback {
333/** 346/**
334 * Details for the #CMD_LIST_ADDRESSES command. 347 * Details for the #CMD_LIST_ADDRESSES command.
335 */ 348 */
336struct CommandListAddresses { 349struct CommandListAddresses
350{
337 /** 351 /**
338 * Identity of the peer we want a list for. 352 * Identity of the peer we want a list for.
339 */ 353 */
@@ -387,7 +401,8 @@ struct CommandListAddresses {
387/** 401/**
388 * Details for the #CMD_RESERVE_BANDWIDTH command. 402 * Details for the #CMD_RESERVE_BANDWIDTH command.
389 */ 403 */
390struct CommandReserveBandwidth { 404struct CommandReserveBandwidth
405{
391 /** 406 /**
392 * For which peer do we reserve bandwidth? 407 * For which peer do we reserve bandwidth?
393 */ 408 */
@@ -417,7 +432,8 @@ struct CommandReserveBandwidth {
417/** 432/**
418 * Details for the #CMD_SLEEP command. 433 * Details for the #CMD_SLEEP command.
419 */ 434 */
420struct CommandSleep { 435struct CommandSleep
436{
421 /** 437 /**
422 * How long should we wait before running the next command? 438 * How long should we wait before running the next command?
423 */ 439 */
@@ -428,7 +444,8 @@ struct CommandSleep {
428/** 444/**
429 * A command for the test case interpreter. 445 * A command for the test case interpreter.
430 */ 446 */
431struct Command { 447struct Command
448{
432 /** 449 /**
433 * Command code to run. 450 * Command code to run.
434 */ 451 */
@@ -442,7 +459,8 @@ struct Command {
442 /** 459 /**
443 * Additional arguments to commands, if any. 460 * Additional arguments to commands, if any.
444 */ 461 */
445 union { 462 union
463 {
446 struct CommandAddAddress add_address; 464 struct CommandAddAddress add_address;
447 465
448 struct CommandDelAddress del_address; 466 struct CommandDelAddress del_address;
@@ -486,9 +504,9 @@ struct Command {
486 * @return 0 on success 504 * @return 0 on success
487 */ 505 */
488int 506int
489TEST_ATS_run(int argc, 507TEST_ATS_run (int argc,
490 char *argv[], 508 char *argv[],
491 struct Command *cmds, 509 struct Command *cmds,
492 struct GNUNET_TIME_Relative timeout); 510 struct GNUNET_TIME_Relative timeout);
493 511
494#endif 512#endif