quickjs-tart

quickjs-based runtime for wallet-core logic
Log | Files | Refs | README | LICENSE

ares_parse_soa_reply.3 (1584B)


      1 .\"
      2 .\" Copyright 1998 by the Massachusetts Institute of Technology.
      3 .\" SPDX-License-Identifier: MIT
      4 .\"
      5 .TH ARES_PARSE_SOA_REPLY 3 "29 May 2012"
      6 .SH NAME
      7 ares_parse_soa_reply \- Parse a reply to a DNS query of type SOA
      8 .SH SYNOPSIS
      9 .nf
     10 #include <ares.h>
     11 
     12 int ares_parse_soa_reply(const unsigned char* \fIabuf\fP, int \fIalen\fP,
     13                          struct ares_soa_reply** \fIsoa_out\fP);
     14 .fi
     15 .SH DESCRIPTION
     16 The
     17 .B ares_parse_soa_reply
     18 function parses the response to a query of type SOA into a
     19 .IR struct\ ares_soa_reply .
     20 The parameters
     21 .I abuf
     22 and
     23 .I alen
     24 give the contents of the response.  The result is stored in allocated
     25 memory and a pointer to it stored into the variable pointed to by
     26 .IR soa_out .
     27 It is the caller's responsibility to free the resulting
     28 .IR soa_out
     29 structure when it is no longer needed using the function
     30 \fBares_free_data(3)\fP.
     31 .PP
     32 The structure 
     33 .I ares_soa_reply
     34 contains the following fields:
     35 .sp
     36 .in +4n
     37 .nf
     38 struct ares_soa_reply {
     39 	char *nsname;
     40 	char *hostmaster;
     41 	unsigned int serial;
     42 	unsigned int refresh;
     43 	unsigned int retry;
     44 	unsigned int expire;
     45 	unsigned int minttl;
     46 };
     47 .fi
     48 .in
     49 .PP
     50 .SH RETURN VALUES
     51 .B ares_parse_soa_reply
     52 can return any of the following values:
     53 .TP 15
     54 .B ARES_SUCCESS
     55 The response was successfully parsed.
     56 .TP 15
     57 .B ARES_EBADRESP
     58 The response was malformatted.
     59 .TP 15
     60 .B ARES_ENODATA
     61 The response did not contain an answer to the query.
     62 .TP 15
     63 .B ARES_ENOMEM
     64 Memory was exhausted.
     65 .SH AVAILABILITY
     66 This function was first introduced in c-ares version 1.9.0.
     67 .SH SEE ALSO
     68 .BR ares_query (3)
     69 .BR ares_free_data (3)