Getting IP, IPv6 and MAC addresses on Linux is no easy task if you do not use ifconfig. The information on the internet is not very good, and the process is quite complicated. I have spent most of yesterday writing the code, so I decided to describe it here.
The whole code can be found at the bottom.
Listing the interfaces The first thing we need to do is get the names of network interfaces available on the system.
Read more →