VirtualBox

Changeset 79846 in vbox for trunk/src/VBox/Main/src-server


Ignore:
Timestamp:
Jul 17, 2019 9:19:20 PM (5 years ago)
Author:
vboxsync
Message:

Main/DHCPServer,VBoxManage,Dhcpd: Created a new DHCPOption enum that replaced the incorrectly cased DhcpOpt enum in new APIs. Adjusted and documented each and every option and its format as best as I could. Also added two new attributes to IDHCPConfig, one for supressing options (from higher up the configuration scope) and one for forcing unsolicited options on a client. These attributes have not yet been pushed down to Dhcpd. [build fix] bugref:9288

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-server/DHCPConfigImpl.cpp

    r79845 r79846  
    602602        if (it->second.enmEncoding == DHCPOptionEncoding_Normal)
    603603            return a_rDst.assignEx(it->second.strValue);
    604         return setError(VBOX_E_OBJECT_NOT_FOUND, tr("DHCP option DhcpOpt_SubnetMask is not in a legacy encoding"));
    605     }
    606     return setError(VBOX_E_OBJECT_NOT_FOUND, tr("DHCP option DhcpOpt_SubnetMask was not found"));
     604        return setError(VBOX_E_OBJECT_NOT_FOUND, tr("DHCP option DHCPOption_SubnetMask is not in a legacy encoding"));
     605    }
     606    return setError(VBOX_E_OBJECT_NOT_FOUND, tr("DHCP option DHCPOption_SubnetMask was not found"));
    607607}
    608608
     
    628628
    629629/**
    630  * Overriden to ensure the sanity of the DhcpOpt_SubnetMask option.
     630 * Overriden to ensure the sanity of the DHCPOption_SubnetMask option.
    631631 */
    632632HRESULT DHCPGlobalConfig::i_setOption(DHCPOption_T aOption, DHCPOptionEncoding_T aEncoding, const com::Utf8Str &aValue)
    633633{
    634     if (aOption != DhcpOpt_SubnetMask || aEncoding == DHCPOptionEncoding_Normal)
     634    if (aOption != DHCPOption_SubnetMask || aEncoding == DHCPOptionEncoding_Normal)
    635635        return DHCPConfig::i_setOption(aOption, aEncoding, aValue);
    636     return setError(E_FAIL, tr("DhcpOpt_SubnetMask must use DHCPOptionEncoding_Normal as it is reflected by IDHCPServer::networkMask"));
     636    return setError(E_FAIL, tr("DHCPOption_SubnetMask must use DHCPOptionEncoding_Normal as it is reflected by IDHCPServer::networkMask"));
    637637}
    638638
    639639
    640640/**
    641  * Overriden to ensure the sanity of the DhcpOpt_SubnetMask option.
     641 * Overriden to ensure the sanity of the DHCPOption_SubnetMask option.
    642642 */
    643643HRESULT DHCPGlobalConfig::i_removeOption(DHCPOption_T aOption)
    644644{
    645     if (aOption != DhcpOpt_SubnetMask)
     645    if (aOption != DHCPOption_SubnetMask)
    646646        return DHCPConfig::i_removeOption(aOption);
    647     return setError(E_FAIL, tr("DhcpOpt_SubnetMask cannot be removed as it reflects IDHCPServer::networkMask"));
     647    return setError(E_FAIL, tr("DHCPOption_SubnetMask cannot be removed as it reflects IDHCPServer::networkMask"));
    648648}
    649649
    650650
    651651/**
    652  * Overriden to preserve the DhcpOpt_SubnetMask option.
     652 * Overriden to preserve the DHCPOption_SubnetMask option.
    653653 */
    654654HRESULT DHCPGlobalConfig::i_removeAllOptions()
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette