Lines Matching refs:pSG

1031 DECLINLINE(void) vboxNetLwfWinDumpPacket(PCINTNETSG pSG, const char *cszText)
1035 uint32_t cb = pSG->cbTotal < VBOXNETLWF_PKTDMPSIZE ? pSG->cbTotal : VBOXNETLWF_PKTDMPSIZE;
1036 IntNetSgReadEx(pSG, 0, cb, bPacket);
1156 static void vboxNetLwfWinDestroySG(PINTNETSG pSG)
1158 NdisFreeMemory(pSG, 0, 0);
1159 Log4((__FUNCTION__ ": freed SG 0x%p\n", pSG));
1189 static PNET_BUFFER_LIST vboxNetLwfWinSGtoNB(PVBOXNETLWF_MODULE pModule, PINTNETSG pSG)
1191 AssertReturn(pSG->cSegsUsed >= 1, NULL);
1192 LogFlow(("==>"__FUNCTION__": segments=%d\n", pSG->cSegsUsed));
1195 PINTNETSEG pSeg = pSG->aSegs;
1205 for (int i = 1; i < pSG->cSegsUsed; i++)
1207 pSeg = &pSG->aSegs[i];
1224 pSG->cbTotal);
1237 AssertReturn(pSG->cbTotal < 2048, NULL);
1243 NDIS_STATUS Status = NdisRetreatNetBufferDataStart(pBuffer, pSG->cbTotal, 0 /** @todo DataBackfill */, NULL);
1246 uint8_t *pDst = (uint8_t*)NdisGetDataBuffer(pBuffer, pSG->cbTotal, NULL, 1, 0);
1249 for (int i = 0; i < pSG->cSegsUsed; i++)
1251 NdisMoveMemory(pDst, pSG->aSegs[i].pv, pSG->aSegs[i].cb);
1252 pDst += pSG->aSegs[i].cb;
1260 Log((__FUNCTION__": failed to obtain the buffer pointer (size=%u)\n", pSG->cbTotal));
1261 NdisAdvanceNetBufferDataStart(pBuffer, pSG->cbTotal, false, NULL); /** @todo why bother? */
1268 Log((__FUNCTION__": NdisRetreatNetBufferDataStart failed with 0x%x (size=%u)\n", Status, pSG->cbTotal));
1282 PINTNETSG pSG = (PINTNETSG)NdisAllocateMemoryWithTagPriority(pModule->hFilter,
1286 AssertReturn(pSG, pSG);
1287 Log4((__FUNCTION__ ": allocated SG 0x%p\n", pSG));
1288 IntNetSgInitTempSegs(pSG, cbPacket /*cbTotal*/, cSegs, cSegs /*cSegsUsed*/);
1315 pSG->aSegs[cSegs].pv = pSrc;
1316 pSG->aSegs[cSegs].cb = cbSrc;
1317 pSG->aSegs[cSegs].Phys = NIL_RTHCPHYS;
1322 Assert(cSegs <= pSG->cSegsAlloc);
1326 vboxNetLwfWinDestroySG(pSG);
1327 pSG = NULL;
1332 Assert(pSG->cSegsUsed == cSegs);
1334 return pSG;
1389 PINTNETSG pSG = vboxNetLwfWinNBtoSG(pModuleCtx, pBuf);
1390 if (pSG)
1392 vboxNetLwfWinDumpPacket(pSG, (fSrc & INTNETTRUNKDIR_WIRE)?"intnet <-- wire":"intnet <-- host");
1395 if (pModuleCtx->pNetFlt->pSwitchPort->pfnRecv(pModuleCtx->pNetFlt->pSwitchPort, NULL, pSG, fSrc))
1399 vboxNetLwfWinDestroySG(pSG);
2054 int vboxNetFltPortOsXmit(PVBOXNETFLTINS pThis, void *pvIfData, PINTNETSG pSG, uint32_t fDst)
2076 vboxNetLwfWinDumpPacket(pSG, pszDir);
2096 PNET_BUFFER_LIST pBufList = vboxNetLwfWinSGtoNB(pModule, pSG);
2110 PNET_BUFFER_LIST pBufList = vboxNetLwfWinSGtoNB(pModule, pSG);