1ARES_SAVE_OPTIONS(3)       Library Functions Manual       ARES_SAVE_OPTIONS(3)
2
3
4

NAME

6       ares_save_options - Save configuration values obtained from initialized
7       ares_channel
8

SYNOPSIS

10       #include <ares.h>
11
12       int ares_save_options(ares_channel channel, struct ares_options *options, int *optmask)
13

DESCRIPTION

15       The ares_save_options(3) function saves the channel data identified  by
16       channel,  into  the options struct identified by options, and saves the
17       mask of options which are set to the integer pointer (passed by  refer‐
18       ence) identified by optmask.
19
20       The  resultant  options and optmask are then able to be passed directly
21       to  ares_init_options.   When  the  options  are  no   longer   needed,
22       ares_destroy_options should be called to free any associated memory.
23

RETURN VALUES

25       ares_save_options(3) can return any of the following values:
26
27       ARES_SUCCESS   The channel data was successfuly stored
28
29       ARES_ENOMEM    The memory was exhausted
30
31       ARES_ENODATA   The channel data identified by channel were invalid.
32

NOTE

34       Since  c-ares  1.6.0  the ares_options struct has been "locked" meaning
35       that it won't be extended to cover new functions.  This  function  will
36       remain functioning, but it can only return config data that can be rep‐
37       resented in this config struct, which may no longer be the complete set
38       of config options. ares_dup(3) will not have that restriction.
39
40       The  ares_options struct can not handle potential IPv6 name servers the
41       ares_channel might be configured to use. The ares_save_options(3) func‐
42       tion  will  only  return IPv4 servers, if any. In order to retrieve all
43       name servers an ares_channel might be  using,  the  ares_get_servers(3)
44       function must be used instead.
45

SEE ALSO

47       ares_destroy_options(3),   ares_init_options(3),   ares_get_servers(3),
48       ares_dup(3)
49

AVAILABILITY

51       ares_save_options(3) was added in c-ares 1.4.0
52

AUTHOR

54       Brad House
55       Copyright 1998 by the Massachusetts Institute of Technology.
56
57
58
59                                 5 March 2010             ARES_SAVE_OPTIONS(3)
Impressum