Commit 73601f24 authored by Tomek Mrugalski's avatar Tomek Mrugalski 🛰
Browse files

[1237] Minor fixes after review.

parent 5ec569cd
...@@ -33,7 +33,7 @@ Dhcpv6Srv::Dhcpv6Srv(uint16_t port) { ...@@ -33,7 +33,7 @@ Dhcpv6Srv::Dhcpv6Srv(uint16_t port) {
try { try {
IfaceMgr::instance(); IfaceMgr::instance();
} catch (const std::exception &e) { } catch (const std::exception &e) {
cout << "Failed to instantiate InterfaceManager. Aborting." << endl; cout << "Failed to instantiate InterfaceManager:" << e.what() << ". Aborting." << endl;
shutdown = true; shutdown = true;
} }
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR // OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE. // PERFORMANCE OF THIS SOFTWARE.
#include <config.h>
#include <sstream> #include <sstream>
#include <fstream> #include <fstream>
#include <string.h> #include <string.h>
...@@ -73,7 +74,7 @@ IfaceMgr::Iface::getPlainMac() const { ...@@ -73,7 +74,7 @@ IfaceMgr::Iface::getPlainMac() const {
tmp << hex; tmp << hex;
for (int i = 0; i < mac_len_; i++) { for (int i = 0; i < mac_len_; i++) {
tmp.width(2); tmp.width(2);
tmp << int(mac_[i]); tmp << static_cast<int>(mac_[i]);
if (i < mac_len_-1) { if (i < mac_len_-1) {
tmp << ":"; tmp << ":";
} }
......
...@@ -54,6 +54,12 @@ public: ...@@ -54,6 +54,12 @@ public:
/// returns link-layer address a plain text /// returns link-layer address a plain text
std::string getPlainMac() const; 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); void setFlags(uint32_t flags);
/// network interface name /// network interface name
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment