summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2019-12-17 06:44:27 +0000
committerderaadt <deraadt@openbsd.org>2019-12-17 06:44:27 +0000
commit36650ed8b38fee257715c3d13dc972b70aa410c6 (patch)
treeb48ae94de9c3a5b1158ce1bb7742f3f175e823b0
parentDon't look up env variables until we know we'll trust them. Otherwise, (diff)
downloadwireguard-openbsd-36650ed8b38fee257715c3d13dc972b70aa410c6.tar.xz
wireguard-openbsd-36650ed8b38fee257715c3d13dc972b70aa410c6.zip
what is docbook?
-rw-r--r--usr.sbin/bind/bin/dig/dig.docbook1274
-rw-r--r--usr.sbin/bind/bin/dig/host.docbook401
-rw-r--r--usr.sbin/bind/bin/dig/nslookup.docbook510
-rw-r--r--usr.sbin/bind/isc-config.sh.docbook155
-rw-r--r--usr.sbin/bind/lib/lwres/man/lwres.docbook262
-rw-r--r--usr.sbin/bind/lib/lwres/man/lwres_buffer.docbook391
-rw-r--r--usr.sbin/bind/lib/lwres/man/lwres_config.docbook169
-rw-r--r--usr.sbin/bind/lib/lwres/man/lwres_context.docbook260
-rw-r--r--usr.sbin/bind/lib/lwres/man/lwres_gabn.docbook258
-rw-r--r--usr.sbin/bind/lib/lwres/man/lwres_gai_strerror.docbook196
-rw-r--r--usr.sbin/bind/lib/lwres/man/lwres_getaddrinfo.docbook385
-rw-r--r--usr.sbin/bind/lib/lwres/man/lwres_gethostent.docbook437
-rw-r--r--usr.sbin/bind/lib/lwres/man/lwres_getipnode.docbook327
-rw-r--r--usr.sbin/bind/lib/lwres/man/lwres_getnameinfo.docbook201
-rw-r--r--usr.sbin/bind/lib/lwres/man/lwres_getrrsetbyname.docbook219
-rw-r--r--usr.sbin/bind/lib/lwres/man/lwres_gnba.docbook259
-rw-r--r--usr.sbin/bind/lib/lwres/man/lwres_hstrerror.docbook148
-rw-r--r--usr.sbin/bind/lib/lwres/man/lwres_inetntop.docbook118
-rw-r--r--usr.sbin/bind/lib/lwres/man/lwres_noop.docbook253
-rw-r--r--usr.sbin/bind/lib/lwres/man/lwres_packet.docbook287
-rw-r--r--usr.sbin/bind/lib/lwres/man/lwres_resutil.docbook234
21 files changed, 0 insertions, 6744 deletions
diff --git a/usr.sbin/bind/bin/dig/dig.docbook b/usr.sbin/bind/bin/dig/dig.docbook
deleted file mode 100644
index 8e6c31a2787..00000000000
--- a/usr.sbin/bind/bin/dig/dig.docbook
+++ /dev/null
@@ -1,1274 +0,0 @@
-<!DOCTYPE book [
-<!ENTITY mdash "&#8212;">]>
-<!--
- - Copyright (C) Internet Systems Consortium, Inc. ("ISC")
- -
- - Permission to use, copy, modify, and/or 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.
- -
- - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- - AND FITNESS. IN NO EVENT SHALL ISC 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.
--->
-
-<!-- Converted by db4-upgrade version 1.0 -->
-<refentry xmlns:db="http://docbook.org/ns/docbook" version="5.0" xml:id="man.dig">
- <info>
- <date>2014-02-19</date>
- </info>
- <refentryinfo>
- <corpname>ISC</corpname>
- <corpauthor>Internet Systems Consortium, Inc.</corpauthor>
- </refentryinfo>
-
- <refmeta>
- <refentrytitle>dig</refentrytitle>
- <manvolnum>1</manvolnum>
- <refmiscinfo>BIND9</refmiscinfo>
- </refmeta>
-
- <refnamediv>
- <refname>dig</refname>
- <refpurpose>DNS lookup utility</refpurpose>
- </refnamediv>
-
- <docinfo>
- <copyright>
- <year>2000</year>
- <year>2001</year>
- <year>2002</year>
- <year>2003</year>
- <year>2004</year>
- <year>2005</year>
- <year>2006</year>
- <year>2007</year>
- <year>2008</year>
- <year>2009</year>
- <year>2010</year>
- <year>2011</year>
- <year>2013</year>
- <year>2014</year>
- <year>2015</year>
- <year>2016</year>
- <year>2017</year>
- <year>2018</year>
- <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
- </copyright>
- </docinfo>
-
- <refsynopsisdiv>
- <cmdsynopsis sepchar=" ">
- <command>dig</command>
- <arg choice="opt" rep="norepeat">@server</arg>
- <arg choice="opt" rep="norepeat"><option>-b <replaceable class="parameter">address</replaceable></option></arg>
- <arg choice="opt" rep="norepeat"><option>-c <replaceable class="parameter">class</replaceable></option></arg>
- <arg choice="opt" rep="norepeat"><option>-f <replaceable class="parameter">filename</replaceable></option></arg>
- <arg choice="opt" rep="norepeat"><option>-k <replaceable class="parameter">filename</replaceable></option></arg>
- <arg choice="opt" rep="norepeat"><option>-m</option></arg>
- <arg choice="opt" rep="norepeat"><option>-p <replaceable class="parameter">port#</replaceable></option></arg>
- <arg choice="opt" rep="norepeat"><option>-q <replaceable class="parameter">name</replaceable></option></arg>
- <arg choice="opt" rep="norepeat"><option>-t <replaceable class="parameter">type</replaceable></option></arg>
- <arg choice="opt" rep="norepeat"><option>-v</option></arg>
- <arg choice="opt" rep="norepeat"><option>-x <replaceable class="parameter">addr</replaceable></option></arg>
- <arg choice="opt" rep="norepeat"><option>-y <replaceable class="parameter"><optional>hmac:</optional>name:key</replaceable></option></arg>
- <group choice="opt" rep="norepeat">
- <arg choice="opt" rep="norepeat"><option>-4</option></arg>
- <arg choice="opt" rep="norepeat"><option>-6</option></arg>
- </group>
- <arg choice="opt" rep="norepeat">name</arg>
- <arg choice="opt" rep="norepeat">type</arg>
- <arg choice="opt" rep="norepeat">class</arg>
- <arg choice="opt" rep="repeat">queryopt</arg>
- </cmdsynopsis>
-
- <cmdsynopsis sepchar=" ">
- <command>dig</command>
- <arg choice="opt" rep="norepeat"><option>-h</option></arg>
- </cmdsynopsis>
-
- <cmdsynopsis sepchar=" ">
- <command>dig</command>
- <arg choice="opt" rep="repeat">global-queryopt</arg>
- <arg choice="opt" rep="repeat">query</arg>
- </cmdsynopsis>
- </refsynopsisdiv>
-
- <refsection><info><title>DESCRIPTION</title></info>
-
- <para><command>dig</command> is a flexible tool
- for interrogating DNS name servers. It performs DNS lookups and
- displays the answers that are returned from the name server(s) that
- were queried. Most DNS administrators use <command>dig</command> to
- troubleshoot DNS problems because of its flexibility, ease of use and
- clarity of output. Other lookup tools tend to have less functionality
- than <command>dig</command>.
- </para>
-
- <para>
- Although <command>dig</command> is normally used with
- command-line
- arguments, it also has a batch mode of operation for reading lookup
- requests from a file. A brief summary of its command-line arguments
- and options is printed when the <option>-h</option> option is given.
- Unlike earlier versions, the BIND 9 implementation of
- <command>dig</command> allows multiple lookups to be issued
- from the
- command line.
- </para>
-
- <para>
- Unless it is told to query a specific name server,
- <command>dig</command> will try each of the servers listed in
- <filename>/etc/resolv.conf</filename>. If no usable server addresses
- are found, <command>dig</command> will send the query to the local
- host.
- </para>
-
- <para>
- When no command line arguments or options are given,
- <command>dig</command> will perform an NS query for "." (the root).
- </para>
-
- <para>
- It is possible to set per-user defaults for <command>dig</command> via
- <filename>${HOME}/.digrc</filename>. This file is read and
- any options in it
- are applied before the command line arguments.
- </para>
-
- <para>
- The IN and CH class names overlap with the IN and CH top level
- domain names. Either use the <option>-t</option> and
- <option>-c</option> options to specify the type and class,
- use the <option>-q</option> the specify the domain name, or
- use "IN." and "CH." when looking up these top level domains.
- </para>
-
- </refsection>
-
- <refsection><info><title>SIMPLE USAGE</title></info>
-
-
- <para>
- A typical invocation of <command>dig</command> looks like:
- <programlisting> dig @server name type </programlisting>
- where:
-
- <variablelist>
-
- <varlistentry>
- <term><constant>server</constant></term>
- <listitem>
- <para>
- is the name or IP address of the name server to query. This
- can be an IPv4 address in dotted-decimal notation or an IPv6
- address in colon-delimited notation. When the supplied
- <parameter>server</parameter> argument is a hostname,
- <command>dig</command> resolves that name before querying
- that name server.
- </para>
- <para>
- If no <parameter>server</parameter> argument is
- provided, <command>dig</command> consults
- <filename>/etc/resolv.conf</filename>; if an
- address is found there, it queries the name server at
- that address. If either of the <option>-4</option> or
- <option>-6</option> options are in use, then
- only addresses for the corresponding transport
- will be tried. If no usable addresses are found,
- <command>dig</command> will send the query to the
- local host. The reply from the name server that
- responds is displayed.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><constant>name</constant></term>
- <listitem>
- <para>
- is the name of the resource record that is to be looked up.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><constant>type</constant></term>
- <listitem>
- <para>
- indicates what type of query is required &mdash;
- ANY, A, MX, SIG, etc.
- <parameter>type</parameter> can be any valid query
- type. If no
- <parameter>type</parameter> argument is supplied,
- <command>dig</command> will perform a lookup for an
- A record.
- </para>
- </listitem>
- </varlistentry>
-
- </variablelist>
- </para>
-
- </refsection>
-
- <refsection><info><title>OPTIONS</title></info>
-
-
- <variablelist>
- <varlistentry>
- <term>-4</term>
- <listitem>
- <para>
- Use IPv4 only.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>-6</term>
- <listitem>
- <para>
- Use IPv6 only.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>-b <replaceable class="parameter">address<optional>#port</optional></replaceable></term>
- <listitem>
- <para>
- Set the source IP address of the query.
- The <parameter>address</parameter> must be a valid address on
- one of the host's network interfaces, or "0.0.0.0" or "::". An
- optional port may be specified by appending "#&lt;port&gt;"
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>-c <replaceable class="parameter">class</replaceable></term>
- <listitem>
- <para>
- Set the query class. The
- default <parameter>class</parameter> is IN; other classes
- are HS for Hesiod records or CH for Chaosnet records.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>-f <replaceable class="parameter">file</replaceable></term>
- <listitem>
- <para>
- Batch mode: <command>dig</command> reads a list of lookup
- requests to process from the
- given <parameter>file</parameter>. Each line in the file
- should be organized in the same way they would be
- presented as queries to
- <command>dig</command> using the command-line interface.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>-i</term>
- <listitem>
- <para>
- Do reverse IPv6 lookups using the obsolete RFC 1886 IP6.INT
- domain, which is no longer in use. Obsolete bit string
- label queries (RFC 2874) are not attempted.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>-k <replaceable class="parameter">keyfile</replaceable></term>
- <listitem>
- <para>
- Sign queries using TSIG using a key read from the given file.
- Key files can be generated using
- <citerefentry>
- <refentrytitle>tsig-keygen</refentrytitle><manvolnum>8</manvolnum>
- </citerefentry>.
- When using TSIG authentication with <command>dig</command>,
- the name server that is queried needs to know the key and
- algorithm that is being used. In BIND, this is done by
- providing appropriate <command>key</command>
- and <command>server</command> statements in
- <filename>named.conf</filename>.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>-m</term>
- <listitem>
- <para>
- Enable memory usage debugging.
- <!-- It enables ISC_MEM_DEBUGTRACE and ISC_MEM_DEBUGRECORD
- documented in include/isc/mem.h -->
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>-p <replaceable class="parameter">port</replaceable></term>
- <listitem>
- <para>
- Send the query to a non-standard port on the server,
- instead of the defaut port 53. This option would be used
- to test a name server that has been configured to listen
- for queries on a non-standard port number.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>-q <replaceable class="parameter">name</replaceable></term>
- <listitem>
- <para>
- The domain name to query. This is useful to distinguish
- the <parameter>name</parameter> from other arguments.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>-t <replaceable class="parameter">type</replaceable></term>
- <listitem>
- <para>
- The resource record type to query. It can be any valid query
- type. If it is a resource record type supported in BIND 9, it
- can be given by the type mnemonic (such as "NS" or "AAAA").
- The default query type is "A", unless the <option>-x</option>
- option is supplied to indicate a reverse lookup. A zone
- transfer can be requested by specifying a type of AXFR. When
- an incremental zone transfer (IXFR) is required, set the
- <parameter>type</parameter> to <literal>ixfr=N</literal>.
- The incremental zone transfer will contain the changes
- made to the zone since the serial number in the zone's SOA
- record was <parameter>N</parameter>.
- </para>
- <para>
- All resource record types can be expressed as "TYPEnn", where
- "nn" is the number of the type. If the resource record type is
- not supported in BIND 9, the result will be displayed as
- described in RFC 3597.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>-u</term>
- <listitem>
- <para>
- Print query times in microseconds instead of milliseconds.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>-v</term>
- <listitem>
- <para>
- Print the version number and exit.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>-x <replaceable class="parameter">addr</replaceable></term>
- <listitem>
- <para>
- Simplified reverse lookups, for mapping addresses to
- names. The <parameter>addr</parameter> is an IPv4 address
- in dotted-decimal notation, or a colon-delimited IPv6
- address. When the <option>-x</option> is used, there is no
- need to provide
- the <parameter>name</parameter>, <parameter>class</parameter>
- and <parameter>type</parameter>
- arguments. <command>dig</command> automatically performs a
- lookup for a name like
- <literal>94.2.0.192.in-addr.arpa</literal> and sets the
- query type and class to PTR and IN respectively. IPv6
- addresses are looked up using nibble format under the
- IP6.ARPA domain (but see also the <option>-i</option>
- option).
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>-y <replaceable class="parameter"><optional>hmac:</optional>keyname:secret</replaceable></term>
- <listitem>
- <para>
- Sign queries using TSIG with the given authentication key.
- <parameter>keyname</parameter> is the name of the key, and
- <parameter>secret</parameter> is the base64 encoded shared secret.
- <parameter>hmac</parameter> is the name of the key algorithm;
- valid choices are <literal>hmac-md5</literal>,
- <literal>hmac-sha1</literal>, <literal>hmac-sha224</literal>,
- <literal>hmac-sha256</literal>, <literal>hmac-sha384</literal>, or
- <literal>hmac-sha512</literal>. If <parameter>hmac</parameter>
- is not specified, the default is <literal>hmac-md5</literal>
- or if MD5 was disabled <literal>hmac-sha256</literal>.
- </para>
- <para>
- NOTE: You should use the <option>-k</option> option and
- avoid the <option>-y</option> option, because
- with <option>-y</option> the shared secret is supplied as
- a command line argument in clear text. This may be visible
- in the output from
- <citerefentry>
- <refentrytitle>ps</refentrytitle><manvolnum>1</manvolnum>
- </citerefentry>
- or in a history file maintained by the user's shell.
- </para>
- </listitem>
- </varlistentry>
-
- </variablelist>
- </refsection>
-
- <refsection><info><title>QUERY OPTIONS</title></info>
-
-
- <para><command>dig</command>
- provides a number of query options which affect
- the way in which lookups are made and the results displayed. Some of
- these set or reset flag bits in the query header, some determine which
- sections of the answer get printed, and others determine the timeout
- and retry strategies.
- </para>
-
- <para>
- Each query option is identified by a keyword preceded by a plus sign
- (<literal>+</literal>). Some keywords set or reset an
- option. These may be preceded
- by the string <literal>no</literal> to negate the meaning of
- that keyword. Other
- keywords assign values to options like the timeout interval. They
- have the form <option>+keyword=value</option>.
- Keywords may be abbreviated, provided the abbreviation is
- unambiguous; for example, <literal>+cd</literal> is equivalent
- to <literal>+cdflag</literal>.
- The query options are:
-
- <variablelist>
-
- <varlistentry>
- <term><option>+[no]aaflag</option></term>
- <listitem>
- <para>
- A synonym for <parameter>+[no]aaonly</parameter>.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>+[no]aaonly</option></term>
- <listitem>
- <para>
- Sets the "aa" flag in the query.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>+[no]additional</option></term>
- <listitem>
- <para>
- Display [do not display] the additional section of a
- reply. The default is to display it.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>+[no]adflag</option></term>
- <listitem>
- <para>
- Set [do not set] the AD (authentic data) bit in the
- query. This requests the server to return whether
- all of the answer and authority sections have all
- been validated as secure according to the security
- policy of the server. AD=1 indicates that all records
- have been validated as secure and the answer is not
- from a OPT-OUT range. AD=0 indicate that some part
- of the answer was insecure or not validated. This
- bit is set by default.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>+[no]all</option></term>
- <listitem>
- <para>
- Set or clear all display flags.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>+[no]answer</option></term>
- <listitem>
- <para>
- Display [do not display] the answer section of a
- reply. The default is to display it.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>+[no]authority</option></term>
- <listitem>
- <para>
- Display [do not display] the authority section of a
- reply. The default is to display it.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>+[no]besteffort</option></term>
- <listitem>
- <para>
- Attempt to display the contents of messages which are
- malformed. The default is to not display malformed
- answers.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>+bufsize=B</option></term>
- <listitem>
- <para>
- Set the UDP message buffer size advertised using EDNS0
- to <parameter>B</parameter> bytes. The maximum and
- minimum sizes of this buffer are 65535 and 0 respectively.
- Values outside this range are rounded up or down
- appropriately. Values other than zero will cause a
- EDNS query to be sent.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>+[no]cdflag</option></term>
- <listitem>
- <para>
- Set [do not set] the CD (checking disabled) bit in
- the query. This requests the server to not perform
- DNSSEC validation of responses.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>+[no]class</option></term>
- <listitem>
- <para>
- Display [do not display] the CLASS when printing the
- record.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>+[no]cmd</option></term>
- <listitem>
- <para>
- Toggles the printing of the initial comment in the
- output identifying the version of <command>dig</command>
- and the query options that have been applied. This
- comment is printed by default.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>+[no]comments</option></term>
- <listitem>
- <para>
- Toggle the display of comment lines in the output.
- The default is to print comments.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>+[no]cookie<optional>=####</optional></option></term>
- <listitem>
- <para>
- Send an COOKIE EDNS option, containing an optional
- <replaceable>value</replaceable>. Replaying a COOKIE
- from a previous response will allow the server to
- identify a previous client. The default is
- <option>+nocookie</option>.
- </para>
- <para>
- <command>+cookie</command> is automatically set when +trace
- is in use, to better emulate the default queries from a
- nameserver.
- </para>
- <para>
- This option was formerly called <option>+[no]sit</option>
- (Server Identity Token). In BIND 9.10.0 through BIND 9.10.2,
- it sent the experimental option code 65001. This was
- changed to option code 10 in BIND 9.10.3 when the DNS
- COOKIE option was allocated.
- </para>
- <para>
- The <option>+[no]sit</option> is now deprecated, but has
- been retained as a synonym for <option>+[no]cookie</option>
- for backward compatibility within the BIND 9.10 branch.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>+[no]crypto</option></term>
- <listitem>
- <para>
- Toggle the display of cryptographic fields in DNSSEC
- records. The contents of these field are unnecessary
- to debug most DNSSEC validation failures and removing
- them makes it easier to see the common failures. The
- default is to display the fields. When omitted they
- are replaced by the string "[omitted]" or in the
- DNSKEY case the key id is displayed as the replacement,
- e.g. "[ key id = value ]".
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>+[no]defname</option></term>
- <listitem>
- <para>
- Deprecated, treated as a synonym for
- <parameter>+[no]search</parameter>
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>+[no]dnssec</option></term>
- <listitem>
- <para>
- Requests DNSSEC records be sent by setting the DNSSEC
- OK bit (DO) in the OPT record in the additional section
- of the query.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>+domain=somename</option></term>
- <listitem>
- <para>
- Set the search list to contain the single domain
- <parameter>somename</parameter>, as if specified in
- a <command>domain</command> directive in
- <filename>/etc/resolv.conf</filename>, and enable
- search list processing as if the
- <parameter>+search</parameter> option were given.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>+[no]edns[=#]</option></term>
- <listitem>
- <para>
- Specify the EDNS version to query with. Valid values
- are 0 to 255. Setting the EDNS version will cause
- a EDNS query to be sent. <option>+noedns</option>
- clears the remembered EDNS version. EDNS is set to
- 0 by default.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>+[no]ednsflags[=#]</option></term>
- <listitem>
- <para>
- Set the must-be-zero EDNS flags bits (Z bits) to the
- specified value. Decimal, hex and octal encodings are
- accepted. Setting a named flag (e.g. DO) will silently be
- ignored. By default, no Z bits are set.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>+[no]ednsnegotiation</option></term>
- <listitem>
- <para>
- Enable / disable EDNS version negotiation. By default
- EDNS version negotiation is enabled.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>+[no]ednsopt[=code[:value]]</option></term>
- <listitem>
- <para>
- Specify EDNS option with code point <option>code</option>
- and optionally payload of <option>value</option> as a
- hexadecimal string. <option>code</option> can be
- either an EDNS option name (for example,
- <literal>NSID</literal> or <literal>ECS</literal>),
- or an arbitrary numeric value. <option>+noednsopt</option>
- clears the EDNS options to be sent.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>+[no]expire</option></term>
- <listitem>
- <para>
- Send an EDNS Expire option.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>+[no]fail</option></term>
- <listitem>
- <para>
- Do not try the next server if you receive a SERVFAIL.
- The default is to not try the next server which is
- the reverse of normal stub resolver behavior.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>+[no]identify</option></term>
- <listitem>
- <para>
- Show [or do not show] the IP address and port number
- that supplied the answer when the
- <parameter>+short</parameter> option is enabled. If
- short form answers are requested, the default is not
- to show the source address and port number of the
- server that provided the answer.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>+[no]idnout</option></term>
- <listitem>
- <para>
- Convert [do not convert] puny code on output.
- This requires IDN SUPPORT to have been enabled at
- compile time. The default is to convert output.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>+[no]ignore</option></term>
- <listitem>
- <para>
- Ignore truncation in UDP responses instead of retrying
- with TCP. By default, TCP retries are performed.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>+[no]keepopen</option></term>
- <listitem>
- <para>
- Keep the TCP socket open between queries and reuse
- it rather than creating a new TCP socket for each
- lookup. The default is <option>+nokeepopen</option>.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>+[no]multiline</option></term>
- <listitem>
- <para>
- Print records like the SOA records in a verbose
- multi-line format with human-readable comments. The
- default is to print each record on a single line, to
- facilitate machine parsing of the <command>dig</command>
- output.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>+ndots=D</option></term>
- <listitem>
- <para>
- Set the number of dots that have to appear in
- <parameter>name</parameter> to <parameter>D</parameter>
- for it to be considered absolute. The default value
- is that defined using the ndots statement in
- <filename>/etc/resolv.conf</filename>, or 1 if no
- ndots statement is present. Names with fewer dots
- are interpreted as relative names and will be searched
- for in the domains listed in the <option>search</option>
- or <option>domain</option> directive in
- <filename>/etc/resolv.conf</filename> if
- <option>+search</option> is set.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>+[no]nsid</option></term>
- <listitem>
- <para>
- Include an EDNS name server ID request when sending
- a query.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>+[no]nssearch</option></term>
- <listitem>
- <para>
- When this option is set, <command>dig</command>
- attempts to find the authoritative name servers for
- the zone containing the name being looked up and
- display the SOA record that each name server has for
- the zone.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>+[no]onesoa</option></term>
- <listitem>
- <para>
- Print only one (starting) SOA record when performing
- an AXFR. The default is to print both the starting
- and ending SOA records.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>+[no]opcode=value</option></term>
- <listitem>
- <para>
- Set [restore] the DNS message opcode to the specified
- value. The default value is QUERY (0).
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>+[no]qr</option></term>
- <listitem>
- <para>
- Print [do not print] the query as it is sent. By
- default, the query is not printed.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>+[no]question</option></term>
- <listitem>
- <para>
- Print [do not print] the question section of a query
- when an answer is returned. The default is to print
- the question section as a comment.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>+[no]rdflag</option></term>
- <listitem>
- <para>
- A synonym for <parameter>+[no]recurse</parameter>.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>+[no]recurse</option></term>
- <listitem>
- <para>
- Toggle the setting of the RD (recursion desired) bit
- in the query. This bit is set by default, which means
- <command>dig</command> normally sends recursive
- queries. Recursion is automatically disabled when
- the <parameter>+nssearch</parameter> or
- <parameter>+trace</parameter> query options are used.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>+retry=T</option></term>
- <listitem>
- <para>
- Sets the number of times to retry UDP queries to
- server to <parameter>T</parameter> instead of the
- default, 2. Unlike <parameter>+tries</parameter>,
- this does not include the initial query.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>+[no]rrcomments</option></term>
- <listitem>
- <para>
- Toggle the display of per-record comments in the
- output (for example, human-readable key information
- about DNSKEY records). The default is not to print
- record comments unless multiline mode is active.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>+[no]search</option></term>
- <listitem>
- <para>
- Use [do not use] the search list defined by the
- searchlist or domain directive in
- <filename>resolv.conf</filename> (if any). The search
- list is not used by default.
- </para>
- <para>
- 'ndots' from <filename>resolv.conf</filename> (default 1)
- which may be overridden by <parameter>+ndots</parameter>
- determines if the name will be treated as relative
- or not and hence whether a search is eventually
- performed or not.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>+[no]short</option></term>
- <listitem>
- <para>
- Provide a terse answer. The default is to print the
- answer in a verbose form.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>+[no]showsearch</option></term>
- <listitem>
- <para>
- Perform [do not perform] a search showing intermediate
- results.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>+[no]sigchase</option></term>
- <listitem>
- <para>
- Chase DNSSEC signature chains. Requires dig be compiled
- with -DDIG_SIGCHASE. This feature is deprecated.
- Use <command>delv</command> instead.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>+[no]sit<optional>=####</optional></option></term>
- <listitem>
- <para>
- This option is a synonym for <option>+[no]cookie</option>.
- </para>
- <para>
- The <option>+[no]sit</option> is deprecated.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>+split=W</option></term>
- <listitem>
- <para>
- Split long hex- or base64-formatted fields in resource
- records into chunks of <parameter>W</parameter>
- characters (where <parameter>W</parameter> is rounded
- up to the nearest multiple of 4).
- <parameter>+nosplit</parameter> or
- <parameter>+split=0</parameter> causes fields not to
- be split at all. The default is 56 characters, or
- 44 characters when multiline mode is active.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>+[no]stats</option></term>
- <listitem>
- <para>
- This query option toggles the printing of statistics:
- when the query was made, the size of the reply and
- so on. The default behavior is to print the query
- statistics.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>+[no]subnet=addr[/prefix-length]</option></term>
- <listitem>
- <para>
- Send (don't send) an EDNS Client Subnet option with the
- specified IP address or network prefix.
- </para>
- <para>
- <command>dig +subnet=0.0.0.0/0</command>, or simply
- <command>dig +subnet=0</command> for short, sends an EDNS
- CLIENT-SUBNET option with an empty address and a source
- prefix-length of zero, which signals a resolver that
- the client's address information must
- <emphasis>not</emphasis> be used when resolving
- this query.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>+[no]tcp</option></term>
- <listitem>
- <para>
- Use [do not use] TCP when querying name servers. The
- default behavior is to use UDP unless an
- <literal>ixfr=N</literal> query is requested, in which
- case the default is TCP. AXFR queries always use
- TCP.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>+time=T</option></term>
- <listitem>
- <para>
-
- Sets the timeout for a query to
- <parameter>T</parameter> seconds. The default
- timeout is 5 seconds.
- An attempt to set <parameter>T</parameter> to less
- than 1 will result
- in a query timeout of 1 second being applied.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>+[no]topdown</option></term>
- <listitem>
- <para>
- When chasing DNSSEC signature chains perform a top-down
- validation. Requires dig be compiled with -DDIG_SIGCHASE.
- This feature is deprecated. Use <command>delv</command> instead.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>+[no]trace</option></term>
- <listitem>
- <para>
- Toggle tracing of the delegation path from the root
- name servers for the name being looked up. Tracing
- is disabled by default. When tracing is enabled,
- <command>dig</command> makes iterative queries to
- resolve the name being looked up. It will follow
- referrals from the root servers, showing the answer
- from each server that was used to resolve the lookup.
- </para> <para>
- If @server is also specified, it affects only the
- initial query for the root zone name servers.
- </para> <para>
- <command>+dnssec</command> is also set when +trace
- is set to better emulate the default queries from a
- nameserver.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>+tries=T</option></term>
- <listitem>
- <para>
- Sets the number of times to try UDP queries to server
- to <parameter>T</parameter> instead of the default,
- 3. If <parameter>T</parameter> is less than or equal
- to zero, the number of tries is silently rounded up
- to 1.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>+trusted-key=####</option></term>
- <listitem>
- <para>
- Specifies a file containing trusted keys to be used
- with <option>+sigchase</option>. Each DNSKEY record
- must be on its own line.
- </para> <para>
- If not specified, <command>dig</command> will look
- for <filename>/etc/trusted-key.key</filename> then
- <filename>trusted-key.key</filename> in the current
- directory.
- </para> <para>
- Requires dig be compiled with -DDIG_SIGCHASE.
- This feature is deprecated. Use <command>delv</command> instead.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>+[no]ttlid</option></term>
- <listitem>
- <para>
- Display [do not display] the TTL when printing the
- record.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>+[no]vc</option></term>
- <listitem>
- <para>
- Use [do not use] TCP when querying name servers. This
- alternate syntax to <parameter>+[no]tcp</parameter>
- is provided for backwards compatibility. The "vc"
- stands for "virtual circuit".
- </para>
- </listitem>
- </varlistentry>
-
- </variablelist>
-
- </para>
- </refsection>
-
- <refsection><info><title>MULTIPLE QUERIES</title></info>
-
-
- <para>
- The BIND 9 implementation of <command>dig </command>
- supports
- specifying multiple queries on the command line (in addition to
- supporting the <option>-f</option> batch file option). Each of those
- queries can be supplied with its own set of flags, options and query
- options.
- </para>
-
- <para>
- In this case, each <parameter>query</parameter> argument
- represent an
- individual query in the command-line syntax described above. Each
- consists of any of the standard options and flags, the name to be
- looked up, an optional query type and class and any query options that
- should be applied to that query.
- </para>
-
- <para>
- A global set of query options, which should be applied to all queries,
- can also be supplied. These global query options must precede the
- first tuple of name, class, type, options, flags, and query options
- supplied on the command line. Any global query options (except
- the <option>+[no]cmd</option> option) can be
- overridden by a query-specific set of query options. For example:
- <programlisting>
-dig +qr www.isc.org any -x 127.0.0.1 isc.org ns +noqr
-</programlisting>
- shows how <command>dig</command> could be used from the
- command line
- to make three lookups: an ANY query for <literal>www.isc.org</literal>, a
- reverse lookup of 127.0.0.1 and a query for the NS records of
- <literal>isc.org</literal>.
-
- A global query option of <parameter>+qr</parameter> is
- applied, so
- that <command>dig</command> shows the initial query it made
- for each
- lookup. The final query has a local query option of
- <parameter>+noqr</parameter> which means that <command>dig</command>
- will not print the initial query when it looks up the NS records for
- <literal>isc.org</literal>.
- </para>
-
- </refsection>
-
- <refsection><info><title>IDN SUPPORT</title></info>
-
- <para>
- If <command>dig</command> has been built with IDN (internationalized
- domain name) support, it can accept and display non-ASCII domain names.
- <command>dig</command> appropriately converts character encoding of
- domain name before sending a request to DNS server or displaying a
- reply from the server.
- If you'd like to turn off the IDN support for some reason, defines
- the <envar>IDN_DISABLE</envar> environment variable.
- The IDN support is disabled if the variable is set when
- <command>dig</command> runs.
- </para>
- </refsection>
-
- <refsection><info><title>FILES</title></info>
-
- <para><filename>/etc/resolv.conf</filename>
- </para>
- <para><filename>${HOME}/.digrc</filename>
- </para>
- </refsection>
-
- <refsection><info><title>SEE ALSO</title></info>
-
- <para><citerefentry>
- <refentrytitle>delv</refentrytitle><manvolnum>1</manvolnum>
- </citerefentry>,
- <citerefentry>
- <refentrytitle>host</refentrytitle><manvolnum>1</manvolnum>
- </citerefentry>,
- <citerefentry>
- <refentrytitle>named</refentrytitle><manvolnum>8</manvolnum>
- </citerefentry>,
- <citerefentry>
- <refentrytitle>dnssec-keygen</refentrytitle><manvolnum>8</manvolnum>
- </citerefentry>,
- <citetitle>RFC 1035</citetitle>.
- </para>
- </refsection>
-
- <refsection><info><title>BUGS</title></info>
-
- <para>
- There are probably too many query options.
- </para>
- </refsection>
-
-</refentry>
diff --git a/usr.sbin/bind/bin/dig/host.docbook b/usr.sbin/bind/bin/dig/host.docbook
deleted file mode 100644
index 9e7db9a1f6e..00000000000
--- a/usr.sbin/bind/bin/dig/host.docbook
+++ /dev/null
@@ -1,401 +0,0 @@
-<!DOCTYPE book [
-<!ENTITY mdash "&#8212;">]>
-<!--
- - Copyright (C) Internet Systems Consortium, Inc. ("ISC")
- -
- - Permission to use, copy, modify, and/or 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.
- -
- - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- - AND FITNESS. IN NO EVENT SHALL ISC 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.
--->
-
-<!-- Converted by db4-upgrade version 1.0 -->
-<refentry xmlns:db="http://docbook.org/ns/docbook" version="5.0" xml:id="man.host">
- <info>
- <date>2009-01-20</date>
- </info>
- <refentryinfo>
- <corpname>ISC</corpname>
- <corpauthor>Internet Systems Consortium, Inc.</corpauthor>
- </refentryinfo>
-
- <refmeta>
- <refentrytitle>host</refentrytitle>
- <manvolnum>1</manvolnum>
- <refmiscinfo>BIND9</refmiscinfo>
- </refmeta>
-
- <refnamediv>
- <refname>host</refname>
- <refpurpose>DNS lookup utility</refpurpose>
- </refnamediv>
-
- <docinfo>
- <copyright>
- <year>2000</year>
- <year>2001</year>
- <year>2002</year>
- <year>2004</year>
- <year>2005</year>
- <year>2007</year>
- <year>2008</year>
- <year>2009</year>
- <year>2014</year>
- <year>2015</year>
- <year>2016</year>
- <year>2017</year>
- <year>2018</year>
- <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
- </copyright>
- </docinfo>
-
- <refsynopsisdiv>
- <cmdsynopsis sepchar=" ">
- <command>host</command>
- <arg choice="opt" rep="norepeat"><option>-aCdlnrsTwv</option></arg>
- <arg choice="opt" rep="norepeat"><option>-c <replaceable class="parameter">class</replaceable></option></arg>
- <arg choice="opt" rep="norepeat"><option>-N <replaceable class="parameter">ndots</replaceable></option></arg>
- <arg choice="opt" rep="norepeat"><option>-R <replaceable class="parameter">number</replaceable></option></arg>
- <arg choice="opt" rep="norepeat"><option>-t <replaceable class="parameter">type</replaceable></option></arg>
- <arg choice="opt" rep="norepeat"><option>-W <replaceable class="parameter">wait</replaceable></option></arg>
- <arg choice="opt" rep="norepeat"><option>-m <replaceable class="parameter">flag</replaceable></option></arg>
- <group choice="opt" rep="norepeat">
- <arg choice="opt" rep="norepeat"><option>-4</option></arg>
- <arg choice="opt" rep="norepeat"><option>-6</option></arg>
- </group>
- <arg choice="opt" rep="norepeat"><option>-v</option></arg>
- <arg choice="opt" rep="norepeat"><option>-V</option></arg>
- <arg choice="req" rep="norepeat">name</arg>
- <arg choice="opt" rep="norepeat">server</arg>
- </cmdsynopsis>
- </refsynopsisdiv>
-
- <refsection><info><title>DESCRIPTION</title></info>
-
-
- <para><command>host</command>
- is a simple utility for performing DNS lookups.
- It is normally used to convert names to IP addresses and vice versa.
- When no arguments or options are given,
- <command>host</command>
- prints a short summary of its command line arguments and options.
- </para>
-
- <para><parameter>name</parameter> is the domain name that is to be
- looked
- up. It can also be a dotted-decimal IPv4 address or a colon-delimited
- IPv6 address, in which case <command>host</command> will by
- default
- perform a reverse lookup for that address.
- <parameter>server</parameter> is an optional argument which
- is either
- the name or IP address of the name server that <command>host</command>
- should query instead of the server or servers listed in
- <filename>/etc/resolv.conf</filename>.
- </para>
-
- </refsection>
-
- <refsection><info><title>OPTIONS</title></info>
-
- <variablelist>
-
- <varlistentry>
- <term>-4</term>
- <listitem>
- <para>
- Use IPv4 only for query transport.
- See also the <option>-6</option> option.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>-6</term>
- <listitem>
- <para>
- Use IPv6 only for query transport.
- See also the <option>-4</option> option.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>-a</term>
- <listitem>
- <para>
- "All". The <option>-a</option> option is normally equivalent
- to <option>-v -t <literal>ANY</literal></option>.
- It also affects the behaviour of the <option>-l</option>
- list zone option.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>-c <replaceable class="parameter">class</replaceable></term>
- <listitem>
- <para>
- Query class: This can be used to lookup HS (Hesiod) or CH
- (Chaosnet) class resource records. The default class is IN
- (Internet).
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>-C</term>
- <listitem>
- <para>
- Check consistency: <command>host</command> will query the
- SOA records for zone <parameter>name</parameter> from all
- the listed authoritative name servers for that zone. The
- list of name servers is defined by the NS records that are
- found for the zone.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>-d</term>
- <listitem>
- <para>
- Print debugging traces.
- Equivalent to the <option>-v</option> verbose option.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>-i</term>
- <listitem>
- <para>
- Obsolete.
- Use the IP6.INT domain for reverse lookups of IPv6
- addresses as defined in RFC1886 and deprecated in RFC4159.
- The default is to use IP6.ARPA as specified in RFC3596.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>-l</term>
- <listitem>
- <para>
- List zone:
- The <command>host</command> command performs a zone transfer of
- zone <parameter>name</parameter> and prints out the NS,
- PTR and address records (A/AAAA).
- </para>
- <para>
- Together, the <option>-l -a</option>
- options print all records in the zone.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>-N <replaceable class="parameter">ndots</replaceable></term>
- <listitem>
- <para>
- The number of dots that have to be
- in <parameter>name</parameter> for it to be considered
- absolute. The default value is that defined using the
- ndots statement in <filename>/etc/resolv.conf</filename>,
- or 1 if no ndots statement is present. Names with fewer
- dots are interpreted as relative names and will be
- searched for in the domains listed in
- the <type>search</type> or <type>domain</type> directive
- in <filename>/etc/resolv.conf</filename>.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>-r</term>
- <listitem>
- <para>
- Non-recursive query:
- Setting this option clears the RD (recursion desired) bit
- in the query. This should mean that the name server
- receiving the query will not attempt to
- resolve <parameter>name</parameter>.
- The <option>-r</option> option
- enables <command>host</command> to mimic the behavior of a
- name server by making non-recursive queries and expecting
- to receive answers to those queries that can be
- referrals to other name servers.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>-R <replaceable class="parameter">number</replaceable></term>
- <listitem>
- <para>
- Number of retries for UDP queries:
- If <parameter>number</parameter> is negative or zero, the
- number of retries will default to 1. The default value is 1.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>-s</term>
- <listitem>
- <para>
- Do <emphasis>not</emphasis> send the query to the next
- nameserver if any server responds with a SERVFAIL
- response, which is the reverse of normal stub resolver
- behavior.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>-t <replaceable class="parameter">type</replaceable></term>
- <listitem>
- <para>
- Query type:
- The <parameter>type</parameter> argument can be any
- recognized query type: CNAME, NS, SOA, TXT, DNSKEY, AXFR, etc.
- </para>
- <para>
- When no query type is specified, <command>host</command>
- automatically selects an appropriate query type. By default, it
- looks for A, AAAA, and MX records.
- If the <option>-C</option> option is given, queries will
- be made for SOA records.
- If <parameter>name</parameter> is a dotted-decimal IPv4
- address or colon-delimited IPv6
- address, <command>host</command> will query for PTR
- records.
- </para>
- <para>
- If a query type of IXFR is chosen the starting serial
- number can be specified by appending an equal followed by
- the starting serial number
- (like <option>-t <literal>IXFR=12345678</literal></option>).
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>-T</term>
- <listitem>
- <para>
- TCP:
- By default, <command>host</command> uses UDP when making
- queries. The <option>-T</option> option makes it use a TCP
- connection when querying the name server. TCP will be
- automatically selected for queries that require it, such
- as zone transfer (AXFR) requests.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>-m <replaceable class="parameter">flag</replaceable></term>
- <listitem>
- <para>
- Memory usage debugging: the flag can
- be <parameter>record</parameter>, <parameter>usage</parameter>,
- or <parameter>trace</parameter>. You can specify
- the <option>-m</option> option more than once to set
- multiple flags.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>-v</term>
- <listitem>
- <para>
- Verbose output.
- Equivalent to the <option>-d</option> debug option.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>-V</term>
- <listitem>
- <para>
- Print the version number and exit.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>-w</term>
- <listitem>
- <para>
- Wait forever: The query timeout is set to the maximum possible.
- See also the <option>-W</option> option.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>-W <replaceable class="parameter">wait</replaceable></term>
- <listitem>
- <para>
- Timeout: Wait for up to <parameter>wait</parameter>
- seconds for a reply. If <parameter>wait</parameter> is
- less than one, the wait interval is set to one second.
- </para>
- <para>
- By default, <command>host</command> will wait for 5
- seconds for UDP responses and 10 seconds for TCP
- connections.
- </para>
- <para>
- See also the <option>-w</option> option.
- </para>
- </listitem>
- </varlistentry>
-
- </variablelist>
-
- </refsection>
-
- <refsection><info><title>IDN SUPPORT</title></info>
-
- <para>
- If <command>host</command> has been built with IDN (internationalized
- domain name) support, it can accept and display non-ASCII domain names.
- <command>host</command> appropriately converts character encoding of
- domain name before sending a request to DNS server or displaying a
- reply from the server.
- If you'd like to turn off the IDN support for some reason, defines
- the <envar>IDN_DISABLE</envar> environment variable.
- The IDN support is disabled if the variable is set when
- <command>host</command> runs.
- </para>
- </refsection>
-
- <refsection><info><title>FILES</title></info>
-
- <para><filename>/etc/resolv.conf</filename>
- </para>
- </refsection>
-
- <refsection><info><title>SEE ALSO</title></info>
-
- <para><citerefentry>
- <refentrytitle>dig</refentrytitle><manvolnum>1</manvolnum>
- </citerefentry>,
- <citerefentry>
- <refentrytitle>named</refentrytitle><manvolnum>8</manvolnum>
- </citerefentry>.
- </para>
- </refsection>
-
-</refentry>
diff --git a/usr.sbin/bind/bin/dig/nslookup.docbook b/usr.sbin/bind/bin/dig/nslookup.docbook
deleted file mode 100644
index 854b20ba2c9..00000000000
--- a/usr.sbin/bind/bin/dig/nslookup.docbook
+++ /dev/null
@@ -1,510 +0,0 @@
-<!--
- - Copyright (C) Internet Systems Consortium, Inc. ("ISC")
- -
- - Permission to use, copy, modify, and/or 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.
- -
- - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- - AND FITNESS. IN NO EVENT SHALL ISC 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 (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. 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.
--->
-<!-- Converted by db4-upgrade version 1.0 -->
-<refentry xmlns:db="http://docbook.org/ns/docbook" version="5.0" xml:id="man.nslookup">
- <info>
- <date>2014-01-24</date>
- </info>
- <refentryinfo>
- <corpname>ISC</corpname>
- <corpauthor>Internet Systems Consortium, Inc.</corpauthor>
- </refentryinfo>
-
- <refmeta>
- <refentrytitle>nslookup</refentrytitle>
- <manvolnum>1</manvolnum>
- <refmiscinfo>BIND9</refmiscinfo>
- </refmeta>
-
- <refnamediv>
- <refname>nslookup</refname>
- <refpurpose>query Internet name servers interactively</refpurpose>
- </refnamediv>
-
- <docinfo>
- <copyright>
- <year>2004</year>
- <year>2005</year>
- <year>2006</year>
- <year>2007</year>
- <year>2010</year>
- <year>2013</year>
- <year>2014</year>
- <year>2015</year>
- <year>2016</year>
- <year>2018</year>
- <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
- </copyright>
- </docinfo>
-
- <refsynopsisdiv>
- <cmdsynopsis sepchar=" ">
- <command>nslookup</command>
- <arg choice="opt" rep="norepeat"><option>-option</option></arg>
- <arg choice="opt" rep="norepeat">name | -</arg>
- <arg choice="opt" rep="norepeat">server</arg>
- </cmdsynopsis>
- </refsynopsisdiv>
-
- <refsection><info><title>DESCRIPTION</title></info>
-
- <para><command>Nslookup</command>
- is a program to query Internet domain name servers. <command>Nslookup</command>
- 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.
- </para>
- </refsection>
-
- <refsection><info><title>ARGUMENTS</title></info>
-
- <para>
- Interactive mode is entered in the following cases:
- <orderedlist numeration="loweralpha" inheritnum="ignore" continuation="restarts">
- <listitem>
- <para>
- when no arguments are given (the default name server will be used)
- </para>
- </listitem>
- <listitem>
- <para>
- when the first argument is a hyphen (-) and the second argument is
- the host name or Internet address of a name server.
- </para>
- </listitem>
- </orderedlist>
- </para>
-
- <para>
- 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.
- </para>
-
- <para>
- 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:
- <!-- <informalexample> produces bad nroff. -->
- <programlisting>
-nslookup -query=hinfo -timeout=10
-</programlisting>
- <!-- </informalexample> -->
- </para>
- <para>
- The <option>-version</option> option causes
- <command>nslookup</command> to print the version
- number and immediately exits.
- </para>
-
- </refsection>
-
- <refsection><info><title>INTERACTIVE COMMANDS</title></info>
-
- <variablelist>
- <varlistentry>
- <term><constant>host</constant> <optional>server</optional></term>
- <listitem>
- <para>
- Look up information for host using the current default server or
- using server, if specified. If host is an Internet address and
- the query type is A or PTR, the name of the host is returned.
- If host is a name and does not have a trailing period, the
- search list is used to qualify the name.
- </para>
-
- <para>
- To look up a host not in the current domain, append a period to
- the name.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><constant>server</constant> <replaceable class="parameter">domain</replaceable></term>
- <listitem>
- <para/>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>lserver</constant> <replaceable class="parameter">domain</replaceable></term>
- <listitem>
- <para>
- Change the default server to <replaceable>domain</replaceable>; <constant>lserver</constant> uses the initial
- server to look up information about <replaceable>domain</replaceable>, while <constant>server</constant> uses
- the current default server. If an authoritative answer can't be
- found, the names of servers that might have the answer are
- returned.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><constant>root</constant></term>
- <listitem>
- <para>
- not implemented
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><constant>finger</constant></term>
- <listitem>
- <para>
- not implemented
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><constant>ls</constant></term>
- <listitem>
- <para>
- not implemented
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><constant>view</constant></term>
- <listitem>
- <para>
- not implemented
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><constant>help</constant></term>
- <listitem>
- <para>
- not implemented
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><constant>?</constant></term>
- <listitem>
- <para>
- not implemented
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><constant>exit</constant></term>
- <listitem>
- <para>
- Exits the program.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><constant>set</constant>
- <replaceable>keyword<optional>=value</optional></replaceable></term>
- <listitem>
- <para>
- This command is used to change state information that affects
- the lookups. Valid keywords are:
- <variablelist>
- <varlistentry>
- <term><constant>all</constant></term>
- <listitem>
- <para>
- Prints the current values of the frequently used
- options to <command>set</command>.
- Information about the current default
- server and host is also printed.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><constant>class=</constant><replaceable>value</replaceable></term>
- <listitem>
- <para>
- Change the query class to one of:
- <variablelist>
- <varlistentry>
- <term><constant>IN</constant></term>
- <listitem>
- <para>
- the Internet class
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>CH</constant></term>
- <listitem>
- <para>
- the Chaos class
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>HS</constant></term>
- <listitem>
- <para>
- the Hesiod class
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>ANY</constant></term>
- <listitem>
- <para>
- wildcard
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- The class specifies the protocol group of the information.
-
- </para>
- <para>
- (Default = IN; abbreviation = cl)
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><constant>
- <replaceable><optional>no</optional></replaceable>debug</constant></term>
- <listitem>
- <para>
- Turn on or off the display of the full response packet and
- any intermediate response packets when searching.
- </para>
- <para>
- (Default = nodebug; abbreviation = <optional>no</optional>deb)
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><constant>
- <replaceable><optional>no</optional></replaceable>d2</constant></term>
- <listitem>
- <para>
- Turn debugging mode on or off. This displays more about
- what nslookup is doing.
- </para>
- <para>
- (Default = nod2)
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><constant>domain=</constant><replaceable>name</replaceable></term>
- <listitem>
- <para>
- Sets the search list to <replaceable>name</replaceable>.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><constant>
- <replaceable><optional>no</optional></replaceable>search</constant></term>
- <listitem>
- <para>
- 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.
- </para>
- <para>
- (Default = search)
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><constant>port=</constant><replaceable>value</replaceable></term>
- <listitem>
- <para>
- Change the default TCP/UDP name server port to <replaceable>value</replaceable>.
- </para>
- <para>
- (Default = 53; abbreviation = po)
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><constant>querytype=</constant><replaceable>value</replaceable></term>
- <listitem>
- <para/>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><constant>type=</constant><replaceable>value</replaceable></term>
- <listitem>
- <para>
- Change the type of the information query.
- </para>
- <para>
- (Default = A; abbreviations = q, ty)
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><constant>
- <replaceable><optional>no</optional></replaceable>recurse</constant></term>
- <listitem>
- <para>
- Tell the name server to query other servers if it does not
- have the
- information.
- </para>
- <para>
- (Default = recurse; abbreviation = [no]rec)
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><constant>ndots=</constant><replaceable>number</replaceable></term>
- <listitem>
- <para>
- Set the number of dots (label separators) in a domain
- that will disable searching. Absolute names always
- stop searching.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><constant>retry=</constant><replaceable>number</replaceable></term>
- <listitem>
- <para>
- Set the number of retries to number.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><constant>timeout=</constant><replaceable>number</replaceable></term>
- <listitem>
- <para>
- Change the initial timeout interval for waiting for a
- reply to number seconds.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><constant>
- <replaceable><optional>no</optional></replaceable>vc</constant></term>
- <listitem>
- <para>
- Always use a virtual circuit when sending requests to the
- server.
- </para>
- <para>
- (Default = novc)
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><constant>
- <replaceable><optional>no</optional></replaceable>fail</constant></term>
- <listitem>
- <para>
- Try the next nameserver if a nameserver responds with
- SERVFAIL or a referral (nofail) or terminate query
- (fail) on such a response.
- </para>
- <para>
- (Default = nofail)
- </para>
- </listitem>
- </varlistentry>
-
- </variablelist>
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsection>
-
- <refsection><info><title>RETURN VALUES</title></info>
- <para>
- <command>nslookup</command> returns with an exit status of 1
- if any query failed, and 0 otherwise.
- </para>
- </refsection>
-
- <refsection><info><title>FILES</title></info>
-
- <para><filename>/etc/resolv.conf</filename>
- </para>
- </refsection>
-
- <refsection><info><title>SEE ALSO</title></info>
-
- <para><citerefentry>
- <refentrytitle>dig</refentrytitle><manvolnum>1</manvolnum>
- </citerefentry>,
- <citerefentry>
- <refentrytitle>host</refentrytitle><manvolnum>1</manvolnum>
- </citerefentry>,
- <citerefentry>
- <refentrytitle>named</refentrytitle><manvolnum>8</manvolnum>
- </citerefentry>.
- </para>
- </refsection>
-</refentry>
diff --git a/usr.sbin/bind/isc-config.sh.docbook b/usr.sbin/bind/isc-config.sh.docbook
deleted file mode 100644
index 569179fad2b..00000000000
--- a/usr.sbin/bind/isc-config.sh.docbook
+++ /dev/null
@@ -1,155 +0,0 @@
-<!--
- - Copyright (C) Internet Systems Consortium, Inc. ("ISC")
- -
- - Permission to use, copy, modify, and/or 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.
- -
- - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- - AND FITNESS. IN NO EVENT SHALL ISC 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.
--->
-
-<!-- Converted by db4-upgrade version 1.0 -->
-<refentry xmlns:db="http://docbook.org/ns/docbook" version="5.0" xml:id="man.isc-config.sh">
- <info>
- <date>2009-02-18</date>
- </info>
- <refentryinfo>
- <corpname>ISC</corpname>
- <corpauthor>Internet Systems Consortium, Inc.</corpauthor>
- </refentryinfo>
-
- <refmeta>
- <refentrytitle><application>isc-config.sh</application></refentrytitle>
- <manvolnum>1</manvolnum>
- <refmiscinfo>BIND9</refmiscinfo>
- </refmeta>
-
- <docinfo>
- <copyright>
- <year>2009</year>
- <year>2014</year>
- <year>2015</year>
- <year>2016</year>
- <year>2018</year>
- <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
- </copyright>
- </docinfo>
-
- <refnamediv>
- <refname><application>isc-config.sh</application></refname>
- <refpurpose>Get information about the installed version of ISC BIND</refpurpose>
- </refnamediv>
-
- <refsynopsisdiv>
- <cmdsynopsis sepchar=" ">
- <command>isc-config.sh</command>
- <arg choice="opt" rep="norepeat"><option>--cflags</option></arg>
- <arg choice="opt" rep="norepeat"><option>--exec-prefix</option></arg>
- <arg choice="opt" rep="norepeat"><option>--libs</option></arg>
- <arg choice="opt" rep="norepeat"><option>--prefix</option></arg>
- <arg choice="opt" rep="norepeat"><option>--version</option></arg>
- <arg choice="opt" rep="repeat">libraries</arg>
- </cmdsynopsis>
- </refsynopsisdiv>
-
- <refsection><info><title>DESCRIPTION</title></info>
-
- <para><command>isc-config.sh</command>
- prints information related to the installed version of ISC BIND,
- such as the compiler and linker flags required to compile
- and link programs that use ISC BIND libraries.
- </para>
- <para>
- The optional libraries are used to report specific details
- for compiling and linking for the listed libraries.
- The allowed choices are:
- <option>isc</option>,
- <option>isccc</option>,
- <option>isccfg</option>,
- <option>dns</option>,
- <option>lwres</option>, and
- <option>bind9</option>.
- Multiple libraries may be listed on the command line.
- (Some libraries require other libraries, so are implied.)
- </para>
-
- </refsection>
-
- <refsection><info><title>OPTIONS</title></info>
-
-
- <variablelist>
-
- <varlistentry>
- <term>--cflags</term>
- <listitem>
- <para>
- Prints the compiler command line options required to
- compile files that use ISC BIND.
- Use the <option>libraries</option> command line argument(s)
- to print additional specific flags to pass to the C compiler.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>--exec-prefix</term>
- <listitem>
- <para>
- Prints the directory prefix used in the ISC BIND installation
- for architecture dependent files to standard output.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>--libs</term>
- <listitem>
- <para>
- Prints the linker command line options used to
- link with the ISC BIND libraries.
- Use the <option>libraries</option> command line argument(s)
- to print additional specific flags.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>--prefix</term>
- <listitem>
- <para>
- Prints the directory prefix used in the ISC BIND installation
- for architecture independent files to standard output.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>--version</term>
- <listitem>
- <para>
- Prints the version of the installed ISC BIND suite.
- </para>
- </listitem>
- </varlistentry>
-
- </variablelist>
-
- </refsection>
-
- <refsection><info><title>RETURN VALUES</title></info>
-
- <para><command>isc-config.sh</command>
- returns an exit status of 1 if
- invoked with invalid arguments or no arguments at all.
- It returns 0 if information was successfully printed.
- </para>
- </refsection>
-
-</refentry>
diff --git a/usr.sbin/bind/lib/lwres/man/lwres.docbook b/usr.sbin/bind/lib/lwres/man/lwres.docbook
deleted file mode 100644
index 4b95a6c34ea..00000000000
--- a/usr.sbin/bind/lib/lwres/man/lwres.docbook
+++ /dev/null
@@ -1,262 +0,0 @@
-<!--
- - Copyright (C) Internet Systems Consortium, Inc. ("ISC")
- -
- - Permission to use, copy, modify, and/or 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.
- -
- - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- - AND FITNESS. IN NO EVENT SHALL ISC 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.
--->
-
-<!-- Converted by db4-upgrade version 1.0 -->
-<refentry xmlns:db="http://docbook.org/ns/docbook" version="5.0">
- <info>
- <date>2007-06-18</date>
- </info>
- <refentryinfo>
- <corpname>ISC</corpname>
- <corpauthor>Internet Systems Consortium, Inc.</corpauthor>
- </refentryinfo>
-
- <refmeta>
- <refentrytitle>lwres</refentrytitle>
- <manvolnum>3</manvolnum>
- <refmiscinfo>BIND9</refmiscinfo>
- </refmeta>
- <refnamediv>
- <refname>lwres</refname>
- <refpurpose>introduction to the lightweight resolver library</refpurpose>
- </refnamediv>
-
- <docinfo>
- <copyright>
- <year>2000</year>
- <year>2001</year>
- <year>2004</year>
- <year>2005</year>
- <year>2007</year>
- <year>2014</year>
- <year>2015</year>
- <year>2016</year>
- <year>2018</year>
- <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
- </copyright>
- </docinfo>
-
- <refsynopsisdiv>
- <funcsynopsis>
-<funcsynopsisinfo>#include &lt;lwres/lwres.h&gt;</funcsynopsisinfo>
-</funcsynopsis>
- </refsynopsisdiv>
-
- <refsection><info><title>DESCRIPTION</title></info>
-
- <para>
- The BIND 9 lightweight resolver library is a simple, name service
- independent stub resolver library. It provides hostname-to-address
- and address-to-hostname lookup services to applications by
- transmitting lookup requests to a resolver daemon
- <command>lwresd</command>
- running on the local host. The resolver daemon performs the
- lookup using the DNS or possibly other name service protocols,
- and returns the results to the application through the library.
- The library and resolver daemon communicate using a simple
- UDP-based protocol.
- </para>
- </refsection>
-
- <refsection><info><title>OVERVIEW</title></info>
-
- <para>
- The lwresd library implements multiple name service APIs.
- The standard
- <function>gethostbyname()</function>,
- <function>gethostbyaddr()</function>,
- <function>gethostbyname_r()</function>,
- <function>gethostbyaddr_r()</function>,
- <function>getaddrinfo()</function>,
- <function>getipnodebyname()</function>,
- and
- <function>getipnodebyaddr()</function>
- functions are all supported. To allow the lwres library to coexist
- with system libraries that define functions of the same name,
- the library defines these functions with names prefixed by
- <literal>lwres_</literal>.
- To define the standard names, applications must include the
- header file
- <filename>&lt;lwres/netdb.h&gt;</filename>
- which contains macro definitions mapping the standard function names
- into
- <literal>lwres_</literal>
- prefixed ones. Operating system vendors who integrate the lwres
- library into their base distributions should rename the functions
- in the library proper so that the renaming macros are not needed.
- </para>
- <para>
- The library also provides a native API consisting of the functions
- <function>lwres_getaddrsbyname()</function>
- and
- <function>lwres_getnamebyaddr()</function>.
- These may be called by applications that require more detailed
- control over the lookup process than the standard functions
- provide.
- </para>
- <para>
- In addition to these name service independent address lookup
- functions, the library implements a new, experimental API
- for looking up arbitrary DNS resource records, using the
- <function>lwres_getaddrsbyname()</function>
- function.
- </para>
- <para>
- Finally, there is a low-level API for converting lookup
- requests and responses to and from raw lwres protocol packets.
- This API can be used by clients requiring nonblocking operation,
- and is also used when implementing the server side of the lwres
- protocol, for example in the
- <command>lwresd</command>
- resolver daemon. The use of this low-level API in clients
- and servers is outlined in the following sections.
- </para>
- </refsection>
- <refsection><info><title>CLIENT-SIDE LOW-LEVEL API CALL FLOW</title></info>
-
- <para>
- When a client program wishes to make an lwres request using the
- native low-level API, it typically performs the following
- sequence of actions.
- </para>
- <para>
- (1) Allocate or use an existing <type>lwres_packet_t</type>,
- called <varname>pkt</varname> below.
- </para>
- <para>
- (2) Set <varname remap="structfield">pkt.recvlength</varname> to the maximum length
- we will accept.
- This is done so the receiver of our packets knows how large our receive
- buffer is. The "default" is a constant in
- <filename>lwres.h</filename>: <constant>LWRES_RECVLENGTH = 4096</constant>.
- </para>
- <para>
- (3) Set <varname remap="structfield">pkt.serial</varname>
- to a unique serial number. This value is echoed
- back to the application by the remote server.
- </para>
- <para>
- (4) Set <varname remap="structfield">pkt.pktflags</varname>. Usually this is set to
- 0.
- </para>
- <para>
- (5) Set <varname remap="structfield">pkt.result</varname> to 0.
- </para>
- <para>
- (6) Call <function>lwres_*request_render()</function>,
- or marshall in the data using the primitives
- such as <function>lwres_packet_render()</function>
- and storing the packet data.
- </para>
- <para>
- (7) Transmit the resulting buffer.
- </para>
- <para>
- (8) Call <function>lwres_*response_parse()</function>
- to parse any packets received.
- </para>
- <para>
- (9) Verify that the opcode and serial match a request, and process the
- packet specific information contained in the body.
- </para>
- </refsection>
- <refsection><info><title>SERVER-SIDE LOW-LEVEL API CALL FLOW</title></info>
-
- <para>
- When implementing the server side of the lightweight resolver
- protocol using the lwres library, a sequence of actions like the
- following is typically involved in processing each request packet.
- </para>
- <para>
- Note that the same <type>lwres_packet_t</type> is used
- in both the <function>_parse()</function> and <function>_render()</function> calls,
- with only a few modifications made
- to the packet header's contents between uses. This method is
- recommended
- as it keeps the serial, opcode, and other fields correct.
- </para>
- <para>
- (1) When a packet is received, call <function>lwres_*request_parse()</function> to
- unmarshall it. This returns a <type>lwres_packet_t</type> (also called <varname>pkt</varname>, below)
- as well as a data specific type, such as <type>lwres_gabnrequest_t</type>.
- </para>
- <para>
- (2) Process the request in the data specific type.
- </para>
- <para>
- (3) Set the <varname remap="structfield">pkt.result</varname>,
- <varname remap="structfield">pkt.recvlength</varname> as above. All other fields
- can
- be left untouched since they were filled in by the <function>*_parse()</function> call
- above. If using <function>lwres_*response_render()</function>,
- <varname remap="structfield">pkt.pktflags</varname> will be set up
- properly. Otherwise, the <constant>LWRES_LWPACKETFLAG_RESPONSE</constant> bit should be
- set.
- </para>
- <para>
- (4) Call the data specific rendering function, such as
- <function>lwres_gabnresponse_render()</function>.
- </para>
- <para>
- (5) Send the resulting packet to the client.
- </para>
- <para/>
- </refsection>
- <refsection><info><title>SEE ALSO</title></info>
-
- <para><citerefentry>
- <refentrytitle>lwres_gethostent</refentrytitle><manvolnum>3</manvolnum>
- </citerefentry>,
-
- <citerefentry>
- <refentrytitle>lwres_getipnode</refentrytitle><manvolnum>3</manvolnum>
- </citerefentry>,
-
- <citerefentry>
- <refentrytitle>lwres_getnameinfo</refentrytitle><manvolnum>3</manvolnum>
- </citerefentry>,
-
- <citerefentry>
- <refentrytitle>lwres_noop</refentrytitle><manvolnum>3</manvolnum>
- </citerefentry>,
-
- <citerefentry>
- <refentrytitle>lwres_gabn</refentrytitle><manvolnum>3</manvolnum>
- </citerefentry>,
-
- <citerefentry>
- <refentrytitle>lwres_gnba</refentrytitle><manvolnum>3</manvolnum>
- </citerefentry>,
-
- <citerefentry>
- <refentrytitle>lwres_context</refentrytitle><manvolnum>3</manvolnum>
- </citerefentry>,
-
- <citerefentry>
- <refentrytitle>lwres_config</refentrytitle><manvolnum>3</manvolnum>
- </citerefentry>,
-
- <citerefentry>
- <refentrytitle>resolver</refentrytitle><manvolnum>5</manvolnum>
- </citerefentry>,
-
- <citerefentry>
- <refentrytitle>lwresd</refentrytitle><manvolnum>8</manvolnum>
- </citerefentry>.
-
- </para>
- </refsection>
-</refentry>
diff --git a/usr.sbin/bind/lib/lwres/man/lwres_buffer.docbook b/usr.sbin/bind/lib/lwres/man/lwres_buffer.docbook
deleted file mode 100644
index 66512cbd2b7..00000000000
--- a/usr.sbin/bind/lib/lwres/man/lwres_buffer.docbook
+++ /dev/null
@@ -1,391 +0,0 @@
-<!--
- - Copyright (C) Internet Systems Consortium, Inc. ("ISC")
- -
- - Permission to use, copy, modify, and/or 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.
- -
- - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- - AND FITNESS. IN NO EVENT SHALL ISC 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.
--->
-
-<!-- Converted by db4-upgrade version 1.0 -->
-<refentry xmlns:db="http://docbook.org/ns/docbook" version="5.0">
- <info>
- <date>2007-06-18</date>
- </info>
- <refentryinfo>
- <corpname>ISC</corpname>
- <corpauthor>Internet Systems Consortium, Inc.</corpauthor>
- </refentryinfo>
-
- <refmeta>
- <refentrytitle>lwres_buffer</refentrytitle>
- <manvolnum>3</manvolnum>
- <refmiscinfo>BIND9</refmiscinfo>
- </refmeta>
-
- <docinfo>
- <copyright>
- <year>2000</year>
- <year>2001</year>
- <year>2004</year>
- <year>2005</year>
- <year>2007</year>
- <year>2014</year>
- <year>2015</year>
- <year>2016</year>
- <year>2018</year>
- <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
- </copyright>
- </docinfo>
-
- <refnamediv>
- <refname>lwres_buffer_init</refname>
- <refname>lwres_buffer_invalidate</refname>
- <refname>lwres_buffer_add</refname>
- <refname>lwres_buffer_subtract</refname>
- <refname>lwres_buffer_clear</refname>
- <refname>lwres_buffer_first</refname>
- <refname>lwres_buffer_forward</refname>
- <refname>lwres_buffer_back</refname>
- <refname>lwres_buffer_getuint8</refname>
- <refname>lwres_buffer_putuint8</refname>
- <refname>lwres_buffer_getuint16</refname>
- <refname>lwres_buffer_putuint16</refname>
- <refname>lwres_buffer_getuint32</refname>
- <refname>lwres_buffer_putuint32</refname>
- <refname>lwres_buffer_putmem</refname>
- <refname>lwres_buffer_getmem</refname>
- <refpurpose>lightweight resolver buffer management</refpurpose>
- </refnamediv>
-
- <refsynopsisdiv>
-
- <funcsynopsis>
-<funcsynopsisinfo>
-#include &lt;lwres/lwbuffer.h&gt;
-</funcsynopsisinfo>
-
-<funcprototype>
-
- <funcdef>
-void
-<function>lwres_buffer_init</function></funcdef>
- <paramdef>lwres_buffer_t *<parameter>b</parameter></paramdef>
- <paramdef>void *<parameter>base</parameter></paramdef>
- <paramdef>unsigned int <parameter>length</parameter></paramdef>
- </funcprototype>
-
-<funcprototype>
- <funcdef>
-void
-<function>lwres_buffer_invalidate</function></funcdef>
- <paramdef>lwres_buffer_t *<parameter>b</parameter></paramdef>
- </funcprototype>
-<funcprototype>
- <funcdef>
-void
-<function>lwres_buffer_add</function></funcdef>
- <paramdef>lwres_buffer_t *<parameter>b</parameter></paramdef>
- <paramdef>unsigned int <parameter>n</parameter></paramdef>
- </funcprototype>
-
-<funcprototype>
- <funcdef>
-void
-<function>lwres_buffer_subtract</function></funcdef>
- <paramdef>lwres_buffer_t *<parameter>b</parameter></paramdef>
- <paramdef>unsigned int <parameter>n</parameter></paramdef>
- </funcprototype>
-
-<funcprototype>
- <funcdef>
-void
-<function>lwres_buffer_clear</function></funcdef>
- <paramdef>lwres_buffer_t *<parameter>b</parameter></paramdef>
- </funcprototype>
-
-<funcprototype>
- <funcdef>
-void
-<function>lwres_buffer_first</function></funcdef>
- <paramdef>lwres_buffer_t *<parameter>b</parameter></paramdef>
- </funcprototype>
-
-<funcprototype>
- <funcdef>
-void
-<function>lwres_buffer_forward</function></funcdef>
- <paramdef>lwres_buffer_t *<parameter>b</parameter></paramdef>
- <paramdef>unsigned int <parameter>n</parameter></paramdef>
- </funcprototype>
-<funcprototype>
-
- <funcdef>
-void
-<function>lwres_buffer_back</function></funcdef>
- <paramdef>lwres_buffer_t *<parameter>b</parameter></paramdef>
- <paramdef>unsigned int <parameter>n</parameter></paramdef>
- </funcprototype>
-
-<funcprototype>
- <funcdef>
-lwres_uint8_t
-<function>lwres_buffer_getuint8</function></funcdef>
- <paramdef>lwres_buffer_t *<parameter>b</parameter></paramdef>
- </funcprototype>
-
-<funcprototype>
- <funcdef>
-void
-<function>lwres_buffer_putuint8</function></funcdef>
- <paramdef>lwres_buffer_t *<parameter>b</parameter></paramdef>
- <paramdef>lwres_uint8_t <parameter>val</parameter></paramdef>
- </funcprototype>
-
-<funcprototype>
- <funcdef>
-lwres_uint16_t
-<function>lwres_buffer_getuint16</function></funcdef>
- <paramdef>lwres_buffer_t *<parameter>b</parameter></paramdef>
- </funcprototype>
-
-<funcprototype>
- <funcdef>
-void
-<function>lwres_buffer_putuint16</function></funcdef>
- <paramdef>lwres_buffer_t *<parameter>b</parameter></paramdef>
- <paramdef>lwres_uint16_t <parameter>val</parameter></paramdef>
- </funcprototype>
-
-<funcprototype>
- <funcdef>
-lwres_uint32_t
-<function>lwres_buffer_getuint32</function></funcdef>
- <paramdef>lwres_buffer_t *<parameter>b</parameter></paramdef>
- </funcprototype>
-
-<funcprototype>
- <funcdef>
-void
-<function>lwres_buffer_putuint32</function></funcdef>
- <paramdef>lwres_buffer_t *<parameter>b</parameter></paramdef>
- <paramdef>lwres_uint32_t <parameter>val</parameter></paramdef>
- </funcprototype>
-
-<funcprototype>
- <funcdef>
-void
-<function>lwres_buffer_putmem</function></funcdef>
- <paramdef>lwres_buffer_t *<parameter>b</parameter></paramdef>
- <paramdef>const unsigned char *<parameter>base</parameter></paramdef>
- <paramdef>unsigned int <parameter>length</parameter></paramdef>
- </funcprototype>
-
-<funcprototype>
- <funcdef>
-void
-<function>lwres_buffer_getmem</function></funcdef>
- <paramdef>lwres_buffer_t *<parameter>b</parameter></paramdef>
- <paramdef>unsigned char *<parameter>base</parameter></paramdef>
- <paramdef>unsigned int <parameter>length</parameter></paramdef>
- </funcprototype>
-
-</funcsynopsis>
- </refsynopsisdiv>
-
- <refsection><info><title>DESCRIPTION</title></info>
-
-
- <para>
- These functions provide bounds checked access to a region of memory
- where data is being read or written.
- They are based on, and similar to, the
- <literal>isc_buffer_</literal>
- functions in the ISC library.
- </para>
- <para>
- A buffer is a region of memory, together with a set of related
- subregions.
- The <emphasis>used region</emphasis> and the
- <emphasis>available</emphasis> region are disjoint, and
- their union is the buffer's region.
- The used region extends from the beginning of the buffer region to the
- last used byte.
- The available region extends from one byte greater than the last used
- byte to the end of the buffer's region.
- The size of the used region can be changed using various
- buffer commands.
- Initially, the used region is empty.
- </para>
- <para>
- The used region is further subdivided into two disjoint regions: the
- <emphasis>consumed region</emphasis> and the <emphasis>remaining region</emphasis>.
- The union of these two regions is the used region.
- The consumed region extends from the beginning of the used region to
- the byte before the <emphasis>current</emphasis> offset (if any).
- The <emphasis>remaining</emphasis> region the current pointer to the end
- of the used
- region.
- The size of the consumed region can be changed using various
- buffer commands.
- Initially, the consumed region is empty.
- </para>
- <para>
- The <emphasis>active region</emphasis> is an (optional) subregion of the
- remaining
- region.
- It extends from the current offset to an offset in the
- remaining region.
- Initially, the active region is empty.
- If the current offset advances beyond the chosen offset,
- the active region will also be empty.
- </para>
- <para><programlisting>
- /------------entire length---------------\\
- /----- used region -----\\/-- available --\\
- +----------------------------------------+
- | consumed | remaining | |
- +----------------------------------------+
- a b c d e
- </programlisting>
- </para>
- <para><programlisting>
- a == base of buffer.
- b == current pointer. Can be anywhere between a and d.
- c == active pointer. Meaningful between b and d.
- d == used pointer.
- e == length of buffer.
- </programlisting>
- </para>
- <para><programlisting>
- a-e == entire length of buffer.
- a-d == used region.
- a-b == consumed region.
- b-d == remaining region.
- b-c == optional active region.
-</programlisting>
- </para>
- <para><function>lwres_buffer_init()</function>
- initializes the
- <type>lwres_buffer_t</type>
- <parameter>*b</parameter>
- and assocates it with the memory region of size
- <parameter>length</parameter>
- bytes starting at location
- <parameter>base.</parameter>
- </para>
- <para><function>lwres_buffer_invalidate()</function>
- marks the buffer <parameter>*b</parameter>
- as invalid. Invalidating a buffer after use is not required,
- but makes it possible to catch its possible accidental use.
- </para>
- <para>
- The functions
- <function>lwres_buffer_add()</function>
- and
- <function>lwres_buffer_subtract()</function>
- respectively increase and decrease the used space in
- buffer
- <parameter>*b</parameter>
- by
- <parameter>n</parameter>
- bytes.
- <function>lwres_buffer_add()</function>
- checks for buffer overflow and
- <function>lwres_buffer_subtract()</function>
- checks for underflow.
- These functions do not allocate or deallocate memory.
- They just change the value of
- <varname remap="structfield">used</varname>.
- </para>
- <para>
- A buffer is re-initialised by
- <function>lwres_buffer_clear()</function>.
- The function sets
- <varname remap="structfield">used</varname>,
- <varname remap="structfield">current</varname>
- and
- <varname remap="structfield">active</varname>
- to zero.
- </para>
- <para><function>lwres_buffer_first</function>
- makes the consumed region of buffer
- <parameter>*p</parameter>
- empty by setting
- <varname remap="structfield">current</varname>
- to zero (the start of the buffer).
- </para>
- <para><function>lwres_buffer_forward()</function>
- increases the consumed region of buffer
- <parameter>*b</parameter>
- by
- <parameter>n</parameter>
- bytes, checking for overflow.
- Similarly,
- <function>lwres_buffer_back()</function>
- decreases buffer
- <parameter>b</parameter>'s
- consumed region by
- <parameter>n</parameter>
- bytes and checks for underflow.
- </para>
- <para><function>lwres_buffer_getuint8()</function>
- reads an unsigned 8-bit integer from
- <parameter>*b</parameter>
- and returns it.
- <function>lwres_buffer_putuint8()</function>
- writes the unsigned 8-bit integer
- <parameter>val</parameter>
- to buffer
- <parameter>*b</parameter>.
- </para>
- <para><function>lwres_buffer_getuint16()</function>
- and
- <function>lwres_buffer_getuint32()</function>
- are identical to
- <function>lwres_buffer_putuint8()</function>
- except that they respectively read an unsigned 16-bit or 32-bit integer
- in network byte order from
- <parameter>b</parameter>.
- Similarly,
- <function>lwres_buffer_putuint16()</function>
- and
- <function>lwres_buffer_putuint32()</function>
- writes the unsigned 16-bit or 32-bit integer
- <parameter>val</parameter>
- to buffer
- <parameter>b</parameter>,
- in network byte order.
- </para>
- <para>
- Arbitrary amounts of data are read or written from a lightweight
- resolver buffer with
- <function>lwres_buffer_getmem()</function>
- and
- <function>lwres_buffer_putmem()</function>
- respectively.
- <function>lwres_buffer_putmem()</function>
- copies
- <parameter>length</parameter>
- bytes of memory at
- <parameter>base</parameter>
- to
- <parameter>b</parameter>.
- Conversely,
- <function>lwres_buffer_getmem()</function>
- copies
- <parameter>length</parameter>
- bytes of memory from
- <parameter>b</parameter>
- to
- <parameter>base</parameter>.
- </para>
- </refsection>
-</refentry>
diff --git a/usr.sbin/bind/lib/lwres/man/lwres_config.docbook b/usr.sbin/bind/lib/lwres/man/lwres_config.docbook
deleted file mode 100644
index a6c641c6731..00000000000
--- a/usr.sbin/bind/lib/lwres/man/lwres_config.docbook
+++ /dev/null
@@ -1,169 +0,0 @@
-<!--
- - Copyright (C) Internet Systems Consortium, Inc. ("ISC")
- -
- - Permission to use, copy, modify, and/or 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.
- -
- - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- - AND FITNESS. IN NO EVENT SHALL ISC 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.
--->
-
-<!-- Converted by db4-upgrade version 1.0 -->
-<refentry xmlns:db="http://docbook.org/ns/docbook" version="5.0">
- <info>
- <date>2007-06-18</date>
- </info>
- <refentryinfo>
- <corpname>ISC</corpname>
- <corpauthor>Internet Systems Consortium, Inc.</corpauthor>
- </refentryinfo>
-
- <refmeta>
- <refentrytitle>lwres_config</refentrytitle>
- <manvolnum>3</manvolnum>
- <refmiscinfo>BIND9</refmiscinfo>
- </refmeta>
-
- <docinfo>
- <copyright>
- <year>2000</year>
- <year>2001</year>
- <year>2004</year>
- <year>2005</year>
- <year>2007</year>
- <year>2014</year>
- <year>2015</year>
- <year>2016</year>
- <year>2018</year>
- <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
- </copyright>
- </docinfo>
-
- <refnamediv>
- <refname>lwres_conf_init</refname>
- <refname>lwres_conf_clear</refname>
- <refname>lwres_conf_parse</refname>
- <refname>lwres_conf_print</refname>
- <refname>lwres_conf_get</refname>
- <refpurpose>lightweight resolver configuration</refpurpose>
- </refnamediv>
-
- <refsynopsisdiv>
- <funcsynopsis>
-<funcsynopsisinfo>#include &lt;lwres/lwres.h&gt;</funcsynopsisinfo>
-<funcprototype>
- <funcdef>
-void
-<function>lwres_conf_init</function></funcdef>
- <paramdef>lwres_context_t *<parameter>ctx</parameter></paramdef>
- </funcprototype>
-<funcprototype>
- <funcdef>
-void
-<function>lwres_conf_clear</function></funcdef>
- <paramdef>lwres_context_t *<parameter>ctx</parameter></paramdef>
- </funcprototype>
-<funcprototype>
- <funcdef>
-lwres_result_t
-<function>lwres_conf_parse</function></funcdef>
- <paramdef>lwres_context_t *<parameter>ctx</parameter></paramdef>
- <paramdef>const char *<parameter>filename</parameter></paramdef>
- </funcprototype>
-<funcprototype>
- <funcdef>
-lwres_result_t
-<function>lwres_conf_print</function></funcdef>
- <paramdef>lwres_context_t *<parameter>ctx</parameter></paramdef>
- <paramdef>FILE *<parameter>fp</parameter></paramdef>
- </funcprototype>
-<funcprototype>
- <funcdef>
-lwres_conf_t *
-<function>lwres_conf_get</function></funcdef>
- <paramdef>lwres_context_t *<parameter>ctx</parameter></paramdef>
- </funcprototype>
-</funcsynopsis>
- </refsynopsisdiv>
-
- <refsection><info><title>DESCRIPTION</title></info>
-
-
- <para><function>lwres_conf_init()</function>
- creates an empty
- <type>lwres_conf_t</type>
- structure for lightweight resolver context
- <parameter>ctx</parameter>.
- </para>
-
- <para><function>lwres_conf_clear()</function>
- frees up all the internal memory used by
- that
- <type>lwres_conf_t</type>
- structure in resolver context
- <parameter>ctx</parameter>.
- </para>
-
- <para><function>lwres_conf_parse()</function>
- opens the file
- <parameter>filename</parameter>
- and parses it to initialise the resolver context
- <parameter>ctx</parameter>'s
- <type>lwres_conf_t</type>
- structure.
- </para>
-
- <para><function>lwres_conf_print()</function>
- prints the
- <type>lwres_conf_t</type>
- structure for resolver context
- <parameter>ctx</parameter>
- to the
- <type>FILE</type>
- <parameter>fp</parameter>.
- </para>
- </refsection>
- <refsection><info><title>RETURN VALUES</title></info>
-
-
-
- <para><function>lwres_conf_parse()</function>
- returns <errorcode>LWRES_R_SUCCESS</errorcode>
- if it successfully read and parsed
- <parameter>filename</parameter>.
- It returns <errorcode>LWRES_R_FAILURE</errorcode>
- if <parameter>filename</parameter>
- could not be opened or contained incorrect
- resolver statements.
- </para>
-
- <para><function>lwres_conf_print()</function>
- returns <errorcode>LWRES_R_SUCCESS</errorcode>
- unless an error occurred when converting the network addresses to a
- numeric host address string.
- If this happens, the function returns
- <errorcode>LWRES_R_FAILURE</errorcode>.
- </para>
- </refsection>
- <refsection><info><title>SEE ALSO</title></info>
-
- <para><citerefentry>
- <refentrytitle>stdio</refentrytitle><manvolnum>3</manvolnum>
- </citerefentry>,
- <citerefentry>
- <refentrytitle>resolver</refentrytitle><manvolnum>5</manvolnum>
- </citerefentry>.
- </para>
- </refsection>
- <refsection><info><title>FILES</title></info>
-
- <para><filename>/etc/resolv.conf</filename>
- </para>
- </refsection>
-</refentry>
diff --git a/usr.sbin/bind/lib/lwres/man/lwres_context.docbook b/usr.sbin/bind/lib/lwres/man/lwres_context.docbook
deleted file mode 100644
index 28cb760c35a..00000000000
--- a/usr.sbin/bind/lib/lwres/man/lwres_context.docbook
+++ /dev/null
@@ -1,260 +0,0 @@
-<!DOCTYPE book [
-<!ENTITY mdash "&#8212;">]>
-<!--
- - Copyright (C) Internet Systems Consortium, Inc. ("ISC")
- -
- - Permission to use, copy, modify, and/or 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.
- -
- - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- - AND FITNESS. IN NO EVENT SHALL ISC 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.
--->
-
-<!-- Converted by db4-upgrade version 1.0 -->
-<refentry xmlns:db="http://docbook.org/ns/docbook" version="5.0">
- <info>
- <date>2007-06-18</date>
- </info>
- <refentryinfo>
- <corpname>ISC</corpname>
- <corpauthor>Internet Systems Consortium, Inc.</corpauthor>
- </refentryinfo>
-
- <refmeta>
- <refentrytitle>lwres_context</refentrytitle>
- <manvolnum>3</manvolnum>
- <refmiscinfo>BIND9</refmiscinfo>
- </refmeta>
-
- <docinfo>
- <copyright>
- <year>2000</year>
- <year>2001</year>
- <year>2003</year>
- <year>2004</year>
- <year>2005</year>
- <year>2007</year>
- <year>2014</year>
- <year>2015</year>
- <year>2016</year>
- <year>2018</year>
- <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
- </copyright>
- </docinfo>
-
- <refnamediv>
- <refname>lwres_context_create</refname>
- <refname>lwres_context_destroy</refname>
- <refname>lwres_context_nextserial</refname>
- <refname>lwres_context_initserial</refname>
- <refname>lwres_context_freemem</refname>
- <refname>lwres_context_allocmem</refname>
- <refname>lwres_context_sendrecv</refname>
- <refpurpose>lightweight resolver context management</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
-<funcsynopsisinfo>#include &lt;lwres/lwres.h&gt;</funcsynopsisinfo>
-<funcprototype>
- <funcdef>
-lwres_result_t
-<function>lwres_context_create</function></funcdef>
- <paramdef>lwres_context_t **<parameter>contextp</parameter></paramdef>
- <paramdef>void *<parameter>arg</parameter></paramdef>
- <paramdef>lwres_malloc_t <parameter>malloc_function</parameter></paramdef>
- <paramdef>lwres_free_t <parameter>free_function</parameter></paramdef>
- </funcprototype>
-<funcprototype>
- <funcdef>
-lwres_result_t
-<function>lwres_context_destroy</function></funcdef>
- <paramdef>lwres_context_t **<parameter>contextp</parameter></paramdef>
- </funcprototype>
-<funcprototype>
- <funcdef>
-void
-<function>lwres_context_initserial</function></funcdef>
- <paramdef>lwres_context_t *<parameter>ctx</parameter></paramdef>
- <paramdef>lwres_uint32_t <parameter>serial</parameter></paramdef>
- </funcprototype>
-<funcprototype>
- <funcdef>
-lwres_uint32_t
-<function>lwres_context_nextserial</function></funcdef>
- <paramdef>lwres_context_t *<parameter>ctx</parameter></paramdef>
- </funcprototype>
-<funcprototype>
- <funcdef>
-void
-<function>lwres_context_freemem</function></funcdef>
- <paramdef>lwres_context_t *<parameter>ctx</parameter></paramdef>
- <paramdef>void *<parameter>mem</parameter></paramdef>
- <paramdef>size_t <parameter>len</parameter></paramdef>
- </funcprototype>
-<funcprototype>
- <funcdef>
-void
-<function>lwres_context_allocmem</function></funcdef>
- <paramdef>lwres_context_t *<parameter>ctx</parameter></paramdef>
- <paramdef>size_t <parameter>len</parameter></paramdef>
- </funcprototype>
-<funcprototype>
- <funcdef>
-void *
-<function>lwres_context_sendrecv</function></funcdef>
- <paramdef>lwres_context_t *<parameter>ctx</parameter></paramdef>
- <paramdef>void *<parameter>sendbase</parameter></paramdef>
- <paramdef>int <parameter>sendlen</parameter></paramdef>
- <paramdef>void *<parameter>recvbase</parameter></paramdef>
- <paramdef>int <parameter>recvlen</parameter></paramdef>
- <paramdef>int *<parameter>recvd_len</parameter></paramdef>
- </funcprototype>
-</funcsynopsis>
- </refsynopsisdiv>
- <refsection><info><title>DESCRIPTION</title></info>
-
-
- <para><function>lwres_context_create()</function>
- creates a <type>lwres_context_t</type> structure for use in
- lightweight resolver operations. It holds a socket and other
- data needed for communicating with a resolver daemon. The new
- <type>lwres_context_t</type> is returned through
- <parameter>contextp</parameter>, a pointer to a
- <type>lwres_context_t</type> pointer. This
- <type>lwres_context_t</type> pointer must initially be NULL, and
- is modified to point to the newly created
- <type>lwres_context_t</type>.
- </para>
- <para>
- When the lightweight resolver needs to perform dynamic memory
- allocation, it will call
- <parameter>malloc_function</parameter>
- to allocate memory and
- <parameter>free_function</parameter>
- to free it. If
- <parameter>malloc_function</parameter>
- and
- <parameter>free_function</parameter>
- are NULL, memory is allocated using
- <citerefentry>
- <refentrytitle>malloc</refentrytitle><manvolnum>3</manvolnum>
- </citerefentry>.
- and
- <citerefentry>
- <refentrytitle>free</refentrytitle><manvolnum>3</manvolnum>
- </citerefentry>.
-
- It is not permitted to have a NULL
- <parameter>malloc_function</parameter> and a non-NULL
- <parameter>free_function</parameter> or vice versa.
- <parameter>arg</parameter> is passed as the first parameter to
- the memory allocation functions. If
- <parameter>malloc_function</parameter> and
- <parameter>free_function</parameter> are NULL,
- <parameter>arg</parameter> is unused and should be passed as
- NULL.
- </para>
-
- <para>
- Once memory for the structure has been allocated,
- it is initialized using
- <citerefentry>
- <refentrytitle>lwres_conf_init</refentrytitle><manvolnum>3</manvolnum>
- </citerefentry>
- and returned via <parameter>*contextp</parameter>.
- </para>
-
- <para><function>lwres_context_destroy()</function>
- destroys a <type>lwres_context_t</type>, closing its socket.
- <parameter>contextp</parameter> is a pointer to a pointer to the
- context that is to be destroyed. The pointer will be set to
- NULL when the context has been destroyed.
- </para>
-
- <para>
- The context holds a serial number that is used to identify
- resolver request packets and associate responses with the
- corresponding requests. This serial number is controlled using
- <function>lwres_context_initserial()</function> and
- <function>lwres_context_nextserial()</function>.
- <function>lwres_context_initserial()</function> sets the serial
- number for context <parameter>*ctx</parameter> to
- <parameter>serial</parameter>.
- <function>lwres_context_nextserial()</function> increments the
- serial number and returns the previous value.
- </para>
-
- <para>
- Memory for a lightweight resolver context is allocated and freed
- using <function>lwres_context_allocmem()</function> and
- <function>lwres_context_freemem()</function>. These use
- whatever allocations were defined when the context was created
- with <function>lwres_context_create()</function>.
- <function>lwres_context_allocmem()</function> allocates
- <parameter>len</parameter> bytes of memory and if successful
- returns a pointer to the allocated storage.
- <function>lwres_context_freemem()</function> frees
- <parameter>len</parameter> bytes of space starting at location
- <parameter>mem</parameter>.
- </para>
-
- <para><function>lwres_context_sendrecv()</function>
- performs I/O for the context <parameter>ctx</parameter>. Data
- are read and written from the context's socket. It writes data
- from <parameter>sendbase</parameter> &mdash; typically a
- lightweight resolver query packet &mdash; and waits for a reply
- which is copied to the receive buffer at
- <parameter>recvbase</parameter>. The number of bytes that were
- written to this receive buffer is returned in
- <parameter>*recvd_len</parameter>.
- </para>
- </refsection>
-
- <refsection><info><title>RETURN VALUES</title></info>
-
-
- <para><function>lwres_context_create()</function>
- returns <errorcode>LWRES_R_NOMEMORY</errorcode> if memory for
- the <type>struct lwres_context</type> could not be allocated,
- <errorcode>LWRES_R_SUCCESS</errorcode> otherwise.
- </para>
- <para>
- Successful calls to the memory allocator
- <function>lwres_context_allocmem()</function>
- return a pointer to the start of the allocated space.
- It returns NULL if memory could not be allocated.
- </para>
- <para><errorcode>LWRES_R_SUCCESS</errorcode>
- is returned when
- <function>lwres_context_sendrecv()</function>
- completes successfully.
- <errorcode>LWRES_R_IOERROR</errorcode>
- is returned if an I/O error occurs and
- <errorcode>LWRES_R_TIMEOUT</errorcode>
- is returned if
- <function>lwres_context_sendrecv()</function>
- times out waiting for a response.
- </para>
- </refsection>
- <refsection><info><title>SEE ALSO</title></info>
-
- <para><citerefentry>
- <refentrytitle>lwres_conf_init</refentrytitle><manvolnum>3</manvolnum>
- </citerefentry>,
-
- <citerefentry>
- <refentrytitle>malloc</refentrytitle><manvolnum>3</manvolnum>
- </citerefentry>,
-
- <citerefentry>
- <refentrytitle>free</refentrytitle><manvolnum>3</manvolnum>
- </citerefentry>.
- </para>
- </refsection>
-</refentry>
diff --git a/usr.sbin/bind/lib/lwres/man/lwres_gabn.docbook b/usr.sbin/bind/lib/lwres/man/lwres_gabn.docbook
deleted file mode 100644
index 256ea371504..00000000000
--- a/usr.sbin/bind/lib/lwres/man/lwres_gabn.docbook
+++ /dev/null
@@ -1,258 +0,0 @@
-<!DOCTYPE book [
-<!ENTITY mdash "&#8212;">]>
-<!--
- - Copyright (C) Internet Systems Consortium, Inc. ("ISC")
- -
- - Permission to use, copy, modify, and/or 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.
- -
- - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- - AND FITNESS. IN NO EVENT SHALL ISC 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.
--->
-
-<!-- Converted by db4-upgrade version 1.0 -->
-<refentry xmlns:db="http://docbook.org/ns/docbook" version="5.0">
- <info>
- <date>2007-06-18</date>
- </info>
- <refentryinfo>
- <corpname>ISC</corpname>
- <corpauthor>Internet Systems Consortium, Inc.</corpauthor>
- </refentryinfo>
-
- <refmeta>
- <refentrytitle>lwres_gabn</refentrytitle>
- <manvolnum>3</manvolnum>
- <refmiscinfo>BIND9</refmiscinfo>
- </refmeta>
-
- <docinfo>
- <copyright>
- <year>2000</year>
- <year>2001</year>
- <year>2004</year>
- <year>2005</year>
- <year>2007</year>
- <year>2014</year>
- <year>2015</year>
- <year>2016</year>
- <year>2018</year>
- <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
- </copyright>
- </docinfo>
-
- <refnamediv>
- <refname>lwres_gabnrequest_render</refname>
- <refname>lwres_gabnresponse_render</refname>
- <refname>lwres_gabnrequest_parse</refname>
- <refname>lwres_gabnresponse_parse</refname>
- <refname>lwres_gabnresponse_free</refname>
- <refname>lwres_gabnrequest_free</refname>
- <refpurpose>lightweight resolver getaddrbyname message handling</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
-<funcsynopsisinfo>#include &lt;lwres/lwres.h&gt;</funcsynopsisinfo>
-<funcprototype>
- <funcdef>
-lwres_result_t
-<function>lwres_gabnrequest_render</function></funcdef>
- <paramdef>lwres_context_t *<parameter>ctx</parameter></paramdef>
- <paramdef>lwres_gabnrequest_t *<parameter>req</parameter></paramdef>
- <paramdef>lwres_lwpacket_t *<parameter>pkt</parameter></paramdef>
- <paramdef>lwres_buffer_t *<parameter>b</parameter></paramdef>
- </funcprototype>
-<funcprototype>
- <funcdef>
-lwres_result_t
-<function>lwres_gabnresponse_render</function></funcdef>
- <paramdef>lwres_context_t *<parameter>ctx</parameter></paramdef>
- <paramdef>lwres_gabnresponse_t *<parameter>req</parameter></paramdef>
- <paramdef>lwres_lwpacket_t *<parameter>pkt</parameter></paramdef>
- <paramdef>lwres_buffer_t *<parameter>b</parameter></paramdef>
- </funcprototype>
-<funcprototype>
- <funcdef>
-lwres_result_t
-<function>lwres_gabnrequest_parse</function></funcdef>
- <paramdef>lwres_context_t *<parameter>ctx</parameter></paramdef>
- <paramdef>lwres_buffer_t *<parameter>b</parameter></paramdef>
- <paramdef>lwres_lwpacket_t *<parameter>pkt</parameter></paramdef>
- <paramdef>lwres_gabnrequest_t **<parameter>structp</parameter></paramdef>
- </funcprototype>
-<funcprototype>
- <funcdef>
-lwres_result_t
-<function>lwres_gabnresponse_parse</function></funcdef>
- <paramdef>lwres_context_t *<parameter>ctx</parameter></paramdef>
- <paramdef>lwres_buffer_t *<parameter>b</parameter></paramdef>
- <paramdef>lwres_lwpacket_t *<parameter>pkt</parameter></paramdef>
- <paramdef>lwres_gabnresponse_t **<parameter>structp</parameter></paramdef>
- </funcprototype>
-<funcprototype>
- <funcdef>
-void
-<function>lwres_gabnresponse_free</function></funcdef>
- <paramdef>lwres_context_t *<parameter>ctx</parameter></paramdef>
- <paramdef>lwres_gabnresponse_t **<parameter>structp</parameter></paramdef>
- </funcprototype>
-<funcprototype>
- <funcdef>
-void
-<function>lwres_gabnrequest_free</function></funcdef>
- <paramdef>lwres_context_t *<parameter>ctx</parameter></paramdef>
- <paramdef>lwres_gabnrequest_t **<parameter>structp</parameter></paramdef>
- </funcprototype>
-</funcsynopsis>
- </refsynopsisdiv>
- <refsection><info><title>DESCRIPTION</title></info>
-
- <para>
- These are low-level routines for creating and parsing
- lightweight resolver name-to-address lookup request and
- response messages.
- </para>
- <para>
- There are four main functions for the getaddrbyname opcode.
- One render function converts a getaddrbyname request structure &mdash;
- <type>lwres_gabnrequest_t</type> &mdash;
- to the lightweight resolver's canonical format.
- It is complemented by a parse function that converts a packet in this
- canonical format to a getaddrbyname request structure.
- Another render function converts the getaddrbyname response structure
- &mdash; <type>lwres_gabnresponse_t</type> &mdash;
- to the canonical format.
- This is complemented by a parse function which converts a packet in
- canonical format to a getaddrbyname response structure.
- </para>
- <para>
- These structures are defined in
- <filename>&lt;lwres/lwres.h&gt;</filename>.
- They are shown below.
- </para>
- <para><programlisting>
-#define LWRES_OPCODE_GETADDRSBYNAME 0x00010001U
-</programlisting>
- </para>
- <para><programlisting>
-typedef struct lwres_addr lwres_addr_t;
-typedef LWRES_LIST(lwres_addr_t) lwres_addrlist_t;
-</programlisting>
- </para>
- <para><programlisting>
-typedef struct {
- lwres_uint32_t flags;
- lwres_uint32_t addrtypes;
- lwres_uint16_t namelen;
- char *name;
-} lwres_gabnrequest_t;
-</programlisting>
- </para>
- <para><programlisting>
-typedef struct {
- lwres_uint32_t flags;
- lwres_uint16_t naliases;
- lwres_uint16_t naddrs;
- char *realname;
- char **aliases;
- lwres_uint16_t realnamelen;
- lwres_uint16_t *aliaslen;
- lwres_addrlist_t addrs;
- void *base;
- size_t baselen;
-} lwres_gabnresponse_t;
-</programlisting>
- </para>
-
- <para><function>lwres_gabnrequest_render()</function>
- uses resolver context <parameter>ctx</parameter> to convert
- getaddrbyname request structure <parameter>req</parameter> to
- canonical format. The packet header structure
- <parameter>pkt</parameter> is initialised and transferred to
- buffer <parameter>b</parameter>.
-
- The contents of <parameter>*req</parameter> are then appended to
- the buffer in canonical format.
- <function>lwres_gabnresponse_render()</function> performs the
- same task, except it converts a getaddrbyname response structure
- <type>lwres_gabnresponse_t</type> to the lightweight resolver's
- canonical format.
- </para>
-
- <para><function>lwres_gabnrequest_parse()</function>
- uses context <parameter>ctx</parameter> to convert the contents
- of packet <parameter>pkt</parameter> to a
- <type>lwres_gabnrequest_t</type> structure. Buffer
- <parameter>b</parameter> provides space to be used for storing
- this structure. When the function succeeds, the resulting
- <type>lwres_gabnrequest_t</type> is made available through
- <parameter>*structp</parameter>.
-
- <function>lwres_gabnresponse_parse()</function> offers the same
- semantics as <function>lwres_gabnrequest_parse()</function>
- except it yields a <type>lwres_gabnresponse_t</type> structure.
- </para>
-
- <para><function>lwres_gabnresponse_free()</function>
- and <function>lwres_gabnrequest_free()</function> release the
- memory in resolver context <parameter>ctx</parameter> that was
- allocated to the <type>lwres_gabnresponse_t</type> or
- <type>lwres_gabnrequest_t</type> structures referenced via
- <parameter>structp</parameter>.
-
- Any memory associated with ancillary buffers and strings for
- those structures is also discarded.
- </para>
- </refsection>
- <refsection><info><title>RETURN VALUES</title></info>
-
- <para>
- The getaddrbyname opcode functions
- <function>lwres_gabnrequest_render()</function>,
- <function>lwres_gabnresponse_render()</function>
- <function>lwres_gabnrequest_parse()</function>
- and
- <function>lwres_gabnresponse_parse()</function>
- all return
- <errorcode>LWRES_R_SUCCESS</errorcode>
- on success.
- They return
- <errorcode>LWRES_R_NOMEMORY</errorcode>
- if memory allocation fails.
- <errorcode>LWRES_R_UNEXPECTEDEND</errorcode>
- is returned if the available space in the buffer
- <parameter>b</parameter>
- is too small to accommodate the packet header or the
- <type>lwres_gabnrequest_t</type>
- and
- <type>lwres_gabnresponse_t</type>
- structures.
- <function>lwres_gabnrequest_parse()</function>
- and
- <function>lwres_gabnresponse_parse()</function>
- will return
- <errorcode>LWRES_R_UNEXPECTEDEND</errorcode>
- if the buffer is not empty after decoding the received packet.
- These functions will return
- <errorcode>LWRES_R_FAILURE</errorcode>
- if
- <varname remap="structfield">pktflags</varname>
- in the packet header structure
- <type>lwres_lwpacket_t</type>
- indicate that the packet is not a response to an earlier query.
- </para>
- </refsection>
- <refsection><info><title>SEE ALSO</title></info>
-
- <para><citerefentry>
- <refentrytitle>lwres_packet</refentrytitle><manvolnum>3</manvolnum>
- </citerefentry>
- </para>
- </refsection>
-</refentry>
diff --git a/usr.sbin/bind/lib/lwres/man/lwres_gai_strerror.docbook b/usr.sbin/bind/lib/lwres/man/lwres_gai_strerror.docbook
deleted file mode 100644
index 619825d2e2e..00000000000
--- a/usr.sbin/bind/lib/lwres/man/lwres_gai_strerror.docbook
+++ /dev/null
@@ -1,196 +0,0 @@
-<!--
- - Copyright (C) Internet Systems Consortium, Inc. ("ISC")
- -
- - Permission to use, copy, modify, and/or 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.
- -
- - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- - AND FITNESS. IN NO EVENT SHALL ISC 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.
--->
-
-<!-- Converted by db4-upgrade version 1.0 -->
-<refentry xmlns:db="http://docbook.org/ns/docbook" version="5.0">
- <info>
- <date>2007-06-18</date>
- </info>
- <refentryinfo>
- <corpname>ISC</corpname>
- <corpauthor>Internet Systems Consortium, Inc.</corpauthor>
- </refentryinfo>
-
- <refmeta>
- <refentrytitle>lwres_gai_strerror</refentrytitle>
- <manvolnum>3</manvolnum>
- <refmiscinfo>BIND9</refmiscinfo>
- </refmeta>
-
- <docinfo>
- <copyright>
- <year>2000</year>
- <year>2001</year>
- <year>2004</year>
- <year>2005</year>
- <year>2007</year>
- <year>2014</year>
- <year>2015</year>
- <year>2016</year>
- <year>2018</year>
- <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
- </copyright>
- </docinfo>
-
- <refnamediv>
- <refname>lwres_gai_strerror</refname>
- <refpurpose>print suitable error string</refpurpose>
- </refnamediv>
-
- <refsynopsisdiv>
- <funcsynopsis>
-<funcsynopsisinfo>#include &lt;lwres/netdb.h&gt;</funcsynopsisinfo>
-<funcprototype>
- <funcdef>
-char *
-<function>gai_strerror</function></funcdef>
- <paramdef>int <parameter>ecode</parameter></paramdef>
- </funcprototype>
-</funcsynopsis>
- </refsynopsisdiv>
-
- <refsection><info><title>DESCRIPTION</title></info>
-
-
- <para><function>lwres_gai_strerror()</function>
- returns an error message corresponding to an error code returned by
- <function>getaddrinfo()</function>.
- The following error codes and their meaning are defined in
- <filename>include/lwres/netdb.h</filename>.
- <variablelist>
- <varlistentry>
- <term><errorcode>EAI_ADDRFAMILY</errorcode></term>
- <listitem>
- <para>
- address family for hostname not supported
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><errorcode>EAI_AGAIN</errorcode></term>
- <listitem>
- <para>
- temporary failure in name resolution
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><errorcode>EAI_BADFLAGS</errorcode></term>
- <listitem>
- <para>
- invalid value for
- <constant>ai_flags</constant>
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><errorcode>EAI_FAIL</errorcode></term>
- <listitem>
- <para>
- non-recoverable failure in name resolution
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><errorcode>EAI_FAMILY</errorcode></term>
- <listitem>
- <para><constant>ai_family</constant> not supported
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><errorcode>EAI_MEMORY</errorcode></term>
- <listitem>
- <para>
- memory allocation failure
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><errorcode>EAI_NODATA</errorcode></term>
- <listitem>
- <para>
- no address associated with hostname
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><errorcode>EAI_NONAME</errorcode></term>
- <listitem>
- <para>
- hostname or servname not provided, or not known
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><errorcode>EAI_SERVICE</errorcode></term>
- <listitem>
- <para>
- servname not supported for <constant>ai_socktype</constant>
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><errorcode>EAI_SOCKTYPE</errorcode></term>
- <listitem>
- <para><constant>ai_socktype</constant> not supported
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><errorcode>EAI_SYSTEM</errorcode></term>
- <listitem>
- <para>
- system error returned in errno
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- The message <errorname>invalid error code</errorname> is returned if
- <parameter>ecode</parameter>
- is out of range.
- </para>
- <para><constant>ai_flags</constant>,
- <constant>ai_family</constant>
- and
- <constant>ai_socktype</constant>
- are elements of the
- <type>struct addrinfo</type>
- used by
- <function>lwres_getaddrinfo()</function>.
- </para>
- </refsection>
-
- <refsection><info><title>SEE ALSO</title></info>
-
- <para><citerefentry>
- <refentrytitle>strerror</refentrytitle><manvolnum>3</manvolnum>
- </citerefentry>,
-
- <citerefentry>
- <refentrytitle>lwres_getaddrinfo</refentrytitle><manvolnum>3</manvolnum>
- </citerefentry>,
-
- <citerefentry>
- <refentrytitle>getaddrinfo</refentrytitle><manvolnum>3</manvolnum>
- </citerefentry>,
-
- <citerefentry>
- <refentrytitle>RFC2133</refentrytitle>
- </citerefentry>.
- </para>
- </refsection>
-</refentry>
diff --git a/usr.sbin/bind/lib/lwres/man/lwres_getaddrinfo.docbook b/usr.sbin/bind/lib/lwres/man/lwres_getaddrinfo.docbook
deleted file mode 100644
index af36b9f074b..00000000000
--- a/usr.sbin/bind/lib/lwres/man/lwres_getaddrinfo.docbook
+++ /dev/null
@@ -1,385 +0,0 @@
-<!DOCTYPE book [
-<!ENTITY mdash "&#8212;">]>
-<!--
- - Copyright (C) Internet Systems Consortium, Inc. ("ISC")
- -
- - Permission to use, copy, modify, and/or 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.
- -
- - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- - AND FITNESS. IN NO EVENT SHALL ISC 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.
--->
-
-<!-- Converted by db4-upgrade version 1.0 -->
-<refentry xmlns:db="http://docbook.org/ns/docbook" version="5.0">
- <info>
- <date>2007-06-18</date>
- </info>
- <refentryinfo>
- <corpname>ISC</corpname>
- <corpauthor>Internet Systems Consortium, Inc.</corpauthor>
- </refentryinfo>
-
- <refmeta>
- <refentrytitle>lwres_getaddrinfo</refentrytitle>
- <manvolnum>3</manvolnum>
- <refmiscinfo>BIND9</refmiscinfo>
- </refmeta>
-
- <docinfo>
- <copyright>
- <year>2000</year>
- <year>2001</year>
- <year>2003</year>
- <year>2004</year>
- <year>2005</year>
- <year>2007</year>
- <year>2014</year>
- <year>2015</year>
- <year>2016</year>
- <year>2018</year>
- <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
- </copyright>
- </docinfo>
-
- <refnamediv>
- <refname>lwres_getaddrinfo</refname>
- <refname>lwres_freeaddrinfo</refname>
- <refpurpose>socket address structure to host and service name</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
-<funcsynopsisinfo>#include &lt;lwres/netdb.h&gt;</funcsynopsisinfo>
-<funcprototype>
- <funcdef>
-int
-<function>lwres_getaddrinfo</function></funcdef>
- <paramdef>const char *<parameter>hostname</parameter></paramdef>
- <paramdef>const char *<parameter>servname</parameter></paramdef>
- <paramdef>const struct addrinfo *<parameter>hints</parameter></paramdef>
- <paramdef>struct addrinfo **<parameter>res</parameter></paramdef>
- </funcprototype>
-<funcprototype>
- <funcdef>
-void
-<function>lwres_freeaddrinfo</function></funcdef>
- <paramdef>struct addrinfo *<parameter>ai</parameter></paramdef>
- </funcprototype>
-</funcsynopsis>
-
- <para>
- If the operating system does not provide a
- <type>struct addrinfo</type>,
- the following structure is used:
- </para>
- <para><programlisting>
-struct addrinfo {
- int ai_flags; /* AI_PASSIVE, AI_CANONNAME */
- int ai_family; /* PF_xxx */
- int ai_socktype; /* SOCK_xxx */
- int ai_protocol; /* 0 or IPPROTO_xxx for IPv4 and IPv6 */
- size_t ai_addrlen; /* length of ai_addr */
- char *ai_canonname; /* canonical name for hostname */
- struct sockaddr *ai_addr; /* binary address */
- struct addrinfo *ai_next; /* next structure in linked list */
-};
-</programlisting>
- </para>
-
- </refsynopsisdiv>
-
- <refsection><info><title>DESCRIPTION</title></info>
-
-
- <para><function>lwres_getaddrinfo()</function>
- is used to get a list of IP addresses and port numbers for host
- <parameter>hostname</parameter> and service
- <parameter>servname</parameter>.
-
- The function is the lightweight resolver's implementation of
- <function>getaddrinfo()</function> as defined in RFC2133.
- <parameter>hostname</parameter> and
- <parameter>servname</parameter> are pointers to null-terminated
- strings or <type>NULL</type>.
-
- <parameter>hostname</parameter> is either a host name or a
- numeric host address string: a dotted decimal IPv4 address or an
- IPv6 address. <parameter>servname</parameter> is either a
- decimal port number or a service name as listed in
- <filename>/etc/services</filename>.
- </para>
-
- <para><parameter>hints</parameter>
- is an optional pointer to a
- <type>struct addrinfo</type>.
- This structure can be used to provide hints concerning the type of
- socket
- that the caller supports or wishes to use.
- The caller can supply the following structure elements in
- <parameter>*hints</parameter>:
-
- <variablelist>
- <varlistentry>
- <term><constant>ai_family</constant></term>
- <listitem>
- <para>
- The protocol family that should be used.
- When
- <constant>ai_family</constant>
- is set to
- <type>PF_UNSPEC</type>,
- it means the caller will accept any protocol family supported by
- the
- operating system.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>ai_socktype</constant></term>
- <listitem>
- <para>
- denotes the type of socket &mdash;
- <type>SOCK_STREAM</type>,
- <type>SOCK_DGRAM</type>
- or
- <type>SOCK_RAW</type>
- &mdash; that is wanted.
- When
- <constant>ai_socktype</constant>
- is zero the caller will accept any socket type.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>ai_protocol</constant></term>
- <listitem>
- <para>
- indicates which transport protocol is wanted: IPPROTO_UDP or
- IPPROTO_TCP.
- If
- <constant>ai_protocol</constant>
- is zero the caller will accept any protocol.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>ai_flags</constant></term>
- <listitem>
- <para>
- Flag bits.
- If the
- <type>AI_CANONNAME</type>
- bit is set, a successful call to
- <function>lwres_getaddrinfo()</function>
- will return a null-terminated string containing the canonical
- name
- of the specified hostname in
- <constant>ai_canonname</constant>
- of the first
- <type>addrinfo</type>
- structure returned.
- Setting the
- <type>AI_PASSIVE</type>
- bit indicates that the returned socket address structure is
- intended
- for used in a call to
- <citerefentry>
- <refentrytitle>bind</refentrytitle><manvolnum>2</manvolnum>
- </citerefentry>.
-
- In this case, if the hostname argument is a
- <type>NULL</type>
- pointer, then the IP address portion of the socket
- address structure will be set to
- <type>INADDR_ANY</type>
- for an IPv4 address or
- <type>IN6ADDR_ANY_INIT</type>
- for an IPv6 address.
- </para>
- <para>
- When
- <constant>ai_flags</constant>
- does not set the
- <type>AI_PASSIVE</type>
- bit, the returned socket address structure will be ready
- for use in a call to
- <citerefentry>
- <refentrytitle>connect</refentrytitle><manvolnum>2</manvolnum>
- </citerefentry>
- for a connection-oriented protocol or
- <citerefentry>
- <refentrytitle>connect</refentrytitle><manvolnum>2</manvolnum>
- </citerefentry>,
-
- <citerefentry>
- <refentrytitle>sendto</refentrytitle><manvolnum>2</manvolnum>
- </citerefentry>,
-
- or
- <citerefentry>
- <refentrytitle>sendmsg</refentrytitle><manvolnum>2</manvolnum>
- </citerefentry>
- if a connectionless protocol was chosen.
- The IP address portion of the socket address structure will be
- set to the loopback address if
- <parameter>hostname</parameter>
- is a
- <type>NULL</type>
- pointer and
- <type>AI_PASSIVE</type>
- is not set in
- <constant>ai_flags</constant>.
- </para>
- <para>
- If
- <constant>ai_flags</constant>
- is set to
- <type>AI_NUMERICHOST</type>
- it indicates that
- <parameter>hostname</parameter>
- should be treated as a numeric string defining an IPv4 or IPv6
- address
- and no name resolution should be attempted.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </para>
-
- <para>
- All other elements of the <type>struct addrinfo</type> passed
- via <parameter>hints</parameter> must be zero.
- </para>
-
- <para>
- A <parameter>hints</parameter> of <type>NULL</type> is
- treated as if
- the caller provided a <type>struct addrinfo</type> initialized to zero
- with <constant>ai_family</constant>set to
- <constant>PF_UNSPEC</constant>.
- </para>
-
- <para>
- After a successful call to
- <function>lwres_getaddrinfo()</function>,
- <parameter>*res</parameter>
- is a pointer to a linked list of one or more
- <type>addrinfo</type>
- structures.
- Each
- <type>struct addrinfo</type>
- in this list cn be processed by following
- the
- <constant>ai_next</constant>
- pointer, until a
- <type>NULL</type>
- pointer is encountered.
- The three members
- <constant>ai_family</constant>,
- <constant>ai_socktype</constant>,
- and
- <constant>ai_protocol</constant>
- in each
- returned
- <type>addrinfo</type>
- structure contain the corresponding arguments for a call to
- <citerefentry>
- <refentrytitle>socket</refentrytitle><manvolnum>2</manvolnum>
- </citerefentry>.
- For each
- <type>addrinfo</type>
- structure in the list, the
- <constant>ai_addr</constant>
- member points to a filled-in socket address structure of length
- <constant>ai_addrlen</constant>.
- </para>
-
- <para>
- All of the information returned by
- <function>lwres_getaddrinfo()</function>
- is dynamically allocated: the addrinfo structures, and the socket
- address structures and canonical host name strings pointed to by the
- <constant>addrinfo</constant>structures.
- Memory allocated for the dynamically allocated structures created by
- a successful call to
- <function>lwres_getaddrinfo()</function>
- is released by
- <function>lwres_freeaddrinfo()</function>.
- <parameter>ai</parameter>
- is a pointer to a
- <type>struct addrinfo</type>
- created by a call to
- <function>lwres_getaddrinfo()</function>.
- </para>
-
- </refsection>
-
- <refsection><info><title>RETURN VALUES</title></info>
-
-
- <para><function>lwres_getaddrinfo()</function>
- returns zero on success or one of the error codes listed in
- <citerefentry>
- <refentrytitle>gai_strerror</refentrytitle><manvolnum>3</manvolnum>
- </citerefentry>
- if an error occurs. If both <parameter>hostname</parameter> and
- <parameter>servname</parameter> are <type>NULL</type>
- <function>lwres_getaddrinfo()</function> returns
- <errorcode>EAI_NONAME</errorcode>.
- </para>
- </refsection>
- <refsection><info><title>SEE ALSO</title></info>
-
- <para><citerefentry>
- <refentrytitle>lwres</refentrytitle><manvolnum>3</manvolnum>
- </citerefentry>,
-
- <citerefentry>
- <refentrytitle>lwres_getaddrinfo</refentrytitle><manvolnum>3</manvolnum>
- </citerefentry>,
-
- <citerefentry>
- <refentrytitle>lwres_freeaddrinfo</refentrytitle><manvolnum>3</manvolnum>
- </citerefentry>,
-
- <citerefentry>
- <refentrytitle>lwres_gai_strerror</refentrytitle><manvolnum>3</manvolnum>
- </citerefentry>,
-
- <citerefentry>
- <refentrytitle>RFC2133</refentrytitle>
- </citerefentry>,
-
- <citerefentry>
- <refentrytitle>getservbyname</refentrytitle><manvolnum>3</manvolnum>
- </citerefentry>,
-
- <citerefentry>
- <refentrytitle>bind</refentrytitle><manvolnum>2</manvolnum>
- </citerefentry>,
-
- <citerefentry>
- <refentrytitle>connect</refentrytitle><manvolnum>2</manvolnum>
- </citerefentry>,
-
- <citerefentry>
- <refentrytitle>sendto</refentrytitle><manvolnum>2</manvolnum>
- </citerefentry>,
-
- <citerefentry>
- <refentrytitle>sendmsg</refentrytitle><manvolnum>2</manvolnum>
- </citerefentry>,
-
- <citerefentry>
- <refentrytitle>socket</refentrytitle><manvolnum>2</manvolnum>
- </citerefentry>.
- </para>
-
- </refsection>
-</refentry>
diff --git a/usr.sbin/bind/lib/lwres/man/lwres_gethostent.docbook b/usr.sbin/bind/lib/lwres/man/lwres_gethostent.docbook
deleted file mode 100644
index 63535c8a09c..00000000000
--- a/usr.sbin/bind/lib/lwres/man/lwres_gethostent.docbook
+++ /dev/null
@@ -1,437 +0,0 @@
-<!DOCTYPE book [
-<!ENTITY mdash "&#8212;">]>
-<!--
- - Copyright (C) Internet Systems Consortium, Inc. ("ISC")
- -
- - Permission to use, copy, modify, and/or 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.
- -
- - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- - AND FITNESS. IN NO EVENT SHALL ISC 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.
--->
-
-<!-- Converted by db4-upgrade version 1.0 -->
-<refentry xmlns:db="http://docbook.org/ns/docbook" version="5.0">
- <info>
- <date>2007-06-18</date>
- </info>
- <refentryinfo>
- <corpname>ISC</corpname>
- <corpauthor>Internet Systems Consortium, Inc.</corpauthor>
- </refentryinfo>
-
- <refmeta>
- <refentrytitle>lwres_gethostent</refentrytitle>
- <manvolnum>3</manvolnum>
- <refmiscinfo>BIND9</refmiscinfo>
- </refmeta>
-
- <docinfo>
- <copyright>
- <year>2001</year>
- <year>2004</year>
- <year>2005</year>
- <year>2007</year>
- <year>2014</year>
- <year>2015</year>
- <year>2016</year>
- <year>2018</year>
- <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
- </copyright>
- </docinfo>
-
- <refnamediv>
- <refname>lwres_gethostbyname</refname>
- <refname>lwres_gethostbyname2</refname>
- <refname>lwres_gethostbyaddr</refname>
- <refname>lwres_gethostent</refname>
- <refname>lwres_sethostent</refname>
- <refname>lwres_endhostent</refname>
- <refname>lwres_gethostbyname_r</refname>
- <refname>lwres_gethostbyaddr_r</refname>
- <refname>lwres_gethostent_r</refname>
- <refname>lwres_sethostent_r</refname>
- <refname>lwres_endhostent_r</refname>
- <refpurpose>lightweight resolver get network host entry</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
-<funcsynopsisinfo>#include &lt;lwres/netdb.h&gt;</funcsynopsisinfo>
-<funcprototype>
- <funcdef>
-struct hostent *
-<function>lwres_gethostbyname</function></funcdef>
- <paramdef>const char *<parameter>name</parameter></paramdef>
- </funcprototype>
-<funcprototype>
- <funcdef>
-struct hostent *
-<function>lwres_gethostbyname2</function></funcdef>
- <paramdef>const char *<parameter>name</parameter></paramdef>
- <paramdef>int <parameter>af</parameter></paramdef>
- </funcprototype>
-<funcprototype>
- <funcdef>
-struct hostent *
-<function>lwres_gethostbyaddr</function></funcdef>
- <paramdef>const char *<parameter>addr</parameter></paramdef>
- <paramdef>int <parameter>len</parameter></paramdef>
- <paramdef>int <parameter>type</parameter></paramdef>
- </funcprototype>
-<funcprototype>
- <funcdef>
-struct hostent *
-<function>lwres_gethostent</function></funcdef>
- <paramdef>void</paramdef>
- </funcprototype>
-<funcprototype>
- <funcdef>
-void
-<function>lwres_sethostent</function></funcdef>
- <paramdef>int <parameter>stayopen</parameter></paramdef>
- </funcprototype>
-<funcprototype>
- <funcdef>
-void
-<function>lwres_endhostent</function></funcdef>
- <paramdef>void</paramdef>
- </funcprototype>
-<funcprototype>
- <funcdef>
-struct hostent *
-<function>lwres_gethostbyname_r</function></funcdef>
- <paramdef>const char *<parameter>name</parameter></paramdef>
- <paramdef>struct hostent *<parameter>resbuf</parameter></paramdef>
- <paramdef>char *<parameter>buf</parameter></paramdef>
- <paramdef>int <parameter>buflen</parameter></paramdef>
- <paramdef>int *<parameter>error</parameter></paramdef>
- </funcprototype>
-<funcprototype>
- <funcdef>
-struct hostent *
-<function>lwres_gethostbyaddr_r</function></funcdef>
- <paramdef>const char *<parameter>addr</parameter></paramdef>
- <paramdef>int <parameter>len</parameter></paramdef>
- <paramdef>int <parameter>type</parameter></paramdef>
- <paramdef>struct hostent *<parameter>resbuf</parameter></paramdef>
- <paramdef>char *<parameter>buf</parameter></paramdef>
- <paramdef>int <parameter>buflen</parameter></paramdef>
- <paramdef>int *<parameter>error</parameter></paramdef>
- </funcprototype>
-<funcprototype>
- <funcdef>
-struct hostent *
-<function>lwres_gethostent_r</function></funcdef>
- <paramdef>struct hostent *<parameter>resbuf</parameter></paramdef>
- <paramdef>char *<parameter>buf</parameter></paramdef>
- <paramdef>int <parameter>buflen</parameter></paramdef>
- <paramdef>int *<parameter>error</parameter></paramdef>
- </funcprototype>
-<funcprototype>
- <funcdef>
-void
-<function>lwres_sethostent_r</function></funcdef>
- <paramdef>int <parameter>stayopen</parameter></paramdef>
- </funcprototype>
-<funcprototype>
- <funcdef>
-void
-<function>lwres_endhostent_r</function></funcdef>
- <paramdef>void</paramdef>
- </funcprototype>
-</funcsynopsis>
- </refsynopsisdiv>
-
- <refsection><info><title>DESCRIPTION</title></info>
-
- <para>
- These functions provide hostname-to-address and
- address-to-hostname lookups by means of the lightweight resolver.
- They are similar to the standard
- <citerefentry>
- <refentrytitle>gethostent</refentrytitle><manvolnum>3</manvolnum>
- </citerefentry>
- functions provided by most operating systems.
- They use a
- <type>struct hostent</type>
- which is usually defined in
- <filename>&lt;namedb.h&gt;</filename>.
- </para>
- <para><programlisting>
-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 */
-</programlisting>
- </para>
- <para>
- The members of this structure are:
- <variablelist>
- <varlistentry>
- <term><constant>h_name</constant></term>
- <listitem>
- <para>
- The official (canonical) name of the host.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>h_aliases</constant></term>
- <listitem>
- <para>
- A NULL-terminated array of alternate names (nicknames) for the
- host.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>h_addrtype</constant></term>
- <listitem>
- <para>
- The type of address being returned &mdash;
- <type>PF_INET</type>
- or
- <type>PF_INET6</type>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>h_length</constant></term>
- <listitem>
- <para>
- The length of the address in bytes.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>h_addr_list</constant></term>
- <listitem>
- <para>
- A <type>NULL</type>
- terminated array of network addresses for the host.
- Host addresses are returned in network byte order.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </para>
- <para>
- For backward compatibility with very old software,
- <constant>h_addr</constant>
- is the first address in
- <constant>h_addr_list.</constant>
- </para>
- <para><function>lwres_gethostent()</function>,
- <function>lwres_sethostent()</function>,
- <function>lwres_endhostent()</function>,
- <function>lwres_gethostent_r()</function>,
- <function>lwres_sethostent_r()</function>
- and
- <function>lwres_endhostent_r()</function>
- provide iteration over the known host entries on systems that
- provide such functionality through facilities like
- <filename>/etc/hosts</filename>
- or NIS. The lightweight resolver does not currently implement
- these functions; it only provides them as stub functions that always
- return failure.
- </para>
-
- <para><function>lwres_gethostbyname()</function>
- and <function>lwres_gethostbyname2()</function> look up the
- hostname <parameter>name</parameter>.
- <function>lwres_gethostbyname()</function> always looks for an
- IPv4 address while <function>lwres_gethostbyname2()</function>
- looks for an address of protocol family
- <parameter>af</parameter>: either <type>PF_INET</type> or
- <type>PF_INET6</type> &mdash; IPv4 or IPV6 addresses
- respectively. Successful calls of the functions return a
- <type>struct hostent</type>for the name that was looked up.
- <type>NULL</type> is returned if the lookups by
- <function>lwres_gethostbyname()</function> or
- <function>lwres_gethostbyname2()</function> fail.
- </para>
-
- <para>
- Reverse lookups of addresses are performed by
- <function>lwres_gethostbyaddr()</function>.
- <parameter>addr</parameter> is an address of length
- <parameter>len</parameter> bytes and protocol family
- <parameter>type</parameter> &mdash; <type>PF_INET</type> or
- <type>PF_INET6</type>.
- <function>lwres_gethostbyname_r()</function> is a
- thread-safe function
- for forward lookups. If an error occurs, an error code is returned in
- <parameter>*error</parameter>.
- <parameter>resbuf</parameter> is a pointer to a
- <type>struct hostent</type> which is initialised by a successful call to
- <function>lwres_gethostbyname_r()</function>.
- <parameter>buf</parameter> is a buffer of length
- <parameter>len</parameter> bytes which is used to store the
- <constant>h_name</constant>, <constant>h_aliases</constant>, and
- <constant>h_addr_list</constant> elements of the
- <type>struct hostent</type> returned in <parameter>resbuf</parameter>.
- Successful calls to <function>lwres_gethostbyname_r()</function>
- return <parameter>resbuf</parameter>,
- which is a pointer to the <type>struct hostent</type> it created.
- </para>
-
- <para><function>lwres_gethostbyaddr_r()</function>
- is a thread-safe function
- that performs a reverse lookup of address <parameter>addr</parameter>
- which is <parameter>len</parameter> bytes long and is of
- protocol
- family <parameter>type</parameter> &mdash; <type>PF_INET</type> or
- <type>PF_INET6</type>. If an error occurs, the error code is returned
- in <parameter>*error</parameter>. The other function
- parameters are
- identical to those in <function>lwres_gethostbyname_r()</function>.
- <parameter>resbuf</parameter> is a pointer to a
- <type>struct hostent</type> which is initialised by a successful call to
- <function>lwres_gethostbyaddr_r()</function>.
- <parameter>buf</parameter> is a buffer of length
- <parameter>len</parameter> bytes which is used to store the
- <constant>h_name</constant>, <constant>h_aliases</constant>, and
- <constant>h_addr_list</constant> elements of the
- <type>struct hostent</type> returned in <parameter>resbuf</parameter>.
- Successful calls to <function>lwres_gethostbyaddr_r()</function> return
- <parameter>resbuf</parameter>, which is a pointer to the
- <function>struct hostent()</function> it created.
- </para>
-
- </refsection>
-
- <refsection><info><title>RETURN VALUES</title></info>
-
- <para>
- The functions
- <function>lwres_gethostbyname()</function>,
- <function>lwres_gethostbyname2()</function>,
- <function>lwres_gethostbyaddr()</function>,
- and
- <function>lwres_gethostent()</function>
- return NULL to indicate an error. In this case the global variable
- <type>lwres_h_errno</type>
- will contain one of the following error codes defined in
- <filename>&lt;lwres/netdb.h&gt;</filename>:
-
- <variablelist>
- <varlistentry>
- <term><constant>HOST_NOT_FOUND</constant></term>
- <listitem>
- <para>
- The host or address was not found.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>TRY_AGAIN</constant></term>
- <listitem>
- <para>
- A recoverable error occurred, e.g., a timeout.
- Retrying the lookup may succeed.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>NO_RECOVERY</constant></term>
- <listitem>
- <para>
- A non-recoverable error occurred.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>NO_DATA</constant></term>
- <listitem>
- <para>
- The name exists, but has no address information
- associated with it (or vice versa in the case
- of a reverse lookup). The code NO_ADDRESS
- is accepted as a synonym for NO_DATA for backwards
- compatibility.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </para>
-
- <para><citerefentry>
- <refentrytitle>lwres_hstrerror</refentrytitle><manvolnum>3</manvolnum>
- </citerefentry>
- translates these error codes to suitable error messages.
- </para>
-
- <para><function>lwres_gethostent()</function>
- and <function>lwres_gethostent_r()</function>
- always return <type>NULL</type>.
- </para>
-
- <para>
- Successful calls to <function>lwres_gethostbyname_r()</function> and
- <function>lwres_gethostbyaddr_r()</function> return
- <parameter>resbuf</parameter>, a pointer to the
- <type>struct hostent</type> that was initialised by these functions. They return
- <type>NULL</type> if the lookups fail or if <parameter>buf</parameter>
- was too small to hold the list of addresses and names referenced by
- the <constant>h_name</constant>, <constant>h_aliases</constant>, and
- <constant>h_addr_list</constant> elements of the
- <type>struct hostent</type>.
- If <parameter>buf</parameter> was too small, both
- <function>lwres_gethostbyname_r()</function> and
- <function>lwres_gethostbyaddr_r()</function> set the global
- variable
- <type>errno</type> to <errorcode>ERANGE</errorcode>.
- </para>
-
- </refsection>
- <refsection><info><title>SEE ALSO</title></info>
-
- <para><citerefentry>
- <refentrytitle>gethostent</refentrytitle><manvolnum>3</manvolnum>
- </citerefentry>,
-
- <citerefentry>
- <refentrytitle>lwres_getipnode</refentrytitle><manvolnum>3</manvolnum>
- </citerefentry>,
-
- <citerefentry>
- <refentrytitle>lwres_hstrerror</refentrytitle><manvolnum>3</manvolnum>
- </citerefentry>
- </para>
- </refsection>
-
- <refsection><info><title>BUGS</title></info>
-
- <para><function>lwres_gethostbyname()</function>,
- <function>lwres_gethostbyname2()</function>,
- <function>lwres_gethostbyaddr()</function>
- and
- <function>lwres_endhostent()</function>
- are not thread safe; they return pointers to static data and
- provide error codes through a global variable.
- Thread-safe versions for name and address lookup are provided by
- <function>lwres_gethostbyname_r()</function>,
- and
- <function>lwres_gethostbyaddr_r()</function>
- respectively.
- </para>
- <para>
- The resolver daemon does not currently support any non-DNS
- name services such as
- <filename>/etc/hosts</filename>
- or
- <type>NIS</type>,
- consequently the above functions don't, either.
- </para>
- </refsection>
-</refentry>
diff --git a/usr.sbin/bind/lib/lwres/man/lwres_getipnode.docbook b/usr.sbin/bind/lib/lwres/man/lwres_getipnode.docbook
deleted file mode 100644
index 8952fc227c9..00000000000
--- a/usr.sbin/bind/lib/lwres/man/lwres_getipnode.docbook
+++ /dev/null
@@ -1,327 +0,0 @@
-<!--
- - Copyright (C) Internet Systems Consortium, Inc. ("ISC")
- -
- - Permission to use, copy, modify, and/or 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.
- -
- - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- - AND FITNESS. IN NO EVENT SHALL ISC 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.
--->
-
-<!-- Converted by db4-upgrade version 1.0 -->
-<refentry xmlns:db="http://docbook.org/ns/docbook" version="5.0">
- <info>
- <date>2007-06-18</date>
- </info>
- <refentryinfo>
- <corpname>ISC</corpname>
- <corpauthor>Internet Systems Consortium, Inc.</corpauthor>
- </refentryinfo>
-
- <refmeta>
- <refentrytitle>lwres_getipnode</refentrytitle>
- <manvolnum>3</manvolnum>
- <refmiscinfo>BIND9</refmiscinfo>
- </refmeta>
-
- <docinfo>
- <copyright>
- <year>2000</year>
- <year>2001</year>
- <year>2003</year>
- <year>2004</year>
- <year>2005</year>
- <year>2007</year>
- <year>2014</year>
- <year>2015</year>
- <year>2016</year>
- <year>2018</year>
- <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
- </copyright>
- </docinfo>
-
- <refnamediv>
- <refname>lwres_getipnodebyname</refname>
- <refname>lwres_getipnodebyaddr</refname>
- <refname>lwres_freehostent</refname>
- <refpurpose>lightweight resolver nodename / address translation API</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
-<funcsynopsisinfo>#include &lt;lwres/netdb.h&gt;</funcsynopsisinfo>
-<funcprototype>
- <funcdef>
-struct hostent *
-<function>lwres_getipnodebyname</function></funcdef>
- <paramdef>const char *<parameter>name</parameter></paramdef>
- <paramdef>int <parameter>af</parameter></paramdef>
- <paramdef>int <parameter>flags</parameter></paramdef>
- <paramdef>int *<parameter>error_num</parameter></paramdef>
- </funcprototype>
-<funcprototype>
- <funcdef>
-struct hostent *
-<function>lwres_getipnodebyaddr</function></funcdef>
- <paramdef>const void *<parameter>src</parameter></paramdef>
- <paramdef>size_t <parameter>len</parameter></paramdef>
- <paramdef>int <parameter>af</parameter></paramdef>
- <paramdef>int *<parameter>error_num</parameter></paramdef>
- </funcprototype>
-<funcprototype>
- <funcdef>
-void
-<function>lwres_freehostent</function></funcdef>
- <paramdef>struct hostent *<parameter>he</parameter></paramdef>
- </funcprototype>
-</funcsynopsis>
- </refsynopsisdiv>
-
- <refsection><info><title>DESCRIPTION</title></info>
-
-
- <para>
- These functions perform thread safe, protocol independent
- nodename-to-address and address-to-nodename
- translation as defined in RFC2553.
- </para>
-
- <para>
- They use a
- <type>struct hostent</type>
- which is defined in
- <filename>namedb.h</filename>:
- </para>
- <para><programlisting>
-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 */
-</programlisting>
- </para>
-
- <para>
- The members of this structure are:
- <variablelist>
- <varlistentry>
- <term><constant>h_name</constant></term>
- <listitem>
- <para>
- The official (canonical) name of the host.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>h_aliases</constant></term>
- <listitem>
- <para>
- A NULL-terminated array of alternate names (nicknames) for the
- host.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>h_addrtype</constant></term>
- <listitem>
- <para>
- The type of address being returned - usually
- <type>PF_INET</type>
- or
- <type>PF_INET6</type>.
-
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>h_length</constant></term>
- <listitem>
- <para>
- The length of the address in bytes.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>h_addr_list</constant></term>
- <listitem>
- <para>
- A
- <type>NULL</type>
- terminated array of network addresses for the host.
- Host addresses are returned in network byte order.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </para>
-
- <para><function>lwres_getipnodebyname()</function>
- looks up addresses of protocol family <parameter>af</parameter>
- for the hostname <parameter>name</parameter>. The
- <parameter>flags</parameter> parameter contains ORed flag bits
- to specify the types of addresses that are searched for, and the
- types of addresses that are returned. The flag bits are:
-
- <variablelist>
- <varlistentry>
- <term><constant>AI_V4MAPPED</constant></term>
- <listitem>
- <para>
- This is used with an
- <parameter>af</parameter>
- of AF_INET6, and causes IPv4 addresses to be returned as
- IPv4-mapped
- IPv6 addresses.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>AI_ALL</constant></term>
- <listitem>
- <para>
- This is used with an
- <parameter>af</parameter>
- of AF_INET6, and causes all known addresses (IPv6 and IPv4) to
- be returned.
- If AI_V4MAPPED is also set, the IPv4 addresses are return as
- mapped
- IPv6 addresses.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>AI_ADDRCONFIG</constant></term>
- <listitem>
- <para>
- Only return an IPv6 or IPv4 address if here is an active network
- interface of that type. This is not currently implemented
- in the BIND 9 lightweight resolver, and the flag is ignored.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>AI_DEFAULT</constant></term>
- <listitem>
- <para>
- This default sets the
- <constant>AI_V4MAPPED</constant>
- and
- <constant>AI_ADDRCONFIG</constant>
- flag bits.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </para>
-
- <para><function>lwres_getipnodebyaddr()</function>
- performs a reverse lookup of address <parameter>src</parameter>
- which is <parameter>len</parameter> bytes long.
- <parameter>af</parameter> denotes the protocol family, typically
- <type>PF_INET</type> or <type>PF_INET6</type>.
- </para>
- <para><function>lwres_freehostent()</function>
- releases all the memory associated with the <type>struct
- hostent</type> pointer <parameter>he</parameter>. Any memory
- allocated for the <constant>h_name</constant>,
- <constant>h_addr_list</constant> and
- <constant>h_aliases</constant> is freed, as is the memory for
- the <type>hostent</type> structure itself.
- </para>
- </refsection>
- <refsection><info><title>RETURN VALUES</title></info>
-
- <para>
- If an error occurs,
- <function>lwres_getipnodebyname()</function>
- and
- <function>lwres_getipnodebyaddr()</function>
- set
- <parameter>*error_num</parameter>
- to an appropriate error code and the function returns a
- <type>NULL</type>
- pointer.
- The error codes and their meanings are defined in
- <filename>&lt;lwres/netdb.h&gt;</filename>:
- <variablelist>
- <varlistentry>
- <term><constant>HOST_NOT_FOUND</constant></term>
- <listitem>
- <para>
- No such host is known.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>NO_ADDRESS</constant></term>
- <listitem>
- <para>
- The server recognised the request and the name but no address is
- available. Another type of request to the name server for the
- domain might return an answer.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>TRY_AGAIN</constant></term>
- <listitem>
- <para>
- A temporary and possibly transient error occurred, such as a
- failure of a server to respond. The request may succeed if
- retried.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>NO_RECOVERY</constant></term>
- <listitem>
- <para>
- An unexpected failure occurred, and retrying the request
- is pointless.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </para>
- <para><citerefentry>
- <refentrytitle>lwres_hstrerror</refentrytitle><manvolnum>3</manvolnum>
- </citerefentry>
- translates these error codes to suitable error messages.
- </para>
- </refsection>
- <refsection><info><title>SEE ALSO</title></info>
-
- <para><citerefentry>
- <refentrytitle>RFC2553</refentrytitle>
- </citerefentry>,
-
- <citerefentry>
- <refentrytitle>lwres</refentrytitle><manvolnum>3</manvolnum>
- </citerefentry>,
-
- <citerefentry>
- <refentrytitle>lwres_gethostent</refentrytitle><manvolnum>3</manvolnum>
- </citerefentry>,
-
- <citerefentry>
- <refentrytitle>lwres_getaddrinfo</refentrytitle><manvolnum>3</manvolnum>
- </citerefentry>,
-
- <citerefentry>
- <refentrytitle>lwres_getnameinfo</refentrytitle><manvolnum>3</manvolnum>
- </citerefentry>,
-
- <citerefentry>
- <refentrytitle>lwres_hstrerror</refentrytitle><manvolnum>3</manvolnum>
- </citerefentry>.
- </para>
- </refsection>
-</refentry>
diff --git a/usr.sbin/bind/lib/lwres/man/lwres_getnameinfo.docbook b/usr.sbin/bind/lib/lwres/man/lwres_getnameinfo.docbook
deleted file mode 100644
index b046d1f7d1f..00000000000
--- a/usr.sbin/bind/lib/lwres/man/lwres_getnameinfo.docbook
+++ /dev/null
@@ -1,201 +0,0 @@
-<!--
- - Copyright (C) Internet Systems Consortium, Inc. ("ISC")
- -
- - Permission to use, copy, modify, and/or 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.
- -
- - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- - AND FITNESS. IN NO EVENT SHALL ISC 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.
--->
-
-<!-- Converted by db4-upgrade version 1.0 -->
-<refentry xmlns:db="http://docbook.org/ns/docbook" version="5.0">
- <info>
- <date>2007-06-18</date>
- </info>
- <refentryinfo>
- <corpname>ISC</corpname>
- <corpauthor>Internet Systems Consortium, Inc.</corpauthor>
- </refentryinfo>
-
- <refmeta>
- <refentrytitle>lwres_getnameinfo</refentrytitle>
- <manvolnum>3</manvolnum>
- <refmiscinfo>BIND9</refmiscinfo>
- </refmeta>
-
- <docinfo>
- <copyright>
- <year>2000</year>
- <year>2001</year>
- <year>2004</year>
- <year>2005</year>
- <year>2007</year>
- <year>2014</year>
- <year>2015</year>
- <year>2016</year>
- <year>2018</year>
- <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
- </copyright>
- </docinfo>
-
- <refnamediv>
- <refname>lwres_getnameinfo</refname>
- <refpurpose>lightweight resolver socket address structure to hostname and
- service name
- </refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
-<funcsynopsisinfo>#include &lt;lwres/netdb.h&gt;</funcsynopsisinfo>
-<funcprototype>
- <funcdef>
-int
-<function>lwres_getnameinfo</function></funcdef>
- <paramdef>const struct sockaddr *<parameter>sa</parameter></paramdef>
- <paramdef>size_t <parameter>salen</parameter></paramdef>
- <paramdef>char *<parameter>host</parameter></paramdef>
- <paramdef>size_t <parameter>hostlen</parameter></paramdef>
- <paramdef>char *<parameter>serv</parameter></paramdef>
- <paramdef>size_t <parameter>servlen</parameter></paramdef>
- <paramdef>int <parameter>flags</parameter></paramdef>
- </funcprototype>
-</funcsynopsis>
- </refsynopsisdiv>
-
- <refsection><info><title>DESCRIPTION</title></info>
-
-
- <para>
- This function is equivalent to the
- <citerefentry>
- <refentrytitle>getnameinfo</refentrytitle><manvolnum>3</manvolnum>
- </citerefentry> function defined in RFC2133.
- <function>lwres_getnameinfo()</function> returns the
- hostname for the
- <type>struct sockaddr</type> <parameter>sa</parameter> which
- is
- <parameter>salen</parameter> bytes long. The hostname is of
- length
- <parameter>hostlen</parameter> and is returned via
- <parameter>*host.</parameter> The maximum length of the
- hostname is
- 1025 bytes: <constant>NI_MAXHOST</constant>.
- </para>
-
- <para> The name of the service associated with the port number in
- <parameter>sa</parameter> is returned in <parameter>*serv.</parameter>
- It is <parameter>servlen</parameter> bytes long. The
- maximum length
- of the service name is <constant>NI_MAXSERV</constant> - 32
- bytes.
- </para>
-
- <para>
- The <parameter>flags</parameter> argument sets the
- following
- bits:
- <variablelist>
- <varlistentry>
- <term><constant>NI_NOFQDN</constant></term>
- <listitem>
- <para>
- A fully qualified domain name is not required for local hosts.
- The local part of the fully qualified domain name is returned
- instead.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>NI_NUMERICHOST</constant></term>
- <listitem>
- <para>
- Return the address in numeric form, as if calling inet_ntop(),
- instead of a host name.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>NI_NAMEREQD</constant></term>
- <listitem>
- <para>
- A name is required. If the hostname cannot be found in the DNS
- and
- this flag is set, a non-zero error code is returned.
- If the hostname is not found and the flag is not set, the
- address is returned in numeric form.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>NI_NUMERICSERV</constant></term>
- <listitem>
- <para>
- The service name is returned as a digit string representing the
- port number.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>NI_DGRAM</constant></term>
- <listitem>
- <para>
- Specifies that the service being looked up is a datagram
- service, and causes getservbyport() to be called with a second
- argument of "udp" instead of its default of "tcp". This is
- required
- for the few ports (512-514) that have different services for UDP
- and
- TCP.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </para>
- </refsection>
-
- <refsection><info><title>RETURN VALUES</title></info>
-
- <para><function>lwres_getnameinfo()</function>
- returns 0 on success or a non-zero error code if an error occurs.
- </para>
- </refsection>
- <refsection><info><title>SEE ALSO</title></info>
-
- <para><citerefentry>
- <refentrytitle>RFC2133</refentrytitle>
- </citerefentry>,
- <citerefentry>
- <refentrytitle>getservbyport</refentrytitle><manvolnum>3</manvolnum>
- </citerefentry>,
- <citerefentry>
- <refentrytitle>lwres</refentrytitle><manvolnum>3</manvolnum>
- </citerefentry>,
- <citerefentry>
- <refentrytitle>lwres_getnameinfo</refentrytitle><manvolnum>3</manvolnum>
- </citerefentry>,
- <citerefentry>
- <refentrytitle>lwres_getnamebyaddr</refentrytitle><manvolnum>3</manvolnum>
- </citerefentry>.
- <citerefentry>
- <refentrytitle>lwres_net_ntop</refentrytitle><manvolnum>3</manvolnum>
- </citerefentry>.
- </para>
- </refsection>
- <refsection><info><title>BUGS</title></info>
-
- <para>
- RFC2133 fails to define what the nonzero return values of
- <citerefentry>
- <refentrytitle>getnameinfo</refentrytitle><manvolnum>3</manvolnum>
- </citerefentry>
- are.
- </para>
- </refsection>
-</refentry>
diff --git a/usr.sbin/bind/lib/lwres/man/lwres_getrrsetbyname.docbook b/usr.sbin/bind/lib/lwres/man/lwres_getrrsetbyname.docbook
deleted file mode 100644
index cfcd6cfa16c..00000000000
--- a/usr.sbin/bind/lib/lwres/man/lwres_getrrsetbyname.docbook
+++ /dev/null
@@ -1,219 +0,0 @@
-<!--
- - Copyright (C) Internet Systems Consortium, Inc. ("ISC")
- -
- - Permission to use, copy, modify, and/or 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.
- -
- - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- - AND FITNESS. IN NO EVENT SHALL ISC 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.
--->
-
-<!-- Converted by db4-upgrade version 1.0 -->
-<refentry xmlns:db="http://docbook.org/ns/docbook" version="5.0">
- <info>
- <date>2007-06-18</date>
- </info>
- <refentryinfo>
- <corpname>ISC</corpname>
- <corpauthor>Internet Systems Consortium, Inc.</corpauthor>
- </refentryinfo>
-
- <refmeta>
- <refentrytitle>lwres_getrrsetbyname</refentrytitle>
- <manvolnum>3</manvolnum>
- <refmiscinfo>BIND9</refmiscinfo>
- </refmeta>
-
- <docinfo>
- <copyright>
- <year>2000</year>
- <year>2001</year>
- <year>2004</year>
- <year>2005</year>
- <year>2007</year>
- <year>2014</year>
- <year>2015</year>
- <year>2016</year>
- <year>2018</year>
- <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
- </copyright>
- </docinfo>
-
- <refnamediv>
- <refname>lwres_getrrsetbyname</refname>
- <refname>lwres_freerrset</refname>
- <refpurpose>retrieve DNS records</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
-<funcsynopsisinfo>#include &lt;lwres/netdb.h&gt;</funcsynopsisinfo>
-<funcprototype>
- <funcdef>
-int
-<function>lwres_getrrsetbyname</function></funcdef>
- <paramdef>const char *<parameter>hostname</parameter></paramdef>
- <paramdef>unsigned int <parameter>rdclass</parameter></paramdef>
- <paramdef>unsigned int <parameter>rdtype</parameter></paramdef>
- <paramdef>unsigned int <parameter>flags</parameter></paramdef>
- <paramdef>struct rrsetinfo **<parameter>res</parameter></paramdef>
- </funcprototype>
-<funcprototype>
- <funcdef>
-void
-<function>lwres_freerrset</function></funcdef>
- <paramdef>struct rrsetinfo *<parameter>rrset</parameter></paramdef>
- </funcprototype>
-</funcsynopsis>
-
- <para>
- The following structures are used:
- </para>
- <para><programlisting>
-struct rdatainfo {
- unsigned int rdi_length; /* length of data */
- unsigned char *rdi_data; /* record data */
-};
-</programlisting>
- </para>
- <para><programlisting>
-struct rrsetinfo {
- unsigned int rri_flags; /* RRSET_VALIDATED... */
- unsigned int rri_rdclass; /* class number */
- unsigned int rri_rdtype; /* RR type number */
- unsigned int rri_ttl; /* time to live */
- unsigned int rri_nrdatas; /* size of rdatas array */
- unsigned int rri_nsigs; /* size of sigs array */
- char *rri_name; /* canonical name */
- struct rdatainfo *rri_rdatas; /* individual records */
- struct rdatainfo *rri_sigs; /* individual signatures */
-};
-</programlisting>
- </para>
- </refsynopsisdiv>
-
- <refsection><info><title>DESCRIPTION</title></info>
-
- <para><function>lwres_getrrsetbyname()</function>
- gets a set of resource records associated with a
- <parameter>hostname</parameter>, <parameter>class</parameter>,
- and <parameter>type</parameter>.
- <parameter>hostname</parameter> is a pointer a to
- null-terminated string. The <parameter>flags</parameter> field
- is currently unused and must be zero.
- </para>
- <para>
- After a successful call to
- <function>lwres_getrrsetbyname()</function>,
- <parameter>*res</parameter> is a pointer to an
- <type>rrsetinfo</type> structure, containing a list of one or
- more <type>rdatainfo</type> structures containing resource
- records and potentially another list of <type>rdatainfo</type>
- structures containing SIG resource records associated with those
- records. The members <constant>rri_rdclass</constant> and
- <constant>rri_rdtype</constant> are copied from the parameters.
- <constant>rri_ttl</constant> and <constant>rri_name</constant>
- are properties of the obtained rrset. The resource records
- contained in <constant>rri_rdatas</constant> and
- <constant>rri_sigs</constant> are in uncompressed DNS wire
- format. Properties of the rdataset are represented in the
- <constant>rri_flags</constant> bitfield. If the RRSET_VALIDATED
- bit is set, the data has been DNSSEC validated and the
- signatures verified.
- </para>
- <para>
- All of the information returned by
- <function>lwres_getrrsetbyname()</function> is dynamically
- allocated: the <constant>rrsetinfo</constant> and
- <constant>rdatainfo</constant> structures, and the canonical
- host name strings pointed to by the
- <constant>rrsetinfo</constant>structure.
-
- Memory allocated for the dynamically allocated structures
- created by a successful call to
- <function>lwres_getrrsetbyname()</function> is released by
- <function>lwres_freerrset()</function>.
-
- <parameter>rrset</parameter> is a pointer to a <type>struct
- rrset</type> created by a call to
- <function>lwres_getrrsetbyname()</function>.
- </para>
- <para/>
- </refsection>
- <refsection><info><title>RETURN VALUES</title></info>
-
- <para><function>lwres_getrrsetbyname()</function>
- returns zero on success, and one of the following error codes if
- an error occurred:
- <variablelist>
-
- <varlistentry>
- <term><constant>ERRSET_NONAME</constant></term>
- <listitem>
- <para>
- the name does not exist
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><constant>ERRSET_NODATA</constant></term>
- <listitem>
- <para>
- the name exists, but does not have data of the desired type
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><constant>ERRSET_NOMEMORY</constant></term>
- <listitem>
- <para>
- memory could not be allocated
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><constant>ERRSET_INVAL</constant></term>
- <listitem>
- <para>
- a parameter is invalid
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><constant>ERRSET_FAIL</constant></term>
- <listitem>
- <para>
- other failure
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><constant/></term>
- <listitem>
- <para/>
- </listitem>
- </varlistentry>
-
- </variablelist>
-
- </para>
- </refsection>
- <refsection><info><title>SEE ALSO</title></info>
-
- <para><citerefentry>
- <refentrytitle>lwres</refentrytitle><manvolnum>3</manvolnum>
- </citerefentry>.
- </para>
-
- </refsection>
-</refentry>
diff --git a/usr.sbin/bind/lib/lwres/man/lwres_gnba.docbook b/usr.sbin/bind/lib/lwres/man/lwres_gnba.docbook
deleted file mode 100644
index fac98b44162..00000000000
--- a/usr.sbin/bind/lib/lwres/man/lwres_gnba.docbook
+++ /dev/null
@@ -1,259 +0,0 @@
-<!DOCTYPE book [
-<!ENTITY mdash "&#8212;">]>
-<!--
- - Copyright (C) Internet Systems Consortium, Inc. ("ISC")
- -
- - Permission to use, copy, modify, and/or 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.
- -
- - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- - AND FITNESS. IN NO EVENT SHALL ISC 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.
--->
-
-<!-- Converted by db4-upgrade version 1.0 -->
-<refentry xmlns:db="http://docbook.org/ns/docbook" version="5.0">
- <info>
- <date>2007-06-18</date>
- </info>
- <refentryinfo>
- <corpname>ISC</corpname>
- <corpauthor>Internet Systems Consortium, Inc.</corpauthor>
- </refentryinfo>
-
- <refmeta>
- <refentrytitle>lwres_gnba</refentrytitle>
- <manvolnum>3</manvolnum>
- <refmiscinfo>BIND9</refmiscinfo>
- </refmeta>
-
- <docinfo>
- <copyright>
- <year>2000</year>
- <year>2001</year>
- <year>2004</year>
- <year>2005</year>
- <year>2007</year>
- <year>2014</year>
- <year>2015</year>
- <year>2016</year>
- <year>2018</year>
- <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
- </copyright>
- </docinfo>
-
- <refnamediv>
- <refname>lwres_gnbarequest_render</refname>
- <refname>lwres_gnbaresponse_render</refname>
- <refname>lwres_gnbarequest_parse</refname>
- <refname>lwres_gnbaresponse_parse</refname>
- <refname>lwres_gnbaresponse_free</refname>
- <refname>lwres_gnbarequest_free</refname>
- <refpurpose>lightweight resolver getnamebyaddress message handling</refpurpose>
- </refnamediv>
-
- <refsynopsisdiv>
-
- <funcsynopsis>
-<funcsynopsisinfo>
-#include &lt;lwres/lwres.h&gt;
-</funcsynopsisinfo>
-
-<funcprototype>
- <funcdef>
-lwres_result_t
-<function>lwres_gnbarequest_render</function>
-</funcdef>
- <paramdef>lwres_context_t *<parameter>ctx</parameter></paramdef>
- <paramdef>lwres_gnbarequest_t *<parameter>req</parameter></paramdef>
- <paramdef>lwres_lwpacket_t *<parameter>pkt</parameter></paramdef>
- <paramdef>lwres_buffer_t *<parameter>b</parameter></paramdef>
- </funcprototype>
-
-<funcprototype>
- <funcdef>
-lwres_result_t
-<function>lwres_gnbaresponse_render</function>
-</funcdef>
- <paramdef>lwres_context_t *<parameter>ctx</parameter></paramdef>
- <paramdef>lwres_gnbaresponse_t *<parameter>req</parameter></paramdef>
- <paramdef>lwres_lwpacket_t *<parameter>pkt</parameter></paramdef>
- <paramdef>lwres_buffer_t *<parameter>b</parameter></paramdef>
- </funcprototype>
-<funcprototype>
- <funcdef>
-lwres_result_t
-<function>lwres_gnbarequest_parse</function></funcdef>
- <paramdef>lwres_context_t *<parameter>ctx</parameter></paramdef>
- <paramdef>lwres_buffer_t *<parameter>b</parameter></paramdef>
- <paramdef>lwres_lwpacket_t *<parameter>pkt</parameter></paramdef>
- <paramdef>lwres_gnbarequest_t **<parameter>structp</parameter></paramdef>
- </funcprototype>
-<funcprototype>
- <funcdef>
-lwres_result_t
-<function>lwres_gnbaresponse_parse</function></funcdef>
- <paramdef>lwres_context_t *<parameter>ctx</parameter></paramdef>
- <paramdef>lwres_buffer_t *<parameter>b</parameter></paramdef>
- <paramdef>lwres_lwpacket_t *<parameter>pkt</parameter></paramdef>
- <paramdef>lwres_gnbaresponse_t **<parameter>structp</parameter></paramdef>
- </funcprototype>
-
-<funcprototype>
- <funcdef>
-void
-<function>lwres_gnbaresponse_free</function>
-</funcdef>
- <paramdef>lwres_context_t *<parameter>ctx</parameter></paramdef>
- <paramdef>lwres_gnbaresponse_t **<parameter>structp</parameter></paramdef>
- </funcprototype>
-<funcprototype>
- <funcdef>
-void
-<function>lwres_gnbarequest_free</function></funcdef>
- <paramdef>lwres_context_t *<parameter>ctx</parameter></paramdef>
- <paramdef>lwres_gnbarequest_t **<parameter>structp</parameter></paramdef>
- </funcprototype>
-</funcsynopsis>
-
- </refsynopsisdiv>
-
- <refsection><info><title>DESCRIPTION</title></info>
-
- <para>
- These are low-level routines for creating and parsing
- lightweight resolver address-to-name lookup request and
- response messages.
- </para>
- <para>
- There are four main functions for the getnamebyaddr opcode.
- One render function converts a getnamebyaddr request structure &mdash;
- <type>lwres_gnbarequest_t</type> &mdash;
- to the lightweight resolver's canonical format.
- It is complemented by a parse function that converts a packet in this
- canonical format to a getnamebyaddr request structure.
- Another render function converts the getnamebyaddr response structure
- &mdash;
- <type>lwres_gnbaresponse_t</type>
- to the canonical format.
- This is complemented by a parse function which converts a packet in
- canonical format to a getnamebyaddr response structure.
- </para>
- <para>
- These structures are defined in
- <filename>lwres/lwres.h</filename>.
- They are shown below.
- </para>
- <para><programlisting>
-#define LWRES_OPCODE_GETNAMEBYADDR 0x00010002U
-</programlisting>
- </para>
- <para><programlisting>
-typedef struct {
- lwres_uint32_t flags;
- lwres_addr_t addr;
-} lwres_gnbarequest_t;
-</programlisting>
- </para>
- <para><programlisting>
-typedef struct {
- lwres_uint32_t flags;
- lwres_uint16_t naliases;
- char *realname;
- char **aliases;
- lwres_uint16_t realnamelen;
- lwres_uint16_t *aliaslen;
- void *base;
- size_t baselen;
-} lwres_gnbaresponse_t;
-</programlisting>
- </para>
-
- <para><function>lwres_gnbarequest_render()</function>
- uses resolver context <varname>ctx</varname> to convert
- getnamebyaddr request structure <varname>req</varname> to
- canonical format. The packet header structure
- <varname>pkt</varname> is initialised and transferred to buffer
- <varname>b</varname>. The contents of <varname>*req</varname>
- are then appended to the buffer in canonical format.
- <function>lwres_gnbaresponse_render()</function> performs the
- same task, except it converts a getnamebyaddr response structure
- <type>lwres_gnbaresponse_t</type> to the lightweight resolver's
- canonical format.
- </para>
-
- <para><function>lwres_gnbarequest_parse()</function>
- uses context <varname>ctx</varname> to convert the contents of
- packet <varname>pkt</varname> to a
- <type>lwres_gnbarequest_t</type> structure. Buffer
- <varname>b</varname> provides space to be used for storing this
- structure. When the function succeeds, the resulting
- <type>lwres_gnbarequest_t</type> is made available through
- <varname>*structp</varname>.
- <function>lwres_gnbaresponse_parse()</function> offers the same
- semantics as <function>lwres_gnbarequest_parse()</function>
- except it yields a <type>lwres_gnbaresponse_t</type> structure.
- </para>
-
- <para><function>lwres_gnbaresponse_free()</function>
- and <function>lwres_gnbarequest_free()</function> release the
- memory in resolver context <varname>ctx</varname> that was
- allocated to the <type>lwres_gnbaresponse_t</type> or
- <type>lwres_gnbarequest_t</type> structures referenced via
- <varname>structp</varname>. Any memory associated with
- ancillary buffers and strings for those structures is also
- discarded.
- </para>
- </refsection>
-
- <refsection><info><title>RETURN VALUES</title></info>
-
- <para>
- The getnamebyaddr opcode functions
- <function>lwres_gnbarequest_render()</function>,
- <function>lwres_gnbaresponse_render()</function>
- <function>lwres_gnbarequest_parse()</function>
- and
- <function>lwres_gnbaresponse_parse()</function>
- all return
- <errorcode>LWRES_R_SUCCESS</errorcode>
- on success.
- They return
- <errorcode>LWRES_R_NOMEMORY</errorcode>
- if memory allocation fails.
- <errorcode>LWRES_R_UNEXPECTEDEND</errorcode>
- is returned if the available space in the buffer
- <varname>b</varname>
- is too small to accommodate the packet header or the
- <type>lwres_gnbarequest_t</type>
- and
- <type>lwres_gnbaresponse_t</type>
- structures.
- <function>lwres_gnbarequest_parse()</function>
- and
- <function>lwres_gnbaresponse_parse()</function>
- will return
- <errorcode>LWRES_R_UNEXPECTEDEND</errorcode>
- if the buffer is not empty after decoding the received packet.
- These functions will return
- <errorcode>LWRES_R_FAILURE</errorcode>
- if
- <varname remap="structfield">pktflags</varname>
- in the packet header structure
- <type>lwres_lwpacket_t</type>
- indicate that the packet is not a response to an earlier query.
- </para>
- </refsection>
- <refsection><info><title>SEE ALSO</title></info>
-
- <para><citerefentry>
- <refentrytitle>lwres_packet</refentrytitle><manvolnum>3</manvolnum>
- </citerefentry>.
- </para>
- </refsection>
-</refentry>
diff --git a/usr.sbin/bind/lib/lwres/man/lwres_hstrerror.docbook b/usr.sbin/bind/lib/lwres/man/lwres_hstrerror.docbook
deleted file mode 100644
index a54aa53e232..00000000000
--- a/usr.sbin/bind/lib/lwres/man/lwres_hstrerror.docbook
+++ /dev/null
@@ -1,148 +0,0 @@
-<!--
- - Copyright (C) Internet Systems Consortium, Inc. ("ISC")
- -
- - Permission to use, copy, modify, and/or 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.
- -
- - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- - AND FITNESS. IN NO EVENT SHALL ISC 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.
--->
-
-<!-- Converted by db4-upgrade version 1.0 -->
-<refentry xmlns:db="http://docbook.org/ns/docbook" version="5.0">
- <info>
- <date>2007-06-18</date>
- </info>
- <refentryinfo>
- <corpname>ISC</corpname>
- <corpauthor>Internet Systems Consortium, Inc.</corpauthor>
- </refentryinfo>
-
- <refmeta>
- <refentrytitle>lwres_hstrerror</refentrytitle>
- <manvolnum>3</manvolnum>
- <refmiscinfo>BIND9</refmiscinfo>
- </refmeta>
-
- <docinfo>
- <copyright>
- <year>2000</year>
- <year>2001</year>
- <year>2004</year>
- <year>2005</year>
- <year>2007</year>
- <year>2014</year>
- <year>2015</year>
- <year>2016</year>
- <year>2018</year>
- <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
- </copyright>
- </docinfo>
-
- <refnamediv>
- <refname>lwres_herror</refname>
- <refname>lwres_hstrerror</refname>
- <refpurpose>lightweight resolver error message generation</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
-<funcsynopsisinfo>#include &lt;lwres/netdb.h&gt;</funcsynopsisinfo>
-<funcprototype>
- <funcdef>
-void
-<function>lwres_herror</function></funcdef>
- <paramdef>const char *<parameter>s</parameter></paramdef>
- </funcprototype>
-<funcprototype>
- <funcdef>
-const char *
-<function>lwres_hstrerror</function></funcdef>
- <paramdef>int <parameter>err</parameter></paramdef>
- </funcprototype>
-</funcsynopsis>
- </refsynopsisdiv>
-
- <refsection><info><title>DESCRIPTION</title></info>
-
-
- <para><function>lwres_herror()</function>
- prints the string <parameter>s</parameter> on
- <type>stderr</type> followed by the string generated by
- <function>lwres_hstrerror()</function> for the error code stored
- in the global variable <constant>lwres_h_errno</constant>.
- </para>
-
- <para><function>lwres_hstrerror()</function>
- returns an appropriate string for the error code gievn by
- <parameter>err</parameter>. The values of the error codes and
- messages are as follows:
-
- <variablelist>
- <varlistentry>
- <term><errorcode>NETDB_SUCCESS</errorcode></term>
- <listitem>
- <para><errorname>Resolver Error 0 (no error)</errorname>
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><errorcode>HOST_NOT_FOUND</errorcode></term>
- <listitem>
- <para><errorname>Unknown host</errorname>
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><errorcode>TRY_AGAIN</errorcode></term>
- <listitem>
- <para><errorname>Host name lookup failure</errorname>
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><errorcode>NO_RECOVERY</errorcode></term>
- <listitem>
- <para><errorname>Unknown server error</errorname>
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><errorcode>NO_DATA</errorcode></term>
- <listitem>
- <para><errorname>No address associated with name</errorname>
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </para>
- </refsection>
-
- <refsection><info><title>RETURN VALUES</title></info>
-
- <para>
- The string <errorname>Unknown resolver error</errorname> is returned by
- <function>lwres_hstrerror()</function>
- when the value of
- <constant>lwres_h_errno</constant>
- is not a valid error code.
- </para>
- </refsection>
- <refsection><info><title>SEE ALSO</title></info>
-
- <para><citerefentry>
- <refentrytitle>herror</refentrytitle><manvolnum>3</manvolnum>
- </citerefentry>,
-
- <citerefentry>
- <refentrytitle>lwres_hstrerror</refentrytitle><manvolnum>3</manvolnum>
- </citerefentry>.
- </para>
-
- </refsection>
-</refentry>
diff --git a/usr.sbin/bind/lib/lwres/man/lwres_inetntop.docbook b/usr.sbin/bind/lib/lwres/man/lwres_inetntop.docbook
deleted file mode 100644
index 43eb887cc9e..00000000000
--- a/usr.sbin/bind/lib/lwres/man/lwres_inetntop.docbook
+++ /dev/null
@@ -1,118 +0,0 @@
-<!DOCTYPE book [
-<!ENTITY mdash "&#8212;">]>
-<!--
- - Copyright (C) Internet Systems Consortium, Inc. ("ISC")
- -
- - Permission to use, copy, modify, and/or 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.
- -
- - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- - AND FITNESS. IN NO EVENT SHALL ISC 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.
--->
-
-<!-- Converted by db4-upgrade version 1.0 -->
-<refentry xmlns:db="http://docbook.org/ns/docbook" version="5.0">
- <info>
- <date>2007-06-18</date>
- </info>
- <refentryinfo>
- <corpname>ISC</corpname>
- <corpauthor>Internet Systems Consortium, Inc.</corpauthor>
- </refentryinfo>
-
- <refmeta>
- <refentrytitle>lwres_inetntop</refentrytitle>
- <manvolnum>3</manvolnum>
- <refmiscinfo>BIND9</refmiscinfo>
- </refmeta>
-
- <docinfo>
- <copyright>
- <year>2000</year>
- <year>2001</year>
- <year>2004</year>
- <year>2005</year>
- <year>2007</year>
- <year>2014</year>
- <year>2015</year>
- <year>2016</year>
- <year>2018</year>
- <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
- </copyright>
- </docinfo>
-
- <refnamediv>
- <refname>lwres_net_ntop</refname>
- <refpurpose>lightweight resolver IP address presentation</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
-<funcsynopsisinfo>#include &lt;lwres/net.h&gt;</funcsynopsisinfo>
-<funcprototype>
- <funcdef>
-const char *
-<function>lwres_net_ntop</function></funcdef>
- <paramdef>int <parameter>af</parameter></paramdef>
- <paramdef>const void *<parameter>src</parameter></paramdef>
- <paramdef>char *<parameter>dst</parameter></paramdef>
- <paramdef>size_t <parameter>size</parameter></paramdef>
- </funcprototype>
-</funcsynopsis>
- </refsynopsisdiv>
-
- <refsection><info><title>DESCRIPTION</title></info>
-
-
- <para><function>lwres_net_ntop()</function>
- converts an IP address of protocol family
- <parameter>af</parameter> &mdash; IPv4 or IPv6 &mdash; at
- location <parameter>src</parameter> from network format to its
- conventional representation as a string. For IPv4 addresses,
- that string would be a dotted-decimal. An IPv6 address would be
- represented in colon notation as described in RFC1884.
- </para>
-
- <para>
- The generated string is copied to <parameter>dst</parameter>
- provided
- <parameter>size</parameter> indicates it is long enough to
- store the
- ASCII representation of the address.
- </para>
-
- </refsection>
- <refsection><info><title>RETURN VALUES</title></info>
-
-
- <para>
- If successful, the function returns <parameter>dst</parameter>:
- a pointer to a string containing the presentation format of the
- address. <function>lwres_net_ntop()</function> returns
- <type>NULL</type> and sets the global variable
- <constant>errno</constant> to <errorcode>EAFNOSUPPORT</errorcode> if
- the protocol family given in <parameter>af</parameter> is
- not
- supported.
- </para>
-
- </refsection>
- <refsection><info><title>SEE ALSO</title></info>
-
- <para><citerefentry>
- <refentrytitle>RFC1884</refentrytitle>
- </citerefentry>,
- <citerefentry>
- <refentrytitle>inet_ntop</refentrytitle><manvolnum>3</manvolnum>
- </citerefentry>,
- <citerefentry>
- <refentrytitle>errno</refentrytitle><manvolnum>3</manvolnum>
- </citerefentry>.
- </para>
- </refsection>
-</refentry>
diff --git a/usr.sbin/bind/lib/lwres/man/lwres_noop.docbook b/usr.sbin/bind/lib/lwres/man/lwres_noop.docbook
deleted file mode 100644
index 16efbb94679..00000000000
--- a/usr.sbin/bind/lib/lwres/man/lwres_noop.docbook
+++ /dev/null
@@ -1,253 +0,0 @@
-<!DOCTYPE book [
-<!ENTITY mdash "&#8212;">]>
-<!--
- - Copyright (C) Internet Systems Consortium, Inc. ("ISC")
- -
- - Permission to use, copy, modify, and/or 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.
- -
- - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- - AND FITNESS. IN NO EVENT SHALL ISC 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.
--->
-
-<!-- Converted by db4-upgrade version 1.0 -->
-<refentry xmlns:db="http://docbook.org/ns/docbook" version="5.0">
- <info>
- <date>2007-06-18</date>
- </info>
- <refentryinfo>
- <corpname>ISC</corpname>
- <corpauthor>Internet Systems Consortium, Inc.</corpauthor>
- </refentryinfo>
-
- <refmeta>
- <refentrytitle>lwres_noop</refentrytitle>
- <manvolnum>3</manvolnum>
- <refmiscinfo>BIND9</refmiscinfo>
- </refmeta>
-
- <docinfo>
- <copyright>
- <year>2000</year>
- <year>2001</year>
- <year>2004</year>
- <year>2005</year>
- <year>2007</year>
- <year>2014</year>
- <year>2015</year>
- <year>2016</year>
- <year>2018</year>
- <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
- </copyright>
- </docinfo>
-
- <refnamediv>
- <refname>lwres_nooprequest_render</refname>
- <refname>lwres_noopresponse_render</refname>
- <refname>lwres_nooprequest_parse</refname>
- <refname>lwres_noopresponse_parse</refname>
- <refname>lwres_noopresponse_free</refname>
- <refname>lwres_nooprequest_free</refname>
- <refpurpose>lightweight resolver no-op message handling</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
-<funcsynopsisinfo>
-#include &lt;lwres/lwres.h&gt;</funcsynopsisinfo>
-<funcprototype>
- <funcdef>
-lwres_result_t
-<function>lwres_nooprequest_render</function></funcdef>
- <paramdef>lwres_context_t *<parameter>ctx</parameter></paramdef>
- <paramdef>lwres_nooprequest_t *<parameter>req</parameter></paramdef>
- <paramdef>lwres_lwpacket_t *<parameter>pkt</parameter></paramdef>
- <paramdef>lwres_buffer_t *<parameter>b</parameter></paramdef>
- </funcprototype>
-<funcprototype>
- <funcdef>
-lwres_result_t
-<function>lwres_noopresponse_render</function></funcdef>
- <paramdef>lwres_context_t *<parameter>ctx</parameter></paramdef>
- <paramdef>lwres_noopresponse_t *<parameter>req</parameter></paramdef>
- <paramdef>lwres_lwpacket_t *<parameter>pkt</parameter></paramdef>
- <paramdef>lwres_buffer_t *<parameter>b</parameter></paramdef>
- </funcprototype>
-<funcprototype>
- <funcdef>
-lwres_result_t
-<function>lwres_nooprequest_parse</function></funcdef>
- <paramdef>lwres_context_t *<parameter>ctx</parameter></paramdef>
- <paramdef>lwres_buffer_t *<parameter>b</parameter></paramdef>
- <paramdef>lwres_lwpacket_t *<parameter>pkt</parameter></paramdef>
- <paramdef>lwres_nooprequest_t **<parameter>structp</parameter></paramdef>
- </funcprototype>
-<funcprototype>
- <funcdef>
-lwres_result_t
-<function>lwres_noopresponse_parse</function></funcdef>
- <paramdef>lwres_context_t *<parameter>ctx</parameter></paramdef>
- <paramdef>lwres_buffer_t *<parameter>b</parameter></paramdef>
- <paramdef>lwres_lwpacket_t *<parameter>pkt</parameter></paramdef>
- <paramdef>lwres_noopresponse_t **<parameter>structp</parameter></paramdef>
- </funcprototype>
-<funcprototype>
- <funcdef>
-void
-<function>lwres_noopresponse_free</function></funcdef>
- <paramdef>lwres_context_t *<parameter>ctx</parameter></paramdef>
- <paramdef>lwres_noopresponse_t **<parameter>structp</parameter></paramdef>
- </funcprototype>
-<funcprototype>
- <funcdef>
-void
-<function>lwres_nooprequest_free</function></funcdef>
- <paramdef>lwres_context_t *<parameter>ctx</parameter></paramdef>
- <paramdef>lwres_nooprequest_t **<parameter>structp</parameter></paramdef>
- </funcprototype>
-</funcsynopsis>
- </refsynopsisdiv>
- <refsection><info><title>DESCRIPTION</title></info>
-
- <para>
- These are low-level routines for creating and parsing
- lightweight resolver no-op request and response messages.
- </para>
- <para>
- The no-op message is analogous to a <command>ping</command>
- packet:
- a packet is sent to the resolver daemon and is simply echoed back.
- The opcode is intended to allow a client to determine if the server is
- operational or not.
- </para>
- <para>
- There are four main functions for the no-op opcode.
- One render function converts a no-op request structure &mdash;
- <type>lwres_nooprequest_t</type> &mdash;
- to the lightweight resolver's canonical format.
- It is complemented by a parse function that converts a packet in this
- canonical format to a no-op request structure.
- Another render function converts the no-op response structure &mdash;
- <type>lwres_noopresponse_t</type>
- to the canonical format.
- This is complemented by a parse function which converts a packet in
- canonical format to a no-op response structure.
- </para>
- <para>
- These structures are defined in
- <filename>lwres/lwres.h</filename>.
-
- They are shown below.
- </para>
- <para><programlisting>
-#define LWRES_OPCODE_NOOP 0x00000000U
-</programlisting>
- </para>
- <para><programlisting>
-typedef struct {
- lwres_uint16_t datalength;
- unsigned char *data;
-} lwres_nooprequest_t;
-</programlisting>
- </para>
- <para><programlisting>
-typedef struct {
- lwres_uint16_t datalength;
- unsigned char *data;
-} lwres_noopresponse_t;
-</programlisting>
- </para>
- <para>
- Although the structures have different types, they are identical.
- This is because the no-op opcode simply echos whatever data was sent:
- the response is therefore identical to the request.
- </para>
-
- <para><function>lwres_nooprequest_render()</function>
- uses resolver context <parameter>ctx</parameter> to convert
- no-op request structure <parameter>req</parameter> to canonical
- format. The packet header structure <parameter>pkt</parameter>
- is initialised and transferred to buffer
- <parameter>b</parameter>. The contents of
- <parameter>*req</parameter> are then appended to the buffer in
- canonical format.
- <function>lwres_noopresponse_render()</function> performs the
- same task, except it converts a no-op response structure
- <type>lwres_noopresponse_t</type> to the lightweight resolver's
- canonical format.
- </para>
-
- <para><function>lwres_nooprequest_parse()</function>
- uses context <parameter>ctx</parameter> to convert the contents
- of packet <parameter>pkt</parameter> to a
- <type>lwres_nooprequest_t</type> structure. Buffer
- <parameter>b</parameter> provides space to be used for storing
- this structure. When the function succeeds, the resulting
- <type>lwres_nooprequest_t</type> is made available through
- <parameter>*structp</parameter>.
- <function>lwres_noopresponse_parse()</function> offers the same
- semantics as <function>lwres_nooprequest_parse()</function>
- except it yields a <type>lwres_noopresponse_t</type> structure.
- </para>
-
- <para><function>lwres_noopresponse_free()</function>
- and <function>lwres_nooprequest_free()</function> release the
- memory in resolver context <parameter>ctx</parameter> that was
- allocated to the <type>lwres_noopresponse_t</type> or
- <type>lwres_nooprequest_t</type> structures referenced via
- <parameter>structp</parameter>.
- </para>
-
- </refsection>
- <refsection><info><title>RETURN VALUES</title></info>
-
- <para>
- The no-op opcode functions
- <function>lwres_nooprequest_render()</function>,
-
- <function>lwres_noopresponse_render()</function>
- <function>lwres_nooprequest_parse()</function>
- and
- <function>lwres_noopresponse_parse()</function>
- all return
- <errorcode>LWRES_R_SUCCESS</errorcode>
- on success.
- They return
- <errorcode>LWRES_R_NOMEMORY</errorcode>
- if memory allocation fails.
- <errorcode>LWRES_R_UNEXPECTEDEND</errorcode>
- is returned if the available space in the buffer
- <parameter>b</parameter>
- is too small to accommodate the packet header or the
- <type>lwres_nooprequest_t</type>
- and
- <type>lwres_noopresponse_t</type>
- structures.
- <function>lwres_nooprequest_parse()</function>
- and
- <function>lwres_noopresponse_parse()</function>
- will return
- <errorcode>LWRES_R_UNEXPECTEDEND</errorcode>
- if the buffer is not empty after decoding the received packet.
- These functions will return
- <errorcode>LWRES_R_FAILURE</errorcode>
- if
- <constant>pktflags</constant>
- in the packet header structure
- <type>lwres_lwpacket_t</type>
- indicate that the packet is not a response to an earlier query.
- </para>
- </refsection>
- <refsection><info><title>SEE ALSO</title></info>
-
- <para><citerefentry>
- <refentrytitle>lwres_packet</refentrytitle><manvolnum>3</manvolnum>
- </citerefentry>
- </para>
- </refsection>
-</refentry>
diff --git a/usr.sbin/bind/lib/lwres/man/lwres_packet.docbook b/usr.sbin/bind/lib/lwres/man/lwres_packet.docbook
deleted file mode 100644
index f59cecd12c3..00000000000
--- a/usr.sbin/bind/lib/lwres/man/lwres_packet.docbook
+++ /dev/null
@@ -1,287 +0,0 @@
-<!--
- - Copyright (C) Internet Systems Consortium, Inc. ("ISC")
- -
- - Permission to use, copy, modify, and/or 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.
- -
- - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- - AND FITNESS. IN NO EVENT SHALL ISC 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.
--->
-
-<!-- Converted by db4-upgrade version 1.0 -->
-<refentry xmlns:db="http://docbook.org/ns/docbook" version="5.0">
- <info>
- <date>2007-06-18</date>
- </info>
- <refentryinfo>
- <corpname>ISC</corpname>
- <corpauthor>Internet Systems Consortium, Inc.</corpauthor>
- </refentryinfo>
-
- <refmeta>
- <refentrytitle>lwres_packet</refentrytitle>
- <manvolnum>3</manvolnum>
- <refmiscinfo>BIND9</refmiscinfo>
- </refmeta>
-
- <docinfo>
- <copyright>
- <year>2000</year>
- <year>2001</year>
- <year>2004</year>
- <year>2005</year>
- <year>2007</year>
- <year>2014</year>
- <year>2015</year>
- <year>2016</year>
- <year>2018</year>
- <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
- </copyright>
- </docinfo>
-
- <refnamediv>
- <refname>lwres_lwpacket_renderheader</refname>
- <refname>lwres_lwpacket_parseheader</refname>
- <refpurpose>lightweight resolver packet handling functions</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
-<funcsynopsisinfo>#include &lt;lwres/lwpacket.h&gt;</funcsynopsisinfo>
-<funcprototype>
- <funcdef>
-lwres_result_t
-<function>lwres_lwpacket_renderheader</function></funcdef>
- <paramdef>lwres_buffer_t *<parameter>b</parameter></paramdef>
- <paramdef>lwres_lwpacket_t *<parameter>pkt</parameter></paramdef>
- </funcprototype>
-<funcprototype>
- <funcdef>
-lwres_result_t
-<function>lwres_lwpacket_parseheader</function></funcdef>
- <paramdef>lwres_buffer_t *<parameter>b</parameter></paramdef>
- <paramdef>lwres_lwpacket_t *<parameter>pkt</parameter></paramdef>
- </funcprototype>
-</funcsynopsis>
- </refsynopsisdiv>
- <refsection><info><title>DESCRIPTION</title></info>
-
- <para>
- These functions rely on a
- <type>struct lwres_lwpacket</type>
- which is defined in
- <filename>lwres/lwpacket.h</filename>.
- </para>
-
- <para><programlisting>
-typedef struct lwres_lwpacket lwres_lwpacket_t;
- </programlisting>
- </para>
- <para><programlisting>
-struct lwres_lwpacket {
- lwres_uint32_t length;
- lwres_uint16_t version;
- lwres_uint16_t pktflags;
- lwres_uint32_t serial;
- lwres_uint32_t opcode;
- lwres_uint32_t result;
- lwres_uint32_t recvlength;
- lwres_uint16_t authtype;
- lwres_uint16_t authlength;
-};
-</programlisting>
- </para>
-
- <para>
- The elements of this structure are:
- <variablelist>
- <varlistentry>
- <term><constant>length</constant></term>
- <listitem>
- <para>
- the overall packet length, including the entire packet header.
- This field is filled in by the lwres_gabn_*() and lwres_gnba_*()
- calls.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>version</constant></term>
- <listitem>
- <para>
- the header format. There is currently only one format,
- <type>LWRES_LWPACKETVERSION_0</type>.
-
- This field is filled in by the lwres_gabn_*() and lwres_gnba_*()
- calls.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>pktflags</constant></term>
- <listitem>
- <para>
- library-defined flags for this packet: for instance whether the
- packet
- is a request or a reply. Flag values can be set, but not defined
- by
- the caller.
- This field is filled in by the application wit the exception of
- the
- LWRES_LWPACKETFLAG_RESPONSE bit, which is set by the library in
- the
- lwres_gabn_*() and lwres_gnba_*() calls.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>serial</constant></term>
- <listitem>
- <para>
- is set by the requestor and is returned in all replies. If two
- or more
- packets from the same source have the same serial number and are
- from
- the same source, they are assumed to be duplicates and the
- latter ones
- may be dropped.
- This field must be set by the application.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>opcode</constant></term>
- <listitem>
- <para>
- indicates the operation.
- Opcodes between 0x00000000 and 0x03ffffff are
- reserved for use by the lightweight resolver library. Opcodes
- between
- 0x04000000 and 0xffffffff are application defined.
- This field is filled in by the lwres_gabn_*() and lwres_gnba_*()
- calls.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>result</constant></term>
- <listitem>
- <para>
- is only valid for replies.
- Results between 0x04000000 and 0xffffffff are application
- defined.
- Results between 0x00000000 and 0x03ffffff are reserved for
- library use.
- This field is filled in by the lwres_gabn_*() and lwres_gnba_*()
- calls.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>recvlength</constant></term>
- <listitem>
- <para>
- is the maximum buffer size that the receiver can handle on
- requests
- and the size of the buffer needed to satisfy a request when the
- buffer
- is too large for replies.
- This field is supplied by the application.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>authtype</constant></term>
- <listitem>
- <para>
- defines the packet level authentication that is used.
- Authorisation types between 0x1000 and 0xffff are application
- defined
- and types between 0x0000 and 0x0fff are reserved for library
- use.
- Currently these are not used and must be zero.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>authlen</constant></term>
- <listitem>
- <para>
- gives the length of the authentication data.
- Since packet authentication is currently not used, this must be
- zero.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </para>
- <para>
- The following opcodes are currently defined:
- <variablelist>
- <varlistentry>
- <term><constant>NOOP</constant></term>
- <listitem>
- <para>
- Success is always returned and the packet contents are echoed.
- The lwres_noop_*() functions should be used for this type.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GETADDRSBYNAME</constant></term>
- <listitem>
- <para>
- returns all known addresses for a given name.
- The lwres_gabn_*() functions should be used for this type.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GETNAMEBYADDR</constant></term>
- <listitem>
- <para>
- return the hostname for the given address.
- The lwres_gnba_*() functions should be used for this type.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </para>
-
- <para><function>lwres_lwpacket_renderheader()</function>
- transfers the contents of lightweight resolver packet structure
- <type>lwres_lwpacket_t</type> <parameter>*pkt</parameter> in
- network byte order to the lightweight resolver buffer,
- <parameter>*b</parameter>.
- </para>
-
- <para><function>lwres_lwpacket_parseheader()</function>
- performs the converse operation. It transfers data in network
- byte order from buffer <parameter>*b</parameter> to resolver
- packet <parameter>*pkt</parameter>. The contents of the buffer
- <parameter>b</parameter> should correspond to a
- <type>lwres_lwpacket_t</type>.
- </para>
-
- </refsection>
-
- <refsection><info><title>RETURN VALUES</title></info>
-
- <para>
- Successful calls to
- <function>lwres_lwpacket_renderheader()</function> and
- <function>lwres_lwpacket_parseheader()</function> return
- <errorcode>LWRES_R_SUCCESS</errorcode>. If there is insufficient
- space to copy data between the buffer <parameter>*b</parameter> and
- lightweight resolver packet <parameter>*pkt</parameter> both
- functions
- return <errorcode>LWRES_R_UNEXPECTEDEND</errorcode>.
- </para>
-
- </refsection>
-</refentry>
diff --git a/usr.sbin/bind/lib/lwres/man/lwres_resutil.docbook b/usr.sbin/bind/lib/lwres/man/lwres_resutil.docbook
deleted file mode 100644
index e640add7c95..00000000000
--- a/usr.sbin/bind/lib/lwres/man/lwres_resutil.docbook
+++ /dev/null
@@ -1,234 +0,0 @@
-<!--
- - Copyright (C) Internet Systems Consortium, Inc. ("ISC")
- -
- - Permission to use, copy, modify, and/or 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.
- -
- - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- - AND FITNESS. IN NO EVENT SHALL ISC 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.
--->
-
-<!-- Converted by db4-upgrade version 1.0 -->
-<refentry xmlns:db="http://docbook.org/ns/docbook" version="5.0">
- <info>
- <date>2007-06-18</date>
- </info>
- <refentryinfo>
- <corpname>ISC</corpname>
- <corpauthor>Internet Systems Consortium, Inc.</corpauthor>
- </refentryinfo>
-
- <refmeta>
- <refentrytitle>lwres_resutil</refentrytitle>
- <manvolnum>3</manvolnum>
- <refmiscinfo>BIND9</refmiscinfo>
- </refmeta>
-
- <docinfo>
- <copyright>
- <year>2000</year>
- <year>2001</year>
- <year>2004</year>
- <year>2005</year>
- <year>2007</year>
- <year>2014</year>
- <year>2015</year>
- <year>2016</year>
- <year>2018</year>
- <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
- </copyright>
- </docinfo>
-
- <refnamediv>
- <refname>lwres_string_parse</refname>
- <refname>lwres_addr_parse</refname>
- <refname>lwres_getaddrsbyname</refname>
- <refname>lwres_getnamebyaddr</refname>
- <refpurpose>lightweight resolver utility functions</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
-<funcsynopsisinfo>#include &lt;lwres/lwres.h&gt;</funcsynopsisinfo>
-<funcprototype>
- <funcdef>
-lwres_result_t
-<function>lwres_string_parse</function></funcdef>
- <paramdef>lwres_buffer_t *<parameter>b</parameter></paramdef>
- <paramdef>char **<parameter>c</parameter></paramdef>
- <paramdef>lwres_uint16_t *<parameter>len</parameter></paramdef>
- </funcprototype>
-<funcprototype>
- <funcdef>
-lwres_result_t
-<function>lwres_addr_parse</function></funcdef>
- <paramdef>lwres_buffer_t *<parameter>b</parameter></paramdef>
- <paramdef>lwres_addr_t *<parameter>addr</parameter></paramdef>
- </funcprototype>
-<funcprototype>
- <funcdef>
-lwres_result_t
-<function>lwres_getaddrsbyname</function></funcdef>
- <paramdef>lwres_context_t *<parameter>ctx</parameter></paramdef>
- <paramdef>const char *<parameter>name</parameter></paramdef>
- <paramdef>lwres_uint32_t <parameter>addrtypes</parameter></paramdef>
- <paramdef>lwres_gabnresponse_t **<parameter>structp</parameter></paramdef>
- </funcprototype>
-<funcprototype>
- <funcdef>
-lwres_result_t
-<function>lwres_getnamebyaddr</function></funcdef>
- <paramdef>lwres_context_t *<parameter>ctx</parameter></paramdef>
- <paramdef>lwres_uint32_t <parameter>addrtype</parameter></paramdef>
- <paramdef>lwres_uint16_t <parameter>addrlen</parameter></paramdef>
- <paramdef>const unsigned char *<parameter>addr</parameter></paramdef>
- <paramdef>lwres_gnbaresponse_t **<parameter>structp</parameter></paramdef>
- </funcprototype>
-</funcsynopsis>
- </refsynopsisdiv>
-
- <refsection><info><title>DESCRIPTION</title></info>
-
-
- <para><function>lwres_string_parse()</function>
- retrieves a DNS-encoded string starting the current pointer of
- lightweight resolver buffer <parameter>b</parameter>: i.e.
- <constant>b-&gt;current</constant>. When the function returns,
- the address of the first byte of the encoded string is returned
- via <parameter>*c</parameter> and the length of that string is
- given by <parameter>*len</parameter>. The buffer's current
- pointer is advanced to point at the character following the
- string length, the encoded string, and the trailing
- <type>NULL</type> character.
- </para>
-
- <para><function>lwres_addr_parse()</function>
- extracts an address from the buffer <parameter>b</parameter>.
- The buffer's current pointer <constant>b-&gt;current</constant>
- is presumed to point at an encoded address: the address preceded
- by a 32-bit protocol family identifier and a 16-bit length
- field. The encoded address is copied to
- <constant>addr-&gt;address</constant> and
- <constant>addr-&gt;length</constant> indicates the size in bytes
- of the address that was copied.
- <constant>b-&gt;current</constant> is advanced to point at the
- next byte of available data in the buffer following the encoded
- address.
- </para>
-
- <para><function>lwres_getaddrsbyname()</function>
- and <function>lwres_getnamebyaddr()</function> use the
- <type>lwres_gnbaresponse_t</type> structure defined below:
- </para>
-
-<para><programlisting>
-typedef struct {
- lwres_uint32_t flags;
- lwres_uint16_t naliases;
- lwres_uint16_t naddrs;
- char *realname;
- char **aliases;
- lwres_uint16_t realnamelen;
- lwres_uint16_t *aliaslen;
- lwres_addrlist_t addrs;
- void *base;
- size_t baselen;
-} lwres_gabnresponse_t;
-</programlisting></para>
-
- <para>
- The contents of this structure are not manipulated directly but
- they are controlled through the
- <citerefentry>
- <refentrytitle>lwres_gabn</refentrytitle><manvolnum>3</manvolnum>
- </citerefentry>
- functions.
- </para>
-
- <para>
- The lightweight resolver uses
- <function>lwres_getaddrsbyname()</function> to perform
- forward lookups.
- Hostname <parameter>name</parameter> is looked up using the
- resolver
- context <parameter>ctx</parameter> for memory allocation.
- <parameter>addrtypes</parameter> is a bitmask indicating
- which type of
- addresses are to be looked up. Current values for this bitmask are
- <type>LWRES_ADDRTYPE_V4</type> for IPv4 addresses and
- <type>LWRES_ADDRTYPE_V6</type> for IPv6 addresses. Results of the
- lookup are returned in <parameter>*structp</parameter>.
- </para>
-
- <para><function>lwres_getnamebyaddr()</function>
- performs reverse lookups. Resolver context
- <parameter>ctx</parameter> is used for memory allocation. The
- address type is indicated by <parameter>addrtype</parameter>:
- <type>LWRES_ADDRTYPE_V4</type> or
- <type>LWRES_ADDRTYPE_V6</type>. The address to be looked up is
- given by <parameter>addr</parameter> and its length is
- <parameter>addrlen</parameter> bytes. The result of the
- function call is made available through
- <parameter>*structp</parameter>.
- </para>
- </refsection>
-
- <refsection><info><title>RETURN VALUES</title></info>
-
- <para>
- Successful calls to
- <function>lwres_string_parse()</function>
- and
- <function>lwres_addr_parse()</function>
- return
- <errorcode>LWRES_R_SUCCESS.</errorcode>
- Both functions return
- <errorcode>LWRES_R_FAILURE</errorcode>
- if the buffer is corrupt or
- <errorcode>LWRES_R_UNEXPECTEDEND</errorcode>
- if the buffer has less space than expected for the components of the
- encoded string or address.
- </para>
-
- <para><function>lwres_getaddrsbyname()</function>
- returns <errorcode>LWRES_R_SUCCESS</errorcode> on success and it
- returns <errorcode>LWRES_R_NOTFOUND</errorcode> if the hostname
- <parameter>name</parameter> could not be found.
- </para>
- <para><errorcode>LWRES_R_SUCCESS</errorcode>
- is returned by a successful call to
- <function>lwres_getnamebyaddr()</function>.
- </para>
-
- <para>
- Both
- <function>lwres_getaddrsbyname()</function>
- and
- <function>lwres_getnamebyaddr()</function>
- return
- <errorcode>LWRES_R_NOMEMORY</errorcode>
- when memory allocation requests fail and
- <errorcode>LWRES_R_UNEXPECTEDEND</errorcode>
- if the buffers used for sending queries and receiving replies are too
- small.
- </para>
-
- </refsection>
- <refsection><info><title>SEE ALSO</title></info>
-
- <para><citerefentry>
- <refentrytitle>lwres_buffer</refentrytitle><manvolnum>3</manvolnum>
- </citerefentry>,
-
- <citerefentry>
- <refentrytitle>lwres_gabn</refentrytitle><manvolnum>3</manvolnum>
- </citerefentry>.
- </para>
-
- </refsection>
-</refentry>