VirtualBox

Ignore:
Timestamp:
Feb 2, 2007 3:24:29 PM (18 years ago)
Author:
vboxsync
Message:

Added INetworkConnector callback for sending multiple packets

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Network/DrvTAPWin32.cpp

    r557 r559  
    165165}
    166166
     167/**
     168 * Send multiple data packets to the network.
     169 *
     170 * @returns VBox status code.
     171 * @param   pInterface      Pointer to the interface structure containing the called function pointer.
     172 * @param   cPackets        Number of packets
     173 * @param   paPacket        Packet description array
     174 * @thread  EMT
     175 */
     176static DECLCALLBACK(int) drvTAPW32SendEx(PPDMINETWORKCONNECTOR pInterface, uint32_t cPackets, PPDMINETWORKPACKET paPacket)
     177{
     178    int rc = VERR_INVALID_PARAMETER;
     179
     180    for (uint32_t i=0;i<cPackets;i++)
     181    {
     182        rc = drvTAPW32Send(pInterface, paPacket[i].pvBuf, paPacket[i].cb);
     183        if (VBOX_FAILURE(rc))
     184            break;
     185    }
     186    return rc;
     187}
     188
    167189
    168190/**
     
    466488    /* INetwork */
    467489    pData->INetworkConnector.pfnSend                = drvTAPW32Send;
     490    pData->INetworkConnector.pfnSendEx              = drvTAPW32SendEx;
    468491    pData->INetworkConnector.pfnSetPromiscuousMode  = drvTAPW32SetPromiscuousMode;
    469492    pData->INetworkConnector.pfnNotifyLinkChanged   = drvTAPW32NotifyLinkChanged;
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