• Thomas Markwalder's avatar
    [4259] Converted replace-client-name from boolean to enumeration · d80e28d3
    Thomas Markwalder authored
        The D2 client configuration parameter, replace-client-name, was
        changed from a boolean, to an enumerated list of modes:
    
            "NEVER" - do not alter or supply the client name
            "ALWAYS" - always replace the client name, or supply it if
             not sent by the client
            "WHEN_PRESENT" - replace the client name sent by the client,
             do not supply one otherwise
            "WHEN_NOT_PRESENT" - supply the client name only if one was
            not sent by the client
    
        src/lib/dhcpsrv/d2_client_cfg.cc
        src/lib/dhcpsrv/d2_client_cfg.h
            Added the D2ClientConfig::ReplaceClientNameMode enumeration.
    
        src/lib/dhcpsrv/parsers/dhcp_parsers.cc
            - Alter replace-client-name parsing to parse the mode labels.
            - Maps boolean literals true and false to RCM_WHEN_PRESENT and
            RCM_NEVER respectively
    
        src/bin/dhcp4/dhcp6_srv.cc
        src/bin/dhcp4/dhcp4_srv.cc
        src/lib/dhcpsrv/d2_client_mgr.h
            - Adapted to use the enumeration
    
        src/bin/dhcp4/tests/config_parser_unittest.cc
        src/bin/dhcp4/tests/fqdn_unittest.cc
        src/bin/dhcp6/tests/config_parser_unittest.cc
        src/bin/dhcp6/tests/fqdn_unittest.cc
        src/lib/dhcpsrv/tests/cfgmgr_unittest.cc
        src/lib/dhcpsrv/tests/d2_client_unittest.cc
        src/lib/dhcpsrv/tests/d2_udp_unittest.cc
        src/lib/dhcpsrv/tests/dhcp_parsers_unittest.cc
            - Alter existing tests to use the enumeration. Note false was replaced
            with RCM_NEVER and true with RCM_WHEN_PRESENT
    d80e28d3
config_parser_unittest.cc 154 KB