Commit bfd4b9e1 authored by Witold Krecicki's avatar Witold Krecicki
Browse files

4255. [func] Add 'message-compression' option to disable DNS compression in...

4255.   [func] Add 'message-compression' option to disable DNS compression in responses. [RT #40726]
parent 29868ebb
4255. [func] Add 'message-compression' option to disable DNS
compression in responses. [RT #40726]
4254. [bug] Address missing lock when getting zone's serial.
[RT #41072]
......
......@@ -1065,12 +1065,17 @@ client_send(ns_client_t *client) {
isc_netaddr_fromsockaddr(&netaddr, &client->peeraddr);
if (client->message->tsigkey != NULL)
name = &client->message->tsigkey->name;
if (client->view->nocasecompress == NULL ||
!allowed(&netaddr, name, NULL, 0, NULL,
client->view->nocasecompress))
{
dns_compress_setsensitive(&cctx, ISC_TRUE);
}
if (client->view->msgcompression == ISC_FALSE) {
dns_compress_disable(&cctx);
}
}
cleanup_cctx = ISC_TRUE;
......
......@@ -185,6 +185,7 @@ options {\n\
fetches-per-server 0;\n\
require-server-cookie no;\n\
v6-bias 50;\n\
message-compression yes;\n\
"
#ifdef HAVE_DNSTAP
"\
......
......@@ -3652,6 +3652,16 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
CHECK(configure_view_acl(vconfig, config, "no-case-compress", NULL,
actx, ns_g_mctx, &view->nocasecompress));
/*
* Disable name compression completely, this is a tradeoff
* between CPU and network usage.
*/
obj = NULL;
result = ns_config_get(maps, "message-compression", &obj);
INSIST(result == ISC_R_SUCCESS);
view->msgcompression = cfg_obj_asboolean(obj);
/*
* Filter setting on addresses in the answer section.
*/
......
......@@ -59,7 +59,6 @@ XTARGETS = adb_test@EXEEXT@ \
backtrace_test@EXEEXT@ \
backtrace_test_nosymtbl@EXEEXT@ \
byname_test@EXEEXT@ \
compress_test@EXEEXT@ \
db_test@EXEEXT@ \
entropy_test@EXEEXT@ \
entropy2_test@EXEEXT@ \
......@@ -99,7 +98,6 @@ XSRCS = adb_test.c \
byaddr_test.c \
backtrace_test.c \
byname_test.c \
compress_test.c \
db_test.c \
entropy_test.c \
entropy2_test.c \
......@@ -258,10 +256,6 @@ db_test@EXEEXT@: db_test.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS}
${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ db_test.@O@ \
${DNSLIBS} ${ISCLIBS} ${LIBS}
compress_test@EXEEXT@: compress_test.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS}
${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ compress_test.@O@ \
${DNSLIBS} ${ISCLIBS} ${LIBS}
mempool_test@EXEEXT@: mempool_test.@O@ ${ISCDEPLIBS}
${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ mempool_test.@O@ \
${ISCLIBS} ${LIBS}
......
/*
* Copyright (C) 2004-2007, 2015 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
* REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
* INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
* LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
* OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: compress_test.c,v 1.34 2007/06/18 23:47:26 tbox Exp $ */
/*! \file */
#include <config.h>
#include <stdlib.h>
#include <string.h>
#include <isc/buffer.h>
#include <isc/commandline.h>
#include <isc/mem.h>
#include <isc/print.h>
#include <isc/util.h>
#include <dns/compress.h>
#include <dns/name.h>
unsigned char plain1[] = "\003yyy\003foo";
unsigned char plain2[] = "\003bar\003yyy\003foo";
unsigned char plain3[] = "\003xxx\003bar\003foo";
unsigned char plain[] = "\003yyy\003foo\0\003bar\003yyy\003foo\0\003"
"bar\003yyy\003foo\0\003xxx\003bar\003foo";
/*
* Result concatenate (plain1, plain2, plain2, plain3).
*/
int raw = 0;
int verbose = 0;
void
test(unsigned int, dns_name_t *, dns_name_t *, dns_name_t *,
unsigned char *, unsigned int);
int
main(int argc, char *argv[]) {
dns_name_t name1;
dns_name_t name2;
dns_name_t name3;
isc_region_t region;
int c;
while ((c = isc_commandline_parse(argc, argv, "rv")) != -1) {
switch (c) {
case 'r':
raw++;
break;
case 'v':
verbose++;
break;
}
}
dns_name_init(&name1, NULL);
region.base = plain1;
region.length = sizeof(plain1);
dns_name_fromregion(&name1, &region);
dns_name_init(&name2, NULL);
region.base = plain2;
region.length = sizeof(plain2);
dns_name_fromregion(&name2, &region);
dns_name_init(&name3, NULL);
region.base = plain3;
region.length = sizeof(plain3);
dns_name_fromregion(&name3, &region);
test(DNS_COMPRESS_NONE, &name1, &name2, &name3, plain, sizeof(plain));
test(DNS_COMPRESS_GLOBAL14, &name1, &name2, &name3, plain,
sizeof(plain));
test(DNS_COMPRESS_ALL, &name1, &name2, &name3, plain, sizeof(plain));
return (0);
}
void
test(unsigned int allowed, dns_name_t *name1, dns_name_t *name2,
dns_name_t *name3, unsigned char *result, unsigned int length)
{
isc_mem_t *mctx = NULL;
dns_compress_t cctx;
dns_decompress_t dctx;
isc_buffer_t source;
isc_buffer_t target;
dns_name_t name;
unsigned char buf1[1024];
unsigned char buf2[1024];
if (verbose) {
const char *s;
switch (allowed) {
case DNS_COMPRESS_NONE: s = "DNS_COMPRESS_NONE"; break;
case DNS_COMPRESS_GLOBAL14: s = "DNS_COMPRESS_GLOBAL14"; break;
/* case DNS_COMPRESS_ALL: s = "DNS_COMPRESS_ALL"; break; */
default: s = "UNKNOWN"; break;
}
fprintf(stdout, "Allowed = %s\n", s);
}
RUNTIME_CHECK(isc_mem_create(0, 0, &mctx) == ISC_R_SUCCESS);
isc_buffer_init(&source, buf1, sizeof(buf1));
RUNTIME_CHECK(dns_compress_init(&cctx, -1, mctx) == ISC_R_SUCCESS);
RUNTIME_CHECK(dns_name_towire(name1, &cctx, &source) == ISC_R_SUCCESS);
/*
RUNTIME_CHECK(dns_compress_localinit(&cctx, name1, &source) ==
ISC_R_SUCCESS);
*/
dns_compress_setmethods(&cctx, allowed);
RUNTIME_CHECK(dns_name_towire(name2, &cctx, &source) == ISC_R_SUCCESS);
RUNTIME_CHECK(dns_name_towire(name2, &cctx, &source) == ISC_R_SUCCESS);
RUNTIME_CHECK(dns_name_towire(name3, &cctx, &source) == ISC_R_SUCCESS);
/*
dns_compress_localinvalidate(&cctx);
*/
dns_compress_rollback(&cctx, 0); /* testing only */
dns_compress_invalidate(&cctx);
if (raw) {
unsigned int i;
for (i = 0; i < source.used; /* */ ) {
fprintf(stdout, "%02x",
((unsigned char *)source.base)[i]);
if ((++i % 20) == 0)
fputs("\n", stdout);
else
if (i == source.used)
fputs("\n", stdout);
else
fputs(" ", stdout);
}
}
isc_buffer_setactive(&source, source.used);
isc_buffer_init(&target, buf2, sizeof(buf2));
dns_decompress_init(&dctx, -1, DNS_DECOMPRESS_STRICT);
dns_name_init(&name, NULL);
RUNTIME_CHECK(dns_name_fromwire(&name, &source, &dctx, ISC_FALSE,
&target) == ISC_R_SUCCESS);
dns_decompress_setmethods(&dctx, allowed);
/*
dns_decompress_localinit(&dctx, &name, &source);
*/
RUNTIME_CHECK(dns_name_fromwire(&name, &source, &dctx, ISC_FALSE,
&target) == ISC_R_SUCCESS);
RUNTIME_CHECK(dns_name_fromwire(&name, &source, &dctx, ISC_FALSE,
&target) == ISC_R_SUCCESS);
RUNTIME_CHECK(dns_name_fromwire(&name, &source, &dctx, ISC_FALSE,
&target) == ISC_R_SUCCESS);
/*
dns_decompress_localinvalidate(&dctx);
*/
dns_decompress_invalidate(&dctx);
if (raw) {
unsigned int i;
for (i = 0; i < target.used; /* */ ) {
fprintf(stdout, "%02x",
((unsigned char *)target.base)[i]);
if ((++i % 20) == 0)
fputs("\n", stdout);
else
if (i == target.used)
fputs("\n", stdout);
else
fputs(" ", stdout);
}
fputs("\n", stdout);
fflush(stdout);
}
RUNTIME_CHECK(target.used == length);
RUNTIME_CHECK(memcmp(target.base, result, target.used) == 0);
isc_mem_destroy(&mctx);
}
......@@ -71,8 +71,8 @@ SUBDIRS="acl additional allow_query addzone autosign builtin
dname dns64 dnssec dsdigest dscp @DNSTAP@ ecdsa ednscompliance
emptyzones fetchlimit filter-aaaa formerr forward geoip glue gost
ixfr inline legacy limits logfileconfig lwresd masterfile
masterformat metadata mkeys notify nslookup nsupdate pending
pipelined @PKCS11_TEST@ reclimit redirect resolver rndc
masterformat metadata mkeys names notify nslookup nsupdate
pending pipelined @PKCS11_TEST@ reclimit redirect resolver rndc
rpz rpzrecurse rrl rrchecker rrsetorder rsabigexponent
runtime sfcache smartsign sortlist spf staticstub statistics
stub tcp tkey tsig tsiggss unknown upforwd verify views
......
#!/bin/sh
#
# Copyright (C) 2013-2015 Internet Systems Consortium, Inc. ("ISC")
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
# AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
rm -f dig.*.test*
rm -f ns*/named.lock
rm -f ns*/named.memstats
rm -f ns*/named.pid
; Copyright (C) 2013 Internet Systems Consortium, Inc. ("ISC")
;
; Permission to use, copy, modify, and/or distribute this software for any
; purpose with or without fee is hereby granted, provided that the above
; copyright notice and this permission notice appear in all copies.
;
; THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
; REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
; AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
; INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
; LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
; OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
; PERFORMANCE OF THIS SOFTWARE.
$TTL 300 ; 5 minutes
@ IN SOA mname1. . (
2000042407 ; serial
20 ; refresh (20 seconds)
20 ; retry (20 seconds)
1814400 ; expire (3 weeks)
3600 ; minimum (1 hour)
)
NS ns1
ns1 A 10.53.0.1
@ MX 0 m1.mail-servers.example.
@ MX 0 m2.mail-servers.example.
@ MX 0 m3.mail-servers.example.
@ MX 0 m4.mail-servers.example.
@ MX 0 m5.mail-servers.example.
@ MX 0 m6.mail-servers.example.
@ MX 0 m7.mail-servers.example.
@ MX 0 m8.mail-servers.example.
@ MX 0 m9.mail-servers.example.
@ MX 0 m10.mail-servers.example.
@ MX 0 m11.mail-servers.example.
@ MX 0 m12.mail-servers.example.
@ MX 0 m13.mail-servers.example.
@ MX 0 m14.mail-servers.example.
@ MX 0 m15.mail-servers.example.
@ MX 0 m16.mail-servers.example.
@ MX 0 m17.mail-servers.example.
@ MX 0 m18.mail-servers.example.
@ MX 0 m19.mail-servers.example.
@ MX 0 m20.mail-servers.example.
@ MX 0 m21.mail-servers.example.
@ MX 0 m22.mail-servers.example.
@ MX 0 m23.mail-servers.example.
@ MX 0 m24.mail-servers.example.
@ MX 0 m25.mail-servers.example.
@ MX 0 m26.mail-servers.example.
@ MX 0 m27.mail-servers.example.
@ MX 0 m28.mail-servers.example.
@ MX 0 m29.mail-servers.example.
/*
* Copyright (C) 2013, 2015 Internet Systems Consortium, Inc. ("ISC")
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
* REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
* INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
* LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
* OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
controls { /* empty */ };
options {
query-source address 10.53.0.1;
notify-source 10.53.0.1;
transfer-source 10.53.0.1;
port 5300;
pid-file "named.pid";
listen-on { 10.53.0.1; };
listen-on-v6 { none; };
recursion no;
notify yes;
ixfr-from-differences yes;
check-integrity no;
};
view compress {
match-clients { 10.53.0.1/32; };
zone "example" {
type master;
file "example.db";
};
};
view nocompress {
match-clients { 10.53.0.2/32; };
message-compression no;
zone "example" {
type master;
file "example.db";
};
};
# Copyright (C) 2015 Internet Systems Consortium, Inc. ("ISC")
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
# AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
sh clean.sh
#!/bin/sh
#
# Copyright (C) 2013-2015 Internet Systems Consortium, Inc. ("ISC")
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
# AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
SYSTEMTESTTOP=..
. $SYSTEMTESTTOP/conf.sh
DIGOPTS="+nosea +stat +noquest +nocomm +nocmd"
status=0
echo "I:Getting message size with compression enabled"
$DIG $DIGOPTS -b 10.53.0.1 @10.53.0.1 -p 5300 mx example > dig.compen.test
COMPEN=`grep ';; MSG SIZE' dig.compen.test |sed -e "s/.*: //g"`
cat dig.compen.test |grep -v ';;' |sort > dig.compen.sorted.test
echo "I:Getting message size with compression disabled"
$DIG $DIGOPTS -b 10.53.0.2 @10.53.0.1 -p 5300 mx example > dig.compdis.test
COMPDIS=`grep ';; MSG SIZE' dig.compdis.test |sed -e "s/.*: //g"`
cat dig.compdis.test |grep -v ';;' |sort > dig.compdis.sorted.test
# the compression disabled message should be at least twice as large as with
# compression disabled, but the content should be the same
echo "I:Checking if responses are identical other than in message size"
diff dig.compdis.sorted.test dig.compen.sorted.test >/dev/null
ret=$?
if [ $ret != 0 ]; then echo "I:failed"; fi
status=`expr $status + $ret`
echo "I:Checking if message with compression disabled is significantly larger"
echo "I: Disabled $COMPDIS vs enabled $COMPEN"
val=`expr \( $COMPDIS \* 3 / 2 \) / $COMPEN`
if [ $val -le 1 ]; then
echo "I:failed"
status=`expr $status + 1`
fi;
echo "I:exit status: $status"
exit $status
......@@ -4486,6 +4486,7 @@ badresp:1,adberr:0,findfail:0,valfail:0]
<optional> blackhole { <replaceable>address_match_list</replaceable> }; </optional>
<optional> keep-response-order { <replaceable>address_match_list</replaceable> }; </optional>
<optional> no-case-compress { <replaceable>address_match_list</replaceable> }; </optional>
<optional> message-compression <replaceable>yes_or_no</replaceable> ; </optional>
<optional> use-v4-udp-ports { <replaceable>port_list</replaceable> }; </optional>
<optional> avoid-v4-udp-ports { <replaceable>port_list</replaceable> }; </optional>
<optional> use-v6-udp-ports { <replaceable>port_list</replaceable> }; </optional>
......@@ -6150,6 +6151,19 @@ options {
</listitem>
</varlistentry>
 
<varlistentry>
<term><command>message-compression</command></term> <listitem>
<para>
If <userinput>yes</userinput>, DNS name compression will
be used for responses to regular queries (not including
AXFR or IXFR, which always uses compression). Setting
this option to <userinput>no</userinput> can result in
larger responses, but will reduce CPU usage on servers.
The default is <userinput>yes</userinput>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><command>minimal-responses</command></term>
<listitem>
......
......@@ -504,6 +504,15 @@
SINK, TA, TALINK.
</para>
</listitem>
<listitem>
<para>
A new <command>message-compression</command> option can be
used to specify whether or not to use name compression when
answering queries. Setting this to <userinput>no</userinput>
results in larger responses, but reduces CPU consumption and
may improve throughput. The default is <userinput>yes</userinput>.
</para>
</listitem>
</itemizedlist>
</section>
<section xml:id="relnotes_changes"><info><title>Feature Changes</title></info>
......
......@@ -206,6 +206,7 @@ options {
max-zone-ttl ( unlimited | <ttlval> );
memstatistics <boolean>;
memstatistics-file <quoted_string>;
message-compression <boolean>;
min-refresh-time <integer>;
min-retry-time <integer>;
min-roots <integer>; // not implemented
......@@ -489,6 +490,7 @@ view <string> [ <class> ] {
max-transfer-time-out <integer>;
max-udp-size <integer>;
max-zone-ttl ( unlimited | <ttlval> );
message-compression <boolean>;
min-refresh-time <integer>;
min-retry-time <integer>;
min-roots <integer>; // not implemented
......
......@@ -15,8 +15,6 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id$ */
/*! \file */
#define DNS_NAME_USEINLINE 1
......@@ -56,6 +54,7 @@ dns_compress_init(dns_compress_t *cctx, int edns, isc_mem_t *mctx) {
cctx->mctx = mctx;
cctx->count = 0;
cctx->magic = CCTX_MAGIC;
cctx->enabled = ISC_TRUE;
return (ISC_R_SUCCESS);
}
......@@ -97,6 +96,12 @@ dns_compress_getmethods(dns_compress_t *cctx) {
return (cctx->allowed & DNS_COMPRESS_ALL);
}
void
dns_compress_disable(dns_compress_t *cctx) {
REQUIRE(VALID_CCTX(cctx));
cctx->enabled = ISC_FALSE;
}
void
dns_compress_setsensitive(dns_compress_t *cctx, isc_boolean_t sensitive) {
REQUIRE(VALID_CCTX(cctx));
......@@ -145,6 +150,9 @@ dns_compress_findglobal(dns_compress_t *cctx, const dns_name_t *name,
REQUIRE(dns_name_isabsolute(name) == ISC_TRUE);
REQUIRE(offset != NULL);
if (cctx->enabled == ISC_FALSE)
return (ISC_FALSE);
if (cctx->count == 0)
return (ISC_FALSE);
......@@ -214,6 +222,9 @@ dns_compress_add(dns_compress_t *cctx, const dns_name_t *name,
REQUIRE(VALID_CCTX(cctx));
REQUIRE(dns_name_isabsolute(name));
if (cctx->enabled == ISC_FALSE)
return;
if (offset >= 0x4000)
return;
dns_name_init(&tname, NULL);
......
......@@ -15,8 +15,6 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: compress.h,v 1.42 2009/01/17 23:47:43 tbox Exp $ */
#ifndef DNS_COMPRESS_H
#define DNS_COMPRESS_H 1
......@@ -27,15 +25,26 @@
ISC_LANG_BEGINDECLS
/*! \file dns/compress.h
* Direct manipulation of the structures is strongly discouraged.
*
* A name compression context handles compression of multiple DNS names
* in relation to a single DNS message. The context can be used to
* selectively turn on/off compression for specific names (depending on
* the RR type) by using \c dns_compress_setmethods(). Alternately,
* compression can be disabled completely using \c
* dns_compress_disable().
*
* \c dns_compress_setmethods() is intended for use by RDATA towire()
* implementations, whereas \c dns_compress_disable() is intended to be
* used by a nameserver's configuration manager.
*/