summaryrefslogtreecommitdiff
path: root/usr.sbin/named/man
diff options
context:
space:
mode:
authordm <dm@cvs.openbsd.org>1996-02-19 19:54:44 +0000
committerdm <dm@cvs.openbsd.org>1996-02-19 19:54:44 +0000
commit34dfcd3c571a64de57872aa758d1b228d7b22a02 (patch)
tree22b14dd50dff4fc41ec5c5f2ee3e20f4b7f1d141 /usr.sbin/named/man
parentd134390523f594c4e7f1b453b8026b993a1aeebb (diff)
netbsd: bind 4.9.3
Diffstat (limited to 'usr.sbin/named/man')
-rw-r--r--usr.sbin/named/man/dig.1366
-rw-r--r--usr.sbin/named/man/dnsquery.1166
-rw-r--r--usr.sbin/named/man/gethostbyname.3228
-rw-r--r--usr.sbin/named/man/getnetent.3135
-rw-r--r--usr.sbin/named/man/host.1781
-rw-r--r--usr.sbin/named/man/hostname.7110
-rw-r--r--usr.sbin/named/man/mailaddr.7137
-rw-r--r--usr.sbin/named/man/named-xfer.8148
-rw-r--r--usr.sbin/named/man/named.8422
-rw-r--r--usr.sbin/named/man/named.reload.871
-rw-r--r--usr.sbin/named/man/named.restart.875
-rw-r--r--usr.sbin/named/man/ndc.8129
-rw-r--r--usr.sbin/named/man/nslookup.8388
-rw-r--r--usr.sbin/named/man/resolver.3305
-rw-r--r--usr.sbin/named/man/resolver.5135
15 files changed, 3596 insertions, 0 deletions
diff --git a/usr.sbin/named/man/dig.1 b/usr.sbin/named/man/dig.1
new file mode 100644
index 00000000000..37be48ae94b
--- /dev/null
+++ b/usr.sbin/named/man/dig.1
@@ -0,0 +1,366 @@
+.\" $NetBSD: dig.1,v 1.1 1996/02/02 15:27:16 mrg Exp $
+.\"
+.\" $Id: dig.1,v 8.1 1994/12/15 06:24:10 vixie Exp
+.\"
+.\" ++Copyright++ 1993
+.\" -
+.\" Copyright (c) 1993
+.\" The Regents of the University of California. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed by the University of
+.\" California, Berkeley and its contributors.
+.\" 4. Neither the name of the University nor the names of its contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\" -
+.\" Portions Copyright (c) 1993 by Digital Equipment Corporation.
+.\"
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies, and that
+.\" the name of Digital Equipment Corporation not be used in advertising or
+.\" publicity pertaining to distribution of the document or software without
+.\" specific, written prior permission.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
+.\" WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
+.\" CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+.\" DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+.\" PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+.\" ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+.\" SOFTWARE.
+.\" -
+.\" --Copyright--
+.\"
+.\" Distributed with 'dig' version 2.0 from University of Southern
+.\" California Information Sciences Institute (USC-ISI).
+.\"
+.\" dig.1 2.0 (USC-ISI) 8/30/90
+.\"
+.\" Man page reformatted for this release by Andrew Cherenson
+.\" (arc@sgi.com)
+.\"
+.TH DIG 1 "August 30, 1990"
+.SH NAME
+dig \- send domain name query packets to name servers
+.SH SYNOPSIS
+.B dig
+.RI [ @\fIserver\fP ]
+.I domain
+.RI [ "<query-type>" ]
+.RI [ "<query-class>" ]
+.RI [ "+<query-option>" ]
+.RI [ "\-<dig-option>" ]
+.RI [ "%comment" ]
+.SH DESCRIPTION
+\fIDig\fP (domain information groper) is a flexible command line tool
+which can be used to gather information from the Domain
+Name System servers. \fIDig\fP has two modes: simple interactive mode
+which makes a single query, and batch which executes a query for
+each in a list of several query lines. All query options are
+accessible from the command line.
+.PP
+The usual simple use of \fIdig\fP will take the form:
+.sp 1
+ dig @server domain query-type query-class
+.sp 1
+where:
+.IP \fIserver\fP
+may be either a domain name or a dot-notation
+Internet address. If this optional field is omitted, \fIdig\fP
+will attempt to use the default name server for your machine.
+.sp 1
+\fBNote:\fP If a domain name is specified, this will be resolved
+using the domain name system resolver (i.e., BIND). If your
+system does not support DNS, you may \fIhave\fP to specify a
+dot-notation address. Alternatively, if there is a server
+at your disposal somewhere, all that is required is that
+/etc/resolv.conf be present and indicate where the default
+name servers reside, so that \fIserver\fP itself can be
+resolved. See
+.IR resolver (5)
+for information on /etc/resolv.conf.
+(WARNING: Changing /etc/resolv.conf will affect
+the standard resolver library and potentially several
+programs which use it.) As an option, the user may set the
+environment variable LOCALRES to name a file which is to
+be used instead of /etc/resolv.conf (LOCALRES is specific
+to the \fIdig\fP resolver and not referenced by the standard
+resolver). If the LOCALRES variable is not set or the file
+is not readable then /etc/resolv.conf will be used.
+.IP \fIdomain\fP
+is the domain name for which you are requesting information.
+See OPTIONS [-x] for convenient way to specify inverse address
+query.
+.IP \fIquery-type\fP
+is the type of information (DNS query type) that
+you are requesting. If omitted, the default is "a" (T_A = address).
+The following types are recognized:
+.sp 1
+.ta \w'hinfoXX'u +\w'T_HINFOXX'u
+.nf
+a T_A network address
+any T_ANY all/any information about specified domain
+mx T_MX mail exchanger for the domain
+ns T_NS name servers
+soa T_SOA zone of authority record
+hinfo T_HINFO host information
+axfr T_AXFR zone transfer
+ (must ask an authoritative server)
+txt T_TXT arbitrary number of strings
+.fi
+.sp 1
+(See RFC 1035 for the complete list.)
+.IP \fIquery-class\fP
+is the network class requested in the query. If
+omitted, the default is "in" (C_IN = Internet).
+The following classes are recognized:
+.sp 1
+.ta \w'hinfoXX'u +\w'T_HINFOXX'u
+.nf
+in C_IN Internet class domain
+any C_ANY all/any class information
+.fi
+.sp 1
+(See RFC 1035 for the complete list.)
+.sp 1
+\fBNote:\fP
+"Any" can be used to specify a class and/or a type of
+query. \fIDig\fP will parse the first occurrence of "any"
+to mean query-type = T_ANY. To specify query-class =
+C_ANY you must either specify "any" twice, or set
+query-class using "\-c" option (see below).
+.SH OTHER OPTIONS
+.IP "%ignored-comment"
+"%" is used to included an argument that is simply not
+parsed. This may be useful if running \fIdig\fP in batch
+mode. Instead of resolving every @server-domain-name in
+a list of queries, you can avoid the overhead of doing
+so, and still have the domain name on the command line
+as a reference. Example:
+.sp 1
+ dig @128.9.0.32 %venera.isi.edu mx isi.edu
+.sp 1
+.IP "\-<dig option>"
+"\-" is used to specify an option which effects the
+operation of \fIdig\fP. The following options are currently
+available (although not guaranteed to be useful):
+.RS
+.IP "\-x \fIdot-notation-address\fP"
+Convenient form to specify inverse address mapping.
+Instead of "dig 32.0.9.128.in-addr.arpa" one can
+simply "dig -x 128.9.0.32".
+.IP "\-f \fIfile\fP"
+File for \fIdig\fP batch mode. The file contains a list
+of query specifications (\fIdig\fP command lines) which
+are to be executed successively. Lines beginning
+with ';', '#', or '\\n' are ignored. Other options
+may still appear on command line, and will be in
+effect for each batch query.
+.IP "\-T \fItime\fP"
+Time in seconds between start of successive
+queries when running in batch mode. Can be used
+to keep two or more batch \fIdig\fP commands running
+roughly in sync. Default is zero.
+.IP "\-p \fIport\fP"
+Port number. Query a name server listening to a
+non-standard port number. Default is 53.
+.IP "\-P[\fIping-string\fP]"
+After query returns, execute a
+.IR ping (8)
+command
+for response time comparison. This rather
+unelegantly makes a call to the shell. The last
+three lines of statistics is printed for the
+command:
+.sp 1
+ ping \-s server_name 56 3
+.sp 1
+If the optional "ping string" is present, it
+replaces "ping \-s" in the shell command.
+.IP "\-t \fIquery-type\fP"
+Specify type of query. May specify either an
+integer value to be included in the type field
+or use the abbreviated mnemonic as discussed
+above (i.e., mx = T_MX).
+.IP "\-c \fIquery-class\fP"
+Specify class of query. May specify either an
+integer value to be included in the class field
+or use the abbreviated mnemonic as discussed
+above (i.e., in = C_IN).
+.IP "\-envsav"
+This flag specifies that the \fIdig\fP environment
+(defaults, print options, etc.), after
+all of the arguments are parsed, should be saved
+to a file to become the default environment.
+Useful if you do not like the standard set of
+defaults and do not desire to include a
+large number of options each time \fIdig\fP is used.
+The environment consists of resolver state
+variable flags, timeout, and retries as well as
+the flags detailing \fIdig\fP output (see below).
+If the shell environment variable LOCALDEF is set
+to the name of a file, this is where the default
+\fIdig\fP environment is saved. If not, the file
+"DiG.env" is created in the current working directory.
+.sp 1
+\fBNote:\fP LOCALDEF is specific to the \fIdig\fP resolver,
+and will not affect operation of the standard
+resolver library.
+.sp 1
+Each time \fIdig\fP is executed, it looks for "./DiG.env"
+or the file specified by the shell environment variable
+LOCALDEF. If such file exists and is readable, then the
+environment is restored from this file
+before any arguments are parsed.
+.IP "\-envset"
+This flag only affects
+batch query runs. When "\-envset" is
+specified on a line in a \fIdig\fP batch file,
+the \fIdig\fP environment after the arguments are parsed,
+becomes the default environment for the duration of
+the batch file, or until the next line which specifies
+"\-envset".
+.IP "\-[no]stick"
+This flag only affects batch query runs.
+It specifies that the \fIdig\fP environment (as read initially
+or set by "\-envset" switch) is to be restored before each query
+(line) in a \fIdig\fP batch file.
+The default "\-nostick" means that the \fIdig\fP environment
+does not stick, hence options specified on a single line
+in a \fIdig\fP batch file will remain in effect for
+subsequent lines (i.e. they are not restored to the
+"sticky" default).
+
+.RE
+.IP "+<query option>"
+"+" is used to specify an option to be changed in the
+query packet or to change \fIdig\fP output specifics. Many
+of these are the same parameters accepted by
+.IR nslookup (8).
+If an option requires a parameter, the form is as
+follows:
+.sp 1
+ +keyword[=value]
+.sp 1
+Most keywords can be abbreviated. Parsing of the "+"
+options is very simplistic \(em a value must not be
+separated from its keyword by white space. The following
+keywords are currently available:
+.sp 1
+.nf
+.ta \w'domain=NAMEXX'u +\w'(deb)XXX'u
+Keyword Abbrev. Meaning [default]
+
+[no]debug (deb) turn on/off debugging mode [deb]
+[no]d2 turn on/off extra debugging mode [nod2]
+[no]recurse (rec) use/don't use recursive lookup [rec]
+retry=# (ret) set number of retries to # [4]
+time=# (ti) set timeout length to # seconds [4]
+[no]ko keep open option (implies vc) [noko]
+[no]vc use/don't use virtual circuit [novc]
+[no]defname (def) use/don't use default domain name [def]
+[no]search (sea) use/don't use domain search list [sea]
+domain=NAME (do) set default domain name to NAME
+[no]ignore (i) ignore/don't ignore trunc. errors [noi]
+[no]primary (pr) use/don't use primary server [nopr]
+[no]aaonly (aa) authoritative query only flag [noaa]
+[no]sort (sor) sort resource records [nosor]
+[no]cmd echo parsed arguments [cmd]
+[no]stats (st) print query statistics [st]
+[no]Header (H) print basic header [H]
+[no]header (he) print header flags [he]
+[no]ttlid (tt) print TTLs [tt]
+[no]cl print class info [nocl]
+[no]qr print outgoing query [noqr]
+[no]reply (rep) print reply [rep]
+[no]ques (qu) print question section [qu]
+[no]answer (an) print answer section [an]
+[no]author (au) print authoritative section [au]
+[no]addit (ad) print additional section [ad]
+pfdef set to default print flags
+pfmin set to minimal default print flags
+pfset=# set print flags to #
+ (# can be hex/octal/decimal)
+pfand=# bitwise and print flags with #
+pfor=# bitwise or print flags with #
+.fi
+.sp 1
+The retry and time options affect the retransmission strategy used by resolver
+library when sending datagram queries. The algorithm is as follows:
+.sp 1
+.in +5n
+.nf
+for i = 0 to retry \- 1
+ for j = 1 to num_servers
+ send_query
+ wait((time * (2**i)) / num_servers)
+ end
+end
+.fi
+.in -5n
+.sp 1
+(Note: \fIdig\fP always uses a value of 1 for num_servers.)
+.SH DETAILS
+\fIDig\fP once required a slightly modified version of the BIND
+.IR resolver (3)
+library. BIND's resolver has (as of BIND 4.9) been augmented to work
+properly with \fIDig\fP. Essentially, \fIDig\fP is a straight-forward
+(albeit not pretty) effort of parsing arguments and setting appropriate
+parameters. \fIDig\fP uses resolver routines res_init(), res_mkquery(),
+res_send() as well as accessing _res structure.
+.SH FILES
+.ta \w'/etc/resolv.confXX'u
+/etc/resolv.conf initial domain name and name server
+\./DiG.env default save file for default options
+.br
+ addresses
+.SH ENVIRONMENT
+LOCALRES file to use in place of /etc/resolv.conf
+.br
+LOCALDEF default environment file
+.SH AUTHOR
+Steve Hotz
+hotz@isi.edu
+.SH ACKNOWLEDGMENTS
+\fIDig\fP uses functions from
+.IR nslookup (8)
+authored by Andrew Cherenson.
+.SH BUGS
+\fIDig\fP has a serious case of "creeping featurism" -- the result of
+considering several potential uses during it's development. It would
+probably benefit from a rigorous diet. Similarly, the print flags
+and granularity of the items they specify make evident their
+rather ad hoc genesis.
+.PP
+\fIDig\fP does not consistently exit nicely (with appropriate status)
+when a problem occurs somewhere in the resolver (NOTE: most of the common
+exit cases are handled). This is particularly annoying when running in
+batch mode. If it exits abnormally (and is not caught), the entire
+batch aborts; when such an event is trapped, \fIdig\fP simply
+continues with the next query.
+.SH SEE ALSO
+named(8), resolver(3), resolver(5), nslookup(8)
diff --git a/usr.sbin/named/man/dnsquery.1 b/usr.sbin/named/man/dnsquery.1
new file mode 100644
index 00000000000..f0208454e7d
--- /dev/null
+++ b/usr.sbin/named/man/dnsquery.1
@@ -0,0 +1,166 @@
+.\" $NetBSD: dnsquery.1,v 1.1 1996/02/02 15:27:20 mrg Exp $
+.\"
+.TH DNSQUERY 1 "10 March 1990"
+.UC 6
+.SH NAME
+dnsquery \- query domain name servers using resolver
+.SH SYNOPSIS
+.B dnsquery
+[-n
+.I nameserver]
+[-t
+.I type]
+[-c
+.I class]
+[-r
+.I retry]
+[-p
+.I retry period]
+[-d] [-s] [-v] host
+.SH DESCRIPTION
+The
+.IR dnsquery
+program is a general interface to nameservers via
+BIND resolver library calls. The program supports
+queries to the nameserver with an opcode of QUERY.
+This program is intended to be a replacement or
+supplement to programs like nstest, nsquery and
+nslookup. All arguments except for
+.IR host
+and
+.IR ns
+are treated without case-sensitivity.
+.SH OPTIONS
+.TP 1i
+.B \-n
+The nameserver to be used in the query. Nameservers can appear as either
+Internet addresses of the form w.x.y.z or can appear as domain names.
+(default: as specified in /etc/resolv.conf)
+.TP 1i
+.B \-t
+The type of resource record of interest. Types include:
+.RS 1.5i
+.TP 1i
+A
+address
+.PD 0
+.TP 1i
+NS
+nameserver
+.TP 1i
+CNAME
+canonical name
+.TP 1i
+PTR
+domain name pointer
+.TP 1i
+SOA
+start of authority
+.TP 1i
+WKS
+well-known service
+.TP 1i
+HINFO
+host information
+.TP 1i
+MINFO
+mailbox information
+.TP 1i
+MX
+mail exchange
+.TP 1i
+RP
+responsible person
+.TP 1i
+MG
+mail group member
+.TP 1i
+AFSDB
+DCE or AFS server
+.TP 1i
+ANY
+wildcard
+.RE
+.PD
+.IP
+Note that any case may be used. (default: ANY)
+.TP 1i
+.B \-c
+The class of resource records of interest.
+Classes include:
+.RS 2i
+.TP 1i
+IN
+Internet
+.PD 0
+.TP 1i
+HS
+Hesiod
+.TP 1i
+CHAOS
+Chaos
+.TP 1i
+ANY
+wildcard
+.RE
+.PD
+.IP
+Note that any case may be used. (default: IN)
+.TP 1i
+.B \-r
+The number of times to retry if the nameserver is
+not responding. (default: 4)
+.TP 1i
+.B \-p
+Period to wait before timing out. (default: RES_TIMEOUT)
+.IR options
+field. (default: any answer)
+.TP 1i
+.B \-d
+Turn on debugging. This sets the RES_DEBUG bit of the resolver's
+.IR options
+field. (default: no debugging)
+.TP 1i
+.B \-s
+Use a
+.IR stream
+rather than a packet. This uses a TCP stream connection with
+the nameserver rather than a UDP datagram. This sets the
+RES_USEVC bit of the resolver's
+.IR options
+field. (default: UDP)
+.TP 1i
+.B \-v
+Synonym for the 's' flag.
+.TP 1i
+.B host
+The name of the host (or domain) of interest.
+.SH FILES
+/etc/resolv.conf to get the default ns and search lists
+.br
+<arpa/nameser.h> list of usable RR types and classes
+.br
+<resolv.h> list of resolver flags
+.SH "SEE ALSO"
+nslookup(8), nstest(1), nsquery(1),
+named(8), resolver(5)
+.SH DIAGNOSTICS
+If the resolver fails to answer the query and debugging has not been
+turned on,
+.IR dnsquery
+will simply print a message like:
+.TP 1i
+Query failed (rc = 1) : Unknown host
+.LP
+The value of the return code is supplied by h_errno.
+.SH BUGS
+Queries of a class other than IN can have interesting results
+since ordinarily a nameserver only has a list of root nameservers
+for class IN resource records.
+.PP
+Query uses a call to inet_addr() to determine if the argument
+for the '-n' option is a valid Internet address. Unfortunately,
+inet_addr() seems to cause a segmentation fault with some (bad)
+addresses (e.g. 1.2.3.4.5).
+.SH AUTHOR
+Bryan Beecher
diff --git a/usr.sbin/named/man/gethostbyname.3 b/usr.sbin/named/man/gethostbyname.3
new file mode 100644
index 00000000000..0f8137bab22
--- /dev/null
+++ b/usr.sbin/named/man/gethostbyname.3
@@ -0,0 +1,228 @@
+.\" $NetBSD: gethostbyname.3,v 1.1 1996/02/02 15:27:23 mrg Exp $
+.\"
+.\" Copyright (c) 1983, 1987 The Regents of the University of California.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms are permitted provided
+.\" that: (1) source distributions retain this entire copyright notice and
+.\" comment, and (2) distributions including binaries display the following
+.\" acknowledgement: ``This product includes software developed by the
+.\" University of California, Berkeley and its contributors'' in the
+.\" documentation or other materials provided with the distribution and in
+.\" all advertising materials mentioning features or use of this software.
+.\" Neither the name of the University nor the names of its contributors may
+.\" be used to endorse or promote products derived from this software without
+.\" specific prior written permission.
+.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
+.\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+.\"
+.\" @(#)gethostbyname.3 6.12 (Berkeley) 6/23/90
+.\"
+.TH GETHOSTBYNAME 3 "June 23, 1990"
+.UC 5
+.SH NAME
+gethostbyname, gethostbyaddr, gethostent, sethostent, endhostent, herror \- get network host entry
+.SH SYNOPSIS
+.B "#include <netdb.h>
+.PP
+.B "extern int h_errno;
+.PP
+.B "struct hostent *gethostbyname(name)
+.br
+.B "char *name;
+.PP
+.B "struct hostent *gethostbyname2(name, af)
+.br
+.B "char *name; int af;
+.PP
+.B "struct hostent *gethostbyaddr(addr, len, type)
+.br
+.B "char *addr; int len, type;
+.PP
+.B "struct hostent *gethostent()
+.PP
+.B "sethostent(stayopen)
+.br
+.B "int stayopen;
+.PP
+.B "endhostent()
+.PP
+.B "herror(string)
+.br
+.B "char *string;
+.PP
+.SH DESCRIPTION
+.IR Gethostbyname ,
+.IR gethostbyname2 ,
+and
+.I gethostbyaddr
+each return a pointer to an object with the
+following structure describing an internet host
+referenced by name or by address, respectively.
+This structure contains either the information obtained from the name server,
+.IR named (8),
+or broken-out fields from a line in
+.IR /etc/hosts .
+If the local name server is not running these routines do a lookup in
+.IR /etc/hosts .
+.RS
+.PP
+.nf
+struct hostent {
+ char *h_name; /* official name of host */
+ char **h_aliases; /* alias list */
+ int h_addrtype; /* host address type */
+ int h_length; /* length of address */
+ char **h_addr_list; /* list of addresses from name server */
+};
+#define h_addr h_addr_list[0] /* address, for backward compatibility */
+.ft R
+.ad
+.fi
+.RE
+.PP
+The members of this structure are:
+.TP \w'h_addr_list'u+2n
+h_name
+Official name of the host.
+.TP \w'h_addr_list'u+2n
+h_aliases
+A zero terminated array of alternate names for the host.
+.TP \w'h_addr_list'u+2n
+h_addrtype
+The type of address being returned; usually AF_INET.
+.TP \w'h_addr_list'u+2n
+h_length
+The length, in bytes, of the address.
+.TP \w'h_addr_list'u+2n
+h_addr_list
+A zero terminated array of network addresses for the host.
+Host addresses are returned in network byte order.
+.TP \w'h_addr_list'u+2n
+h_addr
+The first address in h_addr_list; this is for backward compatibility.
+.PP
+When using the nameserver,
+.I gethostbyname
+will search for the named host in the current domain and its parents
+unless the name ends in a dot.
+If the name contains no dot, and if the environment variable ``HOSTALAIASES''
+contains the name of an alias file, the alias file will first be searched
+for an alias matching the input name.
+See
+.IR hostname (7)
+for the domain search procedure and the alias file format.
+.PP
+.I Gethostbyname2
+is an evolution of
+.I gethostbyname
+intended to allow lookups in address families other than AF_INET, for example
+AF_INET6. Currently the
+.I af
+argument must be specified as
+.I AF_INET
+else the function will return \s-2NULL\s+2 after having set
+.I h_errno
+to \s-2NETDB_INTERNAL\s+2.
+.PP
+.I Sethostent
+may be used to request the use of a connected TCP socket for queries.
+If the
+.I stayopen
+flag is non-zero,
+this sets the option to send all queries to the name server using TCP
+and to retain the connection after each call to
+.I gethostbyname
+or
+.IR gethostbyaddr .
+Otherwise, queries are performed using UDP datagrams.
+.PP
+.I Endhostent
+closes the TCP connection.
+.SH DIAGNOSTICS
+.PP
+Error return status from
+.I gethostbyname
+and
+.I gethostbyaddr
+is indicated by return of a null pointer.
+The external integer
+.IR h_errno
+may then be checked to see whether this is a temporary failure
+or an invalid or unknown host.
+The routine
+.I herror
+can be used to print an error message describing the failure.
+If its argument
+.I string
+is non-NULL, it is printed, followed by a colon and a space.
+The error message is printed with a trailing newline.
+.PP
+.IR h_errno
+can have the following values:
+.RS
+.IP NETDB_INTERNAL \w'HOST_NOT_FOUND'u+2n
+This indicates an internal error in the library, unrelated to the network
+or name service.
+.I errno
+will be valid in this case; see
+.IR perror (3).
+.IP HOST_NOT_FOUND \w'HOST_NOT_FOUND'u+2n
+No such host is known.
+.IP TRY_AGAIN \w'HOST_NOT_FOUND'u+2n
+This is usually a temporary error
+and means that the local server did not receive
+a response from an authoritative server.
+A retry at some later time may succeed.
+.IP NO_RECOVERY \w'HOST_NOT_FOUND'u+2n
+Some unexpected server failure was encountered.
+This is a non-recoverable error.
+.IP NO_DATA \w'HOST_NOT_FOUND'u+2n
+The requested name is valid but does not have an IP address;
+this is not a temporary error.
+This means that the name is known to the name server but there is no address
+associated with this name.
+Another type of request to the name server using this domain name
+will result in an answer;
+for example, a mail-forwarder may be registered for this domain.
+.RE
+.SH FILES
+/etc/hosts
+.SH "SEE ALSO"
+resolver(3), hosts(5), hostname(7), named(8)
+.SH CAVEAT
+.PP
+.I Gethostent
+is defined, and
+.I sethostent
+and
+.I endhostent
+are redefined,
+when
+.IR libc
+is built to use only the routines to lookup in
+.IR /etc/hosts
+and not the name server.
+.PP
+.I Gethostent
+reads the next line of
+.IR /etc/hosts ,
+opening the file if necessary.
+.PP
+.I Sethostent
+is redefined to open and rewind the file. If the
+.I stayopen
+argument is non-zero,
+the hosts data base will not be closed after each call to
+.I gethostbyname
+or
+.IR gethostbyaddr .
+.I Endhostent
+is redefined to close the file.
+.SH BUGS
+All information
+is contained in a static area
+so it must be copied if it is
+to be saved. Only the Internet
+address format is currently understood.
diff --git a/usr.sbin/named/man/getnetent.3 b/usr.sbin/named/man/getnetent.3
new file mode 100644
index 00000000000..efd80822fa5
--- /dev/null
+++ b/usr.sbin/named/man/getnetent.3
@@ -0,0 +1,135 @@
+.\" $NetBSD: getnetent.3,v 1.1 1996/02/02 15:27:26 mrg Exp $
+.\"
+.\" $Id: getnetent.3,v 8.1 1994/12/15 06:24:10 vixie Exp
+.TH getnetent 3
+.SH NAME
+getnetent, getnetbyaddr, getnetbyname, setnetent, endnetent \- get networks
+entry
+.SH SYNTAX
+.nf
+.B #include <netdb.h>
+.PP
+.B struct netent *getnetent()
+.PP
+.B struct netent *getnetbyname(\fIname\fP)
+.B char *\fIname\fP;
+.PP
+.B struct netent *getnetbyaddr(\fInet\fP, \fItype\fP)
+.B long \fInet\fP; int \fItype\fP;
+.PP
+.B void setnetent(\fIstayopen\fP)
+.B int \fIstayopen\fP;
+.PP
+.B void endnetent()
+.fi
+.SH DESCRIPTION
+The
+.IR getnetent ,
+.IR getnetbyname ,
+and
+.I getnetbyaddr
+subroutines
+each return a pointer to an object with the
+following structure
+containing the broken-out
+fields of a line in the
+.I networks
+database.
+.RS
+.PP
+.nf
+struct netent {
+ char *n_name; /* official name of net */
+ char **n_aliases; /* alias list */
+ int n_addrtype; /* net number type */
+ long n_net; /* net number */
+};
+.ft R
+.ad
+.fi
+.RE
+.PP
+The members of this structure are:
+.TP \w'n_addrtype'u+2n
+n_name
+The official name of the network.
+.TP \w'n_addrtype'u+2n
+n_aliases
+A zero terminated list of alternate names for the network.
+.TP \w'n_addrtype'u+2n
+n_addrtype
+The type of the network number returned: AF_INET.
+.TP \w'n_addrtype'u+2n
+n_net
+The network number. Network numbers are returned in machine byte
+order.
+.PP
+If the
+.I stayopen
+flag on a
+.I setnetent
+subroutine is NULL, the
+.I networks
+database is opened. Otherwise the
+.I setnetent
+has the effect of rewinding the
+.I networks
+database.
+The
+.I endnetent
+may be called to
+close the
+.I networks
+database when processing is complete.
+.PP
+The
+.I getnetent
+subroutine simply reads the next
+line while
+.I getnetbyname
+and
+.I getnetbyaddr
+search until a matching
+.I name
+or
+.I net
+number is found
+(or until EOF is encountered). The \fItype\fP must be AF_INET.
+The
+.I getnetent
+subroutine keeps a pointer in the database, allowing
+successive calls to be used
+to search the entire file.
+.PP
+A call to
+.I setnetent
+must be made before a
+.I while
+loop using
+.I getnetent
+in order to perform initialization and an
+.I endnetent
+must be used after the loop. Both
+.I getnetbyname
+and
+.I getnetbyaddr
+make calls to
+.I setnetent
+and
+.I endnetent .
+.SH FILES
+.I /etc/networks
+.SH DIAGNOSTICS
+Null pointer (0) returned on EOF or error.
+.SH SEE ALSO
+.nf
+networks(5)
+RFC 1101
+.SH HISTORY
+The getnetent(), getnetbyaddr(), getnetbyname(), setnetent(), and
+endnetent() functions appeared in 4.2BSD.
+.SH BUGS
+The data space used by these functions is static; if future use requires the
+data, it should be copied before any subsequent calls to these functions
+overwrite it. Only Internet network numbers are currently understood.
+Expecting network numbers to fit in no more than 32 bits is probably naive.
diff --git a/usr.sbin/named/man/host.1 b/usr.sbin/named/man/host.1
new file mode 100644
index 00000000000..656ea50a355
--- /dev/null
+++ b/usr.sbin/named/man/host.1
@@ -0,0 +1,781 @@
+.\"
+.\" @(#)host.1 e07@nikhef.nl (Eric Wassenaar) 951024
+.\"
+.TH host 1 "951024"
+.SH NAME
+host \- query nameserver about domain names and zones
+.SH SYNOPSIS
+.na
+.nf
+\fBhost\fP [\fB\-v\fP] [\fB\-a\fP] [\fB\-t\fP \fIquerytype\fP] [\fIoptions\fP] \fIname\fP [\fIserver\fP]
+.br
+\fBhost\fP [\fB\-v\fP] [\fB\-a\fP] [\fB\-t\fP \fIquerytype\fP] [\fIoptions\fP] \fB\-l\fP \fIzone\fP [\fIserver\fP]
+.br
+\fBhost\fP [\fB\-v\fP] [\fIoptions\fP] \fB\-H\fP [\fB\-D\fP] [\fB\-E\fP] [\fB\-G\fP] \fIzone\fP
+.br
+\fBhost\fP [\fB\-v\fP] [\fIoptions\fP] \fB\-C\fP \fIzone\fP
+.br
+\fBhost\fP [\fB\-v\fP] [\fIoptions\fP] \fB\-A\fP \fIhost\fP
+.sp
+\fBhost\fP [\fIoptions\fP] \fB\-x\fP [\fIname\fP ...]
+.br
+\fBhost\fP [\fIoptions\fP] \fB\-X\fP \fIserver\fP [\fIname\fP ...]
+.SH DESCRIPTION
+.I host
+looks for information about Internet hosts and domain names.
+It gets this information from a set of interconnected servers
+that are spread across the world. The information is stored
+in the form of "resource records" belonging to hierarchically
+organized "zones".
+.PP
+By default, the program simply converts between host names and Internet
+addresses. However, with the \fB\-t\fP, \fB\-a\fP and \fB\-v\fP
+options, it can be used to find all of the information about
+domain names that is maintained by the domain nameserver system.
+The information printed consists of various fields of the
+associated resource records that were retrieved.
+.PP
+The arguments can be either host names (domain names) or numeric
+Internet addresses.
+.PP
+A numeric Internet address consists of four decimal numbers
+separated by dots, e.g. \fB192.16.199.1\fP, representing the
+four bytes of the 32-bit address.
+.br
+The default action is to look up the associated host name.
+.PP
+A host name or domain name consists of component names (labels)
+separated by dots, e.g. \fBnikhefh.nikhef.nl\fP
+.br
+The default action is to look up all of its Internet addresses.
+.PP
+For single names without a trailing dot, the local domain is
+automatically tacked on the end.
+Thus a user in domain "nikhef.nl" can say "host nikhapo",
+and it will actually look up "nikhapo.nikhef.nl".
+In all other cases, the name is tried unchanged.
+Single names with trailing dot are considered top-level domain
+specifications, e.g. "nl."
+.PP
+Note that the usual lookup convention for any name that does not end
+with a trailing dot is to try first with the local domain appended,
+and possibly other search domains.
+This convention is not used by this program.
+.PP
+The actual suffix to tack on the end is usually the local domain
+as specified in the \fB/etc/resolv.conf\fP file, but this can be
+overridden.
+See below for a description of how to customize the host name lookup.
+.SH ARGUMENTS
+The first argument is normally the host name (domain name) for which
+you want to look up the requested information.
+If the first argument is an Internet address, a query is done on the
+special "reverse mapping" domain to look up its associated host name.
+.PP
+If the \fB\-l\fP option is given, the first argument is a domain zone
+name for which a complete listing is given. The program enters a
+special zone listing mode which has several variants (see below).
+.PP
+The second argument is optional. It allows you to specify a particular
+server to query. If you don't specify this argument, default servers
+are used, as defined by the \fB/etc/resolv.conf\fP file.
+.SH EXTENDED SYNTAX
+If the \fB\-x\fP option is given, it extends the syntax in the sense
+that multiple arguments are allowed on the command line. An optional
+explicit server must now be specified using the \fB\-X\fP option as it
+cannot be given as an ordinary argument any more. The \fB\-X\fP
+option implies \fB\-x\fP.
+.sp
+The extended syntax allows no arguments at all, in which case the
+arguments will be read from standard input. This can be a pipe,
+redirection from a file, or an interactive terminal. Note that
+these arguments are the names to be queried, and not command options.
+Everything that appears after a '#' or ';' on an input line will be
+skipped. Multiple arguments per line are allowed.
+.SH OPTIONS
+There are a number of options that can be used before the specified
+arguments. Some of these options are meaningful only to the people
+who maintain the domain database zones.
+The first options are the regularly used ones.
+.TP 4
+.B \-v
+causes printout to be in a "verbose" format.
+All resource record fields are printed.
+Without this option, the ttl and class fields are not shown.
+Also the contents of the "additional information" and "authoritative
+nameservers" sections in the answer from the nameserver are printed,
+if present. Normally these sections are not shown.
+In addition, the verbose option prints extra information about the
+various actions that are taken by the program.
+Note that \fB\-vv\fP is "very verbose". This generates a lot of output.
+.TP
+.BI \-t " querytype"
+allows you to specify a particular type of resource record information
+to be looked up. Supported types are listed below.
+The wildcard may be written as either \fBANY\fP or \fB*\fP.
+Types may be given in upper or lower case.
+The default is type \fBA\fP for regular lookups,
+and \fBA\fP, \fBNS\fP, and \fBPTR\fP for zone listings.
+.TP
+.B \-a
+is equivalent to \fB\-t ANY\fP.
+Note that this gives you "anything available" (currently cached) and
+not "all defined data" if a non-authoritative server is queried.
+.SH SPECIAL MODES
+The following options put the program in a special mode.
+.TP 4
+.BI \-l " zone"
+generates the listing of an entire zone.
+.sp
+E.g. the command
+.br
+ \fBhost \-l nikhef.nl\fP
+.br
+will give a listing of all hosts in the "nikhef.nl" zone.
+The \fB\-t\fP option is used to filter what information is
+extracted, as you would expect. The default is address
+information from A records, supplemented with data from PTR
+and NS records.
+.sp
+The command
+.br
+ \fBhost \-Z \-a \-l nikhef.nl\fP
+.br
+will give a complete download of the zone data for "nikhef.nl",
+in the official master file format.
+.TP 4
+.B \-H
+can be specified instead of the \fB\-l\fP option. It will print
+the count of the unique hostnames (names with an A record)
+encountered within the zone.
+It will not count pseudo names like "localhost", nor addresses
+associated with the zone name itself. Neither are counted the
+"glue records" that are necessary to define nameservers for
+the zone and its delegated zones.
+.sp
+By default, this option will not print any resource records.
+.sp
+Combined with the \fB\-S\fP option, it will give a complete
+statistics survey of the zone.
+.sp
+The host count may be affected by duplicate hosts (see below).
+To compute the most realistic value, subtract the duplicate
+host count from the total host count.
+.TP
+.B \-G
+implies \fB\-H\fP, but lists the names of gateway hosts.
+These are the hosts that have more than one address.
+Gateway hosts are not checked for duplicate addresses.
+.TP
+.B \-E
+implies \fB\-H\fP, but lists the names of extrazone hosts.
+An extrazone host in zone "foo.bar" is of the form
+"host.xxx.foo.bar" where "xxx.foo.bar" is not defined as
+a delegated zone with an NS record.
+This may be intentional, but also may be an error.
+.TP
+.B \-D
+implies \fB\-H\fP, but lists the names of duplicate hosts.
+These are hosts with only one address, which is known to
+have been defined also for another host with a different name,
+possibly even in a different zone.
+This may be intentional, but also may be an error.
+.TP
+.B \-C
+can be specified instead of the \fB\-l\fP option. It causes the SOA
+records for the specified zone to be compared as found at each of
+the authoritative nameservers for the zone (as listed in the NS records).
+Nameserver recursion is turned off, and it will be checked whether
+the answers are really authoritative. If a server cannot provide an
+authoritative SOA record, a lame delegation of the zone to that server
+is reported.
+Discrepancies between the records are reported. Various sanity checks
+are performed.
+.TP
+.B \-A
+enters a special address check mode.
+.sp
+If the first argument is a host name, its addresses will be retrieved,
+and for each of the addresses it will be checked whether they map back
+to the given host.
+.sp
+If the first argument is a dotted quad Internet address, its name will
+be retrieved, and it will be checked whether the given address is listed
+among the known addresses belonging to that host.
+.sp
+If the \fB\-A\fP flag is specified along with any zone listing option,
+a reverse lookup of the address in each encountered A record is performed,
+and it is checked whether it is registered and maps back to the name of
+the A record.
+.SH SPECIAL OPTIONS
+The following options apply only to the special zone listing modes.
+.TP 4
+.BI \-L " level"
+Recursively generate zone listings up to this level deep.
+Level 1 traverses the parent zone and all of its delegated zones.
+Each additional level descends into another layer of delegated zones.
+.TP
+.B \-S
+prints statistics about the various types of resource records found
+during zone listings, the number of various host classifications,
+the number of delegated zones, and some total statistics after
+recursive listings.
+.TP
+.B \-p
+causes only the primary nameserver of a zone to be contacted for zone
+transfers during zone listings. Normally, zone transfers are obtained
+from any one of the authoritative servers that responds.
+The primary nameserver is obtained from the SOA record of the zone.
+If a specific server is given on the command line, this option will
+query that server for the desired nameservers of the zone. This can be
+used for testing purposes in case the zone has not been registered yet.
+.TP
+.BI \-P " prefserver"
+gives priority for zone transfers to preferred servers residing in
+domains given by the comma-separated list \fIprefserver\fP. The more
+domain component labels match, the higher the priority.
+If this option is not present, priority is given to servers within
+your own domain or parent domains.
+The order in which NS records are issued may be unfavorable if they
+are subject to BIND 4.9 round-robin reshuffling.
+.TP
+.BI \-N " skipzone"
+prohibits zone transfers for the zones given by the comma-separated
+list \fIskipzone\fP. This may be used during recursive zone listings
+when certain zones are known to contain bogus information which
+should be excluded from further processing.
+.SH COMMON OPTIONS
+The following options can be used in both normal mode and domain
+listing mode.
+.TP 4
+.B \-d
+turns on debugging. Nameserver transactions are shown in detail.
+Note that \fB\-dd\fP prints even more debugging output.
+.TP
+.BI \-f " filename"
+writes the resource record output to the given logfile as well as
+to standard output.
+.TP
+.BI \-F " filename"
+same as \fB\-f\fP, but exchange the role of stdout and logfile.
+All stdout output (including verbose and debug printout) goes to
+the logfile, and stdout gets only the extra resource record output
+(so that it can be used in pipes).
+.TP
+.BI \-I " chars"
+suppresses warning messages about illegal domain names containing
+invalid characters, by specifying such characters in the string
+\fIchars\fP. The underscore is a good candidate.
+.TP
+.B \-i
+constructs a query for the "reverse mapping" \fBin-addr.arpa\fP
+domain in case a numeric (dotted quad) address was specified.
+Useful primarily for zone listing mode, since for numeric regular
+lookups such query is done anyway (but with \-i you see the actual
+PTR resource record outcome).
+.TP
+.B \-n
+constructs a query for the "reverse mapping" \fBnsap.int\fP
+domain in case an nsap address was specified.
+This can be used to look up the names associated with nsap addresses,
+or to list reverse nsap zones.
+An nsap address consists of an even number of hexadecimal digits,
+with a maximum of 40, optionally separated by interspersed dots.
+An optional prefix "0x" is skipped.
+If this option is used, all reverse nsap.int names are by default
+printed in forward notation, only to improve readability.
+The \fB\-Z\fP option forces the output to be in the official zone
+file format.
+.TP
+.B \-q
+be quiet and suppress various warning messages (the ones preceded
+by " !!! ").
+Serious error messages (preceded by " *** ") are never suppressed.
+.TP
+.B \-T
+prints the time-to-live values during non-verbose output.
+By default the ttl is shown only in verbose mode.
+.TP
+.B \-Z
+prints the selected resource record output in full zone file format,
+including trailing dot in domain names, plus ttl value and class name.
+.SH OTHER OPTIONS
+The following options are used only in special circumstances.
+.TP 4
+.BI \-c " class"
+allows you to specify a particular resource record class.
+Supported are
+\fBIN\fP, \fBINTERNET\fP, \fBCS\fP, \fBCSNET\fP, \fBCH\fP, \fBCHAOS\fP,
+\fBHS\fP, \fBHESIOD\fP, and the wildcard \fBANY\fP or \fB*\fP.
+The default class is \fBIN\fP.
+.TP
+.B \-e
+excludes information about names that are not residing within
+the given zone during zone listings, such as some glue records.
+For regular queries, it suppresses the printing of the "additional
+information" and "authoritative nameserver" sections in the answer
+from the nameserver.
+.TP
+.B \-m
+is equivalent to \fB\-t MAILB\fP, which filters
+any of types \fBMB\fP, \fBMR\fP, \fBMG\fP, or \fBMINFO\fP.
+In addition, \fBMR\fP and \fBMG\fP records will be recursively
+expanded into \fBMB\fP records.
+.TP
+.B \-o
+suppresses the resource record output to stdout. Can be used in
+combination with the \fB\-f\fP option to separate the resource
+record output from verbose and debug comments and error messages.
+.TP
+.B \-r
+causes nameserver recursion to be turned off in the request.
+This means that the contacted nameserver will return only data
+it has currently cached in its own database.
+It will not ask other servers to retrieve the information.
+Note that nameserver recursion is always turned off when checking
+SOA records using the \fB\-C\fP option. Authoritative servers
+should have all relevant information available.
+.TP
+.B \-R
+Normally querynames are assumed to be fully qualified and are
+tried as such, unless it is a single name, which is always tried
+(and only once) in the default domain.
+This option simulates the default BIND behavior by qualifying
+any specified name by repeatedly adding search domains, with
+the exception that the search terminates immediately if the name
+exists but does not have the desired querytype.
+The default search domains are constructed from the default domain
+by repeatedly peeling off the first component, until a final domain
+with only one dot remains.
+.TP
+.BI \-s " seconds"
+specifies a new nameserver timeout value. The program will wait
+for a nameserver reply in two attempts of this number of seconds.
+Normally it does 2 attempts of 5 seconds per nameserver address tried.
+The actual timeout algorithm is slightly more complicated, extending
+the timeout value dynamically depending on the number of tries and
+the number of nameserver addresses.
+.TP
+.B \-u
+forces the use of virtual circuits (TCP) instead of datagrams (UDP) when
+issuing nameserver queries. This is slower, but potentially more reliable.
+Note that a virtual circuit is automatically chosen in case a query
+exceeds the maximum datagram packet size. Also if a datagram answer
+turns out to be truncated, the query is retried using virtual circuit.
+A zone transfer is always done via a virtual circuit.
+.TP
+.B \-w
+causes the program to retry forever if the response to a regular query
+times out. Normally it will time out after some 10 seconds per
+nameserver address tried.
+.TP
+.B \-V
+prints just the version number of the \fBhost\fP program, and exits.
+.SH DEFAULT OPTIONS
+Default options and parameters can be preset in an environment
+variable \fBHOST_DEFAULTS\fP using the same syntax as on the command
+line. They will be evaluated before the command line arguments.
+.SH QUERYTYPES
+The following querytypes (resource record types) are supported.
+Indicated within parentheses are the various kinds of data fields.
+.TP 10
+.B A
+Host address (dotted quad)
+.TP
+.B NS
+Authoritative nameserver (domain name)
+.TP
+.B MD
+Mail destination (domain name)
+.TP
+.B MF
+Mail forwarder (domain name)
+.TP
+.B CNAME
+Canonical name for an alias (domain name)
+.TP
+.B SOA
+Marks the start of a zone of authority
+(domain name of primary, domain name of hostmaster,
+serial, refresh, retry, expiration, default ttl)
+.TP
+.B MB
+Mailbox domain name (domain name)
+.TP
+.B MG
+Mail group member (domain name)
+.TP
+.B MR
+Mail rename domain name (domain name)
+.TP
+.B NULL
+Null resource record (no format or data)
+.TP
+.B WKS
+Well-known service description (dotted quad, protocol name, list of services)
+.TP
+.B PTR
+Domain name pointer (domain name)
+.TP
+.B HINFO
+Host information (CPU type string, OS type string)
+.TP
+.B MINFO
+Mailbox or mail list information (request domain name, error domain name)
+.TP
+.B MX
+Mail exchanger (preference value, domain name)
+.TP
+.B TXT
+Descriptive text (string)
+.TP
+.B UINFO
+User information (string)
+.TP
+.B UID
+User identification (number)
+.TP
+.B GID
+Group identification (number)
+.TP
+.B UNSPEC
+Unspecified binary data (data)
+.TP
+.B ANY
+Matches information of any type available.
+.TP
+.B MAILB
+Matches any of types \fBMB\fP, \fBMR\fP, \fBMG\fP, or \fBMINFO\fP.
+.TP
+.B MAILA
+Matches any of types \fBMD\fP, or \fBMF\fP.
+.PP
+The following types have been defined in RFC 1183, but
+are not yet in general use. They are recognized by this program.
+.TP 10
+.B RP
+Responsible person (domain name for MB, domain name for TXT)
+.TP
+.B AFSDB
+AFS database location (type, domain name)
+.TP
+.B X25
+X25 address (address string)
+.TP
+.B ISDN
+ISDN address (address string, optional subaddress string)
+.TP
+.B RT
+Route through host (preference value, domain name)
+.PP
+The following types have been defined in RFC 1348, but
+are not yet in general use. They are recognized by this program.
+RFC 1348 has already been obsoleted by RFC 1637, which defines
+a new experimental usage of NSAP records. This program has now
+hooks to manipulate them.
+.TP 10
+.B NSAP
+NSAP address (encoded address)
+.TP
+.B NSAP-PTR
+NSAP pointer (domain name)
+.PP
+The following are new types as per RFC 1664 and RFC 1712.
+Note that the GPOS type has been withdrawn already, and will be
+superseded by the LOC type.
+.TP 10
+.B PX
+X400 to RFC822 mapping (preference value, rfc822 domain, x400 domain)
+.TP
+.B GPOS
+Geographical position (longitude string, latitude string, altitude string)
+.PP
+The following types have already been reserved in RFC 1700, but are
+not yet implemented.
+.TP 10
+.B SIG
+Security signature
+.TP
+.B KEY
+Security key
+.TP
+.B AAAA
+IP v6 address
+.TP
+.B LOC
+Geographical location
+.SH FAILURE MESSAGES
+The following messages are printed to show the reason
+of failure for a particular query. The name of an explicit
+server, if specified, may be included. If a special class
+was requested, it is also shown.
+.TP 4
+Nameserver [\fIserver\fP] not running
+The contacted server host does not have a nameserver running.
+.TP
+Nameserver [\fIserver\fP] not responding
+The nameserver at the contacted server host did not give a reply
+within the specified time frame.
+.TP
+Nameserver [\fIserver\fP] not reachable
+The network route to the intended server host is blocked.
+.TP
+\fIname\fP does not exist [at \fIserver\fP] (Authoritative answer)
+The queryname does definitely not exist at all.
+.TP
+\fIname\fP does not exist [at \fIserver\fP], try again
+The queryname does not exist, but the answer was not authoritative,
+so it is still undecided.
+.TP
+\fIname\fP has no \fItype\fP record [at \fIserver\fP] (Authoritative answer)
+The queryname is valid, but the specified type does not exist.
+This status is here returned only in case authoritative.
+.TP
+\fIname\fP \fItype\fP record currently not present [at \fIserver\fP]
+The specified type does not exist, but we don't know whether
+the queryname is valid or not. The answer was not authoritative.
+Perhaps recursion was off, and no data was cached locally.
+.TP
+\fIname\fP \fItype\fP record not found [at \fIserver\fP], try again
+Some intermediate failure, e.g. timeout reaching a nameserver.
+.TP
+\fIname\fP \fItype\fP record not found [at \fIserver\fP], server failure
+Some explicit nameserver failure to process the query, due to internal
+or forwarding errors. This may also be returned if the zone data has
+expired at a secondary server, of when the server is not authoritative
+for some class.
+.TP
+\fIname\fP \fItype\fP record not found [at \fIserver\fP], no recovery
+Some irrecoverable format error, or server refusal.
+.TP
+\fIname\fP \fItype\fP record query refused [by \fIserver\fP]
+The contacted nameserver explicitly refused to answer the query.
+Some nameservers are configured to refuse zone transfer requests
+that come from arbitrary clients.
+.TP
+\fIname\fP \fItype\fP record not found [at \fIserver\fP]
+The exact reason for failure could not be determined.
+(This should not happen).
+.TP
+\fIzone\fP has lame delegation to \fIserver\fP
+If we query a supposedly authoritative nameserver for the SOA record
+of a zone, the information should be available and the answer should
+be authoritative. If not, a lame delegation is flagged. This is also
+done if the server turns out not to exist at all. Ditto if we ask for
+a zone transfer and the server cannot provide it.
+.TP
+No nameservers for \fIzone\fP found
+It was not possible to retrieve the name of any nameserver
+for the desired zone, in order to do a zone transfer.
+.TP
+No addresses of nameservers for \fIzone\fP found
+We got some nameserver names, but it was not possible to retrieve
+addresses for any of them.
+.TP
+No nameservers for \fIzone\fP responded
+When trying all nameservers in succession to do a zone transfer,
+none of them were able or willing to provide it.
+.SH WARNING AND ERROR MESSAGES
+Miscellaneous warning messages may be generated.
+They are preceded by " !!! " and indicate some non-fatal condition,
+usually during the interpretation of the retrieved data.
+These messages can be suppressed with the \-q command line option.
+.sp
+Error messages are preceded by " *** " and indicate a serious problem,
+such as format errors in the answers to queries, but also major
+violations of the specifications.
+Those messages cannot be suppressed.
+.TP 4
+\fIzone\fP has only one nameserver \fIserver\fP
+When retrieving the nameservers for a zone, it appears that only one
+single nameserver exists. This is against the recommendations.
+.TP
+\fIzone\fP nameserver \fIserver\fP is not canonical (\fIrealserver\fP)
+When retrieving the nameservers for a zone, the name of the specified
+server appears not to be canonical. This may cause serious operational
+problems. The canonical name is given between parentheses.
+.TP
+empty zone transfer for \fIzone\fP from \fIserver\fP
+The zone transfer from the specified server contained no data, perhaps
+only the SOA record. This could happen if we query the victim of a
+lame delegation which happens to have the SOA record in its cache.
+.TP
+extraneous NS record for \fIname\fP within \fIzone\fP from \fIserver\fP
+During a zone transfer, an NS record appears for a name which is not
+a delegated subzone of the current zone.
+.TP
+extraneous SOA record for \fIname\fP within \fIzone\fP from \fIserver\fP
+During a zone transfer, an SOA record appears for a name which is
+not the name of the current zone.
+.TP
+extraneous glue record for \fIname\fP within \fIzone\fP from \fIserver\fP
+During a zone transfer, a glue record is included for a name which
+is not part of the zone or its delegated subzones. This is done in some
+older versions of BIND. It is undesirable since unauthoritative, or even
+incorrect, information may be propagated.
+.TP
+incomplete \fItype\fP record for \fIname\fP
+When decoding the resource record data from the answer to a query,
+not all required data fields were present. This is frequently the case
+for HINFO records of which only one of the two data field is encoded.
+.TP
+\fIname\fP has both NS and A records within \fIzone\fP from \fIserver\fP
+An A record has been defined for the delegated zone \fIname\fP. This is
+signalled only during the transfer of the parent \fIzone\fP. It is not
+an error, but the overall hostcount may be wrong, since the A record
+is counted as a host in the parent zone. This A record is not included
+in the hostcount of the delegated zone.
+.TP
+\fIname\fP \fItype\fP records have different ttl within \fIzone\fP from \fIserver\fP
+Resource records of the same name/type/class should have the same ttl value
+in zone listings. This is sometimes not the case, due to the independent
+definition of glue records or other information in the parent zone, which
+is not kept in sync with the definition in the delegated zone.
+.TP
+\fIname\fP \fItype\fP record has illegal name
+The name of an A or MX record contains invalid characters.
+Only alphanumeric characters and hyphen '-' are valid in
+components (labels) between dots.
+.TP
+\fIname\fP \fItype\fP host \fIserver\fP has illegal name
+The name of an NS or MX target host contains invalid characters.
+Only alphanumeric characters and hyphen '-' are valid in
+components (labels) between dots.
+.TP
+\fIname\fP \fItype\fP host \fIserver\fP does not exist
+The NS or MX target host \fIserver\fP does not exist at all.
+In case of NS, a lame delegation of \fIname\fP to \fIserver\fP
+is flagged.
+.TP
+\fIname\fP \fItype\fP host \fIserver\fP has no A record
+The NS or MX target host \fIserver\fP has no address.
+In case of NS, a lame delegation of \fIname\fP to \fIserver\fP
+is flagged.
+.TP
+\fIname\fP \fItype\fP host \fIserver\fP is not canonical
+The NS or MX target host \fIserver\fP is not a canonical name.
+This may cause serious operational problems during domain data
+retrieval, or electronic mail delivery.
+.TP
+\fIname\fP address \fIA.B.C.D\fP is not registered
+The reverse lookup of the address of an A record failed in an
+authoritative fashion. It was not present in the corresponding
+in-addr.arpa zone.
+.TP
+\fIname\fP address \fIA.B.C.D\fP maps to \fIrealname\fP
+The reverse lookup of the address of an A record succeeded,
+but it did not map back to the name of the A record.
+There may be A records with different names for the same address.
+In the reverse in-addr.arpa zone there is usually only one PTR to
+the ``official'' host name.
+.TP
+\fIzone\fP SOA record at \fIserver\fP is not authoritative
+When checking the SOA for a zone at one of its supposedly
+authoritative nameservers, the SOA information turns out
+to be not authoritative. This could be determined by making
+a query without nameserver recursion turned on.
+.TP
+\fIzone\fP SOA primary \fIserver\fP is not advertised via NS
+The primary nameserver is not among the list of nameservers
+retrieved via NS records for the zone.
+This is not an error per se, since only publicly accessible
+nameservers may be advertised, and others may be behind a
+firewall.
+.TP
+\fIzone\fP SOA primary \fIserver\fP has illegal name
+The name of the primary nameserver contains invalid characters.
+.TP
+\fIzone\fP SOA hostmaster \fImailbox\fP has illegal mailbox
+The name of the hostmaster mailbox contains invalid characters.
+A common mistake is to use an RFC822 email address with a ``@'',
+whereas the at-sign should have been replaced with a dot.
+.TP
+\fIzone\fP SOA serial has high bit set
+Although the serial number is an unsigned 32-bit value, overflow
+into the high bit can inadvertently occur by making inappropriate
+use of the dotted decimal notation in the zone file. This may lead
+to synchronization failures between primary and secondary servers.
+.TP
+\fIzone\fP SOA retry exceeds refresh
+A failing refresh would be retried after it is time for the
+next refresh.
+.TP
+\fIzone\fP SOA refresh+retry exceeds expire
+The retry after a failing refresh would be done after the data
+has already expired.
+.TP
+\fIserver1\fP and \fIserver2\fP have different primary for \fIzone\fP
+If the SOA record is different, the zone data is probably different
+as well. What you get depends on which server you happen to query.
+.TP
+\fIserver1\fP and \fIserver2\fP have different hostmaster for \fIzone\fP
+If the SOA record is different, the zone data is probably different
+as well. What you get depends on which server you happen to query.
+.TP
+\fIserver1\fP and \fIserver2\fP have different serial for \fIzone\fP
+This is usually not an error, but happens during the period after the
+primary server has updated its zone data, but before a secondary
+performed a refresh. Nevertheless there could be an error if a mistake
+has been made in properly adapting the serial number.
+.TP
+\fIserver1\fP and \fIserver2\fP have different refresh for \fIzone\fP
+If the SOA record is different, the zone data is probably different
+as well. What you get depends on which server you happen to query.
+.TP
+\fIserver1\fP and \fIserver2\fP have different retry for \fIzone\fP
+If the SOA record is different, the zone data is probably different
+as well. What you get depends on which server you happen to query.
+.TP
+\fIserver1\fP and \fIserver2\fP have different expire for \fIzone\fP
+If the SOA record is different, the zone data is probably different
+as well. What you get depends on which server you happen to query.
+.TP
+\fIserver1\fP and \fIserver2\fP have different defttl for \fIzone\fP
+If the SOA record is different, the zone data is probably different
+as well. What you get depends on which server you happen to query.
+.SH EXIT STATUS
+The program returns a zero exit status if the requested information
+could be retrieved successfully, or in case zone listings or SOA
+checks were performed without any serious error.
+Otherwise it returns a non-zero exit status.
+.SH CUSTOMIZING HOST NAME LOOKUP
+In general, if the name supplied by the user does not have any dots
+in it, a default domain is appended to the end. This domain is usually
+defined in the \fB/etc/resolv.conf\fP file. If not, it is derived by
+taking the local hostname and taking everything after its first dot.
+.PP
+The user can override this, and specify a different default domain,
+by defining it in the environment variable \fILOCALDOMAIN\fP.
+.PP
+In addition, the user can supply his own single-word abbreviations
+for host names. They should be in a file consisting of one line per
+abbreviation. Each line contains an abbreviation, white space, and
+then the fully qualified host name. The name of this file must be
+specified in the environment variable \fIHOSTALIASES\fP.
+.SH SPECIAL CONSIDERATIONS
+The complete set of resource record information for a domain name
+is available from an authoritative nameserver only. Therefore,
+if you query another server with the "-a" option, only a subset
+of the data may be presented, since this option asks for any data
+that the latter server currently knows about, not all data that
+may possibly exist. Note that the "-v" option shows whether an
+answer is authoritative or not.
+.PP
+When listing a zone with the "-l" option, information will be fetched
+from authoritative nameservers for that zone. This is implemented by
+doing a complete zone transfer and then filtering out the information
+that you have asked for.
+Note that direct contact with such nameservers must be possible for
+this option to work.
+This option should be used with caution. Servers may be configured
+to refuse zone transfers if they are flooded with requests.
+.SH RELATED DOCUMENTATION
+rfc920, rfc952, rfc974, rfc1032, rfc1033, rfc1034, rfc1035,
+rfc1101, rfc1183, rfc1348, rfc1535, rfc1536, rfc1537, rfc1637,
+rfc1664, rfc1712
+.SH AUTHOR
+This program is originally from Rutgers University.
+.br
+Rewritten by Eric Wassenaar, Nikhef-H, <e07@nikhef.nl>
+.SH "SEE ALSO"
+named(8), resolv.conf(5), resolver(3)
diff --git a/usr.sbin/named/man/hostname.7 b/usr.sbin/named/man/hostname.7
new file mode 100644
index 00000000000..f19d84b4de8
--- /dev/null
+++ b/usr.sbin/named/man/hostname.7
@@ -0,0 +1,110 @@
+.\" $NetBSD: hostname.7,v 1.1 1996/02/02 15:27:32 mrg Exp $
+.\"
+.\" Copyright (c) 1987 The Regents of the University of California.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms are permitted
+.\" provided that the above copyright notice and this paragraph are
+.\" duplicated in all such forms and that any documentation,
+.\" advertising materials, and other materials related to such
+.\" distribution and use acknowledge that the software was developed
+.\" by the University of California, Berkeley. The name of the
+.\" University may not be used to endorse or promote products derived
+.\" from this software without specific prior written permission.
+.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+.\"
+.\" @(#)hostname.7 6.4 (Berkeley) 1/16/90
+.\"
+.TH HOSTNAME 7 "February 16, 1994"
+.UC 5
+.SH NAME
+hostname \- host name resolution description
+.SH DESCRIPTION
+Hostnames are domains. A domain is a hierarchical, dot-separated list
+of subdomains. For example, the machine \fImonet\fP, in the \fIBerkeley\fP
+subdomain of the \fIEDU\fP subdomain of the Internet Domain Name System
+would be represented as
+.br
+ \fImonet\fP.\fIBerkeley\fP.\fIEDU\fP
+.br
+(with no trailing dot).
+.PP
+Hostnames are often used with network client and server programs,
+which must generally translate the name to an address for use.
+(This task is usually performed by the library routine
+.IR gethostbyname (3).)
+The default method for resolving hostnames by the Internet name resolver is
+to follow \s-1RFC\s+1 1535's security recommendations. Actions can be taken
+by the administrator to override these recommendations and to have the
+resolver behave the same as earlier, non-\s-1RFC\s+1 1535 resolvers.
+.PP
+The default method (using \s-1RFC\s+1 1535 guidelines) follows:
+.PP
+If the name consists of a single component, i.e. contains no dot, and if the
+environment variable ``\s-1HOSTALIASES\s+1'' is set to the name of a file,
+that file is searched for a string matching the input hostname. The file
+should consist of lines made up of two strings separated by white-space, the
+first of which is the hostname alias, and the second of which is the complete
+hostname to be substituted for that alias. If a case-insensitive match is
+found between the hostname to be resolved and the first field of a line in
+the file, the substituted name is looked up with no further processing.
+.PP
+If there is at least one dot in the name, then the name is first tried as
+is. The number of dots to cause this action is configurable by setting the
+threshold using the ``\fIndots\fP'' option in
+.I /etc/resolv.conf
+(default: \fI1\fP). If the name ends with a dot, the trailing dot is
+removed, and the remaining name is looked up (regardless of the setting of
+the 'ndots' option) and no further processing is done.
+.PP
+If the input name does not end with a trailing dot, it is looked up by
+searching through a list of domains until a match is found. If neither the
+search option in the
+.I /etc/resolv.conf
+file or the ``\s-1LOCALDOMAIN\s+1'' environment variable is used, then the
+search list of domains contains only the full domain specified by the domain
+option (in
+.IR /etc/resolv.conf )
+or the domain used in the local hostname (see
+.IR hostname (1)
+and
+.IR resolver (5)).
+For example, if the ``\fIdomain\fP'' option is set to \fICS.Berkeley.EDU\fP,
+then only CS.Berkeley.EDU will be in the search list and will be the only
+domain appended to the partial hostname, for example, ``\fIlithium\fP'',
+making \fIlithium.CS.Berkeley.EDU\fP the only name to be tried using the
+search list.
+.PP
+If the search option is used in
+.I /etc/resolv.conf
+or the environment variable, ``\s-1LOCALDOMAIN\s+1'' is set by the user, then
+the search list will include what is set by these methods. For
+example, if the ``\fIsearch\fP'' option contained
+.br
+ \fICS.Berkeley.EDU CChem.Berkeley.EDU Berkeley.EDU\fP
+.br
+then the partial hostname (e.g., ``\fIlithium\fP'') will be tried with each
+domainname appended (in the same order specified). The resulting hostnames
+that would be tried are:
+.nf
+ \fIlithium.CS.Berkeley.EDU\fP
+ \fIlithium.CChem.Berkeley.EDU\fP
+ \fIlithium.Berkeley.EDU\fP
+.fi
+.PP
+The environment variable ``\s-1LOCALDOMAIN\s+1'' overrides the
+``\fIsearch\fP'' and ``\fIdomain\fP'' options, and if both search and domain
+options are present in the resolver configuration file, then only the last
+one listed is used (see
+.IR resolver (5)).
+.PP
+If the name was not previously tried ``as is'' (i.e., it fell below the
+``\fIndots\fP'' threshold or did not contain a dot), then the name as
+originally provided is attempted.
+.SH SEE ALSO
+.IR gethostbyname (3),
+.IR resolver (5),
+.IR mailaddr (7),
+.IR named (8)
diff --git a/usr.sbin/named/man/mailaddr.7 b/usr.sbin/named/man/mailaddr.7
new file mode 100644
index 00000000000..517e31fcfe4
--- /dev/null
+++ b/usr.sbin/named/man/mailaddr.7
@@ -0,0 +1,137 @@
+.\" $NetBSD: mailaddr.7,v 1.1 1996/02/02 15:27:34 mrg Exp $
+.\"
+.\" Copyright (c) 1983, 1987 The Regents of the University of California.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms are permitted
+.\" provided that the above copyright notice and this paragraph are
+.\" duplicated in all such forms and that any documentation,
+.\" advertising materials, and other materials related to such
+.\" distribution and use acknowledge that the software was developed
+.\" by the University of California, Berkeley. The name of the
+.\" University may not be used to endorse or promote products derived
+.\" from this software without specific prior written permission.
+.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+.\"
+.\" @(#)mailaddr.7 6.5 (Berkeley) 2/14/89
+.\"
+.TH MAILADDR 7 "February 14, 1989"
+.UC 5
+.SH NAME
+mailaddr \- mail addressing description
+.SH DESCRIPTION
+Mail addresses are based on the ARPANET protocol listed at the end of this
+manual page. These addresses are in the general format
+.PP
+ user@domain
+.PP
+where a domain is a hierarchical dot separated list of subdomains. For
+example, the address
+.PP
+ eric@monet.berkeley.edu
+.PP
+is normally interpreted from right to left: the message should go to the
+ARPA name tables (which do not correspond exactly to the physical ARPANET),
+then to the Berkeley gateway, after which it should go to the local host
+monet. When the message reaches monet it is delivered to the user ``eric''.
+.PP
+Unlike some other forms of addressing, this does not imply any routing.
+Thus, although this address is specified as an ARPA address, it might
+travel by an alternate route if that were more convenient or efficient.
+For example, at Berkeley, the associated message would probably go directly
+to monet over the Ethernet rather than going via the Berkeley ARPANET
+gateway.
+.SS Abbreviation.
+.PP
+Under certain circumstances it may not be necessary to type the entire
+domain name. In general, anything following the first dot may be omitted
+if it is the same as the domain from which you are sending the message.
+For example, a user on ``calder.berkeley.edu'' could send to ``eric@monet''
+without adding the ``berkeley.edu'' since it is the same on both sending
+and receiving hosts.
+.PP
+Certain other abbreviations may be permitted as special cases. For
+example, at Berkeley, ARPANET hosts may be referenced without adding
+the ``berkeley.edu'' as long as their names do not conflict with a local
+host name.
+.SS Compatibility.
+.PP
+Certain old address formats are converted to the new format to provide
+compatibility with the previous mail system. In particular,
+.PP
+ user@host.ARPA
+.PP
+is allowed and
+.PP
+ host:user
+.PP
+is converted to
+.PP
+ user@host
+.PP
+to be consistent with the \fIrcp\fP(1) command.
+.PP
+Also, the syntax
+.PP
+ host!user
+.PP
+is converted to:
+.PP
+ user@host.UUCP
+.PP
+This is normally converted back to the ``host!user'' form before being sent
+on for compatibility with older UUCP hosts.
+.PP
+The current implementation is not able to route messages automatically through
+the UUCP network. Until that time you must explicitly tell the mail system
+which hosts to send your message through to get to your final destination.
+.SS Case Distinctions.
+.PP
+Domain names (i.e., anything after the ``@'' sign) may be given in any mixture
+of upper and lower case with the exception of UUCP hostnames. Most hosts
+accept any combination of case in user names, with the notable exception of
+MULTICS sites.
+.SS Route-addrs.
+.PP
+Under some circumstances it may be necessary to route a message through
+several hosts to get it to the final destination. Normally this routing
+is done automatically, but sometimes it is desirable to route the message
+manually. Addresses which show these relays are termed ``route-addrs.''
+These use the syntax:
+.PP
+ <@hosta,@hostb:user@hostc>
+.PP
+This specifies that the message should be sent to hosta, from there to hostb,
+and finally to hostc. This path is forced even if there is a more efficient
+path to hostc.
+.PP
+Route-addrs occur frequently on return addresses, since these are generally
+augmented by the software at each host. It is generally possible to ignore
+all but the ``user@domain'' part of the address to determine the actual
+sender.
+.SS Postmaster.
+.PP
+Every site is required to have a user or user alias designated ``postmaster''
+to which problems with the mail system may be addressed.
+.SS Other Networks.
+.PP
+Some other networks can be reached by giving the name of the network as the
+last component of the domain. \fIThis is not a standard feature\fP and may
+not be supported at all sites. For example, messages to CSNET or BITNET sites
+can often be sent to ``user@host.CSNET'' or ``user@host.BITNET'' respectively.
+.SH BUGS
+The RFC822 group syntax (``group:user1,user2,user3;'') is not supported
+except in the special case of ``group:;'' because of a conflict with old
+berknet-style addresses.
+.PP
+Route-Address syntax is grotty.
+.PP
+UUCP- and ARPANET-style addresses do not coexist politely.
+.SH SEE ALSO
+mail(1), sendmail(8);
+Crocker, D. H.,
+.ul
+Standard for the Format of Arpa Internet Text Messages,
+RFC822.
diff --git a/usr.sbin/named/man/named-xfer.8 b/usr.sbin/named/man/named-xfer.8
new file mode 100644
index 00000000000..7f94bcff120
--- /dev/null
+++ b/usr.sbin/named/man/named-xfer.8
@@ -0,0 +1,148 @@
+.\" $NetBSD: named-xfer.8,v 1.1 1996/02/02 15:27:37 mrg Exp $
+.\"
+.\" ++Copyright++ 1985
+.\" -
+.\" Copyright (c) 1985
+.\" The Regents of the University of California. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed by the University of
+.\" California, Berkeley and its contributors.
+.\" 4. Neither the name of the University nor the names of its contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\" -
+.\" Portions Copyright (c) 1993 by Digital Equipment Corporation.
+.\"
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies, and that
+.\" the name of Digital Equipment Corporation not be used in advertising or
+.\" publicity pertaining to distribution of the document or software without
+.\" specific, written prior permission.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
+.\" WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
+.\" CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+.\" DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+.\" PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+.\" ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+.\" SOFTWARE.
+.\" -
+.\" --Copyright--
+.\"
+.\" from named.8 6.6 (Berkeley) 2/14/89
+.\"
+.TH NAMED-XFER 8 "June 26, 1993"
+.UC 4
+.SH NAME
+named-xfer \- ancillary agent for inbound zone transfers
+.SH SYNOPSIS
+.B named-xfer
+.B \-z
+.I zone_to_transfer
+.B \-f
+.I db_file
+.B \-s
+.I serial_no
+[
+.B \-d
+.I debuglevel
+] [
+.B \-l
+.I debug_log_file
+] [
+.B \-t
+.I trace_file
+] [
+.B \-p
+.I port#
+] [
+.B \-S
+]
+.I nameserver
+...
+.SH DESCRIPTION
+.I Named-xfer
+is an ancillary program executed by
+.IR named (8)
+to perform an inbound zone transfer. It is rarely executed directly, and
+only by system administrators who are trying to debug a zone transfer problem.
+See RFC's 1033, 1034, and 1035 for more information on the Internet
+name-domain system.
+.PP
+Options are:
+.TP
+.B \-z
+specifies the name of the zone to be transferred.
+.TP
+.B \-f
+specifies the name of the file into which the zone should be dumped
+when it is received from the primary server.
+.TP
+.B \-s
+specifies the serial number of our current copy of this zone. If the
+\s-1SOA RR\s+1 we get from the primary server does not have a serial
+number higher than this, the transfer will be aborted.
+.TP
+.B \-d
+Print debugging information.
+A number after the ``d'' determines the level of
+messages printed.
+.TP
+.B \-l
+Specifies a log file for debugging messages. The default is system-
+dependent but is usually in
+.I /var/tmp
+or
+.IR /usr/tmp .
+Note that this only applies if
+.I \-d
+is also specified.
+.TP
+.B \-t
+Specifies a trace file which will contain a protocol trace of the zone
+transfer. This is probably only of interest to people debugging the name
+server itself.
+.TP
+.B \-p
+Use a different port number. The default is the standard port number
+as returned by getservbyname(3) for service ``domain''.
+.TP
+.B \-S
+Perform a restricted transfer of only the SOA, NS records and glue A records
+for the zone. The SOA record will not be loaded by named but will be used to
+determine when to verify the NS records. See the ``stubs'' directive in
+.IR named (8)
+for more information.
+.PP
+Additional arguments are taken as name server addresses in so-called
+``dotted-quad'' syntax only; no host name are allowed here. At least
+one address must be specified. Any additional addresses will be tried
+in order if the first one fails to transfer to us successfully.
+.SH "SEE ALSO"
+named(8), resolver(3), resolver(5), hostname(7),
+RFC 882, RFC 883, RFC 973, RFC 974, RFC 1033, RFC 1034, RFC 1035, RFC 1123,
+\fIName Server Operations Guide for \s-1BIND\s+1\fR
diff --git a/usr.sbin/named/man/named.8 b/usr.sbin/named/man/named.8
new file mode 100644
index 00000000000..297b8b8819e
--- /dev/null
+++ b/usr.sbin/named/man/named.8
@@ -0,0 +1,422 @@
+.\" $NetBSD: named.8,v 1.1 1996/02/02 15:27:39 mrg Exp $
+.\"
+.\" ++Copyright++ 1985
+.\" -
+.\" Copyright (c) 1985
+.\" The Regents of the University of California. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed by the University of
+.\" California, Berkeley and its contributors.
+.\" 4. Neither the name of the University nor the names of its contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\" -
+.\" Portions Copyright (c) 1993 by Digital Equipment Corporation.
+.\"
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies, and that
+.\" the name of Digital Equipment Corporation not be used in advertising or
+.\" publicity pertaining to distribution of the document or software without
+.\" specific, written prior permission.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
+.\" WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
+.\" CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+.\" DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+.\" PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+.\" ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+.\" SOFTWARE.
+.\" -
+.\" --Copyright--
+.\"
+.\" @(#)named.8 6.6 (Berkeley) 2/14/89
+.\"
+.TH NAMED 8 "June 20, 1995"
+.UC 4
+.SH NAME
+named \- Internet domain name server
+.SH SYNOPSIS
+.B named
+[
+.B \-d
+.I debuglevel
+] [
+.B \-p
+.IR port# [\fB/\fP\fIlocalport#\fP]
+] [{\-b}
+.I bootfile
+] [
+.B \-q
+] [
+.B \-r
+]
+.SH DESCRIPTION
+.I Named
+is the Internet domain name server.
+See RFC's 1033, 1034, and 1035 for more information on the Internet
+name-domain system. Without any arguments,
+.I named
+will read the default boot file
+.IR /etc/named.boot ,
+read any initial data and listen for queries.
+.PP
+Options are:
+.TP
+.B \-d
+Print debugging information.
+A number after the ``d'' determines the level of
+messages printed.
+.TP
+.B \-p
+Use nonstandard port numbers. The default is the standard port number
+as returned by getservbyname(3) for service ``domain''.
+The argument can specify two port numbers separated by a slash (``\fB/\fP'')
+in which case the first port is that used when contacting remote servers,
+and the second one is the service port bound by the local instance of
+.IR named .
+This is used mostly for debugging purposes.
+.TP
+.B \-b
+Use an alternate boot file. This is optional and allows you to
+specify a file with a leading dash.
+.TP
+.B \-q
+Trace all incoming queries if \fInamed\fP has been compiled with
+\fIQRYLOG\fP defined. \fINOTE:\fP this option is deprecated in favour
+of the boot file directive ``options query-log''.
+.TP
+.B \-r
+Turns recursion off in the server. Answers can come only from local
+(primary or secondary) zones. This can be used on root servers.
+\fINOTE:\fP this option is deprecated in favour
+of the boot file directive ``options no-recursion''.
+.PP
+Any additional argument is taken as the name of the boot file.
+If multiple boot files are specified, only the last is used.
+.PP
+The boot file contains information about where the name server is to get
+its initial data.
+Lines in the boot file cannot be continued on subsequent lines.
+The following is a small example:
+.in +2m
+.nf
+
+;
+; boot file for name server
+;
+directory /usr/local/adm/named
+
+.ta \w'forwarders\ 'u +\w'6.32.128.IN-ADDR.ARPA\ 'u +\w'128.32.137.8 128.32.137.3\ 'u
+; type domain source host/file backup file
+
+cache . root.cache
+primary Berkeley.EDU berkeley.edu.zone
+primary 32.128.IN-ADDR.ARPA ucbhosts.rev
+secondary CC.Berkeley.EDU 128.32.137.8 128.32.137.3 cc.zone.bak
+secondary 6.32.128.IN-ADDR.ARPA 128.32.137.8 128.32.137.3 cc.rev.bak
+primary 0.0.127.IN-ADDR.ARPA localhost.rev
+forwarders 10.0.0.78 10.2.0.78
+limit transfers-in 10
+limit datasize 64M
+options forward-only query-log fake-iquery
+
+.DT
+.fi
+.in
+The ``directory'' line causes the server to change its working directory to
+the directory specified. This can be important for the correct processing
+of \s-1$INCLUDE\s+1 files in primary zone files.
+.LP
+The ``cache'' line specifies that data in ``root.cache'' is to be placed in
+the backup cache. Its main use is to specify data such as locations of root
+domain servers. This cache is not used during normal operation, but is used
+as ``hints'' to find the current root servers. The file ``root.cache'' is
+in the same format as ``berkeley.edu.zone''. There can be more than one
+``cache'' file specified. The ``root.cache'' file should be retrieved
+periodically from \s-1FTP.RS.INTERNIC.NET\s+1 since it contains a list of
+root servers, and this list changes periodically.
+.LP
+The first example ``primary'' line states that the file
+``berkeley.edu.zone'' contains authoritative data for the ``Berkeley.EDU''
+zone. The file ``berkeley.edu.zone'' contains data in the master file
+format described in RFC 883. All domain names are relative to the origin, in
+this case, ``Berkeley.EDU'' (see below for a more detailed description).
+The second ``primary'' line states that the file ``ucbhosts.rev'' contains
+authoritative data for the domain ``32.128.IN-ADDR.ARPA,'' which is used to
+translate addresses in network 128.32 to hostnames. Each master file should
+begin with an SOA record for the zone (see below).
+.LP
+The first example ``secondary'' line specifies that all authoritative data
+under ``CC.Berkeley.EDU'' is to be transferred from the name server at
+128.32.137.8. If the transfer fails it will try 128.32.137.3 and continue
+trying the addresses, up to 10, listed on this line. The secondary copy is
+also authoritative for the specified domain. The first non-dotted-quad
+address on this line will be taken as a filename in which to backup the
+transferred zone. The name server will load the zone from this backup file
+if it exists when it boots, providing a complete copy even if the master
+servers are unreachable. Whenever a new copy of the domain is received by
+automatic zone transfer from one of the master servers, this file will be
+updated. If no file name is given, a temporary file will be used, and will
+be deleted after each successful zone transfer. This is not recommended
+since it is a needless waste of bandwidth. The second example ``secondary''
+line states that the address-to-hostname mapping for the subnet 128.32.136
+should be obtained from the same list of master servers as the previous zone.
+.LP
+The ``forwarders'' line specifies the addresses of sitewide servers that
+will accept recursive queries from other servers. If the boot file
+specifies one or more forwarders, then the server will send all queries for
+data not in the cache to the forwarders first. Each forwarder will be asked
+in turn until an answer is returned or the list is exhausted. If no answer
+is forthcoming from a forwarder, the server will continue as it would have
+without the forwarders line unless it is in ``forward-only'' mode. The
+forwarding facility is useful to cause a large sitewide cache to be
+generated on a master, and to reduce traffic over links to outside servers.
+It can also be used to allow servers to run that do not have direct access
+to the Internet, but wish to look up exterior names anyway.
+.LP
+The ``slave'' line (deprecated) is allowed for backward compatibility. Its
+meaning is identical to ``options forward-only''.
+.LP
+The ``sortlist'' line can be used to indicate networks that are to be
+preferred over other networks. Queries for host addresses from hosts on the
+same network as the server will receive responses with local network
+addresses listed first, then addresses on the sort list, then other
+addresses.
+.LP
+The ``xfrnets'' directive (not shown) can be used to implement primitive
+access control. If this directive is given, then your name server will
+only answer zone transfer requests from hosts which are on networks listed
+in your ``xfrnets'' directives. This directive may also be given as
+``tcplist'' for compatibility with older, interim servers.
+.LP
+The ``include'' directive (not shown) can be used to process the contents
+of some other file as though they appeared in place of the ``include''
+directive. This is useful if you have a lot of zones or if you have
+logical groupings of zones which are maintained by different people.
+The ``include'' directive takes one argument, that being the name of the
+file whose contents are to be included. No quotes are necessary around
+the file name.
+.LP
+The ``bogusns'' directive (not shown) tells \s-1BIND\s+1 that no queries
+are to be sent to the specified name server addresses (which are specified
+as dotted quads, not as domain names). This is useful when you know that
+some popular server has bad data in a zone or cache, and you want to avoid
+contamination while the problem is being fixed.
+.LP
+The ``limit'' directive can be used to change \s-1BIND\s+1's internal limits,
+some of which (\fBdatasize\fP, for example) are implemented by the system and
+others (like \fBtransfers-in\fP) by \s-1BIND\s+1 itself. The number following
+the limit name can be scaled by postfixing a ``k,'' ``m,'' or ``g'' for
+kilobytes, megabytes, and gigabytes respectively.
+\fBdatasize\fP's argument sets the process data size enforced by the kernel.
+\fINote:\fP not all systems provide a call to implement this -- on such
+systems, the use of the \fBdatasize\fP parameter of ``limit'' will result in
+a warning message.
+\fBtransfers-in\fP's argument is the number of \fInamed-xfer\fP subprocesses
+which \s-1BIND\s+1 will spawn at any one time.
+\fBtransfers-per-ns\fP's argument is the maximum number of zone transfers to
+be simultaneously initiated to any given remote name server.
+.LP
+The ``options'' directive introduces a boolean specifier that changes the
+behaviour of \s-1BIND\s+1. More than one option can be specified in a single
+directive. The currently defined options are as follows:
+\fBno-recursion\fP, which will cause \s-1BIND\s+1 to answer with a referral
+rather than actual data whenever it receives a query for a name it is not
+authoritative for -- don't set this on a server that is listed in any host's
+\fIresolv.conf\fP file;
+\fBno-fetch-glue\fP, which keeps \s-1BIND\s+1 from fetching missing glue when
+constructing the ``additional data'' section of a response; this can be used
+in conjunction with \fBno-recursion\fP to prevent \s-1BIND\s+1's cache from
+ever growing in size or becoming corrupted;
+\fBquery-log\fP, which causes all queries to be logged via
+syslog(8) -- this is a lot of data, don't turn it on lightly;
+\fBforward-only\fP, which causes the server to query only its forwarders --
+this option is normally used on machine that wishes to run a server but for
+physical or administrative reasons cannot be given access to the Internet;
+and \fBfake-iquery\fP, which tells \s-1BIND\s+1 to send back a useless and
+bogus reply to ``inverse queries'' rather than responding with an error --
+this is helpful if you have a lot of microcomputers or SunOS hosts or both.
+.LP
+The ``max-fetch'' directive (not shown) is allowed for backward compatibility;
+its meaning is identical to ``limit transfers-in''.
+.PP
+The master file consists of control information and a list of resource
+records for objects in the zone of the forms:
+.RS
+.nf
+
+$INCLUDE <filename> <opt_domain>
+$ORIGIN <domain>
+<domain> <opt_ttl> <opt_class> <type> <resource_record_data>
+
+.fi
+.RE
+where
+.I domain
+is "." for root, "@" for the current origin, or a standard domain
+name. If
+.I domain
+is a standard domain name that does not end with ``.'', the current origin
+is appended to the domain. Domain names ending with ``.'' are
+unmodified.
+The
+.I opt_domain
+field is used to define an origin for the data in an included file.
+It is equivalent to placing a $ORIGIN statement before the first
+line of the included file. The field is optional.
+Neither the
+.I opt_domain
+field nor $ORIGIN statements in the included file modify the current origin
+for this file.
+The
+.I opt_ttl
+field is an optional integer number for the time-to-live field.
+It defaults to zero, meaning the minimum value specified in the SOA
+record for the zone.
+The
+.I opt_class
+field is the object address type; currently only one type is supported,
+.BR IN ,
+for objects connected to the DARPA Internet.
+The
+.I type
+field contains one of the following tokens; the data expected in the
+.I resource_record_data
+field is in parentheses.
+.TP "\w'MINFO 'u"
+A
+a host address (dotted quad)
+.IP NS
+an authoritative name server (domain)
+.IP MX
+a mail exchanger (domain), preceded by a preference value (0..32767),
+with lower numeric values representing higher logical preferences.
+.IP CNAME
+the canonical name for an alias (domain)
+.IP SOA
+marks the start of a zone of authority (domain of originating host,
+domain address of maintainer, a serial number and the following
+parameters in seconds: refresh, retry, expire and minimum TTL (see RFC 883)).
+.IP NULL
+a null resource record (no format or data)
+.IP RP
+a Responsible Person for some domain name (mailbox, TXT-referral)
+.IP PTR
+a domain name pointer (domain)
+.IP HINFO
+host information (cpu_type OS_type)
+.PP
+Resource records normally end at the end of a line,
+but may be continued across lines between opening and closing parentheses.
+Comments are introduced by semicolons and continue to the end of the line.
+.PP
+Note that there are other resource record types, not shown here. You should
+consult the \s-1BIND\s+1 Operations Guide (``\s-1BOG\s+1'') for the complete
+list. Some resource record types may have been standardized in newer RFC's
+but not yet implemented in this version of \s-1BIND\s+1.
+.PP
+Each master zone file should begin with an SOA record for the zone.
+An example SOA record is as follows:
+.LP
+.nf
+@ IN SOA ucbvax.Berkeley.EDU. rwh.ucbvax.Berkeley.EDU. (
+ 1989020501 ; serial
+ 10800 ; refresh
+ 3600 ; retry
+ 3600000 ; expire
+ 86400 ) ; minimum
+.fi
+.LP
+The SOA specifies a serial number, which should be changed each time the
+master file is changed. Note that the serial number can be given as a
+dotted number, but this is a \fIvery\fP unwise thing to do since the
+translation to normal integers is via concatenation rather than
+multiplication and addition. You can spell out the year, month, day of
+month, and 0..99 version number and still fit inside the unsigned 32-bit
+size of this field. It's true that we will have to rethink this strategy in
+the year 4294 (Greg.) but we're not worried about it. Secondary servers
+check the serial number at intervals specified by the refresh time in
+seconds; if the serial number changes, a zone transfer will be done to load
+the new data. If a master server cannot be contacted when a refresh is due,
+the retry time specifies the interval at which refreshes should be attempted.
+If a master server cannot be contacted within the interval given by the
+expire time, all data from the zone is discarded by secondary servers. The
+minimum value is the time-to-live (``\s-1TTL\s+1'') used by records in the
+file with no explicit time-to-live value.
+.SH NOTES
+The boot file directives ``domain'' and ``suffixes'' have been
+obsoleted by a more useful resolver-based implementation of
+suffixing for partially qualified domain names. The prior mechanisms
+could fail under a number of situations, especially when then local
+nameserver did not have complete information.
+.sp
+The following signals have the specified effect when sent to the
+server process using the
+.IR kill (1)
+command.
+.IP SIGHUP
+Causes server to read named.boot and reload the database. If the server
+is built with the FORCED_RELOAD compile-time option, then SIGHUP will
+also cause the server to check the serial number on all secondary zones.
+Normally the serial numbers are only checked at the SOA-specified intervals.
+.IP SIGINT
+Dumps the current data base and cache to /var/tmp/named_dump.db
+.IP SIGIOT
+Dumps statistics data into /var/tmp/named.stats if the server is
+compiled with -DSTATS. Statistics data is appended to the file. Some
+systems use SIGABRT rather than SIGIOT for this.
+.IP SIGSYS
+Dumps the profiling data in /var/tmp if the server is compiled
+with profiling (server forks, chdirs and exits).
+.IP SIGTERM
+Dumps the primary and secondary database files.
+Used to save modified data on shutdown if the
+server is compiled with dynamic updating enabled.
+.IP SIGUSR1
+Turns on debugging; each SIGUSR1 increments debug level.
+(SIGEMT on older systems without SIGUSR1)
+.IP SIGUSR2
+Turns off debugging completely.
+(SIGFPE on older systems without SIGUSR2)
+.IP SIGWINCH
+Toggles logging of all incoming queries via syslog(8)
+(requires server to have been built with the QRYLOG option).
+.SH FILES
+.nf
+.ta \w'/var/tmp/named_dump.db 'u
+/etc/named.boot name server configuration boot file
+/etc/named.pid the process id (on older systems)
+/var/run/named.pid the process id (on newer systems)
+/var/tmp/named_dump.db dump of the name server database
+/var/tmp/named.run debug output
+/var/tmp/named.stats nameserver statistics data
+.fi
+.SH "SEE ALSO"
+kill(1), gethostbyname(3), signal(2),
+resolver(3), resolver(5), hostname(7),
+RFC 882, RFC 883, RFC 973, RFC 974, RFC 1033, RFC 1034, RFC 1035, RFC 1123,
+\fIName Server Operations Guide for \s-1BIND\s+1\fR
diff --git a/usr.sbin/named/man/named.reload.8 b/usr.sbin/named/man/named.reload.8
new file mode 100644
index 00000000000..9e3a66cdcea
--- /dev/null
+++ b/usr.sbin/named/man/named.reload.8
@@ -0,0 +1,71 @@
+.\" $NetBSD: named.reload.8,v 1.1 1996/02/02 15:27:42 mrg Exp $
+.\"
+.\" ++Copyright++ 1987, 1993
+.\" -
+.\" Copyright (c) 1987, 1993
+.\" The Regents of the University of California. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed by the University of
+.\" California, Berkeley and its contributors.
+.\" 4. Neither the name of the University nor the names of its contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\" -
+.\" Portions Copyright (c) 1993 by Digital Equipment Corporation.
+.\"
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies, and that
+.\" the name of Digital Equipment Corporation not be used in advertising or
+.\" publicity pertaining to distribution of the document or software without
+.\" specific, written prior permission.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
+.\" WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
+.\" CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+.\" DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+.\" PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+.\" ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+.\" SOFTWARE.
+.\" -
+.\" --Copyright--
+.\"
+.\" from hostname.7 6.4 (Berkeley) 1/16/90
+.\"
+.TH NAMED.RELOAD 8 "June 26, 1993"
+.UC 5
+.SH NAME
+named.reload \- cause the name server to synchronize its database
+.SH DESCRIPTION
+This command sends a \s-1SIGHUP\s+1 to the running name server. This
+signal is documented in
+.IR named (8).
+.SH BUGS
+Does not check to see if the name server is actually running, and could
+use a stale PID cache file which may result in the death of an unrelated
+process.
+.SH SEE ALSO
+named(8), named.restart(8)
diff --git a/usr.sbin/named/man/named.restart.8 b/usr.sbin/named/man/named.restart.8
new file mode 100644
index 00000000000..3bcc4b3ee6c
--- /dev/null
+++ b/usr.sbin/named/man/named.restart.8
@@ -0,0 +1,75 @@
+.\" $NetBSD: named.restart.8,v 1.1 1996/02/02 15:27:45 mrg Exp $
+.\"
+.\" ++Copyright++ 1987, 1993
+.\" -
+.\" Copyright (c) 1987, 1993
+.\" The Regents of the University of California. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed by the University of
+.\" California, Berkeley and its contributors.
+.\" 4. Neither the name of the University nor the names of its contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\" -
+.\" Portions Copyright (c) 1993 by Digital Equipment Corporation.
+.\"
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies, and that
+.\" the name of Digital Equipment Corporation not be used in advertising or
+.\" publicity pertaining to distribution of the document or software without
+.\" specific, written prior permission.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
+.\" WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
+.\" CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+.\" DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+.\" PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+.\" ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+.\" SOFTWARE.
+.\" -
+.\" --Copyright--
+.\"
+.\" from hostname.7 6.4 (Berkeley) 1/16/90
+.\"
+.TH NAMED.RESTART 8 "June 26, 1993"
+.UC 5
+.SH NAME
+named.restart \- stop and restart the name server
+.SH DESCRIPTION
+This command sends a \s-1SIGKILL\s+1 to the running name server and then
+starts a new one.
+.SH BUGS
+Does not check to see if the name server is actually running, and could
+use a stale PID cache file which may result in the death of an unrelated
+process.
+.PP
+Does not wait after killing the old server before starting a new one; since
+the server could take some time to die and the new one will experience a
+fatal error if the old one isn't gone by the time it starts, you can be left
+in a situation where you have no name server at all.
+.SH SEE ALSO
+named(8), named.reload(8)
diff --git a/usr.sbin/named/man/ndc.8 b/usr.sbin/named/man/ndc.8
new file mode 100644
index 00000000000..f8799e169a5
--- /dev/null
+++ b/usr.sbin/named/man/ndc.8
@@ -0,0 +1,129 @@
+.\" $NetBSD: ndc.8,v 1.1 1996/02/02 15:27:48 mrg Exp $
+.\"
+.\" Copyright (c) 1994
+.\" The Regents of the University of California. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed by the University of
+.\" California, Berkeley and its contributors.
+.\" 4. Neither the name of the University nor the names of its contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.TH NDC 8 "November 27, 1994"
+.UC 5
+.SH NAME
+ndc \- name daemon control interface
+.SH SYNOPSIS
+.B ndc
+.I directive
+[ ... ]
+.SH DESCRIPTION
+This command allows the name server administrator to send various signals
+to the name server, or to restart it. Zero or more directives may be given,
+from the following list:
+.TP
+.B status
+Displays the current status of
+.B named
+as shown by
+.BR ps (1).
+.TP
+.B dumpdb
+Causes
+.B named
+to dump its database and cache to
+.B /var/tmp/named_dump.db
+(uses the INT signal.)
+.TP
+.B reload
+Causes
+.B named
+to check the serial numbers of all primary and secondary zones
+and to reload those that have changed (uses the HUP signal.)
+.TP
+.B stats
+Causes
+.B named
+to dump its statistics to
+.B /var/tmp/named.stats
+(uses the IOT or ABRT signal.)
+.TP
+.B trace
+Causes
+.B named
+to increment its ``tracing level'' by one. Whenever the tracing level
+is nonzero, trace information will be written to
+.BR /var/tmp/named.run .
+Higher tracing levels result in more detailed information.
+(Uses the USR1 signal.)
+.TP
+.B notrace
+Causes
+.B named
+to set its ``tracing level'' to zero, closing
+.B /var/tmp/named.run
+if it is open (uses the USR2 signal.)
+.TP
+.B querylog
+Causes
+.B named
+to toggle the ``query logging'' feature, which while on will result in a
+.BR syslog (3)
+of each incoming query (uses the WINCH signal.) Note that query logging
+consumes quite a lot of log file space. This directive may also be given as
+.BR qrylog .
+.TP
+.B start
+Causes
+.B named
+to be started, as long as it isn't already running.
+.TP
+.B stop
+Causes
+.B named
+to be stopped, if it is running.
+.TP
+.B restart
+Causes
+.B named
+to be killed and restarted.
+.SH BUGS
+Arguments to
+.B named
+are not preserved by
+.BR restart ,
+or known by
+.BR start .
+Some mechanism for controlling the parameters and environment should exist.
+.PP
+Implemented as a
+.BR sh (1)
+script.
+.SH AUTHOR
+Paul Vixie (Internet Software Consortium)
+.SH SEE ALSO
+named(8),
+named.reload(8),
+named.restart(8)
diff --git a/usr.sbin/named/man/nslookup.8 b/usr.sbin/named/man/nslookup.8
new file mode 100644
index 00000000000..ca8189d53ca
--- /dev/null
+++ b/usr.sbin/named/man/nslookup.8
@@ -0,0 +1,388 @@
+.\" $NetBSD: nslookup.8,v 1.1 1996/02/02 15:27:51 mrg Exp $
+.\"
+.\" ++Copyright++ 1985, 1989
+.\" -
+.\" Copyright (c) 1985, 1989
+.\" The Regents of the University of California. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed by the University of
+.\" California, Berkeley and its contributors.
+.\" 4. Neither the name of the University nor the names of its contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\" -
+.\" Portions Copyright (c) 1993 by Digital Equipment Corporation.
+.\"
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies, and that
+.\" the name of Digital Equipment Corporation not be used in advertising or
+.\" publicity pertaining to distribution of the document or software without
+.\" specific, written prior permission.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
+.\" WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
+.\" CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+.\" DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+.\" PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+.\" ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+.\" SOFTWARE.
+.\" -
+.\" --Copyright--
+.\"
+.\" @(#)nslookup.8 5.3 (Berkeley) 6/24/90
+.\"
+.TH NSLOOKUP 8 "June 24, 1990"
+.UC 6
+.SH NAME
+nslookup \- query Internet name servers interactively
+.SH SYNOPSIS
+.B nslookup
+[
+.I \-option ...
+]
+[
+.I host-to-find
+| \- [
+.I server
+]]
+.SH DESCRIPTION
+.I Nslookup
+is a program to query Internet domain name servers.
+Nslookup has two modes: interactive and non-interactive.
+Interactive mode allows the user to query name servers for
+information about various hosts and domains or to print a list of hosts
+in a domain.
+Non-interactive mode is used to print just the name and requested information
+for a host or domain.
+.sp 1
+.SH ARGUMENTS
+Interactive mode is entered in the following cases:
+.IP a) 4
+when no arguments are given (the default name server will be used),
+.IP b) 4
+when the first argument is a hyphen (\-) and the second argument
+is the host name or Internet address of a name server.
+.LP
+Non-interactive mode is used when the name or Internet address
+of the host to be looked up
+is given as the first argument. The optional second argument specifies
+the host name or address of a name server.
+.LP
+The options listed under the ``set'' command below can be specified in
+the .nslookuprc file in the user's home directory if they are listed
+one per line. Options can also be specified
+on the command line if they precede the arguments and are prefixed with
+a hyphen. For example, to change the default query type to host information,
+and the initial timeout to 10 seconds, type:
+.sp .5v
+ nslookup \-query=hinfo \-timeout=10
+.sp .5v
+.SH "INTERACTIVE COMMANDS"
+Commands may be interrupted at any time by typing a control-C.
+To exit, type a control-D (EOF) or type exit.
+The command line length must be less than 256 characters.
+To treat a built-in command as a host name,
+precede it with an escape character (\e).
+\fBN.B.\fP an unrecognized command will be interpreted as a host name.
+.sp .5v
+.IP "\fIhost\fP [\fIserver\fP]"
+Look up information for \fIhost\fP using the current default server
+or using \fIserver\fP if specified.
+If \fIhost\fP is an Internet address and the query type is A or PTR, the
+name of the host is returned.
+If \fIhost\fP is a name and does not have a trailing period, the default
+domain name is appended to the name. (This behavior depends on the state of the
+\fBset\fP options \fBdomain\fP, \fBsrchlist\fP,
+\fBdefname\fP, and \fBsearch\fP).
+To look up a host not in the current domain, append a period to
+the name.
+.sp 1
+.IP "\fBserver\fP \fIdomain\fP"
+.ns
+.IP "\fBlserver\fP \fIdomain\fP"
+Change the default server to \fIdomain\fP.
+\fBLserver\fP uses the initial server to look up
+information about \fIdomain\fP while \fBserver\fP
+uses the current default server.
+If an authoritative answer can't be found, the names of servers
+that might have the answer are returned.
+.sp 1
+.IP \fBroot\fP
+Changes the default server to the server for the root of the domain name space.
+Currently, the host ns.internic.net is used.
+(This command is a synonym for \fBlserver ns.internic.net.\fP)
+The name of the root server can be changed with the \fBset root\fP command.
+.sp 1
+.IP "\fBfinger\fP [\fIname\fP] [\fB>\fP \fIfilename\fP]"
+.ns
+.IP "\fBfinger\fP [\fIname\fP] [\fB>>\fP \fIfilename\fP]"
+Connects with the finger server on the current host.
+The current host is defined when a previous lookup for a host
+was successful and returned address information (see the
+\fBset querytype=A\fP command).
+\fIName\fP is optional.
+\fB>\fP and \fB>>\fP can be used to redirect output in the
+usual manner.
+.sp 1
+.IP "\fBls\fR [\fIoption\fR] \fIdomain\fR [\fB>\fR \fIfilename\fR]"
+.ns
+.IP "\fBls\fR [\fIoption\fR] \fIdomain\fR [\fB>>\fR \fIfilename\fR]"
+List the information available for \fIdomain\fP, optionally creating
+or appending to \fIfilename\fP.
+The default output contains host names and their Internet addresses.
+.I Option
+can be one of the following:
+.RS
+.IP "\fB\-t \fIquerytype\fP" 4
+lists all records of the specified type (see \fIquerytype\fP below).
+.IP \fB\-a\fP 4
+lists aliases of hosts in the domain.
+synonym for \fB\-t\ \ CNAME\fP.
+.IP \fB\-d\fP 4
+lists all records for the domain.
+synonym for \fB\-t\ \ ANY\fP.
+.IP \fB\-h\fP 4
+lists CPU and operating system information for the domain.
+synonym for \fB\-t\ \ HINFO\fP.
+.IP \fB\-s\fP 4
+lists well-known services of hosts in the domain.
+synonym for \fB\-t\ \ WKS\fP.
+.P
+When output is directed to a file, hash marks are printed for every
+50 records received from the server.
+.RE
+.sp 1
+.IP "\fBview\fP \fIfilename\fP"
+Sorts and lists the output of previous \fBls\fP command(s) with
+\fImore\fP(1).
+.sp 1
+.ne 4
+.IP "\fBhelp\fP"
+.ns
+.IP "\fB?\fP"
+Prints a brief summary of commands.
+.sp 1
+.IP "\fBexit\fP"
+Exits the program.
+.sp 1
+.IP "\fBset\fP \fIkeyword\fP[=\fIvalue\fP]"
+This command is used to change state information that affects the lookups.
+Valid keywords are:
+.RS
+.IP "\fBall\fP"
+Prints the current values of the frequently-used options to \fBset\fP.
+Information about the current default server and host is also printed.
+.IP "\fBclass=\fIvalue\fR"
+Change the query class to one of:
+.RS
+.IP IN 10
+the Internet class.
+.IP CHAOS 10
+the Chaos class.
+.IP HESIOD 10
+the MIT Athena Hesiod class.
+.IP ANY 10
+wildcard (any of the above).
+.P
+The class specifies the protocol group of the information.
+.br
+(Default = IN, abbreviation = cl)
+.RE
+.IP "\fB[no]debug\fP"
+Turn debugging mode on. A lot more information is printed about the
+packet sent to the server and the resulting answer.
+.br
+(Default = nodebug, abbreviation = [no]deb)
+.IP "\fB[no]d2\fP"
+Turn exhaustive debugging mode on.
+Essentially all fields of every packet are printed.
+.br
+(Default = nod2)
+.IP "\fBdomain=\fIname\fR"
+Change the default domain name to \fIname\fP.
+The default domain name is appended to a lookup request depending on the
+state of the \fBdefname\fP and \fBsearch\fP options.
+The domain search list contains the parents of the default domain if it has
+at least two components in its name.
+For example, if the default domain
+is CC.Berkeley.EDU, the search list is CC.Berkeley.EDU and Berkeley.EDU.
+Use the \fBset srchlist\fP command to specify a different list.
+Use the \fBset all\fP command to display the list.
+.br
+(Default = value from hostname, /etc/resolv.conf or LOCALDOMAIN,
+abbreviation = do)
+.IP "\fBsrchlist=\fIname1/name2/...\fR"
+Change the default domain name to \fIname1\fP and the domain search list
+to \fIname1\fP, \fIname2\fP, etc. A maximum of 6 names separated by slashes (/)
+can be specified.
+For example,
+.sp .5v
+ set\ srchlist=lcs.MIT.EDU/ai.MIT.EDU/MIT.EDU
+.sp .5v
+sets the domain to lcs.MIT.EDU and the search list to the three names.
+This command overrides the
+default domain name and search list of the \fBset domain\fP command.
+Use the \fBset all\fP command to display the list.
+.br
+(Default = value based on hostname, /etc/resolv.conf or LOCALDOMAIN,
+abbreviation = srchl)
+.IP "\fB[no]defname\fP"
+If set, append the default domain name to a single-component lookup request
+(i.e., one that does not contain a period).
+.br
+(Default = defname, abbreviation = [no]def)
+.IP "\fB[no]search\fP"
+If the lookup request contains at least one period but doesn't end
+with a trailing period,
+append the domain names in the domain search list
+to the request until an answer is received.
+.br
+(Default = search, abbreviation = [no]sea)
+.IP "\fBport=\fIvalue\fR"
+Change the default TCP/UDP name server port to \fIvalue\fP.
+.br
+(Default = 53, abbreviation = po)
+.IP "\fBquerytype=\fIvalue\fR"
+.ns
+.IP "\fBtype=\fIvalue\fR"
+.ns
+Change the type of information query to one of:
+.RS
+.IP A 10
+the host's Internet address.
+.IP CNAME 10
+the canonical name for an alias.
+.IP HINFO 10
+the host CPU and operating system type.
+.IP MINFO 10
+the mailbox or mail list information.
+.IP MX 10
+the mail exchanger.
+.IP NS 10
+the name server for the named zone.
+.IP PTR 10
+the host name if the query is an Internet address,
+otherwise the pointer to other information.
+.IP SOA 10
+the domain's ``start-of-authority'' information.
+.IP TXT 10
+the text information.
+.IP UINFO 10
+the user information.
+.IP WKS 10
+the supported well-known services.
+.P
+Other types (ANY, AXFR, MB, MD, MF, NULL) are described in the
+RFC-1035 document.
+.br
+(Default = A, abbreviations = q, ty)
+.RE
+.IP "\fB[no]recurse\fP"
+Tell the name server to query other servers if it does not have the
+information.
+.br
+(Default = recurse, abbreviation = [no]rec)
+.IP \fBretry=\fInumber\fR
+Set the number of retries to \fInumber\fP.
+When a reply to a request is not received within a certain
+amount of time (changed with \fBset timeout\fP),
+the timeout period is doubled and the request is resent.
+The retry value controls how many times a request is resent before giving up.
+.br
+(Default = 4, abbreviation = ret)
+.IP \fBroot=\fIhost\fR
+Change the name of the root server to \fIhost\fP. This
+affects the \fBroot\fP command.
+.br
+(Default = ns.internic.net., abbreviation = ro)
+.IP \fBtimeout=\fInumber\fR
+Change the initial timeout interval
+for waiting for a reply
+to \fInumber\fP seconds.
+Each retry doubles the timeout period.
+.br
+(Default = 5 seconds, abbreviation = ti)
+.IP "\fB[no]vc\fP"
+Always use a virtual circuit when sending requests to the server.
+.br
+(Default = novc, abbreviation = [no]v)
+.IP "\fB[no]ignoretc\fP"
+Ignore packet truncation errors.
+.br
+(Default = noignoretc, abbreviation = [no]ig)
+.RE
+.SH DIAGNOSTICS
+If the lookup request was not successful, an error message is printed.
+Possible errors are:
+.IP "Timed out" 5
+The server did not respond to a request after a certain amount of
+time (changed with \fBset timeout=\fIvalue\fR)
+and a certain number of retries (changed with \fBset retry=\fIvalue\fR).
+.IP "No response from server" 5
+No name server is running on the server machine.
+.IP "No records" 5
+The server does not have resource records of the current query type for the
+host, although the host name is valid.
+The query type is specified with the \fBset querytype\fP command.
+.IP "Non-existent domain" 5
+The host or domain name does not exist.
+.IP "Connection refused" 5
+.ns
+.IP "Network is unreachable" 5
+The connection to the name or finger server could not be made
+at the current time.
+This error commonly occurs with \fBls\fP and \fBfinger\fP requests.
+.IP "Server failure" 5
+The name server found an internal inconsistency in its database
+and could not return a valid answer.
+.IP "Refused" 5
+The name server refused to service the request.
+.IP "Format error" 5
+The name server found that the request packet was not in the proper format.
+It may indicate an error in \fInslookup\fP.
+.sp 1
+.SH FILES
+.ta \w'/usr/share/misc/nslookup.helpXXX'u
+/etc/resolv.conf initial domain name and
+ name server addresses.
+.br
+$HOME/.nslookuprc user's initial options.
+.br
+/usr/share/misc/nslookup.help summary of commands.
+.SH ENVIRONMENT
+.ta \w'HOSTALIASESXXXX'u
+HOSTALIASES file containing host aliases.
+.br
+LOCALDOMAIN overrides default domain.
+.SH SEE ALSO
+resolver(3), resolver(5), named(8),
+.br
+RFC-1034 ``Domain Names \- Concepts and Facilities''
+.br
+RFC-1035 ``Domain Names \- Implementation and Specification''
+.SH AUTHOR
+Andrew Cherenson
diff --git a/usr.sbin/named/man/resolver.3 b/usr.sbin/named/man/resolver.3
new file mode 100644
index 00000000000..6372823e11f
--- /dev/null
+++ b/usr.sbin/named/man/resolver.3
@@ -0,0 +1,305 @@
+.\" $NetBSD: resolver.3,v 1.1 1996/02/02 15:27:53 mrg Exp $
+.\"
+.\" Copyright (c) 1985, 1995 The Regents of the University of California.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms are permitted provided
+.\" that: (1) source distributions retain this entire copyright notice and
+.\" comment, and (2) distributions including binaries display the following
+.\" acknowledgement: ``This product includes software developed by the
+.\" University of California, Berkeley and its contributors'' in the
+.\" documentation or other materials provided with the distribution and in
+.\" all advertising materials mentioning features or use of this software.
+.\" Neither the name of the University nor the names of its contributors may
+.\" be used to endorse or promote products derived from this software without
+.\" specific prior written permission.
+.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
+.\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+.\"
+.\" @(#)resolver.3 6.5 (Berkeley) 6/23/90
+.\" $Id: resolver.3,v 8.3 1995/12/22 10:20:28 vixie Exp
+.\"
+.TH RESOLVER 3 "December 11, 1995
+.UC 4
+.SH NAME
+res_query, res_search, res_mkquery, res_send, res_init, dn_comp, dn_expand \- resolver routines
+.SH SYNOPSIS
+.B #include <sys/types.h>
+.br
+.B #include <netinet/in.h>
+.br
+.B #include <arpa/nameser.h>
+.br
+.B #include <resolv.h>
+.PP
+.B "res_query(dname, class, type, answer, anslen)"
+.br
+.B const char *dname;
+.br
+.B int class, type;
+.br
+.B u_char *answer;
+.br
+.B int anslen;
+.PP
+.B "res_search(dname, class, type, answer, anslen)"
+.br
+.B const char *dname;
+.br
+.B int class, type;
+.br
+.B u_char *answer;
+.br
+.B int anslen;
+.PP
+.B "res_mkquery(op, dname, class, type, data, datalen, newrr, buf, buflen)"
+.br
+.B int op;
+.br
+.B const char *dname;
+.br
+.B int class, type;
+.br
+.B const char *data;
+.br
+.B int datalen;
+.br
+.B struct rrec *newrr;
+.br
+.B u_char *buf;
+.br
+.B int buflen;
+.PP
+.B res_send(msg, msglen, answer, anslen)
+.br
+.B const u_char *msg;
+.br
+.B int msglen;
+.br
+.B u_char *answer;
+.br
+.B int anslen;
+.PP
+.B res_init()
+.PP
+.B dn_comp(exp_dn, comp_dn, length, dnptrs, lastdnptr)
+.br
+.B const char *exp_dn;
+.br
+.B u_char *comp_dn;
+.br
+.B int length;
+.br
+.B u_char **dnptrs, **lastdnptr;
+.PP
+.B dn_expand(msg, eomorig, comp_dn, exp_dn, length)
+.br
+.B const u_char *msg, *eomorig, *comp_dn;
+.br
+.B char *exp_dn;
+.br
+.B int length;
+.SH DESCRIPTION
+These routines are used for making, sending and interpreting
+query and reply messages with Internet domain name servers.
+.PP
+Global configuration and state information that is used by the
+resolver routines is kept in the structure
+.IR _res .
+Most of the values have reasonable defaults and can be ignored.
+Options
+stored in
+.I _res.options
+are defined in
+.I resolv.h
+and are as follows.
+Options are stored as a simple bit mask containing the bitwise ``or''
+of the options enabled.
+.IP RES_INIT
+True if the initial name server address and default domain name are
+initialized (i.e.,
+.I res_init
+has been called).
+.IP RES_DEBUG
+Print debugging messages.
+.IP RES_AAONLY
+Accept authoritative answers only.
+With this option,
+.I res_send
+should continue until it finds an authoritative answer or finds an error.
+Currently this is not implemented.
+.IP RES_USEVC
+Use TCP connections for queries instead of UDP datagrams.
+.IP RES_STAYOPEN
+Used with RES_USEVC to keep the TCP connection open between
+queries.
+This is useful only in programs that regularly do many queries.
+UDP should be the normal mode used.
+.IP RES_IGNTC
+Unused currently (ignore truncation errors, i.e., don't retry with TCP).
+.IP RES_RECURSE
+Set the recursion-desired bit in queries.
+This is the default.
+(\c
+.I res_send
+does not do iterative queries and expects the name server
+to handle recursion.)
+.IP RES_DEFNAMES
+If set,
+.I res_search
+will append the default domain name to single-component names
+(those that do not contain a dot).
+This option is enabled by default.
+.IP RES_DNSRCH
+If this option is set,
+.I res_search
+will search for host names in the current domain and in parent domains; see
+.IR hostname (7).
+This is used by the standard host lookup routine
+.IR gethostbyname (3).
+This option is enabled by default.
+.IP RES_NOALIASES
+This option turns off the user level aliasing feature controlled by
+the HOSTALIASES environment variable. Network daemons should set this option.
+.PP
+The
+.I res_init
+routine
+reads the configuration file (if any; see
+.IR resolver (5))
+to get the default domain name,
+search list and
+the Internet address of the local name server(s).
+If no server is configured, the host running
+the resolver is tried.
+The current domain name is defined by the hostname
+if not specified in the configuration file;
+it can be overridden by the environment variable LOCALDOMAIN.
+This environment variable may contain several blank-separated
+tokens if you wish to override the
+.I "search list"
+on a per-process basis. This is similar to the
+.I search
+command in the configuration file.
+Another environment variable (``RES_OPTIONS'') can be set to
+override certain internal resolver options which are otherwise
+set by changing fields in the
+.I _res
+structure or are inherited from the configuration file's
+.I options
+command. The syntax of the ``RES_OPTIONS'' environment variable
+is explained in
+.IR resolver (5).
+Initialization normally occurs on the first call
+to one of the other resolver routines.
+.PP
+The
+.I res_query
+function provides an interface to the server query mechanism.
+It constructs a query, sends it to the local server,
+awaits a response, and makes preliminary checks on the reply.
+The query requests information of the specified
+.I type
+and
+.I class
+for the specified fully-qualified domain name
+.I dname .
+The reply message is left in the
+.I answer
+buffer with length
+.I anslen
+supplied by the caller.
+.PP
+The
+.I res_search
+routine makes a query and awaits a response like
+.IR res_query ,
+but in addition, it implements the default and search rules
+controlled by the RES_DEFNAMES and RES_DNSRCH options.
+It returns the first successful reply.
+.PP
+The remaining routines are lower-level routines used by
+.IR res_query .
+The
+.I res_mkquery
+function
+constructs a standard query message and places it in
+.IR buf .
+It returns the size of the query, or \-1 if the query is
+larger than
+.IR buflen .
+The query type
+.I op
+is usually QUERY, but can be any of the query types defined in
+.IR <arpa/nameser.h> .
+The domain name for the query is given by
+.IR dname .
+.I Newrr
+is currently unused but is intended for making update messages.
+.PP
+The
+.I res_send
+routine
+sends a pre-formatted query and returns an answer.
+It will call
+.I res_init
+if RES_INIT is not set, send the query to the local name server, and
+handle timeouts and retries.
+The length of the reply message is returned, or
+\-1 if there were errors.
+.PP
+The
+.I dn_comp
+function
+compresses the domain name
+.I exp_dn
+and stores it in
+.IR comp_dn .
+The size of the compressed name is returned or \-1 if there were errors.
+The size of the array pointed to by
+.I comp_dn
+is given by
+.IR length .
+The compression uses
+an array of pointers
+.I dnptrs
+to previously-compressed names in the current message.
+The first pointer points to
+to the beginning of the message and the list ends with NULL.
+The limit to the array is specified by
+.IR lastdnptr .
+A side effect of
+.I dn_comp
+is to update the list of pointers for
+labels inserted into the message
+as the name is compressed.
+If
+.I dnptr
+is NULL, names are not compressed.
+If
+.I lastdnptr
+is NULL, the list of labels is not updated.
+.PP
+The
+.I dn_expand
+entry
+expands the compressed domain name
+.I comp_dn
+to a full domain name
+The compressed name is contained in a query or reply message;
+.I msg
+is a pointer to the beginning of the message.
+The uncompressed name is placed in the buffer indicated by
+.I exp_dn
+which is of size
+.IR length .
+The size of compressed name is returned or \-1 if there was an error.
+.SH FILES
+/etc/resolv.conf see resolver(5)
+.SH "SEE ALSO"
+gethostbyname(3), named(8), resolver(5), hostname(7),
+.br
+RFC1032, RFC1033, RFC1034, RFC1035, RFC974,
+.br
+SMM:11 Name Server Operations Guide for BIND
diff --git a/usr.sbin/named/man/resolver.5 b/usr.sbin/named/man/resolver.5
new file mode 100644
index 00000000000..20b54f57378
--- /dev/null
+++ b/usr.sbin/named/man/resolver.5
@@ -0,0 +1,135 @@
+.\" $NetBSD: resolver.5,v 1.1 1996/02/02 15:27:55 mrg Exp $
+.\"
+.\" Copyright (c) 1986 The Regents of the University of California.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms are permitted
+.\" provided that the above copyright notice and this paragraph are
+.\" duplicated in all such forms and that any documentation,
+.\" advertising materials, and other materials related to such
+.\" distribution and use acknowledge that the software was developed
+.\" by the University of California, Berkeley. The name of the
+.\" University may not be used to endorse or promote products derived
+.\" from this software without specific prior written permission.
+.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+.\"
+.\" @(#)resolver.5 5.9 (Berkeley) 12/14/89
+.\" $Id: resolver.5,v 8.3 1995/12/06 20:34:35 vixie Exp
+.\"
+.TH RESOLVER 5 ""November 11, 1993""
+.UC 4
+.SH NAME
+resolver \- resolver configuration file
+.SH SYNOPSIS
+/etc/resolv.conf
+.SH DESCRIPTION
+.LP
+The
+.I resolver
+is a set of routines in the C library (\c
+.IR resolv (3))
+that provide access to the Internet Domain Name System.
+The resolver configuration file contains information that is read
+by the resolver routines the first time they are invoked by a process.
+The file is designed to be human readable and contains a list of
+keywords with values that provide various types of resolver information.
+.LP
+On a normally configured system this file should not be necessary.
+The only name server to be queried will be on the local machine,
+the domain name is determined from the host name,
+and the domain search path is constructed from the domain name.
+.LP
+The different configuration options are:
+.TP
+\fBnameserver\fP
+Internet address (in dot notation) of a name server
+that the resolver should query.
+Up to MAXNS (currently 3) name servers may be listed,
+one per keyword.
+If there are multiple servers,
+the resolver library queries them in the order listed.
+If no \fBnameserver\fP entries are present,
+the default is to use the name server on the local machine.
+(The algorithm used is to try a name server, and if the query times out,
+try the next, until out of name servers,
+then repeat trying all the name servers
+until a maximum number of retries are made).
+.TP
+\fBdomain\fP
+Local domain name.
+Most queries for names within this domain can use short names
+relative to the local domain.
+If no \fBdomain\fP entry is present, the domain is determined
+from the local host name returned by
+\fIgethostname\fP\|(2);
+the domain part is taken to be everything after the first `.'.
+Finally, if the host name does not contain a domain part, the root
+domain is assumed.
+.TP
+\fBsearch\fP
+Search list for host-name lookup.
+The search list is normally determined from the local domain name;
+by default, it contains only the local domain name.
+This may be changed by listing the desired domain search path
+following the \fIsearch\fP keyword with spaces or tabs separating
+the names.
+Most resolver queries will be attempted using each component
+of the search path in turn until a match is found.
+Note that this process may be slow and will generate a lot of network
+traffic if the servers for the listed domains are not local,
+and that queries will time out if no server is available
+for one of the domains.
+.IP
+The search list is currently limited to six domains
+with a total of 256 characters.
+.TP
+\fBsortlist\fP
+Sortlist allows addresses returned by gethostbyname to be sorted.
+A sortlist is specified by IP address netmask pairs. The netmask is
+optional and defaults to the natural netmask of the net. The IP address
+and optional network pairs are separated by slashes. Up to 10 pairs may
+be specified.
+.IP
+e.g. sortlist 130.155.160.0/255.255.240.0 130.155.0.0
+.TP
+\fBoptions\fP
+Options allows certain internal resolver variables to be modified.
+The syntax is
+.IP
+\fBoptions\fP \fIoption\fP \fI...\fP
+.IP
+where \fIoption\fP is one of the following:
+.IP
+\fBdebug\fP \(em sets RES_DEBUG in _res.options.
+.IP
+\fBndots:\fP\fIn\fP \(em sets a threshold for the number of dots which
+must appear in a name given to \fBres_query\fP (see \fIresolver\fP(3))
+before an \fIinitial absolute query\fP will be made. The default for
+\fIn\fP is ``1'', meaning that if there are any dots in a name, the name
+will be tried first as an absolute name before any \fIsearch list\fP
+elements are appended to it.
+.LP
+The \fIdomain\fP and \fIsearch\fP keywords are mutually exclusive.
+If more than one instance of these keywords is present,
+the last instance wins.
+.LP
+The \fIsearch\fP keyword of a system's \fIresolv.conf\fP file can be
+overridden on a per-process basis by setting the environment variable
+``\s-1LOCALDOMAIN\s+1'' to a space-separated list of search domains.
+.LP
+The \fIoptions\fP keyword of a system's \fIresolv.conf\fP file can be
+amended on a per-process basis by setting the environment variable
+``\s-1RES_OPTIONS\s+1'' to a space-separated list of resolver options
+as explained above under \fBoptions\fP.
+.LP
+The keyword and value must appear on a single line, and the keyword
+(e.g. \fBnameserver\fP) must start the line. The value follows
+the keyword, separated by white space.
+.SH FILES
+.I /etc/resolv.conf
+.SH SEE ALSO
+gethostbyname(3), resolver(3), hostname(7), named(8)
+.br
+Name Server Operations Guide for BIND