zoneconf.c revision 94a3e829e0b9e25660ec136742ad5c3694067c70
/*
* Copyright (C) 1999 Internet Software Consortium.
*
* Permission to use, copy, modify, and 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 INTERNET SOFTWARE CONSORTIUM DISCLAIMS
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
* CONSORTIUM 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.
*/
#include <config.h>
#include <isc/assertions.h>
#include <dns/zoneconf.h>
/* XXX copied from zone.c */
/*
* Convenience function for configuring a single zone ACL.
*/
static isc_result_t
void (*clearzacl)(dns_zone_t *))
{
if (result == ISC_R_SUCCESS) {
if (result != DNS_R_SUCCESS)
return (result);
return (ISC_R_SUCCESS);
} else if (result == ISC_R_NOTFOUND) {
return (ISC_R_SUCCESS);
} else {
return (result);
}
}
static dns_zonetype_t
switch (cztype) {
case dns_c_zone_master:
return dns_zone_master;
case dns_c_zone_forward:
return dns_zone_forward;
case dns_c_zone_slave:
return dns_zone_slave;
case dns_c_zone_stub:
return dns_zone_stub;
case dns_c_zone_hint:
return dns_zone_hint;
}
INSIST(0);
return (dns_zone_none); /*NOTREACHED*/
}
{
#ifdef notyet
#endif
isc_uint32_t i;
/* XXX needs to be an zone option */
if (result != DNS_R_SUCCESS)
return (result);
case dns_c_zone_master:
if (result != ISC_R_SUCCESS)
return (result);
if (result != DNS_R_SUCCESS)
return (result);
#ifdef notyet
if (result == ISC_R_SUCCESS)
else
#endif
if (result != DNS_R_SUCCESS)
return (result);
if (result != DNS_R_SUCCESS)
return (result);
if (result != DNS_R_SUCCESS)
return (result);
if (result != DNS_R_SUCCESS)
return (result);
if (result == ISC_R_SUCCESS)
else
if (result == ISC_R_SUCCESS)
else
if (result == ISC_R_SUCCESS) {
if (result != DNS_R_SUCCESS)
return (result);
}
} else
if (result == ISC_R_SUCCESS)
else
if (result == ISC_R_SUCCESS)
else
dns_zone_setidleout(zone, 0);
break;
case dns_c_zone_forward:
#ifdef notyet
/*
* forward zones are still in a state of flux
*/
#endif
break;
case dns_c_zone_slave:
if (result != ISC_R_SUCCESS)
return (result);
if (result != DNS_R_SUCCESS)
return (result);
#ifdef notyet
if (result == ISC_R_SUCCESS)
else
#endif
if (result != DNS_R_SUCCESS)
return (result);
if (result != ISC_R_SUCCESS)
port = 53;
if (result == ISC_R_SUCCESS) {
if (result != DNS_R_SUCCESS)
return (result);
}
} else
if (result == ISC_R_SUCCESS)
else
if (result == ISC_R_SUCCESS)
else
if (result == ISC_R_SUCCESS)
else
dns_zone_setidlein(zone, 0);
if (result == ISC_R_SUCCESS)
else
if (result == ISC_R_SUCCESS)
else
dns_zone_setidleout(zone, 0);
break;
case dns_c_zone_stub:
if (result != ISC_R_SUCCESS)
return (result);
if (result != DNS_R_SUCCESS)
return (result);
#ifdef notyet
if (result == ISC_R_SUCCESS)
else
#endif
if (result != DNS_R_SUCCESS)
return (result);
if (result != ISC_R_SUCCESS)
port = 53;
if (result == ISC_R_SUCCESS) {
if (result != DNS_R_SUCCESS)
return (result);
}
} else
if (result == ISC_R_SUCCESS)
else
if (result == ISC_R_SUCCESS)
else
if (result == ISC_R_SUCCESS)
else
dns_zone_setidlein(zone, 0);
break;
case dns_c_zone_hint:
if (result != ISC_R_SUCCESS)
return (result);
if (result != DNS_R_SUCCESS)
return (result);
#ifdef notyet
if (result == ISC_R_SUCCESS)
else
#endif
break;
}
return (DNS_R_SUCCESS);
}
{
const char *cfilename;
const char *zfilename;
return (ISC_FALSE);
return (ISC_FALSE);
/* XXX Compare masters, too. */
return (ISC_TRUE);
}
{
if (result != DNS_R_SUCCESS)
val = 10;
return (ISC_R_SUCCESS);
}