Skip to content
Snippets Groups Projects
Commit 8e1abab7 authored by tho's avatar tho
Browse files

-/-

parent 64755c1e
No related branches found
No related tags found
Loading
...@@ -62,6 +62,7 @@ prefix_ std::string senf::NetdeviceController::interfaceName() ...@@ -62,6 +62,7 @@ prefix_ std::string senf::NetdeviceController::interfaceName()
prefix_ senf::MACAddress senf::NetdeviceController::hardwareAddress() prefix_ senf::MACAddress senf::NetdeviceController::hardwareAddress()
{ {
struct ifreq ifr; struct ifreq ifr;
ifrName( ifr);
doIoctl( ifr, SIOCGIFHWADDR); doIoctl( ifr, SIOCGIFHWADDR);
return senf::MACAddress::from_data( ifr.ifr_hwaddr.sa_data); return senf::MACAddress::from_data( ifr.ifr_hwaddr.sa_data);
} }
......
...@@ -51,7 +51,7 @@ namespace senf { ...@@ -51,7 +51,7 @@ namespace senf {
MACAddress hardwareAddress(); MACAddress hardwareAddress();
std::string interfaceName(); std::string interfaceName();
int interfaceIndex(); int interfaceIndex(); ///< return the interface index of the interface
int mtu(); int mtu();
void mtu(int new_mtu); void mtu(int new_mtu);
......
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
BOOST_AUTO_UNIT_TEST(NetdeviceController) BOOST_AUTO_UNIT_TEST(NetdeviceController)
{ {
// senf::NetdeviceController ctrl ("eth0"); // senf::NetdeviceController ctrl ("eth0");
// std::cout << ctrl.hardwareAddress() << "\n";
} }
///////////////////////////////cc.e//////////////////////////////////////// ///////////////////////////////cc.e////////////////////////////////////////
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment