VirtualBox

Changeset 91873 in vbox


Ignore:
Timestamp:
Oct 20, 2021 9:08:32 AM (3 years ago)
Author:
vboxsync
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Network/DrvVMNet.m

    r91466 r91873  
    480480{
    481481    RT_NOREF(fFlags);
    482     PDRVVMNET pThis = PDMINS_2_DATA(pDrvIns, PDRVVMNET);
     482    PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns);
     483    PDRVVMNET       pThis = PDMINS_2_DATA(pDrvIns, PDRVVMNET);
     484    PCPDMDRVHLPR3   pHlp  = pDrvIns->pHlpR3;
     485
    483486    LogFlow(("drvVMNetConstruct: %p\n", pDrvIns));
    484     PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns);
    485487
    486488    /*
     
    525527     */
    526528    char szUUID[40];
    527     rc = CFGMR3QueryString(pCfg, "Id", szUUID, sizeof(szUUID));
     529    rc = pHlp->pfnCFGMQueryString(pCfg, "Id", szUUID, sizeof(szUUID));
    528530    if (rc == VERR_CFGM_VALUE_NOT_FOUND)
    529531        uuid_generate_random(pThis->uuid);
     
    539541     */
    540542    uint32_t u32TrunkType;
    541     rc = CFGMR3QueryU32(pCfg, "TrunkType", &u32TrunkType);
     543    rc = pHlp->pfnCFGMQueryU32(pCfg, "TrunkType", &u32TrunkType);
    542544    if (RT_FAILURE(rc))
    543545        return PDMDRV_SET_ERROR(pDrvIns, rc,
     
    550552            * Get the network mask.
    551553            */
    552             rc = CFGMR3QueryString(pCfg, "NetworkMask", pThis->szNetworkMask, sizeof(pThis->szNetworkMask));
     554            rc = pHlp->pfnCFGMQueryString(pCfg, "NetworkMask", pThis->szNetworkMask, sizeof(pThis->szNetworkMask));
    553555            if (RT_FAILURE(rc))
    554556                return PDMDRV_SET_ERROR(pDrvIns, rc,
     
    558560            * Get the network mask.
    559561            */
    560             rc = CFGMR3QueryString(pCfg, "LowerIP", pThis->szLowerIP, sizeof(pThis->szLowerIP));
     562            rc = pHlp->pfnCFGMQueryString(pCfg, "LowerIP", pThis->szLowerIP, sizeof(pThis->szLowerIP));
    561563            if (RT_FAILURE(rc))
    562564                return PDMDRV_SET_ERROR(pDrvIns, rc,
     
    566568            * Get the network mask.
    567569            */
    568             rc = CFGMR3QueryString(pCfg, "UpperIP", pThis->szUpperIP, sizeof(pThis->szUpperIP));
     570            rc = pHlp->pfnCFGMQueryString(pCfg, "UpperIP", pThis->szUpperIP, sizeof(pThis->szUpperIP));
    569571            if (RT_FAILURE(rc))
    570572                return PDMDRV_SET_ERROR(pDrvIns, rc,
     
    579581            * The name of the host interface to use for bridging.
    580582            */
    581             rc = CFGMR3QueryString(pCfg, "Trunk", pThis->szHostInterface, sizeof(pThis->szHostInterface));
     583            rc = pHlp->pfnCFGMQueryString(pCfg, "Trunk", pThis->szHostInterface, sizeof(pThis->szHostInterface));
    582584            if (RT_FAILURE(rc))
    583585                return PDMDRV_SET_ERROR(pDrvIns, rc,
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