// Copyright (C) 2011-2023 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 // file, You can obtain one at http://mozilla.org/MPL/2.0/. #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; using namespace isc::util; namespace isc { namespace dhcp { OptionPtr Option::factory(Option::Universe u, uint16_t type, const OptionBuffer& buf) { return (LibDHCP::optionFactory(u, type, buf)); } Option::Option(Universe u, uint16_t type) : universe_(u), type_(type) { check(); } Option::Option(Universe u, uint16_t type, const OptionBuffer& data) : universe_(u), type_(type), data_(data) { check(); } Option::Option(Universe u, uint16_t type, OptionBufferConstIter first, OptionBufferConstIter last) : universe_(u), type_(type), data_(first, last) { check(); } Option::Option(const Option& option) : universe_(option.universe_), type_(option.type_), data_(option.data_), options_(), encapsulated_space_(option.encapsulated_space_) { option.getOptionsCopy(options_); } OptionPtr Option::create(Universe u, uint16_t type) { return (boost::make_shared