I need to read permanent (burned-in) MAC address of network adapter. Since MAC address can be easily spoofed, I need to read the real one which is written on EEPROM. I need to do it using C++ on Linux.
I tried using ethtool which is quite good and works fine. However on some systems it does not work as intented.
ethtool -P eth0
Permanent address: 00:00:00:00:00:00
ethtool -e eth0
Cannot get EEPROM data: Operation not supported
Network Adapter has following info:
- driver: ucc_geth
- version: 1.1
- firmware-version: N/A
- bus-info: QUICC ENGINE
Linux kernel version is: 184.108.40.206
Question is: Can i fix this issue with any update(driver, kernel etc)?
Additionally, I make the same ethtool calls with
ioctl function in C++. Is there any way to fix this inside the code? Or is there any other way to get the permanent MAC address from EEPROM?