quickjs-tart

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

ares_parse_aaaa_reply.3 (1649B)


      1 .\"
      2 .\" Copyright 2005 by Dominick Meglio.
      3 .\" SPDX-License-Identifier: MIT
      4 .\"
      5 .TH ARES_PARSE_AAAA_REPLY 3 "20 Nov 2009"
      6 .SH NAME
      7 ares_parse_aaaa_reply \- Parse a reply to a DNS query of type AAAA
      8 .SH SYNOPSIS
      9 .nf
     10 #include <ares.h>
     11 
     12 int ares_parse_aaaa_reply(const unsigned char *\fIabuf\fP, int \fIalen\fP,
     13                           struct hostent **\fIhost\fP,         
     14                           struct ares_addr6ttl *\fIaddrttls\fP, int *\fInaddrttls\fP);
     15 .fi
     16 .SH DESCRIPTION
     17 The
     18 .B ares_parse_aaaa_reply
     19 function parses the response to a query of type AAAA into a
     20 .BR "struct hostent"
     21 and/or an array of
     22 .BR "struct ares_addr6ttl" . 
     23 The parameters
     24 .I abuf
     25 and
     26 .I alen
     27 give the contents of the response.  The result is stored in allocated
     28 memory and a pointer to it stored into the variable pointed to by
     29 .IR host ,
     30 if host is nonnull.
     31 It is the caller's responsibility to free the resulting host structure
     32 using
     33 .BR ares_free_hostent (3)
     34 when it is no longer needed.
     35 .PP
     36 If
     37 .IR addrttls
     38 and
     39 .IR naddrttls
     40 are both nonnull,
     41 then up to *naddrttls
     42 .BR "struct ares_addr6ttl"
     43 records are stored in the array pointed to by addrttls,
     44 and then *naddrttls is set to the number of records so stored.
     45 Note that the memory for these records is supplied by the caller.
     46 .SH RETURN VALUES
     47 .B ares_parse_aaaa_reply
     48 can return any of the following values:
     49 .TP 15
     50 .B ARES_SUCCESS
     51 The response was successfully parsed.
     52 .TP 15
     53 .B ARES_EBADRESP
     54 The response was malformatted.
     55 .TP 15
     56 .B ARES_ENODATA
     57 The response did not contain an answer to the query.
     58 .TP 15
     59 .B ARES_ENOMEM
     60 Memory was exhausted.
     61 .SH SEE ALSO
     62 .BR ares_gethostbyname (3),
     63 .BR ares_free_hostent (3)