2 .\" Copyright 1998 by the Massachusetts Institute of Technology.
4 .\" Permission to use, copy, modify, and distribute this
5 .\" software and its documentation for any purpose and without
6 .\" fee is hereby granted, provided that the above copyright
7 .\" notice appear in all copies and that both that copyright
8 .\" notice and this permission notice appear in supporting
9 .\" documentation, and that the name of M.I.T. not be used in
10 .\" advertising or publicity pertaining to distribution of the
11 .\" software without specific, written prior permission.
12 .\" M.I.T. makes no representations about the suitability of
13 .\" this software for any purpose. It is provided "as is"
14 .\" without express or implied warranty.
16 .TH ARES_GETHOSTBYADDR 3 "24 July 1998"
18 ares_gethostbyaddr \- Initiate a host query by address
23 .B typedef void (*ares_host_callback)(void *\fIarg\fP, int \fIstatus\fP,
24 .B int \fItimeouts\fP, struct hostent *\fIhostent\fP)
26 .B void ares_gethostbyaddr(ares_channel \fIchannel\fP, const void *\fIaddr\fP,
27 .B int \fIaddrlen\fP, int \fIfamily\fP, ares_host_callback \fIcallback\fP,
33 function initiates a host query by address on the name service channel
40 give the address as a series of bytes, and
42 gives the type of address. When the query is complete or has failed, the ares
43 library will invoke \fIcallback\fP. Completion or failure of the query may
44 happen immediately, or may happen during a later call to
45 \fIares_process(3)\fP, \fIares_destroy(3)\fP or \fIares_cancel(3)\fP.
55 indicates whether the query succeeded and, if not, how it failed. It
56 may have any of the following values:
59 The host lookup completed successfully.
62 The ares library does not know how to look up addresses of type
74 The query was cancelled.
77 The name service channel
79 is being destroyed; the query will not be completed.
83 reports how many times a query timed out during the execution of the
86 On successful completion of the query, the callback argument
90 containing the name of the host returned by the query. The callback
91 need not and should not attempt to free the memory pointed to by
93 the ares library will free it when the callback returns. If the query
94 did not complete successfully,
100 .BR ares_gethostbyname (3)
102 Greg Hudson, MIT Information Systems
104 Copyright 1998 by the Massachusetts Institute of Technology.