Changeset 26173 in vbox for trunk/src/VBox/Devices/Network
- Timestamp:
- Feb 2, 2010 9:11:09 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 57187
- Location:
- trunk/src/VBox/Devices/Network
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/DevE1000.cpp
r26160 r26173 5025 5025 * @interface_method_impl{PDMDEVREG,pfnConstruct} 5026 5026 */ 5027 static DECLCALLBACK(int) e1kConstruct(PPDMDEVINS pDevIns, int iInstance, PCFGMNODE pCfg Handle)5027 static DECLCALLBACK(int) e1kConstruct(PPDMDEVINS pDevIns, int iInstance, PCFGMNODE pCfg) 5028 5028 { 5029 5029 E1KSTATE* pState = PDMINS_2_DATA(pDevIns, E1KSTATE*); … … 5040 5040 * Validate configuration. 5041 5041 */ 5042 if (!CFGMR3AreValuesValid(pCfg Handle, "MAC\0" "CableConnected\0" "AdapterType\0" "LineSpeed\0"))5042 if (!CFGMR3AreValuesValid(pCfg, "MAC\0" "CableConnected\0" "AdapterType\0" "LineSpeed\0")) 5043 5043 return PDMDEV_SET_ERROR(pDevIns, VERR_PDM_DEVINS_UNKNOWN_CFG_VALUES, 5044 5044 N_("Invalid configuration for E1000 device")); … … 5047 5047 5048 5048 /* Get config params */ 5049 rc = CFGMR3QueryBytes(pCfg Handle, "MAC", pState->macConfigured.au8,5049 rc = CFGMR3QueryBytes(pCfg, "MAC", pState->macConfigured.au8, 5050 5050 sizeof(pState->macConfigured.au8)); 5051 5051 if (RT_FAILURE(rc)) 5052 5052 return PDMDEV_SET_ERROR(pDevIns, rc, 5053 5053 N_("Configuration error: Failed to get MAC address")); 5054 rc = CFGMR3QueryBool(pCfg Handle, "CableConnected", &pState->fCableConnected);5054 rc = CFGMR3QueryBool(pCfg, "CableConnected", &pState->fCableConnected); 5055 5055 if (RT_FAILURE(rc)) 5056 5056 return PDMDEV_SET_ERROR(pDevIns, rc, 5057 5057 N_("Configuration error: Failed to get the value of 'CableConnected'")); 5058 rc = CFGMR3QueryU32(pCfg Handle, "AdapterType", (uint32_t*)&pState->eChip);5058 rc = CFGMR3QueryU32(pCfg, "AdapterType", (uint32_t*)&pState->eChip); 5059 5059 if (RT_FAILURE(rc)) 5060 5060 return PDMDEV_SET_ERROR(pDevIns, rc, -
trunk/src/VBox/Devices/Network/DevINIP.cpp
r26165 r26173 446 446 */ 447 447 static DECLCALLBACK(int) devINIPConstruct(PPDMDEVINS pDevIns, int iInstance, 448 PCFGMNODE pCfg Handle)448 PCFGMNODE pCfg) 449 449 { 450 450 PDEVINTNETIP pThis = PDMINS_2_DATA(pDevIns, PDEVINTNETIP); 451 451 int rc = VINF_SUCCESS; 452 LogFlow(("%s: pDevIns=%p iInstance=%d pCfg Handle=%p\n", __FUNCTION__,453 pDevIns, iInstance, pCfg Handle));452 LogFlow(("%s: pDevIns=%p iInstance=%d pCfg=%p\n", __FUNCTION__, 453 pDevIns, iInstance, pCfg)); 454 454 455 455 Assert(iInstance == 0); … … 459 459 * Validate the config. 460 460 */ 461 if (!CFGMR3AreValuesValid(pCfg Handle, "MAC\0IP\0Netmask\0Gateway\0"))461 if (!CFGMR3AreValuesValid(pCfg, "MAC\0IP\0Netmask\0Gateway\0")) 462 462 { 463 463 rc = PDMDEV_SET_ERROR(pDevIns, VERR_PDM_DEVINS_UNKNOWN_CFG_VALUES, … … 483 483 * Get the configuration settings. 484 484 */ 485 rc = CFGMR3QueryBytes(pCfg Handle, "MAC", &pThis->MAC, sizeof(pThis->MAC));485 rc = CFGMR3QueryBytes(pCfg, "MAC", &pThis->MAC, sizeof(pThis->MAC)); 486 486 if (rc == VERR_CFGM_NOT_BYTES) 487 487 { 488 488 char szMAC[64]; 489 rc = CFGMR3QueryString(pCfg Handle, "MAC", &szMAC[0], sizeof(szMAC));489 rc = CFGMR3QueryString(pCfg, "MAC", &szMAC[0], sizeof(szMAC)); 490 490 if (RT_SUCCESS(rc)) 491 491 { … … 520 520 goto out; 521 521 } 522 rc = CFGMR3QueryStringAlloc(pCfg Handle, "IP", &pThis->pszIP);522 rc = CFGMR3QueryStringAlloc(pCfg, "IP", &pThis->pszIP); 523 523 if (RT_FAILURE(rc)) 524 524 { … … 527 527 goto out; 528 528 } 529 rc = CFGMR3QueryStringAlloc(pCfg Handle, "Netmask", &pThis->pszNetmask);529 rc = CFGMR3QueryStringAlloc(pCfg, "Netmask", &pThis->pszNetmask); 530 530 if (RT_FAILURE(rc)) 531 531 { … … 534 534 goto out; 535 535 } 536 rc = CFGMR3QueryStringAlloc(pCfg Handle, "Gateway", &pThis->pszGateway);536 rc = CFGMR3QueryStringAlloc(pCfg, "Gateway", &pThis->pszGateway); 537 537 if (rc == VERR_CFGM_VALUE_NOT_FOUND) 538 538 rc = VINF_SUCCESS; -
trunk/src/VBox/Devices/Network/DevPCNet.cpp
r26165 r26173 4933 4933 * @interface_method_impl{PDMDEVREG,pfnConstruct} 4934 4934 */ 4935 static DECLCALLBACK(int) pcnetConstruct(PPDMDEVINS pDevIns, int iInstance, PCFGMNODE pCfg Handle)4935 static DECLCALLBACK(int) pcnetConstruct(PPDMDEVINS pDevIns, int iInstance, PCFGMNODE pCfg) 4936 4936 { 4937 4937 PCNetState *pThis = PDMINS_2_DATA(pDevIns, PCNetState *); … … 4957 4957 * Validate configuration. 4958 4958 */ 4959 if (!CFGMR3AreValuesValid(pCfg Handle, "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")) 4960 4960 return PDMDEV_SET_ERROR(pDevIns, VERR_PDM_DEVINS_UNKNOWN_CFG_VALUES, 4961 4961 N_("Invalid configuration for pcnet device")); … … 4964 4964 * Read the configuration. 4965 4965 */ 4966 rc = CFGMR3QueryBytes(pCfg Handle, "MAC", &pThis->MacConfigured, sizeof(pThis->MacConfigured));4966 rc = CFGMR3QueryBytes(pCfg, "MAC", &pThis->MacConfigured, sizeof(pThis->MacConfigured)); 4967 4967 if (RT_FAILURE(rc)) 4968 4968 return PDMDEV_SET_ERROR(pDevIns, rc, 4969 4969 N_("Configuration error: Failed to get the \"MAC\" value")); 4970 rc = CFGMR3QueryBoolDef(pCfg Handle, "CableConnected", &pThis->fLinkUp, true);4970 rc = CFGMR3QueryBoolDef(pCfg, "CableConnected", &pThis->fLinkUp, true); 4971 4971 if (RT_FAILURE(rc)) 4972 4972 return PDMDEV_SET_ERROR(pDevIns, rc, 4973 4973 N_("Configuration error: Failed to get the \"CableConnected\" value")); 4974 4974 4975 rc = CFGMR3QueryBoolDef(pCfg Handle, "Am79C973", &pThis->fAm79C973, false);4975 rc = CFGMR3QueryBoolDef(pCfg, "Am79C973", &pThis->fAm79C973, false); 4976 4976 if (RT_FAILURE(rc)) 4977 4977 return PDMDEV_SET_ERROR(pDevIns, rc, 4978 4978 N_("Configuration error: Failed to get the \"Am79C973\" value")); 4979 4979 4980 rc = CFGMR3QueryU32Def(pCfg Handle, "LineSpeed", &pThis->u32LinkSpeed, 1000000); /* 1GBit/s (in kbps units)*/4980 rc = CFGMR3QueryU32Def(pCfg, "LineSpeed", &pThis->u32LinkSpeed, 1000000); /* 1GBit/s (in kbps units)*/ 4981 4981 if (RT_FAILURE(rc)) 4982 4982 return PDMDEV_SET_ERROR(pDevIns, rc, … … 4984 4984 4985 4985 #ifdef PCNET_GC_ENABLED 4986 rc = CFGMR3QueryBoolDef(pCfg Handle, "GCEnabled", &pThis->fGCEnabled, true);4986 rc = CFGMR3QueryBoolDef(pCfg, "GCEnabled", &pThis->fGCEnabled, true); 4987 4987 if (RT_FAILURE(rc)) 4988 4988 return PDMDEV_SET_ERROR(pDevIns, rc, 4989 4989 N_("Configuration error: Failed to get the \"GCEnabled\" value")); 4990 4990 4991 rc = CFGMR3QueryBoolDef(pCfg Handle, "R0Enabled", &pThis->fR0Enabled, true);4991 rc = CFGMR3QueryBoolDef(pCfg, "R0Enabled", &pThis->fR0Enabled, true); 4992 4992 if (RT_FAILURE(rc)) 4993 4993 return PDMDEV_SET_ERROR(pDevIns, rc, … … 5066 5066 5067 5067 bool fPrivIfEnabled; 5068 rc = CFGMR3QueryBool(pCfg Handle, "PrivIfEnabled", &fPrivIfEnabled);5068 rc = CFGMR3QueryBool(pCfg, "PrivIfEnabled", &fPrivIfEnabled); 5069 5069 if (rc == VERR_CFGM_VALUE_NOT_FOUND) 5070 5070 fPrivIfEnabled = true; -
trunk/src/VBox/Devices/Network/DevVirtioNet.cpp
r26160 r26173 1621 1621 * @interface_method_impl{PDMDEVREG,pfnConstruct} 1622 1622 */ 1623 static DECLCALLBACK(int) vnetConstruct(PPDMDEVINS pDevIns, int iInstance, PCFGMNODE pCfg Handle)1623 static DECLCALLBACK(int) vnetConstruct(PPDMDEVINS pDevIns, int iInstance, PCFGMNODE pCfg) 1624 1624 { 1625 1625 VNETSTATE* pState = PDMINS_2_DATA(pDevIns, VNETSTATE*); … … 1643 1643 * Validate configuration. 1644 1644 */ 1645 if (!CFGMR3AreValuesValid(pCfg Handle, "MAC\0" "CableConnected\0" "LineSpeed\0"))1645 if (!CFGMR3AreValuesValid(pCfg, "MAC\0" "CableConnected\0" "LineSpeed\0")) 1646 1646 return PDMDEV_SET_ERROR(pDevIns, VERR_PDM_DEVINS_UNKNOWN_CFG_VALUES, 1647 1647 N_("Invalid configuration for VirtioNet device")); 1648 1648 1649 1649 /* Get config params */ 1650 rc = CFGMR3QueryBytes(pCfg Handle, "MAC", pState->macConfigured.au8,1650 rc = CFGMR3QueryBytes(pCfg, "MAC", pState->macConfigured.au8, 1651 1651 sizeof(pState->macConfigured)); 1652 1652 if (RT_FAILURE(rc)) 1653 1653 return PDMDEV_SET_ERROR(pDevIns, rc, 1654 1654 N_("Configuration error: Failed to get MAC address")); 1655 rc = CFGMR3QueryBool(pCfg Handle, "CableConnected", &pState->fCableConnected);1655 rc = CFGMR3QueryBool(pCfg, "CableConnected", &pState->fCableConnected); 1656 1656 if (RT_FAILURE(rc)) 1657 1657 return PDMDEV_SET_ERROR(pDevIns, rc, -
trunk/src/VBox/Devices/Network/DrvIntNet.cpp
r26166 r26173 808 808 * @copydoc FNPDMDRVCONSTRUCT 809 809 */ 810 static DECLCALLBACK(int) drvR3IntNetConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg Handle, uint32_t fFlags)810 static DECLCALLBACK(int) drvR3IntNetConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags) 811 811 { 812 812 PDRVINTNET pThis = PDMINS_2_DATA(pDrvIns, PDRVINTNET); … … 835 835 * Validate the config. 836 836 */ 837 if (!CFGMR3AreValuesValid(pCfg Handle,837 if (!CFGMR3AreValuesValid(pCfg, 838 838 "Network\0" 839 839 "Trunk\0" … … 884 884 * The name of the internal network to connect to. 885 885 */ 886 int rc = CFGMR3QueryString(pCfg Handle, "Network", OpenReq.szNetwork, sizeof(OpenReq.szNetwork));886 int rc = CFGMR3QueryString(pCfg, "Network", OpenReq.szNetwork, sizeof(OpenReq.szNetwork)); 887 887 if (RT_FAILURE(rc)) 888 888 return PDMDRV_SET_ERROR(pDrvIns, rc, … … 894 894 */ 895 895 uint32_t u32TrunkType; 896 rc = CFGMR3QueryU32(pCfg Handle, "TrunkType", &u32TrunkType);896 rc = CFGMR3QueryU32(pCfg, "TrunkType", &u32TrunkType); 897 897 if (rc == VERR_CFGM_VALUE_NOT_FOUND) 898 898 u32TrunkType = kIntNetTrunkType_None; … … 905 905 * The name of the trunk connection. 906 906 */ 907 rc = CFGMR3QueryString(pCfg Handle, "Trunk", OpenReq.szTrunk, sizeof(OpenReq.szTrunk));907 rc = CFGMR3QueryString(pCfg, "Trunk", OpenReq.szTrunk, sizeof(OpenReq.szTrunk)); 908 908 if (rc == VERR_CFGM_VALUE_NOT_FOUND) 909 909 OpenReq.szTrunk[0] = '\0'; … … 917 917 */ 918 918 bool fRestrictAccess; 919 rc = CFGMR3QueryBool(pCfg Handle, "RestrictAccess", &fRestrictAccess);919 rc = CFGMR3QueryBool(pCfg, "RestrictAccess", &fRestrictAccess); 920 920 if (rc == VERR_CFGM_VALUE_NOT_FOUND) 921 921 fRestrictAccess = true; … … 928 928 * When set all request for operating any interface or trunk in promiscuous 929 929 * mode will be ignored. */ 930 rc = CFGMR3QueryBoolDef(pCfg Handle, "IgnoreAllPromisc", &f, false);930 rc = CFGMR3QueryBoolDef(pCfg, "IgnoreAllPromisc", &f, false); 931 931 if (RT_FAILURE(rc)) 932 932 return PDMDRV_SET_ERROR(pDrvIns, rc, … … 939 939 * mode will be ignored. This differs from IgnoreAllPromisc in that clients 940 940 * won't get VERR_INTNET_INCOMPATIBLE_FLAGS. */ 941 rc = CFGMR3QueryBoolDef(pCfg Handle, "QuietlyIgnoreAllPromisc", &f, false);941 rc = CFGMR3QueryBoolDef(pCfg, "QuietlyIgnoreAllPromisc", &f, false); 942 942 if (RT_FAILURE(rc)) 943 943 return PDMDRV_SET_ERROR(pDrvIns, rc, … … 949 949 * When set all request for operating any non-trunk interface in promiscuous 950 950 * mode will be ignored. */ 951 rc = CFGMR3QueryBoolDef(pCfg Handle, "IgnoreClientPromisc", &f, false);951 rc = CFGMR3QueryBoolDef(pCfg, "IgnoreClientPromisc", &f, false); 952 952 if (RT_FAILURE(rc)) 953 953 return PDMDRV_SET_ERROR(pDrvIns, rc, … … 960 960 * will be ignored. This differs from IgnoreClientPromisc in that clients won't 961 961 * get VERR_INTNET_INCOMPATIBLE_FLAGS. */ 962 rc = CFGMR3QueryBoolDef(pCfg Handle, "QuietlyIgnoreClientPromisc", &f, false);962 rc = CFGMR3QueryBoolDef(pCfg, "QuietlyIgnoreClientPromisc", &f, false); 963 963 if (RT_FAILURE(rc)) 964 964 return PDMDRV_SET_ERROR(pDrvIns, rc, … … 970 970 * When set all request for operating the trunk-wire connection in promiscuous 971 971 * mode will be ignored. */ 972 rc = CFGMR3QueryBoolDef(pCfg Handle, "IgnoreTrunkWirePromisc", &f, false);972 rc = CFGMR3QueryBoolDef(pCfg, "IgnoreTrunkWirePromisc", &f, false); 973 973 if (RT_FAILURE(rc)) 974 974 return PDMDRV_SET_ERROR(pDrvIns, rc, … … 981 981 * will be ignored. This differs from IgnoreTrunkWirePromisc in that clients 982 982 * won't get VERR_INTNET_INCOMPATIBLE_FLAGS. */ 983 rc = CFGMR3QueryBoolDef(pCfg Handle, "QuietlyIgnoreTrunkWirePromisc", &f, false);983 rc = CFGMR3QueryBoolDef(pCfg, "QuietlyIgnoreTrunkWirePromisc", &f, false); 984 984 if (RT_FAILURE(rc)) 985 985 return PDMDRV_SET_ERROR(pDrvIns, rc, … … 991 991 * When set all request for operating the trunk-host connection in promiscuous 992 992 * mode will be ignored. */ 993 rc = CFGMR3QueryBoolDef(pCfg Handle, "IgnoreTrunkHostPromisc", &f, false);993 rc = CFGMR3QueryBoolDef(pCfg, "IgnoreTrunkHostPromisc", &f, false); 994 994 if (RT_FAILURE(rc)) 995 995 return PDMDRV_SET_ERROR(pDrvIns, rc, … … 1002 1002 * will be ignored. This differs from IgnoreTrunkHostPromisc in that clients 1003 1003 * won't get VERR_INTNET_INCOMPATIBLE_FLAGS. */ 1004 rc = CFGMR3QueryBoolDef(pCfg Handle, "QuietlyIgnoreTrunkHostPromisc", &f, false);1004 rc = CFGMR3QueryBoolDef(pCfg, "QuietlyIgnoreTrunkHostPromisc", &f, false); 1005 1005 if (RT_FAILURE(rc)) 1006 1006 return PDMDRV_SET_ERROR(pDrvIns, rc, … … 1018 1018 */ 1019 1019 bool fSharedMacOnWire; 1020 rc = CFGMR3QueryBoolDef(pCfg Handle, "SharedMacOnWire", &fSharedMacOnWire, false);1020 rc = CFGMR3QueryBoolDef(pCfg, "SharedMacOnWire", &fSharedMacOnWire, false); 1021 1021 if (RT_FAILURE(rc)) 1022 1022 return PDMDRV_SET_ERROR(pDrvIns, rc, … … 1028 1028 * The size of the receive buffer. 1029 1029 */ 1030 rc = CFGMR3QueryU32(pCfg Handle, "ReceiveBufferSize", &OpenReq.cbRecv);1030 rc = CFGMR3QueryU32(pCfg, "ReceiveBufferSize", &OpenReq.cbRecv); 1031 1031 if (rc == VERR_CFGM_VALUE_NOT_FOUND) 1032 1032 OpenReq.cbRecv = 218 * _1K ; … … 1043 1043 * side of it and the code will get very upset about it all. 1044 1044 */ 1045 rc = CFGMR3QueryU32(pCfg Handle, "SendBufferSize", &OpenReq.cbSend);1045 rc = CFGMR3QueryU32(pCfg, "SendBufferSize", &OpenReq.cbSend); 1046 1046 if (rc == VERR_CFGM_VALUE_NOT_FOUND) 1047 1047 OpenReq.cbSend = 36*_1K; … … 1059 1059 * a service such as LWIP/iSCSI it shouldn't suspend immediately like for a NIC. 1060 1060 */ 1061 rc = CFGMR3QueryBool(pCfg Handle, "IsService", &pThis->fActivateEarlyDeactivateLate);1061 rc = CFGMR3QueryBool(pCfg, "IsService", &pThis->fActivateEarlyDeactivateLate); 1062 1062 if (rc == VERR_CFGM_VALUE_NOT_FOUND) 1063 1063 pThis->fActivateEarlyDeactivateLate = false; -
trunk/src/VBox/Devices/Network/DrvNAT.cpp
r26166 r26173 863 863 * 864 864 * @returns VBox status code. 865 * @param pCfg Handle The driversconfiguration handle.866 */ 867 static int drvNATConstructRedir(unsigned iInstance, PDRVNAT pThis, PCFGMNODE pCfg Handle, RTIPV4ADDR Network)865 * @param pCfg The configuration handle. 866 */ 867 static int drvNATConstructRedir(unsigned iInstance, PDRVNAT pThis, PCFGMNODE pCfg, RTIPV4ADDR Network) 868 868 { 869 869 RTMAC Mac; … … 872 872 * Enumerate redirections. 873 873 */ 874 for (PCFGMNODE pNode = CFGMR3GetFirstChild(pCfg Handle); pNode; pNode = CFGMR3GetNextChild(pNode))874 for (PCFGMNODE pNode = CFGMR3GetFirstChild(pCfg); pNode; pNode = CFGMR3GetNextChild(pNode)) 875 875 { 876 876 /* … … 966 966 * @copydoc FNPDMDRVCONSTRUCT 967 967 */ 968 static DECLCALLBACK(int) drvNATConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg Handle, uint32_t fFlags)968 static DECLCALLBACK(int) drvNATConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags) 969 969 { 970 970 PDRVNAT pThis = PDMINS_2_DATA(pDrvIns, PDRVNAT); … … 975 975 * Validate the config. 976 976 */ 977 if (!CFGMR3AreValuesValid(pCfg Handle,977 if (!CFGMR3AreValuesValid(pCfg, 978 978 "PassDomain\0TFTPPrefix\0BootFile\0Network" 979 979 "\0NextServer\0DNSProxy\0BindIP\0UseHostResolver\0" … … 1006 1006 int rc; 1007 1007 bool fPassDomain = true; 1008 GET_BOOL(rc, pThis, pCfg Handle, "PassDomain", fPassDomain);1009 1010 GET_STRING_ALLOC(rc, pThis, pCfg Handle, "TFTPPrefix", pThis->pszTFTPPrefix);1011 GET_STRING_ALLOC(rc, pThis, pCfg Handle, "BootFile", pThis->pszBootFile);1012 GET_STRING_ALLOC(rc, pThis, pCfg Handle, "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); 1013 1013 1014 1014 int fDNSProxy = 0; 1015 GET_S32(rc, pThis, pCfg Handle, "DNSProxy", fDNSProxy);1015 GET_S32(rc, pThis, pCfg, "DNSProxy", fDNSProxy); 1016 1016 int fUseHostResolver = 0; 1017 GET_S32(rc, pThis, pCfg Handle, "UseHostResolver", fUseHostResolver);1017 GET_S32(rc, pThis, pCfg, "UseHostResolver", fUseHostResolver); 1018 1018 #ifdef VBOX_WITH_SLIRP_BSD_MBUF 1019 1019 int MTU = 1500; 1020 GET_S32(rc, pThis, pCfg Handle, "SlirpMTU", MTU);1020 GET_S32(rc, pThis, pCfg, "SlirpMTU", MTU); 1021 1021 #endif 1022 1022 … … 1037 1037 /* Generate a network address for this network card. */ 1038 1038 char szNetwork[32]; /* xxx.xxx.xxx.xxx/yy */ 1039 GET_STRING(rc, pThis, pCfg Handle, "Network", szNetwork[0], sizeof(szNetwork));1039 GET_STRING(rc, pThis, pCfg, "Network", szNetwork[0], sizeof(szNetwork)); 1040 1040 if (rc == VERR_CFGM_VALUE_NOT_FOUND) 1041 1041 RTStrPrintf(szNetwork, sizeof(szNetwork), "10.0.%d.0/24", pDrvIns->iInstance + 2); … … 1068 1068 #endif 1069 1069 char *pszBindIP = NULL; 1070 GET_STRING_ALLOC(rc, pThis, pCfg Handle, "BindIP", pszBindIP);1070 GET_STRING_ALLOC(rc, pThis, pCfg, "BindIP", pszBindIP); 1071 1071 rc = slirp_set_binding_address(pThis->pNATState, pszBindIP); 1072 1072 if (rc != 0) … … 1079 1079 { \ 1080 1080 int len = 0; \ 1081 rc = CFGMR3QueryS32(pCfg Handle, name, &len); \1081 rc = CFGMR3QueryS32(pCfg, name, &len); \ 1082 1082 if (RT_SUCCESS(rc)) \ 1083 1083 setter(pThis->pNATState, len); \ … … 1096 1096 #endif 1097 1097 1098 int rc2 = drvNATConstructRedir(pDrvIns->iInstance, pThis, pCfg Handle, Network);1098 int rc2 = drvNATConstructRedir(pDrvIns->iInstance, pThis, pCfg, Network); 1099 1099 if (RT_SUCCESS(rc2)) 1100 1100 { -
trunk/src/VBox/Devices/Network/DrvNetSniffer.cpp
r26166 r26173 350 350 * @copydoc FNPDMDRVCONSTRUCT 351 351 */ 352 static DECLCALLBACK(int) drvNetSnifferConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg Handle, uint32_t fFlags)352 static DECLCALLBACK(int) drvNetSnifferConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags) 353 353 { 354 354 PDRVNETSNIFFER pThis = PDMINS_2_DATA(pDrvIns, PDRVNETSNIFFER); … … 359 359 * Validate the config. 360 360 */ 361 if (!CFGMR3AreValuesValid(pCfg Handle, "File\0"))361 if (!CFGMR3AreValuesValid(pCfg, "File\0")) 362 362 return VERR_PDM_DRVINS_UNKNOWN_CFG_VALUES; 363 363 364 if (CFGMR3GetFirstChild(pCfg Handle))364 if (CFGMR3GetFirstChild(pCfg)) 365 365 LogRel(("NetSniffer: Found child config entries -- are you trying to redirect ports?\n")); 366 366 … … 389 389 * Get the filename. 390 390 */ 391 int rc = CFGMR3QueryString(pCfg Handle, "File", pThis->szFilename, sizeof(pThis->szFilename));391 int rc = CFGMR3QueryString(pCfg, "File", pThis->szFilename, sizeof(pThis->szFilename)); 392 392 if (rc == VERR_CFGM_VALUE_NOT_FOUND) 393 393 { -
trunk/src/VBox/Devices/Network/DrvTAP.cpp
r26166 r26173 879 879 * @copydoc FNPDMDRVCONSTRUCT 880 880 */ 881 static DECLCALLBACK(int) drvTAPConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg Handle, uint32_t fFlags)881 static DECLCALLBACK(int) drvTAPConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags) 882 882 { 883 883 PDRVTAP pThis = PDMINS_2_DATA(pDrvIns, PDRVTAP); … … 911 911 * Validate the config. 912 912 */ 913 if (!CFGMR3AreValuesValid(pCfg Handle, "Device\0InitProg\0TermProg\0FileHandle\0TAPSetupApplication\0TAPTerminateApplication\0MAC"))913 if (!CFGMR3AreValuesValid(pCfg, "Device\0InitProg\0TermProg\0FileHandle\0TAPSetupApplication\0TAPTerminateApplication\0MAC")) 914 914 return PDMDRV_SET_ERROR(pDrvIns, VERR_PDM_DRVINS_UNKNOWN_CFG_VALUES, ""); 915 915 … … 934 934 int rc; 935 935 #if defined(RT_OS_SOLARIS) /** @todo Other platforms' TAP code should be moved here from ConsoleImpl & VBoxBFE. */ 936 rc = CFGMR3QueryStringAlloc(pCfg Handle, "TAPSetupApplication", &pThis->pszSetupApplication);936 rc = CFGMR3QueryStringAlloc(pCfg, "TAPSetupApplication", &pThis->pszSetupApplication); 937 937 if (RT_SUCCESS(rc)) 938 938 { … … 944 944 return PDMDRV_SET_ERROR(pDrvIns, rc, N_("Configuration error: failed to query \"TAPTerminateApplication\"")); 945 945 946 rc = CFGMR3QueryStringAlloc(pCfg Handle, "TAPTerminateApplication", &pThis->pszTerminateApplication);946 rc = CFGMR3QueryStringAlloc(pCfg, "TAPTerminateApplication", &pThis->pszTerminateApplication); 947 947 if (RT_SUCCESS(rc)) 948 948 { … … 955 955 956 956 # ifdef VBOX_WITH_CROSSBOW 957 rc = CFGMR3QueryBytes(pCfg Handle, "MAC", &pThis->MacAddress, sizeof(pThis->MacAddress));957 rc = CFGMR3QueryBytes(pCfg, "MAC", &pThis->MacAddress, sizeof(pThis->MacAddress)); 958 958 if (RT_FAILURE(rc)) 959 959 return PDMDRV_SET_ERROR(pDrvIns, rc, N_("Configuration error: Failed to query \"MAC\"")); 960 960 # endif 961 961 962 rc = CFGMR3QueryStringAlloc(pCfg Handle, "Device", &pThis->pszDeviceName);962 rc = CFGMR3QueryStringAlloc(pCfg, "Device", &pThis->pszDeviceName); 963 963 if (RT_FAILURE(rc)) 964 964 pThis->fStatic = false; … … 992 992 993 993 int32_t iFile; 994 rc = CFGMR3QueryS32(pCfg Handle, "FileHandle", &iFile);994 rc = CFGMR3QueryS32(pCfg, "FileHandle", &iFile); 995 995 if (RT_FAILURE(rc)) 996 996 return PDMDRV_SET_ERROR(pDrvIns, rc,
Note:
See TracChangeset
for help on using the changeset viewer.