/get_physical_mac

code to get physical MAC address directly from the network adapter hardware

Primary LanguageCCreative Commons Zero v1.0 UniversalCC0-1.0

Get the Real MAC Address from the NIC Hardware

This is a program to get the real MAC address from the NIC hardware.

The core code is

epaddr->cmd = ETHTOOL_GPERMADDR;
epaddr->size = MAX_ADDR_LEN;

and

ioctl(sockfd, SIOCETHTOOL, &ifr);

CC0
To the extent possible under law, yjf_victor has waived all copyright and related or neighboring rights to get_physical_mac.