VirtualBox

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


Ignore:
Timestamp:
Jan 22, 2010 11:15:43 AM (15 years ago)
Author:
vboxsync
Message:

PDMIBASE refactoring; use UUID as interface IDs.

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

Legend:

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

    r25876 r25966  
    5151#include <iprt/semaphore.h>
    5252#include <iprt/string.h>
     53#include <iprt/uuid.h>
    5354#include <VBox/pdmdev.h>
    5455#include <VBox/tm.h>
     
    832833/**
    833834 * Device state structure. Holds the current state of device.
     835 *
     836 * @implements  PDMINETWORKPORT
     837 * @implements  PDMINETWORKCONFIG
     838 * @implements  PDMILEDPORTS
    834839 */
    835840struct E1kState_st
     
    44554460
    44564461/**
    4457  * Provides interfaces to the driver.
    4458  *
    4459  * @returns Pointer to interface. NULL if the interface is not supported.
    4460  * @param   pInterface          Pointer to this interface structure.
    4461  * @param   enmInterface        The requested interface identification.
    4462  * @thread  EMT
    4463  */
    4464 static DECLCALLBACK(void *) e1kQueryInterface(struct PDMIBASE *pInterface, PDMINTERFACE enmInterface)
    4465 {
    4466     E1KSTATE *pState = IFACE_TO_STATE(pInterface, IBase);
    4467     Assert(&pState->IBase == pInterface);
    4468     switch (enmInterface)
    4469     {
    4470         case PDMINTERFACE_BASE:
    4471             return &pState->IBase;
    4472         case PDMINTERFACE_NETWORK_PORT:
    4473             return &pState->INetworkPort;
    4474         case PDMINTERFACE_NETWORK_CONFIG:
    4475             return &pState->INetworkConfig;
    4476         case PDMINTERFACE_LED_PORTS:
    4477             return &pState->ILeds;
    4478         default:
    4479             return NULL;
    4480     }
     4462 * @interface_method_impl{PDMIBASE,pfnQueryInterface}
     4463 */
     4464static DECLCALLBACK(void *) e1kQueryInterface(struct PDMIBASE *pInterface, const char *pszIID)
     4465{
     4466    E1KSTATE *pThis = IFACE_TO_STATE(pInterface, IBase);
     4467    Assert(&pThis->IBase == pInterface);
     4468
     4469    if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0)
     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;
     4475    if (RTUuidCompare2Strs(pszIID, PDMINTERFACE_LED_PORTS) == 0)
     4476        return &pThis->ILeds;
     4477    return NULL;
    44814478}
    44824479
  • trunk/src/VBox/Devices/Network/DevINIP.cpp

    r25728 r25966  
    4747#include <VBox/pdmdev.h>
    4848#include <VBox/tm.h>
     49#include <iprt/assert.h>
    4950#include <iprt/string.h>
    50 #include <iprt/assert.h>
     51#include <iprt/uuid.h>
    5152
    5253#include "../Builtins.h"
     
    6768/**
    6869 * Internal Network IP stack device instance data.
     70 *
     71 * @implements PDMIBASE
     72 * @implements PDMINETWORKPORT
    6973 */
    7074typedef struct DEVINTNETIP
    7175{
    72     /** The base interface. */
     76    /** The base interface for LUN\#0. */
    7377    PDMIBASE                IBase;
    74     /** The network port this device provides. */
     78    /** The network port this device provides (LUN\#0). */
    7579    PDMINETWORKPORT         INetworkPort;
    7680    /** The base interface of the network driver below us. */
     
    387391
    388392/**
    389  * Queries an interface to the device.
    390  *
    391  * @returns Pointer to interface.
    392  * @returns NULL if the interface was not supported by the device.
    393  * @param   pInterface          Pointer to this interface structure.
    394  * @param   enmInterface        The requested interface identification.
    395  * @thread  Any thread.
     393 * @interface_method_impl{PDMIBASE,pfnQueryInterface}
    396394 */
    397395static DECLCALLBACK(void *) devINIPQueryInterface(PPDMIBASE pInterface,
    398                                                   PDMINTERFACE enmInterface)
    399 {
    400     PDEVINTNETIP pThis = (PDEVINTNETIP)((uintptr_t)pInterface - RT_OFFSETOF(DEVINTNETIP, IBase));
    401     switch (enmInterface)
    402     {
    403         case PDMINTERFACE_BASE:
    404             return &pThis->IBase;
    405         case PDMINTERFACE_NETWORK_PORT:
    406             return &pThis->INetworkPort;
    407         default:
    408             return NULL;
    409     }
     396                                                  const char *pszIID)
     397{
     398    PDEVINTNETIP pThis = RT_FROM_MEMBER(pInterface, DEVINTNETIP, IBase);
     399    if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0)
     400        return &pThis->IBase;
     401    if (RTUuidCompare2Strs(pszIID, PDMINTERFACE_NETWORK_PORT) == 0)
     402        return &pThis->INetworkPort;
     403    return NULL;
    410404}
    411405
  • trunk/src/VBox/Devices/Network/DevPCNet.cpp

    r25780 r25966  
    6868# include <iprt/mem.h>
    6969# include <iprt/semaphore.h>
     70# include <iprt/uuid.h>
    7071#endif
    7172
     
    109110typedef struct PCNetState_st PCNetState;
    110111
     112/**
     113 * PCNET state.
     114 *
     115 * @extends     PCIDEVICE
     116 * @implements  PDMIBASE
     117 * @implements  PDMINETWORKPORT
     118 * @implements  PDMINETWORKCONFIG
     119 * @implements  PDMILEDPORTS
     120 */
    111121struct PCNetState_st
    112122{
     
    197207    /** Pointer to the attached network driver. */
    198208    R3PTRTYPE(PPDMIBASE)                pDrvBase;
    199     /** The base interface. */
     209    /** LUN\#0 + status LUN: The base interface. */
    200210    PDMIBASE                            IBase;
    201     /** The network port interface. */
     211    /** LUN\#0: The network port interface. */
    202212    PDMINETWORKPORT                     INetworkPort;
    203     /** The network config port interface. */
     213    /** LUN\#0: The network config port interface. */
    204214    PDMINETWORKCONFIG                   INetworkConfig;
    205215    /** Base address of the MMIO region. */
     
    221231    /** The LED. */
    222232    PDMLED                              Led;
    223     /** The LED ports. */
     233    /** Status LUN: The LED ports. */
    224234    PDMILEDPORTS                        ILeds;
    225235    /** Partner of ILeds. */
     
    44714481
    44724482/**
    4473  * Queries an interface to the driver.
    4474  *
    4475  * @returns Pointer to interface.
    4476  * @returns NULL if the interface was not supported by the driver.
    4477  * @param   pInterface          Pointer to this interface structure.
    4478  * @param   enmInterface        The requested interface identification.
    4479  * @thread  Any thread.
    4480  */
    4481 static DECLCALLBACK(void *) pcnetQueryInterface(struct PDMIBASE *pInterface, PDMINTERFACE enmInterface)
    4482 {
    4483     PCNetState *pThis = (PCNetState *)((uintptr_t)pInterface - RT_OFFSETOF(PCNetState, IBase));
     4483 * @interface_method_impl{PDMIBASE,pfnQueryInterface}
     4484 */
     4485static DECLCALLBACK(void *) pcnetQueryInterface(struct PDMIBASE *pInterface, const char *pszIID)
     4486{
     4487    PCNetState *pThis = RT_FROM_MEMBER(pInterface, PCNetState, IBase);
    44844488    Assert(&pThis->IBase == pInterface);
    4485     switch (enmInterface)
    4486     {
    4487         case PDMINTERFACE_BASE:
    4488             return &pThis->IBase;
    4489         case PDMINTERFACE_NETWORK_PORT:
    4490             return &pThis->INetworkPort;
    4491         case PDMINTERFACE_NETWORK_CONFIG:
    4492             return &pThis->INetworkConfig;
    4493         case PDMINTERFACE_LED_PORTS:
    4494             return &pThis->ILeds;
    4495         default:
    4496             return NULL;
    4497     }
     4489    if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0)
     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;
     4495    if (RTUuidCompare2Strs(pszIID, PDMINTERFACE_LED_PORTS) == 0)
     4496        return &pThis->ILeds;
     4497    return NULL;
    44984498}
    44994499
  • trunk/src/VBox/Devices/Network/DevVirtioNet.cpp

    r25955 r25966  
    22/** @file
    33 * DevVirtioNet - Virtio Network Device
    4  *
    54 */
    65
     
    2928#ifdef IN_RING3
    3029# include <iprt/mem.h>
     30# include <iprt/uuid.h>
    3131#endif /* IN_RING3 */
    3232#include "../Builtins.h"
     
    107107/**
    108108 * Device state structure. Holds the current state of device.
    109  */
    110 
     109 *
     110 * @extends     VPCISTATE
     111 * @implements  PDMINETWORKPORT
     112 * @implements  PDMINETWORKCONFIG
     113 */
    111114struct VNetState_st
    112115{
     
    578581
    579582/**
    580  * Provides interfaces to the driver.
    581  *
    582  * @returns Pointer to interface. NULL if the interface is not supported.
    583  * @param   pInterface          Pointer to this interface structure.
    584  * @param   enmInterface        The requested interface identification.
    585  * @thread  EMT
    586  */
    587 static DECLCALLBACK(void *) vnetQueryInterface(struct PDMIBASE *pInterface, PDMINTERFACE enmInterface)
    588 {
    589     VNETSTATE *pState = IFACE_TO_STATE(pInterface, VPCI.IBase);
    590     Assert(&pState->VPCI.IBase == pInterface);
    591     switch (enmInterface)
    592     {
    593         case PDMINTERFACE_NETWORK_PORT:
    594             return &pState->INetworkPort;
    595         case PDMINTERFACE_NETWORK_CONFIG:
    596             return &pState->INetworkConfig;
    597         default:
    598             return vpciQueryInterface(pInterface, enmInterface);
    599     }
     583 * @interface_method_impl{PDMIBASE,pfnQueryInterface}
     584 */
     585static DECLCALLBACK(void *) vnetQueryInterface(struct PDMIBASE *pInterface, const char *pszIID)
     586{
     587    VNETSTATE *pThis = IFACE_TO_STATE(pInterface, VPCI.IBase);
     588    Assert(&pThis->VPCI.IBase == pInterface);
     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;
     594    return vpciQueryInterface(pInterface, pszIID);
    600595}
    601596
     
    858853    }
    859854
    860     Log3(("%s vnetTransmitPendingPackets: About to trasmit %d pending packets\n", INSTANCE(pState), 
     855    Log3(("%s vnetTransmitPendingPackets: About to trasmit %d pending packets\n", INSTANCE(pState),
    861856          vringReadAvailIndex(&pState->VPCI, &pState->pTxQueue->VRing) - pState->pTxQueue->uNextAvailIndex));
    862857
     
    965960            u32MicroDiff, pState->u32AvgDiff, pState->u32MinDiff, pState->u32MaxDiff));
    966961
    967 //    Log3(("%s vnetTxTimer: Expired\n", INSTANCE(pState))); 
     962//    Log3(("%s vnetTxTimer: Expired\n", INSTANCE(pState)));
    968963    vnetTransmitPendingPackets(pState, pState->pTxQueue);
    969964    if (RT_FAILURE(vnetCsEnter(pState, VERR_SEM_BUSY)))
     
    14611456
    14621457    /* Initialize PCI part first. */
    1463     pState->VPCI.IBase.pfnQueryInterface     = vnetQueryInterface;
     1458    pState->VPCI.IBase.pfnQueryInterface    = vnetQueryInterface;
    14641459    rc = vpciConstruct(pDevIns, &pState->VPCI, iInstance,
    14651460                       VNET_NAME_FMT, VNET_PCI_SUBSYSTEM_ID,
  • trunk/src/VBox/Devices/Network/DrvIntNet.cpp

    r25893 r25966  
    3939#include <iprt/time.h>
    4040#include <iprt/thread.h>
     41#include <iprt/uuid.h>
    4142
    4243#include "../Builtins.h"
     
    6364/**
    6465 * Block driver instance data.
     66 *
     67 * @implements  PDMINETWORKCONNECTOR
    6568 */
    6669typedef struct DRVINTNET
     
    576579
    577580/**
    578  * Queries an interface to the driver.
    579  *
    580  * @returns Pointer to interface.
    581  * @returns NULL if the interface was not supported by the driver.
    582  * @param   pInterface          Pointer to this interface structure.
    583  * @param   enmInterface        The requested interface identification.
    584  * @thread  Any thread.
    585  */
    586 static DECLCALLBACK(void *) drvIntNetQueryInterface(PPDMIBASE pInterface, PDMINTERFACE enmInterface)
     581 * @interface_method_impl{PDMIBASE,pfnQueryInterface}
     582 */
     583static DECLCALLBACK(void *) drvIntNetQueryInterface(PPDMIBASE pInterface, const char *pszIID)
    587584{
    588585    PPDMDRVINS pDrvIns = PDMIBASE_2_PDMDRV(pInterface);
    589     PDRVINTNET pThis = PDMINS_2_DATA(pDrvIns, PDRVINTNET);
    590     switch (enmInterface)
    591     {
    592         case PDMINTERFACE_BASE:
    593             return &pDrvIns->IBase;
    594         case PDMINTERFACE_NETWORK_CONNECTOR:
    595             return &pThis->INetworkConnector;
    596         default:
    597             return NULL;
    598     }
     586    PDRVINTNET pThis   = PDMINS_2_DATA(pDrvIns, PDRVINTNET);
     587
     588    if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0)
     589        return &pDrvIns->IBase;
     590    if (RTUuidCompare2Strs(pszIID, PDMINTERFACE_NETWORK_CONNECTOR) == 0)
     591        return &pThis->INetworkConnector;
     592    return NULL;
    599593}
    600594
  • trunk/src/VBox/Devices/Network/DrvNAT.cpp

    r25893 r25966  
    55
    66/*
    7  * Copyright (C) 2006-2009 Sun Microsystems, Inc.
     7 * Copyright (C) 2006-2010 Sun Microsystems, Inc.
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    3737#include <iprt/cidr.h>
    3838#include <iprt/stream.h>
     39#include <iprt/uuid.h>
    3940
    4041#include "Builtins.h"
     
    118119/**
    119120 * NAT network transport driver instance data.
     121 *
     122 * @implements  PDMINETWORKCONNECTOR
    120123 */
    121124typedef struct DRVNAT
     
    803806
    804807/**
    805  * Queries an interface to the driver.
    806  *
    807  * @returns Pointer to interface.
    808  * @returns NULL if the interface was not supported by the driver.
    809  * @param   pInterface          Pointer to this interface structure.
    810  * @param   enmInterface        The requested interface identification.
    811  * @thread  Any thread.
    812  */
    813 static DECLCALLBACK(void *) drvNATQueryInterface(PPDMIBASE pInterface, PDMINTERFACE enmInterface)
    814 {
    815     PPDMDRVINS pDrvIns = PDMIBASE_2_PDMDRV(pInterface);
    816     PDRVNAT pThis = PDMINS_2_DATA(pDrvIns, PDRVNAT);
    817     switch (enmInterface)
    818     {
    819         case PDMINTERFACE_BASE:
    820             return &pDrvIns->IBase;
    821         case PDMINTERFACE_NETWORK_CONNECTOR:
    822             return &pThis->INetworkConnector;
    823         default:
    824             return NULL;
    825     }
     808 * @interface_method_impl{PDMIBASE,pfnQueryInterface}
     809 */
     810static DECLCALLBACK(void *) drvNATQueryInterface(PPDMIBASE pInterface, const char *pszIID)
     811{
     812    PPDMDRVINS  pDrvIns = PDMIBASE_2_PDMDRV(pInterface);
     813    PDRVNAT     pThis = PDMINS_2_DATA(pDrvIns, PDRVNAT);
     814
     815    if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0)
     816        return &pDrvIns->IBase;
     817    if (RTUuidCompare2Strs(pszIID, PDMINTERFACE_NETWORK_CONNECTOR) == 0)
     818        return &pThis->INetworkConnector;
     819    return NULL;
    826820}
    827821
     
    10391033                                N_("Configuration error: the above device/driver didn't "
    10401034                                "export the network port interface"));
    1041     pThis->pConfig =
    1042                 (PPDMINETWORKCONFIG)pDrvIns->pUpBase->pfnQueryInterface(pDrvIns->pUpBase,
    1043                                                                         PDMINTERFACE_NETWORK_CONFIG);
     1035    pThis->pConfig = (PPDMINETWORKCONFIG)pDrvIns->pUpBase->pfnQueryInterface(pDrvIns->pUpBase,
     1036                                                                             PDMINTERFACE_NETWORK_CONFIG);
    10441037    if (!pThis->pConfig)
    10451038        return PDMDRV_SET_ERROR(pDrvIns, VERR_PDM_MISSING_INTERFACE_ABOVE,
  • trunk/src/VBox/Devices/Network/DrvNetSniffer.cpp

    r25893 r25966  
     1/* $Id$ */
    12/** @file
    2  *
    3  * VBox network devices:
    4  * Network sniffer filter driver
     3 * DrvNetSniffer - Network sniffer filter driver.
    54 */
    65
    76/*
    8  * Copyright (C) 2006-2007 Sun Microsystems, Inc.
     7 * Copyright (C) 2006-2010 Sun Microsystems, Inc.
    98 *
    109 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    3029#include <VBox/log.h>
    3130#include <iprt/assert.h>
     31#include <iprt/critsect.h>
    3232#include <iprt/file.h>
    3333#include <iprt/process.h>
    3434#include <iprt/string.h>
    3535#include <iprt/time.h>
    36 #include <iprt/critsect.h>
     36#include <iprt/uuid.h>
    3737#include <VBox/param.h>
    3838
     
    4646/**
    4747 * Block driver instance data.
     48 *
     49 * @implements  PDMINETWORKCONNECTOR
     50 * @implements  PDMINETWORKPORT
     51 * @implements  PDMINETWORKCONFIG
    4852 */
    4953typedef struct DRVNETSNIFFER
     
    248252
    249253/**
    250  * Queries an interface to the driver.
    251  *
    252  * @returns Pointer to interface.
    253  * @returns NULL if the interface was not supported by the driver.
    254  * @param   pInterface          Pointer to this interface structure.
    255  * @param   enmInterface        The requested interface identification.
    256  * @thread  Any thread.
    257  */
    258 static DECLCALLBACK(void *) drvNetSnifferQueryInterface(PPDMIBASE pInterface, PDMINTERFACE enmInterface)
    259 {
    260     PPDMDRVINS pDrvIns = PDMIBASE_2_PDMDRV(pInterface);
    261     PDRVNETSNIFFER pThis = PDMINS_2_DATA(pDrvIns, PDRVNETSNIFFER);
    262     switch (enmInterface)
    263     {
    264         case PDMINTERFACE_BASE:
    265             return &pDrvIns->IBase;
    266         case PDMINTERFACE_NETWORK_CONNECTOR:
    267             return &pThis->INetworkConnector;
    268         case PDMINTERFACE_NETWORK_PORT:
    269             return &pThis->INetworkPort;
    270         case PDMINTERFACE_NETWORK_CONFIG:
    271             return &pThis->INetworkConfig;
    272         default:
    273             return NULL;
    274     }
     254 * @interface_method_impl{PDMIBASE,pfnQueryInterface}
     255 */
     256static DECLCALLBACK(void *) drvNetSnifferQueryInterface(PPDMIBASE pInterface, const char *pszIID)
     257{
     258    PPDMDRVINS      pDrvIns = PDMIBASE_2_PDMDRV(pInterface);
     259    PDRVNETSNIFFER  pThis   = PDMINS_2_DATA(pDrvIns, PDRVNETSNIFFER);
     260    if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0)
     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;
     268    return NULL;
    275269}
    276270
  • trunk/src/VBox/Devices/Network/DrvTAP.cpp

    r25893 r25966  
    1 /** $Id$ */
     1/* $Id$ */
    22/** @file
    3  * Universial TAP network transport driver.
     3 * DrvTAP - Universial TAP network transport driver.
    44 */
    55
    66/*
    7  * Copyright (C) 2006-2007 Sun Microsystems, Inc.
     7 * Copyright (C) 2006-2010 Sun Microsystems, Inc.
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    2727#include <VBox/pdmdrv.h>
    2828
     29#include <iprt/asm.h>
    2930#include <iprt/assert.h>
    3031#include <iprt/ctype.h>
    3132#include <iprt/file.h>
     33#include <iprt/path.h>
     34#include <iprt/semaphore.h>
    3235#include <iprt/string.h>
    33 #include <iprt/path.h>
    3436#include <iprt/thread.h>
    35 #include <iprt/asm.h>
    36 #include <iprt/semaphore.h>
     37#include <iprt/uuid.h>
    3738#ifdef RT_OS_SOLARIS
    3839# include <iprt/process.h>
     
    8081*******************************************************************************/
    8182/**
    82  * Block driver instance data.
     83 * TAP driver instance data.
     84 *
     85 * @implements PDMINETWORKCONNECTOR
    8386 */
    8487typedef struct DRVTAP
     
    774777
    775778/**
    776  * Queries an interface to the driver.
    777  *
    778  * @returns Pointer to interface.
    779  * @returns NULL if the interface was not supported by the driver.
    780  * @param   pInterface          Pointer to this interface structure.
    781  * @param   enmInterface        The requested interface identification.
    782  * @thread  Any thread.
    783  */
    784 static DECLCALLBACK(void *) drvTAPQueryInterface(PPDMIBASE pInterface, PDMINTERFACE enmInterface)
    785 {
    786     PPDMDRVINS pDrvIns = PDMIBASE_2_PDMDRV(pInterface);
    787     PDRVTAP pThis = PDMINS_2_DATA(pDrvIns, PDRVTAP);
    788     switch (enmInterface)
    789     {
    790         case PDMINTERFACE_BASE:
    791             return &pDrvIns->IBase;
    792         case PDMINTERFACE_NETWORK_CONNECTOR:
    793             return &pThis->INetworkConnector;
    794         default:
    795             return NULL;
    796     }
     779 * @interface_method_impl{PDMIBASE,pfnQueryInterface}
     780 */
     781static DECLCALLBACK(void *) drvTAPQueryInterface(PPDMIBASE pInterface, const char *pszIID)
     782{
     783    PPDMDRVINS  pDrvIns = PDMIBASE_2_PDMDRV(pInterface);
     784    PDRVTAP     pThis   = PDMINS_2_DATA(pDrvIns, PDRVTAP);
     785
     786    if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0)
     787        return &pDrvIns->IBase;
     788    if (RTUuidCompare2Strs(pszIID, PDMINTERFACE_NETWORK_CONNECTOR) == 0)
     789        return &pThis->INetworkConnector;
     790    return NULL;
    797791}
    798792
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