lwdgrbn.c revision 499b34cea04a46823d003d4c0520c8b03e8513cb
/*
* Copyright (C) 2000, 2001 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.
*/
/* $Id: lwdgrbn.c,v 1.7 2001/01/09 21:39:52 bwelling 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
int n = 0;
if (result != ISC_R_SUCCESS)
goto cleanup;
result == ISC_R_SUCCESS;
{
n += dns_rdataset_count(&set);
}
if (result != ISC_R_NOMORE)
goto cleanup;
*count = n;
return (result);
}
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 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;
else {
if (result != ISC_R_SUCCESS)
goto out;
}
if (sigrdataset != NULL)
else
if (result != ISC_R_SUCCESS)
goto out;
/* If rdataset is NULL, get this later. */
else
/* If rdataset is NULL, remove this later. */
goto out;
goto out;
i = 0;
goto out;
} else {
if (result != ISC_R_SUCCESS)
goto out;
i = 0;
result == ISC_R_SUCCESS;
{
continue;
}
if (result != ISC_R_SUCCESS)
break;
}
if (result == ISC_R_NOMORE)
goto out;
}
sizeof(unsigned char *));
goto out;
sizeof(lwres_uint16_t));
goto out;
if (sigrdataset != NULL) {
i = 0;
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:
}