yuezonghe | 824eb0c | 2024-06-27 02:32:26 -0700 | [diff] [blame] | 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 int ares_set_servers_csv(ares_channel \fIchannel\fP, const char* \fIservers\fP) |
| 24 | .B int ares_set_servers_ports_csv(ares_channel \fIchannel\fP, const char* \fIservers\fP) |
| 25 | .fi |
| 26 | .SH DESCRIPTION |
| 27 | The \fBares_set_servers_csv\fP and \fBares_set_servers_ports_csv\fPfunctions set |
| 28 | the list of DNS servers that ARES will query. The format of the servers option is: |
| 29 | |
| 30 | host[:port][,host[:port]]... |
| 31 | |
| 32 | For example: |
| 33 | |
| 34 | 192.168.1.100,192.168.1.101,3.4.5.6 |
| 35 | .PP |
| 36 | The \fBares_set_servers_csv\fP function will ignore any port values specified in |
| 37 | the input string, whereare the \fBares_set_servers_ports_csv\fP function will |
| 38 | apply any specified port values as the UDP and TCP port to be used for that |
| 39 | particular nameserver. |
| 40 | |
| 41 | .SH RETURN VALUES |
| 42 | .B ares_set_servers_csv(3) |
| 43 | This function may return any of the following values: |
| 44 | .TP 15 |
| 45 | .B ARES_SUCCESS |
| 46 | The name servers configuration was successfully initialized. |
| 47 | .TP 15 |
| 48 | .B ARES_ENOMEM |
| 49 | The process's available memory was exhausted. |
| 50 | .TP 15 |
| 51 | .B ARES_ENODATA |
| 52 | The channel data identified by |
| 53 | .IR channel |
| 54 | was invalid. |
| 55 | .TP 15 |
| 56 | .B ARES_ENOTINITIALIZED |
| 57 | c-ares library initialization not yet performed. |
| 58 | .SH SEE ALSO |
| 59 | .BR ares_set_servers (3) |
| 60 | .SH AVAILABILITY |
| 61 | \fBares_set_servers_csv\fP was added in c-ares 1.7.2; |
| 62 | \fBares_set_servers_ports_csv\fP was added in c-ares 1.11.0. |
| 63 | .SH AUTHOR |
| 64 | Ben Greear |