VirtualBox

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


Ignore:
Timestamp:
Apr 25, 2010 3:10:30 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
60578
Message:

IntNet: Moved the instance pointer from VMMR0.cpp to SrvIntNetR0.cpp and dropped it as an argument to the IntNet API. Also renamed the prefixed to camelcase as 6-7 capital letters in a row is painful to write and read.

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

Legend:

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

    r28701 r28706  
    385385typedef struct INTNET
    386386{
     387    /** Magic number (INTNET_MAGIC). */
     388    uint32_t volatile       u32Magic;
    387389    /** Mutex protecting the creation, opening and destruction of both networks and
    388390     * interfaces.  (This means all operations affecting the pNetworks list.) */
     
    393395    RTHANDLETABLE           hHtIfs;
    394396} INTNET;
    395 
     397/** Pointer to an internal network ring-0 instance. */
     398typedef struct INTNET *PINTNET;
     399
     400/** Magic number for the internal network instance data (Hayao Miyazaki). */
     401#define INTNET_MAGIC        UINT32_C(0x19410105)
     402
     403
     404/*******************************************************************************
     405*   Global Variables                                                           *
     406*******************************************************************************/
     407/** Pointer to the internal network instance data. */
     408static PINTNET volatile g_pIntNet = NULL;
    396409
    397410
     
    25532566         * Edit the source address so that it it's the same as the host.
    25542567         */
    2555         /* ASSUME frame from INTNETR0IfSend! */
     2568        /* ASSUME frame from IntNetR0IfSend! */
    25562569        AssertReturnVoid(pSG->cSegsUsed == 1);
    25572570        AssertReturnVoid(pSG->cbTotal >= sizeof(RTNETETHERHDR));
     
    32273240 *
    32283241 * @returns VBox status code.
    3229  * @param   pIntNet     The instance data.
    32303242 * @param   hIf         The interface handle.
    32313243 * @param   pSession    The caller's session.
    32323244 */
    3233 INTNETR0DECL(int) INTNETR0IfSend(PINTNET pIntNet, INTNETIFHANDLE hIf, PSUPDRVSESSION pSession)
    3234 {
    3235     Log5(("INTNETR0IfSend: pIntNet=%p hIf=%RX32\n", pIntNet, hIf));
     3245INTNETR0DECL(int) IntNetR0IfSend(INTNETIFHANDLE hIf, PSUPDRVSESSION pSession)
     3246{
     3247    Log5(("IntNetR0IfSend: hIf=%RX32\n", hIf));
    32363248
    32373249    /*
    32383250     * Validate input and translate the handle.
    32393251     */
    3240     AssertReturn(pIntNet, VERR_INVALID_PARAMETER);
     3252    PINTNET pIntNet = g_pIntNet;
     3253    AssertPtrReturn(pIntNet, VERR_INVALID_PARAMETER);
     3254    AssertReturn(pIntNet->u32Magic, VERR_INVALID_MAGIC);
     3255
    32413256    PINTNETIF pIf = (PINTNETIF)RTHandleTableLookupWithCtx(pIntNet->hHtIfs, hIf, pSession);
    32423257    if (!pIf)
     
    33353350
    33363351/**
    3337  * VMMR0 request wrapper for INTNETR0IfSend.
    3338  *
    3339  * @returns see INTNETR0IfSend.
    3340  * @param   pIntNet         The internal networking instance.
     3352 * VMMR0 request wrapper for IntNetR0IfSend.
     3353 *
     3354 * @returns see IntNetR0IfSend.
    33413355 * @param   pSession        The caller's session.
    33423356 * @param   pReq            The request packet.
    33433357 */
    3344 INTNETR0DECL(int) INTNETR0IfSendReq(PINTNET pIntNet, PSUPDRVSESSION pSession, PINTNETIFSENDREQ pReq)
     3358INTNETR0DECL(int) IntNetR0IfSendReq(PSUPDRVSESSION pSession, PINTNETIFSENDREQ pReq)
    33453359{
    33463360    if (RT_UNLIKELY(pReq->Hdr.cbReq != sizeof(*pReq)))
    33473361        return VERR_INVALID_PARAMETER;
    3348     return INTNETR0IfSend(pIntNet, pReq->hIf, pSession);
     3362    return IntNetR0IfSend(pReq->hIf, pSession);
    33493363}
    33503364
     
    33543368 *
    33553369 * @returns VBox status code.
    3356  * @param   pIntNet         The instance data.
    33573370 * @param   hIf             The interface handle.
    33583371 * @param   pSession        The caller's session.
    33593372 * @param   ppRing3Buf      Where to store the address of the ring-3 mapping.
    33603373 */
    3361 INTNETR0DECL(int) INTNETR0IfGetRing3Buffer(PINTNET pIntNet, INTNETIFHANDLE hIf, PSUPDRVSESSION pSession, R3PTRTYPE(PINTNETBUF) *ppRing3Buf)
    3362 {
    3363     LogFlow(("INTNETR0IfGetRing3Buffer: pIntNet=%p hIf=%RX32 ppRing3Buf=%p\n", pIntNet, hIf, ppRing3Buf));
     3374INTNETR0DECL(int) IntNetR0IfGetRing3Buffer(INTNETIFHANDLE hIf, PSUPDRVSESSION pSession, R3PTRTYPE(PINTNETBUF) *ppRing3Buf)
     3375{
     3376    LogFlow(("IntNetR0IfGetRing3Buffer: hIf=%RX32 ppRing3Buf=%p\n", hIf, ppRing3Buf));
    33643377
    33653378    /*
    33663379     * Validate input.
    33673380     */
    3368     AssertReturn(pIntNet, VERR_INVALID_PARAMETER);
     3381    PINTNET pIntNet = g_pIntNet;
     3382    AssertPtrReturn(pIntNet, VERR_INVALID_PARAMETER);
     3383    AssertReturn(pIntNet->u32Magic, VERR_INVALID_MAGIC);
     3384
    33693385    AssertPtrReturn(ppRing3Buf, VERR_INVALID_PARAMETER);
    33703386    *ppRing3Buf = 0;
     
    33873403
    33883404    intnetR0IfRelease(pIf, pSession);
    3389     LogFlow(("INTNETR0IfGetRing3Buffer: returns %Rrc *ppRing3Buf=%p\n", rc, *ppRing3Buf));
     3405    LogFlow(("IntNetR0IfGetRing3Buffer: returns %Rrc *ppRing3Buf=%p\n", rc, *ppRing3Buf));
    33903406    return rc;
    33913407}
     
    33933409
    33943410/**
    3395  * VMMR0 request wrapper for INTNETR0IfGetRing3Buffer.
    3396  *
    3397  * @returns see INTNETR0IfGetRing3Buffer.
    3398  * @param   pIntNet         The internal networking instance.
     3411 * VMMR0 request wrapper for IntNetR0IfGetRing3Buffer.
     3412 *
     3413 * @returns see IntNetR0IfGetRing3Buffer.
    33993414 * @param   pSession        The caller's session.
    34003415 * @param   pReq            The request packet.
    34013416 */
    3402 INTNETR0DECL(int) INTNETR0IfGetRing3BufferReq(PINTNET pIntNet, PSUPDRVSESSION pSession, PINTNETIFGETRING3BUFFERREQ pReq)
     3417INTNETR0DECL(int) IntNetR0IfGetRing3BufferReq(PSUPDRVSESSION pSession, PINTNETIFGETRING3BUFFERREQ pReq)
    34033418{
    34043419    if (RT_UNLIKELY(pReq->Hdr.cbReq != sizeof(*pReq)))
    34053420        return VERR_INVALID_PARAMETER;
    3406     return INTNETR0IfGetRing3Buffer(pIntNet, pReq->hIf, pSession, &pReq->pRing3Buf);
     3421    return IntNetR0IfGetRing3Buffer(pReq->hIf, pSession, &pReq->pRing3Buf);
    34073422}
    34083423
     
    34123427 *
    34133428 * @returns VBox status code.
    3414  * @param   pIntNet         The instance data.
    34153429 * @param   hIf             The interface handle.
    34163430 * @param   pSession        The caller's session.
    34173431 * @param   ppRing0Buf      Where to store the address of the ring-3 mapping.
    34183432 */
    3419 INTNETR0DECL(int) INTNETR0IfGetRing0Buffer(PINTNET pIntNet, INTNETIFHANDLE hIf, PSUPDRVSESSION pSession, PINTNETBUF *ppRing0Buf)
    3420 {
    3421     LogFlow(("INTNETR0IfGetRing0Buffer: pIntNet=%p hIf=%RX32 ppRing0Buf=%p\n", pIntNet, hIf, ppRing0Buf));
     3433INTNETR0DECL(int) IntNetR0IfGetRing0Buffer(INTNETIFHANDLE hIf, PSUPDRVSESSION pSession, PINTNETBUF *ppRing0Buf)
     3434{
     3435    LogFlow(("IntNetR0IfGetRing0Buffer: hIf=%RX32 ppRing0Buf=%p\n", hIf, ppRing0Buf));
    34223436
    34233437    /*
    34243438     * Validate input.
    34253439     */
     3440    PINTNET pIntNet = g_pIntNet;
     3441    AssertPtrReturn(pIntNet, VERR_INVALID_PARAMETER);
     3442    AssertReturn(pIntNet->u32Magic, VERR_INVALID_MAGIC);
     3443
    34263444    AssertPtrReturn(ppRing0Buf, VERR_INVALID_PARAMETER);
    34273445    *ppRing0Buf = NULL;
    3428     AssertPtrReturn(pIntNet, VERR_INVALID_PARAMETER);
    34293446    PINTNETIF pIf = (PINTNETIF)RTHandleTableLookupWithCtx(pIntNet->hHtIfs, hIf, pSession);
    34303447    if (!pIf)
     
    34433460    }
    34443461    intnetR0IfRelease(pIf, pSession);
    3445     LogFlow(("INTNETR0IfGetRing0Buffer: returns %Rrc *ppRing0Buf=%p\n", rc, *ppRing0Buf));
     3462    LogFlow(("IntNetR0IfGetRing0Buffer: returns %Rrc *ppRing0Buf=%p\n", rc, *ppRing0Buf));
    34463463    return rc;
    34473464}
     
    34533470 *
    34543471 * @returns VBox status code.
    3455  * @param   pIntNet     The instance data.
    34563472 * @param   hIF         The interface handle.
    34573473 * @param   paPages     Where to store the addresses. (The reserved fields will be set to zero.)
    34583474 * @param   cPages
    34593475 */
    3460 INTNETR0DECL(int) INTNETR0IfGetPhysBuffer(PINTNET pIntNet, INTNETIFHANDLE hIf, PSUPPAGE paPages, unsigned cPages)
     3476INTNETR0DECL(int) IntNetR0IfGetPhysBuffer(INTNETIFHANDLE hIf, PSUPPAGE paPages, unsigned cPages)
    34613477{
    34623478    /*
    34633479     * Validate input.
    34643480     */
    3465     AssertReturn(pIntNet, VERR_INVALID_PARAMETER);
     3481    PINTNET pIntNet = g_pIntNet;
     3482    AssertPtrReturn(pIntNet, VERR_INVALID_PARAMETER);
     3483    AssertReturn(pIntNet->u32Magic, VERR_INVALID_MAGIC);
     3484
    34663485    AssertPtrReturn(paPages, VERR_INVALID_PARAMETER);
    34673486    AssertPtrReturn((uint8_t *)&paPages[cPages] - 1, VERR_INVALID_PARAMETER);
     
    34923511 *
    34933512 * @returns VBox status code.
    3494  * @param   pIntNet         The instance handle.
    34953513 * @param   hIf             The interface handle.
    34963514 * @param   pSession        The caller's session.
    34973515 * @param   fPromiscuous    Set if the interface should be in promiscuous mode, clear if not.
    34983516 */
    3499 INTNETR0DECL(int) INTNETR0IfSetPromiscuousMode(PINTNET pIntNet, INTNETIFHANDLE hIf, PSUPDRVSESSION pSession, bool fPromiscuous)
    3500 {
    3501     LogFlow(("INTNETR0IfSetPromiscuousMode: pIntNet=%p hIf=%RX32 fPromiscuous=%d\n", pIntNet, hIf, fPromiscuous));
     3517INTNETR0DECL(int) IntNetR0IfSetPromiscuousMode(INTNETIFHANDLE hIf, PSUPDRVSESSION pSession, bool fPromiscuous)
     3518{
     3519    LogFlow(("IntNetR0IfSetPromiscuousMode: hIf=%RX32 fPromiscuous=%d\n", hIf, fPromiscuous));
    35023520
    35033521    /*
    35043522     * Validate & translate input.
    35053523     */
    3506     AssertReturn(pIntNet, VERR_INVALID_PARAMETER);
     3524    PINTNET pIntNet = g_pIntNet;
     3525    AssertPtrReturn(pIntNet, VERR_INVALID_PARAMETER);
     3526    AssertReturn(pIntNet->u32Magic, VERR_INVALID_MAGIC);
     3527
    35073528    PINTNETIF pIf = (PINTNETIF)RTHandleTableLookupWithCtx(pIntNet->hHtIfs, hIf, pSession);
    35083529    if (!pIf)
    35093530    {
    3510         Log(("INTNETR0IfSetPromiscuousMode: returns VERR_INVALID_HANDLE\n"));
     3531        Log(("IntNetR0IfSetPromiscuousMode: returns VERR_INVALID_HANDLE\n"));
    35113532        return VERR_INVALID_HANDLE;
    35123533    }
     
    35263547        if (pIf->fPromiscuous != fPromiscuous)
    35273548        {
    3528             Log(("INTNETR0IfSetPromiscuousMode: hIf=%RX32: Changed from %d -> %d\n",
     3549            Log(("IntNetR0IfSetPromiscuousMode: hIf=%RX32: Changed from %d -> %d\n",
    35293550                 hIf, !fPromiscuous, !!fPromiscuous));
    35303551            ASMAtomicUoWriteBool(&pIf->fPromiscuous, fPromiscuous);
     
    35483569
    35493570/**
    3550  * VMMR0 request wrapper for INTNETR0IfSetPromiscuousMode.
    3551  *
    3552  * @returns see INTNETR0IfSetPromiscuousMode.
    3553  * @param   pIntNet         The internal networking instance.
     3571 * VMMR0 request wrapper for IntNetR0IfSetPromiscuousMode.
     3572 *
     3573 * @returns see IntNetR0IfSetPromiscuousMode.
    35543574 * @param   pSession        The caller's session.
    35553575 * @param   pReq            The request packet.
    35563576 */
    3557 INTNETR0DECL(int) INTNETR0IfSetPromiscuousModeReq(PINTNET pIntNet, PSUPDRVSESSION pSession, PINTNETIFSETPROMISCUOUSMODEREQ pReq)
     3577INTNETR0DECL(int) IntNetR0IfSetPromiscuousModeReq(PSUPDRVSESSION pSession, PINTNETIFSETPROMISCUOUSMODEREQ pReq)
    35583578{
    35593579    if (RT_UNLIKELY(pReq->Hdr.cbReq != sizeof(*pReq)))
    35603580        return VERR_INVALID_PARAMETER;
    3561     return INTNETR0IfSetPromiscuousMode(pIntNet, pReq->hIf, pSession, pReq->fPromiscuous);
     3581    return IntNetR0IfSetPromiscuousMode(pReq->hIf, pSession, pReq->fPromiscuous);
    35623582}
    35633583
     
    35673587 *
    35683588 * @returns VBox status code.
    3569  * @param   pIntNet         The instance handle.
    35703589 * @param   hIf             The interface handle.
    35713590 * @param   pSession        The caller's session.
    35723591 * @param   pMAC            The new MAC address.
    35733592 */
    3574 INTNETR0DECL(int) INTNETR0IfSetMacAddress(PINTNET pIntNet, INTNETIFHANDLE hIf, PSUPDRVSESSION pSession, PCRTMAC pMac)
    3575 {
    3576     LogFlow(("INTNETR0IfSetMacAddress: pIntNet=%p hIf=%RX32 pMac=%p:{%.6Rhxs}\n", pIntNet, hIf, pMac, pMac));
     3593INTNETR0DECL(int) IntNetR0IfSetMacAddress(INTNETIFHANDLE hIf, PSUPDRVSESSION pSession, PCRTMAC pMac)
     3594{
     3595    LogFlow(("IntNetR0IfSetMacAddress: hIf=%RX32 pMac=%p:{%.6Rhxs}\n", hIf, pMac, pMac));
    35773596
    35783597    /*
    35793598     * Validate & translate input.
    35803599     */
     3600    PINTNET pIntNet = g_pIntNet;
    35813601    AssertPtrReturn(pIntNet, VERR_INVALID_PARAMETER);
     3602    AssertReturn(pIntNet->u32Magic, VERR_INVALID_MAGIC);
     3603
    35823604    AssertPtrReturn(pMac, VERR_INVALID_PARAMETER);
    35833605    PINTNETIF pIf = (PINTNETIF)RTHandleTableLookupWithCtx(pIntNet->hHtIfs, hIf, pSession);
    35843606    if (!pIf)
    35853607    {
    3586         Log(("INTNETR0IfSetMacAddress: returns VERR_INVALID_HANDLE\n"));
     3608        Log(("IntNetR0IfSetMacAddress: returns VERR_INVALID_HANDLE\n"));
    35873609        return VERR_INVALID_HANDLE;
    35883610    }
     
    36023624        if (memcmp(&pIf->MacAddr, pMac, sizeof(pIf->MacAddr)))
    36033625        {
    3604             Log(("INTNETR0IfSetMacAddress: hIf=%RX32: Changed from %.6Rhxs -> %.6Rhxs\n",
     3626            Log(("IntNetR0IfSetMacAddress: hIf=%RX32: Changed from %.6Rhxs -> %.6Rhxs\n",
    36053627                 hIf, &pIf->MacAddr, pMac));
    36063628
     
    36243646
    36253647/**
    3626  * VMMR0 request wrapper for INTNETR0IfSetMacAddress.
    3627  *
    3628  * @returns see INTNETR0IfSetMacAddress.
    3629  * @param   pIntNet         The internal networking instance.
     3648 * VMMR0 request wrapper for IntNetR0IfSetMacAddress.
     3649 *
     3650 * @returns see IntNetR0IfSetMacAddress.
    36303651 * @param   pSession        The caller's session.
    36313652 * @param   pReq            The request packet.
    36323653 */
    3633 INTNETR0DECL(int) INTNETR0IfSetMacAddressReq(PINTNET pIntNet, PSUPDRVSESSION pSession, PINTNETIFSETMACADDRESSREQ pReq)
     3654INTNETR0DECL(int) IntNetR0IfSetMacAddressReq(PSUPDRVSESSION pSession, PINTNETIFSETMACADDRESSREQ pReq)
    36343655{
    36353656    if (RT_UNLIKELY(pReq->Hdr.cbReq != sizeof(*pReq)))
    36363657        return VERR_INVALID_PARAMETER;
    3637     return INTNETR0IfSetMacAddress(pIntNet, pReq->hIf, pSession, &pReq->Mac);
     3658    return IntNetR0IfSetMacAddress(pReq->hIf, pSession, &pReq->Mac);
    36383659}
    36393660
     
    37163737 *
    37173738 * @returns VBox status code.
    3718  * @param   pIntNet         The instance handle.
    37193739 * @param   hIf             The interface handle.
    37203740 * @param   pSession        The caller's session.
    37213741 * @param   fActive         The new state.
    37223742 */
    3723 INTNETR0DECL(int) INTNETR0IfSetActive(PINTNET pIntNet, INTNETIFHANDLE hIf, PSUPDRVSESSION pSession, bool fActive)
    3724 {
    3725     LogFlow(("INTNETR0IfSetActive: pIntNet=%p hIf=%RX32 fActive=%RTbool\n", pIntNet, hIf, fActive));
     3743INTNETR0DECL(int) IntNetR0IfSetActive(INTNETIFHANDLE hIf, PSUPDRVSESSION pSession, bool fActive)
     3744{
     3745    LogFlow(("IntNetR0IfSetActive: hIf=%RX32 fActive=%RTbool\n", hIf, fActive));
    37263746
    37273747    /*
    37283748     * Validate & translate input.
    37293749     */
     3750    PINTNET pIntNet = g_pIntNet;
    37303751    AssertPtrReturn(pIntNet, VERR_INVALID_PARAMETER);
     3752    AssertReturn(pIntNet->u32Magic, VERR_INVALID_MAGIC);
     3753
    37313754    PINTNETIF pIf = (PINTNETIF)RTHandleTableLookupWithCtx(pIntNet->hHtIfs, hIf, pSession);
    37323755    if (!pIf)
    37333756    {
    3734         Log(("INTNETR0IfSetActive: returns VERR_INVALID_HANDLE\n"));
     3757        Log(("IntNetR0IfSetActive: returns VERR_INVALID_HANDLE\n"));
    37353758        return VERR_INVALID_HANDLE;
    37363759    }
     
    37593782
    37603783/**
    3761  * VMMR0 request wrapper for INTNETR0IfSetActive.
    3762  *
    3763  * @returns see INTNETR0IfSetActive.
     3784 * VMMR0 request wrapper for IntNetR0IfSetActive.
     3785 *
     3786 * @returns see IntNetR0IfSetActive.
    37643787 * @param   pIntNet         The internal networking instance.
    37653788 * @param   pSession        The caller's session.
    37663789 * @param   pReq            The request packet.
    37673790 */
    3768 INTNETR0DECL(int) INTNETR0IfSetActiveReq(PINTNET pIntNet, PSUPDRVSESSION pSession, PINTNETIFSETACTIVEREQ pReq)
     3791INTNETR0DECL(int) IntNetR0IfSetActiveReq(PSUPDRVSESSION pSession, PINTNETIFSETACTIVEREQ pReq)
    37693792{
    37703793    if (RT_UNLIKELY(pReq->Hdr.cbReq != sizeof(*pReq)))
    37713794        return VERR_INVALID_PARAMETER;
    3772     return INTNETR0IfSetActive(pIntNet, pReq->hIf, pSession, pReq->fActive);
     3795    return IntNetR0IfSetActive(pReq->hIf, pSession, pReq->fActive);
    37733796}
    37743797
     
    37793802 *
    37803803 * @returns VBox status code.
    3781  * @param   pIntNet         The instance handle.
    37823804 * @param   hIf             The interface handle.
    37833805 * @param   pSession        The caller's session.
     
    37853807 *                          used if indefinite wait is desired.
    37863808 */
    3787 INTNETR0DECL(int) INTNETR0IfWait(PINTNET pIntNet, INTNETIFHANDLE hIf, PSUPDRVSESSION pSession, uint32_t cMillies)
    3788 {
    3789     Log4(("INTNETR0IfWait: pIntNet=%p hIf=%RX32 cMillies=%u\n", pIntNet, hIf, cMillies));
     3809INTNETR0DECL(int) IntNetR0IfWait(INTNETIFHANDLE hIf, PSUPDRVSESSION pSession, uint32_t cMillies)
     3810{
     3811    Log4(("IntNetR0IfWait: hIf=%RX32 cMillies=%u\n", hIf, cMillies));
    37903812
    37913813    /*
    37923814     * Get and validate essential handles.
    37933815     */
     3816    PINTNET pIntNet = g_pIntNet;
    37943817    AssertPtrReturn(pIntNet, VERR_INVALID_PARAMETER);
     3818    AssertReturn(pIntNet->u32Magic, VERR_INVALID_MAGIC);
     3819
    37953820    PINTNETIF pIf = (PINTNETIF)RTHandleTableLookupWithCtx(pIntNet->hHtIfs, hIf, pSession);
    37963821    if (!pIf)
    37973822    {
    3798         Log(("INTNETR0IfWait: returns VERR_INVALID_HANDLE\n"));
     3823        Log(("IntNetR0IfWait: returns VERR_INVALID_HANDLE\n"));
    37993824        return VERR_INVALID_HANDLE;
    38003825    }
     
    38043829        &&  hRecvEvent != NIL_RTSEMEVENT)
    38053830    {
    3806         Log(("INTNETR0IfWait: returns VERR_SEM_DESTROYED\n"));
     3831        Log(("IntNetR0IfWait: returns VERR_SEM_DESTROYED\n"));
    38073832        return VERR_SEM_DESTROYED;
    38083833    }
     
    38363861    else
    38373862        rc = VERR_SEM_DESTROYED;
    3838     Log4(("INTNETR0IfWait: returns %Rrc\n", rc));
     3863    Log4(("IntNetR0IfWait: returns %Rrc\n", rc));
    38393864    return rc;
    38403865}
     
    38423867
    38433868/**
    3844  * VMMR0 request wrapper for INTNETR0IfWait.
    3845  *
    3846  * @returns see INTNETR0IfWait.
    3847  * @param   pIntNet         The internal networking instance.
     3869 * VMMR0 request wrapper for IntNetR0IfWait.
     3870 *
     3871 * @returns see IntNetR0IfWait.
    38483872 * @param   pSession        The caller's session.
    38493873 * @param   pReq            The request packet.
    38503874 */
    3851 INTNETR0DECL(int) INTNETR0IfWaitReq(PINTNET pIntNet, PSUPDRVSESSION pSession, PINTNETIFWAITREQ pReq)
     3875INTNETR0DECL(int) IntNetR0IfWaitReq(PSUPDRVSESSION pSession, PINTNETIFWAITREQ pReq)
    38523876{
    38533877    if (RT_UNLIKELY(pReq->Hdr.cbReq != sizeof(*pReq)))
    38543878        return VERR_INVALID_PARAMETER;
    3855     return INTNETR0IfWait(pIntNet, pReq->hIf, pSession, pReq->cMillies);
     3879    return IntNetR0IfWait(pReq->hIf, pSession, pReq->cMillies);
    38563880}
    38573881
     
    38653889 * @param   pSession        The caller's session.
    38663890 */
    3867 INTNETR0DECL(int) INTNETR0IfClose(PINTNET pIntNet, INTNETIFHANDLE hIf, PSUPDRVSESSION pSession)
    3868 {
    3869     LogFlow(("INTNETR0IfClose: pIntNet=%p hIf=%RX32\n", pIntNet, hIf));
     3891INTNETR0DECL(int) IntNetR0IfClose(INTNETIFHANDLE hIf, PSUPDRVSESSION pSession)
     3892{
     3893    LogFlow(("IntNetR0IfClose: hIf=%RX32\n", hIf));
    38703894
    38713895    /*
    38723896     * Validate and free the handle.
    38733897     */
     3898    PINTNET pIntNet = g_pIntNet;
    38743899    AssertPtrReturn(pIntNet, VERR_INVALID_PARAMETER);
     3900    AssertReturn(pIntNet->u32Magic, VERR_INVALID_MAGIC);
     3901
    38753902    PINTNETIF pIf = (PINTNETIF)RTHandleTableFreeWithCtx(pIntNet->hHtIfs, hIf, pSession);
    38763903    if (!pIf)
     
    38973924
    38983925    int rc = SUPR0ObjRelease(pvObj, pSession);
    3899     LogFlow(("INTNETR0IfClose: returns %Rrc\n", rc));
     3926    LogFlow(("IntNetR0IfClose: returns %Rrc\n", rc));
    39003927    return rc;
    39013928}
     
    39033930
    39043931/**
    3905  * VMMR0 request wrapper for INTNETR0IfCloseReq.
    3906  *
    3907  * @returns see INTNETR0IfClose.
    3908  * @param   pIntNet         The internal networking instance.
     3932 * VMMR0 request wrapper for IntNetR0IfCloseReq.
     3933 *
     3934 * @returns see IntNetR0IfClose.
    39093935 * @param   pSession        The caller's session.
    39103936 * @param   pReq            The request packet.
    39113937 */
    3912 INTNETR0DECL(int) INTNETR0IfCloseReq(PINTNET pIntNet, PSUPDRVSESSION pSession, PINTNETIFCLOSEREQ pReq)
     3938INTNETR0DECL(int) IntNetR0IfCloseReq(PSUPDRVSESSION pSession, PINTNETIFCLOSEREQ pReq)
    39133939{
    39143940    if (RT_UNLIKELY(pReq->Hdr.cbReq != sizeof(*pReq)))
    39153941        return VERR_INVALID_PARAMETER;
    3916     return INTNETR0IfClose(pIntNet, pReq->hIf, pSession);
     3942    return IntNetR0IfClose(pReq->hIf, pSession);
    39173943}
    39183944
     
    51795205 *
    51805206 * @returns VBox status code.
    5181  * @param   pIntNet         The internal network instance.
    51825207 * @param   pSession        The session handle.
    51835208 * @param   pszNetwork      The network name.
     
    51905215 * @param   phIf            Where to store the handle to the network interface.
    51915216 */
    5192 INTNETR0DECL(int) INTNETR0Open(PINTNET pIntNet, PSUPDRVSESSION pSession, const char *pszNetwork,
     5217INTNETR0DECL(int) IntNetR0Open(PSUPDRVSESSION pSession, const char *pszNetwork,
    51935218                               INTNETTRUNKTYPE enmTrunkType, const char *pszTrunk, uint32_t fFlags,
    5194                                unsigned cbSend, unsigned cbRecv, PINTNETIFHANDLE phIf)
    5195 {
    5196     LogFlow(("INTNETR0Open: pIntNet=%p pSession=%p pszNetwork=%p:{%s} enmTrunkType=%d pszTrunk=%p:{%s} fFlags=%#x cbSend=%u cbRecv=%u phIf=%p\n",
    5197              pIntNet, pSession, pszNetwork, pszNetwork, enmTrunkType, pszTrunk, pszTrunk, fFlags, cbSend, cbRecv, phIf));
     5219                               uint32_t cbSend, uint32_t cbRecv, PINTNETIFHANDLE phIf)
     5220{
     5221    LogFlow(("IntNetR0Open: pSession=%p pszNetwork=%p:{%s} enmTrunkType=%d pszTrunk=%p:{%s} fFlags=%#x cbSend=%u cbRecv=%u phIf=%p\n",
     5222             pSession, pszNetwork, pszNetwork, enmTrunkType, pszTrunk, pszTrunk, fFlags, cbSend, cbRecv, phIf));
    51985223
    51995224    /*
    52005225     * Validate input.
    52015226     */
     5227    PINTNET pIntNet = g_pIntNet;
    52025228    AssertPtrReturn(pIntNet, VERR_INVALID_PARAMETER);
     5229    AssertReturn(pIntNet->u32Magic, VERR_INVALID_MAGIC);
    52035230
    52045231    AssertPtrReturn(pszNetwork, VERR_INVALID_PARAMETER);
     
    52735300
    52745301    RTSemMutexRelease(pIntNet->hMtxCreateOpenDestroy);
    5275     LogFlow(("INTNETR0Open: return %Rrc *phIf=%RX32\n", rc, *phIf));
     5302    LogFlow(("IntNetR0Open: return %Rrc *phIf=%RX32\n", rc, *phIf));
    52765303    return rc;
    52775304}
     
    52825309 *
    52835310 * @returns see GMMR0MapUnmapChunk.
    5284  * @param   pIntNet         The internal networking instance.
    52855311 * @param   pSession        The caller's session.
    52865312 * @param   pReq            The request packet.
    52875313 */
    5288 INTNETR0DECL(int) INTNETR0OpenReq(PINTNET pIntNet, PSUPDRVSESSION pSession, PINTNETOPENREQ pReq)
     5314INTNETR0DECL(int) IntNetR0OpenReq(PSUPDRVSESSION pSession, PINTNETOPENREQ pReq)
    52895315{
    52905316    if (RT_UNLIKELY(pReq->Hdr.cbReq != sizeof(*pReq)))
    52915317        return VERR_INVALID_PARAMETER;
    5292     return INTNETR0Open(pIntNet, pSession, &pReq->szNetwork[0], pReq->enmTrunkType, pReq->szTrunk,
     5318    return IntNetR0Open(pSession, &pReq->szNetwork[0], pReq->enmTrunkType, pReq->szTrunk,
    52935319                        pReq->fFlags, pReq->cbSend, pReq->cbRecv, &pReq->hIf);
    52945320}
     
    52965322
    52975323/**
     5324 * Count the internal networks.
     5325 *
     5326 * This is mainly for providing the testcase with some introspection to validate
     5327 * behavior when closing interfaces.
     5328 *
     5329 * @returns The number of networks.
     5330 */
     5331INTNETR0DECL(uint32_t) IntNetR0GetNetworkCount(void)
     5332{
     5333    /*
     5334     * Grab the instance.
     5335     */
     5336    PINTNET pIntNet = g_pIntNet;
     5337    if (!pIntNet)
     5338        return 0;
     5339    AssertPtrReturn(pIntNet, 0);
     5340    AssertReturn(pIntNet->u32Magic == INTNET_MAGIC, 0);
     5341
     5342    /*
     5343     * Grab the mutex and count the networks.
     5344     */
     5345    int rc = RTSemMutexRequest(pIntNet->hMtxCreateOpenDestroy, RT_INDEFINITE_WAIT);
     5346    if (RT_FAILURE(rc))
     5347        return 0;
     5348
     5349    uint32_t cNetworks = 0;
     5350    for (PINTNETNETWORK pCur = pIntNet->pNetworks; pCur; pCur = pCur->pNext)
     5351        cNetworks++;
     5352
     5353    RTSemMutexRelease(pIntNet->hMtxCreateOpenDestroy);
     5354
     5355    return cNetworks;
     5356}
     5357
     5358
     5359
     5360/**
    52985361 * Destroys an instance of the Ring-0 internal networking service.
    5299  *
    5300  * @param   pIntNet     Pointer to the instance data.
    5301  */
    5302 INTNETR0DECL(void) INTNETR0Destroy(PINTNET pIntNet)
    5303 {
    5304     LogFlow(("INTNETR0Destroy: pIntNet=%p\n", pIntNet));
    5305 
    5306     /*
    5307      * Allow NULL pointers.
    5308      */
     5362 */
     5363INTNETR0DECL(void) IntNetR0Term(void)
     5364{
     5365    LogFlow(("IntNetR0Term:\n"));
     5366
     5367    /*
     5368     * Zap the global pointer and validate it.
     5369     */
     5370    PINTNET pIntNet = g_pIntNet;
     5371    g_pIntNet = NULL;
    53095372    if (!pIntNet)
    53105373        return;
    53115374    AssertPtrReturnVoid(pIntNet);
     5375    AssertReturnVoid(pIntNet->u32Magic == INTNET_MAGIC);
    53125376
    53135377    /*
    53145378     * There is not supposed to be any networks hanging around at this time.
    53155379     */
     5380    AssertReturnVoid(ASMAtomicCmpXchgU32(&pIntNet->u32Magic, ~INTNET_MAGIC, INTNET_MAGIC));
    53165381    Assert(pIntNet->pNetworks == NULL);
    53175382    if (pIntNet->hMtxCreateOpenDestroy != NIL_RTSEMMUTEX)
     
    53325397
    53335398/**
    5334  * Create an instance of the Ring-0 internal networking service.
     5399 * Initalizes the internal network ring-0 service.
    53355400 *
    53365401 * @returns VBox status code.
    5337  * @param   ppIntNet    Where to store the instance pointer.
    5338  */
    5339 INTNETR0DECL(int) INTNETR0Create(PINTNET *ppIntNet)
    5340 {
    5341     LogFlow(("INTNETR0Create: ppIntNet=%p\n", ppIntNet));
     5402 */
     5403INTNETR0DECL(int) IntNetR0Init(void)
     5404{
     5405    LogFlow(("IntNetR0Init:\n"));
    53425406    int rc = VERR_NO_MEMORY;
    53435407    PINTNET pIntNet = (PINTNET)RTMemAllocZ(sizeof(*pIntNet));
     
    53535417            if (RT_SUCCESS(rc))
    53545418            {
    5355                 *ppIntNet = pIntNet;
    5356                 LogFlow(("INTNETR0Create: returns VINF_SUCCESS *ppIntNet=%p\n", pIntNet));
     5419                pIntNet->u32Magic = INTNET_MAGIC;
     5420                g_pIntNet = pIntNet;
     5421                LogFlow(("IntNetR0Init: returns VINF_SUCCESS pIntNet=%p\n", pIntNet));
    53575422                return VINF_SUCCESS;
    53585423            }
     
    53625427        RTMemFree(pIntNet);
    53635428    }
    5364     *ppIntNet = NULL;
    5365     LogFlow(("INTNETR0Create: returns %Rrc\n", rc));
     5429    LogFlow(("IntNetR0Init: returns %Rrc\n", rc));
    53665430    return rc;
    53675431}
  • trunk/src/VBox/Devices/Network/testcase/tstIntNetR0.cpp

    r28623 r28706  
    190190 * Sends the data @a pvBuf points to.
    191191 */
    192 static int tstIntNetSendBuf(PINTNET pIntNet, PINTNETRINGBUF pRingBuf, INTNETIFHANDLE hIf,
     192static int tstIntNetSendBuf(PINTNETRINGBUF pRingBuf, INTNETIFHANDLE hIf,
    193193                            PSUPDRVSESSION pSession, void const *pvBuf, size_t cbBuf)
    194194{
     
    197197    int rc = intnetR0RingWriteFrame(pRingBuf, &Sg, NULL);
    198198    if (RT_SUCCESS(rc))
    199         rc = INTNETR0IfSend(pIntNet, hIf, pSession);
     199        rc = IntNetR0IfSend(hIf, pSession);
    200200    return rc;
    201201}
     
    204204typedef struct MYARGS
    205205{
    206     PINTNET         pIntNet;
    207206    PINTNETBUF      pBuf;
    208207    INTNETIFHANDLE  hIf;
     
    258257        RTTEST_CHECK_RC_OK(g_hTest, rc = intnetR0RingWriteFrame(&pArgs->pBuf->Send, &Sg, NULL));
    259258        if (RT_SUCCESS(rc))
    260             RTTEST_CHECK_RC_OK(g_hTest, rc = INTNETR0IfSend(pArgs->pIntNet, pArgs->hIf, g_pSession));
     259            RTTEST_CHECK_RC_OK(g_hTest, rc = IntNetR0IfSend(pArgs->hIf, g_pSession));
    261260        cbSent += cb;
    262261    }
     
    271270    for (unsigned c = 0; c < 20; c++)
    272271    {
    273         RTTEST_CHECK_RC_OK(g_hTest, rc = tstIntNetSendBuf(pArgs->pIntNet, &pArgs->pBuf->Send, pArgs->hIf, g_pSession,
     272        RTTEST_CHECK_RC_OK(g_hTest, rc = tstIntNetSendBuf(&pArgs->pBuf->Send, pArgs->hIf, g_pSession,
    274273                                                          abBuf, sizeof(RTMAC) * 2 + sizeof(unsigned) * 4));
    275274        RTThreadSleep(1);
     
    363362         * Wait for data.
    364363         */
    365         int rc = INTNETR0IfWait(pArgs->pIntNet, pArgs->hIf, g_pSession, RT_INDEFINITE_WAIT);
     364        int rc = IntNetR0IfWait(pArgs->hIf, g_pSession, RT_INDEFINITE_WAIT);
    366365        switch (rc)
    367366        {
     
    390389typedef struct TSTSTATE
    391390{
    392     PINTNET         pIntNet;
    393 
    394391    PINTNETBUF      pBuf0;
    395392    INTNETIFHANDLE  hIf0;
     
    410407{
    411408    pThis->hIf0 = INTNET_HANDLE_INVALID;
    412     RTTESTI_CHECK_RC_OK_RET(INTNETR0Open(pThis->pIntNet, g_pSession, pszNetwork, kIntNetTrunkType_None, "",
     409    RTTESTI_CHECK_RC_OK_RET(IntNetR0Open(g_pSession, pszNetwork, kIntNetTrunkType_None, "",
    413410                                         0/*fFlags*/, cbSend, cbRecv, &pThis->hIf0), rcCheck);
    414411    RTTESTI_CHECK_RET(pThis->hIf0 != INTNET_HANDLE_INVALID, VERR_INTERNAL_ERROR);
    415     RTTESTI_CHECK_RC_RET(INTNETR0IfGetRing0Buffer(pThis->pIntNet, pThis->hIf0, g_pSession, &pThis->pBuf0), VINF_SUCCESS, rcCheck);
     412    RTTESTI_CHECK_RC_RET(IntNetR0IfGetRing0Buffer(pThis->hIf0, g_pSession, &pThis->pBuf0), VINF_SUCCESS, rcCheck);
    416413    RTTESTI_CHECK_RET(pThis->pBuf0, VERR_INTERNAL_ERROR);
    417414
    418415
    419416    pThis->hIf1 = INTNET_HANDLE_INVALID;
    420     RTTESTI_CHECK_RC_OK_RET(INTNETR0Open(pThis->pIntNet, g_pSession, pszNetwork, kIntNetTrunkType_None, "",
     417    RTTESTI_CHECK_RC_OK_RET(IntNetR0Open(g_pSession, pszNetwork, kIntNetTrunkType_None, "",
    421418                                         0/*fFlags*/, cbSend, cbRecv, &pThis->hIf1), rcCheck);
    422419    RTTESTI_CHECK_RET(pThis->hIf1 != INTNET_HANDLE_INVALID, VERR_INTERNAL_ERROR);
    423     RTTESTI_CHECK_RC_RET(INTNETR0IfGetRing0Buffer(pThis->pIntNet, pThis->hIf1, g_pSession, &pThis->pBuf1), VINF_SUCCESS, rcCheck);
     420    RTTESTI_CHECK_RC_RET(IntNetR0IfGetRing0Buffer(pThis->hIf1, g_pSession, &pThis->pBuf1), VINF_SUCCESS, rcCheck);
    424421    RTTESTI_CHECK_RET(pThis->pBuf1, VERR_INTERNAL_ERROR);
    425422
     
    435432{
    436433    int rc;
    437     RTTESTI_CHECK_RC_OK(rc = INTNETR0IfClose(pThis->pIntNet, pThis->hIf0, g_pSession));
     434    RTTESTI_CHECK_RC_OK(rc = IntNetR0IfClose(pThis->hIf0, g_pSession));
    438435    if (RT_SUCCESS(rc))
    439436    {
     
    442439    }
    443440
    444     RTTESTI_CHECK_RC_OK(rc = INTNETR0IfClose(pThis->pIntNet, pThis->hIf1, g_pSession));
     441    RTTESTI_CHECK_RC_OK(rc = IntNetR0IfClose(pThis->hIf1, g_pSession));
    445442    if (RT_SUCCESS(rc))
    446443    {
     
    450447
    451448    /* The network should be dead now. */
    452     RTTESTI_CHECK(pThis->pIntNet->pNetworks == NULL);
     449    RTTESTI_CHECK(IntNetR0GetNetworkCount() == 0);
    453450}
    454451
     
    462459    Args0.hIf         = pThis->hIf0;
    463460    Args0.pBuf        = pThis->pBuf0;
    464     Args0.pIntNet     = pThis->pIntNet;
    465461    Args0.Mac.au16[0] = 0x8086;
    466462    Args0.Mac.au16[1] = 0;
     
    471467    Args1.hIf         = pThis->hIf1;
    472468    Args1.pBuf        = pThis->pBuf1;
    473     Args1.pIntNet     = pThis->pIntNet;
    474469    Args1.Mac.au16[0] = 0x8086;
    475470    Args1.Mac.au16[1] = 0;
     
    592587    static uint16_t const s_au16Frame[7] = { /* dst:*/ 0xffff, 0xffff, 0xffff, /*src:*/0x8086, 0, 0, 0x0800 };
    593588
    594     RTTESTI_CHECK_RC_RETV(tstIntNetSendBuf(pThis->pIntNet, &pThis->pBuf0->Send, pThis->hIf0,
     589    RTTESTI_CHECK_RC_RETV(tstIntNetSendBuf(&pThis->pBuf0->Send, pThis->hIf0,
    595590                                           g_pSession, &s_au16Frame, sizeof(s_au16Frame)),
    596591                          VINF_SUCCESS);
    597592
    598593    /* No echo, please */
    599     RTTESTI_CHECK_RC_RETV(INTNETR0IfWait(pThis->pIntNet, pThis->hIf0, g_pSession, 1), VERR_TIMEOUT);
     594    RTTESTI_CHECK_RC_RETV(IntNetR0IfWait(pThis->hIf0, g_pSession, 1), VERR_TIMEOUT);
    600595
    601596    /* The other interface should see it though.  But Wait should only return once, thank you. */
    602     RTTESTI_CHECK_RC_RETV(INTNETR0IfWait(pThis->pIntNet, pThis->hIf1, g_pSession, 1), VINF_SUCCESS);
    603     RTTESTI_CHECK_RC_RETV(INTNETR0IfWait(pThis->pIntNet, pThis->hIf1, g_pSession, 0), VERR_TIMEOUT);
     597    RTTESTI_CHECK_RC_RETV(IntNetR0IfWait(pThis->hIf1, g_pSession, 1), VINF_SUCCESS);
     598    RTTESTI_CHECK_RC_RETV(IntNetR0IfWait(pThis->hIf1, g_pSession, 0), VERR_TIMEOUT);
    604599
    605600    /* Receive the data. */
     
    631626    static uint16_t const s_au16Frame[7] = { /* dst:*/ 0x8086, 0, 0,      /*src:*/0x8086, 0, 1, 0x0800 };
    632627
    633     RTTESTI_CHECK_RC_RETV(tstIntNetSendBuf(pThis->pIntNet, &pThis->pBuf1->Send, pThis->hIf1,
     628    RTTESTI_CHECK_RC_RETV(tstIntNetSendBuf(&pThis->pBuf1->Send, pThis->hIf1,
    634629                                           g_pSession, s_au16Frame, sizeof(s_au16Frame)),
    635630                          VINF_SUCCESS);
    636631
    637632    /* No echo, please */
    638     RTTESTI_CHECK_RC_RETV(INTNETR0IfWait(pThis->pIntNet, pThis->hIf1, g_pSession, 1), VERR_TIMEOUT);
     633    RTTESTI_CHECK_RC_RETV(IntNetR0IfWait(pThis->hIf1, g_pSession, 1), VERR_TIMEOUT);
    639634
    640635    /* The other interface should see it though.  But Wait should only return once, thank you. */
    641     RTTESTI_CHECK_RC_RETV(INTNETR0IfWait(pThis->pIntNet, pThis->hIf0, g_pSession, 1), VINF_SUCCESS);
    642     RTTESTI_CHECK_RC_RETV(INTNETR0IfWait(pThis->pIntNet, pThis->hIf0, g_pSession, 0), VERR_TIMEOUT);
     636    RTTESTI_CHECK_RC_RETV(IntNetR0IfWait(pThis->hIf0, g_pSession, 1), VINF_SUCCESS);
     637    RTTESTI_CHECK_RC_RETV(IntNetR0IfWait(pThis->hIf0, g_pSession, 0), VERR_TIMEOUT);
    643638
    644639    /* Receive the data. */
     
    666661     * Create an INTNET instance.
    667662     */
    668     RTTestISub("INTNETR0Create");
    669     RTTESTI_CHECK_RC_RETV(INTNETR0Create(&pThis->pIntNet), VINF_SUCCESS);
     663    RTTestISub("IntNetR0Init");
     664    RTTESTI_CHECK_RC_RETV(IntNetR0Init(), VINF_SUCCESS);
    670665
    671666    /*
     
    676671    if (RT_FAILURE(rc))
    677672        return;
    678     RTTESTI_CHECK_RC(INTNETR0IfSetActive(pThis->pIntNet, pThis->hIf0, g_pSession, true), VINF_SUCCESS);
    679     RTTESTI_CHECK_RC(INTNETR0IfSetActive(pThis->pIntNet, pThis->hIf1, g_pSession, true), VINF_SUCCESS);
     673    RTTESTI_CHECK_RC(IntNetR0IfSetActive(pThis->hIf0, g_pSession, true), VINF_SUCCESS);
     674    RTTESTI_CHECK_RC(IntNetR0IfSetActive(pThis->hIf1, g_pSession, true), VINF_SUCCESS);
    680675
    681676    /*
    682677     * Test basic waiting.
    683678     */
    684     RTTestISub("INTNETR0IfWait");
    685     RTTESTI_CHECK_RC(INTNETR0IfWait(pThis->pIntNet, pThis->hIf0, g_pSession, 1), VERR_TIMEOUT);
    686     RTTESTI_CHECK_RC(INTNETR0IfWait(pThis->pIntNet, pThis->hIf0, g_pSession, 0), VERR_TIMEOUT);
    687     RTTESTI_CHECK_RC(INTNETR0IfWait(pThis->pIntNet, pThis->hIf1, g_pSession, 1), VERR_TIMEOUT);
    688     RTTESTI_CHECK_RC(INTNETR0IfWait(pThis->pIntNet, pThis->hIf1, g_pSession, 0), VERR_TIMEOUT);
     679    RTTestISub("IntNetR0IfWait");
     680    RTTESTI_CHECK_RC(IntNetR0IfWait(pThis->hIf0, g_pSession, 1), VERR_TIMEOUT);
     681    RTTESTI_CHECK_RC(IntNetR0IfWait(pThis->hIf0, g_pSession, 0), VERR_TIMEOUT);
     682    RTTESTI_CHECK_RC(IntNetR0IfWait(pThis->hIf1, g_pSession, 1), VERR_TIMEOUT);
     683    RTTESTI_CHECK_RC(IntNetR0IfWait(pThis->hIf1, g_pSession, 0), VERR_TIMEOUT);
    689684
    690685    /*
     
    718713     */
    719714    tstCloseInterfaces(pThis);
    720     INTNETR0Destroy(pThis->pIntNet);
     715    IntNetR0Term();
    721716}
    722717
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