Closed pavel-odintsov closed 9 years ago
Hello, That feature already exists, and is called
/* Get interface hardware address */
std::string GetMyMAC(const std::string& iface = "");
(see libcrafter/crafter/Utils/CrafterUtils.h) On the contrary, GetMac takes 2 parameter, an ip address and (optionally) an interface on which to perform an ARP request.
Hello!
Please give me chance to thank you for awesome library! It's very useful and reliable :)
I suggest you to add ability to get intarface's MAC address without ARP protocol directly from ifconfig.
Current implementation:
Can't read MAC if interface haven't assigned IP address:
Btw, in my case I could not use ARP too because I'm implementing network stack on top of netmap interface and I haven't ARP. But MAC address is very important for Crafter library and will be fine if it will be implemented in library itself without external dependencies.