The mac address or the hardware address or the ethernet address of an interface is a 48 bit number that looks like this : 00:1c:c0:f8:79:ee
The mac address of an interface can be found given its name. The function to use is ioctl.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
|
Output
1 |
$ gcc interface_mac.c && ./a.out |
2 |
Mac : 00:1c:c0:f8:79:ee |