Upgrade to 1.21.0
[platform/upstream/c-ares.git] / docs / ares_set_servers_csv.3
1 .\"
2 .\" Copyright 2010 by Ben Greear <greearb@candelatech.com>
3 .\"
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.
15 .\"
16 .\" SPDX-License-Identifier: MIT
17 .\"
18 .TH ARES_SET_SERVERS_CSV 3 "30 June 2010"
19 .SH NAME
20 ares_set_servers_csv, ares_set_servers_ports_csv \- Set list of DNS servers to be used.
21 .SH SYNOPSIS
22 .nf
23
24 #include <ares.h>
25
26 int ares_set_servers_csv(ares_channel \fIchannel\fP, const char* \fIservers\fP)
27
28 int ares_set_servers_ports_csv(ares_channel \fIchannel\fP, const char* \fIservers\fP)
29 .fi
30 .SH DESCRIPTION
31 The \fBares_set_servers_csv\fP and \fBares_set_servers_ports_csv\fPfunctions set
32 the list of DNS servers that ARES will query.  The format of the servers option is:
33
34 host[:port][,host[:port]]...
35
36 For example:
37
38 192.168.1.100,192.168.1.101,3.4.5.6
39
40 .SH SEE ALSO
41 .BR ares_set_servers (3)
42 .SH NOTES
43 The port option is currently ignored by c-ares internals
44 and the standard port is always used.
45
46 This function was added in c-ares 1.7.2
47 .PP
48 The \fBares_set_servers_csv\fP function will ignore any port values specified in
49 the input string, whereare the \fBares_set_servers_ports_csv\fP function will
50 apply any specified port values as the UDP and TCP port to be used for that
51 particular nameserver.
52
53 .SH RETURN VALUES
54 .B ares_set_servers_csv(3)
55 This function may return any of the following values:
56 .TP 15
57 .B ARES_SUCCESS
58 The name servers configuration was successfully initialized.
59 .TP 15
60 .B ARES_ENOMEM
61 The process's available memory was exhausted.
62 .TP 15
63 .B ARES_ENODATA
64 The channel data identified by
65 .IR channel
66 was invalid.
67 .TP 15
68 .B ARES_ENOTINITIALIZED
69 c-ares library initialization not yet performed.
70 .TP 15
71 .B ARES_ENOTIMP
72 Changing name servers configuration while queries are outstanding is not implemented.
73 .SH SEE ALSO
74 .BR ares_set_servers (3)
75 .SH AVAILABILITY
76 \fBares_set_servers_csv\fP was added in c-ares 1.7.2;
77 \fBares_set_servers_ports_csv\fP was added in c-ares 1.11.0.
78 .SH AUTHOR
79 Ben Greear