]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[484] Addressed review comments.
authorThomas Markwalder <tmark@isc.org>
Tue, 16 Apr 2019 11:19:36 +0000 (07:19 -0400)
committerThomas Markwalder <tmark@isc.org>
Thu, 18 Apr 2019 12:00:43 +0000 (08:00 -0400)
src/lib/dhcpsrv/parsers/option_data_parser.h
src/lib/dhcpsrv/tests/dhcp_parsers_unittest.cc
src/lib/util/strutil.h

index d9897751af2a6513ce7d0b856423a526fac5e1da..7c6e53da4cba0598a32802e21bb5977ef975ed9a 100644 (file)
@@ -84,6 +84,7 @@ private:
     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
index 8f0d47c7516d1e796e845364fe907eb3cc02acc4..1909d4157fa81c84ff81da94f422f020f06a6460 100644 (file)
@@ -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 
     };
 
index ead5fd21bafc2f91572dc4f545cc4e228a89dc0a..0b5136575cc562c5f75284d5014c6aac8bf94db4 100644 (file)
@@ -219,19 +219,21 @@ tokenToNum(const std::string& num_token) {
 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