Browse Source

[1237] Minor fixes after review.

Tomek Mrugalski 13 years ago
parent
commit
73601f240d
3 changed files with 9 additions and 2 deletions
  1. 1 1
      src/bin/dhcp6/dhcp6_srv.cc
  2. 2 1
      src/lib/dhcp/iface_mgr.cc
  3. 6 0
      src/lib/dhcp/iface_mgr.h

+ 1 - 1
src/bin/dhcp6/dhcp6_srv.cc

@@ -33,7 +33,7 @@ Dhcpv6Srv::Dhcpv6Srv(uint16_t port) {
     try {
 	IfaceMgr::instance();
     } catch (const std::exception &e) {
-	cout << "Failed to instantiate InterfaceManager. Aborting." << endl;
+	cout << "Failed to instantiate InterfaceManager:" << e.what() << ". Aborting." << endl;
 	shutdown = true;
     }
 

+ 2 - 1
src/lib/dhcp/iface_mgr.cc

@@ -12,6 +12,7 @@
 // OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 // PERFORMANCE OF THIS SOFTWARE.
 
+#include <config.h>
 #include <sstream>
 #include <fstream>
 #include <string.h>
@@ -73,7 +74,7 @@ IfaceMgr::Iface::getPlainMac() const {
     tmp << hex;
     for (int i = 0; i < mac_len_; i++) {
         tmp.width(2);
-        tmp <<  int(mac_[i]);
+        tmp <<  static_cast<int>(mac_[i]);
         if (i < mac_len_-1) {
             tmp << ":";
         }

+ 6 - 0
src/lib/dhcp/iface_mgr.h

@@ -54,6 +54,12 @@ public:
         /// returns link-layer address a plain text
         std::string getPlainMac() const;
 
+        /// @brief Sets flag_*_ fields based on bitmask value returned by OS
+        ///
+        /// Note: Implementation of this method is OS-dependent as bits have
+        /// different meaning on each OS.
+        ///
+        /// @param flags bitmask value returned by OS in interface detection
         void setFlags(uint32_t flags);
 
         /// network interface name