Programming Tips - Linux: What function to use for DNS lookup

Date: 2019jan26 Update: 2026jun17 OS: Linux Language: C/C++ Q. Linux: What function to use for DNS lookup A. I used to use gethostbyname() But now there is getaddrinfo() More Info: https://www.google.com/search?q=getaddrinfo()