1ARES_PARSE_A_REPLY(3)      Library Functions Manual      ARES_PARSE_A_REPLY(3)
2
3
4

NAME

6       ares_parse_a_reply - Parse a reply to a DNS query of type A into a hos‐
7       tent
8

SYNOPSIS

10       #include <ares.h>
11
12       int ares_parse_a_reply(const unsigned char *abuf, int alen,
13            struct hostent **host);
14

DESCRIPTION

16       The ares_parse_a_reply function parses the response to a query of  type
17       A  into  a  struct hostent.  The parameters abuf and alen give the con‐
18       tents of the response.  The result is stored in allocated memory and  a
19       pointer  to  it stored into the variable pointed to by host.  It is the
20       caller's responsibility to free  the  resulting  host  structure  using
21       ares_free_hostent(3) when it is no longer needed.
22

RETURN VALUES

24       ares_parse_a_reply can return any of the following values:
25
26       ARES_SUCCESS   The response was successfully parsed.
27
28       ARES_EBADRESP  The response was malformatted.
29
30       ARES_ENODATA   The response did not contain an answer to the query.
31
32       ARES_ENOMEM    Memory was exhausted.
33

SEE ALSO

35       ares_gethostbyname(3), ares_free_hostent(3)
36

AUTHOR

38       Greg Hudson, MIT Information Systems
39       Copyright 1998 by the Massachusetts Institute of Technology.
40
41
42
43                                 25 July 1998            ARES_PARSE_A_REPLY(3)
Impressum