rdata.html revision 2f8d63983c297c62630044d28a6f66676b4d339d
5f5870385cff47efd2f58e7892f251cf13761528Timo Sirainen<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen - Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
16f816d3f3c32ae3351834253f52ddd0212bcbf3Timo Sirainen - Copyright (C) 1999-2001 Internet Software Consortium.
a2f250a332dfc1e6cd4ffd196c621eb9dbf7b8a1Timo Sirainen - Permission to use, copy, modify, and/or distribute this software for any
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen - purpose with or without fee is hereby granted, provided that the above
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen - copyright notice and this permission notice appear in all copies.
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
d051664df497582e1eb75a9f238d04b65e858db8Timo Sirainen - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
faed8babca9914257f34fb2e603d74016d563b2dTimo Sirainen - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
faed8babca9914257f34fb2e603d74016d563b2dTimo Sirainen - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
faed8babca9914257f34fb2e603d74016d563b2dTimo Sirainen - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
bb10ebcf076c959c752f583746d83805d7686df8Timo Sirainen - PERFORMANCE OF THIS SOFTWARE.
8f7b00599e73fe71b1d2c6c65f8ae98aac1b23fbTimo Sirainen<!-- $Id: rdata.html,v 1.14 2007/06/18 23:37:20 marka Exp $ -->
d051664df497582e1eb75a9f238d04b65e858db8Timo SirainenThe dns rdata routines (<CODE>dns_rdata_fromtext()</CODE>,
bb10ebcf076c959c752f583746d83805d7686df8Timo Sirainen<CODE>dns_rdata_totext()</CODE>, <CODE>dns_rdata_fromwire()</CODE>,
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen<CODE>dns_rdata_towire()</CODE> <CODE>dns_rdata_fromstruct()</CODE>,
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen<CODE>dns_rdata_tostruct()</CODE> and <CODE>dns_rdata_compare()</CODE>)
d051664df497582e1eb75a9f238d04b65e858db8Timo Sirainenare designed to provide a single set of routines
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainenfor encoding, decoding and comparing dns data preventing the problems that
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainenoccurred in BIND 8.x and earlier where there were multiple places in the
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainencode base that
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainendecoded wire format to internal format or compared rdata sometimes with
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainensubtly different behaviour (bugs) or didn't support a particular type leading
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainento internal inconsistancy.
16c89b1260c9d07c01c83a9219424d3727069b2eTimo SirainenEach of these generic routines calls type specific routines that provide
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainenthe type specific details.
16c89b1260c9d07c01c83a9219424d3727069b2eTimo SirainenFrom time to time new types are defined and it is necessary to add these types
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Siraineninto the existing structure.
16c89b1260c9d07c01c83a9219424d3727069b2eTimo SirainenThis document is written to provide instruction on how to do this.
16c89b1260c9d07c01c83a9219424d3727069b2eTimo SirainenAdding a new rdata type requires determining if the new rdata type is class
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainenspecific or generic.
16c89b1260c9d07c01c83a9219424d3727069b2eTimo SirainenWriting code to perform the following set of operations
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainenand then integrating it into the build by placing the code into the rdata
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainenhierachy at the correct place.
16c89b1260c9d07c01c83a9219424d3727069b2eTimo SirainenRunning <CODE>make clean</CODE> followed <CODE>make</CODE> in
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen<CODE>lib/dns</CODE> will cause the new rdata type to be picked up.
d1c2f6dd39ebb7f6b220ae2afda1162ba72ab43bTimo SirainenEach rdata module must perform the following operations:
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen<DT>Convert from text format to internal format</DT>
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen<DT>Convert from internal format to text format</DT>
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen<DT>Convert from wire format to internal format</DT>
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen<DT>Convert from internal format to wire format</DT>
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen<DT>Convert from a structure to internal format</DT>
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen<DT>Convert from internal format to a structure</DT>
16c89b1260c9d07c01c83a9219424d3727069b2eTimo SirainenThere is an additional set of support <A HREF="#functions">functions</A> and
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainento rdata code.
16c89b1260c9d07c01c83a9219424d3727069b2eTimo SirainenThe <CODE>rdata</CODE> hierarchy has the following format.
02752bc8d64df8cd361f464e55422f7b3f2f143eTimo SirainenInitial rdata hierarchy:
2a6af811ea3de3cf9e2f15e446674dd21b0705f3Timo SirainenClass and type names must be from the following alphabet and less that 11
2a6af811ea3de3cf9e2f15e446674dd21b0705f3Timo Sirainencharacters in length or otherwise they will be ignored.
055a42c6987f93fb88291f64813dfceb1b25895dTimo SirainenPermissible alphabet: a to z, 0 to 9 and dash (-).
5aeb15e5817fbd4b1d8de540aa7673e3819a8030Timo SirainenDash is mapped to underscore (_) for the C function names below.
7ded22760598b78ee29f9418eacc0abe3fb51055Timo SirainenThe internal format chosen is DNS wire format without any compression being
faed8babca9914257f34fb2e603d74016d563b2dTimo Sirainenapplied to domain names in the rdata.
faed8babca9914257f34fb2e603d74016d563b2dTimo Sirainen<H2>Convert from text format to internal format</H2>
faed8babca9914257f34fb2e603d74016d563b2dTimo SirainenThe functions to convert from text format has the following call formats and
faed8babca9914257f34fb2e603d74016d563b2dTimo Sirainenis declared as follows for class generic functions.
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen<CODE>static dns_result_t
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainenfromtext_<I>typename</I>(dns_rdataclass_t class, dns_rdatatype_t type,
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen isc_lex_t *lexer, dns_name_t *origin,
d721a5f55d3a4a100ae593ab85fa13661d2134abTimo Sirainen isc_boolean_t downcase, isc_buffer_t *target);</CODE>
16c89b1260c9d07c01c83a9219424d3727069b2eTimo SirainenClass specific functions contain the class name in addition to the
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen<CODE>static dns_result_t
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainenfromtext_<I>classname_typename</I>(dns_rdataclass_t class, dns_rdatatype_t type,
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen isc_lex_t *lexer, dns_name_t *origin,
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen isc_boolean_t downcase, isc_buffer_t *target);</CODE>
16c89b1260c9d07c01c83a9219424d3727069b2eTimo SirainenThis argument should be ignored when used with a class generic RR type
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainenotherwise <CODE>REQUIRE(class == #)</CODE> should be present at the start
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainenof the function.
faed8babca9914257f34fb2e603d74016d563b2dTimo SirainenThis should be tested with a <CODE>REQUIRE(type == #)</CODE> statement at
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainenthe begining of the function.
faed8babca9914257f34fb2e603d74016d563b2dTimo SirainenThis is used to read the input text stream.
16c89b1260c9d07c01c83a9219424d3727069b2eTimo SirainenThis is a absolute name used to qualify unqualified / partially qualified
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainendomainnames in the text stream.
16c89b1260c9d07c01c83a9219424d3727069b2eTimo SirainenIt is passed to the name parsing routines.
16c89b1260c9d07c01c83a9219424d3727069b2eTimo SirainenThis is passed to the name parsing routines to determine whether to downcase
d051664df497582e1eb75a9f238d04b65e858db8Timo Sirainenthe names it generates or leave them in the case they are pesented in.
16c89b1260c9d07c01c83a9219424d3727069b2eTimo SirainenThis is a <CODE>BINARY</CODE> buffer used to write the internal format of the rdata record being read in to.
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen<CODE>fromtext_<I>typename</I>()</CODE> reads tokens from <CODE>lexer</CODE>,
5aeb15e5817fbd4b1d8de540aa7673e3819a8030Timo Sirainenup to but not including the end of line (EOL) token or end of file (EOF) token.
5aeb15e5817fbd4b1d8de540aa7673e3819a8030Timo SirainenIf the EOL / EOF token is read it should be returned to the input stream.
7ded22760598b78ee29f9418eacc0abe3fb51055Timo Sirainen<A HREF="#gettoken"><CODE>gettoken()</CODE></A>
7ded22760598b78ee29f9418eacc0abe3fb51055Timo Sirainenshould be used to read the next token from the input stream and
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainenwill return EOL / EOF tokens
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainenautomatically unless
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainenthey are specifcally requested.
d051664df497582e1eb75a9f238d04b65e858db8Timo Sirainenbe used to return EOL / EOF (or any other token) to the input stream if
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainenthe EOL / EOF token is read.
16c89b1260c9d07c01c83a9219424d3727069b2eTimo SirainenUnused tokens will cause <CODE>dns_rdata_fromtext()</CODE> to return
d051664df497582e1eb75a9f238d04b65e858db8Timo Sirainen<CODE>DNS_R_EXTRATOKEN</CODE> if <CODE>fromtext_<I>typename</I>()</CODE> was successful.
d051664df497582e1eb75a9f238d04b65e858db8Timo Sirainen<CODE>fromtext_<I>typename</I>()</CODE> reads external input and as such is a high security area and must be paranoid about its input.
faed8babca9914257f34fb2e603d74016d563b2dTimo Sirainen<H2>Convert from internal format to text format</H2>
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen<CODE>static dns_result_t
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainentotext_<I>typename</I>(dns_rdata_t *rdata, dns_name_t *origin,
20b9283d4af31e45e588014da427fb2dbcd3227aTimo Sirainen isc_buffer_t *target);</CODE>
2a6af811ea3de3cf9e2f15e446674dd21b0705f3Timo Sirainen<CODE>static dns_result_t
20b9283d4af31e45e588014da427fb2dbcd3227aTimo Sirainentotext_<I>classname_typename</I>(dns_rdata_t *rdata, dns_name_t *origin,
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen isc_buffer_t *target);</CODE>
20b9283d4af31e45e588014da427fb2dbcd3227aTimo SirainenThis is the rdata record to be converted from internal format to text.
faed8babca9914257f34fb2e603d74016d563b2dTimo Sirainen<CODE>rdata->type</CODE> and <CODE>rdata->class</CODE> for class specific
faed8babca9914257f34fb2e603d74016d563b2dTimo SirainenRR types should be checked at the start of the function with
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen<CODE>REQUIRE(rdata->type ==�#)</CODE> statements.
20b9283d4af31e45e588014da427fb2dbcd3227aTimo SirainenIf this in non <CODE>NULL</CODE> then any domainnames with this suffix
d7c8280f58292cc292eba9209dcc9024fe96cf06Timo Sirainenshould be written out unqualified.
a2f250a332dfc1e6cd4ffd196c621eb9dbf7b8a1Timo Sirainen<A HREF="#name_prefix"><CODE>name_prefix()</CODE></A> can be used to
a2f250a332dfc1e6cd4ffd196c621eb9dbf7b8a1Timo Sirainencheck if <CODE>origin</CODE> is <CODE>NULL</CODE> and provide the correct
41bb0aa8e357876bc9a1916a37c9e3e78e5f8185Timo Sirainenarguments to the name conversion routines.
faed8babca9914257f34fb2e603d74016d563b2dTimo SirainenThis is a <CODE>TEXT</CODE> buffer used to hold the output.
faed8babca9914257f34fb2e603d74016d563b2dTimo Sirainen<H2>Convert from wire format to internal format</H2>
8f7b00599e73fe71b1d2c6c65f8ae98aac1b23fbTimo Sirainen<CODE>static dns_result_t
8f7b00599e73fe71b1d2c6c65f8ae98aac1b23fbTimo Sirainenfromwire_<I>typename</I>(dns_rdataclass_t class, dns_rdatatype_t type,
faed8babca9914257f34fb2e603d74016d563b2dTimo Sirainen isc_buffer_t *source, dns_decompress_t *dctx,
faed8babca9914257f34fb2e603d74016d563b2dTimo Sirainen isc_boolean_t downcase, isc_buffer_t *target);</CODE>
faed8babca9914257f34fb2e603d74016d563b2dTimo Sirainen<CODE>static dns_result_t
faed8babca9914257f34fb2e603d74016d563b2dTimo Sirainenfromwire_<I>classname_typename</I>(dns_rdataclass_t class, dns_rdatatype_t type,
faed8babca9914257f34fb2e603d74016d563b2dTimo Sirainen isc_buffer_t *source, dns_decompress_t *dctx,
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen isc_boolean_t downcase, isc_buffer_t *target);</CODE>
faed8babca9914257f34fb2e603d74016d563b2dTimo Sirainen<CODE>fromwire_<I>classname_typename</I>()</CODE> is required to set the valid
faed8babca9914257f34fb2e603d74016d563b2dTimo Sirainendecompression methods if there is a domain name in the rdata.
faed8babca9914257f34fb2e603d74016d563b2dTimo Sirainen<CODE>if (dns_decompress_edns(dctx) >= # || !dns_decompress_strict(dctx))
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen dns_decompress_setmethods(dctx, DNS_COMPRESS_ALL);
faed8babca9914257f34fb2e603d74016d563b2dTimo Sirainen dns_decompress_setmethods(dctx, DNS_COMPRESS_GLOBAL14);</CODE>
16c89b1260c9d07c01c83a9219424d3727069b2eTimo SirainenThis argument should be ignored when used with a class generic RR type
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainenotherwise <CODE>REQUIRE(class == #)</CODE> should be present at the start
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainenof the function.
faed8babca9914257f34fb2e603d74016d563b2dTimo SirainenThis should be tested with a <CODE>REQUIRE(type == #)</CODE> statement at
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainenthe begining of the function.
faed8babca9914257f34fb2e603d74016d563b2dTimo SirainenThis is a <CODE>BINARY</CODE> buffer with the <CODE>active</CODE> region
20b9283d4af31e45e588014da427fb2dbcd3227aTimo Sirainencontaining a RR record in wire format.
d200ae87140a1985fe527e6527bc4bd3035189b1Timo SirainenThis is the decompression context and is passed to
faed8babca9914257f34fb2e603d74016d563b2dTimo Sirainenalong with <CODE>downcase</CODE>, to enable a compressed domain name
faed8babca9914257f34fb2e603d74016d563b2dTimo Sirainento be extracted from the source.
faed8babca9914257f34fb2e603d74016d563b2dTimo SirainenThis is passed to <CODE>dns_name_fromwire()</CODE> to say whether the
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainenextracted domainname should be downcased during the extraction.
d051664df497582e1eb75a9f238d04b65e858db8Timo SirainenThis is a <CODE>BINARY</CODE> buffer where the decompressed and checked
d051664df497582e1eb75a9f238d04b65e858db8Timo SirainenRR record is written.
d051664df497582e1eb75a9f238d04b65e858db8Timo Sirainen<CODE>fromwire_<I>typename</I>()</CODE> is a security sensitive routine
d051664df497582e1eb75a9f238d04b65e858db8Timo Sirainenas it reads external data and should take extreme care to ensure that
d051664df497582e1eb75a9f238d04b65e858db8Timo Sirainenthe input data matches its description.
5aeb15e5817fbd4b1d8de540aa7673e3819a8030Timo SirainenIf the <CODE>active</CODE> buffer is not empty at completion and
d051664df497582e1eb75a9f238d04b65e858db8Timo Sirainen<CODE>fromwire_<I>typename</I>()</CODE> was otherwise successful
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen<CODE>dns_rdata_fromwire()</CODE> will return <CODE>DNS_R_EXTRADATA</CODE>.
d051664df497582e1eb75a9f238d04b65e858db8Timo Sirainen<H2>Convert from internal format to wire format</H2>
d051664df497582e1eb75a9f238d04b65e858db8Timo Sirainen<CODE>static dns_result_t
d051664df497582e1eb75a9f238d04b65e858db8Timo Sirainentowire_<I>typename</I>(dns_rdata_t *rdata, dns_compress_t *cctx,
d051664df497582e1eb75a9f238d04b65e858db8Timo Sirainen isc_buffer_t *target);</CODE>
d051664df497582e1eb75a9f238d04b65e858db8Timo Sirainen<CODE>static dns_result_t
d051664df497582e1eb75a9f238d04b65e858db8Timo Sirainentowire_<I>classname_typename</I>(dns_rdata_t *rdata, dns_compress_t *cctx,
d051664df497582e1eb75a9f238d04b65e858db8Timo Sirainen isc_buffer_t *target);<CODE>
5aeb15e5817fbd4b1d8de540aa7673e3819a8030Timo Sirainen<CODE>towire_<I>classname_typename</I>()</CODE> is required to set the
d051664df497582e1eb75a9f238d04b65e858db8Timo Sirainenallowed name compression methods based on EDNS version if there is a
d051664df497582e1eb75a9f238d04b65e858db8Timo Sirainendomain name in the rdata.
41e1c7380edda701719d8ce1fb4d465d2ec4c84dTimo Sirainen<CODE>if (dns_compress_getedns(cctx) >= #)
41e1c7380edda701719d8ce1fb4d465d2ec4c84dTimo Sirainen dns_compress_setmethods(cctx, DNS_COMPRESS_ALL);
20b9283d4af31e45e588014da427fb2dbcd3227aTimo Sirainen dns_compress_setmethods(cctx, DNS_COMPRESS_GLOBAL14);</CODE>
20b9283d4af31e45e588014da427fb2dbcd3227aTimo SirainenThis is the rdata record to be converted from internal format to text.
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen<CODE>rdata->type</CODE> and <CODE>rdata->class</CODE> for class specific
16c89b1260c9d07c01c83a9219424d3727069b2eTimo SirainenRR types should be checked at the start of the function with
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen<CODE>REQUIRE(rdata->type ==�#)</CODE> statements.
faed8babca9914257f34fb2e603d74016d563b2dTimo SirainenThis is the compression context, it should be passed to <CODE>dns_name_towire()</CODE> when putting domainnames on the wire.
faed8babca9914257f34fb2e603d74016d563b2dTimo SirainenThis is a <CODE>BINARY</CODE> buffer used to write the rdata to.
faed8babca9914257f34fb2e603d74016d563b2dTimo SirainenSimple RR types without domainnames can use the following code to
faed8babca9914257f34fb2e603d74016d563b2dTimo Sirainentransfer the contents of the <CODE>rdata</CODE> to the target buffer.
faed8babca9914257f34fb2e603d74016d563b2dTimo Sirainen <CODE>return (<A HREF="#mem_tobuffer">mem_tobuffer</A>(target, rdata->data, rdata->length));</CODE>
7ded22760598b78ee29f9418eacc0abe3fb51055Timo Sirainen<H2>Convert from a structure to internal format</H2>
5aeb15e5817fbd4b1d8de540aa7673e3819a8030Timo Sirainen<CODE>static dns_result_t
5aeb15e5817fbd4b1d8de540aa7673e3819a8030Timo Sirainenfromstruct_<I>typename</I>(dns_rdataclass_t class, dns_rdatatype_t type,
faed8babca9914257f34fb2e603d74016d563b2dTimo Sirainen void *source, isc_buffer_t *target);</CODE>
faed8babca9914257f34fb2e603d74016d563b2dTimo Sirainen<CODE>static dns_result_t
7ded22760598b78ee29f9418eacc0abe3fb51055Timo Sirainenfromstruct_<I>classname_typename</I>(dns_rdataclass_t class, dns_rdatatype_t type,
faed8babca9914257f34fb2e603d74016d563b2dTimo Sirainen void *source, isc_buffer_t *target);</CODE>
20b9283d4af31e45e588014da427fb2dbcd3227aTimo SirainenThis argument should be ignored when used with a class generic RR type
d7c8280f58292cc292eba9209dcc9024fe96cf06Timo Sirainenotherwise <CODE>REQUIRE(class == #)</CODE> should be present at the start
a2f250a332dfc1e6cd4ffd196c621eb9dbf7b8a1Timo Sirainenof the function.
20b9283d4af31e45e588014da427fb2dbcd3227aTimo SirainenThis should be tested with a <CODE>REQUIRE(type == #)</CODE> statement at
20b9283d4af31e45e588014da427fb2dbcd3227aTimo Sirainenthe beginning of the function.
faed8babca9914257f34fb2e603d74016d563b2dTimo SirainenThis points to a type specific structure.
This is a <CODE>BINARY</CODE> buffer used to write the internal format of the rdata record being read in to.
<A NAME="gettoken">gettoken</A>(isc_lex_t *lexer, isc_token_t *token, isc_tokentype_t expect, isc_boolean_t eol);</CODE></DT>
<A NAME="mem_tobuffer">mem_tobuffer</A>(isc_buffer_t *target, void *base, unsigned int length);</CODE></DT>