]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2304] Minor additions in comments.
authorMarcin Siodelski <marcin@isc.org>
Fri, 12 Oct 2012 07:28:40 +0000 (09:28 +0200)
committerMarcin Siodelski <marcin@isc.org>
Fri, 12 Oct 2012 07:28:40 +0000 (09:28 +0200)
src/lib/dhcp/option6_int.h
src/lib/dhcp/option6_int_array.h

index f6bf1abedef57328da68058a6df2857fd65a1699..cdc625ecb4ac5c4774fc8a9b371a77621170f7b7 100644 (file)
@@ -61,7 +61,7 @@ public:
     /// @param begin iterator to first byte of option data.
     /// @param end iterator to end of option data (first byte after option end).
     ///
-    /// @todo mention here what it throws.
+    /// @throw isc::OutOfRange if provided buffer is shorter than data size.
     Option6Int(uint16_t type, OptionBufferConstIter begin,
                OptionBufferConstIter end)
         : Option(Option::V6, type) {
@@ -108,10 +108,14 @@ public:
     ///
     /// @param begin iterator to first byte of option data
     /// @param end iterator to end of option data (first byte after option end)
+    ///
+    /// @throw isc::OutOfRange if provided buffer is shorter than data size.
     virtual void unpack(OptionBufferConstIter begin, OptionBufferConstIter end) {
         if (distance(begin, end) < sizeof(T)) {
             isc_throw(OutOfRange, "Option " << getType() << " truncated");
         }
+        // @todo consider what to do if buffer is longer than data type.
+
         // Depending on the data type length we use different utility functions
         // readUint16 or readUint32 which read the data laid in the network byte
         // order from the provided buffer. The same functions can be safely used
index c9531c65819596380af0d79b6a19fc76e5aa79eb..a88e5392d1a5913847435611060f7755e7db4581 100644 (file)
@@ -145,6 +145,8 @@ public:
         if (distance(begin, end) % sizeof(T) != 0) {
             isc_throw(OutOfRange, "option " << getType() << " truncated");
         }
+        // @todo consider what to do if buffer is longer than data type.
+
         values_.clear();
         while (begin != end) {
             // Depending on the data type length we use different utility functions