lookup.c revision f3ca27e9fe307b55e35ea8d7b37351650630e5a3
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * Copyright (C) 2000, 2001 Internet Software Consortium.
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence * Permission to use, copy, modify, and distribute this software for any
e44e0ff3850931e7a79e4c86363f52990536f7bfDavid Lawrence * purpose with or without fee is hereby granted, provided that the above
e44e0ff3850931e7a79e4c86363f52990536f7bfDavid Lawrence * copyright notice and this permission notice appear in all copies.
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
50105afc551903541608b11851d73278b23579a3Mark Andrews/* $Id: lookup.c,v 1.10 2001/11/12 19:05:17 gson Exp $ */
f333ea9bdd3f85b74ae790e6c8ce2684295b3483Andreas Gustafsson#include <isc/string.h> /* Required for HP/UX (and others?) */
cc1eee4f5188a8174f10ab86da273fee50aa481aBrian Wellington /* Unlocked. */
cc1eee4f5188a8174f10ab86da273fee50aa481aBrian Wellington /* Locked by lock. */
cc1eee4f5188a8174f10ab86da273fee50aa481aBrian Wellington#define LOOKUP_MAGIC ISC_MAGIC('l', 'o', 'o', 'k')
cc1eee4f5188a8174f10ab86da273fee50aa481aBrian Wellington#define VALID_LOOKUP(l) ISC_MAGIC_VALID((l), LOOKUP_MAGIC)
243ac4ecc1f45db7106c9166cd4187843507644cBrian Wellingtonstatic void lookup_find(dns_lookup_t *lookup, dns_fetchevent_t *event);
static inline isc_result_t
return (result);
static isc_result_t
goto fail;
goto fail;
goto fail;
sizeof(dns_rdataset_t));
goto fail;
return (ISC_R_SUCCESS);
fail:
return (result);
static isc_result_t
return (result);
int order;
goto done;
switch (result) {
case ISC_R_SUCCESS:
case DNS_R_CNAME:
case DNS_R_DNAME:
NULL);
done:
} while (want_restart);
if (send_event) {
return (ISC_R_NOMEMORY);
goto cleanup_lookup;
goto cleanup_event;
goto cleanup_lock;
return (ISC_R_SUCCESS);
return (result);