Lines Matching defs:pSG
207 static void vboxNetFltFreeBSDMBufToSG(PVBOXNETFLTINS pThis, struct mbuf *m, PINTNETSG pSG,
214 IntNetSgInitTempSegs(pSG, m_length(m, NULL), cSegs, 0 /*cSegsUsed*/);
221 pSG->aSegs[i].cb = m0->m_len;
222 pSG->aSegs[i].pv = mtod(m0, uint8_t *);
223 pSG->aSegs[i].Phys = NIL_RTHCPHYS;
228 if (pSG->cbTotal < 60)
230 pSG->aSegs[i].Phys = NIL_RTHCPHYS;
231 pSG->aSegs[i].pv = (void *)&s_abZero[0];
232 pSG->aSegs[i].cb = 60 - pSG->cbTotal;
233 pSG->cbTotal = 60;
238 pSG->cSegsUsed = i;
244 static struct mbuf * vboxNetFltFreeBSDSGMBufFromSG(PVBOXNETFLTINS pThis, PINTNETSG pSG)
250 if (pSG->cbTotal == 0)
260 for (i = 0; i < pSG->cSegsUsed; i++)
262 error = m_append(m, pSG->aSegs[i].cb, pSG->aSegs[i].pv);
430 PINTNETSG pSG;
452 pSG = RTMemTmpAlloc(RT_OFFSETOF(INTNETSG, aSegs[cSegs]));
453 vboxNetFltFreeBSDMBufToSG(pThis, m, pSG, cSegs, 0);
454 fDropIt = pThis->pSwitchPort->pfnRecv(pThis->pSwitchPort, NULL /* pvIf */, pSG, INTNETTRUNKDIR_WIRE);
455 RTMemTmpFree(pSG);
475 PINTNETSG pSG;
496 pSG = RTMemTmpAlloc(RT_OFFSETOF(INTNETSG, aSegs[cSegs]));
497 vboxNetFltFreeBSDMBufToSG(pThis, m, pSG, cSegs, 0);
498 fDropIt = pThis->pSwitchPort->pfnRecv(pThis->pSwitchPort, NULL /* pvIf */, pSG, INTNETTRUNKDIR_HOST);
499 RTMemTmpFree(pSG);
513 int vboxNetFltPortOsXmit(PVBOXNETFLTINS pThis, void *pvIfData, PINTNETSG pSG, uint32_t fDst)
529 m = vboxNetFltFreeBSDSGMBufFromSG(pThis, pSG);
542 m = vboxNetFltFreeBSDSGMBufFromSG(pThis, pSG);