
Listing Interfaces
In some cases, it is necessary to obtain a list of local IP addresses available on the system.
This can be useful for presenting a user with a list of local IP addresses to use for
sending or receiving network traffic or for automatically selecting an address to use.
The programming interface used to enumerate local IP addresses is not highly
portable. On UNIX platforms, the ioctl function is typically used to enumerate network
interfaces and associated IP addresses. On the Windows platform, the WSAIoctl function
is used. On BSD UNIX platforms, the getifaddrs function can also be used to enumerate
local IP addresses.The best approach ...