Commit 95a08101 authored by Mark Andrews's avatar Mark Andrews
Browse files

Initial design document

parent 49621e5e
Name Decompression
$Id: decompression,v 1.1 1999/02/24 00:51:13 marka Exp $
There are 4 type of compression: global 14 bit, global 16 bit,
local 14 bit and local 16 bit.
In general the resolver / nameserver should accept any compression
method at any time regardless of whether it was legal to
send it. This fits with the priciple of being liberal with
what you accept and strict with what you send.
There are a few cases where it does not make sence to accept
compression pointers of a given type. i.e. the first domain name
in a message, local compression pointers in the ownername of a RR
or in a question.
When performing regression testing however we should be as strict
as possible. Hence we need to be able modifiy the behaviour of the
decompression routines.
To be able to decompress a domain name we need some or all of the
following pieces of information.
1. where the message starts.
2. where the current rdata starts in the message (local compression).
3. what the current owner name is (local compression).
4. where the domainname we are decompressing starts.
5. what are allowable decompression method. These vary across type
and edn version.
struct dns_decompress {
unsigned int magic;
unsigned int allowed;
int edns;
dns_name_t owner_name;
unsigned int rdata;
isc_boolean_t strict;
dns_decompress_init(dns_decompress_t *dctx, int edns,
isc_boolean_t strict, isc_mctx_t *mctx);
initalise dctx
dctx->ownername is invalidated
dns_decompress_localinit(dns_decompress_t *dctx, dns_name_t *name,
isc_buffer_t *source);
initalise dctx->ownername
record source->current to dctx->rdata
dns_decompress_invalidate(dns_decompress_t *dctx);
invalidate dctx
dns_decompress_localinvalidate(dns_decompress_t *dctx);
invalidate dctx->ownername
dns_decompress_setmethods(dns_decompress_t *dctx, unsigned int allowed);
sets dctx->allowed
unsigned int
dns_decompress_getmethods(dns_decompress_t *dctx);
returns dctx->allowed
dns_decompress_edns(dns_decompress_t *dctx);
returns dctx->edns
dns_decompress_strict(dns_decompress_t *dctx);
returns dctx->strict
dns_name_fromwire(dns_name_t *name, isc_buffer_t *source,
dns_decompress_t *dctx, isc_boolean_t downcase,
isc_buffer_t *target)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment