VirtualBox

Changeset 8960 in vbox for trunk/src


Ignore:
Timestamp:
May 20, 2008 2:49:14 PM (17 years ago)
Author:
vboxsync
Message:

Hungarian.

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

Legend:

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

    r8610 r8960  
    277277#ifdef VBOX_WITH_CROSSBOW
    278278            cbRead = sizeof(achBuf);
    279             rc = gLibDlpiRecv(pData->pDeviceHandle, NULL, NULL, achBuf, &cbRead, -1, NULL);
     279            rc = g_pfnLibDlpiRecv(pData->pDeviceHandle, NULL, NULL, achBuf, &cbRead, -1, NULL);
    280280            rc = RT_LIKELY(rc == DLPI_SUCCESS) ? VINF_SUCCESS : SolarisDLPIErr2VBoxErr(rc);
    281281#else
     
    520520     * Open & bind the NIC using the datalink provider routine.
    521521     */
    522     int rc = gLibDlpiOpen(pData->pszDeviceName, &pData->pDeviceHandle, DLPI_RAW);
     522    int rc = g_pfnLibDlpiOpen(pData->pszDeviceName, &pData->pDeviceHandle, DLPI_RAW);
    523523    if (rc != DLPI_SUCCESS)
    524524        return PDMDrvHlpVMSetError(pData->pDrvIns, VERR_HOSTIF_INIT_FAILED, RT_SRC_POS,
     
    526526
    527527    dlpi_info_t vnicInfo;
    528     rc = gLibDlpiInfo(pData->pDeviceHandle, &vnicInfo, 0);
     528    rc = g_pfnLibDlpiInfo(pData->pDeviceHandle, &vnicInfo, 0);
    529529    if (rc == DLPI_SUCCESS)
    530530    {
    531531        if (vnicInfo.di_mactype == DL_ETHER)
    532532        {
    533             rc = gLibDlpiBind(pData->pDeviceHandle, DLPI_ANY_SAP, NULL);
     533            rc = g_pfnLibDlpiBind(pData->pDeviceHandle, DLPI_ANY_SAP, NULL);
    534534            if (rc == DLPI_SUCCESS)
    535535            {
    536                 rc = gLibDlpiSetPhysAddr(pData->pDeviceHandle, DL_CURR_PHYS_ADDR, &pData->MacAddress, ETHERADDRL);
     536                rc = g_pfnLibDlpiSetPhysAddr(pData->pDeviceHandle, DL_CURR_PHYS_ADDR, &pData->MacAddress, ETHERADDRL);
    537537                if (rc == DLPI_SUCCESS)
    538538                {
    539                     rc = gLibDlpiPromiscon(pData->pDeviceHandle, DL_PROMISC_SAP);
     539                    rc = g_pfnLibDlpiPromiscon(pData->pDeviceHandle, DL_PROMISC_SAP);
    540540                    if (rc == DLPI_SUCCESS)
    541541                    {
    542542                        /* Need to use DL_PROMIS_PHYS (not multicast) as we cannot be sure what the guest needs. */
    543                         rc = gLibDlpiPromiscon(pData->pDeviceHandle, DL_PROMISC_PHYS);
     543                        rc = g_pfnLibDlpiPromiscon(pData->pDeviceHandle, DL_PROMISC_PHYS);
    544544                        if (rc == DLPI_SUCCESS)
    545545                        {
    546                             pData->FileDevice = gLibDlpiFd(pData->pDeviceHandle);
     546                            pData->FileDevice = g_pfnLibDlpiFd(pData->pDeviceHandle);
    547547                            if (pData->FileDevice >= 0)
    548548                            {
     
    577577        rc = PDMDrvHlpVMSetError(pData->pDrvIns, VERR_HOSTIF_INIT_FAILED, RT_SRC_POS,
    578578                                         N_("Failed to obtain VNIC info"));
    579     gLibDlpiClose(pData->pDeviceHandle);
     579    g_pfnLibDlpiClose(pData->pDeviceHandle);
    580580    return rc;
    581581}
     
    977977     */
    978978# ifdef VBOX_WITH_CROSSBOW
    979     if (!gLibDlpiFound())
     979    if (!VBoxLibDlpiFound())
    980980    {
    981981        return PDMDrvHlpVMSetError(pDrvIns, VERR_HOSTIF_INIT_FAILED, RT_SRC_POS,
  • trunk/src/VBox/Devices/Network/solaris/vbox-libdlpi.cpp

    r8601 r8960  
    3939
    4040/** All the symbols we need from libdlpi.
    41  * @todo r=bird: rename to g_pfnLibDlpi*.
    4241 * @{
    4342 */
    44 int (*gLibDlpiOpen)(const char *, dlpi_handle_t *, uint_t);
    45 void (*gLibDlpiClose)(dlpi_handle_t);
    46 int (*gLibDlpiInfo)(dlpi_handle_t, dlpi_info_t *, uint_t);
    47 int (*gLibDlpiBind)(dlpi_handle_t, uint_t, uint_t *);
    48 int (*gLibDlpiSetPhysAddr)(dlpi_handle_t, uint_t, const void *, size_t);
    49 int (*gLibDlpiPromiscon)(dlpi_handle_t, uint_t);
    50 int (*gLibDlpiRecv)(dlpi_handle_t, void *, size_t *, void *, size_t *, int, dlpi_recvinfo_t *);
    51 int (*gLibDlpiFd)(dlpi_handle_t);
     43int (*g_pfnLibDlpiOpen)(const char *, dlpi_handle_t *, uint_t);
     44void (*g_pfnLibDlpiClose)(dlpi_handle_t);
     45int (*g_pfnLibDlpiInfo)(dlpi_handle_t, dlpi_info_t *, uint_t);
     46int (*g_pfnLibDlpiBind)(dlpi_handle_t, uint_t, uint_t *);
     47int (*g_pfnLibDlpiSetPhysAddr)(dlpi_handle_t, uint_t, const void *, size_t);
     48int (*g_pfnLibDlpiPromiscon)(dlpi_handle_t, uint_t);
     49int (*g_pfnLibDlpiRecv)(dlpi_handle_t, void *, size_t *, void *, size_t *, int, dlpi_recvinfo_t *);
     50int (*g_pfnLibDlpiFd)(dlpi_handle_t);
    5251/** @} */
    5352
    54 bool gLibDlpiFound(void)
     53bool VBoxLibDlpiFound(void)
    5554{
    5655    RTLDRMOD hLibDlpi;
     
    6261    if (!RT_SUCCESS(RTLdrLoad(LIB_DLPI, &hLibDlpi)))
    6362        return false;
    64     if (   RT_SUCCESS(RTLdrGetSymbol(hLibDlpi, "dlpi_open", (void **)&gLibDlpiOpen))
    65         && RT_SUCCESS(RTLdrGetSymbol(hLibDlpi, "dlpi_close", (void **)&gLibDlpiClose))
    66         && RT_SUCCESS(RTLdrGetSymbol(hLibDlpi, "dlpi_info", (void **)&gLibDlpiInfo))
    67         && RT_SUCCESS(RTLdrGetSymbol(hLibDlpi, "dlpi_bind", (void **)&gLibDlpiBind))
    68         && RT_SUCCESS(RTLdrGetSymbol(hLibDlpi, "dlpi_promiscon", (void **)&gLibDlpiPromiscon))
    69         && RT_SUCCESS(RTLdrGetSymbol(hLibDlpi, "dlpi_set_physaddr", (void **)&gLibDlpiSetPhysAddr))
    70         && RT_SUCCESS(RTLdrGetSymbol(hLibDlpi, "dlpi_recv", (void **)&gLibDlpiRecv))
    71         && RT_SUCCESS(RTLdrGetSymbol(hLibDlpi, "dlpi_fd", (void **)&gLibDlpiFd))
     63    if (   RT_SUCCESS(RTLdrGetSymbol(hLibDlpi, "dlpi_open", (void **)&g_pfnLibDlpiOpen))
     64        && RT_SUCCESS(RTLdrGetSymbol(hLibDlpi, "dlpi_close", (void **)&g_pfnLibDlpiClose))
     65        && RT_SUCCESS(RTLdrGetSymbol(hLibDlpi, "dlpi_info", (void **)&g_pfnLibDlpiInfo))
     66        && RT_SUCCESS(RTLdrGetSymbol(hLibDlpi, "dlpi_bind", (void **)&g_pfnLibDlpiBind))
     67        && RT_SUCCESS(RTLdrGetSymbol(hLibDlpi, "dlpi_promiscon", (void **)&g_pfnLibDlpiPromiscon))
     68        && RT_SUCCESS(RTLdrGetSymbol(hLibDlpi, "dlpi_set_physaddr", (void **)&g_pfnLibDlpiSetPhysAddr))
     69        && RT_SUCCESS(RTLdrGetSymbol(hLibDlpi, "dlpi_recv", (void **)&g_pfnLibDlpiRecv))
     70        && RT_SUCCESS(RTLdrGetSymbol(hLibDlpi, "dlpi_fd", (void **)&g_pfnLibDlpiFd))
    7271       )
    7372    {
  • trunk/src/VBox/Devices/Network/solaris/vbox-libdlpi.h

    r8571 r8960  
    2626#include <libdlpi.h>
    2727
    28 extern int (*gLibDlpiOpen)(const char *, dlpi_handle_t *, uint_t);
    29 extern void (*gLibDlpiClose)(dlpi_handle_t);
    30 extern int (*gLibDlpiInfo)(dlpi_handle_t, dlpi_info_t *, uint_t);
    31 extern int (*gLibDlpiBind)(dlpi_handle_t, uint_t, uint_t *);
    32 extern int (*gLibDlpiSetPhysAddr)(dlpi_handle_t, uint_t, const void *, size_t);
    33 extern int (*gLibDlpiPromiscon)(dlpi_handle_t, uint_t);
    34 extern int (*gLibDlpiRecv)(dlpi_handle_t, void *, size_t *, void *, size_t *, int, dlpi_recvinfo_t *);
    35 extern int (*gLibDlpiFd)(dlpi_handle_t);
     28extern int (*g_pfnLibDlpiOpen)(const char *, dlpi_handle_t *, uint_t);
     29extern void (*g_pfnLibDlpiClose)(dlpi_handle_t);
     30extern int (*g_pfnLibDlpiInfo)(dlpi_handle_t, dlpi_info_t *, uint_t);
     31extern int (*g_pfnLibDlpiBind)(dlpi_handle_t, uint_t, uint_t *);
     32extern int (*g_pfnLibDlpiSetPhysAddr)(dlpi_handle_t, uint_t, const void *, size_t);
     33extern int (*g_pfnLibDlpiPromiscon)(dlpi_handle_t, uint_t);
     34extern int (*g_pfnLibDlpiRecv)(dlpi_handle_t, void *, size_t *, void *, size_t *, int, dlpi_recvinfo_t *);
     35extern int (*g_pfnLibDlpiFd)(dlpi_handle_t);
    3636
    37 extern bool gLibDlpiFound(void);
     37extern bool VBoxLibDlpiFound(void);
    3838
    3939#endif /* ____H_VBOX_LIBDLPI not defined */
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