library init: be recursive
[platform/upstream/c-ares.git] / ares_init.3
index e240651..fb25306 100644 (file)
@@ -1,4 +1,3 @@
-.\" $Id$
 .\"
 .\" Copyright 1998 by the Massachusetts Institute of Technology.
 .\" Copyright (C) 2004-2010 by Daniel Stenberg
@@ -95,9 +94,9 @@ service port.
 .br
 The list of IPv4 servers to contact, instead of the servers specified in
 resolv.conf or the local named. In order to allow specification of either
-IPv4 or IPv6 name servers, function
+IPv4 or IPv6 name servers, the
 .BR ares_set_servers(3)
-must be used instead.
+function must be used instead.
 .TP 18
 .B ARES_OPT_DOMAINS
 .B char **\fIdomains\fP;
@@ -110,7 +109,7 @@ or the domain derived from the kernel hostname variable.
 .B ARES_OPT_LOOKUPS
 .B char *\fIlookups\fP;
 .br
-The lookups to perform for host queries.  
+The lookups to perform for host queries.
 .I lookups
 should be set to a string of the characters "b" or "f", where "b"
 indicates a DNS lookup and "f" indicates a lookup in the hosts file.
@@ -190,6 +189,27 @@ The process's available memory was exhausted.
 .TP 14
 .B ARES_ENOTINITIALIZED
 c-ares library initialization not yet performed.
+.SH NOTES
+When initializing from
+.B /etc/resolv.conf,
+.BR ares_init (3)
+reads the
+.I domain
+and
+.I search
+directives to allow lookups of short names relative to the domains
+specified. The
+.I domain
+and
+.I search
+directives override one another. If more that one instance of either
+.I domain
+or
+.I search
+directives is specified, the last occurence wins. For more information,
+please see the
+.BR resolv.conf (5)
+manual page.
 .SH SEE ALSO
 .BR ares_destroy(3),
 .BR ares_dup(3),