>>660
こんな感じじゃないの?
char buf[1024];
struct addrinfo *res = NULL;
if (getaddrinfo("localhost", "ftp", NULL, &res) == 0)
{
 while (res)
 {
  char* p = inet_ntop(res->ai_addr->af_family, res->ai_addr, buf, sizeof(buf));
  printf("%s\n", buf);
  res = res->ai_next;
 }
 freeaddrinfo(res);
}