1 .\" $Id: ares_parse_ptr_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_PTR_REPLY 3 "25 July 1998"
19 ares_parse_ptr_reply \- Parse a reply to a DNS query of type PTR into a hostent
25 int ares_parse_ptr_reply(const unsigned char *\fIabuf\fB, int \fIalen\fB,
27 const void *\fIaddr\fP, int \fIaddrlen\fP, int \fIfamily\fP,
28 .B struct hostent **\fIhost\fB);
32 .B ares_parse_ptr_reply
33 function parses the response to a query of type PTR into a
34 .BR "struct hostent" .
39 give the contents of the response. The parameters
44 specify which address was queried for; they are not used to verify the
45 response, merely used to fill in the address of the
46 .BR "struct hostent" .
49 is stored in allocated memory and a pointer to it stored into the
50 variable pointed to by
52 It is the caller's responsibility to free the resulting host structure
54 .BR ares_free_hostent (3)
55 when it is no longer needed.
57 .B ares_parse_ptr_reply
58 can return any of the following values:
61 The response was successfully parsed.
64 The response was malformatted.
67 The response did not contain an answer to the query.
72 .BR ares_gethostbyaddr (3),
73 .BR ares_free_hostent (3)
75 Greg Hudson, MIT Information Systems
77 Copyright 1998 by the Massachusetts Institute of Technology.