Monthly Archives: May 2016
How to restore MAC address in Linux with C.

In this example you can learn how to get default interface’s mac address even if it was changed in operating system. Example written in C 89.
Program uses ethtool’s kernel ioctl. “ethtool -P interface_name” does the same work.

Get network interfaces list in Linux with libnl3

This example shows how to get network interfaces list with IP and MAC addresses.

Output example:

Source code:

compile:

Posted on May 18, 2016, 5:29 pm By
No comments yet Categories: C, Linux