quickjs-tart

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

ares_save_options.3 (2026B)


      1 .\"
      2 .\" Copyright 1998 by the Massachusetts Institute of Technology.
      3 .\" SPDX-License-Identifier: MIT
      4 .\"
      5 .TH ARES_SAVE_OPTIONS 3 "5 March 2010"
      6 .SH NAME
      7 ares_save_options \- Save configuration values obtained from initialized ares_channel
      8 .SH SYNOPSIS
      9 .nf
     10 #include <ares.h>
     11 
     12 int ares_save_options(const ares_channel_t *\fIchannel\fP,
     13                       struct ares_options *\fIoptions\fP, int *\fIoptmask\fP)
     14 .fi
     15 .SH DESCRIPTION
     16 The \fBares_save_options(3)\fP function saves the channel data identified by
     17 .IR channel ,
     18 into the options struct identified by
     19 .IR options ,
     20 and saves the mask of options which are set to the integer
     21 pointer (passed by reference) identified by
     22 .IR optmask .
     23 
     24 The resultant options and optmask are then able to be
     25 passed directly to ares_init_options.  When the options
     26 are no longer needed, ares_destroy_options should be called
     27 to free any associated memory.
     28 .SH RETURN VALUES
     29 .B ares_save_options(3)
     30 can return any of the following values:
     31 .TP 15
     32 .B ARES_SUCCESS
     33 The channel data was successfully stored
     34 .TP 15
     35 .B ARES_ENOMEM
     36 The memory was exhausted
     37 .TP 15
     38 .B ARES_ENODATA
     39 The channel data identified by
     40 .IR channel
     41 were invalid.
     42 .SH NOTE
     43 Since c-ares 1.6.0 the ares_options struct has been "locked" meaning that it
     44 won't be extended to cover new functions. This function will remain
     45 functioning, but it can only return config data that can be represented in
     46 this config struct, which may no longer be the complete set of config
     47 options. \fBares_dup(3)\fP will not have that restriction.
     48 
     49 The ares_options struct can not handle potential IPv6 name servers the
     50 ares channel might be configured to use. The \fBares_save_options(3)\fP function
     51 will only return IPv4 servers, if any. In order to retrieve all name servers
     52 an ares channel might be using, the \fBares_get_servers(3)\fP function must be
     53 used instead.
     54 .SH SEE ALSO
     55 .BR ares_destroy_options (3),
     56 .BR ares_init_options (3),
     57 .BR ares_get_servers (3),
     58 .BR ares_dup (3)
     59 .SH AVAILABILITY
     60 ares_save_options(3) was added in c-ares 1.4.0