summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjmc <>2012-11-29 21:37:13 +0000
committerjmc <>2012-11-29 21:37:13 +0000
commit0e46258b9990cfb456367b54a1dc872870086bd3 (patch)
treed95fbed6b6f0d3692659e7b989110cce2d5f88e5
parent02b81b29f81045ee6d53dbbdf9ce83b05a9811cb (diff)
downloadopenbsd-0e46258b9990cfb456367b54a1dc872870086bd3.tar.gz
openbsd-0e46258b9990cfb456367b54a1dc872870086bd3.tar.bz2
openbsd-0e46258b9990cfb456367b54a1dc872870086bd3.zip
- put the various options into the same order as those in resolv.h
- sync RES_DEBUG with resolv.conf.5 - document RES_PRIMARY, but mark it unsupported (like we already do for RES_AAAONLY) - use the exact same text (about being enabled by default) for RES_RECURSE as for the other two defaults - document RES_INSECURE{1,2} - description lifted from resolv.conf.5 - document RES_NOALIASES - mostly sync the RES_USE_EDNS0 text with resolv.conf.5 - RES_USE_DNSSEC not documented for now. something to come... ok sthen
-rw-r--r--src/lib/libc/net/resolver.355
1 files changed, 38 insertions, 17 deletions
diff --git a/src/lib/libc/net/resolver.3 b/src/lib/libc/net/resolver.3
index 1982d1c8b1..97b7a2d8cc 100644
--- a/src/lib/libc/net/resolver.3
+++ b/src/lib/libc/net/resolver.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: resolver.3,v 1.25 2012/11/19 16:39:30 jmc Exp $ 1.\" $OpenBSD: resolver.3,v 1.26 2012/11/29 21:37:13 jmc Exp $
2.\" 2.\"
3.\" Copyright (c) 1985, 1991, 1993 3.\" Copyright (c) 1985, 1991, 1993
4.\" The Regents of the University of California. All rights reserved. 4.\" The Regents of the University of California. All rights reserved.
@@ -27,7 +27,7 @@
27.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28.\" SUCH DAMAGE. 28.\" SUCH DAMAGE.
29.\" 29.\"
30.Dd $Mdocdate: November 19 2012 $ 30.Dd $Mdocdate: November 29 2012 $
31.Dt RESOLVER 3 31.Dt RESOLVER 3
32.Os 32.Os
33.Sh NAME 33.Sh NAME
@@ -112,14 +112,19 @@ are defined in
112and are as follows. 112and are as follows.
113Options are stored as a simple bit mask containing the bitwise OR 113Options are stored as a simple bit mask containing the bitwise OR
114of the options enabled. 114of the options enabled.
115.Bl -tag -width RES_USE_INET6 115.Bl -tag -width RES_USE_DNSSEC
116.It Dv RES_INIT 116.It Dv RES_INIT
117True if the initial name server address and default domain name are 117True if the initial name server address and default domain name are
118initialized (i.e.\& 118initialized (i.e.\&
119.Fn res_init 119.Fn res_init
120has been called). 120has been called).
121.It Dv RES_DEBUG 121.It Dv RES_DEBUG
122Print debugging messages. 122Print debugging messages,
123if libc is compiled with
124.Dv DEBUG .
125By default on
126.Ox
127this option does nothing.
123.It Dv RES_AAONLY 128.It Dv RES_AAONLY
124Accept authoritative answers only. 129Accept authoritative answers only.
125With this option, 130With this option,
@@ -128,26 +133,29 @@ should continue until it finds an authoritative answer or finds an error.
128Currently this is not implemented. 133Currently this is not implemented.
129.It Dv RES_USEVC 134.It Dv RES_USEVC
130Use TCP connections for queries instead of UDP datagrams. 135Use TCP connections for queries instead of UDP datagrams.
131.It Dv RES_STAYOPEN 136.It Dv RES_PRIMARY
132Used with 137Query the primary name server only.
133.Dv RES_USEVC 138Currently this is not implemented.
134to keep the TCP connection open between queries.
135This is useful only in programs that regularly do many queries.
136UDP should be the normal mode used.
137.It Dv RES_IGNTC 139.It Dv RES_IGNTC
138Ignore truncation errors, i.e. don't retry with TCP. 140Ignore truncation errors, i.e. don't retry with TCP.
139.It Dv RES_RECURSE 141.It Dv RES_RECURSE
140Set the recursion-desired bit in queries. 142Set the recursion-desired bit in queries.
141This is the default.
142.Pf ( Fn res_send 143.Pf ( Fn res_send
143does not do iterative queries and expects the name server 144does not do iterative queries and expects the name server
144to handle recursion.) 145to handle recursion.)
146This option is enabled by default.
145.It Dv RES_DEFNAMES 147.It Dv RES_DEFNAMES
146If set, 148If set,
147.Fn res_search 149.Fn res_search
148will append the default domain name to single-component names 150will append the default domain name to single-component names
149(those that do not contain a dot). 151(those that do not contain a dot).
150This option is enabled by default. 152This option is enabled by default.
153.It Dv RES_STAYOPEN
154Used with
155.Dv RES_USEVC
156to keep the TCP connection open between queries.
157This is useful only in programs that regularly do many queries.
158UDP should be the normal mode used.
151.It Dv RES_DNSRCH 159.It Dv RES_DNSRCH
152If this option is set, 160If this option is set,
153.Fn res_search 161.Fn res_search
@@ -156,6 +164,19 @@ will search for host names in the current domain and in parent domains; see
156This is used by the standard host lookup routine 164This is used by the standard host lookup routine
157.Xr gethostbyname 3 . 165.Xr gethostbyname 3 .
158This option is enabled by default. 166This option is enabled by default.
167.It Dv RES_INSECURE_1
168Do not require the IP source address on the reply packet
169to be equal to the server's address.
170.It Dv RES_INSECURE_2
171Do not check if the query section of the reply packet
172is equal to that of the query packet.
173.It Dv RES_NOALIASES
174Turn off the
175.Ev HOSTALIASES
176feature.
177See
178.Xr hostname 7
179for more information.
159.It Dv RES_USE_INET6 180.It Dv RES_USE_INET6
160Enables support for IPv6-only applications. 181Enables support for IPv6-only applications.
161This causes IPv4 addresses to be returned as an IPv4 mapped address. 182This causes IPv4 addresses to be returned as an IPv4 mapped address.
@@ -163,12 +184,12 @@ For example, 10.1.1.1 will be returned as ::ffff:10.1.1.1.
163The option is not meaningful on 184The option is not meaningful on
164.Ox . 185.Ox .
165.It Dv RES_USE_EDNS0 186.It Dv RES_USE_EDNS0
166Enables support for OPT pseudo-RR for EDNS0 extension. 187Attach an OPT pseudo-RR for the EDNS0 extension,
167With this option, resolver code will attach OPT pseudo-RR into DNS queries, 188as specified in RFC 2671.
168to inform of our receive buffer size. 189This informs DNS servers of a client's receive buffer size,
169The option will allow DNS servers to take advantage of non-default receive 190allowing them to take advantage of a non-default receive buffer size,
170buffer size, and to send larger replies. 191and thus to send larger replies.
171DNS query packets with EDNS0 extension is not compatible with 192DNS query packets with the EDNS0 extension are not compatible with
172non-EDNS0 DNS servers. 193non-EDNS0 DNS servers.
173.El 194.El
174.Pp 195.Pp