Commit cdc50af0 authored by Brian Wellington's avatar Brian Wellington
Browse files

In the towire_* and additionaldata_* routines, add an offsets table to names

passed into dns_name_toregion().  This is effectively free, and reduces the
number of calls to set_offsets() and dns_name_clone() in name compression.
parent 9b6398ef
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: tsig_250.c,v 1.47 2001/01/09 21:53:48 bwelling Exp $ */ /* $Id: tsig_250.c,v 1.48 2001/02/12 03:04:37 bwelling Exp $ */
/* Reviewed: Thu Mar 16 13:39:43 PST 2000 by gson */ /* Reviewed: Thu Mar 16 13:39:43 PST 2000 by gson */
...@@ -306,6 +306,7 @@ static inline isc_result_t ...@@ -306,6 +306,7 @@ static inline isc_result_t
towire_any_tsig(ARGS_TOWIRE) { towire_any_tsig(ARGS_TOWIRE) {
isc_region_t sr; isc_region_t sr;
dns_name_t name; dns_name_t name;
dns_offsets_t offsets;
REQUIRE(rdata->type == 250); REQUIRE(rdata->type == 250);
REQUIRE(rdata->rdclass == 255); REQUIRE(rdata->rdclass == 255);
...@@ -313,7 +314,7 @@ towire_any_tsig(ARGS_TOWIRE) { ...@@ -313,7 +314,7 @@ towire_any_tsig(ARGS_TOWIRE) {
dns_compress_setmethods(cctx, DNS_COMPRESS_NONE); dns_compress_setmethods(cctx, DNS_COMPRESS_NONE);
dns_rdata_toregion(rdata, &sr); dns_rdata_toregion(rdata, &sr);
dns_name_init(&name, NULL); dns_name_init(&name, offsets);
dns_name_fromregion(&name, &sr); dns_name_fromregion(&name, &sr);
RETERR(dns_name_towire(&name, cctx, target)); RETERR(dns_name_towire(&name, cctx, target));
isc_region_consume(&sr, name_length(&name)); isc_region_consume(&sr, name_length(&name));
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: afsdb_18.c,v 1.35 2001/01/09 21:53:50 bwelling Exp $ */ /* $Id: afsdb_18.c,v 1.36 2001/02/12 03:04:38 bwelling Exp $ */
/* Reviewed: Wed Mar 15 14:59:00 PST 2000 by explorer */ /* Reviewed: Wed Mar 15 14:59:00 PST 2000 by explorer */
...@@ -112,6 +112,7 @@ towire_afsdb(ARGS_TOWIRE) { ...@@ -112,6 +112,7 @@ towire_afsdb(ARGS_TOWIRE) {
isc_region_t tr; isc_region_t tr;
isc_region_t sr; isc_region_t sr;
dns_name_t name; dns_name_t name;
dns_offsets_t offsets;
REQUIRE(rdata->type == 18); REQUIRE(rdata->type == 18);
REQUIRE(rdata->length != 0); REQUIRE(rdata->length != 0);
...@@ -125,7 +126,7 @@ towire_afsdb(ARGS_TOWIRE) { ...@@ -125,7 +126,7 @@ towire_afsdb(ARGS_TOWIRE) {
isc_region_consume(&sr, 2); isc_region_consume(&sr, 2);
isc_buffer_add(target, 2); isc_buffer_add(target, 2);
dns_name_init(&name, NULL); dns_name_init(&name, offsets);
dns_name_fromregion(&name, &sr); dns_name_fromregion(&name, &sr);
return (dns_name_towire(&name, cctx, target)); return (dns_name_towire(&name, cctx, target));
...@@ -227,11 +228,12 @@ freestruct_afsdb(ARGS_FREESTRUCT) { ...@@ -227,11 +228,12 @@ freestruct_afsdb(ARGS_FREESTRUCT) {
static inline isc_result_t static inline isc_result_t
additionaldata_afsdb(ARGS_ADDLDATA) { additionaldata_afsdb(ARGS_ADDLDATA) {
dns_name_t name; dns_name_t name;
dns_offsets_t offsets;
isc_region_t region; isc_region_t region;
REQUIRE(rdata->type == 18); REQUIRE(rdata->type == 18);
dns_name_init(&name, NULL); dns_name_init(&name, offsets);
dns_rdata_toregion(rdata, &region); dns_rdata_toregion(rdata, &region);
isc_region_consume(&region, 2); isc_region_consume(&region, 2);
dns_name_fromregion(&name, &region); dns_name_fromregion(&name, &region);
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: cname_5.c,v 1.39 2001/01/09 21:53:55 bwelling Exp $ */ /* $Id: cname_5.c,v 1.40 2001/02/12 03:04:39 bwelling Exp $ */
/* reviewed: Wed Mar 15 16:48:45 PST 2000 by brister */ /* reviewed: Wed Mar 15 16:48:45 PST 2000 by brister */
...@@ -82,6 +82,7 @@ fromwire_cname(ARGS_FROMWIRE) { ...@@ -82,6 +82,7 @@ fromwire_cname(ARGS_FROMWIRE) {
static inline isc_result_t static inline isc_result_t
towire_cname(ARGS_TOWIRE) { towire_cname(ARGS_TOWIRE) {
dns_name_t name; dns_name_t name;
dns_offsets_t offsets;
isc_region_t region; isc_region_t region;
REQUIRE(rdata->type == 5); REQUIRE(rdata->type == 5);
...@@ -89,7 +90,7 @@ towire_cname(ARGS_TOWIRE) { ...@@ -89,7 +90,7 @@ towire_cname(ARGS_TOWIRE) {
dns_compress_setmethods(cctx, DNS_COMPRESS_GLOBAL14); dns_compress_setmethods(cctx, DNS_COMPRESS_GLOBAL14);
dns_name_init(&name, NULL); dns_name_init(&name, offsets);
dns_rdata_toregion(rdata, &region); dns_rdata_toregion(rdata, &region);
dns_name_fromregion(&name, &region); dns_name_fromregion(&name, &region);
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: dname_39.c,v 1.29 2001/01/09 21:53:57 bwelling Exp $ */ /* $Id: dname_39.c,v 1.30 2001/02/12 03:04:40 bwelling Exp $ */
/* Reviewed: Wed Mar 15 16:52:38 PST 2000 by explorer */ /* Reviewed: Wed Mar 15 16:52:38 PST 2000 by explorer */
...@@ -83,13 +83,14 @@ fromwire_dname(ARGS_FROMWIRE) { ...@@ -83,13 +83,14 @@ fromwire_dname(ARGS_FROMWIRE) {
static inline isc_result_t static inline isc_result_t
towire_dname(ARGS_TOWIRE) { towire_dname(ARGS_TOWIRE) {
dns_name_t name; dns_name_t name;
dns_offsets_t offsets;
isc_region_t region; isc_region_t region;
REQUIRE(rdata->type == 39); REQUIRE(rdata->type == 39);
REQUIRE(rdata->length != 0); REQUIRE(rdata->length != 0);
dns_compress_setmethods(cctx, DNS_COMPRESS_NONE); dns_compress_setmethods(cctx, DNS_COMPRESS_NONE);
dns_name_init(&name, NULL); dns_name_init(&name, offsets);
dns_rdata_toregion(rdata, &region); dns_rdata_toregion(rdata, &region);
dns_name_fromregion(&name, &region); dns_name_fromregion(&name, &region);
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: mb_7.c,v 1.37 2001/01/09 21:54:10 bwelling Exp $ */ /* $Id: mb_7.c,v 1.38 2001/02/12 03:04:41 bwelling Exp $ */
/* Reviewed: Wed Mar 15 17:31:26 PST 2000 by bwelling */ /* Reviewed: Wed Mar 15 17:31:26 PST 2000 by bwelling */
...@@ -81,6 +81,7 @@ fromwire_mb(ARGS_FROMWIRE) { ...@@ -81,6 +81,7 @@ fromwire_mb(ARGS_FROMWIRE) {
static inline isc_result_t static inline isc_result_t
towire_mb(ARGS_TOWIRE) { towire_mb(ARGS_TOWIRE) {
dns_name_t name; dns_name_t name;
dns_offsets_t offsets;
isc_region_t region; isc_region_t region;
REQUIRE(rdata->type == 7); REQUIRE(rdata->type == 7);
...@@ -88,7 +89,7 @@ towire_mb(ARGS_TOWIRE) { ...@@ -88,7 +89,7 @@ towire_mb(ARGS_TOWIRE) {
dns_compress_setmethods(cctx, DNS_COMPRESS_GLOBAL14); dns_compress_setmethods(cctx, DNS_COMPRESS_GLOBAL14);
dns_name_init(&name, NULL); dns_name_init(&name, offsets);
dns_rdata_toregion(rdata, &region); dns_rdata_toregion(rdata, &region);
dns_name_fromregion(&name, &region); dns_name_fromregion(&name, &region);
...@@ -175,11 +176,12 @@ freestruct_mb(ARGS_FREESTRUCT) { ...@@ -175,11 +176,12 @@ freestruct_mb(ARGS_FREESTRUCT) {
static inline isc_result_t static inline isc_result_t
additionaldata_mb(ARGS_ADDLDATA) { additionaldata_mb(ARGS_ADDLDATA) {
dns_name_t name; dns_name_t name;
dns_offsets_t offsets;
isc_region_t region; isc_region_t region;
REQUIRE(rdata->type == 7); REQUIRE(rdata->type == 7);
dns_name_init(&name, NULL); dns_name_init(&name, offsets);
dns_rdata_toregion(rdata, &region); dns_rdata_toregion(rdata, &region);
dns_name_fromregion(&name, &region); dns_name_fromregion(&name, &region);
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: md_3.c,v 1.39 2001/01/09 21:54:13 bwelling Exp $ */ /* $Id: md_3.c,v 1.40 2001/02/12 03:04:43 bwelling Exp $ */
/* Reviewed: Wed Mar 15 17:48:20 PST 2000 by bwelling */ /* Reviewed: Wed Mar 15 17:48:20 PST 2000 by bwelling */
...@@ -81,6 +81,7 @@ fromwire_md(ARGS_FROMWIRE) { ...@@ -81,6 +81,7 @@ fromwire_md(ARGS_FROMWIRE) {
static inline isc_result_t static inline isc_result_t
towire_md(ARGS_TOWIRE) { towire_md(ARGS_TOWIRE) {
dns_name_t name; dns_name_t name;
dns_offsets_t offsets;
isc_region_t region; isc_region_t region;
REQUIRE(rdata->type == 3); REQUIRE(rdata->type == 3);
...@@ -88,7 +89,7 @@ towire_md(ARGS_TOWIRE) { ...@@ -88,7 +89,7 @@ towire_md(ARGS_TOWIRE) {
dns_compress_setmethods(cctx, DNS_COMPRESS_GLOBAL14); dns_compress_setmethods(cctx, DNS_COMPRESS_GLOBAL14);
dns_name_init(&name, NULL); dns_name_init(&name, offsets);
dns_rdata_toregion(rdata, &region); dns_rdata_toregion(rdata, &region);
dns_name_fromregion(&name, &region); dns_name_fromregion(&name, &region);
...@@ -176,11 +177,12 @@ freestruct_md(ARGS_FREESTRUCT) { ...@@ -176,11 +177,12 @@ freestruct_md(ARGS_FREESTRUCT) {
static inline isc_result_t static inline isc_result_t
additionaldata_md(ARGS_ADDLDATA) { additionaldata_md(ARGS_ADDLDATA) {
dns_name_t name; dns_name_t name;
dns_offsets_t offsets;
isc_region_t region; isc_region_t region;
REQUIRE(rdata->type == 3); REQUIRE(rdata->type == 3);
dns_name_init(&name, NULL); dns_name_init(&name, offsets);
dns_rdata_toregion(rdata, &region); dns_rdata_toregion(rdata, &region);
dns_name_fromregion(&name, &region); dns_name_fromregion(&name, &region);
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: mf_4.c,v 1.37 2001/01/09 21:54:15 bwelling Exp $ */ /* $Id: mf_4.c,v 1.38 2001/02/12 03:04:44 bwelling Exp $ */
/* reviewed: Wed Mar 15 17:47:33 PST 2000 by brister */ /* reviewed: Wed Mar 15 17:47:33 PST 2000 by brister */
...@@ -81,6 +81,7 @@ fromwire_mf(ARGS_FROMWIRE) { ...@@ -81,6 +81,7 @@ fromwire_mf(ARGS_FROMWIRE) {
static inline isc_result_t static inline isc_result_t
towire_mf(ARGS_TOWIRE) { towire_mf(ARGS_TOWIRE) {
dns_name_t name; dns_name_t name;
dns_offsets_t offsets;
isc_region_t region; isc_region_t region;
REQUIRE(rdata->type == 4); REQUIRE(rdata->type == 4);
...@@ -88,7 +89,7 @@ towire_mf(ARGS_TOWIRE) { ...@@ -88,7 +89,7 @@ towire_mf(ARGS_TOWIRE) {
dns_compress_setmethods(cctx, DNS_COMPRESS_GLOBAL14); dns_compress_setmethods(cctx, DNS_COMPRESS_GLOBAL14);
dns_name_init(&name, NULL); dns_name_init(&name, offsets);
dns_rdata_toregion(rdata, &region); dns_rdata_toregion(rdata, &region);
dns_name_fromregion(&name, &region); dns_name_fromregion(&name, &region);
...@@ -175,11 +176,12 @@ freestruct_mf(ARGS_FREESTRUCT) { ...@@ -175,11 +176,12 @@ freestruct_mf(ARGS_FREESTRUCT) {
static inline isc_result_t static inline isc_result_t
additionaldata_mf(ARGS_ADDLDATA) { additionaldata_mf(ARGS_ADDLDATA) {
dns_name_t name; dns_name_t name;
dns_offsets_t offsets;
isc_region_t region; isc_region_t region;
REQUIRE(rdata->type == 4); REQUIRE(rdata->type == 4);
dns_name_init(&name, NULL); dns_name_init(&name, offsets);
dns_rdata_toregion(rdata, &region); dns_rdata_toregion(rdata, &region);
dns_name_fromregion(&name, &region); dns_name_fromregion(&name, &region);
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: mg_8.c,v 1.35 2001/01/09 21:54:17 bwelling Exp $ */ /* $Id: mg_8.c,v 1.36 2001/02/12 03:04:45 bwelling Exp $ */
/* reviewed: Wed Mar 15 17:49:21 PST 2000 by brister */ /* reviewed: Wed Mar 15 17:49:21 PST 2000 by brister */
...@@ -81,6 +81,7 @@ fromwire_mg(ARGS_FROMWIRE) { ...@@ -81,6 +81,7 @@ fromwire_mg(ARGS_FROMWIRE) {
static inline isc_result_t static inline isc_result_t
towire_mg(ARGS_TOWIRE) { towire_mg(ARGS_TOWIRE) {
dns_name_t name; dns_name_t name;
dns_offsets_t offsets;
isc_region_t region; isc_region_t region;
REQUIRE(rdata->type == 8); REQUIRE(rdata->type == 8);
...@@ -88,7 +89,7 @@ towire_mg(ARGS_TOWIRE) { ...@@ -88,7 +89,7 @@ towire_mg(ARGS_TOWIRE) {
dns_compress_setmethods(cctx, DNS_COMPRESS_GLOBAL14); dns_compress_setmethods(cctx, DNS_COMPRESS_GLOBAL14);
dns_name_init(&name, NULL); dns_name_init(&name, offsets);
dns_rdata_toregion(rdata, &region); dns_rdata_toregion(rdata, &region);
dns_name_fromregion(&name, &region); dns_name_fromregion(&name, &region);
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: minfo_14.c,v 1.36 2001/01/09 21:54:20 bwelling Exp $ */ /* $Id: minfo_14.c,v 1.37 2001/02/12 03:04:46 bwelling Exp $ */
/* reviewed: Wed Mar 15 17:45:32 PST 2000 by brister */ /* reviewed: Wed Mar 15 17:45:32 PST 2000 by brister */
...@@ -104,14 +104,16 @@ towire_minfo(ARGS_TOWIRE) { ...@@ -104,14 +104,16 @@ towire_minfo(ARGS_TOWIRE) {
isc_region_t region; isc_region_t region;
dns_name_t rmail; dns_name_t rmail;
dns_name_t email; dns_name_t email;
dns_offsets_t roffsets;
dns_offsets_t eoffsets;
REQUIRE(rdata->type == 14); REQUIRE(rdata->type == 14);
REQUIRE(rdata->length != 0); REQUIRE(rdata->length != 0);
dns_compress_setmethods(cctx, DNS_COMPRESS_GLOBAL14); dns_compress_setmethods(cctx, DNS_COMPRESS_GLOBAL14);
dns_name_init(&rmail, NULL); dns_name_init(&rmail, roffsets);
dns_name_init(&email, NULL); dns_name_init(&email, eoffsets);
dns_rdata_toregion(rdata, &region); dns_rdata_toregion(rdata, &region);
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: mr_9.c,v 1.34 2001/01/09 21:54:22 bwelling Exp $ */ /* $Id: mr_9.c,v 1.35 2001/02/12 03:04:47 bwelling Exp $ */
/* Reviewed: Wed Mar 15 21:30:35 EST 2000 by tale */ /* Reviewed: Wed Mar 15 21:30:35 EST 2000 by tale */
...@@ -81,6 +81,7 @@ fromwire_mr(ARGS_FROMWIRE) { ...@@ -81,6 +81,7 @@ fromwire_mr(ARGS_FROMWIRE) {
static inline isc_result_t static inline isc_result_t
towire_mr(ARGS_TOWIRE) { towire_mr(ARGS_TOWIRE) {
dns_name_t name; dns_name_t name;
dns_offsets_t offsets;
isc_region_t region; isc_region_t region;
REQUIRE(rdata->type == 9); REQUIRE(rdata->type == 9);
...@@ -88,7 +89,7 @@ towire_mr(ARGS_TOWIRE) { ...@@ -88,7 +89,7 @@ towire_mr(ARGS_TOWIRE) {
dns_compress_setmethods(cctx, DNS_COMPRESS_GLOBAL14); dns_compress_setmethods(cctx, DNS_COMPRESS_GLOBAL14);
dns_name_init(&name, NULL); dns_name_init(&name, offsets);
dns_rdata_toregion(rdata, &region); dns_rdata_toregion(rdata, &region);
dns_name_fromregion(&name, &region); dns_name_fromregion(&name, &region);
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: mx_15.c,v 1.44 2001/01/09 21:54:24 bwelling Exp $ */ /* $Id: mx_15.c,v 1.45 2001/02/12 03:04:48 bwelling Exp $ */
/* reviewed: Wed Mar 15 18:05:46 PST 2000 by brister */ /* reviewed: Wed Mar 15 18:05:46 PST 2000 by brister */
...@@ -100,6 +100,7 @@ fromwire_mx(ARGS_FROMWIRE) { ...@@ -100,6 +100,7 @@ fromwire_mx(ARGS_FROMWIRE) {
static inline isc_result_t static inline isc_result_t
towire_mx(ARGS_TOWIRE) { towire_mx(ARGS_TOWIRE) {
dns_name_t name; dns_name_t name;
dns_offsets_t offsets;
isc_region_t region; isc_region_t region;
REQUIRE(rdata->type == 15); REQUIRE(rdata->type == 15);
...@@ -111,7 +112,7 @@ towire_mx(ARGS_TOWIRE) { ...@@ -111,7 +112,7 @@ towire_mx(ARGS_TOWIRE) {
RETERR(mem_tobuffer(target, region.base, 2)); RETERR(mem_tobuffer(target, region.base, 2));
isc_region_consume(&region, 2); isc_region_consume(&region, 2);
dns_name_init(&name, NULL); dns_name_init(&name, offsets);
dns_name_fromregion(&name, &region); dns_name_fromregion(&name, &region);
return (dns_name_towire(&name, cctx, target)); return (dns_name_towire(&name, cctx, target));
...@@ -209,11 +210,12 @@ freestruct_mx(ARGS_FREESTRUCT) { ...@@ -209,11 +210,12 @@ freestruct_mx(ARGS_FREESTRUCT) {
static inline isc_result_t static inline isc_result_t
additionaldata_mx(ARGS_ADDLDATA) { additionaldata_mx(ARGS_ADDLDATA) {
dns_name_t name; dns_name_t name;
dns_offsets_t offsets;
isc_region_t region; isc_region_t region;
REQUIRE(rdata->type == 15); REQUIRE(rdata->type == 15);
dns_name_init(&name, NULL); dns_name_init(&name, offsets);
dns_rdata_toregion(rdata, &region); dns_rdata_toregion(rdata, &region);
isc_region_consume(&region, 2); isc_region_consume(&region, 2);
dns_name_fromregion(&name, &region); dns_name_fromregion(&name, &region);
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: ns_2.c,v 1.38 2001/01/09 21:54:26 bwelling Exp $ */ /* $Id: ns_2.c,v 1.39 2001/02/12 03:04:49 bwelling Exp $ */
/* Reviewed: Wed Mar 15 18:15:00 PST 2000 by bwelling */ /* Reviewed: Wed Mar 15 18:15:00 PST 2000 by bwelling */
...@@ -81,6 +81,7 @@ fromwire_ns(ARGS_FROMWIRE) { ...@@ -81,6 +81,7 @@ fromwire_ns(ARGS_FROMWIRE) {
static inline isc_result_t static inline isc_result_t
towire_ns(ARGS_TOWIRE) { towire_ns(ARGS_TOWIRE) {
dns_name_t name; dns_name_t name;
dns_offsets_t offsets;
isc_region_t region; isc_region_t region;
REQUIRE(rdata->type == 2); REQUIRE(rdata->type == 2);
...@@ -88,7 +89,7 @@ towire_ns(ARGS_TOWIRE) { ...@@ -88,7 +89,7 @@ towire_ns(ARGS_TOWIRE) {
dns_compress_setmethods(cctx, DNS_COMPRESS_GLOBAL14); dns_compress_setmethods(cctx, DNS_COMPRESS_GLOBAL14);
dns_name_init(&name, NULL); dns_name_init(&name, offsets);
dns_rdata_toregion(rdata, &region); dns_rdata_toregion(rdata, &region);
dns_name_fromregion(&name, &region); dns_name_fromregion(&name, &region);
...@@ -175,11 +176,12 @@ freestruct_ns(ARGS_FREESTRUCT) { ...@@ -175,11 +176,12 @@ freestruct_ns(ARGS_FREESTRUCT) {
static inline isc_result_t static inline isc_result_t
additionaldata_ns(ARGS_ADDLDATA) { additionaldata_ns(ARGS_ADDLDATA) {
dns_name_t name; dns_name_t name;
dns_offsets_t offsets;
isc_region_t region; isc_region_t region;
REQUIRE(rdata->type == 2); REQUIRE(rdata->type == 2);
dns_name_init(&name, NULL); dns_name_init(&name, offsets);
dns_rdata_toregion(rdata, &region); dns_rdata_toregion(rdata, &region);
dns_name_fromregion(&name, &region); dns_name_fromregion(&name, &region);
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: nxt_30.c,v 1.45 2001/01/09 21:54:31 bwelling Exp $ */ /* $Id: nxt_30.c,v 1.46 2001/02/12 03:04:51 bwelling Exp $ */
/* reviewed: Wed Mar 15 18:21:15 PST 2000 by brister */ /* reviewed: Wed Mar 15 18:21:15 PST 2000 by brister */