Lines Matching defs:pIntNet

370     struct INTNET          *pIntNet;
468 * @param pIntNet The pointer to the internal network instance (global).
471 DECLINLINE(bool) intnetR0NetworkIsValid(PINTNET pIntNet, PINTNETNETWORK pNetwork)
473 for (PINTNETNETWORK pCurr = pIntNet->pNetworks; pCurr; pCurr = pCurr->pNext)
3848 PINTNET pIntNet = g_pIntNet;
3849 AssertPtrReturn(pIntNet, VERR_INVALID_PARAMETER);
3850 AssertReturn(pIntNet->u32Magic, VERR_INVALID_MAGIC);
3852 PINTNETIF pIf = (PINTNETIF)RTHandleTableLookupWithCtx(pIntNet->hHtIfs, hIf, pSession);
3983 PINTNET pIntNet = g_pIntNet;
3984 AssertPtrReturn(pIntNet, VERR_INVALID_PARAMETER);
3985 AssertReturn(pIntNet->u32Magic, VERR_INVALID_MAGIC);
3994 PINTNETIF pIf = (PINTNETIF)RTHandleTableLookupWithCtx(pIntNet->hHtIfs, hIf, pSession);
4003 int rc = RTSemMutexRequest(pIntNet->hMtxCreateOpenDestroy, RT_INDEFINITE_WAIT);
4011 rc = RTSemMutexRelease(pIntNet->hMtxCreateOpenDestroy);
4050 PINTNET pIntNet = g_pIntNet;
4051 AssertPtrReturn(pIntNet, VERR_INVALID_PARAMETER);
4052 AssertReturn(pIntNet->u32Magic, VERR_INVALID_MAGIC);
4056 PINTNETIF pIf = (PINTNETIF)RTHandleTableLookupWithCtx(pIntNet->hHtIfs, hIf, pSession);
4093 PINTNET pIntNet = g_pIntNet;
4094 AssertPtrReturn(pIntNet, VERR_INVALID_PARAMETER);
4095 AssertReturn(pIntNet->u32Magic, VERR_INVALID_MAGIC);
4097 PINTNETIF pIf = (PINTNETIF)RTHandleTableLookupWithCtx(pIntNet->hHtIfs, hIf, pSession);
4193 PINTNET pIntNet = g_pIntNet;
4194 AssertPtrReturn(pIntNet, VERR_INVALID_PARAMETER);
4195 AssertReturn(pIntNet->u32Magic, VERR_INVALID_MAGIC);
4198 PINTNETIF pIf = (PINTNETIF)RTHandleTableLookupWithCtx(pIntNet->hHtIfs, hIf, pSession);
4368 PINTNET pIntNet = g_pIntNet;
4369 AssertPtrReturn(pIntNet, VERR_INVALID_PARAMETER);
4370 AssertReturn(pIntNet->u32Magic, VERR_INVALID_MAGIC);
4372 PINTNETIF pIf = (PINTNETIF)RTHandleTableLookupWithCtx(pIntNet->hHtIfs, hIf, pSession);
4392 int rc = RTSemMutexRequest(pIntNet->hMtxCreateOpenDestroy, RT_INDEFINITE_WAIT);
4404 RTSemMutexRelease(pIntNet->hMtxCreateOpenDestroy);
4417 * @param pIntNet The internal networking instance.
4446 PINTNET pIntNet = g_pIntNet;
4447 AssertPtrReturn(pIntNet, VERR_INVALID_PARAMETER);
4448 AssertReturn(pIntNet->u32Magic, VERR_INVALID_MAGIC);
4450 PINTNETIF pIf = (PINTNETIF)RTHandleTableLookupWithCtx(pIntNet->hHtIfs, hIf, pSession);
4532 PINTNET pIntNet = g_pIntNet;
4533 AssertPtrReturn(pIntNet, VERR_INVALID_PARAMETER);
4534 AssertReturn(pIntNet->u32Magic, VERR_INVALID_MAGIC);
4536 PINTNETIF pIf = (PINTNETIF)RTHandleTableLookupWithCtx(pIntNet->hHtIfs, hIf, pSession);
4594 * @param pIntNet The instance handle.
4605 PINTNET pIntNet = g_pIntNet;
4606 AssertPtrReturn(pIntNet, VERR_INVALID_PARAMETER);
4607 AssertReturn(pIntNet->u32Magic, VERR_INVALID_MAGIC);
4609 PINTNETIF pIf = (PINTNETIF)RTHandleTableFreeWithCtx(pIntNet->hHtIfs, hIf, pSession);
4666 PINTNET pIntNet = (PINTNET)pvUser2;
4667 Log(("intnetR0IfDestruct: pvObj=%p pIf=%p pIntNet=%p hIf=%RX32\n", pvObj, pIf, pIntNet, pIf->hIf));
4675 RTSemMutexRequest(pIntNet->hMtxCreateOpenDestroy, RT_INDEFINITE_WAIT);
4685 void *pvObj2 = RTHandleTableFreeWithCtx(pIntNet->hHtIfs, hIf, pIf->pSession); NOREF(pvObj2);
4757 RTSemMutexRelease(pIntNet->hMtxCreateOpenDestroy);
4934 intnetR0IfDestruct, pIf, pNetwork->pIntNet);
4937 rc = RTHandleTableAllocWithCtx(pNetwork->pIntNet->hHtIfs, pIf, pSession, (uint32_t *)&pIf->hIf);
5120 PINTNET pIntNet = pNetwork->pIntNet;
5121 Assert(pNetwork->pIntNet);
5132 RTSemMutexRequest(pIntNet->hMtxCreateOpenDestroy, RT_INDEFINITE_WAIT);
5134 if (intnetR0NetworkIsValid(pIntNet, pNetwork))
5152 RTSemMutexRelease(pIntNet->hMtxCreateOpenDestroy);
5628 PINTNET pIntNet = (PINTNET)pvUser2;
5629 Log(("intnetR0NetworkDestruct: pvObj=%p pNetwork=%p pIntNet=%p %s\n", pvObj, pNetwork, pIntNet, pNetwork->szName));
5630 Assert(pNetwork->pIntNet == pIntNet);
5633 RTSemMutexRequest(pIntNet->hMtxCreateOpenDestroy, RT_INDEFINITE_WAIT);
5708 PINTNETNETWORK pPrev = pIntNet->pNetworks;
5710 pIntNet->pNetworks = pNetwork->pNext;
5735 RTSemMutexRelease(pIntNet->hMtxCreateOpenDestroy);
5904 * @param pIntNet The instance data.
5912 static int intnetR0OpenNetwork(PINTNET pIntNet, PSUPDRVSESSION pSession, const char *pszNetwork, INTNETTRUNKTYPE enmTrunkType,
5915 LogFlow(("intnetR0OpenNetwork: pIntNet=%p pSession=%p pszNetwork=%p:{%s} enmTrunkType=%d pszTrunk=%p:{%s} fFlags=%#x ppNetwork=%p\n",
5916 pIntNet, pSession, pszNetwork, pszNetwork, enmTrunkType, pszTrunk, pszTrunk, fFlags, ppNetwork));
5919 AssertPtr(pIntNet);
5935 pCur = pIntNet->pNetworks;
6000 * @param pIntNet The instance data.
6011 static int intnetR0CreateNetwork(PINTNET pIntNet, PSUPDRVSESSION pSession, const char *pszNetwork, INTNETTRUNKTYPE enmTrunkType,
6014 LogFlow(("intnetR0CreateNetwork: pIntNet=%p pSession=%p pszNetwork=%p:{%s} enmTrunkType=%d pszTrunk=%p:{%s} fFlags=%#x ppNetwork=%p\n",
6015 pIntNet, pSession, pszNetwork, pszNetwork, enmTrunkType, pszTrunk, pszTrunk, fFlags, ppNetwork));
6018 AssertPtr(pIntNet);
6083 pNetwork->pIntNet = pIntNet;
6117 pNetwork->pvObj = SUPR0ObjRegister(pSession, SUPDRVOBJTYPE_INTERNAL_NETWORK, intnetR0NetworkDestruct, pNetwork, pIntNet);
6120 pNetwork->pNext = pIntNet->pNetworks;
6121 pIntNet->pNetworks = pNetwork;
6190 PINTNET pIntNet = g_pIntNet;
6191 AssertPtrReturn(pIntNet, VERR_INVALID_PARAMETER);
6192 AssertReturn(pIntNet->u32Magic, VERR_INVALID_MAGIC);
6244 int rc = RTSemMutexRequest(pIntNet->hMtxCreateOpenDestroy, RT_INDEFINITE_WAIT);
6253 rc = intnetR0OpenNetwork(pIntNet, pSession, pszNetwork, enmTrunkType, pszTrunk, fFlags, &pNetwork);
6267 rc = intnetR0CreateNetwork(pIntNet, pSession, pszNetwork, enmTrunkType, pszTrunk, fFlags, &pNetwork);
6276 RTSemMutexRelease(pIntNet->hMtxCreateOpenDestroy);
6311 PINTNET pIntNet = g_pIntNet;
6312 if (!pIntNet)
6314 AssertPtrReturn(pIntNet, 0);
6315 AssertReturn(pIntNet->u32Magic == INTNET_MAGIC, 0);
6320 int rc = RTSemMutexRequest(pIntNet->hMtxCreateOpenDestroy, RT_INDEFINITE_WAIT);
6325 for (PINTNETNETWORK pCur = pIntNet->pNetworks; pCur; pCur = pCur->pNext)
6328 RTSemMutexRelease(pIntNet->hMtxCreateOpenDestroy);
6345 PINTNET pIntNet = g_pIntNet;
6347 if (!pIntNet)
6349 AssertPtrReturnVoid(pIntNet);
6350 AssertReturnVoid(pIntNet->u32Magic == INTNET_MAGIC);
6355 AssertReturnVoid(ASMAtomicCmpXchgU32(&pIntNet->u32Magic, ~INTNET_MAGIC, INTNET_MAGIC));
6356 Assert(pIntNet->pNetworks == NULL);
6357 if (pIntNet->hMtxCreateOpenDestroy != NIL_RTSEMMUTEX)
6359 RTSemMutexDestroy(pIntNet->hMtxCreateOpenDestroy);
6360 pIntNet->hMtxCreateOpenDestroy = NIL_RTSEMMUTEX;
6362 if (pIntNet->hHtIfs != NIL_RTHANDLETABLE)
6365 RTHandleTableDestroy(pIntNet->hHtIfs, NULL, NULL);
6366 pIntNet->hHtIfs = NIL_RTHANDLETABLE;
6369 RTMemFree(pIntNet);
6382 PINTNET pIntNet = (PINTNET)RTMemAllocZ(sizeof(*pIntNet));
6383 if (pIntNet)
6385 //pIntNet->pNetworks = NULL;
6387 rc = RTSemMutexCreate(&pIntNet->hMtxCreateOpenDestroy);
6390 rc = RTHandleTableCreateEx(&pIntNet->hHtIfs, RTHANDLETABLE_FLAGS_LOCKED | RTHANDLETABLE_FLAGS_CONTEXT,
6394 pIntNet->u32Magic = INTNET_MAGIC;
6395 g_pIntNet = pIntNet;
6396 LogFlow(("IntNetR0Init: returns VINF_SUCCESS pIntNet=%p\n", pIntNet));
6400 RTSemMutexDestroy(pIntNet->hMtxCreateOpenDestroy);
6402 RTMemFree(pIntNet);