-// Copyright (C) 2012-2016 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2012-2019 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
DUID::DUID(const std::vector<uint8_t>& duid) {
if (duid.size() > MAX_DUID_LEN) {
- isc_throw(isc::BadValue, "DUID is " << duid.size()
- << ", exceeds max of " << MAX_DUID_LEN);
+ isc_throw(isc::BadValue, "DUID size is " << duid.size()
+ << " bytes, exceeds maximum of " << MAX_DUID_LEN);
}
if (duid.empty()) {
isc_throw(isc::BadValue, "Empty DUIDs are not allowed");
DUID::DUID(const uint8_t* data, size_t len) {
if (len > MAX_DUID_LEN) {
- isc_throw(isc::BadValue, "DUID is " << len
- << ", exceeds max of " << MAX_DUID_LEN);
+ isc_throw(isc::BadValue, "DUID size is " << len
+ << " bytes, exceeds maximum of " << MAX_DUID_LEN);
}
if (len == 0) {
isc_throw(isc::BadValue, "Empty DUIDs/Client-ids not allowed");
const std::vector<uint8_t>& DUID::getDuid() const {
return (duid_);
}
-
DUID::DUIDType DUID::getType() const {
if (duid_.size() < 2) {
return (DUID_UNKNOWN);