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