From: tho Date: Fri, 14 Dec 2007 16:10:57 +0000 (+0000) Subject: -/- X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=6d527cd9cf4d928926e5bf164ea470eb419fcbf8;p=senf.git -/- git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@567 270642c3-0616-0410-b53a-bc976706d245 --- diff --git a/Socket/NetdeviceController.cc b/Socket/NetdeviceController.cc index d3cf57a..cf25047 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 757aac5..d114314 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 96a1125..825afeb 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////////////////////////////////////////