]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#939] Updating comments and documentation
authorPiotrek Zadroga <piotrek@isc.org>
Thu, 9 Mar 2023 10:31:46 +0000 (11:31 +0100)
committerPiotrek Zadroga <piotrek@isc.org>
Thu, 23 Mar 2023 13:51:23 +0000 (14:51 +0100)
src/lib/dhcp/option_definition.cc
src/lib/dhcp/option_definition.h
src/lib/dhcp/option_opaque_data_tuples.cc
src/lib/dhcp/option_opaque_data_tuples.h

index 8868e062b5c2c75d4822876002e9195bf37335e3..a9a6929eab1af08c24caa5afafcfd373abfeeec8 100644 (file)
@@ -776,8 +776,7 @@ OptionDefinition::factoryOpaqueDataTuples(Option::Universe u,
                                           uint16_t type,
                                           OptionBufferConstIter begin,
                                           OptionBufferConstIter end,
-                                          OpaqueDataTuple::LengthFieldType lenFieldType
-                                          ) {
+                                          OpaqueDataTuple::LengthFieldType lenFieldType) {
     boost::shared_ptr<OptionOpaqueDataTuples>
         option(new OptionOpaqueDataTuples(u, type, begin, end, lenFieldType));
 
index 678e18bb31e52a6f9f4a8646a1efd2d2986de21c..5d07396476887fd80a1b63f189fcfd5073fc7f80 100644 (file)
@@ -581,7 +581,8 @@ public:
                                              OptionBufferConstIter begin,
                                              OptionBufferConstIter end);
 
-    /// @brief Factory to create option with tuple list with explict tuple's length field type.
+    /// @brief Factory to create option with tuple list with explict
+    /// tuple's length field type.
     ///
     /// @param u option universe (V4 or V6).
     /// @param type option type.
index 655027b2e2df0b8c4d2a9d920c0d8d3b6ed7e44d..967b9d31b3a0fb1b4f7575b8d48d6517ecbfee3b 100644 (file)
@@ -33,7 +33,7 @@ OptionOpaqueDataTuples::OptionOpaqueDataTuples(Option::Universe u,
                                                OptionBufferConstIter end,
                                                OpaqueDataTuple::LengthFieldType lenFieldType)
     : Option(u, type) {
-    prefLenFieldType = lenFieldType;
+    prefLenFieldType_ = lenFieldType;
     unpack(begin, end);
 }
 
index f1248f59d9b195d0dd6b864d91b3dac0cccd95ad..4f74b5d44128d35ce2ffd0d0d02902b58a84f536 100644 (file)
@@ -64,8 +64,10 @@ public:
 
     /// @brief Constructor.
     ///
-    /// This constructor creates an instance of the option using a buffer with
-    /// on-wire data. It may throw an exception if the @c unpack method throws.
+    /// This constructor creates an instance of an OpaqueDataTuple option using
+    /// a buffer with on-wire data. This constructor allows to explicitly set
+    /// tuple's length field type.
+    /// It may throw an exception if the @c unpack method throws.
     ///
     /// @param u universe (v4 or v6)
     /// @param type option type
@@ -154,9 +156,9 @@ public:
 private:
     /// @brief holds information of explicitly assigned tuple length field.
     /// Normally tuple length is evaluated basing on Option's universe.
-    /// But there may be cases when e.g. for v4 universe tuple length field is 2 bytes long
-    /// (e.g. DHCPv4 SZTP Redirect Option #143 bootstrap-server-list).
-    OpaqueDataTuple::LengthFieldType prefLenFieldType = OpaqueDataTuple::LENGTH_EMPTY;
+    /// But there may be cases when e.g. for v4 universe tuple length field
+    /// is 2 bytes long (e.g. DHCPv4 SZTP Redirect Option #143 bootstrap-server-list).
+    OpaqueDataTuple::LengthFieldType prefLenFieldType_ = OpaqueDataTuple::LENGTH_EMPTY;
 
     /// @brief Returns the tuple length field type for the given universe.
     ///
@@ -165,8 +167,8 @@ private:
     ///
     /// @return Tuple length field type for the universe this option belongs to.
     OpaqueDataTuple::LengthFieldType getLengthFieldType() const {
-        if (prefLenFieldType != OpaqueDataTuple::LENGTH_EMPTY) {
-            return (prefLenFieldType);
+        if (prefLenFieldType_ != OpaqueDataTuple::LENGTH_EMPTY) {
+            return (prefLenFieldType_);
         }
         return (universe_ == Option::V6 ? OpaqueDataTuple::LENGTH_2_BYTES :
                 OpaqueDataTuple::LENGTH_1_BYTE);