VirtualBox

Changeset 54584 in vbox for trunk/src/VBox/NetworkServices


Ignore:
Timestamp:
Mar 2, 2015 4:45:57 PM (10 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
98723
Message:

DHCPServer: Define DHCP option encodings as an enum. The enum is not
currently used in the API itself as we only smugle hex-encoded options
through existing API to remain backward compatible, but it provides
authoritative C definitions that we can now use on both sides of the API.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/NetworkServices/DHCP/Config.cpp

    r54544 r54584  
    10521052
    10531053
    1054 /*
    1055  * XXX: Since encoding info is "smuggled" through the API and is not
    1056  * exposed properly we don't have a common definition we can use here.
    1057  *
    1058  * TODO: We can define the encodings enum in the IDL without breaking
    1059  * backward compatibility.  This will provide the authoritative
    1060  * definition.
    1061  */
    10621054static int fillDhcpOption(RawOption &opt, const std::string &OptText, int OptEncoding)
    10631055{
    10641056    int rc;
    10651057 
    1066     if (OptEncoding == /* HEX */ 1)
     1058    if (OptEncoding == DhcpOptEncoding_Hex)
    10671059    {
    10681060        if (OptText.empty())
     
    10911083        opt.cbRawOpt = (uint8_t)cbRawOpt;
    10921084    }
    1093     else if (OptEncoding == /* LEGACY */ 0)
     1085    else if (OptEncoding == DhcpOptEncoding_Legacy)
    10941086    {
    10951087        /*
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