]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[master] Finished trac4027 aka Pkt4o6 merge trac4110_base
authorFrancis Dupont <fdupont@isc.org>
Sat, 31 Oct 2015 10:40:42 +0000 (11:40 +0100)
committerFrancis Dupont <fdupont@isc.org>
Sat, 31 Oct 2015 10:40:42 +0000 (11:40 +0100)
src/lib/dhcp/Makefile.am
src/lib/dhcp/pkt.cc
src/lib/dhcp/pkt4.h
src/lib/dhcp/pkt6.h

index 349070ec0c63e2d645dd27b187e8166991ac0bc0..b892192b9ccf61637d697805c8f5c462916239f4 100644 (file)
@@ -15,7 +15,7 @@ CLEANFILES = *.gcno *.gcda
 lib_LTLIBRARIES = libkea-dhcp++.la
 libkea_dhcp___la_SOURCES  =
 libkea_dhcp___la_SOURCES += classify.cc classify.h
-libkea_dhcp___la_SOURCES += dhcp6.h dhcp4.h dhcp4o6.h
+libkea_dhcp___la_SOURCES += dhcp6.h dhcp4.h
 libkea_dhcp___la_SOURCES += duid.cc duid.h
 libkea_dhcp___la_SOURCES += hwaddr.cc hwaddr.h
 libkea_dhcp___la_SOURCES += iface_mgr.cc iface_mgr.h
index dfd1f8aa33713fe5ef9be9cb0e54a248e5ad5c73..1af44ba9897a0b39bf72ad6a3d98a574110b33b6 100644 (file)
@@ -50,10 +50,10 @@ Pkt::Pkt(const uint8_t* buf, uint32_t len, const isc::asiolink::IOAddress& local
 {
 
     if (len != 0) {
-       if (buf == NULL) {
-           isc_throw(InvalidParameter, "data buffer passed to Pkt is NULL");
-       }
-       data_.resize(len);
+        if (buf == NULL) {
+            isc_throw(InvalidParameter, "data buffer passed to Pkt is NULL");
+        }
+        data_.resize(len);
         memcpy(&data_[0], buf, len);
     }
 }
index 0c7d009e1615332687b1a682474e0e2a0c72fe4d..a4c0cc2db912239f7d89cea88095a54e4ddd9664 100644 (file)
@@ -375,6 +375,14 @@ public:
     /// (true) or non-relayed (false).
     bool isRelayed() const;
 
+    /// @brief Checks if a DHCPv4 message has beeb transported over DHCPv6
+    ///
+    /// @return Boolean value which indicates whether the message is
+    /// transported over DHCPv6 (true) or native DHCPv4 (false)
+    virtual bool isDhcp4o6() const {
+        return (false);
+    }
+
 private:
 
     /// @brief Generic method that validates and sets HW address.
index e517c35eede23963d217a714c2f56f7e58e4783d..87dab71a67ddaeb8515fda1e25ee10ff2e29a849 100644 (file)
@@ -244,7 +244,7 @@ public:
     /// @param option_code code of the requested option
     /// @param nesting_level see description above
     ///
-     /// @return pointer to the option (or NULL if there is no such option)
+    /// @return pointer to the option (or NULL if there is no such option)
     OptionPtr getRelayOption(uint16_t option_code, uint8_t nesting_level);
 
     /// @brief Return first instance of a specified option