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
No related merge requests found
......@@ -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);
}
......
......@@ -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);
......
......@@ -37,6 +37,7 @@
BOOST_AUTO_UNIT_TEST(NetdeviceController)
{
// senf::NetdeviceController ctrl ("eth0");
// std::cout << ctrl.hardwareAddress() << "\n";
}
///////////////////////////////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