Changeset 35809 in vbox for trunk/src/VBox/HostDrivers/VBoxNetAdp/darwin
- Timestamp:
- Feb 1, 2011 12:31:15 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/VBoxNetAdp/darwin/VBoxNetAdp-darwin.cpp
r35786 r35809 136 136 pUuid->Gen.u8ClockSeqHiAndReserved = (pUuid->Gen.u8ClockSeqHiAndReserved & 0x3f) | 0x80; 137 137 pUuid->Gen.u16TimeHiAndVersion = (pUuid->Gen.u16TimeHiAndVersion & 0x0fff) | 0x4000; 138 pUuid->Gen.u8ClockSeqLow = pThis-> uUnit;138 pUuid->Gen.u8ClockSeqLow = pThis->nUnit; 139 139 vboxNetAdpComposeMACAddress(pThis, (PRTMAC)pUuid->Gen.au8Node); 140 140 } … … 193 193 194 194 195 int vboxNetAdpOsCreate(PVBOXNETADP pThis, PCRTMAC pMACAddress, const char *pcszName) 196 { 197 /* TODO: Use pcszName */ 195 196 int vboxNetAdpOsCreate(PVBOXNETADP pThis, PCRTMAC pMACAddress) 197 { 198 198 int rc; 199 199 struct ifnet_init_params Params; … … 216 216 memcpy(LLADDR(&mac), pMACAddress->au8, mac.sdl_alen); 217 217 218 RTStrPrintf(pThis->szName, VBOXNETADP_MAX_NAME_LEN, "%s%d", VBOXNETADP_NAME, pThis-> uUnit);218 RTStrPrintf(pThis->szName, VBOXNETADP_MAX_NAME_LEN, "%s%d", VBOXNETADP_NAME, pThis->nUnit); 219 219 vboxNetAdpDarwinComposeUUID(pThis, &uuid); 220 220 Params.uniqueid = uuid.au8; 221 221 Params.uniqueid_len = sizeof(uuid); 222 222 Params.name = VBOXNETADP_NAME; 223 Params.unit = pThis-> uUnit;223 Params.unit = pThis->nUnit; 224 224 Params.family = IFNET_FAMILY_ETHERNET; 225 225 Params.type = IFT_ETHER; … … 294 294 if (rc == VERR_TIMEOUT) 295 295 LogRel(("VBoxAdpDrv: Failed to detach interface %s%d\n.", 296 VBOXNETADP_NAME, pThis-> uUnit));296 VBOXNETADP_NAME, pThis->nUnit)); 297 297 err = ifnet_release(pThis->u.s.pIface); 298 298 if (err) … … 348 348 case IOCBASECMD(VBOXNETADP_CTL_ADD): 349 349 { 350 if ( (IOC_DIRMASK & iCmd) != IOC_ OUT350 if ( (IOC_DIRMASK & iCmd) != IOC_INOUT 351 351 || cbReq < sizeof(VBOXNETADPREQ)) 352 352 return EINVAL; 353 353 354 354 PVBOXNETADP pNew; 355 rc = vboxNetAdpCreate(&pNew, NULL); 355 Log(("VBoxNetAdpDarwinIOCtl: szName=%s\n", pReq->szName)); 356 rc = vboxNetAdpCreate(&pNew, 357 pReq->szName[0] && RTStrEnd(pReq->szName, RT_MIN(cbReq, sizeof(pReq->szName))) ? 358 pReq->szName : NULL); 356 359 if (RT_FAILURE(rc)) 357 360 return EINVAL;
Note:
See TracChangeset
for help on using the changeset viewer.