2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-09-04 00:25:29 +00:00

1856. [doc] Switch Docbook toolchain from DSSSL to XSL.

This commit is contained in:
Rob Austein
2005-05-11 05:55:41 +00:00
parent 2941824604
commit 268a447506
49 changed files with 17602 additions and 12172 deletions

View File

@@ -1,4 +1,6 @@
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.0//EN"
"http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd"
[<!ENTITY mdash "&#8212;">]>
<!--
- Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) 2000-2002 Internet Software Consortium.
@@ -15,9 +17,7 @@
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- PERFORMANCE OF THIS SOFTWARE.
-->
<!-- $Id: named-checkconf.docbook,v 1.10 2005/04/07 03:49:55 marka Exp $ -->
<!-- $Id: named-checkconf.docbook,v 1.11 2005/05/11 05:55:35 sra Exp $ -->
<refentry>
<refentryinfo>
<date>June 14, 2000</date>
@@ -29,6 +29,20 @@
<refmiscinfo>BIND9</refmiscinfo>
</refmeta>
<docinfo>
<copyright>
<year>2004</year>
<year>2005</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
<copyright>
<year>2000</year>
<year>2001</year>
<year>2002</year>
<holder>Internet Software Consortium</holder>
</copyright>
</docinfo>
<refnamediv>
<refname><application>named-checkconf</application></refname>
<refpurpose>named configuration file syntax checking tool</refpurpose>
@@ -47,9 +61,9 @@
<refsect1>
<title>DESCRIPTION</title>
<para>
<command>named-checkconf</command> checks the syntax, but not
the semantics, of a named configuration file.
<para><command>named-checkconf</command>
checks the syntax, but not the semantics, of a named
configuration file.
</para>
</refsect1>
@@ -61,7 +75,8 @@
<term>-t <replaceable class="parameter">directory</replaceable></term>
<listitem>
<para>
chroot to <filename>directory</filename> so that include
chroot to <filename>directory</filename> so that
include
directives in the configuration file are processed as if
run by a similarly chrooted named.
</para>
@@ -113,17 +128,16 @@
<refsect1>
<title>RETURN VALUES</title>
<para>
<command>named-checkconf</command> returns an exit status of 1 if
<para><command>named-checkconf</command>
returns an exit status of 1 if
errors were detected and 0 otherwise.
</para>
</refsect1>
<refsect1>
<title>SEE ALSO</title>
<para>
<citerefentry>
<refentrytitle>named</refentrytitle>
<manvolnum>8</manvolnum>
<para><citerefentry>
<refentrytitle>named</refentrytitle><manvolnum>8</manvolnum>
</citerefentry>,
<citetitle>BIND 9 Administrator Reference Manual</citetitle>.
</para>
@@ -131,16 +145,12 @@
<refsect1>
<title>AUTHOR</title>
<para>
<corpauthor>Internet Systems Consortium</corpauthor>
<para><corpauthor>Internet Systems Consortium</corpauthor>
</para>
</refsect1>
</refentry>
<!--
</refentry><!--
- Local variables:
- mode: sgml
- End:
-->

View File

@@ -1,4 +1,6 @@
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.0//EN"
"http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd"
[<!ENTITY mdash "&#8212;">]>
<!--
- Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) 2000-2002 Internet Software Consortium.
@@ -15,9 +17,7 @@
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- PERFORMANCE OF THIS SOFTWARE.
-->
<!-- $Id: named-checkzone.docbook,v 1.16 2005/04/07 03:49:55 marka Exp $ -->
<!-- $Id: named-checkzone.docbook,v 1.17 2005/05/11 05:55:35 sra Exp $ -->
<refentry>
<refentryinfo>
<date>June 13, 2000</date>
@@ -29,6 +29,20 @@
<refmiscinfo>BIND9</refmiscinfo>
</refmeta>
<docinfo>
<copyright>
<year>2004</year>
<year>2005</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
<copyright>
<year>2000</year>
<year>2001</year>
<year>2002</year>
<holder>Internet Software Consortium</holder>
</copyright>
</docinfo>
<refnamediv>
<refname><application>named-checkzone</application></refname>
<refpurpose>zone file validity checking tool</refpurpose>
@@ -56,12 +70,11 @@
<refsect1>
<title>DESCRIPTION</title>
<para>
<command>named-checkzone</command> checks the syntax and integrity of
a zone file. It performs the same checks as <command>named</command>
does when loading a zone. This makes
<command>named-checkzone</command> useful for checking zone
files before configuring them into a name server.
<para><command>named-checkzone</command>
checks the syntax and integrity of a zone file. It performs the
same checks as <command>named</command> does when loading a
zone. This makes <command>named-checkzone</command> useful for
checking zone files before configuring them into a name server.
</para>
</refsect1>
@@ -104,6 +117,7 @@
When loading the zone file read the journal if it exists.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-c <replaceable class="parameter">class</replaceable></term>
@@ -118,7 +132,8 @@
<term>-k <replaceable class="parameter">mode</replaceable></term>
<listitem>
<para>
Perform <command>"check-name"</command> checks with the specified failure mode.
Perform <command>"check-name"</command> checks with
the specified failure mode.
Possible modes are <command>"fail"</command>,
<command>"warn"</command> (default) and
<command>"ignore"</command>.
@@ -151,7 +166,8 @@
<term>-t <replaceable class="parameter">directory</replaceable></term>
<listitem>
<para>
chroot to <filename>directory</filename> so that include
chroot to <filename>directory</filename> so that
include
directives in the configuration file are processed as if
run by a similarly chrooted named.
</para>
@@ -162,7 +178,8 @@
<term>-w <replaceable class="parameter">directory</replaceable></term>
<listitem>
<para>
chdir to <filename>directory</filename> so that relative
chdir to <filename>directory</filename> so that
relative
filenames in master file $INCLUDE directives work. This
is similar to the directory clause in
<filename>named.conf</filename>.
@@ -186,7 +203,8 @@
Specify whether to check for non-terminal wildcards.
Non-terminal wildcards are almost always the result of a
failure to understand the wildcard matching algorithm (RFC 1034).
Possible modes are <command>"warn"</command> (default) and
Possible modes are <command>"warn"</command> (default)
and
<command>"ignore"</command>.
</para>
</listitem>
@@ -216,17 +234,16 @@
<refsect1>
<title>RETURN VALUES</title>
<para>
<command>named-checkzone</command> returns an exit status of 1 if
<para><command>named-checkzone</command>
returns an exit status of 1 if
errors were detected and 0 otherwise.
</para>
</refsect1>
<refsect1>
<title>SEE ALSO</title>
<para>
<citerefentry>
<refentrytitle>named</refentrytitle>
<manvolnum>8</manvolnum>
<para><citerefentry>
<refentrytitle>named</refentrytitle><manvolnum>8</manvolnum>
</citerefentry>,
<citetitle>RFC 1035</citetitle>,
<citetitle>BIND 9 Administrator Reference Manual</citetitle>.
@@ -235,16 +252,12 @@
<refsect1>
<title>AUTHOR</title>
<para>
<corpauthor>Internet Systems Consortium</corpauthor>
<para><corpauthor>Internet Systems Consortium</corpauthor>
</para>
</refsect1>
</refentry>
<!--
</refentry><!--
- Local variables:
- mode: sgml
- End:
-->

File diff suppressed because it is too large Load Diff

View File

@@ -1,4 +1,6 @@
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.0//EN"
"http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd"
[<!ENTITY mdash "&#8212;">]>
<!--
- Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) 2000-2002 Internet Software Consortium.
@@ -15,9 +17,7 @@
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- PERFORMANCE OF THIS SOFTWARE.
-->
<!-- $Id: host.docbook,v 1.7 2004/11/10 22:04:25 marka Exp $ -->
<!-- $Id: host.docbook,v 1.8 2005/05/11 05:55:36 sra Exp $ -->
<refentry>
<refentryinfo>
@@ -35,6 +35,19 @@
<refpurpose>DNS lookup utility</refpurpose>
</refnamediv>
<docinfo>
<copyright>
<year>2004</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
<copyright>
<year>2000</year>
<year>2001</year>
<year>2002</year>
<holder>Internet Software Consortium</holder>
</copyright>
</docinfo>
<refsynopsisdiv>
<cmdsynopsis>
<command>host</command>
@@ -47,15 +60,15 @@
<arg><option>-m <replaceable class="parameter">flag</replaceable></option></arg>
<arg><option>-4</option></arg>
<arg><option>-6</option></arg>
<arg choice=req>name</arg>
<arg choice=opt>server</arg>
<arg choice="req">name</arg>
<arg choice="opt">server</arg>
</cmdsynopsis>
</refsynopsisdiv>
<refsect1>
<title>DESCRIPTION</title>
<para>
<command>host</command>
<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,
@@ -63,12 +76,14 @@ When no arguments or options are given,
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
<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
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
<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>.
@@ -83,19 +98,22 @@ a query of type ANY.
<para>
When the <option>-C</option> option is used, <command>host</command>
will attempt to display the SOA records for zone
<parameter>name</parameter> from all the listed authoritative name
<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>
<para>
The <option>-c</option> option instructs to make a DNS query of class
<parameter>class</parameter>. This can be used to lookup Hesiod or
<parameter>class</parameter>. This can be used to lookup
Hesiod or
Chaosnet class resource records. The default class is IN (Internet).
</para>
<para>
Verbose output is generated by <command>host</command> when the
Verbose output is generated by <command>host</command> when
the
<option>-d</option> or <option>-v</option> option is used. The two
options are equivalent. They have been provided for backwards
compatibility. In previous versions, the <option>-d</option> option
@@ -106,7 +124,8 @@ output.
<para>
List mode is selected by the <option>-l</option> option. This makes
<command>host</command> perform a zone transfer for zone
<parameter>name</parameter>. Transfer the zone printing out the NS, PTR
<parameter>name</parameter>. Transfer the zone printing out
the NS, PTR
and address records (A/AAAA). If combined with <option>-a</option>
all records will be printed.
</para>
@@ -120,9 +139,11 @@ The default is to use IP6.ARPA.
<para>
The <option>-N</option> option sets the number of dots that have to be
in <parameter>name</parameter> for it to be considered absolute. The
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
<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
@@ -131,10 +152,13 @@ or <type>domain</type> directive in
<para>
The number of UDP retries for a lookup can be changed with the
<option>-R</option> option. <parameter>number</parameter> indicates
how many times <command>host</command> will repeat a query that does
<option>-R</option> option. <parameter>number</parameter>
indicates
how many times <command>host</command> will repeat a query
that does
not get answered. The default number of retries is 1. If
<parameter>number</parameter> is negative or zero, the number of
<parameter>number</parameter> is negative or zero, the
number of
retries will default to 1.
</para>
@@ -144,14 +168,16 @@ Setting this option clears the <type>RD</type> &mdash; recursion
desired &mdash; bit in the query which <command>host</command> makes.
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
<option>-r</option> option enables <command>host</command>
to mimic
the behaviour of a name server by making non-recursive queries and
expecting to receive answers to those queries that are usually
referrals to other name servers.
</para>
<para>
By default <command>host</command> uses UDP when making queries. The
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.
@@ -165,12 +191,15 @@ use IPv4 query transport. The <option>-6</option> option forces
<para>
The <option>-t</option> option is used to select the query type.
<parameter>type</parameter> can be any recognised query type: CNAME,
<parameter>type</parameter> can be any recognised query
type: CNAME,
NS, SOA, SIG, KEY, AXFR, etc. When no query type is specified,
<command>host</command> automatically selects an appropriate query
<command>host</command> automatically selects an appropriate
query
type. By default it looks for A records, but if the
<option>-C</option> option was given, queries will be made for SOA
records, and if <parameter>name</parameter> is a dotted-decimal IPv4
records, and if <parameter>name</parameter> is a
dotted-decimal IPv4
address or colon-delimited IPv6 address, <command>host</command> will
query for PTR records. If a query type of IXFR is chosen the starting
serial number can be specified by appending an equal followed by the
@@ -180,17 +209,20 @@ starting serial number (e.g. -t IXFR=12345678).
<para>
The time to wait for a reply can be controlled through the
<option>-W</option> and <option>-w</option> options. The
<option>-W</option> option makes <command>host</command> wait for
<option>-W</option> option makes <command>host</command>
wait for
<parameter>wait</parameter> seconds. If <parameter>wait</parameter>
is less than one, the wait interval is set to one second. When the
<option>-w</option> option is used, <command>host</command> will
<option>-w</option> option is used, <command>host</command>
will
effectively wait forever for a reply. The time to wait for a response
will be set to the number of seconds given by the hardware's maximum
value for an integer quantity.
</para>
<para>
The <option>-m</option> can be used to set the memory usage debugging flags
The <option>-m</option> can be used to set the memory usage debugging
flags
<parameter>record</parameter>, <parameter>usage</parameter> and
<parameter>trace</parameter>.
</para>
@@ -198,15 +230,13 @@ The <option>-m</option> can be used to set the memory usage debugging flags
<refsect1>
<title>FILES</title>
<para>
<filename>/etc/resolv.conf</filename>
<para><filename>/etc/resolv.conf</filename>
</para>
</refsect1>
<refsect1>
<title>SEE ALSO</title>
<para>
<citerefentry>
<para><citerefentry>
<refentrytitle>dig</refentrytitle><manvolnum>1</manvolnum>
</citerefentry>,
<citerefentry>
@@ -215,4 +245,8 @@ The <option>-m</option> can be used to set the memory usage debugging flags
</para>
</refsect1>
</refentry>
</refentry><!--
- Local variables:
- mode: sgml
- End:
-->

View File

@@ -1,4 +1,6 @@
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.0//EN"
"http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd"
[<!ENTITY mdash "&#8212;">]>
<!--
- Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
-
@@ -14,9 +16,7 @@
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- PERFORMANCE OF THIS SOFTWARE.
-->
<!-- $Id: nslookup.docbook,v 1.5 2004/08/30 00:54:45 marka Exp $ -->
<!-- $Id: nslookup.docbook,v 1.6 2005/05/11 05:55:36 sra Exp $ -->
<!--
- Copyright (c) 1985, 1989
- The Regents of the University of California. All rights reserved.
@@ -49,7 +49,6 @@
- OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- SUCH DAMAGE.
-->
<refentry>
<refentryinfo>
@@ -67,23 +66,30 @@
<refpurpose>query Internet name servers interactively</refpurpose>
</refnamediv>
<docinfo>
<copyright>
<year>2004</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
</docinfo>
<refsynopsisdiv>
<cmdsynopsis>
<command>nslookup</command>
<arg><option>-option</option></arg>
<arg choice=opt>name | -</arg>
<arg choice=opt>server</arg>
<arg choice="opt">name | -</arg>
<arg choice="opt">server</arg>
</cmdsynopsis>
</refsynopsisdiv>
<refsect1>
<title>DESCRIPTION</title>
<para>
<command>Nslookup</command>
<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
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>
@@ -93,19 +99,19 @@ domain.
<title>ARGUMENTS</title>
<para>
Interactive mode is entered in the following cases:
<OrderedList Numeration=Loweralpha>
<Listitem>
<orderedlist numeration="loweralpha">
<listitem>
<para>
when no arguments are given (the default name server will be used)
</para>
</Listitem>
<Listitem>
</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>
</listitem>
</orderedlist>
</para>
<para>
@@ -117,12 +123,13 @@ argument specifies the host name or address of a name server.
<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>
<PROGRAMLISTING>
change the default query type to host information, and the initial
timeout to 10 seconds, type:
<informalexample>
<programlisting>
nslookup -query=hinfo -timeout=10
</PROGRAMLISTING>
</InformalExample>
</programlisting>
</informalexample>
</para>
</refsect1>
@@ -130,8 +137,10 @@ nslookup -query=hinfo -timeout=10
<refsect1>
<title>INTERACTIVE COMMANDS</title>
<variablelist>
<varlistentry><term>host <optional>server</optional></term>
<listitem><para>
<varlistentry>
<term>host <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.
@@ -142,164 +151,310 @@ search list is used to qualify the name.
<para>
To look up a host not in the current domain, append a period to
the name.
</para></listitem></varlistentry>
</para>
</listitem>
</varlistentry>
<varlistentry><term><constant>server</constant> <replaceable class="parameter">domain</replaceable></term>
<listitem><para></para></listitem></varlistentry>
<varlistentry><term><constant>lserver</constant> <replaceable class="parameter">domain</replaceable></term>
<listitem><para>
<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>
</para>
</listitem>
</varlistentry>
<varlistentry><term><constant>root</constant></term>
<listitem><para>not implemented</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>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>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>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>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>?</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>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
<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>
<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
<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>
<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>
<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>
</para>
<para>
(Default = IN; abbreviation = cl)
</para></listitem>
</para>
</listitem>
</varlistentry>
<varlistentry><term><constant><replaceable><optional>no</optional></replaceable>debug</constant></term>
<listitem><para>
<varlistentry>
<term><constant>
<replaceable><optional>no</optional></replaceable>debug</constant></term>
<listitem>
<para>
Turn debugging mode on. A lot more information is
printed about the packet sent to the server and the
resulting answer.
</para><para>
</para>
<para>
(Default = nodebug; abbreviation = <optional>no</optional>deb)
</para></listitem></varlistentry>
</para>
</listitem>
</varlistentry>
<varlistentry><term><constant><replaceable><optional>no</optional></replaceable>d2</constant></term>
<listitem><para>
<varlistentry>
<term><constant>
<replaceable><optional>no</optional></replaceable>d2</constant></term>
<listitem>
<para>
Turn debugging mode on. A lot more information is
printed about the packet sent to the server and the
resulting answer.
</para><para>
</para>
<para>
(Default = nod2)
</para></listitem></varlistentry>
</para>
</listitem>
</varlistentry>
<varlistentry><term><constant>domain=</constant><replaceable>name</replaceable></term>
<listitem><para>
<varlistentry>
<term><constant>domain=</constant><replaceable>name</replaceable></term>
<listitem>
<para>
Sets the search list to <replaceable>name</replaceable>.
</para></listitem></varlistentry>
</para>
</listitem>
</varlistentry>
<varlistentry><term><constant><replaceable><optional>no</optional></replaceable>search</constant></term>
<listitem><para>
<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>
</para>
<para>
(Default = search)
</para></listitem></varlistentry>
</para>
</listitem>
</varlistentry>
<varlistentry><term><constant>port=</constant><replaceable>value</replaceable></term>
<listitem><para>
<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>
</para>
<para>
(Default = 53; abbreviation = po)
</para></listitem></varlistentry>
</para>
</listitem>
</varlistentry>
<varlistentry><term><constant>querytype=</constant><replaceable>value</replaceable></term>
<listitem><para></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>
<varlistentry>
<term><constant>type=</constant><replaceable>value</replaceable></term>
<listitem>
<para>
Change the top of the information query.
</para><para>
</para>
<para>
(Default = A; abbreviations = q, ty)
</para></listitem></varlistentry>
</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
<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>
</para>
<para>
(Default = recurse; abbreviation = [no]rec)
</para></listitem></varlistentry>
</para>
</listitem>
</varlistentry>
<varlistentry><term><constant>retry=</constant><replaceable>number</replaceable></term>
<listitem><para>
<varlistentry>
<term><constant>retry=</constant><replaceable>number</replaceable></term>
<listitem>
<para>
Set the number of retries to number.
</para></listitem></varlistentry>
</para>
</listitem>
</varlistentry>
<varlistentry><term><constant>timeout=</constant><replaceable>number</replaceable></term>
<listitem><para>
<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>
</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>
<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>
</para>
</listitem>
</varlistentry>
</variablelist>
</para></listitem></varlistentry>
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1>
<title>FILES</title>
<para>
<filename>/etc/resolv.conf</filename>
<para><filename>/etc/resolv.conf</filename>
</para>
</refsect1>
<refsect1>
<title>SEE ALSO</title>
<para>
<citerefentry>
<para><citerefentry>
<refentrytitle>dig</refentrytitle><manvolnum>1</manvolnum>
</citerefentry>,
<citerefentry>
@@ -317,4 +472,8 @@ the lookups. Valid keywords are:
Andrew Cherenson
</para>
</refsect1>
</refentry>
</refentry><!--
- Local variables:
- mode: sgml
- End:
-->

View File

@@ -1,4 +1,6 @@
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.0//EN"
"http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd"
[<!ENTITY mdash "&#8212;">]>
<!--
- Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) 2000-2003 Internet Software Consortium.
@@ -15,9 +17,7 @@
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- PERFORMANCE OF THIS SOFTWARE.
-->
<!-- $Id: dnssec-keygen.docbook,v 1.10 2005/04/07 03:49:55 marka Exp $ -->
<!-- $Id: dnssec-keygen.docbook,v 1.11 2005/05/11 05:55:36 sra Exp $ -->
<refentry>
<refentryinfo>
<date>June 30, 2000</date>
@@ -34,6 +34,21 @@
<refpurpose>DNSSEC key generation tool</refpurpose>
</refnamediv>
<docinfo>
<copyright>
<year>2004</year>
<year>2005</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
<copyright>
<year>2000</year>
<year>2001</year>
<year>2002</year>
<year>2003</year>
<holder>Internet Software Consortium</holder>
</copyright>
</docinfo>
<refsynopsisdiv>
<cmdsynopsis>
<command>dnssec-keygen</command>
@@ -57,11 +72,10 @@
<refsect1>
<title>DESCRIPTION</title>
<para>
<command>dnssec-keygen</command> generates keys for DNSSEC
(Secure DNS), as defined in RFC 2535 and RFC &lt;TBA\&gt;. It can also generate
keys for use with TSIG (Transaction Signatures), as
defined in RFC 2845.
<para><command>dnssec-keygen</command>
generates keys for DNSSEC (Secure DNS), as defined in RFC 2535
and RFC &lt;TBA\&gt;. It can also generate keys for use with
TSIG (Transaction Signatures), as defined in RFC 2845.
</para>
</refsect1>
@@ -79,7 +93,8 @@
are case insensitive.
</para>
<para>
Note 1: that for DNSSEC, RSASHA1 is a mandatory to implement algorithm,
Note 1: that for DNSSEC, RSASHA1 is a mandatory to implement
algorithm,
and DSA is recommended. For TSIG, HMAC-MD5 is mandatory.
</para>
<para>
@@ -93,7 +108,8 @@
<listitem>
<para>
Specifies the number of bits in the key. The choice of key
size depends on the algorithm used. RSAMD5 / RSASHA1 keys must be between
size depends on the algorithm used. RSAMD5 / RSASHA1 keys must be
between
512 and 2048 bits. Diffie Hellman keys must be between
128 and 4096 bits. DSA keys must be between 512 and 1024
bits and an exact multiple of 64. HMAC-MD5 keys must be
@@ -108,8 +124,10 @@
<para>
Specifies the owner type of the key. The value of
<option>nametype</option> must either be ZONE (for a DNSSEC
zone key (KEY/DNSKEY)), HOST or ENTITY (for a key associated with a host (KEY)),
USER (for a key associated with a user(KEY)) or OTHER (DNSKEY). These values are
zone key (KEY/DNSKEY)), HOST or ENTITY (for a key associated with
a host (KEY)),
USER (for a key associated with a user(KEY)) or OTHER (DNSKEY).
These values are
case insensitive.
</para>
</listitem>
@@ -194,7 +212,8 @@
Specifies the source of randomness. If the operating
system does not provide a <filename>/dev/random</filename>
or equivalent device, the default source of randomness
is keyboard input. <filename>randomdev</filename> specifies
is keyboard input. <filename>randomdev</filename>
specifies
the name of a character device or file containing random
data to be used instead of the default. The special value
<filename>keyboard</filename> indicates that keyboard
@@ -241,7 +260,8 @@
<refsect1>
<title>GENERATED KEYS</title>
<para>
When <command>dnssec-keygen</command> completes successfully,
When <command>dnssec-keygen</command> completes
successfully,
it prints a string of the form <filename>Knnnn.+aaa+iiiii</filename>
to the standard output. This is an identification string for
the key it has generated. These strings can be used as arguments
@@ -249,36 +269,38 @@
</para>
<itemizedlist>
<listitem>
<para>
<filename>nnnn</filename> is the key name.
<para><filename>nnnn</filename> is the key name.
</para>
</listitem>
<listitem>
<para>
<filename>aaa</filename> is the numeric representation of the
<para><filename>aaa</filename> is the numeric representation
of the
algorithm.
</para>
</listitem>
<listitem>
<para>
<filename>iiiii</filename> is the key identifier (or footprint).
<para><filename>iiiii</filename> is the key identifier (or
footprint).
</para>
</listitem>
</itemizedlist>
<para>
<command>dnssec-keygen</command> creates two file, with names based
<para><command>dnssec-keygen</command>
creates two file, with names based
on the printed string. <filename>Knnnn.+aaa+iiiii.key</filename>
contains the public key, and
<filename>Knnnn.+aaa+iiiii.private</filename> contains the private
<filename>Knnnn.+aaa+iiiii.private</filename> contains the
private
key.
</para>
<para>
The <filename>.key</filename> file contains a DNS KEY record that
The <filename>.key</filename> file contains a DNS KEY record
that
can be inserted into a zone file (directly or with a $INCLUDE
statement).
</para>
<para>
The <filename>.private</filename> file contains algorithm specific
The <filename>.private</filename> file contains algorithm
specific
fields. For obvious security reasons, this file does not have
general read permission.
</para>
@@ -296,28 +318,25 @@
<userinput>example.com</userinput>, the following command would be
issued:
</para>
<para>
<userinput>dnssec-keygen -a DSA -b 768 -n ZONE example.com</userinput>
<para><userinput>dnssec-keygen -a DSA -b 768 -n ZONE example.com</userinput>
</para>
<para>
The command would print a string of the form:
</para>
<para>
<userinput>Kexample.com.+003+26160</userinput>
<para><userinput>Kexample.com.+003+26160</userinput>
</para>
<para>
In this example, <command>dnssec-keygen</command> creates
the files <filename>Kexample.com.+003+26160.key</filename> and
the files <filename>Kexample.com.+003+26160.key</filename>
and
<filename>Kexample.com.+003+26160.private</filename>
</para>
</refsect1>
<refsect1>
<title>SEE ALSO</title>
<para>
<citerefentry>
<refentrytitle>dnssec-signzone</refentrytitle>
<manvolnum>8</manvolnum>
<para><citerefentry>
<refentrytitle>dnssec-signzone</refentrytitle><manvolnum>8</manvolnum>
</citerefentry>,
<citetitle>BIND 9 Administrator Reference Manual</citetitle>,
<citetitle>RFC 2535</citetitle>,
@@ -328,14 +347,11 @@
<refsect1>
<title>AUTHOR</title>
<para>
<corpauthor>Internet Systems Consortium</corpauthor>
<para><corpauthor>Internet Systems Consortium</corpauthor>
</para>
</refsect1>
</refentry>
<!--
</refentry><!--
- Local variables:
- mode: sgml
- End:

View File

@@ -1,4 +1,6 @@
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.0//EN"
"http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd"
[<!ENTITY mdash "&#8212;">]>
<!--
- Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) 2000-2003 Internet Software Consortium.
@@ -15,9 +17,7 @@
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- PERFORMANCE OF THIS SOFTWARE.
-->
<!-- $Id: dnssec-signzone.docbook,v 1.15 2005/04/07 03:49:56 marka Exp $ -->
<!-- $Id: dnssec-signzone.docbook,v 1.16 2005/05/11 05:55:36 sra Exp $ -->
<refentry>
<refentryinfo>
<date>June 30, 2000</date>
@@ -34,6 +34,21 @@
<refpurpose>DNSSEC zone signing tool</refpurpose>
</refnamediv>
<docinfo>
<copyright>
<year>2004</year>
<year>2005</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
<copyright>
<year>2000</year>
<year>2001</year>
<year>2002</year>
<year>2003</year>
<holder>Internet Software Consortium</holder>
</copyright>
</docinfo>
<refsynopsisdiv>
<cmdsynopsis>
<command>dnssec-signzone</command>
@@ -63,8 +78,8 @@
<refsect1>
<title>DESCRIPTION</title>
<para>
<command>dnssec-signzone</command> signs a zone. It generates
<para><command>dnssec-signzone</command>
signs a zone. It generates
NSEC and RRSIG records and produces a signed version of the
zone. The security status of delegations from the signed zone
(that is, whether the child zones are secure or not) is
@@ -171,7 +186,8 @@
<listitem>
<para>
The name of the output file containing the signed zone. The
default is to append <filename>.signed</filename> to the
default is to append <filename>.signed</filename> to
the
input file.
</para>
</listitem>
@@ -202,7 +218,8 @@
The default cycle interval is one quarter of the difference
between the signature end and start times. So if neither
<option>end-time</option> or <option>start-time</option>
are specified, <command>dnssec-signzone</command> generates
are specified, <command>dnssec-signzone</command>
generates
signatures that are valid for 30 days, with a cycle
interval of 7.5 days. Therefore, if any existing RRSIG records
are due to expire in less than 7.5 days, they would be
@@ -212,7 +229,7 @@
</varlistentry>
<varlistentry>
<term>
<term>-j <replaceable class="parameter">jitter</replaceable></term>
<listitem>
<para>
When signing a zone with a fixed signature lifetime, all
@@ -274,7 +291,8 @@
Specifies the source of randomness. If the operating
system does not provide a <filename>/dev/random</filename>
or equivalent device, the default source of randomness
is keyboard input. <filename>randomdev</filename> specifies
is keyboard input. <filename>randomdev</filename>
specifies
the name of a character device or file containing random
data to be used instead of the default. The special value
<filename>keyboard</filename> indicates that keyboard
@@ -340,20 +358,22 @@
The following command signs the <userinput>example.com</userinput>
zone with the DSA key generated in the <command>dnssec-keygen</command>
man page. The zone's keys must be in the zone. If there are
<filename>keyset</filename> files associated with child zones,
<filename>keyset</filename> files associated with child
zones,
they must be in the current directory.
<userinput>example.com</userinput>, the following command would be
issued:
</para>
<para>
<userinput>dnssec-signzone -o example.com db.example.com Kexample.com.+003+26160</userinput>
<para><userinput>dnssec-signzone -o example.com db.example.com
Kexample.com.+003+26160</userinput>
</para>
<para>
The command would print a string of the form:
</para>
<para>
In this example, <command>dnssec-signzone</command> creates
the file <filename>db.example.com.signed</filename>. This file
the file <filename>db.example.com.signed</filename>. This
file
should be referenced in a zone statement in a
<filename>named.conf</filename> file.
</para>
@@ -361,10 +381,8 @@
<refsect1>
<title>SEE ALSO</title>
<para>
<citerefentry>
<refentrytitle>dnssec-keygen</refentrytitle>
<manvolnum>8</manvolnum>
<para><citerefentry>
<refentrytitle>dnssec-keygen</refentrytitle><manvolnum>8</manvolnum>
</citerefentry>,
<citetitle>BIND 9 Administrator Reference Manual</citetitle>,
<citetitle>RFC 2535</citetitle>.
@@ -373,14 +391,11 @@
<refsect1>
<title>AUTHOR</title>
<para>
<corpauthor>Internet Systems Consortium</corpauthor>
<para><corpauthor>Internet Systems Consortium</corpauthor>
</para>
</refsect1>
</refentry>
<!--
</refentry><!--
- Local variables:
- mode: sgml
- End:

View File

@@ -1,4 +1,6 @@
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.0//EN"
"http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd"
[<!ENTITY mdash "&#8212;">]>
<!--
- Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) 2000, 2001 Internet Software Consortium.
@@ -15,9 +17,7 @@
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- PERFORMANCE OF THIS SOFTWARE.
-->
<!-- $Id: lwresd.docbook,v 1.8 2004/06/03 02:22:32 marka Exp $ -->
<!-- $Id: lwresd.docbook,v 1.9 2005/05/11 05:55:36 sra Exp $ -->
<refentry>
<refentryinfo>
<date>June 30, 2000</date>
@@ -34,6 +34,18 @@
<refpurpose>lightweight resolver daemon</refpurpose>
</refnamediv>
<docinfo>
<copyright>
<year>2004</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
<copyright>
<year>2000</year>
<year>2001</year>
<holder>Internet Software Consortium</holder>
</copyright>
</docinfo>
<refsynopsisdiv>
<cmdsynopsis>
<command>lwresd</command>
@@ -54,15 +66,17 @@
<refsect1>
<title>DESCRIPTION</title>
<para>
<command>lwresd</command> is the daemon providing name lookup
<para><command>lwresd</command>
is the daemon providing name lookup
services to clients that use the BIND 9 lightweight resolver
library. It is essentially a stripped-down, caching-only name
server that answers queries using the BIND 9 lightweight
resolver protocol rather than the DNS protocol.
</para>
<para>
<command>lwresd</command> listens for resolver queries on a
<para><command>lwresd</command>
listens for resolver queries on a
UDP port on the IPv4 loopback interface, 127.0.0.1. This
means that <command>lwresd</command> can only be used by
processes running on the local machine. By default UDP port
@@ -96,8 +110,7 @@
<term>-C <replaceable class="parameter">config-file</replaceable></term>
<listitem>
<para>
Use <replaceable
class="parameter">config-file</replaceable> as the
Use <replaceable class="parameter">config-file</replaceable> as the
configuration file instead of the default,
<filename>/etc/resolv.conf</filename>.
</para>
@@ -108,8 +121,7 @@
<term>-d <replaceable class="parameter">debug-level</replaceable></term>
<listitem>
<para>
Set the daemon's debug level to <replaceable
class="parameter">debug-level</replaceable>.
Set the daemon's debug level to <replaceable class="parameter">debug-level</replaceable>.
Debugging traces from <command>lwresd</command> become
more verbose as the debug level increases.
</para>
@@ -139,8 +151,7 @@
<term>-n <replaceable class="parameter">#cpus</replaceable></term>
<listitem>
<para>
Create <replaceable
class="parameter">#cpus</replaceable> worker threads
Create <replaceable class="parameter">#cpus</replaceable> worker threads
to take advantage of multiple CPUs. If not specified,
<command>lwresd</command> will try to determine the
number of CPUs present and create one thread per CPU.
@@ -165,8 +176,7 @@
<term>-p <replaceable class="parameter">port</replaceable></term>
<listitem>
<para>
Send DNS lookups to port <replaceable
class="parameter">port</replaceable>. If not
Send DNS lookups to port <replaceable class="parameter">port</replaceable>. If not
specified, the default is port 53. This provides a
way of testing the lightweight resolver daemon with a
name server that listens for queries on a non-standard
@@ -194,9 +204,8 @@
<varlistentry>
<term>-t <replaceable class="parameter">directory</replaceable></term>
<listitem>
<para>
<function>chroot()</function> to <replaceable
class="parameter">directory</replaceable> after
<para><function>chroot()</function>
to <replaceable class="parameter">directory</replaceable> after
processing the command line arguments, but before
reading the configuration file.
</para>
@@ -216,9 +225,8 @@
<varlistentry>
<term>-u <replaceable class="parameter">user</replaceable></term>
<listitem>
<para>
<function>setuid()</function> to <replaceable
class="parameter">user</replaceable> after completing
<para><function>setuid()</function>
to <replaceable class="parameter">user</replaceable> after completing
privileged operations, such as creating sockets that
listen on privileged ports.
</para>
@@ -267,33 +275,25 @@
<refsect1>
<title>SEE ALSO</title>
<para>
<citerefentry>
<refentrytitle>named</refentrytitle>
<manvolnum>8</manvolnum>
<para><citerefentry>
<refentrytitle>named</refentrytitle><manvolnum>8</manvolnum>
</citerefentry>,
<citerefentry>
<refentrytitle>lwres</refentrytitle>
<manvolnum>3</manvolnum>
<refentrytitle>lwres</refentrytitle><manvolnum>3</manvolnum>
</citerefentry>,
<citerefentry>
<refentrytitle>resolver</refentrytitle>
<manvolnum>5</manvolnum>
<refentrytitle>resolver</refentrytitle><manvolnum>5</manvolnum>
</citerefentry>.
</para>
</refsect1>
<refsect1>
<title>AUTHOR</title>
<para>
<corpauthor>Internet Systems Consortium</corpauthor>
<para><corpauthor>Internet Systems Consortium</corpauthor>
</para>
</refsect1>
</refentry>
<!--
</refentry><!--
- Local variables:
- mode: sgml
- End:

View File

@@ -1,4 +1,6 @@
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.0//EN"
"http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd"
[<!ENTITY mdash "&#8212;">]>
<!--
- Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
-
@@ -14,9 +16,7 @@
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- PERFORMANCE OF THIS SOFTWARE.
-->
<!-- $Id: named.conf.docbook,v 1.8 2005/01/17 00:46:01 marka Exp $ -->
<!-- $Id: named.conf.docbook,v 1.9 2005/05/11 05:55:36 sra Exp $ -->
<refentry>
<refentryinfo>
<date>Aug 13, 2004</date>
@@ -33,6 +33,14 @@
<refpurpose>configuration file for named</refpurpose>
</refnamediv>
<docinfo>
<copyright>
<year>2004</year>
<year>2005</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
</docinfo>
<refsynopsisdiv>
<cmdsynopsis>
<command>named.conf</command>
@@ -41,8 +49,8 @@
<refsect1>
<title>DESCRIPTION</title>
<para>
<filename>named.conf</filename> is the configuration file for
<para><filename>named.conf</filename> is the configuration file
for
<command>named</command>. Statements are enclosed
in braces and terminated with a semi-colon. Clauses in
the statements are also semi-colon terminated. The usual
@@ -61,35 +69,35 @@
<refsect1>
<title>ACL</title>
<LITERALLAYOUT>
<literallayout>
acl <replaceable>string</replaceable> { <replaceable>address_match_element</replaceable>; ... };
</LITERALLAYOUT>
</literallayout>
</refsect1>
<refsect1>
<title>KEY</title>
<LITERALLAYOUT>
<literallayout>
key <replaceable>domain_name</replaceable> {
algorithm <replaceable>string</replaceable>;
secret <replaceable>string</replaceable>;
};
</LITERALLAYOUT>
</literallayout>
</refsect1>
<refsect1>
<title>MASTERS</title>
<LITERALLAYOUT>
<literallayout>
masters <replaceable>string</replaceable> <optional> port <replaceable>integer</replaceable> </optional> {
( <replaceable>masters</replaceable> | <replaceable>ipv4_address</replaceable> <optional>port <replaceable>integer</replaceable></optional> |
<replaceable>ipv6_address</replaceable> <optional>port <replaceable>integer</replaceable></optional> ) <optional> key <replaceable>string</replaceable> </optional>; ...
};
</LITERALLAYOUT>
</literallayout>
</refsect1>
<refsect1>
<title>SERVER</title>
<LITERALLAYOUT>
<literallayout>
server ( <replaceable>ipv4_address<optional>/prefixlen</optional></replaceable> | <replaceable>ipv6_address<optional>/prefixlen</optional></replaceable> ) {
bogus <replaceable>boolean</replaceable>;
edns <replaceable>boolean</replaceable>;
@@ -105,21 +113,21 @@ server ( <replaceable>ipv4_address<optional>/prefixlen</optional></replaceable>
support-ixfr <replaceable>boolean</replaceable>; // obsolete
};
</LITERALLAYOUT>
</literallayout>
</refsect1>
<refsect1>
<title>TRUSTED-KEYS</title>
<LITERALLAYOUT>
<literallayout>
trusted-keys {
<replaceable>domain_name</replaceable> <replaceable>flags</replaceable> <replaceable>protocol</replaceable> <replaceable>algorithm</replaceable> <replaceable>key</replaceable>; ...
};
</LITERALLAYOUT>
</literallayout>
</refsect1>
<refsect1>
<title>CONTROLS</title>
<LITERALLAYOUT>
<literallayout>
controls {
inet ( <replaceable>ipv4_address</replaceable> | <replaceable>ipv6_address</replaceable> | * )
<optional> port ( <replaceable>integer</replaceable> | * ) </optional>
@@ -127,12 +135,12 @@ controls {
<optional> keys { <replaceable>string</replaceable>; ... } </optional>;
unix <replaceable>unsupported</replaceable>; // not implemented
};
</LITERALLAYOUT>
</literallayout>
</refsect1>
<refsect1>
<title>LOGGING</title>
<LITERALLAYOUT>
<literallayout>
logging {
channel <replaceable>string</replaceable> {
file <replaceable>log_file</replaceable>;
@@ -146,12 +154,12 @@ logging {
};
category <replaceable>string</replaceable> { <replaceable>string</replaceable>; ... };
};
</LITERALLAYOUT>
</literallayout>
</refsect1>
<refsect1>
<title>LWRES</title>
<LITERALLAYOUT>
<literallayout>
lwres {
listen-on <optional> port <replaceable>integer</replaceable> </optional> {
( <replaceable>ipv4_address</replaceable> | <replaceable>ipv6_address</replaceable> ) <optional> port <replaceable>integer</replaceable> </optional>; ...
@@ -160,12 +168,12 @@ lwres {
search { <replaceable>string</replaceable>; ... };
ndots <replaceable>integer</replaceable>;
};
</LITERALLAYOUT>
</literallayout>
</refsect1>
<refsect1>
<title>OPTIONS</title>
<LITERALLAYOUT>
<literallayout>
options {
avoid-v4-udp-ports { <replaceable>port</replaceable>; ... };
avoid-v6-udp-ports { <replaceable>port</replaceable>; ... };
@@ -307,12 +315,12 @@ options {
treat-cr-as-space <replaceable>boolean</replaceable>; // obsolete
use-id-pool <replaceable>boolean</replaceable>; // obsolete
};
</LITERALLAYOUT>
</literallayout>
</refsect1>
<refsect1>
<title>VIEW</title>
<LITERALLAYOUT>
<literallayout>
view <replaceable>string</replaceable> <replaceable>optional_class</replaceable> {
match-clients { <replaceable>address_match_element</replaceable>; ... };
match-destinations { <replaceable>address_match_element</replaceable>; ... };
@@ -429,12 +437,12 @@ view <replaceable>string</replaceable> <replaceable>optional_class</replaceable>
maintain-ixfr-base <replaceable>boolean</replaceable>; // obsolete
max-ixfr-log-size <replaceable>size</replaceable>; // obsolete
};
</LITERALLAYOUT>
</literallayout>
</refsect1>
<refsect1>
<title>ZONE</title>
<LITERALLAYOUT>
<literallayout>
zone <replaceable>string</replaceable> <replaceable>optional_class</replaceable> {
type ( master | slave | stub | hint |
forward | delegation-only );
@@ -508,33 +516,30 @@ zone <replaceable>string</replaceable> <replaceable>optional_class</replaceable>
max-ixfr-log-size <replaceable>size</replaceable>; // obsolete
pubkey <replaceable>integer</replaceable> <replaceable>integer</replaceable> <replaceable>integer</replaceable> <replaceable>quoted_string</replaceable>; // obsolete
};
</LITERALLAYOUT>
</literallayout>
</refsect1>
<refsect1>
<title>FILES</title>
<para>
<filename>/etc/named.conf</filename>
<para><filename>/etc/named.conf</filename>
</para>
</refsect1>
<refsect1>
<title>SEE ALSO</title>
<para>
<citerefentry>
<para><citerefentry>
<refentrytitle>named</refentrytitle><manvolnum>8</manvolnum>
</citerefentry>,
<citerefentry>
<refentrytitle>rndc</refentrytitle><manvolnum>8</manvolnum>
</citerefentry>,
<citerefentry>
<refentrytitle>BIND 9 Adminstrators Reference Manual</refentrytitle>
<refentrytitle>BIND 9 Administrator Reference Manual</refentrytitle>
</citerefentry>.
</para>
</refsect1>
</refentry>
<!--
</refentry><!--
- Local variables:
- mode: sgml
- End:

View File

@@ -1,4 +1,6 @@
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.0//EN"
"http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd"
[<!ENTITY mdash "&#8212;">]>
<!--
- Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) 2000, 2001, 2003 Internet Software Consortium.
@@ -15,9 +17,7 @@
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- PERFORMANCE OF THIS SOFTWARE.
-->
<!-- $Id: named.docbook,v 1.8 2004/06/03 02:22:33 marka Exp $ -->
<!-- $Id: named.docbook,v 1.9 2005/05/11 05:55:36 sra Exp $ -->
<refentry>
<refentryinfo>
<date>June 30, 2000</date>
@@ -34,6 +34,19 @@
<refpurpose>Internet domain name server</refpurpose>
</refnamediv>
<docinfo>
<copyright>
<year>2004</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
<copyright>
<year>2000</year>
<year>2001</year>
<year>2003</year>
<holder>Internet Software Consortium</holder>
</copyright>
</docinfo>
<refsynopsisdiv>
<cmdsynopsis>
<command>named</command>
@@ -55,13 +68,14 @@
<refsect1>
<title>DESCRIPTION</title>
<para>
<command>named</command> is a Domain Name System (DNS) server,
<para><command>named</command>
is a Domain Name System (DNS) server,
part of the BIND 9 distribution from ISC. For more
information on the DNS, see RFCs 1033, 1034, and 1035.
</para>
<para>
When invoked without arguments, <command>named</command> will
When invoked without arguments, <command>named</command>
will
read the default configuration file
<filename>/etc/named.conf</filename>, read any initial
data, and listen for queries.
@@ -97,16 +111,14 @@
<term>-c <replaceable class="parameter">config-file</replaceable></term>
<listitem>
<para>
Use <replaceable
class="parameter">config-file</replaceable> as the
Use <replaceable class="parameter">config-file</replaceable> as the
configuration file instead of the default,
<filename>/etc/named.conf</filename>. To
ensure that reloading the configuration file continues
to work after the server has changed its working
directory due to to a possible
<option>directory</option> option in the configuration
file, <replaceable
class="parameter">config-file</replaceable> should be
file, <replaceable class="parameter">config-file</replaceable> should be
an absolute pathname.
</para>
</listitem>
@@ -116,8 +128,7 @@
<term>-d <replaceable class="parameter">debug-level</replaceable></term>
<listitem>
<para>
Set the daemon's debug level to <replaceable
class="parameter">debug-level</replaceable>.
Set the daemon's debug level to <replaceable class="parameter">debug-level</replaceable>.
Debugging traces from <command>named</command> become
more verbose as the debug level increases.
</para>
@@ -147,8 +158,7 @@
<term>-n <replaceable class="parameter">#cpus</replaceable></term>
<listitem>
<para>
Create <replaceable
class="parameter">#cpus</replaceable> worker threads
Create <replaceable class="parameter">#cpus</replaceable> worker threads
to take advantage of multiple CPUs. If not specified,
<command>named</command> will try to determine the
number of CPUs present and create one thread per CPU.
@@ -162,8 +172,7 @@
<term>-p <replaceable class="parameter">port</replaceable></term>
<listitem>
<para>
Listen for queries on port <replaceable
class="parameter">port</replaceable>. If not
Listen for queries on port <replaceable class="parameter">port</replaceable>. If not
specified, the default is port 53.
</para>
</listitem>
@@ -187,9 +196,8 @@
<varlistentry>
<term>-t <replaceable class="parameter">directory</replaceable></term>
<listitem>
<para>
<function>chroot()</function> to <replaceable
class="parameter">directory</replaceable> after
<para><function>chroot()</function>
to <replaceable class="parameter">directory</replaceable> after
processing the command line arguments, but before
reading the configuration file.
</para>
@@ -209,9 +217,8 @@
<varlistentry>
<term>-u <replaceable class="parameter">user</replaceable></term>
<listitem>
<para>
<function>setuid()</function> to <replaceable
class="parameter">user</replaceable> after completing
<para><function>setuid()</function>
to <replaceable class="parameter">user</replaceable> after completing
privileged operations, such as creating sockets that
listen on privileged ports.
</para>
@@ -219,10 +226,12 @@
<para>
On Linux, <command>named</command> uses the kernel's
capability mechanism to drop all root privileges
except the ability to <function>bind()</function> to a
except the ability to <function>bind()</function> to
a
privileged port and set process resource limits.
Unfortunately, this means that the <option>-u</option>
option only works when <command>named</command> is run
option only works when <command>named</command> is
run
on kernel 2.2.18 or later, or kernel 2.3.99-pre3 or
later, since previous kernels did not allow privileges
to be retained after <function>setuid()</function>.
@@ -244,8 +253,7 @@
<term>-x <replaceable class="parameter">cache-file</replaceable></term>
<listitem>
<para>
Load data from <replaceable
class="parameter">cache-file</replaceable> into the
Load data from <replaceable class="parameter">cache-file</replaceable> into the
cache of the default view.
</para>
<warning>
@@ -302,9 +310,9 @@
<title>CONFIGURATION</title>
<para>
The <command>named</command> configuration file is too complex
to describe in detail here. A complete description is
provided in the <citetitle>BIND 9 Administrator Reference
Manual</citetitle>.
to describe in detail here. A complete description is provided
in the
<citetitle>BIND 9 Administrator Reference Manual</citetitle>.
</para>
</refsect1>
@@ -337,17 +345,14 @@
<refsect1>
<title>SEE ALSO</title>
<para>
<citetitle>RFC 1033</citetitle>,
<para><citetitle>RFC 1033</citetitle>,
<citetitle>RFC 1034</citetitle>,
<citetitle>RFC 1035</citetitle>,
<citerefentry>
<refentrytitle>rndc</refentrytitle>
<manvolnum>8</manvolnum>
<refentrytitle>rndc</refentrytitle><manvolnum>8</manvolnum>
</citerefentry>,
<citerefentry>
<refentrytitle>lwresd</refentrytitle>
<manvolnum>8</manvolnum>
<refentrytitle>lwresd</refentrytitle><manvolnum>8</manvolnum>
</citerefentry>,
<citetitle>BIND 9 Administrator Reference Manual</citetitle>.
</para>
@@ -355,15 +360,11 @@
<refsect1>
<title>AUTHOR</title>
<para>
<corpauthor>Internet Systems Consortium</corpauthor>
<para><corpauthor>Internet Systems Consortium</corpauthor>
</para>
</refsect1>
</refentry>
<!--
</refentry><!--
- Local variables:
- mode: sgml
- End:

View File

@@ -1,4 +1,6 @@
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.0//EN"
"http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd"
[<!ENTITY mdash "&#8212;">]>
<!--
- Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) 2000-2003 Internet Software Consortium.
@@ -15,9 +17,7 @@
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- PERFORMANCE OF THIS SOFTWARE.
-->
<!-- $Id: nsupdate.docbook,v 1.19 2005/04/07 03:49:59 marka Exp $ -->
<!-- $Id: nsupdate.docbook,v 1.20 2005/05/11 05:55:36 sra Exp $ -->
<refentry>
<refentryinfo>
<date>Jun 30, 2000</date>
@@ -31,6 +31,22 @@
<refname>nsupdate</refname>
<refpurpose>Dynamic DNS update utility</refpurpose>
</refnamediv>
<docinfo>
<copyright>
<year>2004</year>
<year>2005</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
<copyright>
<year>2000</year>
<year>2001</year>
<year>2002</year>
<year>2003</year>
<holder>Internet Software Consortium</holder>
</copyright>
</docinfo>
<refsynopsisdiv>
<cmdsynopsis>
<command>nsupdate</command>
@@ -49,13 +65,13 @@
<refsect1>
<title>DESCRIPTION</title>
<para>
<command>nsupdate</command>
<para><command>nsupdate</command>
is used to submit Dynamic DNS Update requests as defined in RFC2136
to a name server.
This allows resource records to be added or removed from a zone
without manually editing the zone file.
A single update request can contain requests to add or remove more than one
A single update request can contain requests to add or remove more than
one
resource record.
</para>
<para>
@@ -108,13 +124,10 @@ key must be stored in a KEY record in a zone served by the name server.
does not read
<filename>/etc/named.conf</filename>.
</para>
<para>
<command>nsupdate</command>
uses the
<option>-y</option>
or
<option>-k</option>
option (with an HMAC-MD5 key) to provide the shared secret needed to generate
<para><command>nsupdate</command>
uses the <option>-y</option> or <option>-k</option>
option (with an HMAC-MD5 key) to provide the shared secret needed to
generate
a TSIG record for authenticating Dynamic DNS update requests.
These options are mutually exclusive.
With the
@@ -143,8 +156,7 @@ option is discouraged because 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>
<refentrytitle>ps</refentrytitle><manvolnum>1</manvolnum>
</citerefentry>
or in a history file maintained by the user's shell.
</para>
@@ -165,23 +177,30 @@ option makes
use a TCP connection.
This may be preferable when a batch of update requests is made.
</para>
<para>The <option>-t</option> option sets the maximum time a update request can
take before it is aborted. The default is 300 seconds. Zero can be used
<para>
The <option>-t</option> option sets the maximum time a update request
can
take before it is aborted. The default is 300 seconds. Zero can be
used
to disable the timeout.
</para>
<para>The <option>-u</option> option sets the UDP retry interval. The default is
3 seconds. If zero the interval will be computed from the timeout interval
<para>
The <option>-u</option> option sets the UDP retry interval. The default
is
3 seconds. If zero the interval will be computed from the timeout
interval
and number of UDP retries.
</para>
<para>The <option>-r</option> option sets the number of UDP retries. The default is
<para>
The <option>-r</option> option sets the number of UDP retries. The
default is
3. If zero only one update request will be made.
</para>
</refsect1>
<refsect1>
<title>INPUT FORMAT</title>
<para>
<command>nsupdate</command>
<para><command>nsupdate</command>
reads input from
<parameter>filename</parameter>
or standard input.
@@ -192,27 +211,29 @@ contents of the zone.
These checks set conditions that some name or set of
resource records (RRset) either exists or is absent from the zone.
These conditions must be met if the entire update request is to succeed.
Updates will be rejected if the tests for the prerequisite conditions fail.
Updates will be rejected if the tests for the prerequisite conditions
fail.
</para>
<para>
Every update request consists of zero or more prerequisites
and zero or more updates.
This allows a suitably authenticated update request to proceed if some
specified resource records are present or missing from the zone.
A blank input line (or the <command>send</command> command) causes the
A blank input line (or the <command>send</command> command)
causes the
accumulated commands to be sent as one Dynamic DNS update request to the
name server.
</para>
<para>
The command formats and their meaning are as follows:
<variablelist>
<varlistentry><term>
<cmdsynopsis>
<varlistentry>
<term><cmdsynopsis>
<command>server</command>
<arg choice="req">servername</arg>
<arg choice="opt">port</arg>
</cmdsynopsis>
</term>
</cmdsynopsis></term>
<listitem>
<para>
Sends all dynamic update requests to the name server
@@ -220,23 +241,26 @@ Sends all dynamic update requests to the name server
When no server statement is provided,
<command>nsupdate</command>
will send updates to the master server of the correct zone.
The MNAME field of that zone's SOA record will identify the master
The MNAME field of that zone's SOA record will identify the
master
server for that zone.
<parameter>port</parameter>
is the port number on
<parameter>servername</parameter>
where the dynamic update requests get sent.
If no port number is specified, the default DNS port number of 53 is
If no port number is specified, the default DNS port number of
53 is
used.
</para>
</listitem>
</varlistentry>
<varlistentry><term>
<cmdsynopsis>
<varlistentry>
<term><cmdsynopsis>
<command>local</command>
<arg choice="req">address</arg>
<arg choice="opt">port</arg>
</cmdsynopsis>
</term>
</cmdsynopsis></term>
<listitem>
<para>
Sends all dynamic update requests using the local
@@ -244,17 +268,21 @@ Sends all dynamic update requests using the local
When no local statement is provided,
<command>nsupdate</command>
will send updates using an address and port chosen by the system.
will send updates using an address and port chosen by the
system.
<parameter>port</parameter>
can additionally be used to make requests come from a specific port.
can additionally be used to make requests come from a specific
port.
If no port number is specified, the system will assign one.
</para>
</listitem>
</varlistentry>
<varlistentry><term>
<cmdsynopsis>
<varlistentry>
<term><cmdsynopsis>
<command>zone</command>
<arg choice="req">zonename</arg>
</cmdsynopsis>
</term>
</cmdsynopsis></term>
<listitem>
<para>
Specifies that all updates are to be made to the zone
@@ -263,33 +291,33 @@ If no
<parameter>zone</parameter>
statement is provided,
<command>nsupdate</command>
will attempt determine the correct zone to update based on the rest of the input.
will attempt determine the correct zone to update based on the
rest of the input.
</para>
</listitem>
</varlistentry>
<varlistentry><term>
<cmdsynopsis>
<varlistentry>
<term><cmdsynopsis>
<command>class</command>
<arg choice="req">classname</arg>
</cmdsynopsis>
</term>
</cmdsynopsis></term>
<listitem>
<para>
Specify the default class.
If no <parameter>class</parameter> is specified the default class is
If no <parameter>class</parameter> is specified the
default class is
<parameter>IN</parameter>.
</para>
</listitem>
</varlistentry>
<varlistentry><term>
<cmdsynopsis>
<varlistentry>
<term><cmdsynopsis>
<command>key</command>
<arg choice="req">name</arg>
<arg choice="req">secret</arg>
</cmdsynopsis>
</term>
</cmdsynopsis></term>
<listitem>
<para>
Specifies that all updates are to be TSIG signed using the
@@ -301,12 +329,11 @@ overrides any key specified on the command line via
</listitem>
</varlistentry>
<varlistentry><term>
<cmdsynopsis>
<varlistentry>
<term><cmdsynopsis>
<command>prereq nxdomain</command>
<arg choice="req">domain-name</arg>
</cmdsynopsis>
</term>
</cmdsynopsis></term>
<listitem>
<para>
Requires that no resource record of any type exists with name
@@ -316,12 +343,11 @@ Requires that no resource record of any type exists with name
</varlistentry>
<varlistentry><term>
<cmdsynopsis>
<varlistentry>
<term><cmdsynopsis>
<command>prereq yxdomain</command>
<arg choice="req">domain-name</arg>
</cmdsynopsis>
</term>
</cmdsynopsis></term>
<listitem>
<para>
Requires that
@@ -331,14 +357,13 @@ exists (has as at least one resource record, of any type).
</listitem>
</varlistentry>
<varlistentry><term>
<cmdsynopsis>
<varlistentry>
<term><cmdsynopsis>
<command>prereq nxrrset</command>
<arg choice="req">domain-name</arg>
<arg choice="opt">class</arg>
<arg choice="req">type</arg>
</cmdsynopsis>
</term>
</cmdsynopsis></term>
<listitem>
<para>
Requires that no resource record exists of the specified
@@ -354,14 +379,13 @@ is omitted, IN (internet) is assumed.
</varlistentry>
<varlistentry><term>
<cmdsynopsis>
<varlistentry>
<term><cmdsynopsis>
<command>prereq yxrrset</command>
<arg choice="req">domain-name</arg>
<arg choice="opt">class</arg>
<arg choice="req">type</arg>
</cmdsynopsis>
</term>
</cmdsynopsis></term>
<listitem>
<para>
This requires that a resource record of the specified
@@ -377,15 +401,14 @@ is omitted, IN (internet) is assumed.
</listitem>
</varlistentry>
<varlistentry><term>
<cmdsynopsis>
<varlistentry>
<term><cmdsynopsis>
<command>prereq yxrrset</command>
<arg choice="req">domain-name</arg>
<arg choice="opt">class</arg>
<arg choice="req">type</arg>
<arg choice="req" rep="repeat">data</arg>
</cmdsynopsis>
</term>
</cmdsynopsis></term>
<listitem>
<para>
The
@@ -405,21 +428,21 @@ and
<parameter>domain-name</parameter>.
The
<parameter>data</parameter>
are written in the standard text representation of the resource record's
are written in the standard text representation of the resource
record's
RDATA.
</para>
</listitem>
</varlistentry>
<varlistentry><term>
<cmdsynopsis>
<varlistentry>
<term><cmdsynopsis>
<command>update delete</command>
<arg choice="req">domain-name</arg>
<arg choice="opt">ttl</arg>
<arg choice="opt">class</arg>
<arg choice="opt">type <arg choice="opt" rep="repeat">data</arg></arg>
</cmdsynopsis>
</term>
</cmdsynopsis></term>
<listitem>
<para>
Deletes any resource records named
@@ -438,16 +461,15 @@ is ignored, and is only allowed for compatibility.
</listitem>
</varlistentry>
<varlistentry><term>
<cmdsynopsis>
<varlistentry>
<term><cmdsynopsis>
<command>update add</command>
<arg choice="req">domain-name</arg>
<arg choice="req">ttl</arg>
<arg choice="opt">class</arg>
<arg choice="req">type</arg>
<arg choice="req" rep="repeat">data</arg>
</cmdsynopsis>
</term>
</cmdsynopsis></term>
<listitem>
<para>
Adds a new resource record with the specified
@@ -459,42 +481,44 @@ and
</listitem>
</varlistentry>
<varlistentry><term>
<cmdsynopsis>
<varlistentry>
<term><cmdsynopsis>
<command>show</command>
</cmdsynopsis>
</term>
</cmdsynopsis></term>
<listitem>
<para>
Displays the current message, containing all of the prerequisites and
Displays the current message, containing all of the
prerequisites and
updates specified since the last send.
</para>
</listitem>
</varlistentry>
<varlistentry><term>
<cmdsynopsis>
<varlistentry>
<term><cmdsynopsis>
<command>send</command>
</cmdsynopsis>
</term>
</cmdsynopsis></term>
<listitem>
<para>
Sends the current message. This is equivalent to entering a blank line.
Sends the current message. This is equivalent to entering a
blank line.
</para>
</listitem>
</varlistentry>
<varlistentry><term>
<cmdsynopsis>
<varlistentry>
<term><cmdsynopsis>
<command>answer</command>
</cmdsynopsis>
</term>
</cmdsynopsis></term>
<listitem>
<para>
Displays the answer.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
<para>
Lines beginning with a semicolon are comments and are ignored.
@@ -510,16 +534,17 @@ The examples below show how
could be used to insert and delete resource records from the
<type>example.com</type>
zone.
Notice that the input in each example contains a trailing blank line so that
Notice that the input in each example contains a trailing blank line so
that
a group of commands are sent as one dynamic update request to the
master name server for
<type>example.com</type>.
<programlisting>
# nsupdate
> update delete oldhost.example.com A
> update add newhost.example.com 86400 A 172.16.1.1
> send
&gt; update delete oldhost.example.com A
&gt; update add newhost.example.com 86400 A 172.16.1.1
&gt; send
</programlisting>
</para>
<para>
@@ -532,9 +557,9 @@ it IP address 172.16.1.1 is added.
The newly-added record has a 1 day TTL (86400 seconds)
<programlisting>
# nsupdate
> prereq nxdomain nickname.example.com
> update add nickname.example.com 86400 CNAME somehost.example.com
> send
&gt; prereq nxdomain nickname.example.com
&gt; update add nickname.example.com 86400 CNAME somehost.example.com
&gt; send
</programlisting>
</para>
<para>
@@ -556,14 +581,17 @@ RRSIG, DNSKEY and NSEC records.)
<title>FILES</title>
<variablelist>
<varlistentry><term><constant>/etc/resolv.conf</constant></term>
<varlistentry>
<term><constant>/etc/resolv.conf</constant></term>
<listitem>
<para>
used to identify default name server
</para>
</listitem>
</varlistentry>
<varlistentry><term><constant>K{name}.+157.+{random}.key</constant></term>
<varlistentry>
<term><constant>K{name}.+157.+{random}.key</constant></term>
<listitem>
<para>
base-64 encoding of HMAC-MD5 key created by
@@ -572,8 +600,10 @@ base-64 encoding of HMAC-MD5 key created by
</citerefentry>.
</para>
</listitem>
</varlistentry>
<varlistentry><term><constant>K{name}.+157.+{random}.private</constant></term>
<varlistentry>
<term><constant>K{name}.+157.+{random}.private</constant></term>
<listitem>
<para>
base-64 encoding of HMAC-MD5 key created by
@@ -582,13 +612,14 @@ base-64 encoding of HMAC-MD5 key created by
</citerefentry>.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1>
<title>SEE ALSO</title>
<para>
<citerefentry>
<para><citerefentry>
<refentrytitle>RFC2136</refentrytitle>
</citerefentry>,
<citerefentry>
@@ -615,6 +646,7 @@ base-64 encoding of HMAC-MD5 key created by
<citerefentry>
<refentrytitle>dnssec-keygen</refentrytitle><manvolnum>8</manvolnum>
</citerefentry>.
</para>
</refsect1>
<refsect1>
@@ -626,4 +658,8 @@ for its cryptographic operations, and may change in future
releases.
</para>
</refsect1>
</refentry>
</refentry><!--
- Local variables:
- mode: sgml
- End:
-->

View File

@@ -1,4 +1,6 @@
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.0//EN"
"http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd"
[<!ENTITY mdash "&#8212;">]>
<!--
- Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) 2001, 2003 Internet Software Consortium.
@@ -15,9 +17,7 @@
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- PERFORMANCE OF THIS SOFTWARE.
-->
<!-- $Id: rndc-confgen.docbook,v 1.7 2004/06/03 02:22:34 marka Exp $ -->
<!-- $Id: rndc-confgen.docbook,v 1.8 2005/05/11 05:55:37 sra Exp $ -->
<refentry>
<refentryinfo>
<date>Aug 27, 2001</date>
@@ -34,6 +34,18 @@
<refpurpose>rndc key generation tool</refpurpose>
</refnamediv>
<docinfo>
<copyright>
<year>2004</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
<copyright>
<year>2001</year>
<year>2003</year>
<holder>Internet Software Consortium</holder>
</copyright>
</docinfo>
<refsynopsisdiv>
<cmdsynopsis>
<command>rndc-confgen</command>
@@ -52,8 +64,8 @@
<refsect1>
<title>DESCRIPTION</title>
<para>
<command>rndc-confgen</command> generates configuration files
<para><command>rndc-confgen</command>
generates configuration files
for <command>rndc</command>. It can be used as a
convenient alternative to writing the
<filename>rndc.conf</filename> file
@@ -80,7 +92,8 @@
This creates a file <filename>rndc.key</filename>
in <filename>/etc</filename> (or whatever
<varname>sysconfdir</varname>
was specified as when <acronym>BIND</acronym> was built)
was specified as when <acronym>BIND</acronym> was
built)
that is read by both <command>rndc</command>
and <command>named</command> on startup. The
<filename>rndc.key</filename> file defines a default
@@ -91,7 +104,8 @@
</para>
<para>
Running <command>rndc-confgen -a</command> allows
BIND 9 and <command>rndc</command> to be used as drop-in
BIND 9 and <command>rndc</command> to be used as
drop-in
replacements for BIND 8 and <command>ndc</command>,
with no changes to the existing BIND 8
<filename>named.conf</filename> file.
@@ -100,7 +114,8 @@
If a more elaborate configuration than that
generated by <command>rndc-confgen -a</command>
is required, for example if rndc is to be used remotely,
you should run <command>rndc-confgen</command> without the
you should run <command>rndc-confgen</command> without
the
<command>-a</command> option and set up a
<filename>rndc.conf</filename> and
<filename>named.conf</filename>
@@ -169,7 +184,8 @@
authorization. If the operating
system does not provide a <filename>/dev/random</filename>
or equivalent device, the default source of randomness
is keyboard input. <filename>randomdev</filename> specifies
is keyboard input. <filename>randomdev</filename>
specifies
the name of a character device or file containing random
data to be used instead of the default. The special value
<filename>keyboard</filename> indicates that keyboard
@@ -207,9 +223,12 @@
<term>-u <replaceable class="parameter">user</replaceable></term>
<listitem>
<para>
Used with the <command>-a</command> option to set the owner
of the <filename>rndc.key</filename> file generated. If
<command>-t</command> is also specified only the file in
Used with the <command>-a</command> option to set the
owner
of the <filename>rndc.key</filename> file generated.
If
<command>-t</command> is also specified only the file
in
the chroot area has its owner changed.
</para>
</listitem>
@@ -224,8 +243,7 @@
To allow <command>rndc</command> to be used with
no manual configuration, run
</para>
<para>
<userinput>rndc-confgen -a</userinput>
<para><userinput>rndc-confgen -a</userinput>
</para>
<para>
To print a sample <filename>rndc.conf</filename> file and
@@ -233,25 +251,20 @@
statements to be manually inserted into <filename>named.conf</filename>,
run
</para>
<para>
<userinput>rndc-confgen</userinput>
<para><userinput>rndc-confgen</userinput>
</para>
</refsect1>
<refsect1>
<title>SEE ALSO</title>
<para>
<citerefentry>
<refentrytitle>rndc</refentrytitle>
<manvolnum>8</manvolnum>
<para><citerefentry>
<refentrytitle>rndc</refentrytitle><manvolnum>8</manvolnum>
</citerefentry>,
<citerefentry>
<refentrytitle>rndc.conf</refentrytitle>
<manvolnum>5</manvolnum>
<refentrytitle>rndc.conf</refentrytitle><manvolnum>5</manvolnum>
</citerefentry>,
<citerefentry>
<refentrytitle>named</refentrytitle>
<manvolnum>8</manvolnum>
<refentrytitle>named</refentrytitle><manvolnum>8</manvolnum>
</citerefentry>,
<citetitle>BIND 9 Administrator Reference Manual</citetitle>.
</para>
@@ -259,14 +272,11 @@
<refsect1>
<title>AUTHOR</title>
<para>
<corpauthor>Internet Systems Consortium</corpauthor>
<para><corpauthor>Internet Systems Consortium</corpauthor>
</para>
</refsect1>
</refentry>
<!--
</refentry><!--
- Local variables:
- mode: sgml
- End:

View File

@@ -1,4 +1,6 @@
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.0//EN"
"http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd"
[<!ENTITY mdash "&#8212;">]>
<!--
- Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) 2000, 2001 Internet Software Consortium.
@@ -15,9 +17,7 @@
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- PERFORMANCE OF THIS SOFTWARE.
-->
<!-- $Id: rndc.conf.docbook,v 1.9 2005/04/07 03:49:59 marka Exp $ -->
<!-- $Id: rndc.conf.docbook,v 1.10 2005/05/11 05:55:37 sra Exp $ -->
<refentry>
<refentryinfo>
<date>June 30, 2000</date>
@@ -34,6 +34,19 @@
<refpurpose>rndc configuration file</refpurpose>
</refnamediv>
<docinfo>
<copyright>
<year>2004</year>
<year>2005</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
<copyright>
<year>2000</year>
<year>2001</year>
<holder>Internet Software Consortium</holder>
</copyright>
</docinfo>
<refsynopsisdiv>
<cmdsynopsis>
<command>rndc.conf</command>
@@ -42,8 +55,7 @@
<refsect1>
<title>DESCRIPTION</title>
<para>
<filename>rndc.conf</filename> is the configuration file
<para><filename>rndc.conf</filename> is the configuration file
for <command>rndc</command>, the BIND 9 name server control
utility. This file has a similar structure and syntax to
<filename>named.conf</filename>. Statements are enclosed
@@ -60,8 +72,7 @@
<para>
Unix style: # to end of line
</para>
<para>
<filename>rndc.conf</filename> is much simpler than
<para><filename>rndc.conf</filename> is much simpler than
<filename>named.conf</filename>. The file uses three
statements: an options statement, a server statement
and a key statement.
@@ -107,18 +118,22 @@
The <option>key</option> statement begins with an identifying
string, the name of the key. The statement has two clauses.
<option>algorithm</option> identifies the encryption algorithm
for <command>rndc</command> to use; currently only HMAC-MD5 is
for <command>rndc</command> to use; currently only HMAC-MD5
is
supported. This is followed by a secret clause which contains
the base-64 encoding of the algorithm's encryption key. The
base-64 string is enclosed in double quotes.
</para>
<para>
There are two common ways to generate the base-64 string for the
secret. The BIND 9 program <command>rndc-confgen</command> can
secret. The BIND 9 program <command>rndc-confgen</command>
can
be used to generate a random key, or the
<command>mmencode</command> program, also known as
<command>mimencode</command>, can be used to generate a base-64
string from known input. <command>mmencode</command> does not
<command>mimencode</command>, can be used to generate a
base-64
string from known input. <command>mmencode</command> does
not
ship with BIND 9 but is available on many systems. See the
EXAMPLE section for sample command lines for each.
</para>
@@ -127,34 +142,44 @@
<refsect1>
<title>EXAMPLE</title>
<programlisting>
<para><programlisting>
options {
default-server localhost;
default-key samplekey;
};
</programlisting>
</para>
<para><programlisting>
server localhost {
key samplekey;
};
</programlisting>
</para>
<para><programlisting>
server testserver {
key testkey;
addresses { localhost port 5353; };
};
</programlisting>
</para>
<para><programlisting>
key samplekey {
algorithm hmac-md5;
secret "6FMfj43Osz4lyb24OIe2iGEz9lf1llJO+lz";
};
</programlisting>
</para>
<para><programlisting>
key testkey {
algorithm hmac-md5;
secret "R3HI8P6BKw9ZwXwN3VZKuQ==";
}
</programlisting>
</para>
<para>
In the above example, <command>rndc</command> will by default use
In the above example, <command>rndc</command> will by
default use
the server at localhost (127.0.0.1) and the key called samplekey.
Commands to the localhost server will use the samplekey key, which
must also be defined in the server's configuration file with the
@@ -169,11 +194,11 @@
<para>
To generate a random secret with <command>rndc-confgen</command>:
</para>
<para>
<userinput>rndc-confgen</userinput>
<para><userinput>rndc-confgen</userinput>
</para>
<para>
A complete <filename>rndc.conf</filename> file, including the
A complete <filename>rndc.conf</filename> file, including
the
randomly generated key, will be written to the standard
output. Commented out <option>key</option> and
<option>controls</option> statements for
@@ -182,8 +207,7 @@
<para>
To generate a base-64 secret with <command>mmencode</command>:
</para>
<para>
<userinput>echo "known plaintext for a secret" | mmencode</userinput>
<para><userinput>echo "known plaintext for a secret" | mmencode</userinput>
</para>
</refsect1>
@@ -200,18 +224,14 @@
<refsect1>
<title>SEE ALSO</title>
<para>
<citerefentry>
<refentrytitle>rndc</refentrytitle>
<manvolnum>8</manvolnum>
<para><citerefentry>
<refentrytitle>rndc</refentrytitle><manvolnum>8</manvolnum>
</citerefentry>,
<citerefentry>
<refentrytitle>rndc-confgen</refentrytitle>
<manvolnum>8</manvolnum>
<refentrytitle>rndc-confgen</refentrytitle><manvolnum>8</manvolnum>
</citerefentry>,
<citerefentry>
<refentrytitle>mmencode</refentrytitle>
<manvolnum>1</manvolnum>
<refentrytitle>mmencode</refentrytitle><manvolnum>1</manvolnum>
</citerefentry>,
<citetitle>BIND 9 Administrator Reference Manual</citetitle>.
</para>
@@ -219,16 +239,12 @@
<refsect1>
<title>AUTHOR</title>
<para>
<corpauthor>Internet Systems Consortium</corpauthor>
<para><corpauthor>Internet Systems Consortium</corpauthor>
</para>
</refsect1>
</refentry>
<!--
</refentry><!--
- Local variables:
- mode: sgml
- End:
-->

View File

@@ -1,4 +1,6 @@
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.0//EN"
"http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd"
[<!ENTITY mdash "&#8212;">]>
<!--
- Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) 2000, 2001 Internet Software Consortium.
@@ -15,9 +17,7 @@
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- PERFORMANCE OF THIS SOFTWARE.
-->
<!-- $Id: rndc.docbook,v 1.11 2005/04/07 03:50:00 marka Exp $ -->
<!-- $Id: rndc.docbook,v 1.12 2005/05/11 05:55:37 sra Exp $ -->
<refentry>
<refentryinfo>
<date>June 30, 2000</date>
@@ -34,6 +34,19 @@
<refpurpose>name server control utility</refpurpose>
</refnamediv>
<docinfo>
<copyright>
<year>2004</year>
<year>2005</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
<copyright>
<year>2000</year>
<year>2001</year>
<holder>Internet Software Consortium</holder>
</copyright>
</docinfo>
<refsynopsisdiv>
<cmdsynopsis>
<command>rndc</command>
@@ -50,8 +63,8 @@
<refsect1>
<title>DESCRIPTION</title>
<para>
<command>rndc</command> controls the operation of a name
<para><command>rndc</command>
controls the operation of a name
server. It supersedes the <command>ndc</command> utility
that was provided in old BIND releases. If
<command>rndc</command> is invoked with no command line
@@ -59,8 +72,8 @@
supported commands and the available options and their
arguments.
</para>
<para>
<command>rndc</command> communicates with the name server
<para><command>rndc</command>
communicates with the name server
over a TCP connection, sending commands authenticated with
digital signatures. In the current versions of
<command>rndc</command> and <command>named</command> named
@@ -71,8 +84,8 @@
over the channel must be signed by a key_id known to the
server.
</para>
<para>
<command>rndc</command> reads a configuration file to
<para><command>rndc</command>
reads a configuration file to
determine how to contact the name server and decide what
algorithm and key it should use.
</para>
@@ -112,7 +125,8 @@
Use <replaceable class="parameter">key-file</replaceable>
as the key file instead of the default,
<filename>/etc/rndc.key</filename>. The key in
<filename>/etc/rndc.key</filename> will be used to authenticate
<filename>/etc/rndc.key</filename> will be used to
authenticate
commands sent to the server if the <replaceable class="parameter">config-file</replaceable>
does not exist.
</para>
@@ -122,11 +136,11 @@
<varlistentry>
<term>-s <replaceable class="parameter">server</replaceable></term>
<listitem>
<para>
<replaceable class="parameter">server</replaceable> is
<para><replaceable class="parameter">server</replaceable> is
the name or address of the server which matches a
server statement in the configuration file for
<command>rndc</command>. If no server is supplied on the
<command>rndc</command>. If no server is supplied on
the
command line, the host named by the default-server clause
in the option statement of the configuration file will be
used.
@@ -139,7 +153,8 @@
<listitem>
<para>
Send commands to TCP port
<replaceable class="parameter">port</replaceable> instead
<replaceable class="parameter">port</replaceable>
instead
of BIND 9's default control channel port, 953.
</para>
</listitem>
@@ -160,7 +175,8 @@
<para>
Use the key <replaceable class="parameter">keyid</replaceable>
from the configuration file.
<replaceable class="parameter">keyid</replaceable> must be
<replaceable class="parameter">keyid</replaceable>
must be
known by named with the same algorithm and secret string
in order for control message validation to succeed.
If no <replaceable class="parameter">keyid</replaceable>
@@ -181,15 +197,16 @@
<para>
For the complete set of commands supported by <command>rndc</command>,
see the BIND 9 Administrator Reference Manual or run
<command>rndc</command> without arguments to see its help message.
<command>rndc</command> without arguments to see its help
message.
</para>
</refsect1>
<refsect1>
<title>LIMITATIONS</title>
<para>
<command>rndc</command> does not yet support all the commands of
<para><command>rndc</command>
does not yet support all the commands of
the BIND 8 <command>ndc</command> utility.
</para>
<para>
@@ -203,22 +220,17 @@
<refsect1>
<title>SEE ALSO</title>
<para>
<citerefentry>
<refentrytitle>rndc.conf</refentrytitle>
<manvolnum>5</manvolnum>
<para><citerefentry>
<refentrytitle>rndc.conf</refentrytitle><manvolnum>5</manvolnum>
</citerefentry>,
<citerefentry>
<refentrytitle>named</refentrytitle>
<manvolnum>8</manvolnum>
<refentrytitle>named</refentrytitle><manvolnum>8</manvolnum>
</citerefentry>,
<citerefentry>
<refentrytitle>named.conf</refentrytitle>
<manvolnum>5</manvolnum>
<refentrytitle>named.conf</refentrytitle><manvolnum>5</manvolnum>
</citerefentry>
<citerefentry>
<refentrytitle>ndc</refentrytitle>
<manvolnum>8</manvolnum>
<refentrytitle>ndc</refentrytitle><manvolnum>8</manvolnum>
</citerefentry>,
<citetitle>BIND 9 Administrator Reference Manual</citetitle>.
</para>
@@ -226,16 +238,12 @@
<refsect1>
<title>AUTHOR</title>
<para>
<corpauthor>Internet Systems Consortium</corpauthor>
<para><corpauthor>Internet Systems Consortium</corpauthor>
</para>
</refsect1>
</refentry>
<!--
</refentry><!--
- Local variables:
- mode: sgml
- End:
-->

View File

@@ -18,7 +18,7 @@ AC_DIVERT_PUSH(1)dnl
esyscmd([sed "s/^/# /" COPYRIGHT])dnl
AC_DIVERT_POP()dnl
AC_REVISION($Revision: 1.375 $)
AC_REVISION($Revision: 1.376 $)
AC_INIT(lib/dns/name.c)
AC_PREREQ(2.13)
@@ -1836,25 +1836,29 @@ AC_SUBST(ISC_PLATFORM_HAVEIFNAMETOINDEX)
# a developer editing the documentation source.
#
# Directory trees where SGML files are commonly found.
sgmltrees="/usr/pkg/share/sgml /usr/local/share/sgml /usr/share/sgml"
#
# Look for openjade. Plain jade is no longer supported.
#
AC_PATH_PROGS(OPENJADE, openjade, openjade)
AC_SUBST(OPENJADE)
#
# Look for TeX.
#
AC_PATH_PROGS(JADETEX, jadetex, jadetex)
AC_SUBST(JADETEX)
AC_PATH_PROGS(LATEX, latex, latex)
AC_SUBST(LATEX)
AC_PATH_PROGS(PDFJADETEX, pdfjadetex, pdfjadetex)
AC_SUBST(PDFJADETEX)
AC_PATH_PROGS(PDFLATEX, pdflatex, pdflatex)
AC_SUBST(PDFLATEX)
#
# Look for xsltproc (libxslt)
#
AC_PATH_PROG(XSLTPROC, xsltproc, xsltproc)
AC_SUBST(XSLTPROC)
#
# Look for xmllint (libxml2)
#
AC_PATH_PROG(XMLLINT, xmllint, xmllint)
AC_SUBST(XMLLINT)
#
# Subroutine for searching for an ordinary file (e.g., a stylesheet)
@@ -1891,74 +1895,60 @@ AC_SUBST($1)
])
#
# Look for the SGML catalog.
# Its location varies, so far we have seen:
#
# NetBSD /usr/pkg/share/sgml/docbook/catalog
# FreeBSD /usr/local/share/sgml/docbook/catalog
# Linux /usr/local/share/dsssl/docbook/catalog
# /usr/share/sgml/docbook/dsssl-stylesheets/catalog
#
catalogpath=""
for d in $sgmltrees
do
catalogpath="$catalogpath $d"
for s in docbook/dsssl-stylesheets
do
catalogpath="$catalogpath $d/$s"
done
done
NOM_PATH_FILE(SGMLCATALOG, catalog, $catalogpath)
#
# Look for the HTML stylesheet html/docbook.dsl, used for
# formatting man pages in HTML. Its location varies,
# so far we have seen:
#
# NetBSD /usr/pkg/share/sgml/docbook/dsssl/modular/
# FreeBSD /usr/local/share/sgml/docbook/dsssl/modular/
# Linux /usr/local/share/dsssl/docbook/
# /usr/share/sgml/docbook/dsssl-stylesheets/
#
# Ditto for the print stylesheet print/docbook.dsl.
# Look for Docbook-XSL stylesheets. Location probably varies by
# system. Guessing where it might be found, based on where SGML stuff
# lives on some systems. FreeBSD is the only one I'm sure of at the
# moment.
#
stylepath=""
for d in $sgmltrees
do
for s in docbook/dsssl/modular dsssl/docbook docbook/dsssl-stylesheets
do
stylepath="$stylepath $d/$s"
done
done
NOM_PATH_FILE(HTMLSTYLE, html/docbook.dsl, $stylepath)
NOM_PATH_FILE(PRINTSTYLE, print/docbook.dsl, $stylepath)
docbook_xsl_trees="/usr/pkg/share/xsl /usr/local/share/xsl /usr/share/xsl"
#
# Look for XML declarations.
# Its location varies, so far we have seen:
#
# NetBSD /usr/pkg/share/sgml/docbook/dsssl/modular/dtds/decls/
# FreeBSD /usr/local/share/sgml/docbook/dsssl/modular/dtds/decls/
# Linux /usr/local/share/dsssl/docbook/dtds/decls/
# /usr/share/sgml/docbook/dsssl-stylesheets/dtds/decls/
# Look for stylesheets we need.
#
xmlpath=""
for d in $sgmltrees
NOM_PATH_FILE(XSLT_DOCBOOK_STYLE_HTML, docbook/html/docbook.xsl, $docbook_xsl_trees)
NOM_PATH_FILE(XSLT_DOCBOOK_STYLE_XHTML, docbook/xhtml/docbook.xsl, $docbook_xsl_trees)
NOM_PATH_FILE(XSLT_DOCBOOK_STYLE_MAN, docbook/manpages/docbook.xsl, $docbook_xsl_trees)
NOM_PATH_FILE(XSLT_DOCBOOK_CHUNK_HTML, docbook/html/chunk.xsl, $docbook_xsl_trees)
NOM_PATH_FILE(XSLT_DOCBOOK_CHUNK_XHTML, docbook/xhtml/chunk.xsl, $docbook_xsl_trees)
#
# Same dance for db2latex
#
# No idea where this lives except on FreeBSD.
#
db2latex_xsl_trees="/usr/local/share"
#
# Look for stylesheets we need.
#
NOM_PATH_FILE(XSLT_DB2LATEX_STYLE, db2latex/xsl/docbook.xsl, $db2latex_xsl_trees)
#
# Look for "admonition" image directory. Can't use NOM_PATH_FILE()
# because it's a directory, so just do the same things, inline.
#
AC_MSG_CHECKING(for db2latex/xsl/figures)
for d in $db2latex_xsl_trees
do
for s in docbook/dsssl/modular dsssl/docbook docbook/dsssl-stylesheets
do
xmlpath="$xmlpath $d/$s"
dd=$d/db2latex/xsl/figures
if test -d $dd
then
XSLT_DB2LATEX_ADMONITIONS=$dd
AC_MSG_RESULT($dd)
break
fi
done
done
NOM_PATH_FILE(XMLDCL, dtds/decls/xml.dcl, $xmlpath)
#
# Look for docbook2man-spec.pl
#
NOM_PATH_FILE(DOCBOOK2MANSPEC, docbook2X/docbook2man-spec.pl, $sgmltrees)
if test "X$XSLT_DB2LATEX_ADMONITIONS" = "X"
then
AC_MSG_RESULT(not found)
XSLT_DB2LATEX_ADMONITIONS=db2latex/xsl/figures
fi
AC_SUBST(XSLT_DB2LATEX_ADMONITIONS)
#
# Substitutions
@@ -2016,6 +2006,20 @@ LIBBIND9_API=$srcdir/lib/bind9/api
AC_SUBST_FILE(LIBLWRES_API)
LIBLWRES_API=$srcdir/lib/lwres/api
#
# Commands to run at the end of config.status.
# Don't just put these into configure, it won't work right if somebody
# runs config.status directly (which autoconf allows).
#
AC_CONFIG_COMMANDS(
[chmod],
[chmod a+x isc-config.sh])
#
# Do it
#
AC_OUTPUT(
make/rules
make/includes
@@ -2086,14 +2090,13 @@ AC_OUTPUT(
bin/dnssec/Makefile
doc/Makefile
doc/arm/Makefile
doc/arm/nominum-docbook-html.dsl
doc/arm/nominum-docbook-print.dsl
doc/arm/validate.sh
doc/misc/Makefile
docutil/docbook2man-wrapper.sh
isc-config.sh
doc/xsl/isc-docbook-chunk.xsl
doc/xsl/isc-docbook-html.xsl
doc/xsl/isc-docbook-latex.xsl
doc/xsl/isc-manpage.xsl
)
chmod a+x isc-config.sh
# Tell Emacs to edit this file in shell mode.
# Local Variables:

View File

@@ -1,8 +1,9 @@
Makefile
gendvi.sh
genhtml.sh
genpdf.sh
validate.sh
nominum-docbook-html.dsl
nominum-docbook-print.dsl
catalog
Bv9ARM.aux
Bv9ARM.brf
Bv9ARM.glo
Bv9ARM.idx
Bv9ARM.log
Bv9ARM.out
Bv9ARM.tex

File diff suppressed because it is too large Load Diff

View File

@@ -13,7 +13,7 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
# $Id: Makefile.in,v 1.12 2004/03/05 05:04:43 marka Exp $
# $Id: Makefile.in,v 1.13 2005/05/11 05:55:34 sra Exp $
srcdir = @srcdir@
VPATH = @srcdir@
@@ -23,47 +23,41 @@ top_srcdir = @top_srcdir@
MANOBJS = Bv9ARM.html
PDFOBJS = Bv9ARM.pdf
distclean::
rm -f validate.sh
rm -f nominum-docbook-html.dsl nominum-docbook-print.dsl
rm -f HTML.index HTML.manifest
doc man:: ${MANOBJS}
doc man:: ${MANOBJS} ${PDFOBJS}
docclean manclean maintainer-clean::
rm -f *.html
clean::
rm -f Bv9ARM.aux Bv9ARM.brf Bv9ARM.glo Bv9ARM.idx
rm -f Bv9ARM.log Bv9ARM.out Bv9ARM.tex Bv9ARM.tex.tmp
Bv9ARM.html: Bv9ARM-book.xml nominum-docbook-html.dsl
${OPENJADE} -v \
-c ${SGMLCATALOG} \
-t sgml \
-d ./nominum-docbook-html.dsl \
${XMLDCL} ./Bv9ARM-book.xml
rm -f HTML.index HTML.manifest
docclean manclean maintainer-clean:: clean
rm -f *.html *.pdf
Bv9ARM-book.rtf: Bv9ARM-book.xml nominum-docbook-print.dsl
${OPENJADE} -v \
-c ${SGMLCATALOG} \
-t rtf \
-d ./nominum-docbook-print.dsl \
${XMLDCL} ./Bv9ARM-book.xml
Bv9ARM.html: Bv9ARM-book.xml
${XSLTPROC} --stringparam root.filename Bv9ARM \
${top_srcdir}/doc/xsl/isc-docbook-chunk.xsl \
Bv9ARM-book.xml
Bv9ARM-book.tex: Bv9ARM-book.xml nominum-docbook-print.dsl
${OPENJADE} -v \
-c ${SGMLCATALOG} \
-d ./nominum-docbook-print.dsl \
-t tex \
${XMLDCL} ./Bv9ARM-book.xml
Bv9ARM.tex: Bv9ARM-book.xml
${XSLTPROC} ${top_srcdir}/doc/xsl/pre-latex.xsl Bv9ARM-book.xml | \
${XSLTPROC} ${top_srcdir}/doc/xsl/isc-docbook-latex.xsl - | \
@PERL@ latex-fixup.pl >$@.tmp
if test -s $@.tmp; then mv $@.tmp $@; else rm -f $@.tmp; exit 1; fi
Bv9ARM-book.dvi: Bv9ARM-book.tex
Bv9ARM.dvi: Bv9ARM.tex
rm -f Bv9ARM-book.aux Bv9ARM-book.dvi Bv9ARM-book.log
${JADETEX} ./Bv9ARM-book.tex || true
${JADETEX} ./Bv9ARM-book.tex || true
${JADETEX} ./Bv9ARM-book.tex || true
${LATEX} '\batchmode\input Bv9ARM.tex' || rm -f $@
${LATEX} '\batchmode\input Bv9ARM.tex' || rm -f $@
${LATEX} '\batchmode\input Bv9ARM.tex' || rm -f $@
Bv9ARM-book.pdf: Bv9ARM-book.tex
Bv9ARM.pdf: Bv9ARM.tex
rm -f Bv9ARM-book.aux Bv9ARM-book.pdf Bv9ARM-book.log
${PDFJADETEX} ./Bv9ARM-book.tex || true
${PDFJADETEX} ./Bv9ARM-book.tex || true
${PDFJADETEX} ./Bv9ARM-book.tex || true
${PDFLATEX} '\batchmode\input Bv9ARM.tex' || rm -f $@
${PDFLATEX} '\batchmode\input Bv9ARM.tex' || rm -f $@
${PDFLATEX} '\batchmode\input Bv9ARM.tex' || rm -f $@

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

45
doc/arm/latex-fixup.pl Normal file
View File

@@ -0,0 +1,45 @@
#!/usr/bin/perl -w
#
# Copyright (C) 2005 Internet Systems Consortium, Inc. ("ISC")
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# 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.
# $Id: latex-fixup.pl,v 1.2 2005/05/11 05:55:33 sra Exp $
# Sadly, the final stages of generating a presentable PDF file always
# seem to require some manual tweaking. Doesn't seem to matter what
# typesetting tool one uses, sane forms of automation only go so far,
# at least with present technology.
#
# This script is intended to be a collection of tweaks. The theory is
# that, while we can't avoid the need for tweaking, we can at least
# write the silly things down in a form that a program might be able
# to execute. Undoubtedly everythig in here will break, eventually,
# at which point it will need to be updated, but since the alternative
# is to do the final editing by hand every time, this approach seems
# the lesser of two evils.
while (<>) {
# At the moment, the only tweak we have is fixup for a db2latex
# oops. LaTeX2e does not like having tables with duplicate names.
# Perhaps the dblatex project will fix this someday, but we can
# get by with just deleting the offending LaTeX commands for now.
s/\\addtocounter\{table\}\{-1\}//g;
# Add any further tweaking here.
# Write out whatever we have now.
print;
}

View File

@@ -1,148 +0,0 @@
<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
<!ENTITY dbstyle SYSTEM "@HTMLSTYLE@" CDATA DSSSL>
]>
<style-sheet>
<style-specification use="docbook">
<style-specification-body>
<!-- ;; your stuff goes here... -->
(define %html-prefix%
;; Add the specified prefix to HTML output filenames
"Bv9ARM.")
(define %use-id-as-filename%
;; Use ID attributes as name for component HTML files?
#t)
(define %root-filename%
;; Name for the root HTML document
"Bv9ARM")
(define %section-autolabel%
;; REFENTRY section-autolabel
;; PURP Are sections enumerated?
;; DESC
;; If true, unlabeled sections will be enumerated.
;; /DESC
;; AUTHOR N/A
;; /REFENTRY
#t)
(define %html-ext%
;; REFENTRY html-ext
;; PURP Default extension for HTML output files
;; DESC
;; The default extension for HTML output files.
;; /DESC
;; AUTHOR N/A
;; /REFENTRY
".html")
(define nochunks
;; REFENTRY nochunks
;; PURP Suppress chunking of output pages
;; DESC
;; If true, the entire source document is formatted as a single HTML
;; document and output on stdout.
;; (This option can conveniently be set with '-V nochunks' on the
;; Jade command line).
;; /DESC
;; AUTHOR N/A
;; /REFENTRY
#f)
(define rootchunk
;; REFENTRY rootchunk
;; PURP Make a chunk for the root element when nochunks is used
;; DESC
;; If true, a chunk will be created for the root element, even though
;; nochunks is specified. This option has no effect if nochunks is not
;; true.
;; (This option can conveniently be set with '-V rootchunk' on the
;; Jade command line).
;; /DESC
;; AUTHOR N/A
;; /REFENTRY
#t)
(define html-index
;; REFENTRY html-index
;; PURP HTML indexing?
;; DESC
;; Turns on HTML indexing. If true, then index data will be written
;; to the file defined by 'html-index-filename'. This data can be
;; collated and turned into a DocBook index with bin/collateindex.pl.
;; /DESC
;; AUTHOR N/A
;; /REFENTRY
#t)
(define html-manifest
;; REFENTRY html-manifest
;; PURP Write a manifest?
;; DESC
;; If not '#f' then the list of HTML files created by the stylesheet
;; will be written to the file named by 'html-manifest-filename'.
;; /DESC
;; AUTHOR N/A
;; /REFENTRY
#t)
(define (chunk-element-list)
(list (normalize "preface")
(normalize "chapter")
(normalize "appendix")
(normalize "article")
(normalize "glossary")
(normalize "bibliography")
(normalize "index")
(normalize "colophon")
(normalize "setindex")
(normalize "reference")
(normalize "refentry")
(normalize "part")
(normalize "book") ;; just in case nothing else matches...
(normalize "set") ;; sets are definitely chunks...
))
;
; Add some cell padding to tables so that they don't look so cramped
; in Netscape.
;
; The following definition was cut-and-pasted from dbtable.dsl and the
; single line containing the word CELLPADDING was added.
;
(element tgroup
(let* ((wrapper (parent (current-node)))
(frameattr (attribute-string (normalize "frame") wrapper))
(pgwide (attribute-string (normalize "pgwide") wrapper))
(footnotes (select-elements (descendants (current-node))
(normalize "footnote")))
(border (if (equal? frameattr (normalize "none"))
'(("BORDER" "0"))
'(("BORDER" "1"))))
(width (if (equal? pgwide "1")
(list (list "WIDTH" ($table-width$)))
'()))
(head (select-elements (children (current-node)) (normalize "thead")))
(body (select-elements (children (current-node)) (normalize "tbody")))
(feet (select-elements (children (current-node)) (normalize "tfoot"))))
(make element gi: "TABLE"
attributes: (append
'(("CELLPADDING" "3"))
border
width
(if %cals-table-class%
(list (list "CLASS" %cals-table-class%))
'()))
(process-node-list head)
(process-node-list body)
(process-node-list feet)
(make-table-endnotes))))
</style-specification-body>
</style-specification>
<external-specification id="docbook" document="dbstyle">
</style-sheet>

View File

@@ -1,42 +0,0 @@
<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
<!ENTITY dbstyle SYSTEM "@PRINTSTYLE@" CDATA DSSSL>
]>
<style-sheet>
<style-specification use="docbook">
<style-specification-body>
<!-- ;; your stuff goes here... -->
(define %generate-book-titlepage% #t)
(define %section-autolabel%
;; REFENTRY section-autolabel
;; PURP Are sections enumerated?
;; DESC
;; If true, unlabeled sections will be enumerated.
;; /DESC
;; AUTHOR N/A
;; /REFENTRY
#t)
;; Margins around cell contents
;; (define %cals-cell-before-row-margin% 20pt)
;; (define %cals-cell-after-row-margin% 20pt)
;; seems to be a bug in JadeTeX -- we get a wierd indent on table
;; cells for the first line only. This is a workaround.
;; Adam Di Carlo, adam@onshore.com
(define %cals-cell-before-column-margin% 5pt)
(define %cals-cell-after-column-margin% 5pt)
;; Inheritable start and end indent for cell contents
(define %cals-cell-content-start-indent% 5pt)
(define %cals-cell-content-end-indent% 5pt)
</style-specification-body>
</style-specification>
<external-specification id="docbook" document="dbstyle">
</style-sheet>

View File

@@ -1,21 +0,0 @@
#!/bin/sh
#
# Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
# Copyright (C) 2000, 2001 Internet Software Consortium.
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# 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.
# $Id: validate.sh.in,v 1.3 2004/03/05 05:04:43 marka Exp $
nsgmls -sv @SGMLDIR@/docbook/dsssl/modular/dtds/decls/xml.dcl \
Bv9ARM-book.xml

4
doc/xsl/.cvsignore Normal file
View File

@@ -0,0 +1,4 @@
isc-docbook-chunk.xsl
isc-docbook-html.xsl
isc-docbook-latex.xsl
isc-manpage.xsl

71
doc/xsl/copyright.xsl Normal file
View File

@@ -0,0 +1,71 @@
<!--
- Copyright (C) 2005 Internet Systems Consortium, Inc. ("ISC")
-
- Permission to use, copy, modify, and distribute this software for any
- purpose with or without fee is hereby granted, provided that the above
- copyright notice and this permission notice appear in all copies.
-
- 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.
-->
<!-- $Id: copyright.xsl,v 1.2 2005/05/11 05:55:37 sra Exp $ -->
<!-- Generate ISC copyright comments from Docbook copyright metadata. -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:template name="isc.copyright.format">
<xsl:param name="text"/>
<xsl:value-of select="$isc.copyright.leader"/>
<xsl:value-of select="normalize-space(substring-before($text, '&#10;'))"/>
<xsl:text>&#10;</xsl:text>
<xsl:variable name="rest" select="substring-after($text, '&#10;')"/>
<xsl:if test="translate($rest, '&#9;&#32;', '')">
<xsl:call-template name="isc.copyright.format">
<xsl:with-param name="text" select="$rest"/>
</xsl:call-template>
</xsl:if>
</xsl:template>
<xsl:variable name="isc.copyright">
<xsl:call-template name="isc.copyright.format">
<xsl:with-param name="text">
<xsl:for-each select="/refentry/docinfo/copyright | /book/bookinfo/copyright">
<xsl:text>Copyright (C) </xsl:text>
<xsl:call-template name="copyright.years">
<xsl:with-param name="years" select="year"/>
</xsl:call-template>
<xsl:text> </xsl:text>
<xsl:value-of select="holder"/>
<xsl:text>&#10;</xsl:text>
</xsl:for-each>
<xsl:text>
Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
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.
</xsl:text>
</xsl:with-param>
</xsl:call-template>
</xsl:variable>
</xsl:stylesheet>
<!--
- Local variables:
- mode: sgml
- End:
-->

View File

@@ -0,0 +1,63 @@
<!--
- Copyright (C) 2005 Internet Systems Consortium, Inc. ("ISC")
-
- Permission to use, copy, modify, and distribute this software for any
- purpose with or without fee is hereby granted, provided that the above
- copyright notice and this permission notice appear in all copies.
-
- 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.
-->
<!-- $Id: isc-docbook-chunk.xsl.in,v 1.2 2005/05/11 05:55:38 sra Exp $ -->
<!-- ISC customizations for Docbook-XSL chunked HTML generator -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!-- Import the Docbook HTML stuff -->
<xsl:import href="@XSLT_DOCBOOK_CHUNK_HTML@"/>
<!-- Readable HTML output, please -->
<xsl:output indent="yes"/>
<xsl:param name="chunker.output.indent" select="'yes'"/>
<!-- Chunk at section level, please -->
<xsl:param name="chunk.section.depth" select="0"/>
<!-- Generate chunk filenames from id attribute values -->
<xsl:param name="use.id.as.filename" select="1"/>
<!-- ANSI C function prototypes, please -->
<xsl:param name="funcsynopsis.style">ansi</xsl:param>
<!-- Use ranges when constructing copyrights -->
<xsl:param name="make.year.ranges" select="1"/>
<!-- Include our copyright generator -->
<xsl:include href="copyright.xsl"/>
<!-- Set comment convention for this output format -->
<xsl:param name="isc.copyright.leader"> - </xsl:param>
<!-- Override Docbook template to insert copyright -->
<xsl:template name="user.preroot">
<xsl:comment>
<xsl:text>&#10;</xsl:text>
<xsl:value-of select="$isc.copyright"/>
</xsl:comment>
<xsl:text>&#10;</xsl:text>
</xsl:template>
</xsl:stylesheet>
<!--
- Local variables:
- mode: sgml
- End:
-->

View File

@@ -0,0 +1,56 @@
<!--
- Copyright (C) 2005 Internet Systems Consortium, Inc. ("ISC")
-
- Permission to use, copy, modify, and distribute this software for any
- purpose with or without fee is hereby granted, provided that the above
- copyright notice and this permission notice appear in all copies.
-
- 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.
-->
<!-- $Id: isc-docbook-html.xsl.in,v 1.2 2005/05/11 05:55:38 sra Exp $ -->
<!-- ISC customizations for Docbook-XSL HTML generator -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!-- Import the Docbook HTML stuff -->
<xsl:import href="@XSLT_DOCBOOK_STYLE_HTML@"/>
<!-- Readable HTML output, please -->
<xsl:output indent="yes"/>
<!-- ANSI C function prototypes, please -->
<xsl:param name="funcsynopsis.style">ansi</xsl:param>
<!-- Use ranges when constructing copyrights -->
<xsl:param name="make.year.ranges" select="1"/>
<!-- Include our copyright generator -->
<xsl:include href="copyright.xsl"/>
<!-- Set comment convention for this output format -->
<xsl:param name="isc.copyright.leader"> - </xsl:param>
<!-- Override Docbook template to insert copyright -->
<xsl:template name="user.preroot">
<xsl:comment>
<xsl:text>&#10;</xsl:text>
<xsl:value-of select="$isc.copyright"/>
</xsl:comment>
<xsl:text>&#10;</xsl:text>
</xsl:template>
</xsl:stylesheet>
<!--
- Local variables:
- mode: sgml
- End:
-->

View File

@@ -0,0 +1,82 @@
<!--
- Copyright (C) 2005 Internet Systems Consortium, Inc. ("ISC")
-
- Permission to use, copy, modify, and distribute this software for any
- purpose with or without fee is hereby granted, provided that the above
- copyright notice and this permission notice appear in all copies.
-
- 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.
-->
<!-- $Id: isc-docbook-latex.xsl.in,v 1.2 2005/05/11 05:55:38 sra Exp $ -->
<!-- ISC customizations for db2latex generator -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!-- Import the db2latex stuff -->
<xsl:import href="@XSLT_DB2LATEX_STYLE@"/>
<!-- Blank lines between paragraphs, please -->
<xsl:param name="latex.use.parskip" select="1"/>
<!-- Least bad current option for constructing tables -->
<xsl:param name="latex.use.ltxtable" select="1"/>
<xsl:param name="latex.use.longtable" select="1"/>
<!-- LaTeX2e documentclass options. -->
<xsl:param name="latex.documentclass.common" select="''"/>
<!-- This documentation is in English (or maybe Bad English) -->
<xsl:param name="latex.babel.language" select="'english'"/>
<xsl:param name="l10n.gentext.default.language" select="'en'"/>
<!-- Where to find "admonition" graphics -->
<xsl:param name="admon.graphics.path" select="'@XSLT_DB2LATEX_ADMONITIONS@'"/>
<!-- ANSI C function prototypes, please -->
<xsl:param name="funcsynopsis.style">ansi</xsl:param>
<!-- Patch around db2latex (0.8pre1) bug -->
<xsl:template match="copyright/year">
<xsl:apply-templates />
<xsl:if test="position() != last()">
<xsl:text>, </xsl:text>
</xsl:if>
</xsl:template>
<!-- Include our copyright generator -->
<xsl:include href="copyright.xsl"/>
<!-- Set comment convention for this output format -->
<xsl:param name="isc.copyright.leader">% </xsl:param>
<!-- Intercept top level to prepend copyright -->
<xsl:template match="/">
<xsl:value-of select="$isc.copyright"/>
<xsl:apply-imports/>
</xsl:template>
<!--
- Add support for multiple <para/> elements in a table entry.
- db2latex is already typesetting the table entry as a parbox,
- so we just have to insert the paragraph breaks.
-->
<xsl:template match="tbody/row/entry/para[position() != last()]">
<xsl:apply-imports/>
<xsl:text> \par </xsl:text>
</xsl:template>
</xsl:stylesheet>
<!--
- Local variables:
- mode: sgml
- End:
-->

131
doc/xsl/isc-manpage.xsl.in Normal file
View File

@@ -0,0 +1,131 @@
<!--
- Copyright (C) 2005 Internet Systems Consortium, Inc. ("ISC")
-
- Permission to use, copy, modify, and distribute this software for any
- purpose with or without fee is hereby granted, provided that the above
- copyright notice and this permission notice appear in all copies.
-
- 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.
-->
<!-- $Id: isc-manpage.xsl.in,v 1.2 2005/05/11 05:55:38 sra Exp $ -->
<!-- ISC customizations for Docbook-XSL manual page generator. -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!-- Import the Docbook manpages stuff -->
<xsl:import href="@XSLT_DOCBOOK_STYLE_MAN@"/>
<!-- Include our copyright generator -->
<xsl:include href="copyright.xsl"/>
<!-- Set comment string for this output format -->
<xsl:param name="isc.copyright.leader">.\" </xsl:param>
<!-- We're not writing any kind of SGML, thanks -->
<xsl:output method="text" encoding="us-ascii"/>
<!-- ANSI C function prototypes, please -->
<xsl:param name="funcsynopsis.style">ansi</xsl:param>
<!-- Use ranges when constructing copyrights -->
<xsl:param name="make.year.ranges" select="1"/>
<!-- Stuff we want in our nroff preamble. -->
<xsl:variable name="isc.nroff.preamble">
<xsl:text>.hy 0&#10;</xsl:text>
<xsl:text>.ad l&#10;</xsl:text>
</xsl:variable>
<!--
- Override Docbook template to insert our copyright,
- disable chunking, and suppress output of .so files.
-->
<xsl:template name="write.text.chunk">
<xsl:if test="substring($content, 1, 4) != '.so ' or
substring-after($content, '&#10;') != ''">
<xsl:call-template name="isc.no.blanks">
<xsl:with-param name="text" select="
concat($isc.copyright,
$isc.copyright.leader, '&#10;',
$isc.nroff.preamble,
$content)"/>
</xsl:call-template>
</xsl:if>
</xsl:template>
<!--
- Suppress blank lines in nroff source we output.
-->
<xsl:template name="isc.no.blanks">
<xsl:param name="text"/>
<xsl:choose>
<xsl:when test="contains($text, '&#10;')">
<xsl:call-template name="isc.no.blanks">
<xsl:with-param name="text"
select="substring-before($text, '&#10;')"/>
</xsl:call-template>
<xsl:call-template name="isc.no.blanks">
<xsl:with-param name="text"
select="substring-after($text, '&#10;')"/>
</xsl:call-template>
</xsl:when>
<xsl:when test="translate($text, '&#9;&#32;', '')">
<xsl:value-of select="$text"/>
<xsl:text>&#10;</xsl:text>
</xsl:when>
</xsl:choose>
</xsl:template>
<!--
- Override Docbook template to change formatting.
- We just want the element name in boldface, no subsection header.
-->
<xsl:template match="caution|important|note|tip|warning">
<xsl:text>&#10;.RS&#10;.B "</xsl:text>
<!-- capitalize word -->
<xsl:value-of
select="translate (substring (name(.), 1, 1), 'cintw', 'CINTW')" />
<xsl:value-of select="substring (name(), 2)" />
<xsl:if test="title">
<xsl:text>: </xsl:text>
<xsl:value-of select="title[1]"/>
</xsl:if>
<xsl:text>:"&#10;</xsl:text>
<xsl:apply-templates/>
<xsl:text>&#10;.RE&#10;</xsl:text>
</xsl:template>
<!--
- Override template to change formatting.
- We don't want hyphenation or justification.
-->
<xsl:template match="cmdsynopsis">
<xsl:text>.HP </xsl:text>
<xsl:value-of select="string-length (normalize-space (command)) + 1"/>
<xsl:text>&#10;</xsl:text>
<xsl:apply-templates/>
</xsl:template>
<!--
- Override template to change formatting.
- We don't want hyphenation or justification.
-->
<xsl:template match="funcsynopsis">
<xsl:apply-templates/>
</xsl:template>
</xsl:stylesheet>
<!--
- Local variables:
- mode: sgml
- End:
-->

55
doc/xsl/pre-latex.xsl Normal file
View File

@@ -0,0 +1,55 @@
<!--
- Copyright (C) 2005 Internet Systems Consortium, Inc. ("ISC")
-
- Permission to use, copy, modify, and distribute this software for any
- purpose with or without fee is hereby granted, provided that the above
- copyright notice and this permission notice appear in all copies.
-
- 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.
-->
<!-- $Id: pre-latex.xsl,v 1.2 2005/05/11 05:55:38 sra Exp $ -->
<!--
- Whack &mdash; into something that won't choke LaTeX.
- There's probably a better way to do this, but this will work for now.
-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:variable name="mdash" select="'&#8212;'"/>
<xsl:template name="fix-mdash" match="text()[contains(., $mdash)]">
<xsl:param name="s" select="."/>
<xsl:choose>
<xsl:when test="contains($s, $mdash)">
<xsl:value-of select="substring-before($s, $mdash)"/>
<xsl:text>---</xsl:text>
<xsl:call-template name="fix-mdash">
<xsl:with-param name="s" select="substring-after($s, $mdash)"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$s"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:copy-of select="@*"/>
<xsl:apply-templates/>
</xsl:copy>
</xsl:template>
<xsl:template match="/">
<xsl:apply-templates/>
</xsl:template>
</xsl:stylesheet>

View File

@@ -1,40 +0,0 @@
#!/bin/sh
#
# Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
# Copyright (C) 2001, 2002 Internet Software Consortium.
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# 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.
# $Id: docbook2man-wrapper.sh.in,v 1.5 2004/03/05 05:04:58 marka Exp $
case $# in
3) ;;
*) echo "$0: wrong number of arguments" >&2; exit 1 ;;
esac
top_srcdir=$1
source=$2
target=$3
ONSGMLS=onsgmls
SGMLSPL=sgmlspl
SGMLCATALOG=@SGMLCATALOG@
DOCBOOK2MANSPEC=@DOCBOOK2MANSPEC@
${ONSGMLS} -c ${SGMLCATALOG} $source | ${SGMLSPL} ${DOCBOOK2MANSPEC}
rm -f $target.tmp
grep -v 'auto-generated by docbook2man' $target > $target.tmp
rm -f $target
cat ${top_srcdir}/docutil/MAN_COPYRIGHT > $target
cat $target.tmp >> $target
rm -f manpage.* $target.tmp

View File

@@ -1,4 +1,6 @@
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.0//EN"
"http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd"
[<!ENTITY mdash "&#8212;">]>
<!--
- Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) 2000, 2001 Internet Software Consortium.
@@ -15,14 +17,13 @@
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- PERFORMANCE OF THIS SOFTWARE.
-->
<!-- $Id: lwres.docbook,v 1.5 2005/04/07 03:50:00 marka Exp $ -->
<!-- $Id: lwres.docbook,v 1.6 2005/05/11 05:55:39 sra Exp $ -->
<refentry>
<refentryinfo>
<refentryinfo>
<date>Jun 30, 2000</date>
</refentryinfo>
<refmeta>
<refentrytitle>lwres</refentrytitle>
<manvolnum>3</manvolnum>
@@ -33,6 +34,19 @@
<refpurpose>introduction to the lightweight resolver library</refpurpose>
</refnamediv>
<docinfo>
<copyright>
<year>2004</year>
<year>2005</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
<copyright>
<year>2000</year>
<year>2001</year>
<holder>Internet Software Consortium</holder>
</copyright>
</docinfo>
<refsynopsisdiv>
<funcsynopsis>
<funcsynopsisinfo>#include &lt;lwres/lwres.h&gt;</funcsynopsisinfo>
@@ -121,7 +135,8 @@ sequence of actions.
called <varname>pkt</varname> below.
</para>
<para>
(2) Set <structfield>pkt.recvlength</structfield> to the maximum length we will accept.
(2) Set <structfield>pkt.recvlength</structfield> 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>.
@@ -132,7 +147,8 @@ to a unique serial number. This value is echoed
back to the application by the remote server.
</para>
<para>
(4) Set <structfield>pkt.pktflags</structfield>. Usually this is set to 0.
(4) Set <structfield>pkt.pktflags</structfield>. Usually this is set to
0.
</para>
<para>
(5) Set <structfield>pkt.result</structfield> to 0.
@@ -166,7 +182,8 @@ following is typically involved in processing each request packet.
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
to the packet header's contents between uses. This method is
recommended
as it keeps the serial, opcode, and other fields correct.
</para>
<para>
@@ -179,7 +196,8 @@ as well as a data specific type, such as <type>lwres_gabnrequest_t</type>.
</para>
<para>
(3) Set the <structfield>pkt.result</structfield>,
<structfield>pkt.recvlength</structfield> as above. All other fields can
<structfield>pkt.recvlength</structfield> 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>,
<structfield>pkt.pktflags</structfield> will be set up
@@ -193,13 +211,11 @@ set.
<para>
(5) Send the resulting packet to the client.
</para>
<para>
</para>
<para></para>
</refsect1>
<refsect1>
<title>SEE ALSO</title>
<para>
<citerefentry>
<para><citerefentry>
<refentrytitle>lwres_gethostent</refentrytitle><manvolnum>3</manvolnum>
</citerefentry>,
@@ -241,4 +257,8 @@ set.
</para>
</refsect1>
</refentry>
</refentry><!--
- Local variables:
- mode: sgml
- End:
-->

View File

@@ -1,4 +1,6 @@
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.0//EN"
"http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd"
[<!ENTITY mdash "&#8212;">]>
<!--
- Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) 2000, 2001 Internet Software Consortium.
@@ -15,9 +17,7 @@
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- PERFORMANCE OF THIS SOFTWARE.
-->
<!-- $Id: lwres_buffer.docbook,v 1.5 2005/04/07 03:50:00 marka Exp $ -->
<!-- $Id: lwres_buffer.docbook,v 1.6 2005/05/11 05:55:39 sra Exp $ -->
<refentry>
<refentryinfo>
<date>Jun 30, 2000</date>
@@ -29,6 +29,19 @@
<refmiscinfo>BIND9</refmiscinfo>
</refmeta>
<docinfo>
<copyright>
<year>2004</year>
<year>2005</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
<copyright>
<year>2000</year>
<year>2001</year>
<holder>Internet Software Consortium</holder>
</copyright>
</docinfo>
<refnamediv>
<refname>lwres_buffer_init</refname>
<refname>lwres_buffer_invalidate</refname>
@@ -61,124 +74,124 @@
<funcdef>
void
<function>lwres_buffer_init</function></funcdef>
<paramdef>lwres_buffer_t *b</paramdef>
<paramdef>void *base</paramdef>
<paramdef>unsigned int length</paramdef>
<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 *b</paramdef>
<paramdef>lwres_buffer_t *<parameter>b</parameter></paramdef>
</funcprototype>
<funcprototype>
<funcdef>
void
<function>lwres_buffer_add</function></funcdef>
<paramdef>lwres_buffer_t *b</paramdef>
<paramdef>unsigned int n</paramdef>
<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 *b</paramdef>
<paramdef>unsigned int n</paramdef>
<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 *b</paramdef>
<paramdef>lwres_buffer_t *<parameter>b</parameter></paramdef>
</funcprototype>
<funcprototype>
<funcdef>
void
<function>lwres_buffer_first</function></funcdef>
<paramdef>lwres_buffer_t *b</paramdef>
<paramdef>lwres_buffer_t *<parameter>b</parameter></paramdef>
</funcprototype>
<funcprototype>
<funcdef>
void
<function>lwres_buffer_forward</function></funcdef>
<paramdef>lwres_buffer_t *b</paramdef>
<paramdef>unsigned int n</paramdef>
<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 *b</paramdef>
<paramdef>unsigned int n</paramdef>
<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 *b</paramdef>
<paramdef>lwres_buffer_t *<parameter>b</parameter></paramdef>
</funcprototype>
<funcprototype>
<funcdef>
void
<function>lwres_buffer_putuint8</function></funcdef>
<paramdef>lwres_buffer_t *b</paramdef>
<paramdef>lwres_uint8_t val</paramdef>
<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 *b</paramdef>
<paramdef>lwres_buffer_t *<parameter>b</parameter></paramdef>
</funcprototype>
<funcprototype>
<funcdef>
void
<function>lwres_buffer_putuint16</function></funcdef>
<paramdef>lwres_buffer_t *b</paramdef>
<paramdef>lwres_uint16_t val</paramdef>
<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 *b</paramdef>
<paramdef>lwres_buffer_t *<parameter>b</parameter></paramdef>
</funcprototype>
<funcprototype>
<funcdef>
void
<function>lwres_buffer_putuint32</function></funcdef>
<paramdef>lwres_buffer_t *b</paramdef>
<paramdef>lwres_uint32_t val</paramdef>
<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 *b</paramdef>
<paramdef>const unsigned char *base</paramdef>
<paramdef>unsigned int length</paramdef>
<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 *b</paramdef>
<paramdef>unsigned char *base</paramdef>
<paramdef>unsigned int length</paramdef>
<paramdef>lwres_buffer_t *<parameter>b</parameter></paramdef>
<paramdef>unsigned char *<parameter>base</parameter></paramdef>
<paramdef>unsigned int <parameter>length</parameter></paramdef>
</funcprototype>
</funcsynopsis>
@@ -214,14 +227,16 @@ The used region is further subdivided into two disjoint regions: the
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
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
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.
@@ -229,22 +244,24 @@ 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>
<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.
@@ -252,8 +269,7 @@ the active region will also be empty.
b-c == optional active region.
</programlisting>
</para>
<para>
<function>lwres_buffer_init()</function>
<para><function>lwres_buffer_init()</function>
initializes the
<type>lwres_buffer_t</type>
<parameter>*b</parameter>
@@ -262,10 +278,8 @@ and assocates it with the memory region of size
bytes starting at location
<parameter>base.</parameter>
</para>
<para>
<function>lwres_buffer_invalidate()</function>
marks the buffer
<parameter>*b</parameter>
<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>
@@ -298,16 +312,14 @@ and
<structfield>active</structfield>
to zero.
</para>
<para>
<function>lwres_buffer_first</function>
<para><function>lwres_buffer_first</function>
makes the consumed region of buffer
<parameter>*p</parameter>
empty by setting
<structfield>current</structfield>
to zero (the start of the buffer).
</para>
<para>
<function>lwres_buffer_forward()</function>
<para><function>lwres_buffer_forward()</function>
increases the consumed region of buffer
<parameter>*b</parameter>
by
@@ -321,8 +333,7 @@ consumed region by
<parameter>n</parameter>
bytes and checks for underflow.
</para>
<para>
<function>lwres_buffer_getuint8()</function>
<para><function>lwres_buffer_getuint8()</function>
reads an unsigned 8-bit integer from
<parameter>*b</parameter>
and returns it.
@@ -332,8 +343,7 @@ writes the unsigned 8-bit integer
to buffer
<parameter>*b</parameter>.
</para>
<para>
<function>lwres_buffer_getuint16()</function>
<para><function>lwres_buffer_getuint16()</function>
and
<function>lwres_buffer_getuint32()</function>
are identical to
@@ -375,4 +385,8 @@ to
<parameter>base</parameter>.
</para>
</refsect1>
</refentry>
</refentry><!--
- Local variables:
- mode: sgml
- End:
-->

View File

@@ -1,4 +1,6 @@
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.0//EN"
"http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd"
[<!ENTITY mdash "&#8212;">]>
<!--
- Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) 2000, 2001 Internet Software Consortium.
@@ -15,9 +17,7 @@
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- PERFORMANCE OF THIS SOFTWARE.
-->
<!-- $Id: lwres_config.docbook,v 1.4 2005/04/07 03:50:01 marka Exp $ -->
<!-- $Id: lwres_config.docbook,v 1.5 2005/05/11 05:55:39 sra Exp $ -->
<refentry>
<refentryinfo>
@@ -30,6 +30,19 @@
<refmiscinfo>BIND9</refmiscinfo>
</refmeta>
<docinfo>
<copyright>
<year>2004</year>
<year>2005</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
<copyright>
<year>2000</year>
<year>2001</year>
<holder>Internet Software Consortium</holder>
</copyright>
</docinfo>
<refnamediv>
<refname>lwres_conf_init</refname>
<refname>lwres_conf_clear</refname>
@@ -46,56 +59,56 @@
<funcdef>
void
<function>lwres_conf_init</function></funcdef>
<paramdef>lwres_context_t *ctx</paramdef>
<paramdef>lwres_context_t *<parameter>ctx</parameter></paramdef>
</funcprototype>
<funcprototype>
<funcdef>
void
<function>lwres_conf_clear</function></funcdef>
<paramdef>lwres_context_t *ctx</paramdef>
<paramdef>lwres_context_t *<parameter>ctx</parameter></paramdef>
</funcprototype>
<funcprototype>
<funcdef>
lwres_result_t
<function>lwres_conf_parse</function></funcdef>
<paramdef>lwres_context_t *ctx</paramdef>
<paramdef>const char *filename</paramdef>
<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 *ctx</paramdef>
<paramdef>FILE *fp</paramdef>
<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 *ctx</paramdef>
<paramdef>lwres_context_t *<parameter>ctx</parameter></paramdef>
</funcprototype>
</funcsynopsis>
</refsynopsisdiv>
<refsect1>
<title>DESCRIPTION</title>
<para>
<function>lwres_conf_init()</function>
<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>
<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>
<para><function>lwres_conf_parse()</function>
opens the file
<parameter>filename</parameter>
and parses it to initialise the resolver context
@@ -103,8 +116,8 @@ and parses it to initialise the resolver context
<type>lwres_conf_t</type>
structure.
</para>
<para>
<function>lwres_conf_print()</function>
<para><function>lwres_conf_print()</function>
prints the
<type>lwres_conf_t</type>
structure for resolver context
@@ -117,23 +130,19 @@ to the
<refsect1>
<title>RETURN VALUES</title>
<para>
<function>lwres_conf_parse()</function>
returns
<errorcode>LWRES_R_SUCCESS</errorcode>
<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>
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>
<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
@@ -142,18 +151,21 @@ If this happens, the function returns
</refsect1>
<refsect1>
<title>SEE ALSO</title>
<para>
<citerefentry>
<para><citerefentry>
<refentrytitle>stdio</refentrytitle><manvolnum>3</manvolnum>
</citerefentry>,
<citerefentry>
<refentrytitle>resolver</refentrytitle><manvolnum>5</manvolnum>
</citerefentry>.
</para>
</refsect1>
<refsect1>
<title>FILES</title>
<para>
<filename>/etc/resolv.conf</filename>
<para><filename>/etc/resolv.conf</filename>
</para>
</refsect1>
</refentry>
</refentry><!--
- Local variables:
- mode: sgml
- End:
-->

View File

@@ -1,4 +1,6 @@
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.0//EN"
"http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd"
[<!ENTITY mdash "&#8212;">]>
<!--
- Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) 2000, 2001, 2003 Internet Software Consortium.
@@ -15,20 +17,33 @@
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- PERFORMANCE OF THIS SOFTWARE.
-->
<!-- $Id: lwres_context.docbook,v 1.6 2005/04/07 03:50:01 marka Exp $ -->
<!-- $Id: lwres_context.docbook,v 1.7 2005/05/11 05:55:39 sra Exp $ -->
<refentry>
<refentryinfo>
<date>Jun 30, 2000</date>
</refentryinfo>
<refmeta>
<refentrytitle>lwres_context</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>BIND9</refmiscinfo>
</refmeta>
<docinfo>
<copyright>
<year>2004</year>
<year>2005</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
<copyright>
<year>2000</year>
<year>2001</year>
<year>2003</year>
<holder>Internet Software Consortium</holder>
</copyright>
</docinfo>
<refnamediv>
<refname>lwres_context_create</refname>
<refname>lwres_context_destroy</refname>
@@ -46,80 +61,71 @@
<funcdef>
lwres_result_t
<function>lwres_context_create</function></funcdef>
<paramdef>lwres_context_t **contextp</paramdef>
<paramdef>void *arg</paramdef>
<paramdef>lwres_malloc_t malloc_function</paramdef>
<paramdef>lwres_free_t free_function</paramdef>
<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 **contextp</paramdef>
<paramdef>lwres_context_t **<parameter>contextp</parameter></paramdef>
</funcprototype>
<funcprototype>
<funcdef>
void
<function>lwres_context_initserial</function></funcdef>
<paramdef>lwres_context_t *ctx</paramdef>
<paramdef>lwres_uint32_t serial</paramdef>
<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 *ctx</paramdef>
<paramdef>lwres_context_t *<parameter>ctx</parameter></paramdef>
</funcprototype>
<funcprototype>
<funcdef>
void
<function>lwres_context_freemem</function></funcdef>
<paramdef>lwres_context_t *ctx</paramdef>
<paramdef>void *mem</paramdef>
<paramdef>size_t len</paramdef>
<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 *ctx</paramdef>
<paramdef>size_t len</paramdef>
<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 *ctx</paramdef>
<paramdef>void *sendbase</paramdef>
<paramdef>int sendlen</paramdef>
<paramdef>void *recvbase</paramdef>
<paramdef>int recvlen</paramdef>
<paramdef>int *recvd_len</paramdef>
<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>
<refsect1>
<title>DESCRIPTION</title>
<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
<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
@@ -127,122 +133,92 @@ 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
.Xr malloc 3
<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.
<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>.
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><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
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
<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.
<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
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
<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>
</refsect1>
<refsect1>
<title>RETURN VALUES</title>
<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><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
@@ -250,8 +226,7 @@ Successful calls to the memory allocator
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>
<para><errorcode>LWRES_R_SUCCESS</errorcode>
is returned when
<function>lwres_context_sendrecv()</function>
completes successfully.
@@ -265,8 +240,7 @@ times out waiting for a response.
</refsect1>
<refsect1>
<title>SEE ALSO</title>
<para>
<citerefentry>
<para><citerefentry>
<refentrytitle>lwres_conf_init</refentrytitle><manvolnum>3</manvolnum>
</citerefentry>,
@@ -275,9 +249,12 @@ times out waiting for a response.
</citerefentry>,
<citerefentry>
<refentrytitle>free</refentrytitle><manvolnum>3
</manvolnum>
<refentrytitle>free</refentrytitle><manvolnum>3</manvolnum>
</citerefentry>.
</para>
</refsect1>
</refentry>
</refentry><!--
- Local variables:
- mode: sgml
- End:
-->

View File

@@ -1,4 +1,6 @@
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.0//EN"
"http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd"
[<!ENTITY mdash "&#8212;">]>
<!--
- Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) 2000, 2001 Internet Software Consortium.
@@ -15,20 +17,32 @@
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- PERFORMANCE OF THIS SOFTWARE.
-->
<!-- $Id: lwres_gabn.docbook,v 1.5 2005/04/07 03:50:01 marka Exp $ -->
<!-- $Id: lwres_gabn.docbook,v 1.6 2005/05/11 05:55:39 sra Exp $ -->
<refentry>
<refentryinfo>
<date>Jun 30, 2000</date>
</refentryinfo>
<refmeta>
<refentrytitle>lwres_gabn</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>BIND9</refmiscinfo>
</refmeta>
<docinfo>
<copyright>
<year>2004</year>
<year>2005</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
<copyright>
<year>2000</year>
<year>2001</year>
<holder>Internet Software Consortium</holder>
</copyright>
</docinfo>
<refnamediv>
<refname>lwres_gabnrequest_render</refname>
<refname>lwres_gabnresponse_render</refname>
@@ -45,51 +59,51 @@
<funcdef>
lwres_result_t
<function>lwres_gabnrequest_render</function></funcdef>
<paramdef>lwres_context_t *ctx</paramdef>
<paramdef>lwres_gabnrequest_t *req</paramdef>
<paramdef>lwres_lwpacket_t *pkt</paramdef>
<paramdef>lwres_buffer_t *b</paramdef>
<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 *ctx</paramdef>
<paramdef>lwres_gabnresponse_t *req</paramdef>
<paramdef>lwres_lwpacket_t *pkt</paramdef>
<paramdef>lwres_buffer_t *b</paramdef>
<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 *ctx</paramdef>
<paramdef>lwres_buffer_t *b</paramdef>
<paramdef>lwres_lwpacket_t *pkt</paramdef>
<paramdef>lwres_gabnrequest_t **structp</paramdef>
<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 *ctx</paramdef>
<paramdef>lwres_buffer_t *b</paramdef>
<paramdef>lwres_lwpacket_t *pkt</paramdef>
<paramdef>lwres_gabnresponse_t **structp</paramdef>
<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 *ctx</paramdef>
<paramdef>lwres_gabnresponse_t **structp</paramdef>
<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 *ctx</paramdef>
<paramdef>lwres_gabnrequest_t **structp</paramdef>
<paramdef>lwres_context_t *<parameter>ctx</parameter></paramdef>
<paramdef>lwres_gabnrequest_t **<parameter>structp</parameter></paramdef>
</funcprototype>
</funcsynopsis>
</refsynopsisdiv>
@@ -99,15 +113,16 @@ void
These are low-level routines for creating and parsing
lightweight resolver name-to-address lookup request and
response messages.
</para><para>
</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 lighweight 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;
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.
@@ -116,19 +131,26 @@ canonical format to a getaddrbyname response structure.
These structures are defined in
<filename>&lt;lwres/lwres.h&gt;</filename>.
They are shown below.
<programlisting>
</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;
@@ -143,66 +165,45 @@ typedef struct {
} 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><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
<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.
<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
<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.
Any memory associated with ancillary buffers and strings for
those structures is also discarded.
</para>
</refsect1>
<refsect1>
@@ -245,11 +246,13 @@ indicate that the packet is not a response to an earlier query.
</refsect1>
<refsect1>
<title>SEE ALSO</title>
<para>
<citerefentry>
<refentrytitle>lwres_packet</refentrytitle><manvolnum>3
</manvolnum>
<para><citerefentry>
<refentrytitle>lwres_packet</refentrytitle><manvolnum>3</manvolnum>
</citerefentry>
</para>
</refsect1>
</refentry>
</refentry><!--
- Local variables:
- mode: sgml
- End:
-->

View File

@@ -1,4 +1,6 @@
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.0//EN"
"http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd"
[<!ENTITY mdash "&#8212;">]>
<!--
- Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) 2000, 2001 Internet Software Consortium.
@@ -15,24 +17,37 @@
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- PERFORMANCE OF THIS SOFTWARE.
-->
<!-- $Id: lwres_gai_strerror.docbook,v 1.5 2005/04/07 03:50:02 marka Exp $ -->
<!-- $Id: lwres_gai_strerror.docbook,v 1.6 2005/05/11 05:55:40 sra Exp $ -->
<refentry>
<refentryinfo>
<date>Jun 30, 2000</date>
</refentryinfo>
<refmeta>
<refentrytitle>lwres_gai_strerror</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>BIND9</refmiscinfo>
</refmeta>
<docinfo>
<copyright>
<year>2004</year>
<year>2005</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
<copyright>
<year>2000</year>
<year>2001</year>
<holder>Internet Software Consortium</holder>
</copyright>
</docinfo>
<refnamediv>
<refname>gai_strerror</refname>
<refname>lwres_gai_strerror</refname>
<refpurpose>print suitable error string</refpurpose>
</refnamediv>
<refsynopsisdiv>
<funcsynopsis>
<funcsynopsisinfo>#include &lt;lwres/netdb.h&gt;</funcsynopsisinfo>
@@ -40,94 +55,113 @@
<funcdef>
char *
<function>gai_strerror</function></funcdef>
<paramdef>int ecode</paramdef>
<paramdef>int <parameter>ecode</parameter></paramdef>
</funcprototype>
</funcsynopsis>
</refsynopsisdiv>
<refsect1>
<title>DESCRIPTION</title>
<para>
<function>lwres_gai_strerror()</function>
<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>
<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>
</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>
</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>
</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>
</varlistentry>
<varlistentry>
<term><errorcode>EAI_FAMILY</errorcode></term>
<listitem>
<para>
<constant>ai_family</constant> not supported
<para><constant>ai_family</constant> not supported
</para>
</listitem></varlistentry>
<varlistentry><term><errorcode>EAI_MEMORY</errorcode></term>
</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>
</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>
</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>
</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>
</varlistentry>
<varlistentry>
<term><errorcode>EAI_SOCKTYPE</errorcode></term>
<listitem>
<para>
<constant>ai_socktype</constant> not supported
<para><constant>ai_socktype</constant> not supported
</para>
</listitem></varlistentry>
<varlistentry><term><errorcode>EAI_SYSTEM</errorcode></term>
</listitem>
</varlistentry>
<varlistentry>
<term><errorcode>EAI_SYSTEM</errorcode></term>
<listitem>
<para>
system error returned in errno
</para>
</listitem></varlistentry>
</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>,
<para><constant>ai_flags</constant>,
<constant>ai_family</constant>
and
<constant>ai_socktype</constant>
@@ -140,8 +174,7 @@ used by
<refsect1>
<title>SEE ALSO</title>
<para>
<citerefentry>
<para><citerefentry>
<refentrytitle>strerror</refentrytitle><manvolnum>3</manvolnum>
</citerefentry>,
@@ -158,4 +191,8 @@ used by
</citerefentry>.
</para>
</refsect1>
</refentry>
</refentry><!--
- Local variables:
- mode: sgml
- End:
-->

View File

@@ -1,4 +1,6 @@
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.0//EN"
"http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd"
[<!ENTITY mdash "&#8212;">]>
<!--
- Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) 2000, 2001, 2003 Internet Software Consortium.
@@ -15,9 +17,7 @@
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- PERFORMANCE OF THIS SOFTWARE.
-->
<!-- $Id: lwres_getaddrinfo.docbook,v 1.8 2005/04/07 03:50:02 marka Exp $ -->
<!-- $Id: lwres_getaddrinfo.docbook,v 1.9 2005/05/11 05:55:40 sra Exp $ -->
<refentry>
<refentryinfo>
@@ -30,6 +30,20 @@
<refmiscinfo>BIND9</refmiscinfo>
</refmeta>
<docinfo>
<copyright>
<year>2004</year>
<year>2005</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
<copyright>
<year>2000</year>
<year>2001</year>
<year>2003</year>
<holder>Internet Software Consortium</holder>
</copyright>
</docinfo>
<refnamediv>
<refname>lwres_getaddrinfo</refname>
<refname>lwres_freeaddrinfo</refname>
@@ -42,16 +56,16 @@
<funcdef>
int
<function>lwres_getaddrinfo</function></funcdef>
<paramdef>const char *hostname</paramdef>
<paramdef>const char *servname</paramdef>
<paramdef>const struct addrinfo *hints</paramdef>
<paramdef>struct addrinfo **res</paramdef>
<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 *ai</paramdef>
<paramdef>struct addrinfo *<parameter>ai</parameter></paramdef>
</funcprototype>
</funcsynopsis>
@@ -59,8 +73,8 @@ void
If the operating system does not provide a
<type>struct addrinfo</type>,
the following structure is used:
<programlisting>
</para>
<para><programlisting>
struct addrinfo {
int ai_flags; /* AI_PASSIVE, AI_CANONNAME */
int ai_family; /* PF_xxx */
@@ -78,52 +92,52 @@ struct addrinfo {
<refsect1>
<title>DESCRIPTION</title>
<para>
<function>lwres_getaddrinfo()</function>
<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>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>.
<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
<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>
<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
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>
<varlistentry>
<term><constant>ai_family</constant></term>
<listitem>
<para>The protocol family that should be used.
<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
it means the caller will accept any protocol family supported by
the
operating system.
</para></listitem></varlistentry>
<varlistentry><term><constant>ai_socktype</constant></term>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><constant>ai_socktype</constant></term>
<listitem>
<para>
denotes the type of socket &mdash;
@@ -138,7 +152,8 @@ is zero the caller will accept any socket type.
</para>
</listitem>
</varlistentry>
<varlistentry><term><constant>ai_protocol</constant></term>
<varlistentry>
<term><constant>ai_protocol</constant></term>
<listitem>
<para>
indicates which transport protocol is wanted: IPPROTO_UDP or
@@ -149,7 +164,8 @@ is zero the caller will accept any protocol.
</para>
</listitem>
</varlistentry>
<varlistentry><term><constant>ai_flags</constant></term>
<varlistentry>
<term><constant>ai_flags</constant></term>
<listitem>
<para>
Flag bits.
@@ -157,7 +173,8 @@ 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
will return a null-terminated string containing the canonical
name
of the specified hostname in
<constant>ai_canonname</constant>
of the first
@@ -165,7 +182,8 @@ of the first
structure returned.
Setting the
<type>AI_PASSIVE</type>
bit indicates that the returned socket address structure is intended
bit indicates that the returned socket address structure is
intended
for used in a call to
<citerefentry>
<refentrytitle>bind</refentrytitle><manvolnum>2</manvolnum>
@@ -188,8 +206,7 @@ does not set the
bit, the returned socket address structure will be ready
for use in a call to
<citerefentry>
<refentrytitle>connect</refentrytitle><manvolnum>2
</manvolnum>
<refentrytitle>connect</refentrytitle><manvolnum>2</manvolnum>
</citerefentry>
for a connection-oriented protocol or
<citerefentry>
@@ -202,8 +219,7 @@ for a connection-oriented protocol or
or
<citerefentry>
<refentrytitle>sendmsg</refentrytitle><manvolnum>2
</manvolnum>
<refentrytitle>sendmsg</refentrytitle><manvolnum>2</manvolnum>
</citerefentry>
if a connectionless protocol was chosen.
The IP address portion of the socket address structure will be
@@ -223,7 +239,8 @@ 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
should be treated as a numeric string defining an IPv4 or IPv6
address
and no name resolution should be attempted.
</para>
</listitem>
@@ -237,7 +254,8 @@ via <parameter>hints</parameter> must be zero.
</para>
<para>
A <parameter>hints</parameter> of <type>NULL</type> is treated as if
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>.
@@ -300,30 +318,21 @@ created by a call to
<refsect1>
<title>RETURN VALUES</title>
<para>
<function>lwres_getaddrinfo()</function>
<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>
<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
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>
</refsect1>
<refsect1>
<title>SEE ALSO</title>
<para>
<citerefentry>
<para><citerefentry>
<refentrytitle>lwres</refentrytitle><manvolnum>3</manvolnum>
</citerefentry>,
@@ -369,4 +378,8 @@ returns
</para>
</refsect1>
</refentry>
</refentry><!--
- Local variables:
- mode: sgml
- End:
-->

View File

@@ -1,6 +1,8 @@
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.0//EN"
"http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd"
[<!ENTITY mdash "&#8212;">]>
<!--
- Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) 2001 Internet Software Consortium.
-
- Permission to use, copy, modify, and distribute this software for any
@@ -15,9 +17,7 @@
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- PERFORMANCE OF THIS SOFTWARE.
-->
<!-- $Id: lwres_gethostent.docbook,v 1.6 2004/03/05 05:12:56 marka Exp $ -->
<!-- $Id: lwres_gethostent.docbook,v 1.7 2005/05/11 05:55:40 sra Exp $ -->
<refentry>
<refentryinfo>
@@ -30,6 +30,18 @@
<refmiscinfo>BIND9</refmiscinfo>
</refmeta>
<docinfo>
<copyright>
<year>2004</year>
<year>2005</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
<copyright>
<year>2001</year>
<holder>Internet Software Consortium</holder>
</copyright>
</docinfo>
<refnamediv>
<refname>lwres_gethostbyname</refname>
<refname>lwres_gethostbyname2</refname>
@@ -51,22 +63,22 @@
<funcdef>
struct hostent *
<function>lwres_gethostbyname</function></funcdef>
<paramdef>const char *name</paramdef>
<paramdef>const char *<parameter>name</parameter></paramdef>
</funcprototype>
<funcprototype>
<funcdef>
struct hostent *
<function>lwres_gethostbyname2</function></funcdef>
<paramdef>const char *name</paramdef>
<paramdef>int af</paramdef>
<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 *addr</paramdef>
<paramdef>int len</paramdef>
<paramdef>int type</paramdef>
<paramdef>const char *<parameter>addr</parameter></paramdef>
<paramdef>int <parameter>len</parameter></paramdef>
<paramdef>int <parameter>type</parameter></paramdef>
</funcprototype>
<funcprototype>
<funcdef>
@@ -78,7 +90,7 @@ struct hostent *
<funcdef>
void
<function>lwres_sethostent</function></funcdef>
<paramdef>int stayopen</paramdef>
<paramdef>int <parameter>stayopen</parameter></paramdef>
</funcprototype>
<funcprototype>
<funcdef>
@@ -90,38 +102,38 @@ void
<funcdef>
struct hostent *
<function>lwres_gethostbyname_r</function></funcdef>
<paramdef>const char *name</paramdef>
<paramdef>struct hostent *resbuf</paramdef>
<paramdef>char *buf</paramdef>
<paramdef>int buflen</paramdef>
<paramdef>int *error</paramdef>
<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 *addr</paramdef>
<paramdef>int len</paramdef>
<paramdef>int type</paramdef>
<paramdef>struct hostent *resbuf</paramdef>
<paramdef>char *buf</paramdef>
<paramdef>int buflen</paramdef>
<paramdef>int *error</paramdef>
<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 *resbuf</paramdef>
<paramdef>char *buf</paramdef>
<paramdef>int buflen</paramdef>
<paramdef>int *error</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>
void
<function>lwres_sethostent_r</function></funcdef>
<paramdef>int stayopen</paramdef>
<paramdef>int <parameter>stayopen</parameter></paramdef>
</funcprototype>
<funcprototype>
<funcdef>
@@ -139,16 +151,15 @@ 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>
<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>.
<programlisting>
</para>
<para><programlisting>
struct hostent {
char *h_name; /* official name of host */
char **h_aliases; /* alias list */
@@ -162,19 +173,25 @@ struct hostent {
<para>
The members of this structure are:
<variablelist>
<varlistentry><term><constant>h_name</constant></term>
<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>
</varlistentry>
<varlistentry>
<term><constant>h_aliases</constant></term>
<listitem>
<para>
A NULL-terminated array of alternate names (nicknames) for the host.
A NULL-terminated array of alternate names (nicknames) for the
host.
</para>
</listitem></varlistentry>
<varlistentry><term><constant>h_addrtype</constant></term>
</listitem>
</varlistentry>
<varlistentry>
<term><constant>h_addrtype</constant></term>
<listitem>
<para>
The type of address being returned &mdash;
@@ -182,21 +199,26 @@ The type of address being returned &mdash;
or
<type>PF_INET6</type>.
</para>
</listitem></varlistentry>
<varlistentry><term><constant>h_length</constant></term>
</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>
</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>
</listitem>
</varlistentry>
</variablelist>
</para>
<para>
@@ -205,8 +227,7 @@ For backward compatibility with very old software,
is the first address in
<constant>h_addr_list.</constant>
</para>
<para>
<function>lwres_gethostent()</function>,
<para><function>lwres_gethostent()</function>,
<function>lwres_sethostent()</function>,
<function>lwres_endhostent()</function>,
<function>lwres_gethostent_r()</function>,
@@ -221,15 +242,15 @@ 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
<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
@@ -243,39 +264,42 @@ Reverse lookups of addresses are performed by
<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
<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
<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>.
<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
<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
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
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
<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
<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>
@@ -297,26 +321,33 @@ 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>
<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>
</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>
</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>
</varlistentry>
<varlistentry>
<term><constant>NO_DATA</constant></term>
<listitem>
<para>
The name exists, but has no address information
@@ -325,46 +356,43 @@ of a reverse lookup). The code NO_ADDRESS
is accepted as a synonym for NO_DATA for backwards
compatibility.
</para>
</listitem></varlistentry>
</listitem>
</varlistentry>
</variablelist>
</para>
<para>
<citerefentry>
<refentrytitle>lwres_hstrerror</refentrytitle><manvolnum>3
</manvolnum>
<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><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
<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
<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
<function>lwres_gethostbyaddr_r()</function> set the global
variable
<type>errno</type> to <errorcode>ERANGE</errorcode>.
</para>
</refsect1>
<refsect1>
<title>SEE ALSO</title>
<para>
<citerefentry>
<para><citerefentry>
<refentrytitle>gethostent</refentrytitle><manvolnum>3</manvolnum>
</citerefentry>,
@@ -373,16 +401,14 @@ hostent</type>. If <parameter>buf</parameter> was too small, both
</citerefentry>,
<citerefentry>
<refentrytitle>lwres_hstrerror</refentrytitle><manvolnum>3
</manvolnum>
<refentrytitle>lwres_hstrerror</refentrytitle><manvolnum>3</manvolnum>
</citerefentry>
</para>
</refsect1>
<refsect1>
<title>BUGS</title>
<para>
<function>lwres_gethostbyname()</function>,
<para><function>lwres_gethostbyname()</function>,
<function>lwres_gethostbyname2()</function>,
<function>lwres_gethostbyaddr()</function>
and
@@ -404,4 +430,8 @@ or
consequently the above functions don't, either.
</para>
</refsect1>
</refentry>
</refentry><!--
- Local variables:
- mode: sgml
- End:
-->

View File

@@ -1,4 +1,6 @@
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.0//EN"
"http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd"
[<!ENTITY mdash "&#8212;">]>
<!--
- Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) 2000, 2001, 2003 Internet Software Consortium.
@@ -15,9 +17,7 @@
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- PERFORMANCE OF THIS SOFTWARE.
-->
<!-- $Id: lwres_getipnode.docbook,v 1.7 2005/04/07 03:50:02 marka Exp $ -->
<!-- $Id: lwres_getipnode.docbook,v 1.8 2005/05/11 05:55:40 sra Exp $ -->
<refentry>
<refentryinfo>
@@ -30,6 +30,20 @@
<refmiscinfo>BIND9</refmiscinfo>
</refmeta>
<docinfo>
<copyright>
<year>2004</year>
<year>2005</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
<copyright>
<year>2000</year>
<year>2001</year>
<year>2003</year>
<holder>Internet Software Consortium</holder>
</copyright>
</docinfo>
<refnamediv>
<refname>lwres_getipnodebyname</refname>
<refname>lwres_getipnodebyaddr</refname>
@@ -43,25 +57,25 @@
<funcdef>
struct hostent *
<function>lwres_getipnodebyname</function></funcdef>
<paramdef>const char *name</paramdef>
<paramdef>int af</paramdef>
<paramdef>int flags</paramdef>
<paramdef>int *error_num</paramdef>
<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 *src</paramdef>
<paramdef>size_t len</paramdef>
<paramdef>int af</paramdef>
<paramdef>int *error_num</paramdef>
<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 *he</paramdef>
<paramdef>struct hostent *<parameter>he</parameter></paramdef>
</funcprototype>
</funcsynopsis>
</refsynopsisdiv>
@@ -80,7 +94,8 @@ They use a
<type>struct hostent</type>
which is defined in
<filename>namedb.h</filename>:
<programlisting>
</para>
<para><programlisting>
struct hostent {
char *h_name; /* official name of host */
char **h_aliases; /* alias list */
@@ -95,19 +110,25 @@ struct hostent {
<para>
The members of this structure are:
<variablelist>
<varlistentry><term><constant>h_name</constant></term>
<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>
</varlistentry>
<varlistentry>
<term><constant>h_aliases</constant></term>
<listitem>
<para>
A NULL-terminated array of alternate names (nicknames) for the host.
A NULL-terminated array of alternate names (nicknames) for the
host.
</para>
</listitem></varlistentry>
<varlistentry><term><constant>h_addrtype</constant></term>
</listitem>
</varlistentry>
<varlistentry>
<term><constant>h_addrtype</constant></term>
<listitem>
<para>
The type of address being returned - usually
@@ -116,14 +137,18 @@ or
<type>PF_INET6</type>.
</para>
</listitem></varlistentry>
<varlistentry><term><constant>h_length</constant></term>
</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>
</varlistentry>
<varlistentry>
<term><constant>h_addr_list</constant></term>
<listitem>
<para>
A
@@ -131,52 +156,57 @@ A
terminated array of network addresses for the host.
Host addresses are returned in network byte order.
</para>
</listitem></varlistentry>
</listitem>
</varlistentry>
</variablelist>
</para>
<para>
<function>lwres_getipnodebyname()</function>
looks up addresses of protocol family
<parameter>af</parameter>
for the hostname
<parameter>name</parameter>.
<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:
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>
<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
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>
</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
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>
</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>
</varlistentry>
<varlistentry>
<term><constant>AI_DEFAULT</constant></term>
<listitem>
<para>
This default sets the
@@ -185,41 +215,24 @@ and
<constant>AI_ADDRCONFIG</constant>
flag bits.
</para>
</listitem></varlistentry>
</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><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><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>
</refsect1>
<refsect1>
@@ -237,49 +250,54 @@ 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>
<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>
</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>
</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>
</varlistentry>
<varlistentry>
<term><constant>NO_RECOVERY</constant></term>
<listitem>
<para>
An unexpected failure occurred, and retrying the request
is pointless.
</para>
</listitem></varlistentry>
</listitem>
</varlistentry>
</variablelist>
</para>
<para>
<citerefentry>
<refentrytitle>lwres_hstrerror</refentrytitle><manvolnum>3
</manvolnum>
<para><citerefentry>
<refentrytitle>lwres_hstrerror</refentrytitle><manvolnum>3</manvolnum>
</citerefentry>
translates these error codes to suitable error messages.
</para>
</refsect1>
<refsect1>
<title>SEE ALSO</title>
<para>
<citerefentry>
<para><citerefentry>
<refentrytitle>RFC2553</refentrytitle>
</citerefentry>,
@@ -304,4 +322,8 @@ translates these error codes to suitable error messages.
</citerefentry>.
</para>
</refsect1>
</refentry>
</refentry><!--
- Local variables:
- mode: sgml
- End:
-->

View File

@@ -1,4 +1,6 @@
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.0//EN"
"http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd"
[<!ENTITY mdash "&#8212;">]>
<!--
- Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) 2000, 2001 Internet Software Consortium.
@@ -15,9 +17,7 @@
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- PERFORMANCE OF THIS SOFTWARE.
-->
<!-- $Id: lwres_getnameinfo.docbook,v 1.5 2005/04/07 03:50:02 marka Exp $ -->
<!-- $Id: lwres_getnameinfo.docbook,v 1.6 2005/05/11 05:55:40 sra Exp $ -->
<refentry>
<refentryinfo>
@@ -30,9 +30,24 @@
<refmiscinfo>BIND9</refmiscinfo>
</refmeta>
<docinfo>
<copyright>
<year>2004</year>
<year>2005</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
<copyright>
<year>2000</year>
<year>2001</year>
<holder>Internet Software Consortium</holder>
</copyright>
</docinfo>
<refnamediv>
<refname>lwres_getnameinfo</refname>
<refpurpose>lightweight resolver socket address structure to hostname and service name</refpurpose>
<refpurpose>lightweight resolver socket address structure to hostname and
service name
</refpurpose>
</refnamediv>
<refsynopsisdiv>
<funcsynopsis>
@@ -41,13 +56,13 @@
<funcdef>
int
<function>lwres_getnameinfo</function></funcdef>
<paramdef>const struct sockaddr *sa</paramdef>
<paramdef>size_t salen</paramdef>
<paramdef>char *host</paramdef>
<paramdef>size_t hostlen</paramdef>
<paramdef>char *serv</paramdef>
<paramdef>size_t servlen</paramdef>
<paramdef>int flags</paramdef>
<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>
@@ -55,74 +70,103 @@ int
<refsect1>
<title>DESCRIPTION</title>
<para> This function is equivalent to the <citerefentry>
<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
<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>
<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.
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
<para>
The <parameter>flags</parameter> argument sets the
following
bits:
<variablelist>
<varlistentry><term><constant>NI_NOFQDN</constant></term>
<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>
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>
</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
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>
</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>
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
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>
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1>
<title>RETURN VALUES</title>
<para>
<function>lwres_getnameinfo()</function>
<para><function>lwres_getnameinfo()</function>
returns 0 on success or a non-zero error code if an error occurs.
</para>
</refsect1>
<refsect1>
<title>SEE ALSO</title>
<para>
<citerefentry>
<para><citerefentry>
<refentrytitle>RFC2133</refentrytitle>
</citerefentry>,
<citerefentry>
@@ -140,6 +184,7 @@ returns 0 on success or a non-zero error code if an error occurs.
<citerefentry>
<refentrytitle>lwres_net_ntop</refentrytitle><manvolnum>3</manvolnum>
</citerefentry>.
</para>
</refsect1>
<refsect1>
<title>BUGS</title>
@@ -151,4 +196,8 @@ RFC2133 fails to define what the nonzero return values of
are.
</para>
</refsect1>
</refentry>
</refentry><!--
- Local variables:
- mode: sgml
- End:
-->

View File

@@ -1,4 +1,6 @@
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.0//EN"
"http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd"
[<!ENTITY mdash "&#8212;">]>
<!--
- Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) 2000, 2001 Internet Software Consortium.
@@ -15,20 +17,32 @@
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- PERFORMANCE OF THIS SOFTWARE.
-->
<!-- $Id: lwres_getrrsetbyname.docbook,v 1.5 2005/04/07 03:50:03 marka Exp $ -->
<!-- $Id: lwres_getrrsetbyname.docbook,v 1.6 2005/05/11 05:55:40 sra Exp $ -->
<refentry>
<refentryinfo>
<date>Oct 18, 2000</date>
</refentryinfo>
<refmeta>
<refentrytitle>lwres_getrrsetbyname</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>BIND9</refmiscinfo>
</refmeta>
<docinfo>
<copyright>
<year>2004</year>
<year>2005</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
<copyright>
<year>2000</year>
<year>2001</year>
<holder>Internet Software Consortium</holder>
</copyright>
</docinfo>
<refnamediv>
<refname>lwres_getrrsetbyname</refname>
<refname>lwres_freerrset</refname>
@@ -41,28 +55,31 @@
<funcdef>
int
<function>lwres_getrrsetbyname</function></funcdef>
<paramdef>const char *hostname</paramdef>
<paramdef>unsigned int rdclass</paramdef>
<paramdef>unsigned int rdtype</paramdef>
<paramdef>unsigned int flags</paramdef>
<paramdef>struct rrsetinfo **res</paramdef>
<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 *rrset</paramdef>
<paramdef>struct rrsetinfo *<parameter>rrset</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<para>
The following structures are used:
<programlisting>
</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 */
@@ -80,117 +97,110 @@ struct rrsetinfo {
<refsect1>
<title>DESCRIPTION</title>
<para>
<function>lwres_getrrsetbyname()</function>
<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.
<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.
<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
<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
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
<parameter>rrset</parameter> is a pointer to a <type>struct
rrset</type> created by a call to
<function>lwres_getrrsetbyname()</function>.
</para>
<para>
</para>
<para></para>
</refsect1>
<refsect1>
<title>RETURN VALUES</title>
<para>
<function>lwres_getrrsetbyname()</function>
returns zero on success, and one of the following error
codes if an error occurred:
<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>
<varlistentry>
<term><constant>ERRSET_NONAME</constant></term>
<listitem>
<para>
the name does not exist
</para></listitem></varlistentry>
</para>
</listitem>
</varlistentry>
<varlistentry><term><constant>ERRSET_NODATA</constant></term>
<listitem><para>
<varlistentry>
<term><constant>ERRSET_NODATA</constant></term>
<listitem>
<para>
the name exists, but does not have data of the desired type
</para></listitem></varlistentry>
</para>
</listitem>
</varlistentry>
<varlistentry><term><constant>ERRSET_NOMEMORY</constant></term>
<listitem><para>
<varlistentry>
<term><constant>ERRSET_NOMEMORY</constant></term>
<listitem>
<para>
memory could not be allocated
</para></listitem></varlistentry>
</para>
</listitem>
</varlistentry>
<varlistentry><term><constant>ERRSET_INVAL</constant></term>
<listitem><para>
<varlistentry>
<term><constant>ERRSET_INVAL</constant></term>
<listitem>
<para>
a parameter is invalid
</para></listitem></varlistentry>
</para>
</listitem>
</varlistentry>
<varlistentry><term><constant>ERRSET_FAIL</constant></term>
<listitem><para>
<varlistentry>
<term><constant>ERRSET_FAIL</constant></term>
<listitem>
<para>
other failure
</para></listitem></varlistentry>
</para>
</listitem>
</varlistentry>
<varlistentry><term><constant></constant></term>
<listitem><para>
</para></listitem></varlistentry>
<varlistentry>
<term><constant/></term>
<listitem>
<para></para>
</listitem>
</varlistentry>
</variablelist>
@@ -198,11 +208,14 @@ other failure
</refsect1>
<refsect1>
<title>SEE ALSO</title>
<para>
<citerefentry>
<para><citerefentry>
<refentrytitle>lwres</refentrytitle><manvolnum>3</manvolnum>
</citerefentry>.
</para>
</refsect1>
</refentry>
</refentry><!--
- Local variables:
- mode: sgml
- End:
-->

View File

@@ -1,4 +1,6 @@
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.0//EN"
"http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd"
[<!ENTITY mdash "&#8212;">]>
<!--
- Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) 2000, 2001 Internet Software Consortium.
@@ -15,9 +17,7 @@
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- PERFORMANCE OF THIS SOFTWARE.
-->
<!-- $Id: lwres_gnba.docbook,v 1.6 2005/04/07 03:50:03 marka Exp $ -->
<!-- $Id: lwres_gnba.docbook,v 1.7 2005/05/11 05:55:40 sra Exp $ -->
<refentry>
<refentryinfo>
@@ -30,6 +30,19 @@
<refmiscinfo>BIND9</refmiscinfo>
</refmeta>
<docinfo>
<copyright>
<year>2004</year>
<year>2005</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
<copyright>
<year>2000</year>
<year>2001</year>
<holder>Internet Software Consortium</holder>
</copyright>
</docinfo>
<refnamediv>
<refname>lwres_gnbarequest_render</refname>
<refname>lwres_gnbaresponse_render</refname>
@@ -63,28 +76,28 @@ lwres_result_t
lwres_result_t
<function>lwres_gnbaresponse_render</function>
</funcdef>
<paramdef>lwres_context_t *ctx</paramdef>
<paramdef>lwres_gnbaresponse_t *req</paramdef>
<paramdef>lwres_lwpacket_t *pkt</paramdef>
<paramdef>lwres_buffer_t *b</paramdef>
<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 *ctx</paramdef>
<paramdef>lwres_buffer_t *b</paramdef>
<paramdef>lwres_lwpacket_t *pkt</paramdef>
<paramdef>lwres_gnbarequest_t **structp</paramdef>
<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 *ctx</paramdef>
<paramdef>lwres_buffer_t *b</paramdef>
<paramdef>lwres_lwpacket_t *pkt</paramdef>
<paramdef>lwres_gnbaresponse_t **structp</paramdef>
<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>
@@ -92,15 +105,15 @@ lwres_result_t
void
<function>lwres_gnbaresponse_free</function>
</funcdef>
<paramdef>lwres_context_t *ctx</paramdef>
<paramdef>lwres_gnbaresponse_t **structp</paramdef>
<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 *ctx</paramdef>
<paramdef>lwres_gnbarequest_t **structp</paramdef>
<paramdef>lwres_context_t *<parameter>ctx</parameter></paramdef>
<paramdef>lwres_gnbarequest_t **<parameter>structp</parameter></paramdef>
</funcprototype>
</funcsynopsis>
@@ -120,7 +133,8 @@ One render function converts a getnamebyaddr request structure &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;
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
@@ -130,14 +144,19 @@ canonical format to a getnamebyaddr response structure.
These structures are defined in
<filename>lwres/lwres.h</filename>.
They are shown below.
<programlisting>
</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;
@@ -150,65 +169,44 @@ typedef struct {
} 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>
<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.
<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
<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.
<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><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>
</refsect1>
<refsect1>
<title>RETURN VALUES</title>
<para>
@@ -249,11 +247,13 @@ indicate that the packet is not a response to an earlier query.
</refsect1>
<refsect1>
<title>SEE ALSO</title>
<para>
<citerefentry>
<refentrytitle>lwres_packet</refentrytitle>
<manvolnum>3</manvolnum>
<para><citerefentry>
<refentrytitle>lwres_packet</refentrytitle><manvolnum>3</manvolnum>
</citerefentry>.
</para>
</refsect1>
</refentry>
</refentry><!--
- Local variables:
- mode: sgml
- End:
-->

View File

@@ -1,4 +1,6 @@
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.0//EN"
"http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd"
[<!ENTITY mdash "&#8212;">]>
<!--
- Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) 2000, 2001 Internet Software Consortium.
@@ -15,9 +17,7 @@
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- PERFORMANCE OF THIS SOFTWARE.
-->
<!-- $Id: lwres_hstrerror.docbook,v 1.6 2005/04/07 03:50:03 marka Exp $ -->
<!-- $Id: lwres_hstrerror.docbook,v 1.7 2005/05/11 05:55:40 sra Exp $ -->
<refentry>
<refentryinfo>
@@ -30,6 +30,19 @@
<refmiscinfo>BIND9</refmiscinfo>
</refmeta>
<docinfo>
<copyright>
<year>2004</year>
<year>2005</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
<copyright>
<year>2000</year>
<year>2001</year>
<holder>Internet Software Consortium</holder>
</copyright>
</docinfo>
<refnamediv>
<refname>lwres_herror</refname>
<refname>lwres_hstrerror</refname>
@@ -42,13 +55,13 @@
<funcdef>
void
<function>lwres_herror</function></funcdef>
<paramdef>const char *s</paramdef>
<paramdef>const char *<parameter>s</parameter></paramdef>
</funcprototype>
<funcprototype>
<funcdef>
const char *
<function>lwres_hstrerror</function></funcdef>
<paramdef>int err</paramdef>
<paramdef>int <parameter>err</parameter></paramdef>
</funcprototype>
</funcsynopsis>
</refsynopsisdiv>
@@ -56,44 +69,54 @@ const char *
<refsect1>
<title>DESCRIPTION</title>
<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><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:
<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>
<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>
<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>
<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>
<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>
<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>
<para><errorname>No address associated with name</errorname>
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
@@ -110,8 +133,7 @@ is not a valid error code.
</refsect1>
<refsect1>
<title>SEE ALSO</title>
<para>
<citerefentry>
<para><citerefentry>
<refentrytitle>herror</refentrytitle><manvolnum>3</manvolnum>
</citerefentry>,
@@ -121,4 +143,8 @@ is not a valid error code.
</para>
</refsect1>
</refentry>
</refentry><!--
- Local variables:
- mode: sgml
- End:
-->

View File

@@ -1,4 +1,6 @@
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.0//EN"
"http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd"
[<!ENTITY mdash "&#8212;">]>
<!--
- Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) 2000, 2001 Internet Software Consortium.
@@ -15,9 +17,7 @@
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- PERFORMANCE OF THIS SOFTWARE.
-->
<!-- $Id: lwres_inetntop.docbook,v 1.5 2005/04/07 03:50:03 marka Exp $ -->
<!-- $Id: lwres_inetntop.docbook,v 1.6 2005/05/11 05:55:40 sra Exp $ -->
<refentry>
<refentryinfo>
@@ -30,6 +30,19 @@
<refmiscinfo>BIND9</refmiscinfo>
</refmeta>
<docinfo>
<copyright>
<year>2004</year>
<year>2005</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
<copyright>
<year>2000</year>
<year>2001</year>
<holder>Internet Software Consortium</holder>
</copyright>
</docinfo>
<refnamediv>
<refname>lwres_net_ntop</refname>
<refpurpose>lightweight resolver IP address presentation</refpurpose>
@@ -41,10 +54,10 @@
<funcdef>
const char *
<function>lwres_net_ntop</function></funcdef>
<paramdef>int af</paramdef>
<paramdef>const void *src</paramdef>
<paramdef>char *dst</paramdef>
<paramdef>size_t size</paramdef>
<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>
@@ -52,18 +65,20 @@ const char *
<refsect1>
<title>DESCRIPTION</title>
<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
<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
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>
@@ -77,15 +92,15 @@ 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
the protocol family given in <parameter>af</parameter> is
not
supported.
</para>
</refsect1>
<refsect1>
<title>SEE ALSO</title>
<para>
<citerefentry>
<para><citerefentry>
<refentrytitle>RFC1884</refentrytitle>
</citerefentry>,
<citerefentry>
@@ -96,4 +111,8 @@ supported.
</citerefentry>.
</para>
</refsect1>
</refentry>
</refentry><!--
- Local variables:
- mode: sgml
- End:
-->

View File

@@ -1,4 +1,6 @@
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.0//EN"
"http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd"
[<!ENTITY mdash "&#8212;">]>
<!--
- Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) 2000, 2001 Internet Software Consortium.
@@ -15,9 +17,7 @@
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- PERFORMANCE OF THIS SOFTWARE.
-->
<!-- $Id: lwres_noop.docbook,v 1.6 2005/04/07 03:50:03 marka Exp $ -->
<!-- $Id: lwres_noop.docbook,v 1.7 2005/05/11 05:55:40 sra Exp $ -->
<refentry>
<refentryinfo>
@@ -30,6 +30,19 @@
<refmiscinfo>BIND9</refmiscinfo>
</refmeta>
<docinfo>
<copyright>
<year>2004</year>
<year>2005</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
<copyright>
<year>2000</year>
<year>2001</year>
<holder>Internet Software Consortium</holder>
</copyright>
</docinfo>
<refnamediv>
<refname>lwres_nooprequest_render</refname>
<refname>lwres_noopresponse_render</refname>
@@ -47,51 +60,51 @@
<funcdef>
lwres_result_t
<function>lwres_nooprequest_render</function></funcdef>
<paramdef>lwres_context_t *ctx</paramdef>
<paramdef>lwres_nooprequest_t *req</paramdef>
<paramdef>lwres_lwpacket_t *pkt</paramdef>
<paramdef>lwres_buffer_t *b</paramdef>
<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 *ctx</paramdef>
<paramdef>lwres_noopresponse_t *req</paramdef>
<paramdef>lwres_lwpacket_t *pkt</paramdef>
<paramdef>lwres_buffer_t *b</paramdef>
<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 *ctx</paramdef>
<paramdef>lwres_buffer_t *b</paramdef>
<paramdef>lwres_lwpacket_t *pkt</paramdef>
<paramdef>lwres_nooprequest_t **structp</paramdef>
<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 *ctx</paramdef>
<paramdef>lwres_buffer_t *b</paramdef>
<paramdef>lwres_lwpacket_t *pkt</paramdef>
<paramdef>lwres_noopresponse_t **structp</paramdef>
<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 *ctx</paramdef>
<paramdef>lwres_noopresponse_t **structp</paramdef>
<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 *ctx</paramdef>
<paramdef>lwres_nooprequest_t **structp</paramdef>
<paramdef>lwres_context_t *<parameter>ctx</parameter></paramdef>
<paramdef>lwres_nooprequest_t **<parameter>structp</parameter></paramdef>
</funcprototype>
</funcsynopsis>
</refsynopsisdiv>
@@ -102,7 +115,8 @@ 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:
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.
@@ -125,56 +139,64 @@ These structures are defined in
<filename>lwres/lwres.h</filename>.
They are shown below.
<programlisting>
</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
<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
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
<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.
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><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>
</refsect1>
@@ -219,11 +241,13 @@ indicate that the packet is not a response to an earlier query.
</refsect1>
<refsect1>
<title>SEE ALSO</title>
<para>
<citerefentry>
<refentrytitle>lwres_packet</refentrytitle><manvolnum>3
</manvolnum>
<para><citerefentry>
<refentrytitle>lwres_packet</refentrytitle><manvolnum>3</manvolnum>
</citerefentry>
</para>
</refsect1>
</refentry>
</refentry><!--
- Local variables:
- mode: sgml
- End:
-->

View File

@@ -1,4 +1,6 @@
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.0//EN"
"http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd"
[<!ENTITY mdash "&#8212;">]>
<!--
- Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) 2000, 2001 Internet Software Consortium.
@@ -15,9 +17,7 @@
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- PERFORMANCE OF THIS SOFTWARE.
-->
<!-- $Id: lwres_packet.docbook,v 1.8 2005/04/07 03:50:04 marka Exp $ -->
<!-- $Id: lwres_packet.docbook,v 1.9 2005/05/11 05:55:41 sra Exp $ -->
<refentry>
<refentryinfo>
@@ -30,6 +30,19 @@
<refmiscinfo>BIND9</refmiscinfo>
</refmeta>
<docinfo>
<copyright>
<year>2004</year>
<year>2005</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
<copyright>
<year>2000</year>
<year>2001</year>
<holder>Internet Software Consortium</holder>
</copyright>
</docinfo>
<refnamediv>
<refname>lwres_lwpacket_renderheader</refname>
<refname>lwres_lwpacket_parseheader</refname>
@@ -42,15 +55,15 @@
<funcdef>
lwres_result_t
<function>lwres_lwpacket_renderheader</function></funcdef>
<paramdef>lwres_buffer_t *b</paramdef>
<paramdef>lwres_lwpacket_t *pkt</paramdef>
<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 *b</paramdef>
<paramdef>lwres_lwpacket_t *pkt</paramdef>
<paramdef>lwres_buffer_t *<parameter>b</parameter></paramdef>
<paramdef>lwres_lwpacket_t *<parameter>pkt</parameter></paramdef>
</funcprototype>
</funcsynopsis>
</refsynopsisdiv>
@@ -61,10 +74,13 @@ These functions rely on a
<type>struct lwres_lwpacket</type>
which is defined in
<filename>lwres/lwpacket.h</filename>.
</para>
<programlisting>
<para><programlisting>
typedef struct lwres_lwpacket lwres_lwpacket_t;
</programlisting>
</para>
<para><programlisting>
struct lwres_lwpacket {
lwres_uint32_t length;
lwres_uint16_t version;
@@ -82,14 +98,18 @@ struct lwres_lwpacket {
<para>
The elements of this structure are:
<variablelist>
<varlistentry><term><constant>length</constant></term>
<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>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><constant>version</constant></term>
<listitem>
<para>
the header format. There is currently only one format,
@@ -97,106 +117,151 @@ the header format. There is currently only one format,
This field is filled in by the lwres_gabn_*() and lwres_gnba_*()
calls.
</para></listitem></varlistentry>
<varlistentry><term><constant>pktflags</constant></term>
</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
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
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>
</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
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>
</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
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>
</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.
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>
</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 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>
</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.
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>
</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>
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>
<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>
</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>
</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>
</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,
<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
<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>
@@ -205,14 +270,20 @@ buffer <parameter>*b</parameter> to resolver packet
<refsect1>
<title>RETURN VALUES</title>
<para> Successful calls to
<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
lightweight resolver packet <parameter>*pkt</parameter> both
functions
return <errorcode>LWRES_R_UNEXPECTEDEND</errorcode>.
</para>
</refsect1>
</refentry>
</refentry><!--
- Local variables:
- mode: sgml
- End:
-->

View File

@@ -1,4 +1,6 @@
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.0//EN"
"http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd"
[<!ENTITY mdash "&#8212;">]>
<!--
- Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) 2000, 2001 Internet Software Consortium.
@@ -15,9 +17,7 @@
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- PERFORMANCE OF THIS SOFTWARE.
-->
<!-- $Id: lwres_resutil.docbook,v 1.7 2005/04/07 03:50:04 marka Exp $ -->
<!-- $Id: lwres_resutil.docbook,v 1.8 2005/05/11 05:55:41 sra Exp $ -->
<refentry>
<refentryinfo>
@@ -30,6 +30,19 @@
<refmiscinfo>BIND9</refmiscinfo>
</refmeta>
<docinfo>
<copyright>
<year>2004</year>
<year>2005</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
<copyright>
<year>2000</year>
<year>2001</year>
<holder>Internet Software Consortium</holder>
</copyright>
</docinfo>
<refnamediv>
<refname>lwres_string_parse</refname>
<refname>lwres_addr_parse</refname>
@@ -44,35 +57,35 @@
<funcdef>
lwres_result_t
<function>lwres_string_parse</function></funcdef>
<paramdef>lwres_buffer_t *b</paramdef>
<paramdef>char **c</paramdef>
<paramdef>lwres_uint16_t *len</paramdef>
<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 *b</paramdef>
<paramdef>lwres_addr_t *addr</paramdef>
<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 *ctx</paramdef>
<paramdef>const char *name</paramdef>
<paramdef>lwres_uint32_t addrtypes</paramdef>
<paramdef>lwres_gabnresponse_t **structp</paramdef>
<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 *ctx</paramdef>
<paramdef>lwres_uint32_t addrtype</paramdef>
<paramdef>lwres_uint16_t addrlen</paramdef>
<paramdef>const unsigned char *addr</paramdef>
<paramdef>lwres_gnbaresponse_t **structp</paramdef>
<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>
@@ -80,39 +93,38 @@ lwres_result_t
<refsect1>
<title>DESCRIPTION</title>
<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
<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
<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.
<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:
<programlisting>
<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;
@@ -125,37 +137,42 @@ typedef struct {
void *base;
size_t baselen;
} lwres_gabnresponse_t;
</programlisting>
</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>
<refentrytitle>lwres_gabn</refentrytitle><manvolnum>3</manvolnum>
</citerefentry>
functions.
</para>
<para>
The lightweight resolver uses
<function>lwres_getaddrsbyname()</function> to perform foward lookups.
Hostname <parameter>name</parameter> is looked up using the resolver
<function>lwres_getaddrsbyname()</function> to perform
foward 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
<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><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>
</refsect1>
@@ -175,18 +192,13 @@ if the buffer is corrupt or
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><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>
<para><errorcode>LWRES_R_SUCCESS</errorcode>
is returned by a successful call to
<function>lwres_getnamebyaddr()</function>.
</para>
@@ -207,8 +219,7 @@ small.
</refsect1>
<refsect1>
<title>SEE ALSO</title>
<para>
<citerefentry>
<para><citerefentry>
<refentrytitle>lwres_buffer</refentrytitle><manvolnum>3</manvolnum>
</citerefentry>,
@@ -218,4 +229,8 @@ small.
</para>
</refsect1>
</refentry>
</refentry><!--
- Local variables:
- mode: sgml
- End:
-->

View File

@@ -13,7 +13,7 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
# $Id: rules.in,v 1.50 2005/03/31 04:21:03 marka Exp $
# $Id: rules.in,v 1.51 2005/05/11 05:55:41 sra Exp $
###
### Common Makefile rules for BIND 9.
@@ -179,6 +179,16 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_DATA = @INSTALL_DATA@
###
### Programs used when generating documentation. It's ok for these
### not to exist when not generating documentation.
###
XSLTPROC = @XSLTPROC@ --novalid
PERL = @PERL@
LATEX = @LATEX@
PDFLATEX = @PDFLATEX@
###
### DocBook -> HTML
### DocBook -> man page
@@ -186,42 +196,29 @@ INSTALL_DATA = @INSTALL_DATA@
.SUFFIXES: .docbook .html .1 .2 .3 .4 .5 .6 .7 .8
OPENJADE = @OPENJADE@
SGMLCATALOG = @SGMLCATALOG@
HTMLSTYLE = @HTMLSTYLE@
XMLDCL = @XMLDCL@
DOCBOOK2MANSPEC = @DOCBOOK2MANSPEC@
JADETEX = @JADETEX@
PDFJADETEX = @PDFJADETEX@
ONSGMLS = onsgmls
SGMLSPL = sgmlspl
#
# Note: this rule assumes the docbook.dsl stylesheet
# is being used. If another stylesheet is used, the
# filename 'r1.htm' in the rule might have to be
# be changed.
#
.docbook.html:
${OPENJADE} -c ${SGMLCATALOG} -t sgml -d ${HTMLSTYLE} $<
echo "" >> r1.htm
cat ${top_srcdir}/docutil/HTML_COPYRIGHT r1.htm > $@
rm -f r1.htm
${XSLTPROC} -o $@ ${top_srcdir}/doc/xsl/isc-docbook-html.xsl $<
.docbook.1:
sh ${top_srcdir}/docutil/docbook2man-wrapper.sh ${top_srcdir} $< $@
${XSLTPROC} -o $@ ${top_srcdir}/doc/xsl/isc-manpage.xsl $<
.docbook.2:
sh ${top_srcdir}/docutil/docbook2man-wrapper.sh ${top_srcdir} $< $@
${XSLTPROC} -o $@ ${top_srcdir}/doc/xsl/isc-manpage.xsl $<
.docbook.3:
sh ${top_srcdir}/docutil/docbook2man-wrapper.sh ${top_srcdir} $< $@
${XSLTPROC} -o $@ ${top_srcdir}/doc/xsl/isc-manpage.xsl $<
.docbook.4:
sh ${top_srcdir}/docutil/docbook2man-wrapper.sh ${top_srcdir} $< $@
${XSLTPROC} -o $@ ${top_srcdir}/doc/xsl/isc-manpage.xsl $<
.docbook.5:
sh ${top_srcdir}/docutil/docbook2man-wrapper.sh ${top_srcdir} $< $@
${XSLTPROC} -o $@ ${top_srcdir}/doc/xsl/isc-manpage.xsl $<
.docbook.6:
sh ${top_srcdir}/docutil/docbook2man-wrapper.sh ${top_srcdir} $< $@
${XSLTPROC} -o $@ ${top_srcdir}/doc/xsl/isc-manpage.xsl $<
.docbook.7:
sh ${top_srcdir}/docutil/docbook2man-wrapper.sh ${top_srcdir} $< $@
${XSLTPROC} -o $@ ${top_srcdir}/doc/xsl/isc-manpage.xsl $<
.docbook.8:
sh ${top_srcdir}/docutil/docbook2man-wrapper.sh ${top_srcdir} $< $@
${XSLTPROC} -o $@ ${top_srcdir}/doc/xsl/isc-manpage.xsl $<