rdata.html revision dafcb997e390efa4423883dafd100c975c4095d6
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
75c0816e8295e180f4bc7f10db3d0d880383bc1cMark Andrews - Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein - Copyright (C) 1999-2001 Internet Software Consortium.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein - Permission to use, copy, modify, and distribute this software for any
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein - purpose with or without fee is hereby granted, provided that the above
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein - copyright notice and this permission notice appear in all copies.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein - PERFORMANCE OF THIS SOFTWARE.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<!-- $Id: rdata.html,v 1.13 2004/03/05 05:04:50 marka Exp $ -->
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinThe dns rdata routines (<CODE>dns_rdata_fromtext()</CODE>,
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<CODE>dns_rdata_totext()</CODE>, <CODE>dns_rdata_fromwire()</CODE>,
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<CODE>dns_rdata_towire()</CODE> <CODE>dns_rdata_fromstruct()</CODE>,
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<CODE>dns_rdata_tostruct()</CODE> and <CODE>dns_rdata_compare()</CODE>)
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeinare designed to provide a single set of routines
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeinfor encoding, decoding and comparing dns data preventing the problems that
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeinoccurred in BIND 8.x and earlier where there were multiple places in the
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeincode base that
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeindecoded wire format to internal format or compared rdata sometimes with
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeinsubtly different behaviour (bugs) or didn't support a particular type leading
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeinto internal inconsistancy.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinEach of these generic routines calls type specific routines that provide
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeinthe type specific details.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinFrom time to time new types are defined and it is necessary to add these types
ea94d370123a5892f6c47a97f21d1b28d44bb168Tinderbox Userinto the existing structure.
990d0e893f5b70e735cdf990af66e9ec6e91fa78Tinderbox UserThis document is written to provide instruction on how to do this.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinAdding a new rdata type requires determining if the new rdata type is class
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeinspecific or generic.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinWriting code to perform the following set of operations
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeinand then integrating it into the build by placing the code into the rdata
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeinhierachy at the correct place.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinRunning <CODE>make clean</CODE> followed <CODE>make</CODE> in
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<CODE>lib/dns</CODE> will cause the new rdata type to be picked up.
990d0e893f5b70e735cdf990af66e9ec6e91fa78Tinderbox UserEach rdata module must perform the following operations:
990d0e893f5b70e735cdf990af66e9ec6e91fa78Tinderbox User<DT>Convert from text format to internal format</DT>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<DT>Convert from internal format to text format</DT>
990d0e893f5b70e735cdf990af66e9ec6e91fa78Tinderbox User<DT>Convert from wire format to internal format</DT>
990d0e893f5b70e735cdf990af66e9ec6e91fa78Tinderbox User<DT>Convert from internal format to wire format</DT>
990d0e893f5b70e735cdf990af66e9ec6e91fa78Tinderbox User<DT>Convert from a structure to internal format</DT>
990d0e893f5b70e735cdf990af66e9ec6e91fa78Tinderbox User<DT>Convert from internal format to a structure</DT>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinThere is an additional set of support <A HREF="#functions">functions</A> and
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeinto rdata code.
990d0e893f5b70e735cdf990af66e9ec6e91fa78Tinderbox UserThe <CODE>rdata</CODE> hierarchy has the following format.
990d0e893f5b70e735cdf990af66e9ec6e91fa78Tinderbox UserInitial rdata hierarchy:
bbbf2e27d3a981163dab139497d6b2dc85449db0Tinderbox UserClass and type names must be from the following alphabet and less that 11
6f64d4ab8e68f9b2333bcbfc755396d29a4a9d7cAutomatic Updatercharacters in length or otherwise they will be ignored.
44d0f0256fbdce130a18655023c3b06bacacbd61Automatic UpdaterPermissible alphabet: a to z, 0 to 9 and dash (-).
44d0f0256fbdce130a18655023c3b06bacacbd61Automatic UpdaterDash is mapped to underscore (_) for the C function names below.
bbbf2e27d3a981163dab139497d6b2dc85449db0Tinderbox UserThe internal format chosen is DNS wire format without any compression being
bbbf2e27d3a981163dab139497d6b2dc85449db0Tinderbox Userapplied to domain names in the rdata.
bbbf2e27d3a981163dab139497d6b2dc85449db0Tinderbox User<H2>Convert from text format to internal format</H2>
bbbf2e27d3a981163dab139497d6b2dc85449db0Tinderbox UserThe functions to convert from text format has the following call formats and
bbbf2e27d3a981163dab139497d6b2dc85449db0Tinderbox Useris declared as follows for class generic functions.
bbbf2e27d3a981163dab139497d6b2dc85449db0Tinderbox User<CODE>static dns_result_t
bbbf2e27d3a981163dab139497d6b2dc85449db0Tinderbox Userfromtext_<I>typename</I>(dns_rdataclass_t class, dns_rdatatype_t type,
bbbf2e27d3a981163dab139497d6b2dc85449db0Tinderbox User isc_lex_t *lexer, dns_name_t *origin,
44d0f0256fbdce130a18655023c3b06bacacbd61Automatic Updater isc_boolean_t downcase, isc_buffer_t *target);</CODE>
44d0f0256fbdce130a18655023c3b06bacacbd61Automatic UpdaterClass specific functions contain the class name in addition to the
bcf15a19ae0efa72a22cdfb50666a3c6ce39eb9fTinderbox User<CODE>static dns_result_t
990d0e893f5b70e735cdf990af66e9ec6e91fa78Tinderbox Userfromtext_<I>classname_typename</I>(dns_rdataclass_t class, dns_rdatatype_t type,
bcf15a19ae0efa72a22cdfb50666a3c6ce39eb9fTinderbox User isc_lex_t *lexer, dns_name_t *origin,
990d0e893f5b70e735cdf990af66e9ec6e91fa78Tinderbox User isc_boolean_t downcase, isc_buffer_t *target);</CODE>
990d0e893f5b70e735cdf990af66e9ec6e91fa78Tinderbox UserThis argument should be ignored when used with a class generic RR type
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeinotherwise <CODE>REQUIRE(class == #)</CODE> should be present at the start
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeinof the function.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinThis should be tested with a <CODE>REQUIRE(type == #)</CODE> statement at
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeinthe begining of the function.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinThis is used to read the input text stream.
990d0e893f5b70e735cdf990af66e9ec6e91fa78Tinderbox UserThis is a absolute name used to qualify unqualified / partially qualified
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeindomainnames in the text stream.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinIt is passed to the name parsing routines.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinThis is passed to the name parsing routines to determine whether to downcase
990d0e893f5b70e735cdf990af66e9ec6e91fa78Tinderbox Userthe names it generates or leave them in the case they are pesented in.
990d0e893f5b70e735cdf990af66e9ec6e91fa78Tinderbox UserThis is a <CODE>BINARY</CODE> buffer used to write the internal format of the rdata record being read in to.
990d0e893f5b70e735cdf990af66e9ec6e91fa78Tinderbox User<CODE>fromtext_<I>typename</I>()</CODE> reads tokens from <CODE>lexer</CODE>,
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeinup to but not including the end of line (EOL) token or end of file (EOF) token.
990d0e893f5b70e735cdf990af66e9ec6e91fa78Tinderbox UserIf the EOL / EOF token is read it should be returned to the input stream.
990d0e893f5b70e735cdf990af66e9ec6e91fa78Tinderbox User<A HREF="#gettoken"><CODE>gettoken()</CODE></A>
990d0e893f5b70e735cdf990af66e9ec6e91fa78Tinderbox Usershould be used to read the next token from the input stream and
990d0e893f5b70e735cdf990af66e9ec6e91fa78Tinderbox Userwill return EOL / EOF tokens
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeinautomatically unless
990d0e893f5b70e735cdf990af66e9ec6e91fa78Tinderbox Userthey are specifcally requested.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeinbe used to return EOL / EOF (or any other token) to the input stream if
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeinthe EOL / EOF token is read.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinUnused tokens will cause <CODE>dns_rdata_fromtext()</CODE> to return
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<CODE>DNS_R_EXTRATOKEN</CODE> if <CODE>fromtext_<I>typename</I>()</CODE> was successful.
bbbf2e27d3a981163dab139497d6b2dc85449db0Tinderbox User<CODE>fromtext_<I>typename</I>()</CODE> reads external input and as such is a high security area and must be paranoid about its input.
a1ad6695ed6f988406cf155aa26376f84f73bcb9Automatic Updater<H2>Convert from internal format to text format</H2>
bbbf2e27d3a981163dab139497d6b2dc85449db0Tinderbox User<CODE>static dns_result_t
2895f101b5585a19015ac2c2c1e1812ac467fa12Automatic Updatertotext_<I>typename</I>(dns_rdata_t *rdata, dns_name_t *origin,
bbbf2e27d3a981163dab139497d6b2dc85449db0Tinderbox User isc_buffer_t *target);</CODE>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<CODE>static dns_result_t
bbbf2e27d3a981163dab139497d6b2dc85449db0Tinderbox Usertotext_<I>classname_typename</I>(dns_rdata_t *rdata, dns_name_t *origin,
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein isc_buffer_t *target);</CODE>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinThis is the rdata record to be converted from internal format to text.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<CODE>rdata->type</CODE> and <CODE>rdata->class</CODE> for class specific
bbbf2e27d3a981163dab139497d6b2dc85449db0Tinderbox UserRR types should be checked at the start of the function with
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<CODE>REQUIRE(rdata->type ==�#)</CODE> statements.
bbbf2e27d3a981163dab139497d6b2dc85449db0Tinderbox UserIf this in non <CODE>NULL</CODE> then any domainnames with this suffix
7208386cd37a2092c70eddf80cf29519b16c4c80Mark Andrewsshould be written out unqualified.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<A HREF="#name_prefix"><CODE>name_prefix()</CODE></A> can be used to
507151045be68c671ffd4e2f37e17cdfa0376fc4Automatic Updatercheck if <CODE>origin</CODE> is <CODE>NULL</CODE> and provide the correct
507151045be68c671ffd4e2f37e17cdfa0376fc4Automatic Updaterarguments to the name conversion routines.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinThis is a <CODE>TEXT</CODE> buffer used to hold the output.
bbbf2e27d3a981163dab139497d6b2dc85449db0Tinderbox User<H2>Convert from wire format to internal format</H2>
bbbf2e27d3a981163dab139497d6b2dc85449db0Tinderbox User<CODE>static dns_result_t
bbbf2e27d3a981163dab139497d6b2dc85449db0Tinderbox Userfromwire_<I>typename</I>(dns_rdataclass_t class, dns_rdatatype_t type,
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein isc_buffer_t *source, dns_decompress_t *dctx,
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein isc_boolean_t downcase, isc_buffer_t *target);</CODE>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<CODE>static dns_result_t
bbbf2e27d3a981163dab139497d6b2dc85449db0Tinderbox Userfromwire_<I>classname_typename</I>(dns_rdataclass_t class, dns_rdatatype_t type,
bbbf2e27d3a981163dab139497d6b2dc85449db0Tinderbox User isc_buffer_t *source, dns_decompress_t *dctx,
bbbf2e27d3a981163dab139497d6b2dc85449db0Tinderbox User isc_boolean_t downcase, isc_buffer_t *target);</CODE>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<CODE>fromwire_<I>classname_typename</I>()</CODE> is required to set the valid
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeindecompression methods if there is a domain name in the rdata.
71c66a876ecca77923638d3f94cc0783152b2f03Mark Andrews<CODE>if (dns_decompress_edns(dctx) >= # || !dns_decompress_strict(dctx))
bbbf2e27d3a981163dab139497d6b2dc85449db0Tinderbox User dns_decompress_setmethods(dctx, DNS_COMPRESS_ALL);
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein dns_decompress_setmethods(dctx, DNS_COMPRESS_GLOBAL14);</CODE>
44d0f0256fbdce130a18655023c3b06bacacbd61Automatic UpdaterThis argument should be ignored when used with a class generic RR type
44d0f0256fbdce130a18655023c3b06bacacbd61Automatic Updaterotherwise <CODE>REQUIRE(class == #)</CODE> should be present at the start
bbbf2e27d3a981163dab139497d6b2dc85449db0Tinderbox Userof the function.
bbbf2e27d3a981163dab139497d6b2dc85449db0Tinderbox UserThis should be tested with a <CODE>REQUIRE(type == #)</CODE> statement at
bbbf2e27d3a981163dab139497d6b2dc85449db0Tinderbox Userthe begining of the function.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinThis is a <CODE>BINARY</CODE> buffer with the <CODE>active</CODE> region
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeincontaining a RR record in wire format.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsThis is the decompression context and is passed to
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsalong with <CODE>downcase</CODE>, to enable a compressed domain name
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsto be extracted from the source.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsThis is passed to <CODE>dns_name_fromwire()</CODE> to say whether the
f9aef05653eeb454c489d5bd2bde6daab774ad4aTinderbox Userextracted domainname should be downcased during the extraction.
f9aef05653eeb454c489d5bd2bde6daab774ad4aTinderbox UserThis is a <CODE>BINARY</CODE> buffer where the decompressed and checked
f9aef05653eeb454c489d5bd2bde6daab774ad4aTinderbox UserRR record is written.
922312472e2e05ebc64993d465999c5351b83036Automatic Updater<CODE>fromwire_<I>typename</I>()</CODE> is a security sensitive routine
922312472e2e05ebc64993d465999c5351b83036Automatic Updateras it reads external data and should take extreme care to ensure that
922312472e2e05ebc64993d465999c5351b83036Automatic Updaterthe input data matches its description.
28b3569d6248168e6c00caab951521cc8141a49dAutomatic UpdaterIf the <CODE>active</CODE> buffer is not empty at completion and
28b3569d6248168e6c00caab951521cc8141a49dAutomatic Updater<CODE>fromwire_<I>typename</I>()</CODE> was otherwise successful
71c66a876ecca77923638d3f94cc0783152b2f03Mark Andrews<CODE>dns_rdata_fromwire()</CODE> will return <CODE>DNS_R_EXTRADATA</CODE>.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<H2>Convert from internal format to wire format</H2>
2cbb4ab75757fbb656997a82c14ca07db37d481aAutomatic Updater<CODE>static dns_result_t
2cbb4ab75757fbb656997a82c14ca07db37d481aAutomatic Updatertowire_<I>typename</I>(dns_rdata_t *rdata, dns_compress_t *cctx,
2cbb4ab75757fbb656997a82c14ca07db37d481aAutomatic Updater isc_buffer_t *target);</CODE>
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater<CODE>static dns_result_t
71c66a876ecca77923638d3f94cc0783152b2f03Mark Andrewstowire_<I>classname_typename</I>(dns_rdata_t *rdata, dns_compress_t *cctx,
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews isc_buffer_t *target);<CODE>
c3dc968140ab7f04795acc7835e4e89ccb0c0a27Tinderbox User<CODE>towire_<I>classname_typename</I>()</CODE> is required to set the
c3dc968140ab7f04795acc7835e4e89ccb0c0a27Tinderbox Userallowed name compression methods based on EDNS version if there is a
71c66a876ecca77923638d3f94cc0783152b2f03Mark Andrewsdomain name in the rdata.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<CODE>if (dns_compress_getedns(cctx) >= #)
71c66a876ecca77923638d3f94cc0783152b2f03Mark Andrews dns_compress_setmethods(cctx, DNS_COMPRESS_ALL);
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews dns_compress_setmethods(cctx, DNS_COMPRESS_GLOBAL14);</CODE>
e2e4d321999340802f77adaacd19c797d04b4b95Automatic UpdaterThis is the rdata record to be converted from internal format to text.
e2e4d321999340802f77adaacd19c797d04b4b95Automatic Updater<CODE>rdata->type</CODE> and <CODE>rdata->class</CODE> for class specific
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic UpdaterRR types should be checked at the start of the function with
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater<CODE>REQUIRE(rdata->type ==�#)</CODE> statements.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsThis is the compression context, it should be passed to <CODE>dns_name_towire()</CODE> when putting domainnames on the wire.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsThis is a <CODE>BINARY</CODE> buffer used to write the rdata to.
9b469e3c59015b1a4899c9d8395168126fe094fdAutomatic UpdaterSimple RR types without domainnames can use the following code to
9b469e3c59015b1a4899c9d8395168126fe094fdAutomatic Updatertransfer the contents of the <CODE>rdata</CODE> to the target buffer.
9b469e3c59015b1a4899c9d8395168126fe094fdAutomatic Updater <CODE>return (<A HREF="#mem_tobuffer">mem_tobuffer</A>(target, rdata->data, rdata->length));</CODE>
e2e4d321999340802f77adaacd19c797d04b4b95Automatic Updater<H2>Convert from a structure to internal format</H2>
e2e4d321999340802f77adaacd19c797d04b4b95Automatic Updater<CODE>static dns_result_t
e2e4d321999340802f77adaacd19c797d04b4b95Automatic Updaterfromstruct_<I>typename</I>(dns_rdataclass_t class, dns_rdatatype_t type,
e2e4d321999340802f77adaacd19c797d04b4b95Automatic Updater void *source, isc_buffer_t *target);</CODE>
fdd80e9a55c70b36a3bf3e409b86897301c44ff8Automatic Updater<CODE>static dns_result_t
fdd80e9a55c70b36a3bf3e409b86897301c44ff8Automatic Updaterfromstruct_<I>classname_typename</I>(dns_rdataclass_t class, dns_rdatatype_t type,
fdd80e9a55c70b36a3bf3e409b86897301c44ff8Automatic Updater void *source, isc_buffer_t *target);</CODE>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinThis argument should be ignored when used with a class generic RR type
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeinotherwise <CODE>REQUIRE(class == #)</CODE> should be present at the start
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeinof the function.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinThis should be tested with a <CODE>REQUIRE(type == #)</CODE> statement at
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeinthe beginning of the function.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinThis points to a type specific structure.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinThis is a <CODE>BINARY</CODE> buffer used to write the internal format of the rdata record being read in to.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<H2>Convert from internal format to a structure</H2>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<CODE>static dns_result_t
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeintostruct_<I>typename</I>(dns_rdata_t *rdata, void *target);</CODE>
<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>