summaryrefslogtreecommitdiff
path: root/src/lib/libc/net/resolver.3
diff options
context:
space:
mode:
authoraaron <>2000-12-24 00:31:00 +0000
committeraaron <>2000-12-24 00:31:00 +0000
commitb11608439e707f8c7601b090028e530ea5a1e067 (patch)
tree966934b4f9368fd14deca5be22b83ff9fb439cbd /src/lib/libc/net/resolver.3
parent71213d0b131a3545184a31aa671f269eceacad1e (diff)
downloadopenbsd-b11608439e707f8c7601b090028e530ea5a1e067.tar.gz
openbsd-b11608439e707f8c7601b090028e530ea5a1e067.tar.bz2
openbsd-b11608439e707f8c7601b090028e530ea5a1e067.zip
Various repairs, mostly to get rid of short lines.
Diffstat (limited to 'src/lib/libc/net/resolver.3')
-rw-r--r--src/lib/libc/net/resolver.343
1 files changed, 15 insertions, 28 deletions
diff --git a/src/lib/libc/net/resolver.3 b/src/lib/libc/net/resolver.3
index 9b2471d823..a5f956f90d 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.13 2000/01/03 11:51:08 itojun Exp $ 1.\" $OpenBSD: resolver.3,v 1.14 2000/12/24 00:30:57 aaron 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.
@@ -108,8 +108,7 @@ Global configuration and state information that is used by the
108resolver routines is kept in the structure 108resolver routines is kept in the structure
109.Li _res . 109.Li _res .
110Most of the values have reasonable defaults and can be ignored. 110Most of the values have reasonable defaults and can be ignored.
111Options 111Options stored in
112stored in
113.Li _res.options 112.Li _res.options
114are defined in 113are defined in
115.Aq Pa resolv.h 114.Aq Pa resolv.h
@@ -142,8 +141,7 @@ Used with
142.Dv RES_USEVC 141.Dv RES_USEVC
143to keep the 142to keep the
144.Tn TCP 143.Tn TCP
145connection open between 144connection open between queries.
146queries.
147This is useful only in programs that regularly do many queries. 145This is useful only in programs that regularly do many queries.
148.Tn UDP 146.Tn UDP
149should be the normal mode used. 147should be the normal mode used.
@@ -180,12 +178,10 @@ The option is not meaningful on
180.Pp 178.Pp
181The 179The
182.Fn res_init 180.Fn res_init
183routine 181routine reads the configuration file (if any; see
184reads the configuration file (if any; see
185.Xr resolv.conf 5 ) 182.Xr resolv.conf 5 )
186to get the default domain name, 183to get the default domain name, search list, and the Internet address
187search list and 184of the local name server(s).
188the Internet address of the local name server(s).
189If no server is configured, the host running 185If no server is configured, the host running
190the resolver is tried. 186the resolver is tried.
191The current domain name is defined by the hostname 187The current domain name is defined by the hostname
@@ -235,8 +231,7 @@ The
235.Fn res_search 231.Fn res_search
236routine makes a query and awaits a response like 232routine makes a query and awaits a response like
237.Fn res_query , 233.Fn res_query ,
238but in addition, it implements the default and search rules 234but in addition, it implements the default and search rules controlled by the
239controlled by the
240.Dv RES_DEFNAMES 235.Dv RES_DEFNAMES
241and 236and
242.Dv RES_DNSRCH 237.Dv RES_DNSRCH
@@ -247,11 +242,9 @@ The remaining routines are lower-level routines used by
247.Fn res_query . 242.Fn res_query .
248The 243The
249.Fn res_mkquery 244.Fn res_mkquery
250function 245function constructs a standard query message and places it in
251constructs a standard query message and places it in
252.Fa buf . 246.Fa buf .
253It returns the size of the query, or \-1 if the query is 247It returns the size of the query, or \-1 if the query is larger than
254larger than
255.Fa buflen . 248.Fa buflen .
256The query type 249The query type
257.Fa op 250.Fa op
@@ -266,21 +259,18 @@ is currently unused but is intended for making update messages.
266.Pp 259.Pp
267The 260The
268.Fn res_send 261.Fn res_send
269routine 262routine sends a pre-formatted query and returns an answer.
270sends a pre-formatted query and returns an answer.
271It will call 263It will call
272.Fn res_init 264.Fn res_init
273if 265if
274.Dv RES_INIT 266.Dv RES_INIT
275is not set, send the query to the local name server, and 267is not set, send the query to the local name server, and
276handle timeouts and retries. 268handle timeouts and retries.
277The length of the reply message is returned, or 269The length of the reply message is returned, or \-1 if there were errors.
278\-1 if there were errors.
279.Pp 270.Pp
280The 271The
281.Fn dn_comp 272.Fn dn_comp
282function 273function compresses the domain name
283compresses the domain name
284.Fa exp_dn 274.Fa exp_dn
285and stores it in 275and stores it in
286.Fa comp_dn . 276.Fa comp_dn .
@@ -289,8 +279,7 @@ The size of the array pointed to by
289.Fa comp_dn 279.Fa comp_dn
290is given by 280is given by
291.Fa length . 281.Fa length .
292The compression uses 282The compression uses an array of pointers
293an array of pointers
294.Fa dnptrs 283.Fa dnptrs
295to previously compressed names in the current message. 284to previously compressed names in the current message.
296The first pointer points 285The first pointer points
@@ -300,8 +289,7 @@ The limit to the array is specified by
300.Fa lastdnptr . 289.Fa lastdnptr .
301A side effect of 290A side effect of
302.Fn dn_comp 291.Fn dn_comp
303is to update the list of pointers for 292is to update the list of pointers for labels inserted into the message
304labels inserted into the message
305as the name is compressed. 293as the name is compressed.
306If 294If
307.Em dnptr 295.Em dnptr
@@ -316,8 +304,7 @@ the list of labels is not updated.
316.Pp 304.Pp
317The 305The
318.Fn dn_expand 306.Fn dn_expand
319entry 307entry expands the compressed domain name
320expands the compressed domain name
321.Fa comp_dn 308.Fa comp_dn
322to a full domain name 309to a full domain name
323The compressed name is contained in a query or reply message; 310The compressed name is contained in a query or reply message;