nsec.c revision 185fd227381269568e193147a98f292210a16f2c
/*
* Copyright (C) 1999-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: nsec.c,v 1.4 2003/12/13 04:20:43 marka Exp $ */
#include <config.h>
#include <dns/rdatalist.h>
#include <dns/rdataset.h>
#include <dns/rdatasetiter.h>
#include <dns/rdatastruct.h>
#define RETERR(x) do { \
result = (x); \
if (result != ISC_R_SUCCESS) \
goto failure; \
} while (0)
static void
if (bit != 0)
else
}
static unsigned int
}
{
isc_region_t r;
unsigned int i, window;
int octet;
unsigned int max_type;
dns_name_toregion(target, &r);
/*
* Use the end of the space for a raw bitmap leaving enough
* space for the window identifiers and length octets.
*/
if (result != ISC_R_SUCCESS)
return (result);
result == ISC_R_SUCCESS;
{
}
}
/*
* At zone cuts, deny the existence of glue in the parent zone.
*/
for (i = 0; i <= max_type; i++) {
}
}
if (result != ISC_R_NOMORE)
return (result);
break;
break;
if (octet < 0)
continue;
/*
* Note: potential overlapping move.
*/
}
&r);
return (ISC_R_SUCCESS);
}
{
unsigned char data[DNS_NSEC_BUFFERSIZE];
0, NULL);
if (result == DNS_R_UNCHANGED)
return (result);
}
/* This should never fail */
i += 2;
break;
continue;
type % 256));
break;
}
return (present);
}