- Timestamp:
- Mar 2, 2009 4:23:00 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 43595
- Location:
- trunk/src/VBox
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/SrvIntNetR0.cpp
r17219 r17256 3703 3703 break; 3704 3704 case kIntNetTrunkType_NetAdp: 3705 #if defined(RT_OS_DARWIN) && !defined(VBOXNETADP_DO_NOT_USE_NETFLT) 3706 pszName = "VBoxNetFlt"; 3707 #else /* VBOXNETADP_DO_NOT_USE_NETFLT */ 3705 3708 pszName = "VBoxNetAdp"; 3709 #endif /* VBOXNETADP_DO_NOT_USE_NETFLT */ 3706 3710 break; 3707 3711 case kIntNetTrunkType_SrvNat: -
trunk/src/VBox/HostDrivers/VBoxNetAdp/Makefile.kmk
r17025 r17256 44 44 VBoxNetAdp_SOURCES.solaris = \ 45 45 solaris/VBoxNetAdp-solaris.c 46 VBoxNetAdp_SOURCES = \ 47 VBoxNetAdp.c 46 VBoxNetAdp_SOURCES = 47 #VBoxNetAdp_SOURCES = \ 48 # VBoxNetAdp.c 48 49 VBoxNetAdp_LIBS.solaris += \ 49 50 $(PATH_LIB)/RuntimeR0Drv$(VBOX_SUFF_LIB) -
trunk/src/VBox/HostDrivers/VBoxNetAdp/VBoxNetAdpInternal.h
r17095 r17256 65 65 */ 66 66 67 #ifdef VBOXANETADP_DO_NOT_USE_NETFLT 67 68 enum VBoxNetAdpState 68 69 { … … 74 75 }; 75 76 typedef enum VBoxNetAdpState VBOXNETADPSTATE; 77 #endif /* VBOXANETADP_DO_NOT_USE_NETFLT */ 76 78 77 79 struct VBoxNetAdapter 78 80 { 81 #ifdef VBOXANETADP_DO_NOT_USE_NETFLT 79 82 /** The spinlock protecting the state variables and host interface handle. */ 80 83 RTSPINLOCK hSpinlock; … … 103 106 /** Pointer to the globals. */ 104 107 PVBOXNETADPGLOBALS pGlobals; 108 /** The event that is signaled when we go idle and that pfnWaitForIdle blocks on. */ 109 RTSEMEVENT hEventIdle; 110 #endif /* !VBOXANETADP_DO_NOT_USE_NETFLT */ 105 111 /** Corresponds to the digit at the end of device name. */ 106 112 uint8_t uUnit; 107 /** The event that is signaled when we go idle and that pfnWaitForIdle blocks on. */108 RTSEMEVENT hEventIdle;109 113 110 114 union … … 148 152 typedef VBOXNETADP *PVBOXNETADP; 149 153 154 #ifdef VBOXANETADP_DO_NOT_USE_NETFLT 150 155 /** 151 156 * The global data of the VBox filter driver. … … 303 308 304 309 /** @} */ 310 #endif /* !VBOXANETADP_DO_NOT_USE_NETFLT */ 305 311 306 312 -
trunk/src/VBox/HostDrivers/VBoxNetAdp/darwin/VBoxNetAdp-darwin.cpp
r17184 r17256 101 101 * The (common) global data. 102 102 */ 103 #ifdef VBOXANETADP_DO_NOT_USE_NETFLT 103 104 static VBOXNETADPGLOBALS g_VBoxNetAdpGlobals; 105 106 #else /* !VBOXANETADP_DO_NOT_USE_NETFLT */ 107 108 /** 109 * Generate a suitable MAC address. 110 * 111 * @param pThis The instance. 112 * @param pMac Where to return the MAC address. 113 */ 114 DECLHIDDEN(void) vboxNetAdpComposeMACAddress(PVBOXNETADP pThis, PRTMAC pMac) 115 { 116 #if 0 /* Use a locally administered version of the OUI we use for the guest NICs. */ 117 pMac->au8[0] = 0x08 | 2; 118 pMac->au8[1] = 0x00; 119 pMac->au8[2] = 0x27; 120 #else /* this is what \0vb comes down to. It seems to be unassigned atm. */ 121 pMac->au8[0] = 0; 122 pMac->au8[1] = 0x76; 123 pMac->au8[2] = 0x62; 124 #endif 125 126 pMac->au8[3] = 0; /* pThis->uUnit >> 16; */ 127 pMac->au8[4] = 0; /* pThis->uUnit >> 8; */ 128 pMac->au8[5] = pThis->uUnit; 129 } 130 #endif /* !VBOXANETADP_DO_NOT_USE_NETFLT */ 104 131 105 132 … … 117 144 } 118 145 146 #ifdef VBOXANETADP_DO_NOT_USE_NETFLT 119 147 /** 120 148 * Reads and retains the host interface handle. … … 440 468 } 441 469 442 470 #endif /* VBOXANETADP_DO_NOT_USE_NETFLT */ 443 471 static errno_t vboxNetAdpDarwinOutput(ifnet_t pIface, mbuf_t pMBuf) 444 472 { 473 #ifdef VBOXANETADP_DO_NOT_USE_NETFLT 445 474 PVBOXNETADP pThis = VBOXNETADP_FROM_IFACE(pIface); 446 475 Assert(pThis); … … 457 486 vboxNetAdpCancelReceive(pThis); 458 487 } 488 #endif /* VBOXANETADP_DO_NOT_USE_NETFLT */ 459 489 mbuf_freem_list(pMBuf); 460 490 return 0; … … 508 538 509 539 540 #ifdef VBOXANETADP_DO_NOT_USE_NETFLT 510 541 511 542 int vboxNetAdpPortOsXmit(PVBOXNETADP pThis, PINTNETSG pSG, uint32_t fDst) … … 587 618 return VINF_SUCCESS; 588 619 } 620 #else /* !VBOXANETADP_DO_NOT_USE_NETFLT */ 621 VBOXNETADP g_vboxnet0; 622 623 #endif /* !VBOXANETADP_DO_NOT_USE_NETFLT */ 589 624 590 625 … … 725 760 * for establishing the connect to the support driver. 726 761 */ 762 #ifdef VBOXANETADP_DO_NOT_USE_NETFLT 727 763 memset(&g_VBoxNetAdpGlobals, 0, sizeof(g_VBoxNetAdpGlobals)); 728 764 rc = vboxNetAdpInitGlobals(&g_VBoxNetAdpGlobals); 765 #else /* !VBOXANETADP_DO_NOT_USE_NETFLT */ 766 RTMAC Mac; 767 vboxNetAdpOsInit(&g_vboxnet0); 768 vboxNetAdpComposeMACAddress(&g_vboxnet0, &Mac); 769 rc = vboxNetAdpOsCreate(&g_vboxnet0, &Mac); 770 #endif /* !VBOXANETADP_DO_NOT_USE_NETFLT */ 729 771 if (RT_SUCCESS(rc)) 730 772 { … … 739 781 printf("VBoxAdpDrv: failed to initialize IPRT (rc=%d)\n", rc); 740 782 783 #ifdef VBOXANETADP_DO_NOT_USE_NETFLT 741 784 memset(&g_VBoxNetAdpGlobals, 0, sizeof(g_VBoxNetAdpGlobals)); 785 #endif /* VBOXANETADP_DO_NOT_USE_NETFLT */ 742 786 return KMOD_RETURN_FAILURE; 743 787 } … … 756 800 * tracking for us! 757 801 */ 802 #ifdef VBOXANETADP_DO_NOT_USE_NETFLT 758 803 int rc = vboxNetAdpTryDeleteGlobals(&g_VBoxNetAdpGlobals); 759 804 if (RT_FAILURE(rc)) … … 767 812 */ 768 813 memset(&g_VBoxNetAdpGlobals, 0, sizeof(g_VBoxNetAdpGlobals)); 814 #else /* !VBOXANETADP_DO_NOT_USE_NETFLT */ 815 vboxNetAdpOsDestroy(&g_vboxnet0); 816 #endif /* !VBOXANETADP_DO_NOT_USE_NETFLT */ 769 817 770 818 RTR0Term();
Note:
See TracChangeset
for help on using the changeset viewer.