1 .\" $Id: ares_parse_a_reply.3,v 1.1 1998/08/13 18:07:33 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_PARSE_A_REPLY 3 "25 July 1998"
19 ares_parse_a_reply \- Parse a reply to a DNS query of type A into a hostent
25 int ares_parse_a_reply(const unsigned char *\fIabuf\fB, int \fIalen\fB,
26 .B struct hostent **\fIhost\fB);
31 function parses the response to a query of type A into a
32 .BR "struct hostent" .
37 give the contents of the response. The result is stored in allocated
38 memory and a pointer to it stored into the variable pointed to by
40 It is the caller's responsibility to free the resulting host structure
42 .BR ares_free_hostent (3)
43 when it is no longer needed.
46 can return any of the following values:
49 The response was successfully parsed.
52 The response was malformatted.
55 The response did not contain an answer to the query.
60 .BR ares_gethostbyname (3),
61 .BR ares_free_hostent (3)
63 Greg Hudson, MIT Information Systems
65 Copyright 1998 by the Massachusetts Institute of Technology.