儲存庫 vbox 的更動 18385
- 時間撮記:
- 2009-3-27 下午12:34:27 (16 年 以前)
- 檔案:
-
- 修改 1 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/Main/HostNetworkInterfaceImpl.cpp
r18014 r18385 541 541 HRESULT HostNetworkInterface::setVirtualBox(VirtualBox *pVBox) 542 542 { 543 HRESULT hrc; 543 544 AutoCaller autoCaller (this); 544 545 CheckComRCReturnRC (autoCaller.rc()); 545 546 mVBox = pVBox; 546 547 548 /* If IPv4 address hasn't been initialized */ 549 if (m.IPAddress == 0) 550 { 551 Bstr tmpAddr, tmpMask; 552 hrc = mVBox->GetExtraData(Bstr(Utf8StrFmt("HostOnly/%ls/IPAddress", mInterfaceName.raw())), tmpAddr.asOutParam()); 553 hrc = mVBox->GetExtraData(Bstr(Utf8StrFmt("HostOnly/%ls/IPNetMask", mInterfaceName.raw())), tmpMask.asOutParam()); 554 if (tmpAddr.isEmpty()) 555 tmpAddr = Bstr(VBOXNET_IPV4ADDR_DEFAULT); 556 if (tmpMask.isEmpty()) 557 tmpMask = Bstr(VBOXNET_IPV4MASK_DEFAULT); 558 m.IPAddress = inet_addr(Utf8Str(tmpAddr).raw()); 559 m.networkMask = inet_addr(Utf8Str(tmpMask).raw()); 560 } 561 562 if (m.IPV6Address.isEmpty()) 563 { 564 Bstr tmpPrefixLen; 565 hrc = mVBox->GetExtraData(Bstr(Utf8StrFmt("HostOnly/%ls/IPV6Address", mInterfaceName.raw())), m.IPV6Address.asOutParam()); 566 if (!m.IPV6Address.isEmpty()) 567 { 568 hrc = mVBox->GetExtraData(Bstr(Utf8StrFmt("HostOnly/%ls/IPV6PrefixLen", mInterfaceName.raw())), tmpPrefixLen.asOutParam()); 569 if (SUCCEEDED(hrc) && !tmpPrefixLen.isEmpty()) 570 m.IPV6NetworkMaskPrefixLength = atol(Utf8Str(tmpPrefixLen).raw()); 571 else 572 m.IPV6NetworkMaskPrefixLength = 64; 573 } 574 } 575 547 576 return S_OK; 548 577 }
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器