1ARES_PARSE_SOA_REPLY(3) Library Functions Manual ARES_PARSE_SOA_REPLY(3)
2
3
4
6 ares_parse_soa_reply - Parse a reply to a DNS query of type SOA
7
9 #include <ares.h>
10
11 int ares_parse_soa_reply(const unsigned char* abuf, int alen,
12 struct ares_soa_reply** soa_out);
13
15 The ares_parse_soa_reply function parses the response to a query of
16 type SOA into a struct ares_soa_reply. The parameters abuf and alen
17 give the contents of the response. The result is stored in allocated
18 memory and a pointer to it stored into the variable pointed to by
19 soa_out. It is the caller's responsibility to free the resulting
20 soa_out structure when it is no longer needed using the function
21 ares_free_data(3).
22
23 The structure ares_soa_reply contains the following fields:
24
25 struct ares_soa_reply {
26 char *nsname;
27 char *hostmaster;
28 unsigned int serial;
29 unsigned int refresh;
30 unsigned int retry;
31 unsigned int expire;
32 unsigned int minttl;
33 };
34
36 ares_parse_soa_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
47 This function was first introduced in c-ares version 1.9.0.
48
50 ares_query(3) ares_free_data(3)
51
52
53
54 29 May 2012 ARES_PARSE_SOA_REPLY(3)