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;
}
// 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>
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 << ":";
}
/// 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