Changeset 10740 in vbox for trunk/src/VBox/Devices/Network/testcase
- Timestamp:
- Jul 18, 2008 10:00:56 AM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 33481
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/testcase/tstIntNetR0.cpp
r10733 r10740 43 43 #include <iprt/time.h> 44 44 #include <iprt/asm.h> 45 #include <iprt/getopt.h> 45 46 46 47 … … 381 382 } 382 383 383 int main() 384 { 385 384 int main(int argc, char **argv) 385 { 386 386 /* 387 * Init runtime and create an INTNET instance.387 * Init the runtime and parse arguments. 388 388 */ 389 389 RTR3Init(); 390 RTPrintf("tstIntNetR0: TESTING...\n"); 390 391 static RTOPTIONDEF const s_aOptions[] = 392 { 393 { "--recv-buffer", 'r', RTGETOPT_REQ_UINT32 }, 394 { "--send-buffer", 's', RTGETOPT_REQ_UINT32 }, 395 }; 396 397 uint32_t cbRecv = 32 * _1K; 398 uint32_t cbSend = 1536*2; 399 400 int ch; 401 int iArg = 1; 402 RTOPTIONUNION Value; 403 while ((ch = RTGetOpt(argc,argv, &s_aOptions[0], RT_ELEMENTS(s_aOptions), &iArg, &Value))) 404 switch (ch) 405 { 406 case 'r': 407 cbRecv = Value.u32; 408 break; 409 410 case 's': 411 cbSend = Value.u32; 412 break; 413 414 default: 415 RTPrintf("tstIntNetR0: invalid argument: %s\n", Value.psz); 416 return 1; 417 } 418 if (iArg < argc) 419 { 420 RTPrintf("tstIntNetR0: invalid argument: %s\n", argv[iArg]); 421 return 1; 422 } 423 424 /* 425 * Create an INTNET instance. 426 */ 427 RTPrintf("tstIntNetR0: TESTING cbSend=%d cbRecv=%d ...\n", cbSend, cbRecv); 391 428 PINTNET pIntNet; 392 429 int rc = INTNETR0Create(&pIntNet);
Note:
See TracChangeset
for help on using the changeset viewer.