diff options
Diffstat (limited to 'src/lib/dhcpsrv/cfg_host_operations.cc')
-rw-r--r-- | src/lib/dhcpsrv/cfg_host_operations.cc | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/lib/dhcpsrv/cfg_host_operations.cc b/src/lib/dhcpsrv/cfg_host_operations.cc index aec147ff81..f588b9dc61 100644 --- a/src/lib/dhcpsrv/cfg_host_operations.cc +++ b/src/lib/dhcpsrv/cfg_host_operations.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2016 Internet Systems Consortium, Inc. ("ISC") +// Copyright (C) 2016-2017 Internet Systems Consortium, Inc. ("ISC") // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this @@ -9,6 +9,9 @@ #include <exceptions/exceptions.h> #include <dhcpsrv/cfg_host_operations.h> #include <algorithm> +#include <string> + +using namespace isc::data; namespace isc { namespace dhcp { @@ -25,6 +28,7 @@ CfgHostOperations::createConfig4() { cfg->addIdentifierType("hw-address"); cfg->addIdentifierType("duid"); cfg->addIdentifierType("circuit-id"); + cfg->addIdentifierType("client-id"); return (cfg); } @@ -54,5 +58,16 @@ CfgHostOperations::clearIdentifierTypes() { identifier_types_.clear(); } +ElementPtr +CfgHostOperations::toElement() const { + ElementPtr result = Element::createList(); + for (IdentifierTypes::const_iterator id = identifier_types_.begin(); + id != identifier_types_.end(); ++id) { + const std::string& name = Host::getIdentifierName(*id); + result->add(Element::create(name)); + } + return (result); +} + } } |