nsec.c revision 3398334b3acda24b086957286288ca9852662b12
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt * Copyright (C) 2004, 2005, 2007, 2008 Internet Systems Consortium, Inc. ("ISC")
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt * Copyright (C) 1999-2001, 2003 Internet Software Consortium.
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt * Permission to use, copy, modify, and/or distribute this software for any
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt * purpose with or without fee is hereby granted, provided that the above
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt * copyright notice and this permission notice appear in all copies.
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt * PERFORMANCE OF THIS SOFTWARE.
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt/* $Id: nsec.c,v 1.11 2008/09/25 04:02:38 tbox Exp $ */
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt#define RETERR(x) do { \
ef421f66f47224a42073deaf087378c5d0c9952eEvan Huntset_bit(unsigned char *array, unsigned int index, unsigned int bit) {
ef421f66f47224a42073deaf087378c5d0c9952eEvan Huntstatic unsigned int
ef421f66f47224a42073deaf087378c5d0c9952eEvan Huntbit_isset(unsigned char *array, unsigned int index) {
ef421f66f47224a42073deaf087378c5d0c9952eEvan Huntdns_nsec_buildrdata(dns_db_t *db, dns_dbversion_t *version,
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt unsigned int i, window;
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt unsigned int max_type;
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt * Use the end of the space for a raw bitmap leaving enough
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt * space for the window identifiers and length octets.
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt result = dns_db_allrdatasets(db, node, version, 0, &rdsiter);
for (i = 0; i <= max_type; i++) {
return (result);
if (octet < 0)
return (ISC_R_SUCCESS);
0, NULL);
return (result);
return (present);
return (result);
return (ISC_R_SUCCESS);
return (result);
return (result);