VirtualBox

Changeset 8571 in vbox for trunk/src/VBox/Devices


Ignore:
Timestamp:
May 5, 2008 12:43:53 PM (17 years ago)
Author:
vboxsync
Message:

Solaris hostif: Load libdlpi dynamically.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Makefile.kmk

    r8251 r8571  
    175175ifeq ($(BUILD_TARGET),solaris)
    176176 VBoxDD_LIBS           += adm
    177  ifdef VBOX_WITH_CROSSBOW
    178   VBoxDD_LIBS          += dlpi
    179  endif
    180177 ifdef VBOX_WITH_SUID_WRAPPER
    181178  VBoxDD_LIBS          += secdb
     
    619616        Storage/DrvHostDVD.cpp
    620617 ifdef VBOX_WITH_CROSSBOW
     618  Drivers_SOURCES += Network/solaris/vbox-libdlpi.cpp
    621619  Drivers_DEFS += VBOX_WITH_CROSSBOW
    622620 endif
  • trunk/src/VBox/Devices/Network/DrvTAP.cpp

    r8155 r8571  
    6262# include <stdio.h>
    6363# ifdef VBOX_WITH_CROSSBOW
    64 #  include <libdlpi.h>
     64#  include "solaris/vbox-libdlpi.h"
    6565# endif
    6666#else
     
    277277#ifdef VBOX_WITH_CROSSBOW
    278278            cbRead = sizeof(achBuf);
    279             rc = dlpi_recv(pData->pDeviceHandle, NULL, NULL, achBuf, &cbRead, -1, NULL);
     279            rc = gLibDlpiRecv(pData->pDeviceHandle, NULL, NULL, achBuf, &cbRead, -1, NULL);
    280280            rc = RT_LIKELY(rc == DLPI_SUCCESS) ? VINF_SUCCESS : SolarisDLPIErr2VBoxErr(rc);
    281281#else
     
    515515     * Open & bind the NIC using the datalink provider routine.
    516516     */
    517     int rc = dlpi_open(pData->pszDeviceName, &pData->pDeviceHandle, DLPI_RAW);
     517    int rc = gLibDlpiOpen(pData->pszDeviceName, &pData->pDeviceHandle, DLPI_RAW);
    518518    if (rc != DLPI_SUCCESS)
    519519        return PDMDrvHlpVMSetError(pData->pDrvIns, VERR_HOSTIF_INIT_FAILED, RT_SRC_POS,
     
    521521
    522522    dlpi_info_t vnicInfo;
    523     rc = dlpi_info(pData->pDeviceHandle, &vnicInfo, 0);
     523    rc = gLibDlpiInfo(pData->pDeviceHandle, &vnicInfo, 0);
    524524    if (rc == DLPI_SUCCESS)
    525525    {
    526526        if (vnicInfo.di_mactype == DL_ETHER)
    527527        {
    528             rc = dlpi_bind(pData->pDeviceHandle, DLPI_ANY_SAP, NULL);
     528            rc = gLibDlpiBind(pData->pDeviceHandle, DLPI_ANY_SAP, NULL);
    529529            if (rc == DLPI_SUCCESS)
    530530            {
    531                 rc = dlpi_set_physaddr(pData->pDeviceHandle, DL_CURR_PHYS_ADDR, &pData->MacAddress, ETHERADDRL);
     531                rc = gLibDlpiSetPhysAddr(pData->pDeviceHandle, DL_CURR_PHYS_ADDR, &pData->MacAddress, ETHERADDRL);
    532532                if (rc == DLPI_SUCCESS)
    533533                {
    534                     rc = dlpi_promiscon(pData->pDeviceHandle, DL_PROMISC_SAP);
     534                    rc = gLibDlpiPromiscon(pData->pDeviceHandle, DL_PROMISC_SAP);
    535535                    if (rc == DLPI_SUCCESS)
    536536                    {
    537537                        /* Need to use DL_PROMIS_PHYS (not multicast) as we cannot be sure what the guest needs. */
    538                         rc = dlpi_promiscon(pData->pDeviceHandle, DL_PROMISC_PHYS);
     538                        rc = gLibDlpiPromiscon(pData->pDeviceHandle, DL_PROMISC_PHYS);
    539539                        if (rc == DLPI_SUCCESS)
    540540                        {
    541                             pData->FileDevice = dlpi_fd(pData->pDeviceHandle);
     541                            pData->FileDevice = gLibDlpiFd(pData->pDeviceHandle);
    542542                            if (pData->FileDevice >= 0)
    543543                            {
     
    572572        rc = PDMDrvHlpVMSetError(pData->pDrvIns, VERR_HOSTIF_INIT_FAILED, RT_SRC_POS,
    573573                                         N_("Failed to obtain VNIC info"));
    574     dlpi_close(pData->pDeviceHandle);
     574    gLibDlpiClose(pData->pDeviceHandle);
    575575    return rc;
    576576}
     
    972972     */
    973973# ifdef VBOX_WITH_CROSSBOW
     974    if (!gLibDlpiFound())
     975    {
     976        return PDMDrvHlpVMSetError(pDrvIns, VERR_HOSTIF_INIT_FAILED, RT_SRC_POS,
     977                                       N_("Failed to load library %s required for host interface networking."), LIB_DLPI);
     978    }
    974979    rc = SolarisOpenVNIC(pData);
    975980# else
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