]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2526] Renamed Option6IntArray to OptionIntArray.
authorMarcin Siodelski <marcin@isc.org>
Tue, 11 Dec 2012 12:12:33 +0000 (13:12 +0100)
committerMarcin Siodelski <marcin@isc.org>
Tue, 11 Dec 2012 12:12:33 +0000 (13:12 +0100)
... as this class is going to be used either for V6 or V4 now.

13 files changed:
src/bin/dhcp6/dhcp6_srv.cc
src/bin/dhcp6/tests/dhcp6_srv_unittest.cc
src/lib/dhcp/Makefile.am
src/lib/dhcp/libdhcp++.cc
src/lib/dhcp/option_data_types.h
src/lib/dhcp/option_definition.cc
src/lib/dhcp/option_definition.h
src/lib/dhcp/option_int_array.h [moved from src/lib/dhcp/option6_int_array.h with 95% similarity]
src/lib/dhcp/std_option_defs.h
src/lib/dhcp/tests/Makefile.am
src/lib/dhcp/tests/libdhcp++_unittest.cc
src/lib/dhcp/tests/option_definition_unittest.cc
src/lib/dhcp/tests/option_int_array_unittest.cc [moved from src/lib/dhcp/tests/option6_int_array_unittest.cc with 84% similarity]

index 33bab99c9bc7aac1666cfe7a57337e593771397e..6f34cd8b36f2fb02777e51c6345a2e61711908df 100644 (file)
@@ -23,8 +23,8 @@
 #include <dhcp/option6_ia.h>
 #include <dhcp/option6_iaaddr.h>
 #include <dhcp/option6_iaaddr.h>
-#include <dhcp/option6_int_array.h>
 #include <dhcp/option_custom.h>
+#include <dhcp/option_int_array.h>
 #include <dhcp/pkt6.h>
 #include <dhcp6/dhcp6_log.h>
 #include <dhcp6/dhcp6_srv.h>
@@ -327,8 +327,8 @@ void Dhcpv6Srv::appendRequestedOptions(const Pkt6Ptr& question, Pkt6Ptr& answer)
 
     // Client requests some options using ORO option. Try to
     // get this option from client's message.
-    boost::shared_ptr<Option6IntArray<uint16_t> > option_oro =
-        boost::dynamic_pointer_cast<Option6IntArray<uint16_t> >(question->getOption(D6O_ORO));
+    boost::shared_ptr<OptionIntArray<uint16_t> > option_oro =
+        boost::dynamic_pointer_cast<OptionIntArray<uint16_t> >(question->getOption(D6O_ORO));
     // Option ORO not found. Don't do anything then.
     if (!option_oro) {
         return;
index 6a598ebd48ef204bcc3b71b185d37e564629c911..b906ffb5941bb122f2ab7a2c9769e0cb7a6de39c 100644 (file)
@@ -22,7 +22,7 @@
 #include <dhcp/option6_addrlst.h>
 #include <dhcp/option6_ia.h>
 #include <dhcp/option6_iaaddr.h>
-#include <dhcp/option6_int_array.h>
+#include <dhcp/option_int_array.h>
 #include <dhcp6/config_parser.h>
 #include <dhcp6/dhcp6_srv.h>
 #include <dhcpsrv/cfgmgr.h>
@@ -351,8 +351,8 @@ TEST_F(Dhcpv6SrvTest, advertiseOptions) {
 
     // Let's now request option with code 1000.
     // We expect that server will include this option in its reply.
-    boost::shared_ptr<Option6IntArray<uint16_t> >
-        option_oro(new Option6IntArray<uint16_t>(D6O_ORO));
+    boost::shared_ptr<OptionIntArray<uint16_t> >
+        option_oro(new OptionIntArray<uint16_t>(D6O_ORO));
     // Create vector with two option codes.
     std::vector<uint16_t> codes(2);
     codes[0] = 1000;
index 567b60198cce20208dd8c614b3cf2f5a16f493a5..571f11d3988402efdc3c1e7ae5a7b82811eeb3a1 100644 (file)
@@ -29,7 +29,7 @@ libb10_dhcp___la_SOURCES += option6_iaaddr.cc option6_iaaddr.h
 libb10_dhcp___la_SOURCES += option6_addrlst.cc option6_addrlst.h
 libb10_dhcp___la_SOURCES += option4_addrlst.cc option4_addrlst.h
 libb10_dhcp___la_SOURCES += option_int.h
-libb10_dhcp___la_SOURCES += option6_int_array.h
+libb10_dhcp___la_SOURCES += option_int_array.h
 libb10_dhcp___la_SOURCES += dhcp6.h dhcp4.h
 libb10_dhcp___la_SOURCES += pkt6.cc pkt6.h
 libb10_dhcp___la_SOURCES += pkt4.cc pkt4.h
index 4260e800837b586e9b72bd334bf433a972448133..1faa5e9906fafa0782a3dcfcb77ed003a9218ab2 100644 (file)
@@ -20,8 +20,8 @@
 #include <dhcp/option.h>
 #include <dhcp/option6_ia.h>
 #include <dhcp/option6_iaaddr.h>
-#include <dhcp/option6_int_array.h>
 #include <dhcp/option_definition.h>
+#include <dhcp/option_int_array.h>
 #include <dhcp/std_option_defs.h>
 #include <exceptions/exceptions.h>
 #include <util/buffer.h>
index ff5789d16e1f620362e34626b8a5ac6c7c3e25af..e53fa6e2dbe78d29e3f02acdf2bf942025be3b8e 100644 (file)
@@ -70,7 +70,7 @@ enum OptionDataType {
 /// @brief Trait class for data types supported in DHCP option definitions.
 ///
 /// This is useful to check whether the type specified as template parameter
-/// is supported by classes like Option6Int, Option6IntArray and some template
+/// is supported by classes like OptionInt, OptionIntArray and some template
 /// factory functions in OptionDefinition class.
 template<typename T>
 struct OptionDataTypeTraits {
index c4c9b8fcac7011ba8302b941930040fbd8203f55..a753a1af3c1e6008c54fd8494c33ab4d72c61569 100644 (file)
 #include <dhcp/option6_addrlst.h>
 #include <dhcp/option6_ia.h>
 #include <dhcp/option6_iaaddr.h>
-#include <dhcp/option6_int_array.h>
-#include <dhcp/option_int.h>
 #include <dhcp/option_custom.h>
 #include <dhcp/option_definition.h>
+#include <dhcp/option_int.h>
+#include <dhcp/option_int_array.h>
 #include <util/encode/hex.h>
 
 using namespace std;
index 698c2fda7dba2f6fcdf81851c371ae1ebaea8551..a3985e87c26c75cf27b61c110dc1f34aaafb68b0 100644 (file)
@@ -51,22 +51,22 @@ typedef boost::shared_ptr<OptionDefinition> OptionDefinitionPtr;
 /// @brief Forward declaration to OptionInt.
 ///
 /// This forward declaration is needed to access OptionInt class
-/// without having to include option6_int.h header. This is because
+/// without having to include option_int.h header. This is because
 /// this header includes libdhcp++.h and this causes circular
 /// inclusion between libdhcp++.h, option_definition.h and
 /// option6_int.h.
 template<typename T>
 class OptionInt;
 
-/// @brief Forward declaration to Option6IntArray.
+/// @brief Forward declaration to OptionIntArray.
 ///
-/// This forward declaration is needed to access Option6IntArray class
-/// without having to include option6_int_array.h header. This is because
+/// This forward declaration is needed to access OptionIntArray class
+/// without having to include option_int_array.h header. This is because
 /// this header includes libdhcp++.h and this causes circular
 /// inclusion between libdhcp++.h, option_definition.h and
-/// option6_int_array.h.
+/// option_int_array.h.
 template<typename T>
-class Option6IntArray;
+class OptionIntArray;
 
 /// @brief Base class representing a DHCP option definition.
 ///
@@ -371,7 +371,7 @@ public:
     static OptionPtr factoryIntegerArray(uint16_t type,
                                          OptionBufferConstIter begin,
                                          OptionBufferConstIter end) {
-        OptionPtr option(new Option6IntArray<T>(type, begin, end));
+        OptionPtr option(new OptionIntArray<T>(type, begin, end));
         return (option);
     }
 
similarity index 95%
rename from src/lib/dhcp/option6_int_array.h
rename to src/lib/dhcp/option_int_array.h
index 3b642137fa3a47fb7b0eb324ceccee639e7db166..4c5781822591eadde0a1db3f8c1e79ca90cbe16e 100644 (file)
@@ -12,8 +12,8 @@
 // OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 // PERFORMANCE OF THIS SOFTWARE.
 
-#ifndef OPTION6_INT_ARRAY_H
-#define OPTION6_INT_ARRAY_H
+#ifndef OPTION_INT_ARRAY_H
+#define OPTION_INT_ARRAY_H
 
 #include <dhcp/libdhcp++.h>
 #include <dhcp/option.h>
@@ -25,9 +25,9 @@
 namespace isc {
 namespace dhcp {
 
-/// This template class represents DHCPv6 option with array of
-/// integer values. The type of the elements in the array can be
-/// any of the following:
+/// This template class represents DHCP (v4 or v6) option with an
+/// array of integer values. The type of the elements in the array
+/// can be any of the following:
 /// - uint8_t,
 /// - uint16_t,
 /// - uint32_t,
@@ -43,7 +43,7 @@ namespace dhcp {
 ///
 /// @param T data field type (see above).
 template<typename T>
-class Option6IntArray: public Option {
+class OptionIntArray: public Option {
 
 public:
 
@@ -55,7 +55,7 @@ public:
     ///
     /// @throw isc::dhcp::InvalidDataType if data field type provided
     /// as template parameter is not a supported integer type.
-    Option6IntArray(uint16_t type)
+    OptionIntArray(uint16_t type)
         : Option(Option::V6, type),
           values_(0) {
         if (!OptionDataTypeTraits<T>::integer_type) {
@@ -72,7 +72,7 @@ public:
     /// is not multiple of size of the data type in bytes.
     /// @throw isc::dhcp::InvalidDataType if data field type provided
     /// as template parameter is not a supported integer type.
-    Option6IntArray(uint16_t type, const OptionBuffer& buf)
+    OptionIntArray(uint16_t type, const OptionBuffer& buf)
         : Option(Option::V6, type) {
         if (!OptionDataTypeTraits<T>::integer_type) {
             isc_throw(dhcp::InvalidDataType, "non-integer type");
@@ -94,7 +94,7 @@ public:
     /// is not multiple of size of the data type in bytes.
     /// @throw isc::dhcp::InvalidDataType if data field type provided
     /// as template parameter is not a supported integer type.
-    Option6IntArray(uint16_t type, OptionBufferConstIter begin,
+    OptionIntArray(uint16_t type, OptionBufferConstIter begin,
                     OptionBufferConstIter end)
         : Option(Option::V6, type) {
         if (!OptionDataTypeTraits<T>::integer_type) {
@@ -225,4 +225,4 @@ private:
 } // isc::dhcp namespace
 } // isc namespace
 
-#endif // OPTION6_INT_ARRAY_H
+#endif // OPTION_INT_ARRAY_H
index 35cd56b0b4845f02505c38c9ea886a878e099217..8a382e29b1a04a29dec6749876aef12a6f51c20e 100644 (file)
@@ -25,7 +25,7 @@ namespace {
 /// @param name name of the array being declared.
 /// @param types data types of fields that belong to the record.
 #ifndef RECORD_DECL
-#define RECORD_DECL(name, types...) static const OptionDataType name[] = { types }
+#define RECORD_DECL(name, types...) static OptionDataType name[] = { types }
 #endif
 
 /// @brief A pair of values: one pointing to the array holding types of
@@ -56,7 +56,7 @@ struct OptionDefParams {
 // RFC 1035, section 3.1. The latter could be handled
 // by OPT_FQDN_TYPE but we can't use it here because
 // clients may request ASCII encoding.
-RECORD_DECL(FQDN_RECORDS, OPT_UINT8_TYPE, OPT_UINT8_TYPE, OPT_STRING_TYPE)
+RECORD_DECL(FQDN_RECORDS, OPT_UINT8_TYPE, OPT_UINT8_TYPE, OPT_STRING_TYPE);
 
 /// @brief Definitions of standard DHCPv4 options.
 static const OptionDefParams OPTION_DEF_PARAMS4[] = {
index 1e988be9637eddb2c55ae0fcca4779386e611f68..4d177d1dc9f3026ad2bd04a80dcf0988b333aba3 100644 (file)
@@ -33,8 +33,8 @@ libdhcp___unittests_SOURCES += option4_addrlst_unittest.cc
 libdhcp___unittests_SOURCES += option6_addrlst_unittest.cc
 libdhcp___unittests_SOURCES += option6_ia_unittest.cc
 libdhcp___unittests_SOURCES += option6_iaaddr_unittest.cc
-libdhcp___unittests_SOURCES += option6_int_array_unittest.cc
 libdhcp___unittests_SOURCES += option_int_unittest.cc
+libdhcp___unittests_SOURCES += option_int_array_unittest.cc
 libdhcp___unittests_SOURCES += option_data_types_unittest.cc
 libdhcp___unittests_SOURCES += option_definition_unittest.cc
 libdhcp___unittests_SOURCES += option_custom_unittest.cc
index 39c7160af5c2a77de4aca8613f3d193a18280aa4..f0bf343114d458975ee9ec090558aecbee4bf0be 100644 (file)
@@ -20,9 +20,9 @@
 #include <dhcp/option6_addrlst.h>
 #include <dhcp/option6_ia.h>
 #include <dhcp/option6_iaaddr.h>
-#include <dhcp/option6_int_array.h>
-#include <dhcp/option_int.h>
 #include <dhcp/option_custom.h>
+#include <dhcp/option_int.h>
+#include <dhcp/option_int_array.h>
 #include <util/buffer.h>
 
 #include <gtest/gtest.h>
@@ -288,11 +288,11 @@ TEST_F(LibDhcpTest, unpackOptions6) {
     EXPECT_EQ(6, x->second->getType());  // this should be option 6
     ASSERT_EQ(8, x->second->len()); // it should be of length 8
     // Option with code 6 is the OPTION_ORO. This option is
-    // represented by the Option6IntArray<uint16_t> class which
+    // represented by the OptionIntArray<uint16_t> class which
     // comprises the set of uint16_t values. We need to cast the
     // returned pointer to this type to get values stored in it.
-    boost::shared_ptr<Option6IntArray<uint16_t> > opt_oro =
-        boost::dynamic_pointer_cast<Option6IntArray<uint16_t> >(x->second);
+    boost::shared_ptr<OptionIntArray<uint16_t> > opt_oro =
+        boost::dynamic_pointer_cast<OptionIntArray<uint16_t> >(x->second);
     // This value will be NULL if cast was unsuccessful. This is the case
     // when returned option has different type than expected.
     ASSERT_TRUE(opt_oro);
@@ -632,7 +632,7 @@ TEST_F(LibDhcpTest, stdOptionDefs6) {
     LibDhcpTest::testStdOptionDefs6(D6O_IAADDR, buf, typeid(Option6IAAddr));
 
     LibDhcpTest::testStdOptionDefs6(D6O_ORO, buf,
-                                    typeid(Option6IntArray<uint16_t>));
+                                    typeid(OptionIntArray<uint16_t>));
 
     LibDhcpTest::testStdOptionDefs6(D6O_PREFERENCE, buf,
                                     typeid(OptionInt<uint8_t>));
@@ -723,7 +723,7 @@ TEST_F(LibDhcpTest, stdOptionDefs6) {
                                     typeid(OptionCustom));
 
     LibDhcpTest::testStdOptionDefs6(D6O_ERO, buf,
-                                    typeid(Option6IntArray<uint16_t>));
+                                    typeid(OptionIntArray<uint16_t>));
 
     LibDhcpTest::testStdOptionDefs6(D6O_LQ_QUERY, buf, typeid(OptionCustom));
 
index b3daf95332e2a8a802a732bcc4b93ac3853301f4..c88df8338d2d95113637fe10a2fec525dcf186b3 100644 (file)
 #include <dhcp/option6_addrlst.h>
 #include <dhcp/option6_ia.h>
 #include <dhcp/option6_iaaddr.h>
-#include <dhcp/option6_int_array.h>
 #include <dhcp/option_custom.h>
 #include <dhcp/option_definition.h>
 #include <dhcp/option_int.h>
+#include <dhcp/option_int_array.h>
 #include <exceptions/exceptions.h>
 
 #include <boost/pointer_cast.hpp>
@@ -740,9 +740,9 @@ TEST_F(OptionDefinitionTest, uint16Array) {
     EXPECT_NO_THROW(
         option_v6 = opt_def.optionFactory(Option::V6, opt_code, buf);
     );
-    ASSERT_TRUE(typeid(*option_v6) == typeid(Option6IntArray<uint16_t>));
-    boost::shared_ptr<Option6IntArray<uint16_t> > option_cast_v6 =
-        boost::static_pointer_cast<Option6IntArray<uint16_t> >(option_v6);
+    ASSERT_TRUE(typeid(*option_v6) == typeid(OptionIntArray<uint16_t>));
+    boost::shared_ptr<OptionIntArray<uint16_t> > option_cast_v6 =
+        boost::static_pointer_cast<OptionIntArray<uint16_t> >(option_v6);
     // Get the values from the initiated options and validate.
     std::vector<uint16_t> values = option_cast_v6->getValues();
     for (int i = 0; i < values.size(); ++i) {
@@ -782,9 +782,9 @@ TEST_F(OptionDefinitionTest, uint16ArrayTokenized) {
     EXPECT_NO_THROW(
         option_v6 = opt_def.optionFactory(Option::V6, opt_code, str_values);
     );
-    ASSERT_TRUE(typeid(*option_v6) == typeid(Option6IntArray<uint16_t>));
-    boost::shared_ptr<Option6IntArray<uint16_t> > option_cast_v6 =
-        boost::static_pointer_cast<Option6IntArray<uint16_t> >(option_v6);
+    ASSERT_TRUE(typeid(*option_v6) == typeid(OptionIntArray<uint16_t>));
+    boost::shared_ptr<OptionIntArray<uint16_t> > option_cast_v6 =
+        boost::static_pointer_cast<OptionIntArray<uint16_t> >(option_v6);
     // Get the values from the initiated options and validate.
     std::vector<uint16_t> values = option_cast_v6->getValues();
     EXPECT_EQ(12345, values[0]);
@@ -813,9 +813,9 @@ TEST_F(OptionDefinitionTest, uint32Array) {
     EXPECT_NO_THROW(
         option_v6 = opt_def.optionFactory(Option::V6, opt_code, buf);
     );
-    ASSERT_TRUE(typeid(*option_v6) == typeid(Option6IntArray<uint32_t>));
-    boost::shared_ptr<Option6IntArray<uint32_t> > option_cast_v6 =
-        boost::static_pointer_cast<Option6IntArray<uint32_t> >(option_v6);
+    ASSERT_TRUE(typeid(*option_v6) == typeid(OptionIntArray<uint32_t>));
+    boost::shared_ptr<OptionIntArray<uint32_t> > option_cast_v6 =
+        boost::static_pointer_cast<OptionIntArray<uint32_t> >(option_v6);
     // Get the values from the initiated options and validate.
     std::vector<uint32_t> values = option_cast_v6->getValues();
     for (int i = 0; i < values.size(); ++i) {
@@ -858,9 +858,9 @@ TEST_F(OptionDefinitionTest, uint32ArrayTokenized) {
     EXPECT_NO_THROW(
         option_v6 = opt_def.optionFactory(Option::V6, opt_code, str_values);
     );
-    ASSERT_TRUE(typeid(*option_v6) == typeid(Option6IntArray<uint32_t>));
-    boost::shared_ptr<Option6IntArray<uint32_t> > option_cast_v6 =
-        boost::static_pointer_cast<Option6IntArray<uint32_t> >(option_v6);
+    ASSERT_TRUE(typeid(*option_v6) == typeid(OptionIntArray<uint32_t>));
+    boost::shared_ptr<OptionIntArray<uint32_t> > option_cast_v6 =
+        boost::static_pointer_cast<OptionIntArray<uint32_t> >(option_v6);
     // Get the values from the initiated options and validate.
     std::vector<uint32_t> values = option_cast_v6->getValues();
     EXPECT_EQ(123456, values[0]);
similarity index 84%
rename from src/lib/dhcp/tests/option6_int_array_unittest.cc
rename to src/lib/dhcp/tests/option_int_array_unittest.cc
index 3a8640a59da2232c235d58c6b498127e75cad51f..4ba47d2cdcaffe258f60b2354db5ddfa58623d03 100644 (file)
@@ -17,7 +17,7 @@
 #include <dhcp/dhcp6.h>
 #include <dhcp/option.h>
 #include <dhcp/option6_iaaddr.h>
-#include <dhcp/option6_int_array.h>
+#include <dhcp/option_int_array.h>
 #include <util/buffer.h>
 
 #include <boost/pointer_cast.hpp>
@@ -31,13 +31,13 @@ using namespace isc::util;
 
 namespace {
 
-/// @brief Option6IntArray test class.
-class Option6IntArrayTest : public ::testing::Test {
+/// @brief OptionIntArray test class.
+class OptionIntArrayTest : public ::testing::Test {
 public:
     /// @brief Constructor.
     ///
     /// Initializes the option buffer with some data.
-    Option6IntArrayTest(): buf_(255), out_buf_(255) {
+    OptionIntArrayTest(): buf_(255), out_buf_(255) {
         for (int i = 0; i < 255; i++) {
             buf_[i] = 255 - i;
         }
@@ -57,21 +57,21 @@ public:
         // returns the buffer which is actually the array of uint8_t.
         // However, since we allow using uint8_t types with this template
         // class we have to test it here.
-        boost::shared_ptr<Option6IntArray<T> > opt;
+        boost::shared_ptr<OptionIntArray<T> > opt;
         const int opt_len = 10;
         const uint16_t opt_code = 80;
 
         // Constructor throws exception if provided buffer is empty.
         EXPECT_THROW(
-            Option6IntArray<T>(opt_code, buf_.begin(), buf_.begin()),
+            OptionIntArray<T>(opt_code, buf_.begin(), buf_.begin()),
             isc::OutOfRange
         );
 
         // Provided buffer is not empty so it should not throw exception.
         ASSERT_NO_THROW(
             opt = boost::shared_ptr<
-                Option6IntArray<T> >(new Option6IntArray<T>(opt_code, buf_.begin(),
-                                                            buf_.begin() + opt_len))
+                OptionIntArray<T> >(new OptionIntArray<T>(opt_code, buf_.begin(),
+                                                          buf_.begin() + opt_len))
         );
 
         EXPECT_EQ(Option::V6, opt->getUniverse());
@@ -124,28 +124,28 @@ public:
     template<typename T>
     void bufferToIntTest16() {
         // Create option that conveys array of multiple uint16_t or int16_t values.
-        boost::shared_ptr<Option6IntArray<T> > opt;
+        boost::shared_ptr<OptionIntArray<T> > opt;
         const int opt_len = 20;
         const uint16_t opt_code = 81;
 
         // Constructor throws exception if provided buffer is empty.
         EXPECT_THROW(
-            Option6IntArray<T>(opt_code, buf_.begin(), buf_.begin()),
+            OptionIntArray<T>(opt_code, buf_.begin(), buf_.begin()),
             isc::OutOfRange
         );
 
         // Constructor throws exception if provided buffer's length is not
         // multiple of 2-bytes.
         EXPECT_THROW(
-            Option6IntArray<T>(opt_code, buf_.begin(), buf_.begin() + 5),
+            OptionIntArray<T>(opt_code, buf_.begin(), buf_.begin() + 5),
             isc::OutOfRange
         );
 
         // Now the buffer length is correct.
         ASSERT_NO_THROW(
             opt = boost::shared_ptr<
-                Option6IntArray<T> >(new Option6IntArray<T>(opt_code, buf_.begin(),
-                                                            buf_.begin() + opt_len))
+                OptionIntArray<T> >(new OptionIntArray<T>(opt_code, buf_.begin(),
+                                                          buf_.begin() + opt_len))
         );
 
         EXPECT_EQ(Option::V6, opt->getUniverse());
@@ -195,28 +195,28 @@ public:
     template<typename T>
     void bufferToIntTest32() {
         // Create option that conveys array of multiple uint16_t values.
-        boost::shared_ptr<Option6IntArray<T> > opt;
+        boost::shared_ptr<OptionIntArray<T> > opt;
         const int opt_len = 40;
         const uint16_t opt_code = 82;
 
         // Constructor throws exception if provided buffer is empty.
         EXPECT_THROW(
-            Option6IntArray<T>(opt_code, buf_.begin(), buf_.begin()),
+            OptionIntArray<T>(opt_code, buf_.begin(), buf_.begin()),
             isc::OutOfRange
         );
 
         // Constructor throws exception if provided buffer's length is not
         // multiple of 4-bytes.
         EXPECT_THROW(
-            Option6IntArray<T>(opt_code, buf_.begin(), buf_.begin() + 9),
+            OptionIntArray<T>(opt_code, buf_.begin(), buf_.begin() + 9),
             isc::OutOfRange
         );
 
         // Now the buffer length is correct.
         ASSERT_NO_THROW(
             opt = boost::shared_ptr<
-                Option6IntArray<T> >(new Option6IntArray<T>(opt_code, buf_.begin(),
-                                                            buf_.begin() + opt_len))
+                OptionIntArray<T> >(new OptionIntArray<T>(opt_code, buf_.begin(),
+                                                          buf_.begin() + opt_len))
         );
 
         EXPECT_EQ(Option::V6, opt->getUniverse());
@@ -268,51 +268,51 @@ public:
 /// convey unsigned values. We should maybe extend these tests for
 /// signed types too.
 
-TEST_F(Option6IntArrayTest, useInvalidType) {
+TEST_F(OptionIntArrayTest, useInvalidType) {
     const uint16_t opt_code = 80;
     EXPECT_THROW(
         boost::scoped_ptr<
-            Option6IntArray<bool> >(new Option6IntArray<bool>(opt_code, OptionBuffer(5))),
+            OptionIntArray<bool> >(new OptionIntArray<bool>(opt_code, OptionBuffer(5))),
         InvalidDataType
     );
 
     EXPECT_THROW(
         boost::scoped_ptr<
-            Option6IntArray<int64_t> >(new Option6IntArray<int64_t>(opt_code,
-                                                                    OptionBuffer(10))),
+            OptionIntArray<int64_t> >(new OptionIntArray<int64_t>(opt_code,
+                                                                  OptionBuffer(10))),
         InvalidDataType
     );
 
 }
 
-TEST_F(Option6IntArrayTest, bufferToUint8) {
+TEST_F(OptionIntArrayTest, bufferToUint8) {
     bufferToIntTest8<uint8_t>();
 }
 
-TEST_F(Option6IntArrayTest, bufferToInt8) {
+TEST_F(OptionIntArrayTest, bufferToInt8) {
     bufferToIntTest8<int8_t>();
 }
 
-TEST_F(Option6IntArrayTest, bufferToUint16) {
+TEST_F(OptionIntArrayTest, bufferToUint16) {
     bufferToIntTest16<uint16_t>();
 }
 
-TEST_F(Option6IntArrayTest, bufferToInt16) {
+TEST_F(OptionIntArrayTest, bufferToInt16) {
     bufferToIntTest16<int16_t>();
 }
 
-TEST_F(Option6IntArrayTest, bufferToUint32) {
+TEST_F(OptionIntArrayTest, bufferToUint32) {
     bufferToIntTest32<uint32_t>();
 }
 
-TEST_F(Option6IntArrayTest, bufferToInt32) {
+TEST_F(OptionIntArrayTest, bufferToInt32) {
     bufferToIntTest32<int32_t>();
 }
 
-TEST_F(Option6IntArrayTest, setValuesUint8) {
+TEST_F(OptionIntArrayTest, setValuesUint8) {
     const uint16_t opt_code = 100;
     // Create option with empty vector of values.
-    boost::shared_ptr<Option6IntArray<uint8_t> > opt(new Option6IntArray<uint8_t>(opt_code));
+    boost::shared_ptr<OptionIntArray<uint8_t> > opt(new OptionIntArray<uint8_t>(opt_code));
     // Initialize vector with some data and pass to the option.
     std::vector<uint8_t> values;
     for (int i = 0; i < 10; ++i) {
@@ -327,10 +327,10 @@ TEST_F(Option6IntArrayTest, setValuesUint8) {
     EXPECT_TRUE(std::equal(values.begin(), values.end(), returned_values.begin()));
 }
 
-TEST_F(Option6IntArrayTest, setValuesInt8) {
+TEST_F(OptionIntArrayTest, setValuesInt8) {
     const uint16_t opt_code = 100;
     // Create option with empty vector of values.
-    boost::shared_ptr<Option6IntArray<int8_t> > opt(new Option6IntArray<int8_t>(opt_code));
+    boost::shared_ptr<OptionIntArray<int8_t> > opt(new OptionIntArray<int8_t>(opt_code));
     // Initialize vector with some data and pass to the option.
     std::vector<int8_t> values;
     for (int i = 0; i < 10; ++i) {
@@ -345,10 +345,10 @@ TEST_F(Option6IntArrayTest, setValuesInt8) {
     EXPECT_TRUE(std::equal(values.begin(), values.end(), returned_values.begin()));
 }
 
-TEST_F(Option6IntArrayTest, setValuesUint16) {
+TEST_F(OptionIntArrayTest, setValuesUint16) {
     const uint16_t opt_code = 101;
     // Create option with empty vector of values.
-    boost::shared_ptr<Option6IntArray<uint16_t> > opt(new Option6IntArray<uint16_t>(opt_code));
+    boost::shared_ptr<OptionIntArray<uint16_t> > opt(new OptionIntArray<uint16_t>(opt_code));
     // Initialize vector with some data and pass to the option.
     std::vector<uint16_t> values;
     for (int i = 0; i < 10; ++i) {
@@ -363,10 +363,10 @@ TEST_F(Option6IntArrayTest, setValuesUint16) {
     EXPECT_TRUE(std::equal(values.begin(), values.end(), returned_values.begin()));
 }
 
-TEST_F(Option6IntArrayTest, setValuesInt16) {
+TEST_F(OptionIntArrayTest, setValuesInt16) {
     const uint16_t opt_code = 101;
     // Create option with empty vector of values.
-    boost::shared_ptr<Option6IntArray<int16_t> > opt(new Option6IntArray<int16_t>(opt_code));
+    boost::shared_ptr<OptionIntArray<int16_t> > opt(new OptionIntArray<int16_t>(opt_code));
     // Initialize vector with some data and pass to the option.
     std::vector<int16_t> values;
     for (int i = 0; i < 10; ++i) {
@@ -381,10 +381,10 @@ TEST_F(Option6IntArrayTest, setValuesInt16) {
     EXPECT_TRUE(std::equal(values.begin(), values.end(), returned_values.begin()));
 }
 
-TEST_F(Option6IntArrayTest, setValuesUint32) {
+TEST_F(OptionIntArrayTest, setValuesUint32) {
     const uint32_t opt_code = 101;
     // Create option with empty vector of values.
-    boost::shared_ptr<Option6IntArray<uint32_t> > opt(new Option6IntArray<uint32_t>(opt_code));
+    boost::shared_ptr<OptionIntArray<uint32_t> > opt(new OptionIntArray<uint32_t>(opt_code));
     // Initialize vector with some data and pass to the option.
     std::vector<uint32_t> values;
     for (int i = 0; i < 10; ++i) {
@@ -399,10 +399,10 @@ TEST_F(Option6IntArrayTest, setValuesUint32) {
     EXPECT_TRUE(std::equal(values.begin(), values.end(), returned_values.begin()));
 }
 
-TEST_F(Option6IntArrayTest, setValuesInt32) {
+TEST_F(OptionIntArrayTest, setValuesInt32) {
     const uint32_t opt_code = 101;
     // Create option with empty vector of values.
-    boost::shared_ptr<Option6IntArray<int32_t> > opt(new Option6IntArray<int32_t>(opt_code));
+    boost::shared_ptr<OptionIntArray<int32_t> > opt(new OptionIntArray<int32_t>(opt_code));
     // Initialize vector with some data and pass to the option.
     std::vector<int32_t> values;
     for (int i = 0; i < 10; ++i) {