|
@@ -41,7 +41,6 @@ OptionOpaqueDataTuples::pack(isc::util::OutputBuffer& buf) {
|
|
it != tuples_.end(); ++it) {
|
|
it != tuples_.end(); ++it) {
|
|
it->pack(buf);
|
|
it->pack(buf);
|
|
}
|
|
}
|
|
-
|
|
|
|
}
|
|
}
|
|
|
|
|
|
void
|
|
void
|
|
@@ -69,7 +68,7 @@ OptionOpaqueDataTuples::addTuple(const OpaqueDataTuple& tuple) {
|
|
if (tuple.getLengthFieldType() != getLengthFieldType()) {
|
|
if (tuple.getLengthFieldType() != getLengthFieldType()) {
|
|
isc_throw(isc::BadValue, "attempted to add opaque data tuple having"
|
|
isc_throw(isc::BadValue, "attempted to add opaque data tuple having"
|
|
" invalid size of the length field "
|
|
" invalid size of the length field "
|
|
- << tuple.getDataFieldSize() << " to Vendor Class option");
|
|
|
|
|
|
+ << tuple.getDataFieldSize() << " to opaque data tuple option");
|
|
}
|
|
}
|
|
|
|
|
|
tuples_.push_back(tuple);
|
|
tuples_.push_back(tuple);
|
|
@@ -80,13 +79,13 @@ void
|
|
OptionOpaqueDataTuples::setTuple(const size_t at, const OpaqueDataTuple& tuple) {
|
|
OptionOpaqueDataTuples::setTuple(const size_t at, const OpaqueDataTuple& tuple) {
|
|
if (at >= getTuplesNum()) {
|
|
if (at >= getTuplesNum()) {
|
|
isc_throw(isc::OutOfRange, "attempted to set an opaque data for the"
|
|
isc_throw(isc::OutOfRange, "attempted to set an opaque data for the"
|
|
- " vendor option at position " << at << " which is out of"
|
|
|
|
- " range");
|
|
|
|
|
|
+ " opaque data tuple option at position " << at << " which"
|
|
|
|
+ " is out of range");
|
|
|
|
|
|
} else if (tuple.getLengthFieldType() != getLengthFieldType()) {
|
|
} else if (tuple.getLengthFieldType() != getLengthFieldType()) {
|
|
isc_throw(isc::BadValue, "attempted to set opaque data tuple having"
|
|
isc_throw(isc::BadValue, "attempted to set opaque data tuple having"
|
|
" invalid size of the length field "
|
|
" invalid size of the length field "
|
|
- << tuple.getDataFieldSize() << " to Vendor Class option");
|
|
|
|
|
|
+ << tuple.getDataFieldSize() << " to opaque data tuple option");
|
|
}
|
|
}
|
|
|
|
|
|
tuples_[at] = tuple;
|
|
tuples_[at] = tuple;
|
|
@@ -96,8 +95,8 @@ OpaqueDataTuple
|
|
OptionOpaqueDataTuples::getTuple(const size_t at) const {
|
|
OptionOpaqueDataTuples::getTuple(const size_t at) const {
|
|
if (at >= getTuplesNum()) {
|
|
if (at >= getTuplesNum()) {
|
|
isc_throw(isc::OutOfRange, "attempted to get an opaque data for the"
|
|
isc_throw(isc::OutOfRange, "attempted to get an opaque data for the"
|
|
- " vendor option at position " << at << " which is out of"
|
|
|
|
- " range. There are only " << getTuplesNum() << " tuples");
|
|
|
|
|
|
+ " opaque data tuple option at position " << at << " which is"
|
|
|
|
+ " out of range. There are only " << getTuplesNum() << " tuples");
|
|
}
|
|
}
|
|
return (tuples_[at]);
|
|
return (tuples_[at]);
|
|
}
|
|
}
|
|
@@ -115,7 +114,6 @@ OptionOpaqueDataTuples::hasTuple(const std::string& tuple_str) const {
|
|
return (false);
|
|
return (false);
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
uint16_t
|
|
uint16_t
|
|
OptionOpaqueDataTuples::len() {
|
|
OptionOpaqueDataTuples::len() {
|
|
// The option starts with the header.
|
|
// The option starts with the header.
|
|
@@ -136,8 +134,6 @@ OptionOpaqueDataTuples::toText(int indent) {
|
|
// Apply indentation
|
|
// Apply indentation
|
|
s << std::string(indent, ' ');
|
|
s << std::string(indent, ' ');
|
|
|
|
|
|
-
|
|
|
|
-
|
|
|
|
// Print type and length
|
|
// Print type and length
|
|
s << "type=" << getType() << ", len=" << len() - getHeaderLen() << std::dec;
|
|
s << "type=" << getType() << ", len=" << len() - getHeaderLen() << std::dec;
|
|
// Iterate over all tuples and print their size and contents.
|
|
// Iterate over all tuples and print their size and contents.
|