Changeset 28706 in vbox for trunk/src/VBox/VMM/VMMR0
- Timestamp:
- Apr 25, 2010 3:10:30 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 60578
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/VMMR0.cpp
r28425 r28706 70 70 * Global Variables * 71 71 *******************************************************************************/ 72 /** Pointer to the internal networking service instance. */ 73 PINTNET g_pIntNet = 0; 74 72 /** Drag in necessary library bits. 73 * The runtime lives here (in VMMR0.r0) and VBoxDD*R0.r0 links against us. */ 75 74 PFNRT g_VMMGCDeps[] = 76 75 { … … 110 109 if (RT_SUCCESS(rc)) 111 110 { 112 LogFlow(("ModuleInit: g_pIntNet=%p\n", g_pIntNet)); 113 g_pIntNet = NULL; 114 LogFlow(("ModuleInit: g_pIntNet=%p should be NULL now...\n", g_pIntNet)); 115 rc = INTNETR0Create(&g_pIntNet); 111 rc = IntNetR0Init(); 116 112 if (RT_SUCCESS(rc)) 117 113 { 118 LogFlow(("ModuleInit: returns success. g_pIntNet=%p\n", g_pIntNet));114 LogFlow(("ModuleInit: returns success.\n")); 119 115 return VINF_SUCCESS; 120 116 } 121 117 122 118 /* bail out */ 123 g_pIntNet = NULL;124 119 LogFlow(("ModuleTerm: returns %Rrc\n", rc)); 125 120 #ifdef VBOX_WITH_2X_4GB_ADDR_SPACE … … 150 145 151 146 /* 152 * Destroy the internal networking instance. 153 */ 154 if (g_pIntNet) 155 { 156 INTNETR0Destroy(g_pIntNet); 157 g_pIntNet = NULL; 158 } 147 * Terminate the internal network service. 148 */ 149 IntNetR0Term(); 159 150 160 151 /* 161 152 * PGM (Darwin) and HWACCM global cleanup. 162 * Destroy the GMM and GVMM instances.163 153 */ 164 154 #ifdef VBOX_WITH_2X_4GB_ADDR_SPACE … … 168 158 HWACCMR0Term(); 169 159 160 /* 161 * Destroy the GMM and GVMM instances. 162 */ 170 163 GMMR0Term(); 171 164 GVMMR0Term(); … … 998 991 if (u64Arg || !pReq || !vmmR0IsValidSession(pVM, pReq->pSession, pSession) || idCpu != NIL_VMCPUID) 999 992 return VERR_INVALID_PARAMETER; 1000 if (!g_pIntNet) 1001 return VERR_NOT_SUPPORTED; 1002 return INTNETR0OpenReq(g_pIntNet, pSession, pReq); 993 return IntNetR0OpenReq(pSession, pReq); 1003 994 } 1004 995 … … 1006 997 if (u64Arg || !pReqHdr || !vmmR0IsValidSession(pVM, ((PINTNETIFCLOSEREQ)pReqHdr)->pSession, pSession) || idCpu != NIL_VMCPUID) 1007 998 return VERR_INVALID_PARAMETER; 1008 if (!g_pIntNet) 1009 return VERR_NOT_SUPPORTED; 1010 return INTNETR0IfCloseReq(g_pIntNet, pSession, (PINTNETIFCLOSEREQ)pReqHdr); 999 return IntNetR0IfCloseReq(pSession, (PINTNETIFCLOSEREQ)pReqHdr); 1011 1000 1012 1001 case VMMR0_DO_INTNET_IF_GET_RING3_BUFFER: 1013 1002 if (u64Arg || !pReqHdr || !vmmR0IsValidSession(pVM, ((PINTNETIFGETRING3BUFFERREQ)pReqHdr)->pSession, pSession) || idCpu != NIL_VMCPUID) 1014 1003 return VERR_INVALID_PARAMETER; 1015 if (!g_pIntNet) 1016 return VERR_NOT_SUPPORTED; 1017 return INTNETR0IfGetRing3BufferReq(g_pIntNet, pSession, (PINTNETIFGETRING3BUFFERREQ)pReqHdr); 1004 return IntNetR0IfGetRing3BufferReq(pSession, (PINTNETIFGETRING3BUFFERREQ)pReqHdr); 1018 1005 1019 1006 case VMMR0_DO_INTNET_IF_SET_PROMISCUOUS_MODE: 1020 1007 if (u64Arg || !pReqHdr || !vmmR0IsValidSession(pVM, ((PINTNETIFSETPROMISCUOUSMODEREQ)pReqHdr)->pSession, pSession) || idCpu != NIL_VMCPUID) 1021 1008 return VERR_INVALID_PARAMETER; 1022 if (!g_pIntNet) 1023 return VERR_NOT_SUPPORTED; 1024 return INTNETR0IfSetPromiscuousModeReq(g_pIntNet, pSession, (PINTNETIFSETPROMISCUOUSMODEREQ)pReqHdr); 1009 return IntNetR0IfSetPromiscuousModeReq(pSession, (PINTNETIFSETPROMISCUOUSMODEREQ)pReqHdr); 1025 1010 1026 1011 case VMMR0_DO_INTNET_IF_SET_MAC_ADDRESS: 1027 1012 if (u64Arg || !pReqHdr || !vmmR0IsValidSession(pVM, ((PINTNETIFSETMACADDRESSREQ)pReqHdr)->pSession, pSession) || idCpu != NIL_VMCPUID) 1028 1013 return VERR_INVALID_PARAMETER; 1029 if (!g_pIntNet) 1030 return VERR_NOT_SUPPORTED; 1031 return INTNETR0IfSetMacAddressReq(g_pIntNet, pSession, (PINTNETIFSETMACADDRESSREQ)pReqHdr); 1014 return IntNetR0IfSetMacAddressReq(pSession, (PINTNETIFSETMACADDRESSREQ)pReqHdr); 1032 1015 1033 1016 case VMMR0_DO_INTNET_IF_SET_ACTIVE: 1034 1017 if (u64Arg || !pReqHdr || !vmmR0IsValidSession(pVM, ((PINTNETIFSETACTIVEREQ)pReqHdr)->pSession, pSession) || idCpu != NIL_VMCPUID) 1035 1018 return VERR_INVALID_PARAMETER; 1036 if (!g_pIntNet) 1037 return VERR_NOT_SUPPORTED; 1038 return INTNETR0IfSetActiveReq(g_pIntNet, pSession, (PINTNETIFSETACTIVEREQ)pReqHdr); 1019 return IntNetR0IfSetActiveReq(pSession, (PINTNETIFSETACTIVEREQ)pReqHdr); 1039 1020 1040 1021 case VMMR0_DO_INTNET_IF_SEND: 1041 1022 if (u64Arg || !pReqHdr || !vmmR0IsValidSession(pVM, ((PINTNETIFSENDREQ)pReqHdr)->pSession, pSession) || idCpu != NIL_VMCPUID) 1042 1023 return VERR_INVALID_PARAMETER; 1043 if (!g_pIntNet) 1044 return VERR_NOT_SUPPORTED; 1045 return INTNETR0IfSendReq(g_pIntNet, pSession, (PINTNETIFSENDREQ)pReqHdr); 1024 return IntNetR0IfSendReq(pSession, (PINTNETIFSENDREQ)pReqHdr); 1046 1025 1047 1026 case VMMR0_DO_INTNET_IF_WAIT: 1048 1027 if (u64Arg || !pReqHdr || !vmmR0IsValidSession(pVM, ((PINTNETIFWAITREQ)pReqHdr)->pSession, pSession) || idCpu != NIL_VMCPUID) 1049 1028 return VERR_INVALID_PARAMETER; 1050 if (!g_pIntNet) 1051 return VERR_NOT_SUPPORTED; 1052 return INTNETR0IfWaitReq(g_pIntNet, pSession, (PINTNETIFWAITREQ)pReqHdr); 1029 return IntNetR0IfWaitReq(pSession, (PINTNETIFWAITREQ)pReqHdr); 1053 1030 1054 1031 /*
Note:
See TracChangeset
for help on using the changeset viewer.