/// @brief Minimum length of the option (when status message is empty).
const size_t OPTION6_STATUS_CODE_MIN_LEN = sizeof(uint16_t);
-const size_t OPTION4_SLP_SERVICE_SCOPEMIN_LEN = sizeof(bool);
+const size_t OPTION4_SLP_SERVICE_SCOPEMIN_LEN = sizeof(uint8_t);
}; // end of anonymous namespace
: Option(Option::V6, D6O_STATUS_CODE),
status_code_(STATUS_Success), status_message_() {
- // Parse data
+ // Parse data
unpack(begin, end);
}
: Option(Option::V4, DHO_SERVICE_SCOPE),
mandatory_flag_(false), scope_list_() {
- // Parse data
+ // Parse data
unpack(begin, end);
}
isc_throw(BadDataTypeCast, "unable to read the buffer as boolean"
<< " value. Invalid value " << static_cast<int>(*begin));
}
- begin += sizeof(bool);
+ begin += sizeof(uint8_t);
scope_list_.assign(begin, end);
}
/// @brief Parses received buffer.
///
+ /// @throw OutOfRange if specified option is truncated
+ ///
/// @param begin Iterator to first byte of option data
/// @param end Iterator to end of option data (first byte after option end)
virtual void unpack(OptionBufferConstIter begin, OptionBufferConstIter end);
/// @brief Parses received buffer.
///
+ /// @throw OutOfRange if specified option is truncated
+ /// @throw BadDataTypeCast if first byte is not 0 or 1
+ ///
/// @param begin Iterator to first byte of option data
/// @param end Iterator to end of option data (first byte after option end)
virtual void unpack(OptionBufferConstIter begin, OptionBufferConstIter end);