diff options
author | Andrei Pavel <andrei.pavel@qualitance.com> | 2017-08-17 19:54:15 +0200 |
---|---|---|
committer | Andrei Pavel <andrei.pavel@qualitance.com> | 2017-08-17 19:54:15 +0200 |
commit | a8f6403d1b44f62ebb3dd3085e401b46767003a0 (patch) | |
tree | 00df52bd413b27ed04097164021251f8e8ec6c80 /src/lib/dhcpsrv/cfg_rsoo.cc | |
parent | Removed duplicate include (diff) | |
parent | [master] Added ChangeLog 1288 for trac 5315. (diff) | |
download | kea-a8f6403d1b44f62ebb3dd3085e401b46767003a0.tar.xz kea-a8f6403d1b44f62ebb3dd3085e401b46767003a0.zip |
Merge branch 'isc-master' into config-h
Diffstat (limited to 'src/lib/dhcpsrv/cfg_rsoo.cc')
-rw-r--r-- | src/lib/dhcpsrv/cfg_rsoo.cc | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/lib/dhcpsrv/cfg_rsoo.cc b/src/lib/dhcpsrv/cfg_rsoo.cc index a08652c2c7..30f02e67c2 100644 --- a/src/lib/dhcpsrv/cfg_rsoo.cc +++ b/src/lib/dhcpsrv/cfg_rsoo.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2015 Internet Systems Consortium, Inc. ("ISC") +// Copyright (C) 2015,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 @@ -8,6 +8,9 @@ #include <dhcp/dhcp6.h> #include <dhcpsrv/cfg_rsoo.h> +#include <boost/lexical_cast.hpp> + +using namespace isc::data; namespace isc { namespace dhcp { @@ -35,6 +38,17 @@ CfgRSOO::enable(const uint16_t code) { } } +ElementPtr +CfgRSOO::toElement() const { + ElementPtr result = Element::createList(); + // We can use LibDHCP::getOptionDef(DHCP6_OPTION_SPACE, *opt) too... + for (std::set<uint16_t>::const_iterator opt = rsoo_options_.cbegin(); + opt != rsoo_options_.cend(); ++opt) { + const std::string& code = boost::lexical_cast<std::string>(*opt); + result->add(Element::create(code)); + } + return (result); +} } } |