Changeset 23918 in vbox
- Timestamp:
- Oct 20, 2009 5:25:29 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 53723
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/DrvIntNet.cpp
r23208 r23918 33 33 #include <iprt/asm.h> 34 34 #include <iprt/assert.h> 35 #include <iprt/thread.h> 35 #include <iprt/ctype.h> 36 #include <iprt/net.h> 36 37 #include <iprt/semaphore.h> 37 38 #include <iprt/string.h> 38 39 #include <iprt/time.h> 39 #include <iprt/ ctype.h>40 #include <iprt/thread.h> 40 41 41 42 #include "../Builtins.h" … … 632 633 drvIntNetSetActive(pThis, true /* fActive */); 633 634 } 635 if ( PDMDrvHlpVMTeleportedAndNotFullyResumedYet(pDrvIns) 636 && pThis->pConfigIf) 637 { 638 /* 639 * We've just been teleported and need to drop a hint to the switch 640 * since we're likely to have changed to a different port. We just 641 * push out some ethernet frame that doesn't mean anything to anyone. 642 * For this purpose ethertype 0x801e was chosen since it was registered 643 * to Sun (dunno what it is/was used for though). 644 */ 645 union 646 { 647 RTNETETHERHDR Hdr; 648 uint8_t ab[128]; 649 } Frame; 650 RT_ZERO(Frame); 651 Frame.Hdr.DstMac.au16[0] = 0xffff; 652 Frame.Hdr.DstMac.au16[1] = 0xffff; 653 Frame.Hdr.DstMac.au16[2] = 0xffff; 654 Frame.Hdr.EtherType = RT_H2BE_U16(0x801e); 655 int rc = pThis->pConfigIf->pfnGetMac(pThis->pConfigIf, &Frame.Hdr.SrcMac); 656 if (RT_SUCCESS(rc)) 657 rc = drvIntNetSend(&pThis->INetworkConnector, &Frame, sizeof(Frame)); 658 if (RT_FAILURE(rc)) 659 LogRel(("IntNet#%u: Sending dummy frame failed: %Rrc\n", pDrvIns->iInstance, rc)); 660 } 634 661 } 635 662 … … 792 819 * Check that no-one is attached to us. 793 820 */ 794 AssertMsgReturn(PDMDrvHlpNoAttach(pDrvIns) == VERR_PDM_NO_ATTACHED_DRIVER, 821 AssertMsgReturn(PDMDrvHlpNoAttach(pDrvIns) == VERR_PDM_NO_ATTACHED_DRIVER, 795 822 ("Configuration error: Not possible to attach anything to this driver!\n"), 796 823 VERR_PDM_DRVINS_NO_ATTACH);
Note:
See TracChangeset
for help on using the changeset viewer.