VirtualBox

Ignore:
Timestamp:
Oct 20, 2021 9:07:44 AM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
147675
Message:

Devices/Network: Change the network drivers to access the CFGM API through the driver helper callback table only, bugref:10074

File:
1 edited

Legend:

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

    r82968 r91872  
    374374static DECLCALLBACK(int) drvNetSnifferConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags)
    375375{
    376     PDRVNETSNIFFER pThis = PDMINS_2_DATA(pDrvIns, PDRVNETSNIFFER);
     376    PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns);
     377    PDRVNETSNIFFER  pThis = PDMINS_2_DATA(pDrvIns, PDRVNETSNIFFER);
     378    PCPDMDRVHLPR3   pHlp  = pDrvIns->pHlpR3;
     379
    377380    LogFlow(("drvNetSnifferConstruct:\n"));
    378     PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns);
    379381
    380382    /*
     
    415417     * Validate the config.
    416418     */
    417     if (!CFGMR3AreValuesValid(pCfg, "File\0"))
    418         return VERR_PDM_DRVINS_UNKNOWN_CFG_VALUES;
    419 
    420     if (CFGMR3GetFirstChild(pCfg))
     419    PDMDRV_VALIDATE_CONFIG_RETURN(pDrvIns, "File", "");
     420
     421    if (pHlp->pfnCFGMGetFirstChild(pCfg))
    421422        LogRel(("NetSniffer: Found child config entries -- are you trying to redirect ports?\n"));
    422423
     
    424425     * Get the filename.
    425426     */
    426     rc = CFGMR3QueryString(pCfg, "File", pThis->szFilename, sizeof(pThis->szFilename));
     427    rc = pHlp->pfnCFGMQueryString(pCfg, "File", pThis->szFilename, sizeof(pThis->szFilename));
    427428    if (rc == VERR_CFGM_VALUE_NOT_FOUND)
    428429    {
Note: See TracChangeset for help on using the changeset viewer.

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