儲存庫 vbox 的更動 17185
- 時間撮記:
- 2009-2-27 上午12:52:08 (16 年 以前)
- 位置:
- trunk/src/VBox/HostDrivers
- 檔案:
-
- 修改 2 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/HostDrivers/VBoxNetAdp/VBoxNetAdp.c
r17184 r17185 39 39 #include <VBox/log.h> 40 40 #include <VBox/err.h> 41 #include <VBox/version.h>42 41 #include <iprt/assert.h> 43 42 #include <iprt/string.h> 44 43 #include <iprt/spinlock.h> 45 44 #include <iprt/uuid.h> 45 #include <VBox/version.h> 46 46 47 47 /** r=bird: why is this here in the agnositc code? */ 48 #if ndef RT_OS_SOLARIS48 #ifdef RT_OS_DARWIN 49 49 # include <net/ethernet.h> 50 50 # include <net/if_ether.h> … … 65 65 66 66 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 #endif85 86 pMac->au8[3] = pThis->uUnit >> 16;87 pMac->au8[4] = pThis->uUnit >> 8;88 pMac->au8[5] = pThis->uUnit;89 }90 91 92 67 AssertCompileMemberSize(VBOXNETADP, enmState, sizeof(uint32_t)); 93 68 … … 122 97 123 98 /** 124 * Sets the enmState member atomically .99 * Sets the enmState member atomically after first acquiring the spinlock. 125 100 * 126 101 * Used for all updates. … … 131 106 DECLINLINE(void) vboxNetAdpSetStateWithLock(PVBOXNETADP pThis, VBOXNETADPSTATE enmNewState) 132 107 { 133 VBOXNETADPSTATE enmState;134 108 RTSPINLOCKTMP Tmp = RTSPINLOCKTMP_INITIALIZER; 135 Log(("vboxNetAdpSetStateWithLock: pThis=%p, state=%d.\n", pThis, enm State));109 Log(("vboxNetAdpSetStateWithLock: pThis=%p, state=%d.\n", pThis, enmNewState)); 136 110 RTSpinlockAcquire(pThis->hSpinlock, &Tmp); 137 111 vboxNetAdpSetState(pThis, enmNewState); … … 193 167 /** 194 168 * Finds a instance by its name, the caller does the locking. 195 *196 169 * 197 170 * @returns Pointer to the instance by the given name. NULL if not found. … … 333 306 334 307 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 */ 317 DECLHIDDEN(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; 335 332 } 336 333 … … 847 844 DECLHIDDEN(bool) vboxNetAdpCanUnload(PVBOXNETADPGLOBALS pGlobals) 848 845 { 849 int rc;846 bool fRc = true; /* Assume it can be unloaded. */ 850 847 unsigned i; 851 bool fRc = true; /* Assume it can be unloaded. */852 848 853 849 for (i = 0; i < RT_ELEMENTS(pGlobals->aAdapters); i++) -
trunk/src/VBox/HostDrivers/VBoxNetFlt/VBoxNetFlt.c
r17184 r17185 222 222 #include <VBox/err.h> 223 223 #include <iprt/assert.h> 224 #include <iprt/mem.h>225 224 #include <iprt/string.h> 226 225 #include <iprt/spinlock.h> 226 #include <iprt/uuid.h> 227 #include <iprt/mem.h> 228 #include <iprt/time.h> 227 229 #include <iprt/semaphore.h> 228 #include <iprt/time.h> 229 #include <iprt/uuid.h> 230 230 231 231 232 /*******************************************************************************
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器