lwdgrbn.c revision dafcb997e390efa4423883dafd100c975c4095d6
/*
* Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2000, 2001, 2003 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 ISC DISCLAIMS ALL WARRANTIES WITH
* REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS. IN NO EVENT SHALL ISC 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.
*/
/* $Id: lwdgrbn.c,v 1.13 2004/03/05 04:57:47 marka Exp $ */
#include <config.h>
#include <dns/rdataset.h>
#include <dns/rdatasetiter.h>
#include <named/lwdclient.h>
#include <named/lwsearch.h>
static void start_lookup(ns_lwdclient_t *);
static isc_result_t
{
isc_region_t r;
result == ISC_R_SUCCESS;
{
dns_rdata_toregion(&rdata, &r);
(*pos)++;
}
if (result == ISC_R_NOMORE)
return (result);
}
static isc_result_t
{
if (result != ISC_R_SUCCESS)
goto out;
goto out;
goto out;
result == ISC_R_SUCCESS;
{
continue;
}
/* copy & reallocate */
size *= 2;
goto out;
goto out;
}
flags &= (~LWRDATA_VALIDATED);
if (result != ISC_R_SUCCESS)
goto out;
}
if (result == ISC_R_NOMORE)
if (result != ISC_R_SUCCESS)
goto out;
/*
* If necessary, shrink and copy the arrays.
*/
goto out;
goto out;
} else {
}
return (ISC_R_SUCCESS);
out:
return (result);
}
static void
isc_region_t r;
isc_buffer_t b;
int i;
if (result != ISC_R_SUCCESS) {
switch (result) {
case DNS_R_NXDOMAIN:
case DNS_R_NCACHENXDOMAIN:
if (result != ISC_R_SUCCESS)
else {
return;
}
break;
case DNS_R_NXRRSET:
case DNS_R_NCACHENXRRSET:
break;
default:
}
return;
}
b = client->recv_buffer;
if (result != ISC_R_SUCCESS)
goto out;
/* The normal case */
sizeof(unsigned char *));
goto out;
sizeof(lwres_uint16_t));
goto out;
i = 0;
if (result != ISC_R_SUCCESS)
goto out;
} else {
/* The SIG query case */
if (result != ISC_R_SUCCESS)
goto out;
}
if (sigrdataset != NULL) {
sizeof(unsigned char *));
goto out;
sizeof(lwres_uint16_t));
goto out;
i = 0;
if (result != ISC_R_SUCCESS)
goto out;
}
/*
* Render the packet.
*/
if (lwresult != LWRES_R_SUCCESS)
goto out;
if (result != ISC_R_SUCCESS)
goto out;
return;
out:
}
static void
/*
* This will return failure if relative name + suffix is too long.
* In this case, just go on to the next entry in the search path.
*/
if (result != ISC_R_SUCCESS)
if (result != ISC_R_SUCCESS) {
return;
}
}
static void
}
void
if (result != LWRES_R_SUCCESS)
goto out;
goto out;
goto out;
goto out;
if (result != ISC_R_SUCCESS)
goto out;
/*
* We no longer need to keep this around.
*/
/*
* Initialize the real name and alias arrays in the reply we're
* going to build up.
*/
/*
* Start the find.
*/
return;
/*
* We're screwed. Return an error packet to our caller.
*/
out:
}