VirtualBox

Changeset 25981 in vbox


Ignore:
Timestamp:
Jan 22, 2010 6:42:01 PM (15 years ago)
Author:
vboxsync
Message:

pdmifs.h: yet another batch of refactored interface ID code.

Location:
trunk
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/pdmifs.h

    r25974 r25981  
    44
    55/*
    6  * Copyright (C) 2006-2008 Sun Microsystems, Inc.
     6 * Copyright (C) 2006-2010 Sun Microsystems, Inc.
    77 *
    88 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    4646 * @{
    4747 */
    48 /** PDMIISCSITRANSPORT      - The iSCSI transport interface         (Up)    No coupling.
    49  * used by the iSCSI media driver.  */
    50 #define PDMINTERFACE_ISCSITRANSPORT             "b69c9b49-fd24-4955-8d8b-40aaead815e5"
    51 /** PDMIISCSITRANSPORTASYNC - The asynchronous iSCSI interface      (Up)    Couple with PDMINTERFACE_ISCSITRANSPORT.
    52  * extension used by the iSCSI media driver.  */
    53 #define PDMINTERFACE_ISCSITRANSPORTASYNC        "f6751563-c378-4928-b7fe-411873112ac3"
    54 /** PDMIISCSITRANSPORTASYNCPORT - The asynchronous iSCSI interface  (Down)  Couple with PDMINTERFACE_ISCSITRANSPORTASYNC.
    55  * notify port used by the iSCSI media driver.  */
    56 #define PDMINTERFACE_ISCSITRANSPORTASYNCPORT    "6ab0fbf1-aa72-4b27-bc46-f58896ba0392"
    57 
    58 /** PDMINETWORKPORT         - The network port interface.           (Down)  Coupled with PDMINTERFACE_NETWORK_CONNECTOR. */
    59 #define PDMINTERFACE_NETWORK_PORT               "eb66670b-7998-4470-8e72-886e30f6a9c3"
    60 /** PDMINETWORKPORT         - The network connector interface.      (Up)    Coupled with PDMINTERFACE_NETWORK_PORT. */
    61 #define PDMINTERFACE_NETWORK_CONNECTOR          "b4b6f850-50d0-4ddf-9efa-daee80194dca"
    62 /** PDMINETWORKCONFIG       - The network configuartion interface.  (Main)  Used by the managment api. */
    63 #define PDMINTERFACE_NETWORK_CONFIG             "d6d909e8-716d-415d-b109-534e4478ff4e"
    64 
    6548/** PDMIAUDIOCONNECTOR      - The audio driver interface.           (Up)    No coupling. */
    6649#define PDMINTERFACE_AUDIO_CONNECTOR            "85d52af5-b3aa-4b3e-b176-4b5ebfc52f47"
     
    11541137
    11551138
    1156 /**
    1157  * iSCSI Request PDU buffer (gather).
    1158  */
    1159 typedef struct ISCSIREQ
    1160 {
    1161     /** Length of PDU segment in bytes. */
    1162     size_t cbSeg;
    1163     /** Pointer to PDU segment. */
    1164     const void *pcvSeg;
    1165 } ISCSIREQ;
    1166 /** Pointer to an iSCSI Request PDU buffer. */
    1167 typedef ISCSIREQ *PISCSIREQ;
    1168 /** Pointer to a const iSCSI Request PDU buffer. */
    1169 typedef ISCSIREQ const *PCISCSIREQ;
    1170 
    1171 
    1172 /**
    1173  * iSCSI Response PDU buffer (scatter).
    1174  */
    1175 typedef struct ISCSIRES
    1176 {
    1177     /** Length of PDU segment. */
    1178     size_t cbSeg;
    1179     /** Pointer to PDU segment. */
    1180     void *pvSeg;
    1181 } ISCSIRES;
    1182 /** Pointer to an iSCSI Response PDU buffer. */
    1183 typedef ISCSIRES *PISCSIRES;
    1184 /** Pointer to a const iSCSI Response PDU buffer. */
    1185 typedef ISCSIRES const *PCISCSIRES;
    1186 
    1187 
    1188 /** Pointer to an iSCSI transport driver interface. */
    1189 typedef struct PDMIISCSITRANSPORT *PPDMIISCSITRANSPORT;
    1190 /**
    1191  * iSCSI transport driver interface.
    1192  */
    1193 typedef struct PDMIISCSITRANSPORT
    1194 {
    1195     /**
    1196      * Read bytes from an iSCSI transport stream. If the connection fails, it is automatically
    1197      * reopened on the next call after the error is signalled. Error recovery in this case is
    1198      * the duty of the caller.
    1199      *
    1200      * @returns VBox status code.
    1201      * @param   pTransport      Pointer to the interface structure containing the called function pointer.
    1202      * @param   paResponses     Array of scatter segments.
    1203      * @param   cResponses      The number of segments.
    1204      * @thread  Any thread.
    1205      * @todo    Correct the docs.
    1206      */
    1207     DECLR3CALLBACKMEMBER(int, pfnRead,(PPDMIISCSITRANSPORT pTransport, PISCSIRES paResponses, unsigned cResponses));
    1208 
    1209     /**
    1210      * Write bytes to an iSCSI transport stream. Padding is performed when necessary. If the connection
    1211      * fails, it is automatically reopened on the next call after the error is signalled. Error recovery
    1212      * in this case is the duty of the caller.
    1213      *
    1214      * @returns VBox status code.
    1215      * @param   pTransport      Pointer to the interface structure containing the called function pointer.
    1216      * @param   paRequests      Array of gather segments.
    1217      * @param   cRequests       The number of segments.
    1218      * @thread  Any thread.
    1219      * @todo    Correct the docs.
    1220      */
    1221     DECLR3CALLBACKMEMBER(int, pfnWrite,(PPDMIISCSITRANSPORT pTransport, PISCSIREQ paRequests, unsigned cRequests));
    1222 
    1223     /**
    1224      * Open the iSCSI transport stream.
    1225      *
    1226      * @returns VBox status code.
    1227      * @param   pTransport       Pointer to the interface structure containing the called function pointer.
    1228      * @param   pszTargetAddress Pointer to string of the format address:port.
    1229      * @thread  Any thread.
    1230      */
    1231     DECLR3CALLBACKMEMBER(int, pfnOpen,(PPDMIISCSITRANSPORT pTransport, const char *pszTargetAddress));
    1232 
    1233     /**
    1234      * Close the iSCSI transport stream.
    1235      *
    1236      * @returns VBox status code.
    1237      * @param   pTransport      Pointer to the interface structure containing the called function pointer.
    1238      * @thread  Any thread.
    1239      */
    1240     DECLR3CALLBACKMEMBER(int, pfnClose,(PPDMIISCSITRANSPORT pTransport));
    1241 } PDMIISCSITRANSPORT;
    1242 
    1243 
    1244 /** Pointer to an asynchronous iSCSI transport driver interface. */
    1245 typedef struct PDMIISCSITRANSPORTASYNC *PPDMIISCSITRANSPORTASYNC;
    1246 /**
    1247  * Asynchronous iSCSI transport driver interface.
    1248  */
    1249 typedef struct PDMIISCSITRANSPORTASYNC
    1250 {
    1251     /**
    1252      * Start an asynchronous read request from an iSCSI transport stream. Padding is performed when necessary.
    1253      *
    1254      * @returns VBox status code.
    1255      * @param   pTransport      Pointer to the interface structure containing the called function pointer.
    1256      * @param   paResponses     Pointer to a array of scatter segments.
    1257      * @param   cResponses      Number of segments in the array.
    1258      * @param   pvUser          User argument which is returned in completion callback.
    1259      * @thread  EMT thread.
    1260      */
    1261     DECLR3CALLBACKMEMBER(int, pfnStartRead,(PPDMIISCSITRANSPORTASYNC pTransport, PISCSIRES paResponses, unsigned cResponses, void *pvUser));
    1262 
    1263     /**
    1264      * Start an asychronous write to an iSCSI transport stream. Padding is performed when necessary.
    1265      *
    1266      * @returns VBox status code.
    1267      * @param   pTransport      Pointer to the interface structure containing the called function pointer.
    1268      * @param   paRequests      Pointer to a array of gather segments.
    1269      * @param   cRequests       Number of segments in the array.
    1270      * @param   pvUser          User argument which is returned in completion callback.
    1271      * @thread  EMT thread.
    1272      */
    1273     DECLR3CALLBACKMEMBER(int, pfnStartWrite,(PPDMIISCSITRANSPORTASYNC pTransport, PISCSIREQ pRequests, unsigned cRequests, void *pvUser));
    1274 } PDMIISCSITRANSPORTASYNC;
    1275 
    1276 
    1277 /** Pointer to a asynchronous iSCSI transport notify interface. */
    1278 typedef struct PDMIISCSITRANSPORTASYNCPORT *PPDMIISCSITRANSPORTASYNCPORT;
    1279 /**
    1280  * Asynchronous iSCSI transport notify interface.
    1281  * Pair with PDMIISCSITRANSPORTASYNC.
    1282  */
    1283 typedef struct PDMIISCSITRANSPORTASYNCPORT
    1284 {
    1285     /**
    1286      * Notify completion of a read task.
    1287      *
    1288      * @returns VBox status code.
    1289      * @param   pInterface      Pointer to the interface structure containing the called function pointer.
    1290      * @param   paResponses     Pointer to a array of scatter segments.
    1291      * @param   cResponses      Number of segments in the array.
    1292      * @param   pvUser          The user argument given in pfnStartRead.
    1293      * @thread  Any thread.
    1294      */
    1295     DECLR3CALLBACKMEMBER(int, pfnReadCompleteNotify, (PPDMIISCSITRANSPORTASYNCPORT pInterface, PISCSIRES paResponses, unsigned cResponse, void *pvUser));
    1296 
    1297     /**
    1298      * Notify completion of a write task.
    1299      *
    1300      * @returns VBox status code.
    1301      * @param   pInterface      Pointer to the interface structure containing the called function pointer.
    1302      * @param   paRequests      Pointer to a array of gather segments.
    1303      * @param   cRequests       Number of segments in the array.
    1304      * @param   pvUser          The user argument given in pfnStartWrite.
    1305      * @thread  Any thread.
    1306      */
    1307     DECLR3CALLBACKMEMBER(int, pfnWriteCompleteNotify, (PPDMIISCSITRANSPORTASYNCPORT pTransport, PISCSIREQ paRequests, unsigned cRequests, void *pvUser));
    1308 } PDMIISCSITRANSPORTASYNCPORT;
     1139
    13091140
    13101141
     
    21391970typedef struct PDMINETWORKPORT *PPDMINETWORKPORT;
    21401971/**
    2141  * Network port interface.
     1972 * Network port interface (down).
     1973 * Pair with PDMINETWORKCONNECTOR.
    21421974 */
    21431975typedef struct PDMINETWORKPORT
     
    21671999
    21682000} PDMINETWORKPORT;
     2001/** PDMINETWORKPORT inteface ID. */
     2002#define PDMINETWORKPORT_IID                     "eb66670b-7998-4470-8e72-886e30f6a9c3"
    21692003
    21702004
     
    21882022typedef struct PDMINETWORKCONNECTOR *PPDMINETWORKCONNECTOR;
    21892023/**
    2190  * Network connector interface.
     2024 * Network connector interface (up).
     2025 * Pair with PDMINETWORKPORT.
    21912026 */
    21922027typedef struct PDMINETWORKCONNECTOR
     
    22272062
    22282063} PDMINETWORKCONNECTOR;
     2064/** PDMINETWORKCONNECTOR interface ID. */
     2065#define PDMINETWORKCONNECTOR_IID                "b4b6f850-50d0-4ddf-9efa-daee80194dca"
    22292066
    22302067
     
    22322069typedef struct PDMINETWORKCONFIG *PPDMINETWORKCONFIG;
    22332070/**
    2234  * Network config port interface.
     2071 * Network config port interface (main).
     2072 * No interface pair.
    22352073 */
    22362074typedef struct PDMINETWORKCONFIG
     
    22662104
    22672105} PDMINETWORKCONFIG;
     2106/** PDMINETWORKCONFIG interface ID. */
     2107#define PDMINETWORKCONFIG_IID                   "d6d909e8-716d-415d-b109-534e4478ff4e"
    22682108
    22692109
  • trunk/src/VBox/Devices/Network/DevE1000.cpp

    r25966 r25981  
    44694469    if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0)
    44704470        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);
    44754473    if (RTUuidCompare2Strs(pszIID, PDMINTERFACE_LED_PORTS) == 0)
    44764474        return &pThis->ILeds;
     
    50735071                                       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"));
    50745072        }
    5075         pState->pDrv = (PPDMINETWORKCONNECTOR)
    5076             pState->pDrvBase->pfnQueryInterface(pState->pDrvBase, PDMINTERFACE_NETWORK_CONNECTOR);
     5073        pState->pDrv = PDMIBASE_QUERY_INTERFACE(pState->pDrvBase, PDMINETWORKCONNECTOR);
    50775074        if (!pState->pDrv)
    50785075        {
     
    52915288#endif
    52925289        }
    5293         pState->pDrv = (PPDMINETWORKCONNECTOR)pState->pDrvBase->pfnQueryInterface(pState->pDrvBase, PDMINTERFACE_NETWORK_CONNECTOR);
     5290        pState->pDrv = PDMIBASE_QUERY_INTERFACE(pState->pDrvBase, PDMINETWORKCONNECTOR);
    52945291        if (!pState->pDrv)
    52955292        {
  • trunk/src/VBox/Devices/Network/DevINIP.cpp

    r25966 r25981  
    399399    if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0)
    400400        return &pThis->IBase;
    401     if (RTUuidCompare2Strs(pszIID, PDMINTERFACE_NETWORK_PORT) == 0)
    402         return &pThis->INetworkPort;
     401    PDMIBASE_RETURN_INTERFACE(pszIID, PDMINETWORKPORT, &pThis->INetworkPort);
    403402    return NULL;
    404403}
     
    530529    else
    531530    {
    532         pThis->pDrv = (PPDMINETWORKCONNECTOR)pThis->pDrvBase->pfnQueryInterface(pThis->pDrvBase, PDMINTERFACE_NETWORK_CONNECTOR);
     531        pThis->pDrv = PDMIBASE_QUERY_INTERFACE(pThis->pDrvBase, PDMINETWORKCONNECTOR);
    533532        if (!pThis->pDrv)
    534533        {
  • trunk/src/VBox/Devices/Network/DevPCNet.cpp

    r25966 r25981  
    44894489    if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0)
    44904490        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);
    44954493    if (RTUuidCompare2Strs(pszIID, PDMINTERFACE_LED_PORTS) == 0)
    44964494        return &pThis->ILeds;
     
    48244822#endif
    48254823        }
    4826         pThis->pDrv = (PPDMINETWORKCONNECTOR)pThis->pDrvBase->pfnQueryInterface(pThis->pDrvBase, PDMINTERFACE_NETWORK_CONNECTOR);
     4824        pThis->pDrv = PDMIBASE_QUERY_INTERFACE(pThis->pDrvBase, PDMINETWORKCONNECTOR);
    48274825        if (!pThis->pDrv)
    48284826        {
     
    52175215#endif
    52185216        }
    5219         pThis->pDrv = (PPDMINETWORKCONNECTOR)
    5220             pThis->pDrvBase->pfnQueryInterface(pThis->pDrvBase, PDMINTERFACE_NETWORK_CONNECTOR);
     5217        pThis->pDrv = PDMIBASE_QUERY_INTERFACE(pThis->pDrvBase, PDMINETWORKCONNECTOR);
    52215218        if (!pThis->pDrv)
    52225219        {
  • trunk/src/VBox/Devices/Network/DevVirtioNet.cpp

    r25966 r25981  
    588588    Assert(&pThis->VPCI.IBase == pInterface);
    589589
    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);
    594592    return vpciQueryInterface(pInterface, pszIID);
    595593}
     
    15641562                                       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"));
    15651563        }
    1566         pState->pDrv = (PPDMINETWORKCONNECTOR)
    1567             pState->pDrvBase->pfnQueryInterface(pState->pDrvBase, PDMINTERFACE_NETWORK_CONNECTOR);
     1564        pState->pDrv = PDMIBASE_QUERY_INTERFACE(pState->pDrvBase, PDMINETWORKCONNECTOR);
    15681565        if (!pState->pDrv)
    15691566        {
     
    17461743#endif
    17471744        }
    1748         pState->pDrv = (PPDMINETWORKCONNECTOR)pState->pDrvBase->pfnQueryInterface(pState->pDrvBase, PDMINTERFACE_NETWORK_CONNECTOR);
     1745        pState->pDrv = PDMIBASE_QUERY_INTERFACE(pState->pDrvBase, PDMINETWORKCONNECTOR);
    17491746        if (!pState->pDrv)
    17501747        {
  • trunk/src/VBox/Devices/Network/DrvIntNet.cpp

    r25966 r25981  
    588588    if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0)
    589589        return &pDrvIns->IBase;
    590     if (RTUuidCompare2Strs(pszIID, PDMINTERFACE_NETWORK_CONNECTOR) == 0)
    591         return &pThis->INetworkConnector;
     590    PDMIBASE_RETURN_INTERFACE(pszIID, PDMINETWORKCONNECTOR, &pThis->INetworkConnector);
    592591    return NULL;
    593592}
     
    820819     * Query the network port interface.
    821820     */
    822     pThis->pPort = (PPDMINETWORKPORT)pDrvIns->pUpBase->pfnQueryInterface(pDrvIns->pUpBase, PDMINTERFACE_NETWORK_PORT);
     821    pThis->pPort = PDMIBASE_QUERY_INTERFACE(pDrvIns->pUpBase, PDMINETWORKPORT);
    823822    if (!pThis->pPort)
    824823    {
     
    826825        return VERR_PDM_MISSING_INTERFACE_ABOVE;
    827826    }
    828     pThis->pConfigIf = (PPDMINETWORKCONFIG)pDrvIns->pUpBase->pfnQueryInterface(pDrvIns->pUpBase, PDMINTERFACE_NETWORK_CONFIG);
     827    pThis->pConfigIf = PDMIBASE_QUERY_INTERFACE(pDrvIns->pUpBase, PDMINETWORKCONFIG);
    829828
    830829    /*
  • trunk/src/VBox/Devices/Network/DrvNAT.cpp

    r25966 r25981  
    815815    if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0)
    816816        return &pDrvIns->IBase;
    817     if (RTUuidCompare2Strs(pszIID, PDMINTERFACE_NETWORK_CONNECTOR) == 0)
    818         return &pThis->INetworkConnector;
     817    PDMIBASE_RETURN_INTERFACE(pszIID, PDMINETWORKCONNECTOR, &pThis->INetworkConnector);
    819818    return NULL;
    820819}
     
    10261025     * Query the network port interface.
    10271026     */
    1028     pThis->pPort =
    1029                 (PPDMINETWORKPORT)pDrvIns->pUpBase->pfnQueryInterface(pDrvIns->pUpBase,
    1030                                                                       PDMINTERFACE_NETWORK_PORT);
     1027    pThis->pPort = PDMIBASE_QUERY_INTERFACE(pDrvIns->pUpBase, PDMINETWORKPORT);
    10311028    if (!pThis->pPort)
    10321029        return PDMDRV_SET_ERROR(pDrvIns, VERR_PDM_MISSING_INTERFACE_ABOVE,
    10331030                                N_("Configuration error: the above device/driver didn't "
    10341031                                "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);
    10371033    if (!pThis->pConfig)
    10381034        return PDMDRV_SET_ERROR(pDrvIns, VERR_PDM_MISSING_INTERFACE_ABOVE,
  • trunk/src/VBox/Devices/Network/DrvNetSniffer.cpp

    r25966 r25981  
    260260    if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0)
    261261        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);
    268265    return NULL;
    269266}
     
    308305    else if (RT_SUCCESS(rc))
    309306    {
    310         pThis->pConnector = (PPDMINETWORKCONNECTOR)pBaseDown->pfnQueryInterface(pBaseDown, PDMINTERFACE_NETWORK_CONNECTOR);
     307        pThis->pConnector = PDMIBASE_QUERY_INTERFACE(pBaseDown, PDMINETWORKCONNECTOR);
    311308        if (!pThis->pConnector)
    312309        {
     
    409406     * Query the network port interface.
    410407     */
    411     pThis->pPort = (PPDMINETWORKPORT)pDrvIns->pUpBase->pfnQueryInterface(pDrvIns->pUpBase, PDMINTERFACE_NETWORK_PORT);
     408    pThis->pPort = PDMIBASE_QUERY_INTERFACE(pDrvIns->pUpBase, PDMINETWORKPORT);
    412409    if (!pThis->pPort)
    413410    {
     
    419416     * Query the network config interface.
    420417     */
    421     pThis->pConfig = (PPDMINETWORKCONFIG)pDrvIns->pUpBase->pfnQueryInterface(pDrvIns->pUpBase, PDMINTERFACE_NETWORK_CONFIG);
     418    pThis->pConfig = PDMIBASE_QUERY_INTERFACE(pDrvIns->pUpBase, PDMINETWORKCONFIG);
    422419    if (!pThis->pConfig)
    423420    {
     
    435432    else if (RT_SUCCESS(rc))
    436433    {
    437         pThis->pConnector = (PPDMINETWORKCONNECTOR)pBaseDown->pfnQueryInterface(pBaseDown, PDMINTERFACE_NETWORK_CONNECTOR);
     434        pThis->pConnector = PDMIBASE_QUERY_INTERFACE(pBaseDown, PDMINETWORKCONNECTOR);
    438435        if (!pThis->pConnector)
    439436        {
  • trunk/src/VBox/Devices/Network/DrvTAP.cpp

    r25966 r25981  
    786786    if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0)
    787787        return &pDrvIns->IBase;
    788     if (RTUuidCompare2Strs(pszIID, PDMINTERFACE_NETWORK_CONNECTOR) == 0)
    789         return &pThis->INetworkConnector;
     788    PDMIBASE_RETURN_INTERFACE(pszIID, PDMINETWORKCONNECTOR, &pThis->INetworkConnector);
    790789    return NULL;
    791790}
     
    922921     * Query the network port interface.
    923922     */
    924     pThis->pPort = (PPDMINETWORKPORT)pDrvIns->pUpBase->pfnQueryInterface(pDrvIns->pUpBase, PDMINTERFACE_NETWORK_PORT);
     923    pThis->pPort = PDMIBASE_QUERY_INTERFACE(pDrvIns->pUpBase, PDMINETWORKPORT);
    925924    if (!pThis->pPort)
    926925        return PDMDRV_SET_ERROR(pDrvIns, VERR_PDM_MISSING_INTERFACE_ABOVE,
  • trunk/src/VBox/Devices/Storage/ISCSIHDDCore.cpp

    r25823 r25981  
     1/* $Id$ */
    12/** @file
    23 * iSCSI initiator driver, VD backend.
     
    256257*   Structures and Typedefs                                                    *
    257258*******************************************************************************/
     259/**
     260 * iSCSI Request PDU buffer (gather).
     261 */
     262typedef struct ISCSIREQ
     263{
     264    /** Length of PDU segment in bytes. */
     265    size_t cbSeg;
     266    /** Pointer to PDU segment. */
     267    const void *pcvSeg;
     268} ISCSIREQ;
     269/** Pointer to an iSCSI Request PDU buffer. */
     270typedef ISCSIREQ *PISCSIREQ;
     271/** Pointer to a const iSCSI Request PDU buffer. */
     272typedef ISCSIREQ const *PCISCSIREQ;
     273
     274
    258275/**
    259276 * Block driver instance data.
     
    411428    size_t cbParamValue;
    412429} ISCSIPARAMETER;
     430
     431
     432/**
     433 * iSCSI Response PDU buffer (scatter).
     434 */
     435typedef struct ISCSIRES
     436{
     437    /** Length of PDU segment. */
     438    size_t cbSeg;
     439    /** Pointer to PDU segment. */
     440    void *pvSeg;
     441} ISCSIRES;
     442/** Pointer to an iSCSI Response PDU buffer. */
     443typedef ISCSIRES *PISCSIRES;
     444/** Pointer to a const iSCSI Response PDU buffer. */
     445typedef ISCSIRES const *PCISCSIRES;
    413446
    414447
  • trunk/src/VBox/Main/ConsoleImpl.cpp

    r25974 r25981  
    35893589                Assert(pBase);
    35903590                PPDMINETWORKCONFIG pINetCfg;
    3591                 pINetCfg = (PPDMINETWORKCONFIG)pBase->pfnQueryInterface(pBase, PDMINTERFACE_NETWORK_CONFIG);
     3591                pINetCfg = PDMIBASE_QUERY_INTERFACE(pBase, PDMINETWORKCONFIG);
    35923592                if (pINetCfg)
    35933593                {
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