Changeset 79778 in vbox for trunk/src/VBox
- Timestamp:
- Jul 15, 2019 12:36:08 AM (5 years ago)
- Location:
- trunk/src/VBox
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManageDHCPServer.cpp
r79773 r79778 511 511 if (ptrConfig.isNull()) 512 512 return RTEXITCODE_FAILURE; 513 CHECK_ERROR2I_STMT(ptrConfig, SetOption((DhcpOpt_T)idAddOpt, DHCPOptionEncoding_ Legacy,513 CHECK_ERROR2I_STMT(ptrConfig, SetOption((DhcpOpt_T)idAddOpt, DHCPOptionEncoding_Normal, 514 514 Bstr(ValueUnion.psz).raw()), rcExit = RTEXITCODE_FAILURE); 515 515 } … … 780 780 if (ptrConfig.isNull()) 781 781 return RTEXITCODE_FAILURE; 782 CHECK_ERROR2I_STMT(ptrConfig, SetOption((DhcpOpt_T)u8OptId, DHCPOptionEncoding_ Legacy,782 CHECK_ERROR2I_STMT(ptrConfig, SetOption((DhcpOpt_T)u8OptId, DHCPOptionEncoding_Normal, 783 783 Bstr(ValueUnion.psz).raw()), rcExit = RTEXITCODE_FAILURE); 784 784 } -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageList.cpp
r79771 r79778 834 834 switch (Encodings[i]) 835 835 { 836 case DHCPOptionEncoding_ Legacy:836 case DHCPOptionEncoding_Normal: 837 837 RTPrintf(" %3d/legacy: %ls\n", Options[i], Values[i]); 838 838 break; -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r79771 r79778 1832 1832 name="DHCPOptionEncoding" 1833 1833 uuid="84b6d460-2838-4682-c0d6-ef5b573ef28a"> 1834 <const name=" Legacy" value="0"/>1834 <const name="Normal" value="0"/> 1835 1835 <const name="Hex" value="1"/> 1836 1836 </enum> -
trunk/src/VBox/Main/src-server/DHCPConfigImpl.cpp
r79771 r79778 338 338 HRESULT hrc = DHCPConfig::i_initWithDefaults(a_pVirtualBox, a_pParent); 339 339 if (SUCCEEDED(hrc)) 340 hrc = i_setOption(DhcpOpt_SubnetMask, DHCPOptionEncoding_ Legacy, "0.0.0.0");340 hrc = i_setOption(DhcpOpt_SubnetMask, DHCPOptionEncoding_Normal, "0.0.0.0"); 341 341 342 342 if (SUCCEEDED(hrc)) … … 389 389 if (it != m_OptionMap.end()) 390 390 { 391 if (it->second.enmEncoding == DHCPOptionEncoding_ Legacy)391 if (it->second.enmEncoding == DHCPOptionEncoding_Normal) 392 392 return a_rDst.assignEx(it->second.strValue); 393 393 return setError(VBOX_E_OBJECT_NOT_FOUND, tr("DHCP option DhcpOpt_SubnetMask is not in a legacy encoding")); … … 412 412 return setErrorBoth(E_INVALIDARG, vrc, tr("Invalid IPv4 netmask '%s': %Rrc"), a_rSrc.c_str(), vrc); 413 413 414 return i_setOption(DhcpOpt_SubnetMask, DHCPOptionEncoding_ Legacy, a_rSrc);414 return i_setOption(DhcpOpt_SubnetMask, DHCPOptionEncoding_Normal, a_rSrc); 415 415 } 416 416 … … 421 421 HRESULT DHCPGlobalConfig::i_setOption(DhcpOpt_T aOption, DHCPOptionEncoding_T aEncoding, const com::Utf8Str &aValue) 422 422 { 423 if (aOption != DhcpOpt_SubnetMask || aEncoding == DHCPOptionEncoding_ Legacy)423 if (aOption != DhcpOpt_SubnetMask || aEncoding == DHCPOptionEncoding_Normal) 424 424 return DHCPConfig::i_setOption(aOption, aEncoding, aValue); 425 return setError(E_FAIL, tr("DhcpOpt_SubnetMask must use DHCPOptionEncoding_ Legacyas it is reflected by IDHCPServer::networkMask"));425 return setError(E_FAIL, tr("DhcpOpt_SubnetMask must use DHCPOptionEncoding_Normal as it is reflected by IDHCPServer::networkMask")); 426 426 } 427 427 -
trunk/src/VBox/Main/src-server/DHCPServerImpl.cpp
r79775 r79778 591 591 switch (enmEncoding) 592 592 { 593 case DHCPOptionEncoding_ Legacy:593 case DHCPOptionEncoding_Normal: 594 594 { 595 595 /* … … 663 663 { 664 664 if (aOption != 0) 665 return aTargetConfig.i_setOption(aOption, DHCPOptionEncoding_ Legacy, aValue);665 return aTargetConfig.i_setOption(aOption, DHCPOptionEncoding_Normal, aValue); 666 666 667 667 /* … … 682 682 case ':': /* support legacy format too */ 683 683 { 684 enmEncoding = DHCPOptionEncoding_ Legacy;684 enmEncoding = DHCPOptionEncoding_Normal; 685 685 break; 686 686 } -
trunk/src/VBox/Main/xml/Settings.cpp
r79747 r79778 1616 1616 DhcpOptValue::DhcpOptValue() 1617 1617 : strValue() 1618 , enmEncoding(DHCPOptionEncoding_ Legacy)1618 , enmEncoding(DHCPOptionEncoding_Normal) 1619 1619 { 1620 1620 } … … 1810 1810 pElmOption->setAttribute("name", it->first); 1811 1811 pElmOption->setAttribute("value", it->second.strValue); 1812 if (it->second.enmEncoding != DHCPOptionEncoding_ Legacy)1812 if (it->second.enmEncoding != DHCPOptionEncoding_Normal) 1813 1813 pElmOption->setAttribute("encoding", (int32_t)it->second.enmEncoding); 1814 1814 } … … 1945 1945 int32_t iOptEnc; 1946 1946 if (!pElmOption->getAttributeValue("encoding", iOptEnc)) 1947 iOptEnc = DHCPOptionEncoding_ Legacy;1947 iOptEnc = DHCPOptionEncoding_Normal; 1948 1948 1949 1949 rConfig.mapOptions[OptName] = DhcpOptValue(strValue, (DHCPOptionEncoding_T)iOptEnc); -
trunk/src/VBox/NetworkServices/Dhcpd/Config.cpp
r79761 r79778 709 709 710 710 /* The opional 'encoding' attribute: */ 711 uint32_t u32Enc = 0; /* XXX: D hcpOptEncoding_Legacy*/711 uint32_t u32Enc = 0; /* XXX: DHCPOptionEncoding_Normal */ 712 712 const char *pszEncoding; 713 713 if (pElmOption->getAttributeValue("encoding", &pszEncoding)) … … 719 719 switch (u32Enc) 720 720 { 721 case 0: /* XXX: D hcpOptEncoding_Legacy*/722 case 1: /* XXX: D hcpOptEncoding_Hex */721 case 0: /* XXX: DHCPOptionEncoding_Normal */ 722 case 1: /* XXX: DHCPOptionEncoding_Hex */ 723 723 break; 724 724 default: -
trunk/src/VBox/NetworkServices/Dhcpd/DhcpOptions.cpp
r79777 r79778 293 293 switch (aEnc) 294 294 { 295 case 0: /* D hcpOptEncoding_Legacy*/295 case 0: /* DHCPOptionEncoding_Normal */ 296 296 switch (aOptCode) 297 297 {
Note:
See TracChangeset
for help on using the changeset viewer.