getaddrinfo sucks. everything else is much worse
DNS is one of the critical building blocks of the internet and of the modern web.
For the longest time the only way for Firefox to resolve a DNS domain was by using getaddrinfo.
What's remarkable about this function is that it's implemented on Linux, Windows, MacOS - even Android. It has the same signature, and works in roughly the same way, even though the implementation in these operating systems doesn't share the same code base.
getaddrinfo was brought into the IETF in RFC 2133 - Basic Socket...
Read more at valentin.gosu.se