Copyright 1998 by the Massachusetts Institute of Technology.
Permission to use, copy, modify, and distribute this
software and its documentation for any purpose and without
fee is hereby granted, provided that the above copyright
notice appear in all copies and that both that copyright
notice and this permission notice appear in supporting
documentation, and that the name of M.I.T. not be used in
advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
M.I.T. makes no representations about the suitability of
this software for any purpose. It is provided "as is"
without express or implied warranty.
#include <ares.h> int ares_gethostbyname_file(ares_channel channel, const char *name, int family, struct hostent **host)
The return value indicates whether the query succeeded and, if not, how it failed. It may have any of the following values:
19 ARES_SUCCESS The host lookup completed successfully and host now points to the result (and must be freed with ares_free_hostent(3)).
19 ARES_ENOTFOUND The hostname name was not found.
19 ARES_EFILE There was a file I/O error while performing the lookup.
19 ARES_ENOMEM Memory was exhausted.
On successful completion of the query, the pointer pointed to by host points to a struct hostent containing the address of the host returned by the lookup. The user must free the memory pointed to by host when finished with it by calling ares_free_hostent(3). If the lookup did not complete successfully, host will be NULL .
Copyright 1998 by the Massachusetts Institute of Technology.