I think there is no way to enumerate each network interface on my system and their assigned IP address using just sockets. Is this correct?
I mean, in Linux this cou
Use gethostname() to retreive the machine's local DNS name, and then pass that name to gethostbyname() to get its local IP addresses.
gethostname()
gethostbyname()
If the OS supports IPv6, then look at the getaddrinfo() function instead of gethostbyname().
getaddrinfo()