From 8e1abab78e0eb9b41ba3a61c7ddc4efd4a1a9409 Mon Sep 17 00:00:00 2001 From: tho <tho@wiback.org> Date: Fri, 14 Dec 2007 16:10:57 +0000 Subject: [PATCH] -/- --- Socket/NetdeviceController.cc | 1 + Socket/NetdeviceController.hh | 2 +- Socket/NetdeviceController.test.cc | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Socket/NetdeviceController.cc b/Socket/NetdeviceController.cc index d3cf57ad4..cf25047c9 100644 --- a/Socket/NetdeviceController.cc +++ b/Socket/NetdeviceController.cc @@ -62,6 +62,7 @@ prefix_ std::string senf::NetdeviceController::interfaceName() prefix_ senf::MACAddress senf::NetdeviceController::hardwareAddress() { struct ifreq ifr; + ifrName( ifr); doIoctl( ifr, SIOCGIFHWADDR); return senf::MACAddress::from_data( ifr.ifr_hwaddr.sa_data); } diff --git a/Socket/NetdeviceController.hh b/Socket/NetdeviceController.hh index 757aac5b3..d114314b2 100644 --- a/Socket/NetdeviceController.hh +++ b/Socket/NetdeviceController.hh @@ -51,7 +51,7 @@ namespace senf { MACAddress hardwareAddress(); std::string interfaceName(); - int interfaceIndex(); + int interfaceIndex(); ///< return the interface index of the interface int mtu(); void mtu(int new_mtu); diff --git a/Socket/NetdeviceController.test.cc b/Socket/NetdeviceController.test.cc index 96a112589..825afeb6b 100644 --- a/Socket/NetdeviceController.test.cc +++ b/Socket/NetdeviceController.test.cc @@ -37,6 +37,7 @@ BOOST_AUTO_UNIT_TEST(NetdeviceController) { // senf::NetdeviceController ctrl ("eth0"); +// std::cout << ctrl.hardwareAddress() << "\n"; } ///////////////////////////////cc.e//////////////////////////////////////// -- GitLab