I need to display all the IP addresses from my local computer, using the C language. How can this be done?
Not a complete solution yet, but take a look in /proc/net
!
dev
lists the available interface devices by name, route
lists some routes, as does ipv6_route
,arp
lists devices in the actual routing table (does not include localhost).Not as high-tech as the other solution, but it can be done with simple file reading. Linux specific, though.