From: Thomas Markwalder Date: Tue, 16 Apr 2019 11:19:36 +0000 (-0400) Subject: [484] Addressed review comments. X-Git-Tag: Kea-1.6.0-beta~253 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=27335f87643bcfeceb4a021ec6f05681dbc27057;p=thirdparty%2Fkea.git [484] Addressed review comments. --- diff --git a/src/lib/dhcpsrv/parsers/option_data_parser.h b/src/lib/dhcpsrv/parsers/option_data_parser.h index d9897751af..7c6e53da4c 100644 --- a/src/lib/dhcpsrv/parsers/option_data_parser.h +++ b/src/lib/dhcpsrv/parsers/option_data_parser.h @@ -84,6 +84,7 @@ private: template 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 diff --git a/src/lib/dhcpsrv/tests/dhcp_parsers_unittest.cc b/src/lib/dhcpsrv/tests/dhcp_parsers_unittest.cc index 8f0d47c751..1909d4157f 100644 --- a/src/lib/dhcpsrv/tests/dhcp_parsers_unittest.cc +++ b/src/lib/dhcpsrv/tests/dhcp_parsers_unittest.cc @@ -452,7 +452,8 @@ public: /// @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(); @@ -1455,7 +1456,7 @@ TEST_F(ParseConfigTest, hexOptionData) { "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 }; diff --git a/src/lib/util/strutil.h b/src/lib/util/strutil.h index ead5fd21ba..0b5136575c 100644 --- a/src/lib/util/strutil.h +++ b/src/lib/util/strutil.h @@ -219,19 +219,21 @@ tokenToNum(const std::string& num_token) { std::vector 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: /// -/// - yyyyyyyyyy -/// - yyyyy -/// - yyyyyyy +/// - 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