2 .\" Copyright 1998 by the Massachusetts Institute of Technology.
4 .\" Permission to use, copy, modify, and distribute this
5 .\" software and its documentation for any purpose and without
6 .\" fee is hereby granted, provided that the above copyright
7 .\" notice appear in all copies and that both that copyright
8 .\" notice and this permission notice appear in supporting
9 .\" documentation, and that the name of M.I.T. not be used in
10 .\" advertising or publicity pertaining to distribution of the
11 .\" software without specific, written prior permission.
12 .\" M.I.T. makes no representations about the suitability of
13 .\" this software for any purpose. It is provided "as is"
14 .\" without express or implied warranty.
16 .TH ARES_SAVE_OPTIONS 3 "5 March 2010"
18 ares_save_options \- Save configuration values obtained from initialized ares_channel
23 .B int ares_save_options(ares_channel \fIchannel\fP, struct ares_options *\fIoptions\fP, int *\fIoptmask\fP)
26 The \fBares_save_options(3)\fP function saves the channel data identified by
28 into the options struct identified by
30 and saves the mask of options which are set to the integer
31 pointer (passed by reference) identified by
34 The resultant options and optmask are then able to be
35 passed directly to ares_init_options. When the options
36 are no longer needed, ares_destroy_options should be called
37 to free any associated memory.
39 .B ares_save_options(3)
40 can return any of the following values:
43 The channel data was successfuly stored
46 The memory was exhausted
49 The channel data identified by
53 Since c-ares 1.6.0 the ares_options struct has been "locked" meaning that it
54 won't be extended to cover new functions. This function will remain
55 functioning, but it can only return config data that can be represented in
56 this config struct, which may no longer be the complete set of config
57 options. \fBares_dup(3)\fP will not have that restriction.
59 The ares_options struct can not handle potential IPv6 name servers the
60 ares_channel might be configured to use. The \fBares_save_options(3)\fP function
61 will only return IPv4 servers, if any. In order to retrieve all name servers
62 an ares_channel might be using, the \fBares_get_servers(3)\fP function must be
65 .BR ares_destroy_options (3),
66 .BR ares_init_options (3),
67 .BR ares_get_servers (3),
70 ares_save_options(3) was added in c-ares 1.4.0
74 Copyright 1998 by the Massachusetts Institute of Technology.