2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-29 13:38:26 +00:00

additional data support

This commit is contained in:
Bob Halley 1999-08-03 01:21:23 +00:00
parent 4e37c87da1
commit f1b0e9107d
2 changed files with 17 additions and 8 deletions

View File

@ -15,7 +15,7 @@
* SOFTWARE. * SOFTWARE.
*/ */
/* $Id: mx_15.c,v 1.17 1999/08/02 22:18:00 halley Exp $ */ /* $Id: mx_15.c,v 1.18 1999/08/03 01:21:23 halley Exp $ */
#ifndef RDATA_GENERIC_MX_15_C #ifndef RDATA_GENERIC_MX_15_C
#define RDATA_GENERIC_MX_15_C #define RDATA_GENERIC_MX_15_C
@ -199,12 +199,17 @@ static dns_result_t
additionaldata_mx(dns_rdata_t *rdata, dns_additionaldatafunc_t add, additionaldata_mx(dns_rdata_t *rdata, dns_additionaldatafunc_t add,
void *arg) void *arg)
{ {
dns_name_t name;
isc_region_t region;
REQUIRE(rdata->type == 15); REQUIRE(rdata->type == 15);
(void)add; dns_name_init(&name, NULL);
(void)arg; dns_rdata_toregion(rdata, &region);
isc_region_consume(&region, 2);
dns_name_fromregion(&name, &region);
return (DNS_R_SUCCESS); return ((add)(arg, &name, dns_rdatatype_a));
} }
#endif /* RDATA_GENERIC_MX_15_C */ #endif /* RDATA_GENERIC_MX_15_C */

View File

@ -15,7 +15,7 @@
* SOFTWARE. * SOFTWARE.
*/ */
/* $Id: ns_2.c,v 1.14 1999/08/02 22:18:00 halley Exp $ */ /* $Id: ns_2.c,v 1.15 1999/08/03 01:21:23 halley Exp $ */
#ifndef RDATA_GENERIC_NS_2_C #ifndef RDATA_GENERIC_NS_2_C
#define RDATA_GENERIC_NS_2_C #define RDATA_GENERIC_NS_2_C
@ -172,12 +172,16 @@ static dns_result_t
additionaldata_ns(dns_rdata_t *rdata, dns_additionaldatafunc_t add, additionaldata_ns(dns_rdata_t *rdata, dns_additionaldatafunc_t add,
void *arg) void *arg)
{ {
dns_name_t name;
isc_region_t region;
REQUIRE(rdata->type == 2); REQUIRE(rdata->type == 2);
(void)add; dns_name_init(&name, NULL);
(void)arg; dns_rdata_toregion(rdata, &region);
dns_name_fromregion(&name, &region);
return (DNS_R_SUCCESS); return ((add)(arg, &name, dns_rdatatype_a));
} }
#endif /* RDATA_GENERIC_NS_2_C */ #endif /* RDATA_GENERIC_NS_2_C */