1 .\" $Id: ares_gethostbyaddr.3,v 1.1 1998/08/13 18:07:30 ghudson Exp $
3 .\" Copyright 1998 by the Massachusetts Institute of Technology.
5 .\" Permission to use, copy, modify, and distribute this
6 .\" software and its documentation for any purpose and without
7 .\" fee is hereby granted, provided that the above copyright
8 .\" notice appear in all copies and that both that copyright
9 .\" notice and this permission notice appear in supporting
10 .\" documentation, and that the name of M.I.T. not be used in
11 .\" advertising or publicity pertaining to distribution of the
12 .\" software without specific, written prior permission.
13 .\" M.I.T. makes no representations about the suitability of
14 .\" this software for any purpose. It is provided "as is"
15 .\" without express or implied warranty.
17 .TH ARES_GETHOSTBYADDR 3 "24 July 1998"
19 ares_gethostbyaddr \- Initiate a host query by address
24 .B typedef void (*ares_host_callback)(void *\fIarg\fP, int \fIstatus\fP,
25 .B struct hostent *\fIhostent\fP)
27 .B void ares_gethostbyaddr(ares_channel \fIchannel\fP, const void *\fIaddr\fP,
28 .B int \fIaddrlen\fP, int \fIfamily\fP, ares_host_callback \fIcallback\fP,
34 function initiates a host query by address on the name service channel
41 give the address as a series of bytes, and
43 gives the type of address. When the query is complete or has failed,
44 the ares library will invoke
46 Completion or failure of the query may happen immediately, or may
47 happen during a later call to
60 indicates whether the query succeeded and, if not, how it failed. It
61 may have any of the following values:
64 The host lookup completed successfully.
67 The ares library does not know how to look up addresses of type
79 The name service channel
81 is being destroyed; the query will not be completed.
83 On successful completion of the query, the callback argument
87 containing the name of the host returned by the query. The callback
88 need not and should not attempt to free the memory pointed to by
90 the ares library will free it when the callback returns. If the query
91 did not complete successfully,
98 Greg Hudson, MIT Information Systems
100 Copyright 1998 by the Massachusetts Institute of Technology.