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

NAME

6       ares_parse_naptr_reply - Parse a reply to a DNS query of type NAPTR
7

SYNOPSIS

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

DESCRIPTION

15       The  ares_parse_naptr_reply  function parses the response to a query of
16       type NAPTR into a linked list of struct ares_naptr_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 naptr_out.  It is the caller's responsibility to free the
20       resulting naptr_out structure when it is no  longer  needed  using  the
21       function ares_free_data(3).
22
23       The structure ares_naptr_reply contains the following fields:
24
25           struct ares_naptr_reply {
26               struct ares_naptr_reply *next;
27               unsigned char *flags;
28               unsigned char *service;
29               unsigned char *regexp;
30               char *replacement;
31               unsigned short order;
32               unsigned short preference;
33           };
34

RETURN VALUES

36       ares_parse_naptr_reply can return any of the following values:
37
38       ARES_SUCCESS   The response was successfully parsed.
39
40       ARES_EBADRESP  The response was malformatted.
41
42       ARES_ENODATA   The response did not contain an answer to the query.
43
44       ARES_ENOMEM    Memory was exhausted.
45

AVAILABILITY

47       This function was first introduced in c-ares version 1.7.6.
48

SEE ALSO

50       ares_query(3) ares_free_data(3)
51

AUTHOR

53       Written by Jakub Hrozek <jhrozek@redhat.com>, on behalf of Red Hat, Inc
54       http://www.redhat.com
55
56
57
58                               23 February 2012      ARES_PARSE_NAPTR_REPLY(3)
Impressum