Changeset 25981 in vbox for trunk/src/VBox/Devices/Network
- Timestamp:
- Jan 22, 2010 6:42:01 PM (15 years ago)
- Location:
- trunk/src/VBox/Devices/Network
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/DevE1000.cpp
r25966 r25981 4469 4469 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 4470 4470 return &pThis->IBase; 4471 if (RTUuidCompare2Strs(pszIID, PDMINTERFACE_NETWORK_PORT) == 0) 4472 return &pThis->INetworkPort; 4473 if (RTUuidCompare2Strs(pszIID, PDMINTERFACE_NETWORK_CONFIG) == 0) 4474 return &pThis->INetworkConfig; 4471 PDMIBASE_RETURN_INTERFACE(pszIID, PDMINETWORKPORT, &pThis->INetworkPort); 4472 PDMIBASE_RETURN_INTERFACE(pszIID, PDMINETWORKCONFIG, &pThis->INetworkConfig); 4475 4473 if (RTUuidCompare2Strs(pszIID, PDMINTERFACE_LED_PORTS) == 0) 4476 4474 return &pThis->ILeds; … … 5073 5071 N_("A Domain Name Server (DNS) for NAT networking could not be determined. Ensure that your host is correctly connected to an ISP. If you ignore this warning the guest will not be able to perform nameserver lookups and it will probably observe delays if trying so")); 5074 5072 } 5075 pState->pDrv = (PPDMINETWORKCONNECTOR) 5076 pState->pDrvBase->pfnQueryInterface(pState->pDrvBase, PDMINTERFACE_NETWORK_CONNECTOR); 5073 pState->pDrv = PDMIBASE_QUERY_INTERFACE(pState->pDrvBase, PDMINETWORKCONNECTOR); 5077 5074 if (!pState->pDrv) 5078 5075 { … … 5291 5288 #endif 5292 5289 } 5293 pState->pDrv = (PPDMINETWORKCONNECTOR)pState->pDrvBase->pfnQueryInterface(pState->pDrvBase, PDMINTERFACE_NETWORK_CONNECTOR);5290 pState->pDrv = PDMIBASE_QUERY_INTERFACE(pState->pDrvBase, PDMINETWORKCONNECTOR); 5294 5291 if (!pState->pDrv) 5295 5292 { -
trunk/src/VBox/Devices/Network/DevINIP.cpp
r25966 r25981 399 399 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 400 400 return &pThis->IBase; 401 if (RTUuidCompare2Strs(pszIID, PDMINTERFACE_NETWORK_PORT) == 0) 402 return &pThis->INetworkPort; 401 PDMIBASE_RETURN_INTERFACE(pszIID, PDMINETWORKPORT, &pThis->INetworkPort); 403 402 return NULL; 404 403 } … … 530 529 else 531 530 { 532 pThis->pDrv = (PPDMINETWORKCONNECTOR)pThis->pDrvBase->pfnQueryInterface(pThis->pDrvBase, PDMINTERFACE_NETWORK_CONNECTOR);531 pThis->pDrv = PDMIBASE_QUERY_INTERFACE(pThis->pDrvBase, PDMINETWORKCONNECTOR); 533 532 if (!pThis->pDrv) 534 533 { -
trunk/src/VBox/Devices/Network/DevPCNet.cpp
r25966 r25981 4489 4489 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 4490 4490 return &pThis->IBase; 4491 if (RTUuidCompare2Strs(pszIID, PDMINTERFACE_NETWORK_PORT) == 0) 4492 return &pThis->INetworkPort; 4493 if (RTUuidCompare2Strs(pszIID, PDMINTERFACE_NETWORK_CONFIG) == 0) 4494 return &pThis->INetworkConfig; 4491 PDMIBASE_RETURN_INTERFACE(pszIID, PDMINETWORKPORT, &pThis->INetworkPort); 4492 PDMIBASE_RETURN_INTERFACE(pszIID, PDMINETWORKCONFIG, &pThis->INetworkConfig); 4495 4493 if (RTUuidCompare2Strs(pszIID, PDMINTERFACE_LED_PORTS) == 0) 4496 4494 return &pThis->ILeds; … … 4824 4822 #endif 4825 4823 } 4826 pThis->pDrv = (PPDMINETWORKCONNECTOR)pThis->pDrvBase->pfnQueryInterface(pThis->pDrvBase, PDMINTERFACE_NETWORK_CONNECTOR);4824 pThis->pDrv = PDMIBASE_QUERY_INTERFACE(pThis->pDrvBase, PDMINETWORKCONNECTOR); 4827 4825 if (!pThis->pDrv) 4828 4826 { … … 5217 5215 #endif 5218 5216 } 5219 pThis->pDrv = (PPDMINETWORKCONNECTOR) 5220 pThis->pDrvBase->pfnQueryInterface(pThis->pDrvBase, PDMINTERFACE_NETWORK_CONNECTOR); 5217 pThis->pDrv = PDMIBASE_QUERY_INTERFACE(pThis->pDrvBase, PDMINETWORKCONNECTOR); 5221 5218 if (!pThis->pDrv) 5222 5219 { -
trunk/src/VBox/Devices/Network/DevVirtioNet.cpp
r25966 r25981 588 588 Assert(&pThis->VPCI.IBase == pInterface); 589 589 590 if (RTUuidCompare2Strs(pszIID, PDMINTERFACE_NETWORK_PORT) == 0) 591 return &pThis->INetworkPort; 592 if (RTUuidCompare2Strs(pszIID, PDMINTERFACE_NETWORK_CONFIG) == 0) 593 return &pThis->INetworkConfig; 590 PDMIBASE_RETURN_INTERFACE(pszIID, PDMINETWORKPORT, &pThis->INetworkPort); 591 PDMIBASE_RETURN_INTERFACE(pszIID, PDMINETWORKCONFIG, &pThis->INetworkConfig); 594 592 return vpciQueryInterface(pInterface, pszIID); 595 593 } … … 1564 1562 N_("A Domain Name Server (DNS) for NAT networking could not be determined. Ensure that your host is correctly connected to an ISP. If you ignore this warning the guest will not be able to perform nameserver lookups and it will probably observe delays if trying so")); 1565 1563 } 1566 pState->pDrv = (PPDMINETWORKCONNECTOR) 1567 pState->pDrvBase->pfnQueryInterface(pState->pDrvBase, PDMINTERFACE_NETWORK_CONNECTOR); 1564 pState->pDrv = PDMIBASE_QUERY_INTERFACE(pState->pDrvBase, PDMINETWORKCONNECTOR); 1568 1565 if (!pState->pDrv) 1569 1566 { … … 1746 1743 #endif 1747 1744 } 1748 pState->pDrv = (PPDMINETWORKCONNECTOR)pState->pDrvBase->pfnQueryInterface(pState->pDrvBase, PDMINTERFACE_NETWORK_CONNECTOR);1745 pState->pDrv = PDMIBASE_QUERY_INTERFACE(pState->pDrvBase, PDMINETWORKCONNECTOR); 1749 1746 if (!pState->pDrv) 1750 1747 { -
trunk/src/VBox/Devices/Network/DrvIntNet.cpp
r25966 r25981 588 588 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 589 589 return &pDrvIns->IBase; 590 if (RTUuidCompare2Strs(pszIID, PDMINTERFACE_NETWORK_CONNECTOR) == 0) 591 return &pThis->INetworkConnector; 590 PDMIBASE_RETURN_INTERFACE(pszIID, PDMINETWORKCONNECTOR, &pThis->INetworkConnector); 592 591 return NULL; 593 592 } … … 820 819 * Query the network port interface. 821 820 */ 822 pThis->pPort = (PPDMINETWORKPORT)pDrvIns->pUpBase->pfnQueryInterface(pDrvIns->pUpBase, PDMINTERFACE_NETWORK_PORT);821 pThis->pPort = PDMIBASE_QUERY_INTERFACE(pDrvIns->pUpBase, PDMINETWORKPORT); 823 822 if (!pThis->pPort) 824 823 { … … 826 825 return VERR_PDM_MISSING_INTERFACE_ABOVE; 827 826 } 828 pThis->pConfigIf = (PPDMINETWORKCONFIG)pDrvIns->pUpBase->pfnQueryInterface(pDrvIns->pUpBase, PDMINTERFACE_NETWORK_CONFIG);827 pThis->pConfigIf = PDMIBASE_QUERY_INTERFACE(pDrvIns->pUpBase, PDMINETWORKCONFIG); 829 828 830 829 /* -
trunk/src/VBox/Devices/Network/DrvNAT.cpp
r25966 r25981 815 815 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 816 816 return &pDrvIns->IBase; 817 if (RTUuidCompare2Strs(pszIID, PDMINTERFACE_NETWORK_CONNECTOR) == 0) 818 return &pThis->INetworkConnector; 817 PDMIBASE_RETURN_INTERFACE(pszIID, PDMINETWORKCONNECTOR, &pThis->INetworkConnector); 819 818 return NULL; 820 819 } … … 1026 1025 * Query the network port interface. 1027 1026 */ 1028 pThis->pPort = 1029 (PPDMINETWORKPORT)pDrvIns->pUpBase->pfnQueryInterface(pDrvIns->pUpBase, 1030 PDMINTERFACE_NETWORK_PORT); 1027 pThis->pPort = PDMIBASE_QUERY_INTERFACE(pDrvIns->pUpBase, PDMINETWORKPORT); 1031 1028 if (!pThis->pPort) 1032 1029 return PDMDRV_SET_ERROR(pDrvIns, VERR_PDM_MISSING_INTERFACE_ABOVE, 1033 1030 N_("Configuration error: the above device/driver didn't " 1034 1031 "export the network port interface")); 1035 pThis->pConfig = (PPDMINETWORKCONFIG)pDrvIns->pUpBase->pfnQueryInterface(pDrvIns->pUpBase, 1036 PDMINTERFACE_NETWORK_CONFIG); 1032 pThis->pConfig = PDMIBASE_QUERY_INTERFACE(pDrvIns->pUpBase, PDMINETWORKCONFIG); 1037 1033 if (!pThis->pConfig) 1038 1034 return PDMDRV_SET_ERROR(pDrvIns, VERR_PDM_MISSING_INTERFACE_ABOVE, -
trunk/src/VBox/Devices/Network/DrvNetSniffer.cpp
r25966 r25981 260 260 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 261 261 return &pDrvIns->IBase; 262 if (RTUuidCompare2Strs(pszIID, PDMINTERFACE_NETWORK_CONNECTOR) == 0) 263 return &pThis->INetworkConnector; 264 if (RTUuidCompare2Strs(pszIID, PDMINTERFACE_NETWORK_PORT) == 0) 265 return &pThis->INetworkPort; 266 if (RTUuidCompare2Strs(pszIID, PDMINTERFACE_NETWORK_CONFIG) == 0) 267 return &pThis->INetworkConfig; 262 PDMIBASE_RETURN_INTERFACE(pszIID, PDMINETWORKCONNECTOR, &pThis->INetworkConnector); 263 PDMIBASE_RETURN_INTERFACE(pszIID, PDMINETWORKPORT, &pThis->INetworkPort); 264 PDMIBASE_RETURN_INTERFACE(pszIID, PDMINETWORKCONFIG, &pThis->INetworkConfig); 268 265 return NULL; 269 266 } … … 308 305 else if (RT_SUCCESS(rc)) 309 306 { 310 pThis->pConnector = (PPDMINETWORKCONNECTOR)pBaseDown->pfnQueryInterface(pBaseDown, PDMINTERFACE_NETWORK_CONNECTOR);307 pThis->pConnector = PDMIBASE_QUERY_INTERFACE(pBaseDown, PDMINETWORKCONNECTOR); 311 308 if (!pThis->pConnector) 312 309 { … … 409 406 * Query the network port interface. 410 407 */ 411 pThis->pPort = (PPDMINETWORKPORT)pDrvIns->pUpBase->pfnQueryInterface(pDrvIns->pUpBase, PDMINTERFACE_NETWORK_PORT);408 pThis->pPort = PDMIBASE_QUERY_INTERFACE(pDrvIns->pUpBase, PDMINETWORKPORT); 412 409 if (!pThis->pPort) 413 410 { … … 419 416 * Query the network config interface. 420 417 */ 421 pThis->pConfig = (PPDMINETWORKCONFIG)pDrvIns->pUpBase->pfnQueryInterface(pDrvIns->pUpBase, PDMINTERFACE_NETWORK_CONFIG);418 pThis->pConfig = PDMIBASE_QUERY_INTERFACE(pDrvIns->pUpBase, PDMINETWORKCONFIG); 422 419 if (!pThis->pConfig) 423 420 { … … 435 432 else if (RT_SUCCESS(rc)) 436 433 { 437 pThis->pConnector = (PPDMINETWORKCONNECTOR)pBaseDown->pfnQueryInterface(pBaseDown, PDMINTERFACE_NETWORK_CONNECTOR);434 pThis->pConnector = PDMIBASE_QUERY_INTERFACE(pBaseDown, PDMINETWORKCONNECTOR); 438 435 if (!pThis->pConnector) 439 436 { -
trunk/src/VBox/Devices/Network/DrvTAP.cpp
r25966 r25981 786 786 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 787 787 return &pDrvIns->IBase; 788 if (RTUuidCompare2Strs(pszIID, PDMINTERFACE_NETWORK_CONNECTOR) == 0) 789 return &pThis->INetworkConnector; 788 PDMIBASE_RETURN_INTERFACE(pszIID, PDMINETWORKCONNECTOR, &pThis->INetworkConnector); 790 789 return NULL; 791 790 } … … 922 921 * Query the network port interface. 923 922 */ 924 pThis->pPort = (PPDMINETWORKPORT)pDrvIns->pUpBase->pfnQueryInterface(pDrvIns->pUpBase, PDMINTERFACE_NETWORK_PORT);923 pThis->pPort = PDMIBASE_QUERY_INTERFACE(pDrvIns->pUpBase, PDMINETWORKPORT); 925 924 if (!pThis->pPort) 926 925 return PDMDRV_SET_ERROR(pDrvIns, VERR_PDM_MISSING_INTERFACE_ABOVE,
Note:
See TracChangeset
for help on using the changeset viewer.