VirtualBox

Changeset 28213 in vbox


Ignore:
Timestamp:
Apr 12, 2010 3:15:51 PM (15 years ago)
Author:
vboxsync
Message:

PDMINETWORKUP,Drv*,Dev*: Eliminated pfnSendDeprecated.

Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/pdmnetifs.h

    r27973 r28213  
    270270    /** @todo Add a callback that informs the driver chain about MAC address changes if we ever implement that.  */
    271271
    272     /**
    273      * Send data to the network.
    274      *
    275      * @returns VBox status code.
    276      * @param   pInterface      Pointer to the interface structure containing the called function pointer.
    277      * @param   pvBuf           Data to send.
    278      * @param   cb              Number of bytes to send.
    279      * @thread  EMT ??
    280      * @deprecated
    281      */
    282     DECLR3CALLBACKMEMBER(int, pfnSendDeprecated,(PPDMINETWORKUP pInterface, const void *pvBuf, size_t cb));
    283 
    284 
    285272} PDMINETWORKUP;
    286273/** PDMINETWORKUP interface ID. */
    287 #define PDMINETWORKUP_IID                       "0e603bc1-3016-41b4-b521-15c038cda16a"
     274#define PDMINETWORKUP_IID                       "3415a37c-4415-43e8-be18-26d9fd2c26a8"
    288275
    289276
  • trunk/src/VBox/Devices/Network/DevINIP.cpp

    r26305 r28213  
    220220                                            struct pbuf *p)
    221221{
    222     uint8_t aFrame[DEVINIP_MAX_FRAME], *pbBuf;
    223     size_t cbBuf;
    224     struct pbuf *q;
    225222    int rc = VINF_SUCCESS;
    226223
     
    230227
    231228    /* Silently ignore packets being sent while lwIP isn't set up. */
    232     if (!g_pDevINIPData)
    233         goto out;
    234 
     229    if (g_pDevINIPData)
     230    {
     231        PPDMSCATTERGATHER pSgBuf;
     232        rc = g_pDevINIPData->pDrv->pfnAllocBuf(g_pDevINIPData->pDrv, DEVINIP_MAX_FRAME, NULL /*pGso*/, &pSgBuf);
     233        if (RT_SUCCESS(rc))
     234        {
    235235#if ETH_PAD_SIZE
    236     lwip_pbuf_header(p, -ETH_PAD_SIZE);      /* drop the padding word */
     236            lwip_pbuf_header(p, -ETH_PAD_SIZE);      /* drop the padding word */
    237237#endif
    238238
    239     pbBuf = &aFrame[0];
    240     cbBuf = 0;
    241     for (q = p; q != NULL; q = q->next)
    242     {
    243         if (cbBuf + q->len <= DEVINIP_MAX_FRAME)
    244         {
    245             memcpy(pbBuf, q->payload, q->len);
    246             pbBuf += q->len;
    247             cbBuf += q->len;
     239            uint8_t *pbBuf = pSgBuf ? (uint8_t *)pSgBuf->aSegs[0].pvSeg : NULL;
     240            size_t   cbBuf = 0;
     241            for (struct pbuf *q = p; q != NULL; q = q->next)
     242            {
     243                if (cbBuf + q->len <= DEVINIP_MAX_FRAME)
     244                {
     245                    if (RT_LIKELY(pbBuf))
     246                    {
     247                        memcpy(pbBuf, q->payload, q->len);
     248                        pbBuf += q->len;
     249                    }
     250                    cbBuf += q->len;
     251                }
     252                else
     253                {
     254                    LogRel(("INIP: exceeded frame size\n"));
     255                    break;
     256                }
     257            }
     258            if (cbBuf)
     259                rc = g_pDevINIPData->pDrv->pfnSendBuf(g_pDevINIPData->pDrv, pSgBuf, false);
     260            else
     261                rc = g_pDevINIPData->pDrv->pfnFreeBuf(g_pDevINIPData->pDrv, pSgBuf);
     262
     263#if ETH_PAD_SIZE
     264            lwip_pbuf_header(p, ETH_PAD_SIZE);       /* reclaim the padding word */
     265#endif
    248266        }
    249         else
    250         {
    251             LogRel(("INIP: exceeded frame size\n"));
    252             break;
    253         }
    254     }
    255     if (cbBuf)
    256         rc = g_pDevINIPData->pDrv->pfnSendDeprecated(g_pDevINIPData->pDrv,
    257                                                      &aFrame[0], cbBuf);
    258 
    259 #if ETH_PAD_SIZE
    260     lwip_pbuf_header(p, ETH_PAD_SIZE);       /* reclaim the padding word */
    261 #endif
    262 
    263 out:
     267    }
     268
    264269    err_t lrc = ERR_OK;
    265270    if (RT_FAILURE(rc))
  • trunk/src/VBox/Devices/Network/DevVirtioNet.cpp

    r28082 r28213  
    887887
    888888                STAM_PROFILE_START(&pState->StatTransmitSend, a);
    889                 int rc = pState->pDrv->pfnSendDeprecated(pState->pDrv, pState->pTxBuf, uOffset);
     889
     890                /** @todo Optimize away the extra copying! (lazy bird) */
     891                PPDMSCATTERGATHER pSgBuf;
     892                int rc = pState->pDrv->pfnAllocBuf(pState->pDrv, uOffset, NULL /*pGso*/, &pSgBuf);
     893                if (RT_SUCCESS(rc))
     894                {
     895                    Assert(pSgBuf->cSegs == 1);
     896                    memcpy(pSgBuf->aSegs[0].pvSeg, pState->pTxBuf, uOffset);
     897                    pSgBuf->cbUsed = uOffset;
     898                    rc = pState->pDrv->pfnSendBuf(pState->pDrv, pSgBuf, false);
     899                }
     900
    890901                STAM_PROFILE_STOP(&pState->StatTransmitSend, a);
    891902                STAM_REL_COUNTER_ADD(&pState->StatTransmitBytes, uOffset);
  • trunk/src/VBox/Devices/Network/DrvIntNet.cpp

    r28208 r28213  
    265265}
    266266
     267
    267268/**
    268269 * @interface_method_impl{PDMINETWORKUP,pfnFreeBuf}
     
    285286}
    286287
     288
    287289/**
    288290 * @interface_method_impl{PDMINETWORKUP,pfnSendBuf}
     
    317319    STAM_PROFILE_STOP(&pThis->StatTransmit, a);
    318320    return VINF_SUCCESS;
    319 }
    320 
    321 /**
    322  * @interface_method_impl{PDMINETWORKUP,pfnSendDeprecated}
    323  */
    324 static DECLCALLBACK(int) drvR3IntNetUp_SendDeprecated(PPDMINETWORKUP pInterface, const void *pvBuf, size_t cb)
    325 {
    326     PDRVINTNET pThis = RT_FROM_MEMBER(pInterface, DRVINTNET, INetworkUpR3);
    327     STAM_PROFILE_START(&pThis->StatTransmit, a);
    328 
    329 #ifdef LOG_ENABLED
    330     uint64_t u64Now = RTTimeProgramNanoTS();
    331     LogFlow(("drvR3IntNetSend: %-4d bytes at %llu ns  deltas: r=%llu t=%llu\n",
    332              cb, u64Now, u64Now - pThis->u64LastReceiveTS, u64Now - pThis->u64LastTransferTS));
    333     pThis->u64LastTransferTS = u64Now;
    334     Log2(("drvR3IntNetSend: pvBuf=%p cb=%#x\n"
    335           "%.*Rhxd\n",
    336           pvBuf, cb, cb, pvBuf));
    337 #endif
    338 
    339     /*
    340      * Add the frame to the send buffer and push it onto the network.
    341      */
    342     int rc = INTNETRingWriteFrame(&pThis->pBufR3->Send, pvBuf, (uint32_t)cb);
    343     if (    rc == VERR_BUFFER_OVERFLOW
    344         &&  pThis->pBufR3->cbSend < cb)
    345     {
    346         INTNETIFSENDREQ SendReq;
    347         SendReq.Hdr.u32Magic = SUPVMMR0REQHDR_MAGIC;
    348         SendReq.Hdr.cbReq = sizeof(SendReq);
    349         SendReq.pSession = NIL_RTR0PTR;
    350         SendReq.hIf = pThis->hIf;
    351         PDMDrvHlpSUPCallVMMR0Ex(pThis->pDrvInsR3, VMMR0_DO_INTNET_IF_SEND, &SendReq, sizeof(SendReq));
    352 
    353         rc = INTNETRingWriteFrame(&pThis->pBufR3->Send, pvBuf, (uint32_t)cb);
    354     }
    355 
    356     if (RT_SUCCESS(rc))
    357     {
    358         INTNETIFSENDREQ SendReq;
    359         SendReq.Hdr.u32Magic = SUPVMMR0REQHDR_MAGIC;
    360         SendReq.Hdr.cbReq = sizeof(SendReq);
    361         SendReq.pSession = NIL_RTR0PTR;
    362         SendReq.hIf = pThis->hIf;
    363         rc = PDMDrvHlpSUPCallVMMR0Ex(pThis->pDrvInsR3, VMMR0_DO_INTNET_IF_SEND, &SendReq, sizeof(SendReq));
    364     }
    365 
    366     STAM_PROFILE_STOP(&pThis->StatTransmit, a);
    367     AssertRC(rc);
    368     return rc;
    369321}
    370322
     
    429381    return rc;
    430382}
    431 
    432 
    433383
    434384
     
    741691
    742692/**
     693 * drvR3IntNetResume helper.
     694 */
     695static int drvR3IntNetResumeSend(PDRVINTNET pThis, const void *pvBuf, size_t cb)
     696{
     697    /*
     698     * Add the frame to the send buffer and push it onto the network.
     699     */
     700    int rc = INTNETRingWriteFrame(&pThis->pBufR3->Send, pvBuf, (uint32_t)cb);
     701    if (    rc == VERR_BUFFER_OVERFLOW
     702        &&  pThis->pBufR3->cbSend < cb)
     703    {
     704        INTNETIFSENDREQ SendReq;
     705        SendReq.Hdr.u32Magic = SUPVMMR0REQHDR_MAGIC;
     706        SendReq.Hdr.cbReq = sizeof(SendReq);
     707        SendReq.pSession = NIL_RTR0PTR;
     708        SendReq.hIf = pThis->hIf;
     709        PDMDrvHlpSUPCallVMMR0Ex(pThis->pDrvInsR3, VMMR0_DO_INTNET_IF_SEND, &SendReq, sizeof(SendReq));
     710
     711        rc = INTNETRingWriteFrame(&pThis->pBufR3->Send, pvBuf, (uint32_t)cb);
     712    }
     713
     714    if (RT_SUCCESS(rc))
     715    {
     716        INTNETIFSENDREQ SendReq;
     717        SendReq.Hdr.u32Magic = SUPVMMR0REQHDR_MAGIC;
     718        SendReq.Hdr.cbReq = sizeof(SendReq);
     719        SendReq.pSession = NIL_RTR0PTR;
     720        SendReq.hIf = pThis->hIf;
     721        rc = PDMDrvHlpSUPCallVMMR0Ex(pThis->pDrvInsR3, VMMR0_DO_INTNET_IF_SEND, &SendReq, sizeof(SendReq));
     722    }
     723
     724    AssertRC(rc);
     725    return rc;
     726}
     727
     728
     729/**
    743730 * Resume notification.
    744731 *
     
    778765        int rc = pThis->pIAboveConfigR3->pfnGetMac(pThis->pIAboveConfigR3, &Frame.Hdr.SrcMac);
    779766        if (RT_SUCCESS(rc))
    780             rc = drvR3IntNetUp_SendDeprecated(&pThis->INetworkUpR3, &Frame, sizeof(Frame));
     767            rc = drvR3IntNetResumeSend(pThis, &Frame, sizeof(Frame));
    781768        if (RT_FAILURE(rc))
    782769            LogRel(("IntNet#%u: Sending dummy frame failed: %Rrc\n", pDrvIns->iInstance, rc));
     
    933920    pThis->INetworkUpR3.pfnFreeBuf                  = drvR3IntNetUp_FreeBuf;
    934921    pThis->INetworkUpR3.pfnSendBuf                  = drvR3IntNetUp_SendBuf;
    935     pThis->INetworkUpR3.pfnSendDeprecated           = drvR3IntNetUp_SendDeprecated;
    936922    pThis->INetworkUpR3.pfnSetPromiscuousMode       = drvR3IntNetUp_SetPromiscuousMode;
    937923    pThis->INetworkUpR3.pfnNotifyLinkChanged        = drvR3IntNetUp_NotifyLinkChanged;
  • trunk/src/VBox/Devices/Network/DrvNAT.cpp

    r28147 r28213  
    556556    drvNATFreeSgBuf(pThis, pSgBuf);
    557557    return rc;
    558 }
    559 
    560 /**
    561  * @interface_method_impl{PDMINETWORKUP,pfnSendDeprecated}
    562  */
    563 static DECLCALLBACK(int) drvNATNetworkUp_SendDeprecated(PPDMINETWORKUP pInterface, const void *pvBuf, size_t cb)
    564 {
    565     PPDMSCATTERGATHER pSgBuf;
    566     int rc = drvNATNetworkUp_AllocBuf(pInterface, cb, NULL /*pGso*/, &pSgBuf);
    567     if (RT_SUCCESS(rc))
    568     {
    569         memcpy(pSgBuf->aSegs[0].pvSeg, pvBuf, cb);
    570         pSgBuf->cbUsed = cb;
    571         rc = drvNATNetworkUp_SendBuf(pInterface, pSgBuf, false);
    572     }
    573     LogFlow(("drvNATNetworkUp_SendDeprecated: (rc=%Rrc)\n", rc));
    574     return VINF_SUCCESS;
    575558}
    576559
     
    10871070    pThis->INetworkUp.pfnFreeBuf            = drvNATNetworkUp_FreeBuf;
    10881071    pThis->INetworkUp.pfnSendBuf            = drvNATNetworkUp_SendBuf;
    1089     pThis->INetworkUp.pfnSendDeprecated     = drvNATNetworkUp_SendDeprecated;
    10901072    pThis->INetworkUp.pfnSetPromiscuousMode = drvNATNetworkUp_SetPromiscuousMode;
    10911073    pThis->INetworkUp.pfnNotifyLinkChanged  = drvNATNetworkUp_NotifyLinkChanged;
  • trunk/src/VBox/Devices/Network/DrvNetSniffer.cpp

    r28082 r28213  
    135135
    136136/**
    137  * @interface_method_impl{PDMINETWORKUP,pfnSendDeprecated}
    138  */
    139 static DECLCALLBACK(int) drvNetSnifferUp_SendDeprecated(PPDMINETWORKUP pInterface, const void *pvBuf, size_t cb)
    140 {
    141     PDRVNETSNIFFER pThis = RT_FROM_MEMBER(pInterface, DRVNETSNIFFER, INetworkUp);
    142 
    143     /* output to sniffer */
    144     RTCritSectEnter(&pThis->Lock);
    145     PcapFileFrame(pThis->File, pThis->StartNanoTS, pvBuf, cb, cb);
    146     RTCritSectLeave(&pThis->Lock);
    147 
    148     /* pass down */
    149     if (RT_LIKELY(pThis->pIBelowNet))
    150     {
    151         int rc = pThis->pIBelowNet->pfnSendDeprecated(pThis->pIBelowNet, pvBuf, cb);
    152 #if 0
    153         RTCritSectEnter(&pThis->Lock);
    154         u64TS = RTTimeProgramNanoTS();
    155         Hdr.ts_sec = (uint32_t)(u64TS / 1000000000);
    156         Hdr.ts_usec = (uint32_t)((u64TS / 1000) % 1000000);
    157         Hdr.incl_len = 0;
    158         RTFileWrite(pThis->File, &Hdr, sizeof(Hdr), NULL);
    159         RTCritSectLeave(&pThis->Lock);
    160 #endif
    161         return rc;
    162     }
    163     return VINF_SUCCESS;
    164 }
    165 
    166 
    167 /**
    168137 * @interface_method_impl{PDMINETWORKUP,pfnSetPromiscuousMode}
    169138 */
     
    406375    pThis->INetworkUp.pfnFreeBuf                    = drvNetSnifferUp_FreeBuf;
    407376    pThis->INetworkUp.pfnSendBuf                    = drvNetSnifferUp_SendBuf;
    408     pThis->INetworkUp.pfnSendDeprecated             = drvNetSnifferUp_SendDeprecated;
    409377    pThis->INetworkUp.pfnSetPromiscuousMode         = drvNetSnifferUp_SetPromiscuousMode;
    410378    pThis->INetworkUp.pfnNotifyLinkChanged          = drvNetSnifferUp_NotifyLinkChanged;
  • trunk/src/VBox/Devices/Network/DrvTAP.cpp

    r26305 r28213  
    2727#include <VBox/pdmdrv.h>
    2828#include <VBox/pdmnetifs.h>
     29#include <VBox/pdmnetinline.h>
    2930
    3031#include <iprt/asm.h>
     
    3233#include <iprt/ctype.h>
    3334#include <iprt/file.h>
     35#include <iprt/mem.h>
    3436#include <iprt/path.h>
    3537#include <iprt/semaphore.h>
     
    164166
    165167/**
    166  * @interface_method_impl{PDMINETWORKUP,pfnSendDeprecated}
    167  */
    168 static DECLCALLBACK(int) drvTAPSendDeprecated(PPDMINETWORKUP pInterface, const void *pvBuf, size_t cb)
     168 * @interface_method_impl{PDMINETWORKUP,pfnAllocBuf}
     169 */
     170static DECLCALLBACK(int) drvTAPNetworkUp_AllocBuf(PPDMINETWORKUP pInterface, size_t cbMin,
     171                                                  PCPDMNETWORKGSO pGso, PPPDMSCATTERGATHER ppSgBuf)
     172{
     173    PDRVTAP pThis = PDMINETWORKUP_2_DRVTAP(pInterface);
     174
     175    /*
     176     * Allocate a scatter / gather buffer descriptor that is immediately
     177     * followed by the buffer space of its single segment.  The GSO context
     178     * comes after that again.
     179     */
     180    PPDMSCATTERGATHER pSgBuf = (PPDMSCATTERGATHER)RTMemAlloc(  RT_ALIGN_Z(sizeof(*pSgBuf), 16)
     181                                                             + RT_ALIGN_Z(cbMin, 16)
     182                                                             + (pGso ? RT_ALIGN_Z(sizeof(*pGso), 16) : 0));
     183    if (!pSgBuf)
     184        return VERR_NO_MEMORY;
     185
     186    /*
     187     * Initialize the S/G buffer and return.
     188     */
     189    pSgBuf->fFlags         = PDMSCATTERGATHER_FLAGS_MAGIC | PDMSCATTERGATHER_FLAGS_OWNER_1;
     190    pSgBuf->cbUsed         = 0;
     191    pSgBuf->cbAvailable    = RT_ALIGN_Z(cbMin, 16);
     192    pSgBuf->pvAllocator    = NULL;
     193    if (!pGso)
     194        pSgBuf->pvUser     = NULL;
     195    else
     196    {
     197        pSgBuf->pvUser     = (uint8_t *)(pSgBuf + 1) + pSgBuf->cbAvailable;
     198        *(PPDMNETWORKGSO)pSgBuf->pvUser = *pGso;
     199    }
     200    pSgBuf->cSegs          = 1;
     201    pSgBuf->aSegs[0].cbSeg = pSgBuf->cbAvailable;
     202    pSgBuf->aSegs[0].pvSeg = pSgBuf + 1;
     203
     204#if 0 /* poison */
     205    memset(pSgBuf->aSegs[0].pvSeg, 'F', pSgBuf->aSegs[0].cbSeg);
     206#endif
     207    *ppSgBuf = pSgBuf;
     208    return VINF_SUCCESS;
     209}
     210
     211
     212/**
     213 * @interface_method_impl{PDMINETWORKUP,pfnFreeBuf}
     214 */
     215static DECLCALLBACK(int) drvTAPNetworkUp_FreeBuf(PPDMINETWORKUP pInterface, PPDMSCATTERGATHER pSgBuf)
     216{
     217    PDRVTAP pThis = PDMINETWORKUP_2_DRVTAP(pInterface);
     218    if (pSgBuf)
     219    {
     220        Assert((pSgBuf->fFlags & PDMSCATTERGATHER_FLAGS_MAGIC_MASK) == PDMSCATTERGATHER_FLAGS_MAGIC);
     221        pSgBuf->fFlags = 0;
     222        RTMemFree(pSgBuf);
     223    }
     224    return VINF_SUCCESS;
     225}
     226
     227
     228/**
     229 * @interface_method_impl{PDMINETWORKUP,pfnSendBuf}
     230 */
     231static DECLCALLBACK(int) drvTAPNetworkUp_SendBuf(PPDMINETWORKUP pInterface, PPDMSCATTERGATHER pSgBuf, bool fOnWorkerThread)
    169232{
    170233    PDRVTAP pThis = PDMINETWORKUP_2_DRVTAP(pInterface);
    171234    STAM_COUNTER_INC(&pThis->StatPktSent);
    172     STAM_COUNTER_ADD(&pThis->StatPktSentBytes, cb);
     235    STAM_COUNTER_ADD(&pThis->StatPktSentBytes, pSgBuf->cbUsed);
    173236    STAM_PROFILE_START(&pThis->StatTransmit, a);
    174237
     238    AssertPtr(pSgBuf);
     239    Assert((pSgBuf->fFlags & PDMSCATTERGATHER_FLAGS_MAGIC_MASK) == PDMSCATTERGATHER_FLAGS_MAGIC);
     240
     241    int rc;
     242    if (!pSgBuf->pvUser)
     243    {
    175244#ifdef LOG_ENABLED
    176     uint64_t u64Now = RTTimeProgramNanoTS();
    177     LogFlow(("drvTAPSend: %-4d bytes at %llu ns  deltas: r=%llu t=%llu\n",
    178              cb, u64Now, u64Now - pThis->u64LastReceiveTS, u64Now - pThis->u64LastTransferTS));
    179     pThis->u64LastTransferTS = u64Now;
    180 #endif
    181     Log2(("drvTAPSend: pvBuf=%p cb=%#x\n"
    182           "%.*Rhxd\n",
    183           pvBuf, cb, cb, pvBuf));
    184 
    185     int rc = RTFileWrite(pThis->FileDevice, pvBuf, cb, NULL);
     245        uint64_t u64Now = RTTimeProgramNanoTS();
     246        LogFlow(("drvTAPSend: %-4d bytes at %llu ns  deltas: r=%llu t=%llu\n",
     247                 pSgBuf->cbUsed, u64Now, u64Now - pThis->u64LastReceiveTS, u64Now - pThis->u64LastTransferTS));
     248        pThis->u64LastTransferTS = u64Now;
     249#endif
     250        Log2(("drvTAPSend: pSgBuf->aSegs[0].pvSeg=%p pSgBuf->cbUsed=%#x\n"
     251              "%.*Rhxd\n",
     252              pSgBuf->aSegs[0].pvSeg, pSgBuf->cbUsed, pSgBuf->cbUsed, pSgBuf->aSegs[0].pvSeg));
     253
     254        rc = RTFileWrite(pThis->FileDevice, pSgBuf->aSegs[0].pvSeg, pSgBuf->cbUsed, NULL);
     255    }
     256    else
     257    {
     258        uint8_t         abHdrScratch[256];
     259        uint8_t const  *pbFrame = (uint8_t const *)pSgBuf->aSegs[0].pvSeg;
     260        PCPDMNETWORKGSO pGso    = (PCPDMNETWORKGSO)pSgBuf->pvUser;
     261        uint32_t const  cSegs   = PDMNetGsoCalcSegmentCount(pGso, pSgBuf->cbUsed);  Assert(cSegs > 1);
     262        for (size_t iSeg = 0; iSeg < cSegs; iSeg++)
     263        {
     264            uint32_t cbSegFrame;
     265            void *pvSegFrame = PDMNetGsoCarveSegmentQD(pGso, (uint8_t *)pbFrame, pSgBuf->cbUsed, abHdrScratch,
     266                                                       iSeg, cSegs, &cbSegFrame);
     267            rc = RTFileWrite(pThis->FileDevice, pvSegFrame, cbSegFrame, NULL);
     268            if (RT_FAILURE(rc))
     269                break;
     270        }
     271    }
     272
     273    pSgBuf->fFlags = 0;
     274    RTMemFree(pSgBuf);
    186275
    187276    STAM_PROFILE_STOP(&pThis->StatTransmit, a);
    188277    AssertRC(rc);
     278    if (RT_FAILURE(rc))
     279        rc = rc == VERR_NO_MEMORY ? VERR_NET_NO_BUFFER_SPACE : VERR_NET_DOWN;
    189280    return rc;
    190281}
     
    194285 * @interface_method_impl{PDMINETWORKUP,pfnSetPromiscuousMode}
    195286 */
    196 static DECLCALLBACK(void) drvTAPSetPromiscuousMode(PPDMINETWORKUP pInterface, bool fPromiscuous)
    197 {
    198     LogFlow(("drvTAPSetPromiscuousMode: fPromiscuous=%d\n", fPromiscuous));
     287static DECLCALLBACK(void) drvTAPNetworkUp_SetPromiscuousMode(PPDMINETWORKUP pInterface, bool fPromiscuous)
     288{
     289    LogFlow(("drvTAPNetworkUp_SetPromiscuousMode: fPromiscuous=%d\n", fPromiscuous));
    199290    /* nothing to do */
    200291}
     
    208299 * @thread  EMT
    209300 */
    210 static DECLCALLBACK(void) drvTAPNotifyLinkChanged(PPDMINETWORKUP pInterface, PDMNETWORKLINKSTATE enmLinkState)
    211 {
    212     LogFlow(("drvNATNotifyLinkChanged: enmLinkState=%d\n", enmLinkState));
     301static DECLCALLBACK(void) drvTAPNetworkUp_NotifyLinkChanged(PPDMINETWORKUP pInterface, PDMNETWORKLINKSTATE enmLinkState)
     302{
     303    LogFlow(("drvTAPNetworkUp_NotifyLinkChanged: enmLinkState=%d\n", enmLinkState));
    213304    /** @todo take action on link down and up. Stop the polling and such like. */
    214305}
     
    892983    pDrvIns->IBase.pfnQueryInterface    = drvTAPQueryInterface;
    893984    /* INetwork */
    894 /** @todo implement the new INetworkUp interfaces. */
    895     pThis->INetworkUp.pfnSendDeprecated         = drvTAPSendDeprecated;
    896     pThis->INetworkUp.pfnSetPromiscuousMode     = drvTAPSetPromiscuousMode;
    897     pThis->INetworkUp.pfnNotifyLinkChanged      = drvTAPNotifyLinkChanged;
     985    pThis->INetworkUp.pfnSendBuf                = drvTAPNetworkUp_SendBuf;
     986    pThis->INetworkUp.pfnAllocBuf               = drvTAPNetworkUp_AllocBuf;
     987    pThis->INetworkUp.pfnFreeBuf                = drvTAPNetworkUp_FreeBuf;
     988    pThis->INetworkUp.pfnSetPromiscuousMode     = drvTAPNetworkUp_SetPromiscuousMode;
     989    pThis->INetworkUp.pfnNotifyLinkChanged      = drvTAPNetworkUp_NotifyLinkChanged;
    898990
    899991    /*
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette