Changeset 26580 in vbox for trunk/src/VBox/Devices/Network
- Timestamp:
- Feb 16, 2010 1:59:48 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 57763
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/slirp/slirp_state.h
r26495 r26580 504 504 # define DO_TCP_OUTPUT(data, sotcb) \ 505 505 do { \ 506 PRTREQ pReq = NULL;\506 PRTREQ pReq; \ 507 507 int rc; \ 508 rc = RTReqAlloc((data)->pReqQueue, &pReq, RTREQTYPE_INTERNAL); \ 509 AssertRC(rc); \ 510 pReq->u.Internal.pfn = (PFNRT)tcp_output; \ 511 pReq->u.Internal.cArgs = 2; \ 512 pReq->u.Internal.aArgs[0] = (uintptr_t)(data); \ 513 pReq->u.Internal.aArgs[1] = (uintptr_t)(sotcb); \ 514 pReq->fFlags = RTREQFLAGS_VOID; \ 515 rc = RTReqQueue(pReq, 0); \ 508 rc = RTReqCallVoid((data)->pReqQueue, &pReq, 0 /*cMillies*/, \ 509 (PFNRT)tcp_output 2, data, sotcb); \ 516 510 if (RT_LIKELY(rc) == VERR_TIMEOUT) \ 517 511 { \ … … 528 522 # define DO_TCP_INPUT(data, mbuf, size, so) \ 529 523 do { \ 530 PRTREQ pReq = NULL; \531 524 int rc; \ 532 rc = RTReqAlloc((data)->pReqQueue, &pReq, RTREQTYPE_INTERNAL); \ 533 AssertReleaseRC(rc); \ 534 pReq->u.Internal.pfn = (PFNRT)tcp_input; \ 535 pReq->u.Internal.cArgs = 4; \ 536 pReq->u.Internal.aArgs[0] = (uintptr_t)(data); \ 537 pReq->u.Internal.aArgs[1] = (uintptr_t)(mbuf); \ 538 pReq->u.Internal.aArgs[2] = (uintptr_t)(size); \ 539 pReq->u.Internal.aArgs[3] = (uintptr_t)(so); \ 540 pReq->fFlags = RTREQFLAGS_VOID|RTREQFLAGS_NO_WAIT; \ 541 rc = RTReqQueue(pReq, 0); \ 525 rc = RTReqCallEx((data)->pReqQueue, NULL, 0 /*cMillies*/, \ 526 RTREQFLAGS_VOID | RTREQFLAGS_NO_WAIT, \ 527 (PFNRT)tcp_input, 4, data, mbuf, size, so); \ 542 528 AssertReleaseRC(rc); \ 543 529 } while(0) … … 545 531 # define DO_TCP_CONNECT(data, so) \ 546 532 do { \ 547 PRTREQ pReq = NULL;\533 PRTREQ pReq; \ 548 534 int rc; \ 549 rc = RTReqAlloc((data)->pReqQueue, &pReq, RTREQTYPE_INTERNAL); \ 550 AssertReleaseRC(rc); \ 551 pReq->u.Internal.pfn = (PFNRT)tcp_connect; \ 552 pReq->u.Internal.cArgs = 2; \ 553 pReq->u.Internal.aArgs[0] = (uintptr_t)(data); \ 554 pReq->u.Internal.aArgs[1] = (uintptr_t)(so); \ 555 pReq->fFlags = RTREQFLAGS_VOID; \ 556 rc = RTReqQueue(pReq, 0); /* don't wait, we have to release lock before*/ \ 535 rc = RTReqCallVoid((data)->pReqQueue, &pReq, 0 /*cMillies*/, \ 536 (PFNRT)tcp_connect, 2, data, so); \ 557 537 if (RT_LIKELY(rc) == VERR_TIMEOUT) \ 558 538 { \ … … 569 549 # define DO_SOREAD(ret, data, so, ifclose) \ 570 550 do { \ 571 PRTREQ pReq = NULL;\551 PRTREQ pReq; \ 572 552 int rc; \ 573 rc = RTReqAlloc((data)->pReqQueue, &pReq, RTREQTYPE_INTERNAL); \ 574 AssertReleaseRC(rc); \ 575 pReq->u.Internal.pfn = (PFNRT)soread_queue; \ 576 pReq->u.Internal.cArgs = 4; \ 577 pReq->u.Internal.aArgs[0] = (uintptr_t)(data); \ 578 pReq->u.Internal.aArgs[1] = (uintptr_t)(so); \ 579 pReq->u.Internal.aArgs[2] = (uintptr_t)(ifclose); \ 580 pReq->u.Internal.aArgs[3] = (uintptr_t)&(ret); \ 581 pReq->fFlags = RTREQFLAGS_VOID; \ 582 rc = RTReqQueue(pReq, 0); /* don't wait, we have to release lock before*/ \ 553 rc = RTReqCallVoid((data)->pReqQueue, &pReq, 0 /*cMillies*/, \ 554 (PFNRT)soread_queue, 4, \ 555 data, so, ifclose, &(ret)); \ 583 556 if (RT_LIKELY(rc) == VERR_TIMEOUT) \ 584 557 { \ … … 595 568 # define DO_SOWRITE(ret, data, so) \ 596 569 do { \ 597 PRTREQ pReq = NULL;\570 PRTREQ pReq; \ 598 571 int rc; \ 599 rc = RTReqAlloc((data)->pReqQueue, &pReq, RTREQTYPE_INTERNAL); \ 600 AssertReleaseRC(rc); \ 601 pReq->u.Internal.pfn = (PFNRT)sowrite; \ 602 pReq->u.Internal.cArgs = 2; \ 603 pReq->u.Internal.aArgs[0] = (uintptr_t)(data); \ 604 pReq->u.Internal.aArgs[1] = (uintptr_t)(so); \ 605 pReq->fFlags = RTREQFLAGS_RETURN_MASK; \ 606 rc = RTReqQueue(pReq, 0); /* don't wait, we have to release lock before*/ \ 572 rc = RTReqCall((data)->pReqQueue, &pReq, 0 /*cMillies*/, \ 573 (PFNRT)sowrite, 2, data, so); \ 607 574 if (RT_LIKELY(rc) == VERR_TIMEOUT) \ 608 575 { \ … … 619 586 # define DO_SORECFROM(data, so) \ 620 587 do { \ 621 PRTREQ pReq = NULL;\588 PRTREQ pReq; \ 622 589 int rc; \ 623 rc = RTReqAlloc((data)->pReqQueue, &pReq, RTREQTYPE_INTERNAL); \ 624 AssertReleaseRC(rc); \ 625 pReq->u.Internal.pfn = (PFNRT)sorecvfrom; \ 626 pReq->u.Internal.cArgs = 2; \ 627 pReq->u.Internal.aArgs[0] = (uintptr_t)(data); \ 628 pReq->u.Internal.aArgs[1] = (uintptr_t)(so); \ 629 pReq->fFlags = RTREQFLAGS_VOID; \ 630 rc = RTReqQueue(pReq, 0); \ 590 rc = RTReqCallVoid((data)->pReqQueue, &pReq, 0 /*cMillies */, \ 591 (PFNRT)sorecvfrom, 2, data, so); \ 631 592 if (RT_LIKELY(rc) == VERR_TIMEOUT) \ 632 593 { \ … … 643 604 # define DO_UDP_DETACH(data, so, so_next) \ 644 605 do { \ 645 PRTREQ pReq = NULL;\606 PRTREQ pReq; \ 646 607 int rc; \ 647 rc = RTReqAlloc((data)->pReqQueue, &pReq, RTREQTYPE_INTERNAL); \ 648 AssertReleaseRC(rc); \ 649 pReq->u.Internal.pfn = (PFNRT)udp_detach; \ 650 pReq->u.Internal.cArgs = 2; \ 651 pReq->u.Internal.aArgs[0] = (uintptr_t)(data); \ 652 pReq->u.Internal.aArgs[1] = (uintptr_t)(so); \ 653 pReq->fFlags = RTREQFLAGS_VOID; \ 654 rc = RTReqQueue(pReq, 0); /* don't wait, we have to release lock before*/ \ 608 rc = RTReqCallVoid((data)->pReqQueue, &pReq, 0 /* cMillies*/, \ 609 (PFNRT)udp_detach, 2, data, so); \ 655 610 if (RT_LIKELY(rc) == VERR_TIMEOUT) \ 656 611 { \
Note:
See TracChangeset
for help on using the changeset viewer.