bool dns_zoneinfo_load_zone_property(struct dnsserver_zoneinfo *zoneinfo,
				     struct dnsp_DnsProperty *prop)
{
	switch (prop->id) {
	case DSPROPERTY_ZONE_TYPE:
		zoneinfo->dwZoneType = prop->data.zone_type;
		break;
	case DSPROPERTY_ZONE_ALLOW_UPDATE:
		zoneinfo->fAllowUpdate = prop->data.allow_update_flag;
		break;
	case DSPROPERTY_ZONE_NOREFRESH_INTERVAL:
		zoneinfo->dwNoRefreshInterval = prop->data.norefresh_hours;
		break;
	case DSPROPERTY_ZONE_REFRESH_INTERVAL:
		zoneinfo->dwRefreshInterval = prop->data.refresh_hours;
		break;
	case DSPROPERTY_ZONE_AGING_STATE:
		zoneinfo->fAging = prop->data.aging_enabled;
		break;
	case DSPROPERTY_ZONE_SCAVENGING_SERVERS:
		zoneinfo->aipScavengeServers = copy_ip4_array(
		    zoneinfo, "ZONE_SCAVENGING_SERVERS", prop->data.servers);
		if (zoneinfo->aipScavengeServers == NULL) {
			return false;
		}
		break;
	case DSPROPERTY_ZONE_AGING_ENABLED_TIME:
		zoneinfo->dwAvailForScavengeTime =
		    prop->data.next_scavenging_cycle_hours;
		break;
	case DSPROPERTY_ZONE_MASTER_SERVERS:
		zoneinfo->aipLocalMasters = copy_ip4_array(
		    zoneinfo, "ZONE_MASTER_SERVERS", prop->data.master_servers);
		if (zoneinfo->aipLocalMasters == NULL) {
			return false;
		}
		break;
	case DSPROPERTY_ZONE_EMPTY:
	case DSPROPERTY_ZONE_SECURE_TIME:
	case DSPROPERTY_ZONE_DELETED_FROM_HOSTNAME:
	case DSPROPERTY_ZONE_AUTO_NS_SERVERS:
	case DSPROPERTY_ZONE_DCPROMO_CONVERT:
	case DSPROPERTY_ZONE_SCAVENGING_SERVERS_DA:
	case DSPROPERTY_ZONE_MASTER_SERVERS_DA:
	case DSPROPERTY_ZONE_NS_SERVERS_DA:
	case DSPROPERTY_ZONE_NODE_DBFLAGS:
		break;
	}
	return true;
}
bool dns_zoneinfo_load_zone_property(struct dnsserver_zoneinfo *zoneinfo,
				     struct dnsp_DnsProperty *prop)
{
	switch (prop->id) {
	case DSPROPERTY_ZONE_TYPE:
		zoneinfo->dwZoneType = prop->data.zone_type;
		break;
	case DSPROPERTY_ZONE_ALLOW_UPDATE:
		zoneinfo->fAllowUpdate = prop->data.allow_update_flag;
		break;
	case DSPROPERTY_ZONE_NOREFRESH_INTERVAL:
		zoneinfo->dwNoRefreshInterval = prop->data.norefresh_hours;
		break;
	case DSPROPERTY_ZONE_REFRESH_INTERVAL:
		zoneinfo->dwRefreshInterval = prop->data.refresh_hours;
		break;
	case DSPROPERTY_ZONE_AGING_STATE:
		zoneinfo->fAging = prop->data.aging_enabled;
		break;
	case DSPROPERTY_ZONE_SCAVENGING_SERVERS:
		zoneinfo->aipScavengeServers = copy_ip4_array(
		    zoneinfo, "ZONE_SCAVENGING_SERVERS", prop->data.servers);
		if (zoneinfo->aipScavengeServers == NULL) {
			return false;
		}
		break;
	case DSPROPERTY_ZONE_AGING_ENABLED_TIME:
		zoneinfo->dwAvailForScavengeTime =
		    prop->data.next_scavenging_cycle_hours;
		break;
	case DSPROPERTY_ZONE_MASTER_SERVERS:
		zoneinfo->aipLocalMasters = copy_ip4_array(
		    zoneinfo, "ZONE_MASTER_SERVERS", prop->data.master_servers);
		if (zoneinfo->aipLocalMasters == NULL) {
			return false;
		}
		break;
	case DSPROPERTY_ZONE_EMPTY:
	case DSPROPERTY_ZONE_SECURE_TIME:
	case DSPROPERTY_ZONE_DELETED_FROM_HOSTNAME:
	case DSPROPERTY_ZONE_AUTO_NS_SERVERS:
	case DSPROPERTY_ZONE_DCPROMO_CONVERT:
	case DSPROPERTY_ZONE_SCAVENGING_SERVERS_DA:
	case DSPROPERTY_ZONE_MASTER_SERVERS_DA:
	case DSPROPERTY_ZONE_NS_SERVERS_DA:
	case DSPROPERTY_ZONE_NODE_DBFLAGS:
		break;
	}
	return true;
}