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

NAME

6       ares_parse_txt_reply - Parse a reply to a DNS query of type TXT
7

SYNOPSIS

9       #include <ares.h>
10
11       int ares_parse_txt_reply(const unsigned char* abuf, int alen,
12       struct ares_txt_reply **txt_out);
13

DESCRIPTION

15       The  ares_parse_txt_reply  function  parses  the response to a query of
16       type TXT into a linked list of  struct  ares_txt_reply  The  parameters
17       abuf  and alen give the contents of the response.  The result is stored
18       in allocated memory and a  pointer  to  it  stored  into  the  variable
19       pointed  to  by txt_out.  It is the caller's responsibility to free the
20       resulting txt_out structure when it is no longer needed using the func‐
21       tion ares_free_data
22
23       The structure ares_txt_reply contains the following fields:
24
25           struct ares_txt_reply {
26             struct ares_txt_reply  *next;
27             unsigned int  length;
28             unsigned char *txt;
29           };
30

RETURN VALUES

32       ares_parse_txt_reply can return any of the following values:
33
34       ARES_SUCCESS   The response was successfully parsed.
35
36       ARES_EBADRESP  The response was malformatted.
37
38       ARES_ENODATA   The response did not contain an answer to the query.
39
40       ARES_ENOMEM    Memory was exhausted.
41

AVAILABILITY

43       This function was first introduced in c-ares version 1.7.0.
44

SEE ALSO

46       ares_query(3) ares_free_data(3)
47

AUTHOR

49       Written by Jakub Hrozek <jhrozek@redhat.com>, on behalf of Red Hat, Inc
50       http://www.redhat.com
51
52
53
54
55                                27 October 2009        ARES_PARSE_TXT_REPLY(3)
Impressum