Changeset 48367 in vbox for trunk/src/VBox/NetworkServices
- Timestamp:
- Sep 6, 2013 3:57:46 PM (11 years ago)
- Location:
- trunk/src/VBox/NetworkServices/DHCP
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/NetworkServices/DHCP/Config.cpp
r47929 r48367 627 627 628 628 case RTNET_DHCP_OPT_ROUTERS: 629 case RTNET_DHCP_OPT_DNS: 629 630 { 630 631 const Ipv4AddressContainer lst = 631 g_ConfigurationManager->getAddressList( 632 RTNET_DHCP_OPT_ROUTERS); 632 g_ConfigurationManager->getAddressList(pReqList[idxParam]); 633 633 PRTNETADDRIPV4 pAddresses = (PRTNETADDRIPV4)&opt.au8RawOpt[0]; 634 634 … … 648 648 case RTNET_DHCP_OPT_DOMAIN_NAME: 649 649 break; 650 case RTNET_DHCP_OPT_DNS:651 break;652 650 default: 653 651 Log(("opt: %d is ignored\n", pReqList[idxParam])); -
trunk/src/VBox/NetworkServices/DHCP/VBoxNetDHCP.cpp
r47501 r48367 383 383 384 384 confManager->addToAddressList(RTNET_DHCP_OPT_ROUTERS, gateway); 385 386 ComPtr<IHost> host; 387 if (SUCCEEDED(virtualbox->COMGETTER(Host)(host.asOutParam()))) 388 { 389 int i; 390 com::SafeArray<BSTR> strs; 391 if (SUCCEEDED(host->COMGETTER(NameServers)(ComSafeArrayAsOutParam(strs)))) 392 { 393 RTNETADDRIPV4 addr; 394 confManager->flushAddressList(RTNET_DHCP_OPT_DNS); 395 int rc; 396 for (i = 0; i < strs.size(); ++i) 397 { 398 rc = RTNetStrToIPv4Addr(com::Utf8Str(strs[i]).c_str(), &addr); 399 if (RT_SUCCESS(rc)) 400 confManager->addToAddressList(RTNET_DHCP_OPT_DNS, addr); 401 } 402 } 403 404 strs.setNull(); 405 #if 0 406 if (SUCCEEDED(host->COMGETTER(SearchStrings)(ComSafeArrayAsOutParam(strs)))) 407 { 408 /* XXX: todo. */; 409 } 410 strs.setNull(); 411 412 Bstr domain; 413 if (SUCCEEDED(host->COMGETTER(DomainName)(domain.asOutPutParam()))) 414 { 415 /* XXX: todo. */ 416 } 417 #endif 418 } 385 419 } 386 420
Note:
See TracChangeset
for help on using the changeset viewer.