quickjs-tart

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

ares_parse_naptr_reply.3 (1683B)


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