2 .\" Copyright 1998 by the Massachusetts Institute of Technology.
4 .\" Permission to use, copy, modify, and distribute this
5 .\" software and its documentation for any purpose and without
6 .\" fee is hereby granted, provided that the above copyright
7 .\" notice appear in all copies and that both that copyright
8 .\" notice and this permission notice appear in supporting
9 .\" documentation, and that the name of M.I.T. not be used in
10 .\" advertising or publicity pertaining to distribution of the
11 .\" software without specific, written prior permission.
12 .\" M.I.T. makes no representations about the suitability of
13 .\" this software for any purpose. It is provided "as is"
14 .\" without express or implied warranty.
16 .TH ARES_PARSE_NAPTR_REPLY 3 "23 February 2012"
18 ares_parse_naptr_reply \- Parse a reply to a DNS query of type NAPTR
23 .B int ares_parse_naptr_reply(const unsigned char* \fIabuf\fP, int \fIalen\fP,
24 .B struct ares_naptr_reply** \fInaptr_out\fP);
28 .B ares_parse_naptr_reply
29 function parses the response to a query of type NAPTR into a
31 .I struct ares_naptr_reply
36 give the contents of the response. The result is stored in allocated
37 memory and a pointer to it stored into the variable pointed to by
39 It is the caller's responsibility to free the resulting
41 structure when it is no longer needed using the function
46 contains the following fields:
50 struct ares_naptr_reply {
51 struct ares_naptr_reply *next;
53 unsigned char *service;
54 unsigned char *regexp;
57 unsigned short preference;
63 .B ares_parse_naptr_reply
64 can return any of the following values:
67 The response was successfully parsed.
70 The response was malformatted.
73 The response did not contain an answer to the query.
78 This function was first introduced in c-ares version 1.7.6.
81 .BR ares_free_data (3)
83 Written by Jakub Hrozek <jhrozek@redhat.com>, on behalf of Red Hat, Inc http://www.redhat.com