title: How does getaddrinfo() do DNS lookup?
body: <p>getaddrinfo() is a function we need to use <i>before</i> creating a socket() or connect()ing, right? Then how does getaddrinfo communicate with DNS server in the first place? </p>
  
  <p>PS: Where can I see the complete source of getaddrinfo?</p>