template<typename SearchKey>
OptionDefinitionPtr findOptionDefinition(const std::string& option_space,
const SearchKey& search_key) const;
+
/// @brief Create option instance.
///
/// Creates an instance of an option and adds it to the provided
/// @brief Wipes the contents of the context to allowing another parsing
/// during a given test if needed.
- /// @param family protocol family to use durin the test, defaults to AF_INET6
+ /// @param family protocol family to use during the test, defaults
+ /// to AF_INET6
void reset_context(uint16_t family = AF_INET6){
// Note set context universe to V6 as it has to be something.
CfgMgr::instance().clear();
"0C 00 03 01 C0 00 03 02", // spaces
"0C:00:03:01:C0:00:03:02", // colons
"0x0C000301C0000302", // 0x
- "C 0 3 1 C0 0 3 02", // odd or or even octets
+ "C 0 3 1 C0 0 3 02", // one or two digit octets
"0x0c000301C0000302" // upper or lower case digits
};
std::vector<uint8_t>
quotedStringToBinary(const std::string& quoted_string);
-/// \brief Converts a string of separated hexadecimal digits.
+/// \brief Converts a string of separated hexadecimal digits
/// into a vector.
///
-/// Octets may contain 1 or 2 digits:
+/// Octets may contain 1 or 2 digits. For example, using a colon
+/// for a separator all of the following are valid:
///
-/// - yy<s>yy<s>yy<s>yy<s>yy
-/// - y<s>y<s>y<s>y<s>y
-/// - y<s>yy<s>yy<s>y<s>y
+/// - yy:yy:yy:yy:yy
+/// - y:y:y:y:y
+/// - y:yy:yy:y:y
///
/// If the decoded string doesn't match any of the supported formats,
/// an exception is thrown.
///
/// \param hex_string Input string.
+/// \param sep character to use a a separator.
/// \param binary Vector receiving converted string into binary.
/// \throw isc::BadValue if the format of the input string is invalid.
void