VirtualBox

Changeset 12783 in vbox for trunk/src


Ignore:
Timestamp:
Sep 29, 2008 9:31:21 AM (17 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
37128
Message:

Solaris/vboxnetflt: Unplumbed interfaces. Disabled Main enumeration as it requires NSL link fix.

Location:
trunk/src/VBox
Files:
3 edited

Legend:

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

    r12770 r12783  
    320320} vboxnetflt_promisc_stream_t;
    321321
    322 /**
    323  * vboxnetflt_state_t: per-driver data
    324  */
    325 typedef struct vboxnetflt_state_t
    326 {
    327     /** The list of all opened streams. */
    328     vboxnetflt_stream_t *pOpenedStreams;
    329     /**
    330      * pCurInstance is the currently VBox instance to be associated with the stream being created
    331      * in ModOpen. This is just shared global data between the dynamic attach and the ModOpen procedure.
    332      */
    333     PVBOXNETFLTINS pCurInstance;
    334     /** Goes along with pCurInstance to determine type of stream being opened/created. */
    335     VBOXNETFLTSTREAMTYPE CurType;
    336 } vboxnetflt_state_t;
    337 
    338322
    339323/*******************************************************************************
     
    366350*   Global Variables                                                           *
    367351*******************************************************************************/
     352/** Global device info handle. */
     353static dev_info_t *g_pVBoxNetFltSolarisDip = NULL;
     354
    368355/** The (common) global data. */
    369356static VBOXNETFLTGLOBALS g_VBoxNetFltSolarisGlobals;
    370 /** Global state. */
    371 static vboxnetflt_state_t g_VBoxNetFltSolarisState;
     357
    372358/** Mutex protecting dynamic binding of the filter. */
    373359RTSEMFASTMUTEX g_VBoxNetFltSolarisMtx = NIL_RTSEMFASTMUTEX;
    374 /** Global device info handle. */
    375 static dev_info_t *g_pVBoxNetFltSolarisDip = NULL;
    376 
     360
     361/** The list of all opened streams. */
     362vboxnetflt_stream_t *g_VBoxNetFltSolarisStreams;
     363
     364/**
     365 * g_VBoxNetFltInstance is the current PVBOXNETFLTINS to be associated with the stream being created
     366 * in ModOpen. This is just shared global data between the dynamic attach and the ModOpen procedure.
     367 */
     368PVBOXNETFLTINS volatile g_VBoxNetFltSolarisInstance;
     369
     370/** Goes along with the instance to determine type of stream being opened/created. */
     371VBOXNETFLTSTREAMTYPE volatile g_VBoxNetFltSolarisStreamType;
    377372
    378373/** GCC C++ hack. */
     
    405400         * Initialize Solaris specific globals here.
    406401         */
    407         g_VBoxNetFltSolarisState.pOpenedStreams = NULL;
    408         g_VBoxNetFltSolarisState.pCurInstance = NULL;
     402        g_VBoxNetFltSolarisStreams = NULL;
     403        g_VBoxNetFltSolarisInstance = NULL;
    409404        rc = RTSemFastMutexCreate(&g_VBoxNetFltSolarisMtx);
    410405        if (RT_SUCCESS(rc))
     
    619614     * Check for the VirtualBox instance.
    620615     */
    621     vboxnetflt_state_t *pState = &g_VBoxNetFltSolarisState;
    622     if (RT_UNLIKELY(!pState->pCurInstance))
     616    if (RT_UNLIKELY(!g_VBoxNetFltSolarisInstance))
    623617    {
    624618        LogRel((DEVICE_NAME ":VBoxNetFltSolarisModOpen failed to get VirtualBox instance.\n"));
     
    627621
    628622    RTSPINLOCKTMP Tmp = RTSPINLOCKTMP_INITIALIZER;
    629     PVBOXNETFLTINS pThis = pState->pCurInstance;
     623    PVBOXNETFLTINS pThis = g_VBoxNetFltSolarisInstance;
    630624    RTSpinlockAcquire(pThis->hSpinlock, &Tmp);
    631625
     
    633627     * Check VirtualBox stream type.
    634628     */
    635     if (pState->CurType == kUndefined)
     629    if (g_VBoxNetFltSolarisStreamType == kUndefined)
    636630    {
    637631        LogRel((DEVICE_NAME ":VBoxNetFltSolarisModOpen failed due to undefined VirtualBox open mode.\n"));
     
    646640    minor_t DevMinor = 0;
    647641    vboxnetflt_stream_t *pStream = NULL;
    648     vboxnetflt_stream_t **ppPrevStream = &pState->pOpenedStreams;
     642    vboxnetflt_stream_t **ppPrevStream = &g_VBoxNetFltSolarisStreams;
    649643    if (fStreamMode == CLONEOPEN)
    650644    {
     
    660654        DevMinor = getminor(*pDev);
    661655
    662     if (pState->CurType == kPromiscStream)
     656    if (g_VBoxNetFltSolarisStreamType == kPromiscStream)
    663657    {
    664658        vboxnetflt_promisc_stream_t *pPromiscStream = RTMemAlloc(sizeof(vboxnetflt_promisc_stream_t));
     
    701695     */
    702696    ASMAtomicUoWritePtr((void * volatile *)&pStream->pThis, pThis);
    703     pStream->Type = pState->CurType;
     697    pStream->Type = g_VBoxNetFltSolarisStreamType;
    704698    switch (pStream->Type)
    705699    {
     
    811805     * Unlink it from the list of streams.
    812806     */
    813     for (ppPrevStream = &g_VBoxNetFltSolarisState.pOpenedStreams; (pStream = *ppPrevStream) != NULL; ppPrevStream = &pStream->pNext)
     807    for (ppPrevStream = &g_VBoxNetFltSolarisStreams; (pStream = *ppPrevStream) != NULL; ppPrevStream = &pStream->pNext)
    814808        if (pStream == (vboxnetflt_stream_t *)pQueue->q_ptr)
    815809            break;
     
    16871681 * the I_PUSH phase.
    16881682 *
     1683 * @param   pThis       The instance.
    16891684 */
    16901685static int vboxNetFltSolarisOpenStream(PVBOXNETFLTINS pThis)
     
    17101705        if (!ret)
    17111706        {
    1712             g_VBoxNetFltSolarisState.pCurInstance = pThis;
    1713             g_VBoxNetFltSolarisState.CurType = kPromiscStream;
     1707            g_VBoxNetFltSolarisInstance = pThis;
     1708            g_VBoxNetFltSolarisStreamType = kPromiscStream;
    17141709
    17151710            rc = ldi_ioctl(pThis->u.s.hIface, I_PUSH, (intptr_t)DEVICE_NAME, FKIOCTL, kcred, &ret);
    17161711
    1717             g_VBoxNetFltSolarisState.pCurInstance = NULL;
    1718             g_VBoxNetFltSolarisState.CurType = kUndefined;
     1712            g_VBoxNetFltSolarisInstance = NULL;
     1713            g_VBoxNetFltSolarisStreamType = kUndefined;
    17191714
    17201715            if (!rc)
     
    17821777     * Statuatory Warning: Hackish code ahead.
    17831778     */
    1784     if (strlen(pThis->szName) > VBOXNETFLT_IFNAME_LEN - 1)
    1785     {
    1786         LogRel((DEVICE_NAME ":vboxNetFltSolarisModSetup: interface name too long %s\n", pThis->szName));
    1787         return VERR_INTNET_FLT_IF_NOT_FOUND;
    1788     }
    1789 
    17901779    char *pszModName = DEVICE_NAME;
    17911780
     
    19001889                                 * of the inability to pass user data while inserting.
    19011890                                 */
    1902                                 g_VBoxNetFltSolarisState.pCurInstance = pThis;
    1903                                 g_VBoxNetFltSolarisState.CurType = kIpStream;
     1891                                g_VBoxNetFltSolarisInstance = pThis;
     1892                                g_VBoxNetFltSolarisStreamType = kIpStream;
    19041893
    19051894                                /*
     
    19131902                                     * Inject/Eject from the host ARP stack.
    19141903                                     */
    1915                                     g_VBoxNetFltSolarisState.CurType = kArpStream;
     1904                                    g_VBoxNetFltSolarisStreamType = kArpStream;
    19161905                                    rc = strioctl(pVNodeArp, fAttach ? _I_INSERT : _I_REMOVE, (intptr_t)&ArpStrMod, 0, K_TO_K,
    19171906                                                kcred, &ret);
    19181907                                    if (!rc)
    19191908                                    {
    1920                                         g_VBoxNetFltSolarisState.pCurInstance = NULL;
    1921                                         g_VBoxNetFltSolarisState.CurType = kUndefined;
     1909                                        g_VBoxNetFltSolarisInstance = NULL;
     1910                                        g_VBoxNetFltSolarisStreamType = kUndefined;
    19221911
    19231912                                        /*
     
    19901979    }
    19911980    else
    1992         LogRel((DEVICE_NAME ":vboxNetFltSolarisModSetup: invalid interface '%s'.\n", pThis->szName));
     1981    {
     1982        /*
     1983         * This would happen for interfaces that are not plumbed.
     1984         */
     1985        LogRel((DEVICE_NAME ":vboxNetFltSolarisModSetup: Warning: seems '%s' is unplumbed.\n", pThis->szName));
     1986        rc = VINF_SUCCESS;
     1987    }
    19931988
    19941989    ldi_close(ARPDevHandle, FREAD | FWRITE, kcred);
    19951990    ldi_close(IPDevHandle, FREAD | FWRITE, kcred);
     1991
     1992    if (RT_SUCCESS(rc))
     1993        return rc;
    19961994
    19971995    return VERR_INTNET_FLT_IF_FAILED;
     
    20182016        if (RT_SUCCESS(rc))
    20192017            ASMAtomicWriteBool(&pThis->fDisconnectedFromHost, false);
     2018        else
     2019            vboxNetFltSolarisCloseStream(pThis);
    20202020    }
    20212021    else
     
    25732573     * Don't loopback packets we transmit to the wire.
    25742574     */
     2575    /** @todo maybe we need not check for loopback for INTNETTRUNKDIR_HOST case? */
    25752576    if (vboxNetFltSolarisIsOurMBlk(pThis, pPromiscStream, pMsg))
    25762577    {
     
    25802581    }
    25812582
    2582 #if 0
    2583     /*
    2584      * Yeah, I wish.
    2585      */
    2586     if (pMsg->b_flag & MSGNOLOOP)
    2587     {
    2588         freemsg(pMsg);
    2589         return VINF_SUCCESS;
    2590     }
    2591 #endif
    2592 
    25932583    /*
    25942584     * Figure out the source of the packet based on the source Mac address.
    25952585     */
    2596     /** @todo Is there a more fool-proof way to determine if the packet was indeed sent from the host?? */
    25972586    uint32_t fSrc = INTNETTRUNKDIR_WIRE;
    25982587    PRTNETETHERHDR pEthHdr = (PRTNETETHERHDR)pMsg->b_rptr;
     
    26422631        return NULL;
    26432632
    2644     vboxnetflt_stream_t *pCur = g_VBoxNetFltSolarisState.pOpenedStreams;
     2633    vboxnetflt_stream_t *pCur = g_VBoxNetFltSolarisStreams;
    26452634    for (; pCur; pCur = pCur->pNext)
    26462635        if (pCur == pStream)
     
    28602849{
    28612850    LogFlow((DEVICE_NAME ":vboxNetFltPortOsGetMacAddress pThis=%p\n", pThis));
    2862 
    2863     RTMAC EmptyMac;
    2864     bzero(&EmptyMac, sizeof(EmptyMac));
    2865     if (!bcmp(&pThis->u.s.Mac, &EmptyMac, sizeof(EmptyMac)))    /* This should never happen... */
    2866     {
    2867         /* Bummer, Mac address is not copied yet. */
    2868         LogRel((DEVICE_NAME ":vboxNetFltPortOsGetMacAddress: Mac address not cached yet!\n"));
    2869         return;
    2870     }
    2871 
    28722851    *pMac = pThis->u.s.Mac;
    28732852}
     
    29952974
    29962975                vboxNetFltSolarisQueueLoopback(pThis, pPromiscStream, pMsg);
    2997 
    2998 #if 0
    2999                 /*
    3000                  * Too bad we can't keep this, though it "works"....
    3001                  */
    3002                 pMsg->b_flag |= MSGNOLOOP;
    3003 #endif
    30042976                putnext(WR(pPromiscStream->Stream.pReadQueue), pMsg);
    30052977            }
     
    30353007
    30363008                    vboxnetflt_stream_t *pArpStream = ASMAtomicUoReadPtr((void * volatile *)&pThis->u.s.pvArpStream);
    3037                     if (RT_LIKELY(pArpStream))
     3009                    if (pArpStream)
    30383010                    {
    30393011                        queue_t *pArpReadQueue = pArpStream->pReadQueue;
     
    30413013                    }
    30423014                    else
    3043                         rc = VERR_INVALID_POINTER;
     3015                    {
     3016                        /*
     3017                         * For unplumbed interfaces we may not be bound to ARP.
     3018                         */
     3019                        freemsg(pMsg);
     3020                    }
    30443021                }
    30453022                else
     
    30573034                LogFlow((DEVICE_NAME ":vboxNetFltPortOsXmit INTNETTRUNKDIR_HOST\n"));
    30583035
    3059                 pMsg->b_rptr += sizeof(RTNETETHERHDR);
    3060 
    30613036                vboxnetflt_stream_t *pIpStream = ASMAtomicUoReadPtr((void * volatile *)&pThis->u.s.pvIpStream);
    3062                 if (RT_LIKELY(pIpStream))
     3037                if (pIpStream)
    30633038                {
     3039                    pMsg->b_rptr += sizeof(RTNETETHERHDR);
    30643040                    queue_t *pIpReadQueue = pIpStream->pReadQueue;
    30653041                    putnext(pIpReadQueue, pMsg);
    30663042                }
    30673043                else
    3068                     rc = VERR_INVALID_POINTER;                   
     3044                {
     3045                    /*
     3046                     * For unplumbed interfaces we may not be bound to IP.
     3047                     */
     3048                    freemsg(pMsg);
     3049                }
    30693050            }
    30703051        }
  • trunk/src/VBox/Main/HostImpl.cpp

    r12443 r12783  
    5252# include <limits.h>
    5353# include <stdio.h>
    54 # include <net/if.h>
    55 # include <sys/socket.h>
    56 # include <sys/sockio.h>
    57 # include <net/if_arp.h>
    58 # include <net/if.h>
     54# ifdef VBOX_SOLARIS_USE_DEVINFO
     55#  include <libdevinfo.h>
     56# else
     57#  include <net/if.h>
     58#  include <sys/socket.h>
     59#  include <sys/sockio.h>
     60#  include <net/if_arp.h>
     61#  include <net/if.h>
     62# endif /* VBOX_SOLARIS_USE_DEVINFO */
    5963# include <sys/types.h>
    6064# include <sys/stat.h>
     
    526530#endif /* RT_OS_WINDOWS */
    527531
    528 /**
    529  * Returns a list of host network interfaces.
    530  *
    531  * @returns COM status code
    532  * @param drives address of result pointer
    533  */
    534 STDMETHODIMP Host::COMGETTER(NetworkInterfaces) (IHostNetworkInterfaceCollection **networkInterfaces)
    535 {
    536 #if defined(RT_OS_WINDOWS) ||  defined(VBOX_WITH_NETFLT) /*|| defined(RT_OS_OS2)*/
    537     if (!networkInterfaces)
    538         return E_POINTER;
    539     AutoWriteLock alock (this);
    540     CHECK_READY();
    541 
    542     std::list <ComObjPtr <HostNetworkInterface> > list;
    543 
    544 # if defined(RT_OS_DARWIN)
    545     PDARWINETHERNIC pEtherNICs = DarwinGetEthernetControllers();
    546     while (pEtherNICs)
    547     {
    548         ComObjPtr<HostNetworkInterface> IfObj;
    549         IfObj.createObject();
    550         if (SUCCEEDED(IfObj->init(Bstr(pEtherNICs->szName), Guid(pEtherNICs->Uuid))))
    551             list.push_back(IfObj);
    552 
    553         /* next, free current */
    554         void *pvFree = pEtherNICs;
    555         pEtherNICs = pEtherNICs->pNext;
    556         RTMemFree(pvFree);
    557     }
    558 
    559 # elif defined(RT_OS_SOLARIS)
     532#ifdef RT_OS_SOLARIS
     533static void vboxSolarisAddHostIface(char *pszIface, int Instance, PCRTMAC pMac, void *pvArg)
     534{
     535    std::list <ComObjPtr <HostNetworkInterface> > *pList = (std::list <ComObjPtr <HostNetworkInterface> > *)pvArg;
    560536
    561537    typedef std::map <std::string, std::string> NICMap;
     
    564540    if (SolarisNICMap.empty())
    565541    {
     542        SolarisNICMap.insert(NICPair("afe", "ADMtek Centaur/Comet Fast Ethernet"));
    566543        SolarisNICMap.insert(NICPair("aggr", "Link Aggregation Interface"));
    567544        SolarisNICMap.insert(NICPair("bge", "Broadcom BCM57xx Gigabit Ethernet"));
     
    579556        SolarisNICMap.insert(NICPair("ipge", "PCI-E Gigabit Ethernet"));
    580557        SolarisNICMap.insert(NICPair("iprb", "Intel 82557/58/59 Ethernet"));
     558        SolarisNICMap.insert(NICPair("mxfe", "Macronix 98715 Fast Ethernet"));
    581559        SolarisNICMap.insert(NICPair("nge", "Nvidia Gigabit Ethernet"));
    582560        SolarisNICMap.insert(NICPair("pcelx", "3COM EtherLink III PCMCIA Ethernet"));
     
    592570    }
    593571
     572    /*
     573     * Try picking up description from our NIC map.
     574     */
     575    char szNICDesc[256];
     576    std::string Description = SolarisNICMap[pszIface];
     577    if (Description != "")
     578        RTStrPrintf(szNICDesc, sizeof(szNICDesc), "%s%d - %s", pszIface, Instance, Description.c_str());
     579    else
     580        RTStrPrintf(szNICDesc, sizeof(szNICDesc), "%s%d - Ethernet", pszIface, Instance);
     581
     582    /*
     583     * Construct UUID with interface name and the MAC address if available.
     584     */
     585    RTUUID Uuid;
     586    RTUuidClear(&Uuid);
     587    memcpy(&Uuid, pszIface, RT_MIN(strlen(pszIface), sizeof(Uuid)));
     588    Uuid.Gen.u8ClockSeqHiAndReserved = (Uuid.Gen.u8ClockSeqHiAndReserved & 0x3f) | 0x80;
     589    Uuid.Gen.u16TimeHiAndVersion = (Uuid.Gen.u16TimeHiAndVersion & 0x0fff) | 0x4000;
     590    if (pMac)
     591    {
     592        Uuid.Gen.au8Node[0] = pMac->au8[0];
     593        Uuid.Gen.au8Node[1] = pMac->au8[1];
     594        Uuid.Gen.au8Node[2] = pMac->au8[2];
     595        Uuid.Gen.au8Node[3] = pMac->au8[3];
     596        Uuid.Gen.au8Node[4] = pMac->au8[4];
     597        Uuid.Gen.au8Node[5] = pMac->au8[5];
     598    }
     599
     600    ComObjPtr<HostNetworkInterface> IfObj;
     601    IfObj.createObject();
     602    if (SUCCEEDED(IfObj->init(Bstr(szNICDesc), Guid(Uuid))))
     603        pList->push_back(IfObj);
     604}
     605
     606# ifdef VBOX_SOLARIS_USE_DEVINFO
     607static int vboxSolarisAddPhysHostIface(di_node_t Node, di_minor_t Minor, void *pvArg)
     608{
     609        /*
     610         * Skip aggregations.
     611         */
     612        if (!strcmp(di_driver_name(Node), "aggr"))
     613                return DI_WALK_CONTINUE;
     614
     615        /*
     616         * Skip softmacs.
     617         */
     618        if (!strcmp(di_driver_name(Node), "softmac"))
     619                return DI_WALK_CONTINUE;
     620
     621    vboxSolarisAddHostIface(di_driver_name(Node), di_instance(Node), NULL, pvArg);
     622        return DI_WALK_CONTINUE;
     623}
     624# endif /* VBOX_SOLARIS_USE_DEVINFO */
     625
     626#endif
     627
     628/**
     629 * Returns a list of host network interfaces.
     630 *
     631 * @returns COM status code
     632 * @param drives address of result pointer
     633 */
     634STDMETHODIMP Host::COMGETTER(NetworkInterfaces) (IHostNetworkInterfaceCollection **networkInterfaces)
     635{
     636#if defined(RT_OS_WINDOWS) ||  defined(VBOX_WITH_NETFLT) /*|| defined(RT_OS_OS2)*/
     637    if (!networkInterfaces)
     638        return E_POINTER;
     639    AutoWriteLock alock (this);
     640    CHECK_READY();
     641
     642    std::list <ComObjPtr <HostNetworkInterface> > list;
     643
     644# if defined(RT_OS_DARWIN)
     645    PDARWINETHERNIC pEtherNICs = DarwinGetEthernetControllers();
     646    while (pEtherNICs)
     647    {
     648        ComObjPtr<HostNetworkInterface> IfObj;
     649        IfObj.createObject();
     650        if (SUCCEEDED(IfObj->init(Bstr(pEtherNICs->szName), Guid(pEtherNICs->Uuid))))
     651            list.push_back(IfObj);
     652
     653        /* next, free current */
     654        void *pvFree = pEtherNICs;
     655        pEtherNICs = pEtherNICs->pNext;
     656        RTMemFree(pvFree);
     657    }
     658
     659# elif defined(RT_OS_SOLARIS)
     660
     661#ifdef VBOX_SOLARIS_USE_DEVINFO
     662    /*
     663     * Use libdevinfo for determining all physical interfaces.
     664     * @todo Try using libdlpi instead and using links rather than physical interfaces.
     665     */
     666    di_node_t Root;
     667    Root = di_init("/", DINFOCACHE);
     668    if (Root != DI_NODE_NIL)
     669    {
     670        di_walk_minor(Root, DDI_NT_NET, 0, &list, vboxSolarisAddPhysHostIface);
     671        di_fini(Root);
     672    }
     673#else
     674    /*
     675     * This gets only the list of all plumbed logical interfaces.
     676     */
    594677    int Sock = socket(PF_INET, SOCK_DGRAM, IPPROTO_IP);
    595678    if (Sock > 0)
     
    659742
    660743                        /*
    661                          * Try picking up description from our NIC map.
     744                         * Add the interface.
    662745                         */
    663746                        char szIfaceName[LIFNAMSIZ + 1];
    664747                        strncpy(szIfaceName, pszIface, cbIface - cbInstance);
    665748                        szIfaceName[cbIface - cbInstance] = '\0';
    666                         std::string Description = SolarisNICMap[szIfaceName];
    667                         if (Description != "")
    668                             RTStrPrintf(szNICDesc, sizeof(szNICDesc), "%s - %s", pszIface, Description.c_str());
    669                         else
    670                             RTStrPrintf(szNICDesc, sizeof(szNICDesc), "%s - Ethernet", pszIface);
    671 
    672                         /*
    673                          * Construct UUID with BSD-name of the interface and the MAC address.
    674                          */
    675                         RTUUID Uuid;
    676                         RTUuidClear(&Uuid);
    677                         memcpy(&Uuid, pszIface, RT_MIN(strlen(pszIface), sizeof(Uuid)));
    678                         Uuid.Gen.u8ClockSeqHiAndReserved = (Uuid.Gen.u8ClockSeqHiAndReserved & 0x3f) | 0x80;
    679                         Uuid.Gen.u16TimeHiAndVersion = (Uuid.Gen.u16TimeHiAndVersion & 0x0fff) | 0x4000;
    680                         Uuid.Gen.au8Node[0] = Mac.au8[0];
    681                         Uuid.Gen.au8Node[1] = Mac.au8[1];
    682                         Uuid.Gen.au8Node[2] = Mac.au8[2];
    683                         Uuid.Gen.au8Node[3] = Mac.au8[3];
    684                         Uuid.Gen.au8Node[4] = Mac.au8[4];
    685                         Uuid.Gen.au8Node[5] = Mac.au8[5];
    686 
    687                         ComObjPtr<HostNetworkInterface> IfObj;
    688                         IfObj.createObject();
    689                         if (SUCCEEDED(IfObj->init(Bstr(szNICDesc), Guid(Uuid))))
    690                             list.push_back(IfObj);
     749
     750                        int Instance = atoi(pszEnd + 1);
     751                        vboxSolarisAddHostIface(szIfaceName, Instance, &Mac, &list);
    691752                    }
    692753                }
     
    695756        close(Sock);
    696757    }
     758#endif
    697759
    698760# elif defined RT_OS_WINDOWS
  • trunk/src/VBox/Main/Makefile.kmk

    r12780 r12783  
    211211VBoxSVC_DEFS.linux += VBOX_USE_LIBHAL
    212212VBoxSVC_DEFS.solaris += VBOX_USE_LIBHAL
     213ifdef VBOX_SOLARIS_USE_DEVINFO
     214 VBoxSVC_DEFS.solaris += VBOX_SOLARIS_USE_DEVINFO
     215endif
    213216
    214217VBoxSVC_INCS = \
     
    233236        adm
    234237ifdef VBOX_WITH_NETFLT
    235  VBoxSVC_LIBS.solaris += \
    236         socket
     238 ifdef VBOX_SOLARIS_USE_DEVINFO
     239  VBoxSVC_LIBS.solaris += devinfo
     240 else
     241  VBoxSVC_LIBS.solaris += socket
     242 endif
    237243endif
    238244ifdef VBOX_WITH_USB
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