summaryrefslogtreecommitdiff
path: root/ares_set_servers.3
diff options
context:
space:
mode:
authorYu Jiung <jiung.yu@samsung.com>2016-11-10 07:24:08 (GMT)
committerYu Jiung <jiung.yu@samsung.com>2016-11-10 07:25:02 (GMT)
commit8166b0204b6945a4fdb89bbae0b0b7168a7cf6e8 (patch)
tree81f0750d91aa467df3ee81cf30d22a65db2e6685 /ares_set_servers.3
parentccccebb78520ec3a26a18370936516b12ae5d53a (diff)
parent45e88a8337839e5fd88519bc55467053d521c9f6 (diff)
downloadc-ares-8166b0204b6945a4fdb89bbae0b0b7168a7cf6e8.zip
c-ares-8166b0204b6945a4fdb89bbae0b0b7168a7cf6e8.tar.gz
c-ares-8166b0204b6945a4fdb89bbae0b0b7168a7cf6e8.tar.bz2
Conflicts: packaging/c-ares.spec Change-Id: I1ec10e394aed3ef19ee21fefbe3aba7d7a615c74
Diffstat (limited to 'ares_set_servers.3')
-rw-r--r--ares_set_servers.330
1 files changed, 19 insertions, 11 deletions
diff --git a/ares_set_servers.3 b/ares_set_servers.3
index 6f25c29..a48c11c 100644
--- a/ares_set_servers.3
+++ b/ares_set_servers.3
@@ -15,12 +15,13 @@
.\"
.TH ARES_SET_SERVERS 3 "5 March 2010"
.SH NAME
-ares_set_servers \- Initialize an ares_channel name servers configuration
+ares_set_servers, ares_set_servers_ports \- Initialize an ares_channel name servers configuration
.SH SYNOPSIS
.nf
.B #include <ares.h>
.PP
.B int ares_set_servers(ares_channel \fIchannel\fP, struct ares_addr_node *\fIservers\fP)
+.B int ares_set_servers_ports(ares_channel \fIchannel\fP, struct ares_addr_port_node *\fIservers\fP)
.fi
.SH DESCRIPTION
The \fBares_set_servers(3)\fP function initializes name servers configuration
@@ -30,19 +31,25 @@ from a
.IR servers
pointer to a linked list of ares_addr_node structs holding name servers
address data.
-
+.PP
The name server linked list pointer argument may be the result of a previous
-call to \fBares_get_servers(3)\fP or a linked list of ares_addr_node structs
-setup by other means.
-
+call to \fBares_get_servers(3)\fP or a linked list of \fBares_addr_node\fP structs
+set up by other means.
+.PP
+The \fBares_set_servers(3)\fP function also allows the specification of UDP and
+TCP ports to be used for communication on a per-server basis. The provided
+linked list argument may be the result of a previous call to
+\fBares_get_servers_ports(3)\fP or a linked list of \fBares_addr_port_node\fP structs
+set up by other means.
+.PP
This function replaces any potentially previously configured name servers
with the ones given in the linked list. So, in order to configure a channel
-with more than one name server all the desired ones must be specified in a
+with more than one name server all the desired ones must be specified in a
single list.
-
-\fBares_set_servers(3)\fP does not take ownership of the linked list argument.
+.PP
+The function does not take ownership of the linked list argument.
The caller is responsible for freeing the linked list when no longer needed.
-
+.PP
This function is capable of handling IPv4 and IPv6 name server
addresses simultaneously, rendering \fBares_init_options(3)\fP with
optmask \fBARES_OPT_SERVERS\fP functionally obsolete except for
@@ -53,7 +60,7 @@ IPv4-only name server usage.
may return any of the following values:
.TP 15
.B ARES_SUCCESS
-The name servers configuration was successfuly initialized.
+The name servers configuration was successfully initialized.
.TP 15
.B ARES_ENOMEM
The process's available memory was exhausted.
@@ -71,7 +78,8 @@ c-ares library initialization not yet performed.
.BR ares_init_options (3),
.BR ares_dup(3)
.SH AVAILABILITY
-ares_set_servers(3) was added in c-ares 1.7.1
+\fBares_set_servers(3)\fP was added in c-ares 1.7.1;
+\fBares_set_servers_ports(3)\fP was added in c-ares 1.11.0.
.SH AUTHOR
Implementation of this function and associated library internals are based
on code, comments and feedback provided in November and December of 2008 by