Changeset 16978 in vbox
- Timestamp:
- Feb 20, 2009 5:35:38 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/VBoxNetAdp/VBoxNetAdp.c
r16960 r16978 5 5 6 6 /* 7 * Copyright (C) 2008 Sun Microsystems, Inc.7 * Copyright (C) 2008-2009 Sun Microsystems, Inc. 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 20 20 */ 21 21 22 /******************************************************************************* 23 * Header Files * 24 *******************************************************************************/ 22 25 #define LOG_GROUP LOG_GROUP_NET_TAP_DRV 23 26 #include "VBoxNetAdpInternal.h" … … 41 44 #include <sys/param.h> 42 45 46 43 47 /******************************************************************************* 44 48 * Defined Constants And Macros * … … 48 52 49 53 54 55 /** 56 * Generate a suitable MAC address. 57 * 58 * @param pThis The instance. 59 * @param pMac Where to return the MAC address. 60 */ 50 61 DECLHIDDEN(void) vboxNetAdpComposeMACAddress(PVBOXNETADP pThis, PRTMAC pMac) 51 62 { 52 /* Note that terminating 0 is included. */ 53 memcpy(pMac->au8, "\0vbox", sizeof(pMac->au8)); 54 pMac->au8[sizeof(pMac->au8) - 1] += pThis->uUnit; 63 #if 0 /* Use a locally administered version of the OUI we use for the guest NICs. */ 64 pMac->au8[0] = 0x08 | 2; 65 pMac->au8[1] = 0x00; 66 pMac->au8[2] = 0x27; 67 #else /* this is what \0vb comes down to. It seems to be unassigned atm. */ 68 pMac->au8[0] = 0; 69 pMac->au8[1] = 0x76; 70 pMac->au8[2] = 0x62; 71 #endif 72 73 pMac->au8[3] = pThis->uUnit >> 16; 74 pMac->au8[4] = pThis->uUnit >> 8; 75 pMac->au8[5] = pThis->uUnit; 55 76 } 56 77 … … 913 934 RTSPINLOCKTMP Tmp = RTSPINLOCKTMP_INITIALIZER; 914 935 PVBOXNETADP pThis = &pGlobals->aAdapters[i]; 915 936 916 937 RTSpinlockAcquire(pThis->hSpinlock, &Tmp); 917 938 if (vboxNetAdpIsVoid(pThis)) … … 942 963 int rc; 943 964 RTSPINLOCKTMP Tmp = RTSPINLOCKTMP_INITIALIZER; 944 965 945 966 RTSpinlockAcquire(pThis->hSpinlock, &Tmp); 946 967 if (pThis->enmState != kVBoxNetAdpState_Available || pThis->cBusy)
Note:
See TracChangeset
for help on using the changeset viewer.