Commit b1bc194f authored by Bob Halley's avatar Bob Halley
Browse files

additional data support

parent 89d8adb6
......@@ -15,7 +15,7 @@
* SOFTWARE.
*/
/* $Id: afsdb_18.c,v 1.9 1999/08/02 22:17:58 halley Exp $ */
/* $Id: afsdb_18.c,v 1.10 1999/08/03 20:55:19 halley Exp $ */
/* RFC 1183 */
......@@ -205,12 +205,17 @@ static dns_result_t
additionaldata_afsdb(dns_rdata_t *rdata, dns_additionaldatafunc_t add,
void *arg)
{
dns_name_t name;
isc_region_t region;
REQUIRE(rdata->type == 18);
(void)add;
(void)arg;
dns_name_init(&name, NULL);
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_AFSDB_18_C */
......@@ -15,7 +15,7 @@
* SOFTWARE.
*/
/* $Id: mb_7.c,v 1.15 1999/08/02 22:17:59 halley Exp $ */
/* $Id: mb_7.c,v 1.16 1999/08/03 20:55:19 halley Exp $ */
#ifndef RDATA_GENERIC_MB_7_C
#define RDATA_GENERIC_MB_7_C
......@@ -162,12 +162,16 @@ static dns_result_t
additionaldata_mb(dns_rdata_t *rdata, dns_additionaldatafunc_t add,
void *arg)
{
dns_name_t name;
isc_region_t region;
REQUIRE(rdata->type == 7);
(void)add;
(void)arg;
dns_name_init(&name, NULL);
dns_rdata_toregion(rdata, &region);
dns_name_fromregion(&name, &region);
return (DNS_R_SUCCESS);
return ((add)(arg, &name, dns_rdatatype_a));
}
#endif /* RDATA_GENERIC_MB_7_C */
......@@ -15,7 +15,7 @@
* SOFTWARE.
*/
/* $Id: md_3.c,v 1.15 1999/08/02 22:17:59 halley Exp $ */
/* $Id: md_3.c,v 1.16 1999/08/03 20:55:19 halley Exp $ */
#ifndef RDATA_GENERIC_MD_3_C
#define RDATA_GENERIC_MD_3_C
......@@ -162,12 +162,16 @@ static dns_result_t
additionaldata_md(dns_rdata_t *rdata, dns_additionaldatafunc_t add,
void *arg)
{
dns_name_t name;
isc_region_t region;
REQUIRE(rdata->type == 3);
(void)add;
(void)arg;
dns_name_init(&name, NULL);
dns_rdata_toregion(rdata, &region);
dns_name_fromregion(&name, &region);
return (DNS_R_SUCCESS);
return ((add)(arg, &name, dns_rdatatype_a));
}
#endif /* RDATA_GENERIC_MD_3_C */
......@@ -15,7 +15,7 @@
* SOFTWARE.
*/
/* $Id: mf_4.c,v 1.14 1999/08/02 22:17:59 halley Exp $ */
/* $Id: mf_4.c,v 1.15 1999/08/03 20:55:19 halley Exp $ */
#ifndef RDATA_GENERIC_MF_4_C
#define RDATA_GENERIC_MF_4_C
......@@ -162,12 +162,16 @@ static dns_result_t
additionaldata_mf(dns_rdata_t *rdata, dns_additionaldatafunc_t add,
void *arg)
{
dns_name_t name;
isc_region_t region;
REQUIRE(rdata->type == 4);
(void)add;
(void)arg;
dns_name_init(&name, NULL);
dns_rdata_toregion(rdata, &region);
dns_name_fromregion(&name, &region);
return (DNS_R_SUCCESS);
return ((add)(arg, &name, dns_rdatatype_a));
}
#endif /* RDATA_GENERIC_MF_4_C */
......@@ -15,7 +15,7 @@
* SOFTWARE.
*/
/* $Id: rt_21.c,v 1.9 1999/08/02 22:18:00 halley Exp $ */
/* $Id: rt_21.c,v 1.10 1999/08/03 20:55:19 halley Exp $ */
/* RFC 1183 */
......@@ -200,12 +200,24 @@ static dns_result_t
additionaldata_rt(dns_rdata_t *rdata, dns_additionaldatafunc_t add,
void *arg)
{
dns_name_t name;
isc_region_t region;
isc_result_t result;
REQUIRE(rdata->type == 21);
(void)add;
(void)arg;
dns_name_init(&name, NULL);
dns_rdata_toregion(rdata, &region);
isc_region_consume(&region, 2);
dns_name_fromregion(&name, &region);
return (DNS_R_SUCCESS);
result = (add)(arg, &name, dns_rdatatype_x25);
if (result != ISC_R_SUCCESS)
return (result);
result = (add)(arg, &name, dns_rdatatype_isdn);
if (result != ISC_R_SUCCESS)
return (result);
return ((add)(arg, &name, dns_rdatatype_a));
}
#endif /* RDATA_GENERIC_RT_21_C */
......@@ -15,7 +15,7 @@
* SOFTWARE.
*/
/* $Id: kx_36.c,v 1.9 1999/08/02 22:18:01 halley Exp $ */
/* $Id: kx_36.c,v 1.10 1999/08/03 20:55:19 halley Exp $ */
/* RFC 2230 */
......@@ -192,13 +192,18 @@ static dns_result_t
additionaldata_in_kx(dns_rdata_t *rdata, dns_additionaldatafunc_t add,
void *arg)
{
dns_name_t name;
isc_region_t region;
REQUIRE(rdata->type == 36);
REQUIRE(rdata->rdclass == 1);
(void)add;
(void)arg;
dns_name_init(&name, NULL);
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_KX_15_C */
......@@ -15,7 +15,7 @@
* SOFTWARE.
*/
/* $Id: naptr_35.c,v 1.9 1999/08/02 22:18:01 halley Exp $ */
/* $Id: naptr_35.c,v 1.10 1999/08/03 20:55:19 halley Exp $ */
/* RFC 2168 */
......@@ -280,6 +280,11 @@ additionaldata_in_naptr(dns_rdata_t *rdata, dns_additionaldatafunc_t add,
REQUIRE(rdata->type == 35);
REQUIRE(rdata->rdclass == 1);
/*
* We do not currently do type SRV additional data section
* processing for terminal NAPTRs.
*/
(void)add;
(void)arg;
......
......@@ -15,7 +15,7 @@
* SOFTWARE.
*/
/* $Id: srv_33.c,v 1.8 1999/08/02 22:18:02 halley Exp $ */
/* $Id: srv_33.c,v 1.9 1999/08/03 20:55:19 halley Exp $ */
/* RFC 2052 bis */
......@@ -222,13 +222,18 @@ static dns_result_t
additionaldata_in_srv(dns_rdata_t *rdata, dns_additionaldatafunc_t add,
void *arg)
{
dns_name_t name;
isc_region_t region;
REQUIRE(rdata->type == 33);
REQUIRE(rdata->rdclass == 1);
(void)add;
(void)arg;
dns_name_init(&name, NULL);
dns_rdata_toregion(rdata, &region);
isc_region_consume(&region, 6);
dns_name_fromregion(&name, &region);
return (DNS_R_SUCCESS);
return ((add)(arg, &name, dns_rdatatype_a));
}
#endif /* RDATA_IN_1_SRV_33_C */
Markdown is supported
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