Commit 92db5cd7 authored by James Brister's avatar James Brister
Browse files

Renamed many identifiers to match coding guidelines.

parent feb08cec
This diff is collapsed.
......@@ -15,7 +15,7 @@
* SOFTWARE.
*/
/* $Id: zone.c,v 1.2 1999/09/03 13:21:30 marka Exp $ */
/* $Id: zone.c,v 1.3 1999/09/03 20:59:50 brister Exp $ */
#include <config.h>
......@@ -130,9 +130,9 @@ struct dns_zone {
isc_task_t * task;
isc_sockaddr_t xfrsource;
/* Access Control Lists */
dns_c_ipmatch_list_t *update_acl;
dns_c_ipmatch_list_t *query_acl;
dns_c_ipmatch_list_t *xfr_acl;
dns_c_ipmatchlist_t *update_acl;
dns_c_ipmatchlist_t *query_acl;
dns_c_ipmatchlist_t *xfr_acl;
dns_c_severity_t check_names;
dns_c_pubkey_t *pubkey;
ISC_LIST(dns_zone_checkservers_t) checkservers;
......@@ -2133,7 +2133,7 @@ dns_zone_copy(dns_c_ctx_t *ctx, dns_c_zone_t *czone, dns_zone_t *zone) {
isc_boolean_t boolean;
const char *filename = NULL;
const char *ixfr = NULL;
dns_c_ipmatch_list_t *acl;
dns_c_ipmatchlist_t *acl;
dns_c_severity_t severity;
dns_c_iplist_t *iplist = NULL;
dns_c_pubkey_t *pubkey = NULL;
......@@ -2147,7 +2147,7 @@ dns_zone_copy(dns_c_ctx_t *ctx, dns_c_zone_t *czone, dns_zone_t *zone) {
switch (czone->ztype) {
case dns_c_zone_master:
iresult = dns_c_zone_get_file(czone, &filename);
iresult = dns_c_zone_getfile(czone, &filename);
if (iresult != ISC_R_SUCCESS)
return (iresult);
......@@ -2155,46 +2155,46 @@ dns_zone_copy(dns_c_ctx_t *ctx, dns_c_zone_t *czone, dns_zone_t *zone) {
if (result != DNS_R_SUCCESS)
return (iresult);
iresult = dns_c_zone_get_checknames(czone, &severity);
iresult = dns_c_zone_getchecknames(czone, &severity);
if (iresult == ISC_R_SUCCESS)
dns_zone_setchecknames(zone, severity);
else
dns_zone_setchecknames(zone, dns_c_severity_fail);
acl = NULL;
iresult = dns_c_zone_get_allow_upd(czone, &acl);
iresult = dns_c_zone_getallowupd(czone, &acl);
if (iresult == ISC_R_SUCCESS)
dns_zone_setupdateacl(zone, acl);
else
dns_zone_clearupdateacl(zone);
acl = NULL;
iresult = dns_c_zone_get_allow_query(czone, &acl);
iresult = dns_c_zone_getallowquery(czone, &acl);
if (iresult == ISC_R_SUCCESS)
dns_zone_setqueryacl(zone, acl);
else
dns_zone_clearqueryacl(zone);
acl = NULL;
iresult = dns_c_zone_get_allow_transfer(czone, &acl);
iresult = dns_c_zone_getallowtransfer(czone, &acl);
if (iresult == ISC_R_SUCCESS)
dns_zone_setxfracl(zone, acl);
else
dns_zone_clearxfracl(zone);
iresult = dns_c_zone_get_dialup(czone, &boolean);
iresult = dns_c_zone_getdialup(czone, &boolean);
if (iresult == ISC_R_SUCCESS)
dns_zone_setoption(zone, DNS_ZONE_O_DIALUP, boolean);
else
dns_zone_clearoption(zone, DNS_ZONE_O_DIALUP);
iresult = dns_c_zone_get_notify(czone, &boolean);
iresult = dns_c_zone_getnotify(czone, &boolean);
if (iresult == ISC_R_SUCCESS)
dns_zone_setoption(zone, DNS_ZONE_O_NOTIFY, boolean);
else
dns_zone_clearoption(zone, DNS_ZONE_O_NOTIFY);
iresult = dns_c_zone_get_also_notify(czone, &iplist);
iresult = dns_c_zone_getalsonotify(czone, &iplist);
if (iresult == ISC_R_SUCCESS) {
for (i = 0; i < iplist->nextidx; i++) {
isc_sockaddr_t s;
......@@ -2207,7 +2207,7 @@ dns_zone_copy(dns_c_ctx_t *ctx, dns_c_zone_t *czone, dns_zone_t *zone) {
} else
dns_zone_clearnotify(zone);
iresult = dns_c_zone_get_ixfr_base(czone, &ixfr);
iresult = dns_c_zone_getixfrbase(czone, &ixfr);
if (iresult == ISC_R_SUCCESS) {
result = dns_zone_setixfrlog(zone, ixfr);
if (result != DNS_R_SUCCESS)
......@@ -2215,12 +2215,12 @@ dns_zone_copy(dns_c_ctx_t *ctx, dns_c_zone_t *czone, dns_zone_t *zone) {
}
czone->u.mzone.ixfr_tmp; /*XXX*/
iresult = dns_c_zone_get_max_ixfr_log(czone, &size);
iresult = dns_c_zone_getmaxixfrlog(czone, &size);
if (iresult == ISC_R_SUCCESS)
dns_zone_setixfrlogsize(zone, size);
czone->u.mzone.maint_ixfr_base; /*XXX*/
iresult = dns_c_zone_get_pubkey(czone, &pubkey);
iresult = dns_c_zone_getpubkey(czone, &pubkey);
if (iresult == ISC_R_SUCCESS)
dns_zone_setpubkey(zone, pubkey);
else
......@@ -2228,54 +2228,54 @@ dns_zone_copy(dns_c_ctx_t *ctx, dns_c_zone_t *czone, dns_zone_t *zone) {
break;
case dns_c_zone_slave:
iresult = dns_c_zone_get_file(czone, &filename);
iresult = dns_c_zone_getfile(czone, &filename);
if (iresult != ISC_R_SUCCESS)
return (iresult);
result = dns_zone_setdatabase(zone, filename);
if (result != DNS_R_SUCCESS)
return (iresult);
iresult = dns_c_zone_get_checknames(czone, &severity);
iresult = dns_c_zone_getchecknames(czone, &severity);
if (iresult == ISC_R_SUCCESS)
dns_zone_setchecknames(zone, severity);
else
dns_zone_setchecknames(zone, dns_c_severity_warn);
acl = NULL;
iresult = dns_c_zone_get_allow_upd(czone, &acl);
iresult = dns_c_zone_getallowupd(czone, &acl);
if (iresult == ISC_R_SUCCESS)
dns_zone_setupdateacl(zone, acl);
else
dns_zone_clearupdateacl(zone);
acl = NULL;
iresult = dns_c_zone_get_allow_query(czone, &acl);
iresult = dns_c_zone_getallowquery(czone, &acl);
if (iresult == ISC_R_SUCCESS)
dns_zone_setqueryacl(zone, acl);
else
dns_zone_clearqueryacl(zone);
acl = NULL;
iresult = dns_c_zone_get_allow_transfer(czone, &acl);
iresult = dns_c_zone_getallowtransfer(czone, &acl);
if (iresult == ISC_R_SUCCESS)
dns_zone_setxfracl(zone, acl);
else
dns_zone_clearxfracl(zone);
iresult = dns_c_zone_get_dialup(czone, &boolean);
iresult = dns_c_zone_getdialup(czone, &boolean);
if (iresult == ISC_R_SUCCESS)
dns_zone_setoption(zone, DNS_ZONE_O_DIALUP, boolean);
else
dns_zone_clearoption(zone, DNS_ZONE_O_DIALUP);
/* notify is off by default for slave zones */
iresult = dns_c_zone_get_notify(czone, &boolean);
iresult = dns_c_zone_getnotify(czone, &boolean);
if (iresult == ISC_R_SUCCESS)
dns_zone_setoption(zone, DNS_ZONE_O_NOTIFY, boolean);
else
dns_zone_setoption(zone, DNS_ZONE_O_NOTIFY, ISC_FALSE);
iresult = dns_c_zone_get_also_notify(czone, &iplist);
iresult = dns_c_zone_getalsonotify(czone, &iplist);
if (iresult == ISC_R_SUCCESS) {
for (i = 0; i < iplist->nextidx; i++) {
isc_sockaddr_t s;
......@@ -2288,34 +2288,34 @@ dns_zone_copy(dns_c_ctx_t *ctx, dns_c_zone_t *czone, dns_zone_t *zone) {
} else
dns_zone_clearnotify(zone);
iresult = dns_c_zone_get_ixfr_base(czone, &ixfr);
iresult = dns_c_zone_getixfrbase(czone, &ixfr);
if (iresult == ISC_R_SUCCESS) {
result = dns_zone_setixfrlog(zone, ixfr);
if (result != DNS_R_SUCCESS)
return (result);
}
/* czone->u.szone.ixfr_tmp; XXX*/
iresult = dns_c_zone_get_max_ixfr_log(czone, &size);
iresult = dns_c_zone_getmaxixfrlog(czone, &size);
if (iresult == ISC_R_SUCCESS)
dns_zone_setixfrlogsize(zone, size);
czone->u.szone.maint_ixfr_base; /*XXX*/
iresult = dns_c_zone_get_pubkey(czone, &pubkey);
iresult = dns_c_zone_getpubkey(czone, &pubkey);
if (iresult == ISC_R_SUCCESS)
dns_zone_setpubkey(zone, pubkey);
else
dns_c_zone_get_pubkey(czone, NULL);
dns_c_zone_getpubkey(czone, NULL);
/*
* should master port be seperate or just applied to
* isc_sockaddr_t's
*/
iresult = dns_c_zone_get_master_port(czone, &port);
iresult = dns_c_zone_getmasterport(czone, &port);
if (iresult != ISC_R_SUCCESS)
port = 53;
dns_zone_setmasterport(zone, port);
iresult = dns_c_zone_get_master_ips(czone, &iplist);
iresult = dns_c_zone_getmasterips(czone, &iplist);
if (iresult == ISC_R_SUCCESS) {
for (i = 0; i < iplist->nextidx; i++) {
isc_sockaddr_t s;
......@@ -2328,7 +2328,7 @@ dns_zone_copy(dns_c_ctx_t *ctx, dns_c_zone_t *czone, dns_zone_t *zone) {
} else
dns_zone_clearmasters(zone);
iresult = dns_c_zone_get_transfer_source(czone, &addr);
iresult = dns_c_zone_gettransfersource(czone, &addr);
if (iresult == ISC_R_SUCCESS) {
isc_sockaddr_t s;
......@@ -2338,7 +2338,7 @@ dns_zone_copy(dns_c_ctx_t *ctx, dns_c_zone_t *czone, dns_zone_t *zone) {
return (result);
}
iresult = dns_c_zone_get_max_trans_time_in(czone, &xfrtime);
iresult = dns_c_zone_getmaxtranstimein(czone, &xfrtime);
if (iresult == ISC_R_SUCCESS)
dns_zone_setxfrtime(zone, xfrtime);
else
......@@ -2357,38 +2357,38 @@ dns_zone_copy(dns_c_ctx_t *ctx, dns_c_zone_t *czone, dns_zone_t *zone) {
break;
case dns_c_zone_stub:
iresult = dns_c_zone_get_file(czone, &filename);
iresult = dns_c_zone_getfile(czone, &filename);
if (iresult != ISC_R_SUCCESS)
return (iresult);
result = dns_zone_setdatabase(zone, filename);
if (result != DNS_R_SUCCESS)
return (iresult);
iresult = dns_c_zone_get_checknames(czone, &severity);
iresult = dns_c_zone_getchecknames(czone, &severity);
if (iresult == ISC_R_SUCCESS)
dns_zone_setchecknames(zone, severity);
else
dns_zone_setchecknames(zone, dns_c_severity_warn);
acl = NULL;
iresult = dns_c_zone_get_allow_query(czone, &acl);
iresult = dns_c_zone_getallowquery(czone, &acl);
if (iresult == ISC_R_SUCCESS)
dns_zone_setqueryacl(zone, acl);
else
dns_zone_clearqueryacl(zone);
iresult = dns_c_zone_get_pubkey(czone, &pubkey);
iresult = dns_c_zone_getpubkey(czone, &pubkey);
if (iresult == ISC_R_SUCCESS)
dns_zone_setpubkey(zone, pubkey);
else
dns_zone_setpubkey(zone, NULL);
iresult = dns_c_zone_get_master_port(czone, &port);
iresult = dns_c_zone_getmasterport(czone, &port);
if (iresult != ISC_R_SUCCESS)
port = 53;
dns_zone_setmasterport(zone, port);
iresult = dns_c_zone_get_master_ips(czone, &iplist);
iresult = dns_c_zone_getmasterips(czone, &iplist);
if (iresult == ISC_R_SUCCESS) {
for (i = 0; i < iplist->nextidx; i++) {
isc_sockaddr_t s;
......@@ -2404,20 +2404,20 @@ dns_zone_copy(dns_c_ctx_t *ctx, dns_c_zone_t *czone, dns_zone_t *zone) {
break;
case dns_c_zone_hint:
iresult = dns_c_zone_get_file(czone, &filename);
iresult = dns_c_zone_getfile(czone, &filename);
if (iresult != ISC_R_SUCCESS)
return (iresult);
result = dns_zone_setdatabase(zone, filename);
if (result != DNS_R_SUCCESS)
return (result);
iresult = dns_c_zone_get_checknames(czone, &severity);
iresult = dns_c_zone_getchecknames(czone, &severity);
if (iresult == ISC_R_SUCCESS)
dns_zone_setchecknames(zone, severity);
else
dns_zone_setchecknames(zone, dns_c_severity_fail);
iresult = dns_c_zone_get_pubkey(czone, &pubkey);
iresult = dns_c_zone_getpubkey(czone, &pubkey);
if (iresult == ISC_R_SUCCESS)
dns_zone_setpubkey(zone, pubkey);
else
......@@ -2429,42 +2429,42 @@ dns_zone_copy(dns_c_ctx_t *ctx, dns_c_zone_t *czone, dns_zone_t *zone) {
}
void
dns_zone_setqueryacl(dns_zone_t *zone, dns_c_ipmatch_list_t *acl) {
dns_zone_setqueryacl(dns_zone_t *zone, dns_c_ipmatchlist_t *acl) {
REQUIRE(VALID_ZONE(zone));
LOCK(&zone->lock);
if (zone->query_acl != NULL)
dns_c_ipmatch_list_delete(&zone->query_acl);
zone->query_acl = dns_c_ipmatch_list_attach(acl);
dns_c_ipmatchlist_delete(&zone->query_acl);
zone->query_acl = dns_c_ipmatchlist_attach(acl);
UNLOCK(&zone->lock);
}
void
dns_zone_setupdateacl(dns_zone_t *zone, dns_c_ipmatch_list_t *acl) {
dns_zone_setupdateacl(dns_zone_t *zone, dns_c_ipmatchlist_t *acl) {
REQUIRE(VALID_ZONE(zone));
LOCK(&zone->lock);
if (zone->update_acl != NULL)
dns_c_ipmatch_list_delete(&zone->update_acl);
zone->update_acl = dns_c_ipmatch_list_attach(acl);
dns_c_ipmatchlist_delete(&zone->update_acl);
zone->update_acl = dns_c_ipmatchlist_attach(acl);
UNLOCK(&zone->lock);
}
void
dns_zone_setxfracl(dns_zone_t *zone, dns_c_ipmatch_list_t *acl) {
dns_zone_setxfracl(dns_zone_t *zone, dns_c_ipmatchlist_t *acl) {
REQUIRE(VALID_ZONE(zone));
LOCK(&zone->lock);
if (zone->xfr_acl != NULL)
dns_c_ipmatch_list_delete(&zone->xfr_acl);
zone->xfr_acl = dns_c_ipmatch_list_attach(acl);
dns_c_ipmatchlist_delete(&zone->xfr_acl);
zone->xfr_acl = dns_c_ipmatchlist_attach(acl);
UNLOCK(&zone->lock);
}
dns_c_ipmatch_list_t *
dns_c_ipmatchlist_t *
dns_zone_getqueryacl(dns_zone_t *zone) {
REQUIRE(VALID_ZONE(zone));
......@@ -2472,7 +2472,7 @@ dns_zone_getqueryacl(dns_zone_t *zone) {
return (zone->query_acl);
}
dns_c_ipmatch_list_t *
dns_c_ipmatchlist_t *
dns_zone_getupdateacl(dns_zone_t *zone) {
REQUIRE(VALID_ZONE(zone));
......@@ -2480,7 +2480,7 @@ dns_zone_getupdateacl(dns_zone_t *zone) {
return (zone->update_acl);
}
dns_c_ipmatch_list_t *
dns_c_ipmatchlist_t *
dns_zone_getxfracl(dns_zone_t *zone) {
REQUIRE(VALID_ZONE(zone));
......@@ -2495,7 +2495,7 @@ dns_zone_clearupdateacl(dns_zone_t *zone) {
LOCK(&zone->lock);
if (zone->update_acl != NULL)
dns_c_ipmatch_list_delete(&zone->update_acl);
dns_c_ipmatchlist_delete(&zone->update_acl);
UNLOCK(&zone->lock);
}
......@@ -2506,7 +2506,7 @@ dns_zone_clearqueryacl(dns_zone_t *zone) {
LOCK(&zone->lock);
if (zone->query_acl != NULL)
dns_c_ipmatch_list_delete(&zone->query_acl);
dns_c_ipmatchlist_delete(&zone->query_acl);
UNLOCK(&zone->lock);
}
......@@ -2517,7 +2517,7 @@ dns_zone_clearxfracl(dns_zone_t *zone) {
LOCK(&zone->lock);
if (zone->xfr_acl != NULL)
dns_c_ipmatch_list_delete(&zone->xfr_acl);
dns_c_ipmatchlist_delete(&zone->xfr_acl);
UNLOCK(&zone->lock);
}
......
Supports Markdown
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