[cs631apue] The good function to get all the ip address of the host

Jan Schaumann jschauma at stevens.edu
Sun Nov 23 19:53:54 EST 2014


"xxu15 at stevens.edu" <xxu15 at stevens.edu> wrote:

> I found that gethostent(3) depends on configuration, which is not ideal.
> Have you guys found a good system call to get all the ip address of the host? 

As the manual page for gethostent(3) suggests, use getaddrinfo(3).

-Jan


More information about the cs631apue mailing list