/*
* Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2001 Internet Software Consortium.
*
* 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/commandline.h>
#include <dns/compress.h>
"bar\003yyy\003foo\0\003xxx\003bar\003foo";
/*
* Result concatenate (plain1, plain2, plain2, plain3).
*/
int raw = 0;
int verbose = 0;
void
unsigned char *, unsigned int);
int
int c;
switch (c) {
case 'r':
raw++;
break;
case 'v':
verbose++;
break;
}
}
sizeof(plain));
return (0);
}
void
{
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;
}
}
/*
RUNTIME_CHECK(dns_compress_localinit(&cctx, name1, &source) ==
ISC_R_SUCCESS);
*/
/*
dns_compress_localinvalidate(&cctx);
*/
if (raw) {
unsigned int i;
if ((++i % 20) == 0)
else
else
}
}
&target) == ISC_R_SUCCESS);
/*
dns_decompress_localinit(&dctx, &name, &source);
*/
&target) == ISC_R_SUCCESS);
&target) == ISC_R_SUCCESS);
&target) == ISC_R_SUCCESS);
/*
dns_decompress_localinvalidate(&dctx);
*/
if (raw) {
unsigned int i;
if ((++i % 20) == 0)
else
else
}
}
}