VirtualBox

Changeset 26173 in vbox for trunk/src/VBox/Devices/Network


Ignore:
Timestamp:
Feb 2, 2010 9:11:09 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
57187
Message:

PDM: s/pCfgHandle/pCfg/g - part 2.

Location:
trunk/src/VBox/Devices/Network
Files:
8 edited

Legend:

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

    r26160 r26173  
    50255025 * @interface_method_impl{PDMDEVREG,pfnConstruct}
    50265026 */
    5027 static DECLCALLBACK(int) e1kConstruct(PPDMDEVINS pDevIns, int iInstance, PCFGMNODE pCfgHandle)
     5027static DECLCALLBACK(int) e1kConstruct(PPDMDEVINS pDevIns, int iInstance, PCFGMNODE pCfg)
    50285028{
    50295029    E1KSTATE* pState = PDMINS_2_DATA(pDevIns, E1KSTATE*);
     
    50405040     * Validate configuration.
    50415041     */
    5042     if (!CFGMR3AreValuesValid(pCfgHandle, "MAC\0" "CableConnected\0" "AdapterType\0" "LineSpeed\0"))
     5042    if (!CFGMR3AreValuesValid(pCfg, "MAC\0" "CableConnected\0" "AdapterType\0" "LineSpeed\0"))
    50435043        return PDMDEV_SET_ERROR(pDevIns, VERR_PDM_DEVINS_UNKNOWN_CFG_VALUES,
    50445044                                N_("Invalid configuration for E1000 device"));
     
    50475047
    50485048    /* Get config params */
    5049     rc = CFGMR3QueryBytes(pCfgHandle, "MAC", pState->macConfigured.au8,
     5049    rc = CFGMR3QueryBytes(pCfg, "MAC", pState->macConfigured.au8,
    50505050                          sizeof(pState->macConfigured.au8));
    50515051    if (RT_FAILURE(rc))
    50525052        return PDMDEV_SET_ERROR(pDevIns, rc,
    50535053                                N_("Configuration error: Failed to get MAC address"));
    5054     rc = CFGMR3QueryBool(pCfgHandle, "CableConnected", &pState->fCableConnected);
     5054    rc = CFGMR3QueryBool(pCfg, "CableConnected", &pState->fCableConnected);
    50555055    if (RT_FAILURE(rc))
    50565056        return PDMDEV_SET_ERROR(pDevIns, rc,
    50575057                                N_("Configuration error: Failed to get the value of 'CableConnected'"));
    5058     rc = CFGMR3QueryU32(pCfgHandle, "AdapterType", (uint32_t*)&pState->eChip);
     5058    rc = CFGMR3QueryU32(pCfg, "AdapterType", (uint32_t*)&pState->eChip);
    50595059    if (RT_FAILURE(rc))
    50605060        return PDMDEV_SET_ERROR(pDevIns, rc,
  • trunk/src/VBox/Devices/Network/DevINIP.cpp

    r26165 r26173  
    446446 */
    447447static DECLCALLBACK(int) devINIPConstruct(PPDMDEVINS pDevIns, int iInstance,
    448                                           PCFGMNODE pCfgHandle)
     448                                          PCFGMNODE pCfg)
    449449{
    450450    PDEVINTNETIP pThis = PDMINS_2_DATA(pDevIns, PDEVINTNETIP);
    451451    int rc = VINF_SUCCESS;
    452     LogFlow(("%s: pDevIns=%p iInstance=%d pCfgHandle=%p\n", __FUNCTION__,
    453              pDevIns, iInstance, pCfgHandle));
     452    LogFlow(("%s: pDevIns=%p iInstance=%d pCfg=%p\n", __FUNCTION__,
     453             pDevIns, iInstance, pCfg));
    454454
    455455    Assert(iInstance == 0);
     
    459459     * Validate the config.
    460460     */
    461     if (!CFGMR3AreValuesValid(pCfgHandle, "MAC\0IP\0Netmask\0Gateway\0"))
     461    if (!CFGMR3AreValuesValid(pCfg, "MAC\0IP\0Netmask\0Gateway\0"))
    462462    {
    463463        rc = PDMDEV_SET_ERROR(pDevIns, VERR_PDM_DEVINS_UNKNOWN_CFG_VALUES,
     
    483483     * Get the configuration settings.
    484484     */
    485     rc = CFGMR3QueryBytes(pCfgHandle, "MAC", &pThis->MAC, sizeof(pThis->MAC));
     485    rc = CFGMR3QueryBytes(pCfg, "MAC", &pThis->MAC, sizeof(pThis->MAC));
    486486    if (rc == VERR_CFGM_NOT_BYTES)
    487487    {
    488488        char szMAC[64];
    489         rc = CFGMR3QueryString(pCfgHandle, "MAC", &szMAC[0], sizeof(szMAC));
     489        rc = CFGMR3QueryString(pCfg, "MAC", &szMAC[0], sizeof(szMAC));
    490490        if (RT_SUCCESS(rc))
    491491        {
     
    520520        goto out;
    521521    }
    522     rc = CFGMR3QueryStringAlloc(pCfgHandle, "IP", &pThis->pszIP);
     522    rc = CFGMR3QueryStringAlloc(pCfg, "IP", &pThis->pszIP);
    523523    if (RT_FAILURE(rc))
    524524    {
     
    527527        goto out;
    528528    }
    529     rc = CFGMR3QueryStringAlloc(pCfgHandle, "Netmask", &pThis->pszNetmask);
     529    rc = CFGMR3QueryStringAlloc(pCfg, "Netmask", &pThis->pszNetmask);
    530530    if (RT_FAILURE(rc))
    531531    {
     
    534534        goto out;
    535535    }
    536     rc = CFGMR3QueryStringAlloc(pCfgHandle, "Gateway", &pThis->pszGateway);
     536    rc = CFGMR3QueryStringAlloc(pCfg, "Gateway", &pThis->pszGateway);
    537537    if (rc == VERR_CFGM_VALUE_NOT_FOUND)
    538538        rc = VINF_SUCCESS;
  • trunk/src/VBox/Devices/Network/DevPCNet.cpp

    r26165 r26173  
    49334933 * @interface_method_impl{PDMDEVREG,pfnConstruct}
    49344934 */
    4935 static DECLCALLBACK(int) pcnetConstruct(PPDMDEVINS pDevIns, int iInstance, PCFGMNODE pCfgHandle)
     4935static DECLCALLBACK(int) pcnetConstruct(PPDMDEVINS pDevIns, int iInstance, PCFGMNODE pCfg)
    49364936{
    49374937    PCNetState     *pThis = PDMINS_2_DATA(pDevIns, PCNetState *);
     
    49574957     * Validate configuration.
    49584958     */
    4959     if (!CFGMR3AreValuesValid(pCfgHandle, "MAC\0" "CableConnected\0" "Am79C973\0" "LineSpeed\0" "GCEnabled\0" "R0Enabled\0" "PrivIfEnabled\0"))
     4959    if (!CFGMR3AreValuesValid(pCfg, "MAC\0" "CableConnected\0" "Am79C973\0" "LineSpeed\0" "GCEnabled\0" "R0Enabled\0" "PrivIfEnabled\0"))
    49604960        return PDMDEV_SET_ERROR(pDevIns, VERR_PDM_DEVINS_UNKNOWN_CFG_VALUES,
    49614961                                N_("Invalid configuration for pcnet device"));
     
    49644964     * Read the configuration.
    49654965     */
    4966     rc = CFGMR3QueryBytes(pCfgHandle, "MAC", &pThis->MacConfigured, sizeof(pThis->MacConfigured));
     4966    rc = CFGMR3QueryBytes(pCfg, "MAC", &pThis->MacConfigured, sizeof(pThis->MacConfigured));
    49674967    if (RT_FAILURE(rc))
    49684968        return PDMDEV_SET_ERROR(pDevIns, rc,
    49694969                                N_("Configuration error: Failed to get the \"MAC\" value"));
    4970     rc = CFGMR3QueryBoolDef(pCfgHandle, "CableConnected", &pThis->fLinkUp, true);
     4970    rc = CFGMR3QueryBoolDef(pCfg, "CableConnected", &pThis->fLinkUp, true);
    49714971    if (RT_FAILURE(rc))
    49724972        return PDMDEV_SET_ERROR(pDevIns, rc,
    49734973                                N_("Configuration error: Failed to get the \"CableConnected\" value"));
    49744974
    4975     rc = CFGMR3QueryBoolDef(pCfgHandle, "Am79C973", &pThis->fAm79C973, false);
     4975    rc = CFGMR3QueryBoolDef(pCfg, "Am79C973", &pThis->fAm79C973, false);
    49764976    if (RT_FAILURE(rc))
    49774977        return PDMDEV_SET_ERROR(pDevIns, rc,
    49784978                                N_("Configuration error: Failed to get the \"Am79C973\" value"));
    49794979
    4980     rc = CFGMR3QueryU32Def(pCfgHandle, "LineSpeed", &pThis->u32LinkSpeed, 1000000); /* 1GBit/s (in kbps units)*/
     4980    rc = CFGMR3QueryU32Def(pCfg, "LineSpeed", &pThis->u32LinkSpeed, 1000000); /* 1GBit/s (in kbps units)*/
    49814981    if (RT_FAILURE(rc))
    49824982        return PDMDEV_SET_ERROR(pDevIns, rc,
     
    49844984
    49854985#ifdef PCNET_GC_ENABLED
    4986     rc = CFGMR3QueryBoolDef(pCfgHandle, "GCEnabled", &pThis->fGCEnabled, true);
     4986    rc = CFGMR3QueryBoolDef(pCfg, "GCEnabled", &pThis->fGCEnabled, true);
    49874987    if (RT_FAILURE(rc))
    49884988        return PDMDEV_SET_ERROR(pDevIns, rc,
    49894989                                N_("Configuration error: Failed to get the \"GCEnabled\" value"));
    49904990
    4991     rc = CFGMR3QueryBoolDef(pCfgHandle, "R0Enabled", &pThis->fR0Enabled, true);
     4991    rc = CFGMR3QueryBoolDef(pCfg, "R0Enabled", &pThis->fR0Enabled, true);
    49924992    if (RT_FAILURE(rc))
    49934993        return PDMDEV_SET_ERROR(pDevIns, rc,
     
    50665066
    50675067    bool fPrivIfEnabled;
    5068     rc = CFGMR3QueryBool(pCfgHandle, "PrivIfEnabled", &fPrivIfEnabled);
     5068    rc = CFGMR3QueryBool(pCfg, "PrivIfEnabled", &fPrivIfEnabled);
    50695069    if (rc == VERR_CFGM_VALUE_NOT_FOUND)
    50705070        fPrivIfEnabled = true;
  • trunk/src/VBox/Devices/Network/DevVirtioNet.cpp

    r26160 r26173  
    16211621 * @interface_method_impl{PDMDEVREG,pfnConstruct}
    16221622 */
    1623 static DECLCALLBACK(int) vnetConstruct(PPDMDEVINS pDevIns, int iInstance, PCFGMNODE pCfgHandle)
     1623static DECLCALLBACK(int) vnetConstruct(PPDMDEVINS pDevIns, int iInstance, PCFGMNODE pCfg)
    16241624{
    16251625    VNETSTATE* pState = PDMINS_2_DATA(pDevIns, VNETSTATE*);
     
    16431643     * Validate configuration.
    16441644     */
    1645     if (!CFGMR3AreValuesValid(pCfgHandle, "MAC\0" "CableConnected\0" "LineSpeed\0"))
     1645    if (!CFGMR3AreValuesValid(pCfg, "MAC\0" "CableConnected\0" "LineSpeed\0"))
    16461646                    return PDMDEV_SET_ERROR(pDevIns, VERR_PDM_DEVINS_UNKNOWN_CFG_VALUES,
    16471647                                            N_("Invalid configuration for VirtioNet device"));
    16481648
    16491649    /* Get config params */
    1650     rc = CFGMR3QueryBytes(pCfgHandle, "MAC", pState->macConfigured.au8,
     1650    rc = CFGMR3QueryBytes(pCfg, "MAC", pState->macConfigured.au8,
    16511651                          sizeof(pState->macConfigured));
    16521652    if (RT_FAILURE(rc))
    16531653        return PDMDEV_SET_ERROR(pDevIns, rc,
    16541654                                N_("Configuration error: Failed to get MAC address"));
    1655     rc = CFGMR3QueryBool(pCfgHandle, "CableConnected", &pState->fCableConnected);
     1655    rc = CFGMR3QueryBool(pCfg, "CableConnected", &pState->fCableConnected);
    16561656    if (RT_FAILURE(rc))
    16571657        return PDMDEV_SET_ERROR(pDevIns, rc,
  • trunk/src/VBox/Devices/Network/DrvIntNet.cpp

    r26166 r26173  
    808808 * @copydoc FNPDMDRVCONSTRUCT
    809809 */
    810 static DECLCALLBACK(int) drvR3IntNetConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle, uint32_t fFlags)
     810static DECLCALLBACK(int) drvR3IntNetConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags)
    811811{
    812812    PDRVINTNET pThis = PDMINS_2_DATA(pDrvIns, PDRVINTNET);
     
    835835     * Validate the config.
    836836     */
    837     if (!CFGMR3AreValuesValid(pCfgHandle,
     837    if (!CFGMR3AreValuesValid(pCfg,
    838838                              "Network\0"
    839839                              "Trunk\0"
     
    884884     * The name of the internal network to connect to.
    885885     */
    886     int rc = CFGMR3QueryString(pCfgHandle, "Network", OpenReq.szNetwork, sizeof(OpenReq.szNetwork));
     886    int rc = CFGMR3QueryString(pCfg, "Network", OpenReq.szNetwork, sizeof(OpenReq.szNetwork));
    887887    if (RT_FAILURE(rc))
    888888        return PDMDRV_SET_ERROR(pDrvIns, rc,
     
    894894     */
    895895    uint32_t u32TrunkType;
    896     rc = CFGMR3QueryU32(pCfgHandle, "TrunkType", &u32TrunkType);
     896    rc = CFGMR3QueryU32(pCfg, "TrunkType", &u32TrunkType);
    897897    if (rc == VERR_CFGM_VALUE_NOT_FOUND)
    898898        u32TrunkType = kIntNetTrunkType_None;
     
    905905     * The name of the trunk connection.
    906906     */
    907     rc = CFGMR3QueryString(pCfgHandle, "Trunk", OpenReq.szTrunk, sizeof(OpenReq.szTrunk));
     907    rc = CFGMR3QueryString(pCfg, "Trunk", OpenReq.szTrunk, sizeof(OpenReq.szTrunk));
    908908    if (rc == VERR_CFGM_VALUE_NOT_FOUND)
    909909        OpenReq.szTrunk[0] = '\0';
     
    917917     */
    918918    bool fRestrictAccess;
    919     rc = CFGMR3QueryBool(pCfgHandle, "RestrictAccess", &fRestrictAccess);
     919    rc = CFGMR3QueryBool(pCfg, "RestrictAccess", &fRestrictAccess);
    920920    if (rc == VERR_CFGM_VALUE_NOT_FOUND)
    921921        fRestrictAccess = true;
     
    928928     * When set all request for operating any interface or trunk in promiscuous
    929929     * mode will be ignored. */
    930     rc = CFGMR3QueryBoolDef(pCfgHandle, "IgnoreAllPromisc", &f, false);
     930    rc = CFGMR3QueryBoolDef(pCfg, "IgnoreAllPromisc", &f, false);
    931931    if (RT_FAILURE(rc))
    932932        return PDMDRV_SET_ERROR(pDrvIns, rc,
     
    939939     * mode will be ignored.  This differs from IgnoreAllPromisc in that clients
    940940     * won't get VERR_INTNET_INCOMPATIBLE_FLAGS. */
    941     rc = CFGMR3QueryBoolDef(pCfgHandle, "QuietlyIgnoreAllPromisc", &f, false);
     941    rc = CFGMR3QueryBoolDef(pCfg, "QuietlyIgnoreAllPromisc", &f, false);
    942942    if (RT_FAILURE(rc))
    943943        return PDMDRV_SET_ERROR(pDrvIns, rc,
     
    949949     * When set all request for operating any non-trunk interface in promiscuous
    950950     * mode will be ignored. */
    951     rc = CFGMR3QueryBoolDef(pCfgHandle, "IgnoreClientPromisc", &f, false);
     951    rc = CFGMR3QueryBoolDef(pCfg, "IgnoreClientPromisc", &f, false);
    952952    if (RT_FAILURE(rc))
    953953        return PDMDRV_SET_ERROR(pDrvIns, rc,
     
    960960     * will be ignored.  This differs from IgnoreClientPromisc in that clients won't
    961961     * get VERR_INTNET_INCOMPATIBLE_FLAGS. */
    962     rc = CFGMR3QueryBoolDef(pCfgHandle, "QuietlyIgnoreClientPromisc", &f, false);
     962    rc = CFGMR3QueryBoolDef(pCfg, "QuietlyIgnoreClientPromisc", &f, false);
    963963    if (RT_FAILURE(rc))
    964964        return PDMDRV_SET_ERROR(pDrvIns, rc,
     
    970970     * When set all request for operating the trunk-wire connection in promiscuous
    971971     * mode will be ignored. */
    972     rc = CFGMR3QueryBoolDef(pCfgHandle, "IgnoreTrunkWirePromisc", &f, false);
     972    rc = CFGMR3QueryBoolDef(pCfg, "IgnoreTrunkWirePromisc", &f, false);
    973973    if (RT_FAILURE(rc))
    974974        return PDMDRV_SET_ERROR(pDrvIns, rc,
     
    981981     * will be ignored.  This differs from IgnoreTrunkWirePromisc in that clients
    982982     * won't get VERR_INTNET_INCOMPATIBLE_FLAGS. */
    983     rc = CFGMR3QueryBoolDef(pCfgHandle, "QuietlyIgnoreTrunkWirePromisc", &f, false);
     983    rc = CFGMR3QueryBoolDef(pCfg, "QuietlyIgnoreTrunkWirePromisc", &f, false);
    984984    if (RT_FAILURE(rc))
    985985        return PDMDRV_SET_ERROR(pDrvIns, rc,
     
    991991     * When set all request for operating the trunk-host connection in promiscuous
    992992     * mode will be ignored. */
    993     rc = CFGMR3QueryBoolDef(pCfgHandle, "IgnoreTrunkHostPromisc", &f, false);
     993    rc = CFGMR3QueryBoolDef(pCfg, "IgnoreTrunkHostPromisc", &f, false);
    994994    if (RT_FAILURE(rc))
    995995        return PDMDRV_SET_ERROR(pDrvIns, rc,
     
    10021002     * will be ignored.  This differs from IgnoreTrunkHostPromisc in that clients
    10031003     * won't get VERR_INTNET_INCOMPATIBLE_FLAGS. */
    1004     rc = CFGMR3QueryBoolDef(pCfgHandle, "QuietlyIgnoreTrunkHostPromisc", &f, false);
     1004    rc = CFGMR3QueryBoolDef(pCfg, "QuietlyIgnoreTrunkHostPromisc", &f, false);
    10051005    if (RT_FAILURE(rc))
    10061006        return PDMDRV_SET_ERROR(pDrvIns, rc,
     
    10181018     */
    10191019    bool fSharedMacOnWire;
    1020     rc = CFGMR3QueryBoolDef(pCfgHandle, "SharedMacOnWire", &fSharedMacOnWire, false);
     1020    rc = CFGMR3QueryBoolDef(pCfg, "SharedMacOnWire", &fSharedMacOnWire, false);
    10211021    if (RT_FAILURE(rc))
    10221022        return PDMDRV_SET_ERROR(pDrvIns, rc,
     
    10281028     * The size of the receive buffer.
    10291029     */
    1030     rc = CFGMR3QueryU32(pCfgHandle, "ReceiveBufferSize", &OpenReq.cbRecv);
     1030    rc = CFGMR3QueryU32(pCfg, "ReceiveBufferSize", &OpenReq.cbRecv);
    10311031    if (rc == VERR_CFGM_VALUE_NOT_FOUND)
    10321032        OpenReq.cbRecv = 218 * _1K ;
     
    10431043     * side of it and the code will get very upset about it all.
    10441044     */
    1045     rc = CFGMR3QueryU32(pCfgHandle, "SendBufferSize", &OpenReq.cbSend);
     1045    rc = CFGMR3QueryU32(pCfg, "SendBufferSize", &OpenReq.cbSend);
    10461046    if (rc == VERR_CFGM_VALUE_NOT_FOUND)
    10471047        OpenReq.cbSend = 36*_1K;
     
    10591059     * a service such as LWIP/iSCSI it shouldn't suspend immediately like for a NIC.
    10601060     */
    1061     rc = CFGMR3QueryBool(pCfgHandle, "IsService", &pThis->fActivateEarlyDeactivateLate);
     1061    rc = CFGMR3QueryBool(pCfg, "IsService", &pThis->fActivateEarlyDeactivateLate);
    10621062    if (rc == VERR_CFGM_VALUE_NOT_FOUND)
    10631063        pThis->fActivateEarlyDeactivateLate = false;
  • trunk/src/VBox/Devices/Network/DrvNAT.cpp

    r26166 r26173  
    863863 *
    864864 * @returns VBox status code.
    865  * @param   pCfgHandle      The drivers configuration handle.
    866  */
    867 static int drvNATConstructRedir(unsigned iInstance, PDRVNAT pThis, PCFGMNODE pCfgHandle, RTIPV4ADDR Network)
     865 * @param   pCfg            The configuration handle.
     866 */
     867static int drvNATConstructRedir(unsigned iInstance, PDRVNAT pThis, PCFGMNODE pCfg, RTIPV4ADDR Network)
    868868{
    869869     RTMAC Mac;
     
    872872     * Enumerate redirections.
    873873     */
    874     for (PCFGMNODE pNode = CFGMR3GetFirstChild(pCfgHandle); pNode; pNode = CFGMR3GetNextChild(pNode))
     874    for (PCFGMNODE pNode = CFGMR3GetFirstChild(pCfg); pNode; pNode = CFGMR3GetNextChild(pNode))
    875875    {
    876876        /*
     
    966966 * @copydoc FNPDMDRVCONSTRUCT
    967967 */
    968 static DECLCALLBACK(int) drvNATConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle, uint32_t fFlags)
     968static DECLCALLBACK(int) drvNATConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags)
    969969{
    970970    PDRVNAT pThis = PDMINS_2_DATA(pDrvIns, PDRVNAT);
     
    975975     * Validate the config.
    976976     */
    977     if (!CFGMR3AreValuesValid(pCfgHandle,
     977    if (!CFGMR3AreValuesValid(pCfg,
    978978                              "PassDomain\0TFTPPrefix\0BootFile\0Network"
    979979                              "\0NextServer\0DNSProxy\0BindIP\0UseHostResolver\0"
     
    10061006    int rc;
    10071007    bool fPassDomain = true;
    1008     GET_BOOL(rc, pThis, pCfgHandle, "PassDomain", fPassDomain);
    1009 
    1010     GET_STRING_ALLOC(rc, pThis, pCfgHandle, "TFTPPrefix", pThis->pszTFTPPrefix);
    1011     GET_STRING_ALLOC(rc, pThis, pCfgHandle, "BootFile", pThis->pszBootFile);
    1012     GET_STRING_ALLOC(rc, pThis, pCfgHandle, "NextServer", pThis->pszNextServer);
     1008    GET_BOOL(rc, pThis, pCfg, "PassDomain", fPassDomain);
     1009
     1010    GET_STRING_ALLOC(rc, pThis, pCfg, "TFTPPrefix", pThis->pszTFTPPrefix);
     1011    GET_STRING_ALLOC(rc, pThis, pCfg, "BootFile", pThis->pszBootFile);
     1012    GET_STRING_ALLOC(rc, pThis, pCfg, "NextServer", pThis->pszNextServer);
    10131013
    10141014    int fDNSProxy = 0;
    1015     GET_S32(rc, pThis, pCfgHandle, "DNSProxy", fDNSProxy);
     1015    GET_S32(rc, pThis, pCfg, "DNSProxy", fDNSProxy);
    10161016    int fUseHostResolver = 0;
    1017     GET_S32(rc, pThis, pCfgHandle, "UseHostResolver", fUseHostResolver);
     1017    GET_S32(rc, pThis, pCfg, "UseHostResolver", fUseHostResolver);
    10181018#ifdef VBOX_WITH_SLIRP_BSD_MBUF
    10191019    int MTU = 1500;
    1020     GET_S32(rc, pThis, pCfgHandle, "SlirpMTU", MTU);
     1020    GET_S32(rc, pThis, pCfg, "SlirpMTU", MTU);
    10211021#endif
    10221022
     
    10371037    /* Generate a network address for this network card. */
    10381038    char szNetwork[32]; /* xxx.xxx.xxx.xxx/yy */
    1039     GET_STRING(rc, pThis, pCfgHandle, "Network", szNetwork[0], sizeof(szNetwork));
     1039    GET_STRING(rc, pThis, pCfg, "Network", szNetwork[0], sizeof(szNetwork));
    10401040    if (rc == VERR_CFGM_VALUE_NOT_FOUND)
    10411041        RTStrPrintf(szNetwork, sizeof(szNetwork), "10.0.%d.0/24", pDrvIns->iInstance + 2);
     
    10681068#endif
    10691069        char *pszBindIP = NULL;
    1070         GET_STRING_ALLOC(rc, pThis, pCfgHandle, "BindIP", pszBindIP);
     1070        GET_STRING_ALLOC(rc, pThis, pCfg, "BindIP", pszBindIP);
    10711071        rc = slirp_set_binding_address(pThis->pNATState, pszBindIP);
    10721072        if (rc != 0)
     
    10791079            {                                                   \
    10801080                int len = 0;                                    \
    1081                 rc = CFGMR3QueryS32(pCfgHandle, name, &len);    \
     1081                rc = CFGMR3QueryS32(pCfg, name, &len);    \
    10821082                if (RT_SUCCESS(rc))                             \
    10831083                    setter(pThis->pNATState, len);              \
     
    10961096#endif
    10971097
    1098         int rc2 = drvNATConstructRedir(pDrvIns->iInstance, pThis, pCfgHandle, Network);
     1098        int rc2 = drvNATConstructRedir(pDrvIns->iInstance, pThis, pCfg, Network);
    10991099        if (RT_SUCCESS(rc2))
    11001100        {
  • trunk/src/VBox/Devices/Network/DrvNetSniffer.cpp

    r26166 r26173  
    350350 * @copydoc FNPDMDRVCONSTRUCT
    351351 */
    352 static DECLCALLBACK(int) drvNetSnifferConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle, uint32_t fFlags)
     352static DECLCALLBACK(int) drvNetSnifferConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags)
    353353{
    354354    PDRVNETSNIFFER pThis = PDMINS_2_DATA(pDrvIns, PDRVNETSNIFFER);
     
    359359     * Validate the config.
    360360     */
    361     if (!CFGMR3AreValuesValid(pCfgHandle, "File\0"))
     361    if (!CFGMR3AreValuesValid(pCfg, "File\0"))
    362362        return VERR_PDM_DRVINS_UNKNOWN_CFG_VALUES;
    363363
    364     if (CFGMR3GetFirstChild(pCfgHandle))
     364    if (CFGMR3GetFirstChild(pCfg))
    365365        LogRel(("NetSniffer: Found child config entries -- are you trying to redirect ports?\n"));
    366366
     
    389389     * Get the filename.
    390390     */
    391     int rc = CFGMR3QueryString(pCfgHandle, "File", pThis->szFilename, sizeof(pThis->szFilename));
     391    int rc = CFGMR3QueryString(pCfg, "File", pThis->szFilename, sizeof(pThis->szFilename));
    392392    if (rc == VERR_CFGM_VALUE_NOT_FOUND)
    393393    {
  • trunk/src/VBox/Devices/Network/DrvTAP.cpp

    r26166 r26173  
    879879 * @copydoc FNPDMDRVCONSTRUCT
    880880 */
    881 static DECLCALLBACK(int) drvTAPConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle, uint32_t fFlags)
     881static DECLCALLBACK(int) drvTAPConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags)
    882882{
    883883    PDRVTAP pThis = PDMINS_2_DATA(pDrvIns, PDRVTAP);
     
    911911     * Validate the config.
    912912     */
    913     if (!CFGMR3AreValuesValid(pCfgHandle, "Device\0InitProg\0TermProg\0FileHandle\0TAPSetupApplication\0TAPTerminateApplication\0MAC"))
     913    if (!CFGMR3AreValuesValid(pCfg, "Device\0InitProg\0TermProg\0FileHandle\0TAPSetupApplication\0TAPTerminateApplication\0MAC"))
    914914        return PDMDRV_SET_ERROR(pDrvIns, VERR_PDM_DRVINS_UNKNOWN_CFG_VALUES, "");
    915915
     
    934934    int rc;
    935935#if defined(RT_OS_SOLARIS)   /** @todo Other platforms' TAP code should be moved here from ConsoleImpl & VBoxBFE. */
    936     rc = CFGMR3QueryStringAlloc(pCfgHandle, "TAPSetupApplication", &pThis->pszSetupApplication);
     936    rc = CFGMR3QueryStringAlloc(pCfg, "TAPSetupApplication", &pThis->pszSetupApplication);
    937937    if (RT_SUCCESS(rc))
    938938    {
     
    944944        return PDMDRV_SET_ERROR(pDrvIns, rc, N_("Configuration error: failed to query \"TAPTerminateApplication\""));
    945945
    946     rc = CFGMR3QueryStringAlloc(pCfgHandle, "TAPTerminateApplication", &pThis->pszTerminateApplication);
     946    rc = CFGMR3QueryStringAlloc(pCfg, "TAPTerminateApplication", &pThis->pszTerminateApplication);
    947947    if (RT_SUCCESS(rc))
    948948    {
     
    955955
    956956# ifdef VBOX_WITH_CROSSBOW
    957     rc = CFGMR3QueryBytes(pCfgHandle, "MAC", &pThis->MacAddress, sizeof(pThis->MacAddress));
     957    rc = CFGMR3QueryBytes(pCfg, "MAC", &pThis->MacAddress, sizeof(pThis->MacAddress));
    958958    if (RT_FAILURE(rc))
    959959        return PDMDRV_SET_ERROR(pDrvIns, rc, N_("Configuration error: Failed to query \"MAC\""));
    960960# endif
    961961
    962     rc = CFGMR3QueryStringAlloc(pCfgHandle, "Device", &pThis->pszDeviceName);
     962    rc = CFGMR3QueryStringAlloc(pCfg, "Device", &pThis->pszDeviceName);
    963963    if (RT_FAILURE(rc))
    964964        pThis->fStatic = false;
     
    992992
    993993    int32_t iFile;
    994     rc = CFGMR3QueryS32(pCfgHandle, "FileHandle", &iFile);
     994    rc = CFGMR3QueryS32(pCfg, "FileHandle", &iFile);
    995995    if (RT_FAILURE(rc))
    996996        return PDMDRV_SET_ERROR(pDrvIns, rc,
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