VirtualBox

儲存庫 vbox 的更動 17185


忽略:
時間撮記:
2009-2-27 上午12:52:08 (16 年 以前)
作者:
vboxsync
訊息:

VBoxNet*: Diff alignment.

位置:
trunk/src/VBox/HostDrivers
檔案:
修改 2 筆資料

圖例:

未更動
新增
刪除
  • trunk/src/VBox/HostDrivers/VBoxNetAdp/VBoxNetAdp.c

    r17184 r17185  
    3939#include <VBox/log.h>
    4040#include <VBox/err.h>
    41 #include <VBox/version.h>
    4241#include <iprt/assert.h>
    4342#include <iprt/string.h>
    4443#include <iprt/spinlock.h>
    4544#include <iprt/uuid.h>
     45#include <VBox/version.h>
    4646
    4747/** r=bird: why is this here in the agnositc code? */
    48 #ifndef RT_OS_SOLARIS
     48#ifdef RT_OS_DARWIN
    4949# include <net/ethernet.h>
    5050# include <net/if_ether.h>
     
    6565
    6666
    67 
    68 /**
    69  * Generate a suitable MAC address.
    70  *
    71  * @param   pThis       The instance.
    72  * @param   pMac        Where to return the MAC address.
    73  */
    74 DECLHIDDEN(void) vboxNetAdpComposeMACAddress(PVBOXNETADP pThis, PRTMAC pMac)
    75 {
    76 #if 0 /* Use a locally administered version of the OUI we use for the guest NICs. */
    77     pMac->au8[0] = 0x08 | 2;
    78     pMac->au8[1] = 0x00;
    79     pMac->au8[2] = 0x27;
    80 #else /* this is what \0vb comes down to. It seems to be unassigned atm. */
    81     pMac->au8[0] = 0;
    82     pMac->au8[1] = 0x76;
    83     pMac->au8[2] = 0x62;
    84 #endif
    85 
    86     pMac->au8[3] = pThis->uUnit >> 16;
    87     pMac->au8[4] = pThis->uUnit >> 8;
    88     pMac->au8[5] = pThis->uUnit;
    89 }
    90 
    91 
    9267AssertCompileMemberSize(VBOXNETADP, enmState, sizeof(uint32_t));
    9368
     
    12297
    12398/**
    124  * Sets the enmState member atomically.
     99 * Sets the enmState member atomically after first acquiring the spinlock.
    125100 *
    126101 * Used for all updates.
     
    131106DECLINLINE(void) vboxNetAdpSetStateWithLock(PVBOXNETADP pThis, VBOXNETADPSTATE enmNewState)
    132107{
    133     VBOXNETADPSTATE enmState;
    134108    RTSPINLOCKTMP Tmp = RTSPINLOCKTMP_INITIALIZER;
    135     Log(("vboxNetAdpSetStateWithLock: pThis=%p, state=%d.\n", pThis, enmState));
     109    Log(("vboxNetAdpSetStateWithLock: pThis=%p, state=%d.\n", pThis, enmNewState));
    136110    RTSpinlockAcquire(pThis->hSpinlock, &Tmp);
    137111    vboxNetAdpSetState(pThis, enmNewState);
     
    193167/**
    194168 * Finds a instance by its name, the caller does the locking.
    195  *
    196169 *
    197170 * @returns Pointer to the instance by the given name. NULL if not found.
     
    333306
    334307    NOREF(cBusy);
     308}
     309
     310
     311/**
     312 * Generate a suitable MAC address.
     313 *
     314 * @param   pThis       The instance.
     315 * @param   pMac        Where to return the MAC address.
     316 */
     317DECLHIDDEN(void) vboxNetAdpComposeMACAddress(PVBOXNETADP pThis, PRTMAC pMac)
     318{
     319#if 0 /* Use a locally administered version of the OUI we use for the guest NICs. */
     320    pMac->au8[0] = 0x08 | 2;
     321    pMac->au8[1] = 0x00;
     322    pMac->au8[2] = 0x27;
     323#else /* this is what \0vb comes down to. It seems to be unassigned atm. */
     324    pMac->au8[0] = 0;
     325    pMac->au8[1] = 0x76;
     326    pMac->au8[2] = 0x62;
     327#endif
     328
     329    pMac->au8[3] = 0; /* pThis->uUnit >> 16; */
     330    pMac->au8[4] = 0; /* pThis->uUnit >> 8; */
     331    pMac->au8[5] = pThis->uUnit;
    335332}
    336333
     
    847844DECLHIDDEN(bool) vboxNetAdpCanUnload(PVBOXNETADPGLOBALS pGlobals)
    848845{
    849     int rc;
     846    bool fRc = true; /* Assume it can be unloaded. */
    850847    unsigned i;
    851     bool fRc = true; /* Assume it can be unloaded. */
    852848
    853849    for (i = 0; i < RT_ELEMENTS(pGlobals->aAdapters); i++)
  • trunk/src/VBox/HostDrivers/VBoxNetFlt/VBoxNetFlt.c

    r17184 r17185  
    222222#include <VBox/err.h>
    223223#include <iprt/assert.h>
    224 #include <iprt/mem.h>
    225224#include <iprt/string.h>
    226225#include <iprt/spinlock.h>
     226#include <iprt/uuid.h>
     227#include <iprt/mem.h>
     228#include <iprt/time.h>
    227229#include <iprt/semaphore.h>
    228 #include <iprt/time.h>
    229 #include <iprt/uuid.h>
     230
    230231
    231232/*******************************************************************************
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette