VirtualBox

Changeset 19571 in vbox


Ignore:
Timestamp:
May 11, 2009 10:07:04 AM (16 years ago)
Author:
vboxsync
Message:

Solaris/VBoxNetFlt: enable style 2 opens on trunk.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/VBoxNetFlt/solaris/VBoxNetFlt-solaris.c

    r19483 r19571  
    4242#include <iprt/crc32.h>
    4343#include <iprt/err.h>
    44 #define VBOX_WITH_NETFLT_SOLARIS_DLPISTYLE2
    45 #ifdef VBOX_WITH_NETFLT_SOLARIS_DLPISTYLE2
    46 # include <iprt/ctype.h>
    47 #endif
     44#include <iprt/ctype.h>
    4845
    4946#include <inet/ip.h>
     
    6057#include <sys/dlpi.h>
    6158#include <sys/types.h>
    62 #ifdef VBOX_WITH_NETFLT_SOLARIS_DLPISTYLE2
    63 # include <sys/time.h>
    64 #endif
     59#include <sys/time.h>
    6560#include <sys/param.h>
    6661#include <sys/ethernet.h>
     
    14151410}
    14161411
    1417 #ifdef VBOX_WITH_NETFLT_SOLARIS_DLPISTYLE2
     1412#if 0
    14181413/**
    14191414 * Set the DLPI style-2 PPA via an attach request.
     1415 * Currently unused; dl_attach is used instead.
    14201416 *
    14211417 * @returns VBox status code.
     
    16671663
    16681664
    1669 #ifdef VBOX_WITH_NETFLT_SOLARIS_DLPISTYLE2
    16701665/**
    16711666 * Opens up the DLPI style 2 link that requires explicit PPA attach
    16721667 * phase.
    16731668 *
     1669 * @returns VBox status code.
    16741670 * @param   pThis       The instance.
     1671 * @param   pDevId      Where to store the opened LDI device id.
    16751672 */
    16761673static int vboxNetFltSolarisOpenStyle2(PVBOXNETFLTINS pThis, ldi_ident_t *pDevId)
     
    16801677     */
    16811678    char *pszDev = RTStrDup(pThis->szName);
     1679    if (!pszDev)
     1680        return VERR_NO_MEMORY;
     1681
    16821682    char *pszEnd = strchr(pszDev, '\0');
    16831683    int PPALen = 0;
     
    17161716
    17171717            ldi_close(pThis->u.s.hIface, FREAD | FWRITE, kcred);
    1718             LogRel((DEVICE_NAME ":vboxNetFltSolarisOpenStyle2 dl_attach failed. rc=%d\n", rc));
     1718            LogRel((DEVICE_NAME ":vboxNetFltSolarisOpenStyle2 dl_attach failed. rc=%d szDev=%s PPA=%d rc=%d\n", rc, szDev, PPA));
    17191719        }
    17201720        else
    1721             LogRel((DEVICE_NAME ":vboxNetFltSolarisOpenStyle2 Failed to open szDev=%s\n", szDev));
     1721            LogRel((DEVICE_NAME ":vboxNetFltSolarisOpenStyle2 Failed to open. rc=%d szDev=%s PPA=%d\n", rc, szDev, PPA));
    17221722    }
    17231723    else
    1724         LogRel((DEVICE_NAME ":vboxNetFltSolarisOpenStyle2 Failed to construct PPA.\n"));
     1724        LogRel((DEVICE_NAME ":vboxNetFltSolarisOpenStyle2 Failed to construct PPA. pszDev=%s pszEnd=%s.\n", pszDev, pszEnd));
    17251725
    17261726    RTStrFree(pszDev);
    17271727    return VERR_INTNET_FLT_IF_FAILED;
    17281728}
    1729 #endif
    17301729
    17311730
     
    17431742    int ret;
    17441743
    1745     /** @todo enable and test DLPI style 2.*/
    17461744    /*
    17471745     * Try style-1 open first.
     
    17601758    }
    17611759
    1762 #ifdef VBOX_WITH_NETFLT_SOLARIS_DLPISTYLE2
    17631760    if (rc)
    17641761    {
     
    17691766        if (RT_FAILURE(rc))
    17701767            LogRel((DEVICE_NAME ":vboxNetFltSolarisOpenStream vboxNetFltSolarisOpenStyle2 failed. rc=%d\n", rc));
    1771     }
    1772 #endif
     1768        else
     1769            rc = 0;
     1770    }
    17731771
    17741772    ldi_ident_release(DevId);
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