summaryrefslogtreecommitdiff
path: root/usr.sbin/bind/lib
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/bind/lib')
-rw-r--r--usr.sbin/bind/lib/bind9/api2
-rw-r--r--usr.sbin/bind/lib/bind9/check.c205
-rw-r--r--usr.sbin/bind/lib/bind9/include/bind9/check.h9
-rw-r--r--usr.sbin/bind/lib/dns/acl.c42
-rw-r--r--usr.sbin/bind/lib/dns/compress.c12
-rw-r--r--usr.sbin/bind/lib/dns/include/dns/acl.h38
-rw-r--r--usr.sbin/bind/lib/dns/include/dns/cache.h6
-rw-r--r--usr.sbin/bind/lib/dns/include/dns/compress.h10
-rw-r--r--usr.sbin/bind/lib/dns/include/dns/keytable.h10
-rw-r--r--usr.sbin/bind/lib/dns/include/dns/message.h29
-rw-r--r--usr.sbin/bind/lib/dns/include/dns/peer.h7
-rw-r--r--usr.sbin/bind/lib/dns/include/dns/resolver.h6
-rw-r--r--usr.sbin/bind/lib/dns/include/dns/types.h6
-rw-r--r--usr.sbin/bind/lib/dns/include/dns/validator.h69
-rw-r--r--usr.sbin/bind/lib/dns/include/dns/xfrin.h12
-rw-r--r--usr.sbin/bind/lib/dns/keytable.c13
-rw-r--r--usr.sbin/bind/lib/dns/lookup.c14
-rw-r--r--usr.sbin/bind/lib/dns/openssl_link.c8
-rw-r--r--usr.sbin/bind/lib/dns/openssldh_link.c77
-rw-r--r--usr.sbin/bind/lib/dns/opensslrsa_link.c71
-rw-r--r--usr.sbin/bind/lib/dns/peer.c8
-rw-r--r--usr.sbin/bind/lib/dns/portlist.c6
-rw-r--r--usr.sbin/bind/lib/dns/rdata/generic/dlv_32769.c281
-rw-r--r--usr.sbin/bind/lib/dns/rdata/generic/dlv_32769.h33
-rw-r--r--usr.sbin/bind/lib/dns/tcpmsg.c7
-rw-r--r--usr.sbin/bind/lib/dns/tkey.c8
-rw-r--r--usr.sbin/bind/lib/isc/heap.c58
-rw-r--r--usr.sbin/bind/lib/isc/hmacmd5.c5
-rw-r--r--usr.sbin/bind/lib/isc/include/isc/heap.h143
-rw-r--r--usr.sbin/bind/lib/isc/include/isc/list.h12
-rw-r--r--usr.sbin/bind/lib/isc/include/isc/sockaddr.h14
-rw-r--r--usr.sbin/bind/lib/isc/include/isc/symtab.h5
-rw-r--r--usr.sbin/bind/lib/isc/netscope.c6
-rw-r--r--usr.sbin/bind/lib/isc/nothreads/condition.c6
-rw-r--r--usr.sbin/bind/lib/isc/nothreads/mutex.c6
-rw-r--r--usr.sbin/bind/lib/isc/taskpool.c8
-rw-r--r--usr.sbin/bind/lib/isc/unix/ipv6.c6
-rw-r--r--usr.sbin/bind/lib/isccfg/include/isccfg/cfg.h75
-rw-r--r--usr.sbin/bind/lib/isccfg/include/isccfg/grammar.h32
-rw-r--r--usr.sbin/bind/lib/lwres/api2
-rw-r--r--usr.sbin/bind/lib/lwres/gai_strerror.c6
-rw-r--r--usr.sbin/bind/lib/lwres/man/lwres.315
-rw-r--r--usr.sbin/bind/lib/lwres/man/lwres_buffer.353
-rw-r--r--usr.sbin/bind/lib/lwres/man/lwres_config.328
-rw-r--r--usr.sbin/bind/lib/lwres/man/lwres_gabn.332
-rw-r--r--usr.sbin/bind/lib/lwres/man/lwres_gai_strerror.339
-rw-r--r--usr.sbin/bind/lib/lwres/man/lwres_getaddrinfo.332
-rw-r--r--usr.sbin/bind/lib/lwres/man/lwres_gethostent.357
-rw-r--r--usr.sbin/bind/lib/lwres/man/lwres_getnameinfo.330
-rw-r--r--usr.sbin/bind/lib/lwres/man/lwres_getrrsetbyname.333
-rw-r--r--usr.sbin/bind/lib/lwres/man/lwres_gnba.332
-rw-r--r--usr.sbin/bind/lib/lwres/man/lwres_hstrerror.329
-rw-r--r--usr.sbin/bind/lib/lwres/man/lwres_inetntop.317
-rw-r--r--usr.sbin/bind/lib/lwres/man/lwres_noop.332
-rw-r--r--usr.sbin/bind/lib/lwres/man/lwres_packet.348
-rw-r--r--usr.sbin/bind/lib/lwres/man/lwres_resutil.325
56 files changed, 1315 insertions, 560 deletions
diff --git a/usr.sbin/bind/lib/bind9/api b/usr.sbin/bind/lib/bind9/api
index 0a12b5e852c..be7faa6948e 100644
--- a/usr.sbin/bind/lib/bind9/api
+++ b/usr.sbin/bind/lib/bind9/api
@@ -1,3 +1,3 @@
LIBINTERFACE = 0
-LIBREVISION = 7
+LIBREVISION = 8
LIBAGE = 0
diff --git a/usr.sbin/bind/lib/bind9/check.c b/usr.sbin/bind/lib/bind9/check.c
index 561ad8b585c..63c472b00c9 100644
--- a/usr.sbin/bind/lib/bind9/check.c
+++ b/usr.sbin/bind/lib/bind9/check.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2001-2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $ISC: check.c,v 1.37.6.32 2005/11/03 23:08:41 marka Exp $ */
+/* $ISC: check.c,v 1.37.6.34 2006/03/02 00:37:20 marka Exp $ */
#include <config.h>
@@ -50,12 +50,12 @@ freekey(char *key, unsigned int type, isc_symvalue_t value, void *userarg) {
}
static isc_result_t
-check_orderent(cfg_obj_t *ent, isc_log_t *logctx) {
+check_orderent(const cfg_obj_t *ent, isc_log_t *logctx) {
isc_result_t result = ISC_R_SUCCESS;
isc_result_t tresult;
isc_textregion_t r;
dns_fixedname_t fixed;
- cfg_obj_t *obj;
+ const cfg_obj_t *obj;
dns_rdataclass_t rdclass;
dns_rdatatype_t rdtype;
isc_buffer_t b;
@@ -132,11 +132,11 @@ check_orderent(cfg_obj_t *ent, isc_log_t *logctx) {
}
static isc_result_t
-check_order(cfg_obj_t *options, isc_log_t *logctx) {
+check_order(const cfg_obj_t *options, isc_log_t *logctx) {
isc_result_t result = ISC_R_SUCCESS;
isc_result_t tresult;
- cfg_listelt_t *element;
- cfg_obj_t *obj = NULL;
+ const cfg_listelt_t *element;
+ const cfg_obj_t *obj = NULL;
if (cfg_map_get(options, "rrset-order", &obj) != ISC_R_SUCCESS)
return (result);
@@ -153,12 +153,12 @@ check_order(cfg_obj_t *options, isc_log_t *logctx) {
}
static isc_result_t
-check_dual_stack(cfg_obj_t *options, isc_log_t *logctx) {
- cfg_listelt_t *element;
- cfg_obj_t *alternates = NULL;
- cfg_obj_t *value;
- cfg_obj_t *obj;
- char *str;
+check_dual_stack(const cfg_obj_t *options, isc_log_t *logctx) {
+ const cfg_listelt_t *element;
+ const cfg_obj_t *alternates = NULL;
+ const cfg_obj_t *value;
+ const cfg_obj_t *obj;
+ const char *str;
dns_fixedname_t fixed;
dns_name_t *name;
isc_buffer_t buffer;
@@ -213,9 +213,9 @@ check_dual_stack(cfg_obj_t *options, isc_log_t *logctx) {
}
static isc_result_t
-check_forward(cfg_obj_t *options, isc_log_t *logctx) {
- cfg_obj_t *forward = NULL;
- cfg_obj_t *forwarders = NULL;
+check_forward(const cfg_obj_t *options, isc_log_t *logctx) {
+ const cfg_obj_t *forward = NULL;
+ const cfg_obj_t *forwarders = NULL;
(void)cfg_map_get(options, "forward", &forward);
(void)cfg_map_get(options, "forwarders", &forwarders);
@@ -229,15 +229,15 @@ check_forward(cfg_obj_t *options, isc_log_t *logctx) {
}
static isc_result_t
-disabled_algorithms(cfg_obj_t *disabled, isc_log_t *logctx) {
+disabled_algorithms(const cfg_obj_t *disabled, isc_log_t *logctx) {
isc_result_t result = ISC_R_SUCCESS;
isc_result_t tresult;
- cfg_listelt_t *element;
+ const cfg_listelt_t *element;
const char *str;
isc_buffer_t b;
dns_fixedname_t fixed;
dns_name_t *name;
- cfg_obj_t *obj;
+ const cfg_obj_t *obj;
dns_fixedname_init(&fixed);
name = dns_fixedname_name(&fixed);
@@ -262,7 +262,7 @@ disabled_algorithms(cfg_obj_t *disabled, isc_log_t *logctx) {
dns_secalg_t alg;
isc_result_t tresult;
- r.base = cfg_obj_asstring(cfg_listelt_value(element));
+ DE_CONST(cfg_obj_asstring(cfg_listelt_value(element)), r.base);
r.length = strlen(r.base);
tresult = dns_secalg_fromtext(&alg, &r);
@@ -280,8 +280,9 @@ disabled_algorithms(cfg_obj_t *disabled, isc_log_t *logctx) {
}
static isc_result_t
-nameexist(cfg_obj_t *obj, const char *name, int value, isc_symtab_t *symtab,
- const char *fmt, isc_log_t *logctx, isc_mem_t *mctx)
+nameexist(const cfg_obj_t *obj, const char *name, int value,
+ isc_symtab_t *symtab, const char *fmt, isc_log_t *logctx,
+ isc_mem_t *mctx)
{
char *key;
const char *file;
@@ -292,14 +293,14 @@ nameexist(cfg_obj_t *obj, const char *name, int value, isc_symtab_t *symtab,
key = isc_mem_strdup(mctx, name);
if (key == NULL)
return (ISC_R_NOMEMORY);
- symvalue.as_pointer = obj;
+ symvalue.as_cpointer = obj;
result = isc_symtab_define(symtab, key, value, symvalue,
isc_symexists_reject);
if (result == ISC_R_EXISTS) {
RUNTIME_CHECK(isc_symtab_lookup(symtab, key, value,
&symvalue) == ISC_R_SUCCESS);
- file = cfg_obj_file(symvalue.as_pointer);
- line = cfg_obj_line(symvalue.as_pointer);
+ file = cfg_obj_file(symvalue.as_cpointer);
+ line = cfg_obj_line(symvalue.as_cpointer);
if (file == NULL)
file = "<unknown file>";
@@ -313,10 +314,10 @@ nameexist(cfg_obj_t *obj, const char *name, int value, isc_symtab_t *symtab,
}
static isc_result_t
-mustbesecure(cfg_obj_t *secure, isc_symtab_t *symtab, isc_log_t *logctx,
+mustbesecure(const cfg_obj_t *secure, isc_symtab_t *symtab, isc_log_t *logctx,
isc_mem_t *mctx)
{
- cfg_obj_t *obj;
+ const cfg_obj_t *obj;
char namebuf[DNS_NAME_FORMATSIZE];
const char *str;
dns_fixedname_t fixed;
@@ -351,12 +352,12 @@ typedef struct {
} intervaltable;
static isc_result_t
-check_options(cfg_obj_t *options, isc_log_t *logctx, isc_mem_t *mctx) {
+check_options(const cfg_obj_t *options, isc_log_t *logctx, isc_mem_t *mctx) {
isc_result_t result = ISC_R_SUCCESS;
isc_result_t tresult;
unsigned int i;
- cfg_obj_t *obj = NULL;
- cfg_listelt_t *element;
+ const cfg_obj_t *obj = NULL;
+ const cfg_listelt_t *element;
isc_symtab_t *symtab = NULL;
static intervaltable intervals[] = {
@@ -411,9 +412,9 @@ check_options(cfg_obj_t *options, isc_log_t *logctx, isc_mem_t *mctx) {
(void)cfg_map_get(options, "root-delegation-only", &obj);
if (obj != NULL) {
if (!cfg_obj_isvoid(obj)) {
- cfg_listelt_t *element;
- cfg_obj_t *exclude;
- char *str;
+ const cfg_listelt_t *element;
+ const cfg_obj_t *exclude;
+ const char *str;
dns_fixedname_t fixed;
dns_name_t *name;
isc_buffer_t b;
@@ -557,10 +558,10 @@ check_options(cfg_obj_t *options, isc_log_t *logctx, isc_mem_t *mctx) {
}
static isc_result_t
-get_masters_def(cfg_obj_t *cctx, char *name, cfg_obj_t **ret) {
+get_masters_def(const cfg_obj_t *cctx, const char *name, const cfg_obj_t **ret) {
isc_result_t result;
- cfg_obj_t *masters = NULL;
- cfg_listelt_t *elt;
+ const cfg_obj_t *masters = NULL;
+ const cfg_listelt_t *elt;
result = cfg_map_get(cctx, "masters", &masters);
if (result != ISC_R_SUCCESS)
@@ -568,7 +569,7 @@ get_masters_def(cfg_obj_t *cctx, char *name, cfg_obj_t **ret) {
for (elt = cfg_list_first(masters);
elt != NULL;
elt = cfg_list_next(elt)) {
- cfg_obj_t *list;
+ const cfg_obj_t *list;
const char *listname;
list = cfg_listelt_value(elt);
@@ -583,18 +584,18 @@ get_masters_def(cfg_obj_t *cctx, char *name, cfg_obj_t **ret) {
}
static isc_result_t
-validate_masters(cfg_obj_t *obj, cfg_obj_t *config, isc_uint32_t *countp,
- isc_log_t *logctx, isc_mem_t *mctx)
+validate_masters(const cfg_obj_t *obj, const cfg_obj_t *config,
+ isc_uint32_t *countp, isc_log_t *logctx, isc_mem_t *mctx)
{
isc_result_t result = ISC_R_SUCCESS;
isc_result_t tresult;
isc_uint32_t count = 0;
isc_symtab_t *symtab = NULL;
isc_symvalue_t symvalue;
- cfg_listelt_t *element;
- cfg_listelt_t **stack = NULL;
+ const cfg_listelt_t *element;
+ const cfg_listelt_t **stack = NULL;
isc_uint32_t stackcount = 0, pushed = 0;
- cfg_obj_t *list;
+ const cfg_obj_t *list;
REQUIRE(countp != NULL);
result = isc_symtab_create(mctx, 100, NULL, NULL, ISC_FALSE, &symtab);
@@ -611,9 +612,9 @@ validate_masters(cfg_obj_t *obj, cfg_obj_t *config, isc_uint32_t *countp,
element != NULL;
element = cfg_list_next(element))
{
- char *listname;
- cfg_obj_t *addr;
- cfg_obj_t *key;
+ const char *listname;
+ const cfg_obj_t *addr;
+ const cfg_obj_t *key;
addr = cfg_tuple_get(cfg_listelt_value(element),
"masterselement");
@@ -631,7 +632,7 @@ validate_masters(cfg_obj_t *obj, cfg_obj_t *config, isc_uint32_t *countp,
result = ISC_R_FAILURE;
}
listname = cfg_obj_asstring(addr);
- symvalue.as_pointer = addr;
+ symvalue.as_cpointer = addr;
tresult = isc_symtab_define(symtab, listname, 1, symvalue,
isc_symexists_reject);
if (tresult == ISC_R_EXISTS)
@@ -691,14 +692,15 @@ typedef struct {
} optionstable;
static isc_result_t
-check_zoneconf(cfg_obj_t *zconfig, cfg_obj_t *config, isc_symtab_t *symtab,
- dns_rdataclass_t defclass, isc_log_t *logctx, isc_mem_t *mctx)
+check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *config,
+ isc_symtab_t *symtab, dns_rdataclass_t defclass,
+ isc_log_t *logctx, isc_mem_t *mctx)
{
const char *zname;
const char *typestr;
unsigned int ztype;
- cfg_obj_t *zoptions;
- cfg_obj_t *obj = NULL;
+ const cfg_obj_t *zoptions;
+ const cfg_obj_t *obj = NULL;
isc_result_t result = ISC_R_SUCCESS;
isc_result_t tresult;
unsigned int i;
@@ -902,10 +904,10 @@ check_zoneconf(cfg_obj_t *zconfig, cfg_obj_t *config, isc_symtab_t *symtab,
* Check the excessively complicated "dialup" option.
*/
if (ztype == MASTERZONE || ztype == SLAVEZONE || ztype == STUBZONE) {
- cfg_obj_t *dialup = NULL;
+ const cfg_obj_t *dialup = NULL;
(void)cfg_map_get(zoptions, "dialup", &dialup);
if (dialup != NULL && cfg_obj_isstring(dialup)) {
- char *str = cfg_obj_asstring(dialup);
+ const char *str = cfg_obj_asstring(dialup);
for (i = 0;
i < sizeof(dialups) / sizeof(dialups[0]);
i++)
@@ -970,9 +972,9 @@ check_zoneconf(cfg_obj_t *zconfig, cfg_obj_t *config, isc_symtab_t *symtab,
}
isc_result_t
-bind9_check_key(cfg_obj_t *key, isc_log_t *logctx) {
- cfg_obj_t *algobj = NULL;
- cfg_obj_t *secretobj = NULL;
+bind9_check_key(const cfg_obj_t *key, isc_log_t *logctx) {
+ const cfg_obj_t *algobj = NULL;
+ const cfg_obj_t *secretobj = NULL;
const char *keyname = cfg_obj_asstring(cfg_map_getname(key));
(void)cfg_map_get(key, "algorithm", &algobj);
@@ -988,20 +990,20 @@ bind9_check_key(cfg_obj_t *key, isc_log_t *logctx) {
}
static isc_result_t
-check_keylist(cfg_obj_t *keys, isc_symtab_t *symtab, isc_log_t *logctx) {
+check_keylist(const cfg_obj_t *keys, isc_symtab_t *symtab, isc_log_t *logctx) {
isc_result_t result = ISC_R_SUCCESS;
isc_result_t tresult;
- cfg_listelt_t *element;
+ const cfg_listelt_t *element;
for (element = cfg_list_first(keys);
element != NULL;
element = cfg_list_next(element))
{
- cfg_obj_t *key = cfg_listelt_value(element);
+ const cfg_obj_t *key = cfg_listelt_value(element);
const char *keyname = cfg_obj_asstring(cfg_map_getname(key));
isc_symvalue_t symvalue;
- symvalue.as_pointer = key;
+ symvalue.as_cpointer = key;
tresult = isc_symtab_define(symtab, keyname, 1,
symvalue, isc_symexists_reject);
if (tresult == ISC_R_EXISTS) {
@@ -1010,8 +1012,8 @@ check_keylist(cfg_obj_t *keys, isc_symtab_t *symtab, isc_log_t *logctx) {
RUNTIME_CHECK(isc_symtab_lookup(symtab, keyname,
1, &symvalue) == ISC_R_SUCCESS);
- file = cfg_obj_file(symvalue.as_pointer);
- line = cfg_obj_line(symvalue.as_pointer);
+ file = cfg_obj_file(symvalue.as_cpointer);
+ line = cfg_obj_line(symvalue.as_cpointer);
if (file == NULL)
file = "<unknown file>";
@@ -1031,13 +1033,16 @@ check_keylist(cfg_obj_t *keys, isc_symtab_t *symtab, isc_log_t *logctx) {
}
static isc_result_t
-check_servers(cfg_obj_t *servers, isc_log_t *logctx) {
+check_servers(const cfg_obj_t *servers, isc_log_t *logctx) {
isc_result_t result = ISC_R_SUCCESS;
- cfg_listelt_t *e1, *e2;
- cfg_obj_t *v1, *v2;
- isc_sockaddr_t *s1, *s2;
+ const cfg_listelt_t *e1;
+ const cfg_listelt_t *e2;
+ const cfg_obj_t *v1;
+ const cfg_obj_t *v2;
+ const isc_sockaddr_t *s1;
+ const isc_sockaddr_t *s2;
isc_netaddr_t na;
- cfg_obj_t *ts;
+ const cfg_obj_t *ts;
char buf[128];
const char *xfr;
isc_buffer_t target;
@@ -1090,13 +1095,13 @@ check_servers(cfg_obj_t *servers, isc_log_t *logctx) {
}
static isc_result_t
-check_viewconf(cfg_obj_t *config, cfg_obj_t *vconfig, dns_rdataclass_t vclass,
- isc_log_t *logctx, isc_mem_t *mctx)
+check_viewconf(const cfg_obj_t *config, const cfg_obj_t *vconfig,
+ dns_rdataclass_t vclass, isc_log_t *logctx, isc_mem_t *mctx)
{
- cfg_obj_t *servers = NULL;
- cfg_obj_t *zones = NULL;
- cfg_obj_t *keys = NULL;
- cfg_listelt_t *element;
+ const cfg_obj_t *servers = NULL;
+ const cfg_obj_t *zones = NULL;
+ const cfg_obj_t *keys = NULL;
+ const cfg_listelt_t *element;
isc_symtab_t *symtab = NULL;
isc_result_t result = ISC_R_SUCCESS;
isc_result_t tresult = ISC_R_SUCCESS;
@@ -1120,7 +1125,7 @@ check_viewconf(cfg_obj_t *config, cfg_obj_t *vconfig, dns_rdataclass_t vclass,
element = cfg_list_next(element))
{
isc_result_t tresult;
- cfg_obj_t *zone = cfg_listelt_value(element);
+ const cfg_obj_t *zone = cfg_listelt_value(element);
tresult = check_zoneconf(zone, config, symtab, vclass,
logctx, mctx);
@@ -1165,7 +1170,7 @@ check_viewconf(cfg_obj_t *config, cfg_obj_t *vconfig, dns_rdataclass_t vclass,
* Check that forwarding is reasonable.
*/
if (vconfig == NULL) {
- cfg_obj_t *options = NULL;
+ const cfg_obj_t *options = NULL;
(void)cfg_map_get(config, "options", &options);
if (options != NULL)
if (check_forward(options, logctx) != ISC_R_SUCCESS)
@@ -1178,7 +1183,7 @@ check_viewconf(cfg_obj_t *config, cfg_obj_t *vconfig, dns_rdataclass_t vclass,
* Check that dual-stack-servers is reasonable.
*/
if (vconfig == NULL) {
- cfg_obj_t *options = NULL;
+ const cfg_obj_t *options = NULL;
(void)cfg_map_get(config, "options", &options);
if (options != NULL)
if (check_dual_stack(options, logctx) != ISC_R_SUCCESS)
@@ -1215,14 +1220,16 @@ check_viewconf(cfg_obj_t *config, cfg_obj_t *vconfig, dns_rdataclass_t vclass,
isc_result_t
-bind9_check_namedconf(cfg_obj_t *config, isc_log_t *logctx, isc_mem_t *mctx) {
- cfg_obj_t *options = NULL;
- cfg_obj_t *servers = NULL;
- cfg_obj_t *views = NULL;
- cfg_obj_t *acls = NULL;
- cfg_obj_t *kals = NULL;
- cfg_obj_t *obj;
- cfg_listelt_t *velement;
+bind9_check_namedconf(const cfg_obj_t *config, isc_log_t *logctx,
+ isc_mem_t *mctx)
+{
+ const cfg_obj_t *options = NULL;
+ const cfg_obj_t *servers = NULL;
+ const cfg_obj_t *views = NULL;
+ const cfg_obj_t *acls = NULL;
+ const cfg_obj_t *kals = NULL;
+ const cfg_obj_t *obj;
+ const cfg_listelt_t *velement;
isc_result_t result = ISC_R_SUCCESS;
isc_result_t tresult;
isc_symtab_t *symtab = NULL;
@@ -1256,7 +1263,7 @@ bind9_check_namedconf(cfg_obj_t *config, isc_log_t *logctx, isc_mem_t *mctx) {
logctx, mctx) != ISC_R_SUCCESS)
result = ISC_R_FAILURE;
} else {
- cfg_obj_t *zones = NULL;
+ const cfg_obj_t *zones = NULL;
(void)cfg_map_get(config, "zone", &zones);
if (zones != NULL) {
@@ -1274,10 +1281,10 @@ bind9_check_namedconf(cfg_obj_t *config, isc_log_t *logctx, isc_mem_t *mctx) {
velement != NULL;
velement = cfg_list_next(velement))
{
- cfg_obj_t *view = cfg_listelt_value(velement);
- cfg_obj_t *vname = cfg_tuple_get(view, "name");
- cfg_obj_t *voptions = cfg_tuple_get(view, "options");
- cfg_obj_t *vclassobj = cfg_tuple_get(view, "class");
+ const cfg_obj_t *view = cfg_listelt_value(velement);
+ const cfg_obj_t *vname = cfg_tuple_get(view, "name");
+ const cfg_obj_t *voptions = cfg_tuple_get(view, "options");
+ const cfg_obj_t *vclassobj = cfg_tuple_get(view, "class");
dns_rdataclass_t vclass = dns_rdataclass_in;
isc_result_t tresult = ISC_R_SUCCESS;
const char *key = cfg_obj_asstring(vname);
@@ -1295,7 +1302,7 @@ bind9_check_namedconf(cfg_obj_t *config, isc_log_t *logctx, isc_mem_t *mctx) {
cfg_obj_asstring(vname), r.base);
}
if (tresult == ISC_R_SUCCESS && symtab != NULL) {
- symvalue.as_pointer = view;
+ symvalue.as_cpointer = view;
tresult = isc_symtab_define(symtab, key, vclass,
symvalue,
isc_symexists_reject);
@@ -1304,8 +1311,8 @@ bind9_check_namedconf(cfg_obj_t *config, isc_log_t *logctx, isc_mem_t *mctx) {
unsigned int line;
RUNTIME_CHECK(isc_symtab_lookup(symtab, key,
vclass, &symvalue) == ISC_R_SUCCESS);
- file = cfg_obj_file(symvalue.as_pointer);
- line = cfg_obj_line(symvalue.as_pointer);
+ file = cfg_obj_file(symvalue.as_cpointer);
+ line = cfg_obj_line(symvalue.as_cpointer);
cfg_obj_log(view, logctx, ISC_LOG_ERROR,
"view '%s': already exists "
"previous definition: %s:%u",
@@ -1345,14 +1352,14 @@ bind9_check_namedconf(cfg_obj_t *config, isc_log_t *logctx, isc_mem_t *mctx) {
tresult = cfg_map_get(config, "acl", &acls);
if (tresult == ISC_R_SUCCESS) {
- cfg_listelt_t *elt;
- cfg_listelt_t *elt2;
+ const cfg_listelt_t *elt;
+ const cfg_listelt_t *elt2;
const char *aclname;
for (elt = cfg_list_first(acls);
elt != NULL;
elt = cfg_list_next(elt)) {
- cfg_obj_t *acl = cfg_listelt_value(elt);
+ const cfg_obj_t *acl = cfg_listelt_value(elt);
unsigned int i;
aclname = cfg_obj_asstring(cfg_tuple_get(acl, "name"));
@@ -1371,7 +1378,7 @@ bind9_check_namedconf(cfg_obj_t *config, isc_log_t *logctx, isc_mem_t *mctx) {
for (elt2 = cfg_list_next(elt);
elt2 != NULL;
elt2 = cfg_list_next(elt2)) {
- cfg_obj_t *acl2 = cfg_listelt_value(elt2);
+ const cfg_obj_t *acl2 = cfg_listelt_value(elt2);
const char *name;
name = cfg_obj_asstring(cfg_tuple_get(acl2,
"name"));
@@ -1395,21 +1402,21 @@ bind9_check_namedconf(cfg_obj_t *config, isc_log_t *logctx, isc_mem_t *mctx) {
tresult = cfg_map_get(config, "kal", &kals);
if (tresult == ISC_R_SUCCESS) {
- cfg_listelt_t *elt;
- cfg_listelt_t *elt2;
+ const cfg_listelt_t *elt;
+ const cfg_listelt_t *elt2;
const char *aclname;
for (elt = cfg_list_first(kals);
elt != NULL;
elt = cfg_list_next(elt)) {
- cfg_obj_t *acl = cfg_listelt_value(elt);
+ const cfg_obj_t *acl = cfg_listelt_value(elt);
aclname = cfg_obj_asstring(cfg_tuple_get(acl, "name"));
for (elt2 = cfg_list_next(elt);
elt2 != NULL;
elt2 = cfg_list_next(elt2)) {
- cfg_obj_t *acl2 = cfg_listelt_value(elt2);
+ const cfg_obj_t *acl2 = cfg_listelt_value(elt2);
const char *name;
name = cfg_obj_asstring(cfg_tuple_get(acl2,
"name"));
diff --git a/usr.sbin/bind/lib/bind9/include/bind9/check.h b/usr.sbin/bind/lib/bind9/include/bind9/check.h
index 73ac188943c..efc0671dcb8 100644
--- a/usr.sbin/bind/lib/bind9/include/bind9/check.h
+++ b/usr.sbin/bind/lib/bind9/include/bind9/check.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2006 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $ISC: check.h,v 1.1.200.4 2004/03/08 09:04:28 marka Exp $ */
+/* $ISC: check.h,v 1.1.200.6 2006/03/02 00:37:20 marka Exp $ */
#ifndef BIND9_CHECK_H
#define BIND9_CHECK_H 1
@@ -28,7 +28,8 @@
ISC_LANG_BEGINDECLS
isc_result_t
-bind9_check_namedconf(cfg_obj_t *config, isc_log_t *logctx, isc_mem_t *mctx);
+bind9_check_namedconf(const cfg_obj_t *config, isc_log_t *logctx,
+ isc_mem_t *mctx);
/*
* Check the syntactic validity of a configuration parse tree generated from
* a named.conf file.
@@ -44,7 +45,7 @@ bind9_check_namedconf(cfg_obj_t *config, isc_log_t *logctx, isc_mem_t *mctx);
*/
isc_result_t
-bind9_check_key(cfg_obj_t *config, isc_log_t *logctx);
+bind9_check_key(const cfg_obj_t *config, isc_log_t *logctx);
/*
* As above, but for a single 'key' statement.
*/
diff --git a/usr.sbin/bind/lib/dns/acl.c b/usr.sbin/bind/lib/dns/acl.c
index 026e8a0e436..e68f841df85 100644
--- a/usr.sbin/bind/lib/dns/acl.c
+++ b/usr.sbin/bind/lib/dns/acl.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2006 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2002 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $ISC: acl.c,v 1.23.52.4 2004/03/09 05:21:08 marka Exp $ */
+/* $ISC: acl.c,v 1.23.52.6 2006/03/02 00:37:20 marka Exp $ */
#include <config.h>
@@ -68,7 +68,7 @@ dns_acl_create(isc_mem_t *mctx, int n, dns_acl_t **target) {
}
isc_result_t
-dns_acl_appendelement(dns_acl_t *acl, dns_aclelement_t *elt) {
+dns_acl_appendelement(dns_acl_t *acl, const dns_aclelement_t *elt) {
if (acl->length + 1 > acl->alloc) {
/*
* Resize the ACL.
@@ -123,12 +123,12 @@ dns_acl_none(isc_mem_t *mctx, dns_acl_t **target) {
}
isc_result_t
-dns_acl_match(isc_netaddr_t *reqaddr,
- dns_name_t *reqsigner,
- dns_acl_t *acl,
- dns_aclenv_t *env,
+dns_acl_match(const isc_netaddr_t *reqaddr,
+ const dns_name_t *reqsigner,
+ const dns_acl_t *acl,
+ const dns_aclenv_t *env,
int *match,
- dns_aclelement_t **matchelt)
+ dns_aclelement_t const**matchelt)
{
unsigned int i;
@@ -150,9 +150,9 @@ dns_acl_match(isc_netaddr_t *reqaddr,
}
isc_result_t
-dns_acl_elementmatch(dns_acl_t *acl,
- dns_aclelement_t *elt,
- dns_aclelement_t **matchelt)
+dns_acl_elementmatch(const dns_acl_t *acl,
+ const dns_aclelement_t *elt,
+ const dns_aclelement_t **matchelt)
{
unsigned int i;
@@ -173,14 +173,14 @@ dns_acl_elementmatch(dns_acl_t *acl,
}
isc_boolean_t
-dns_aclelement_match(isc_netaddr_t *reqaddr,
- dns_name_t *reqsigner,
- dns_aclelement_t *e,
- dns_aclenv_t *env,
- dns_aclelement_t **matchelt)
+dns_aclelement_match(const isc_netaddr_t *reqaddr,
+ const dns_name_t *reqsigner,
+ const dns_aclelement_t *e,
+ const dns_aclenv_t *env,
+ const dns_aclelement_t **matchelt)
{
dns_acl_t *inner = NULL;
- isc_netaddr_t *addr;
+ const isc_netaddr_t *addr;
isc_netaddr_t v4addr;
int indirectmatch;
isc_result_t result;
@@ -312,7 +312,7 @@ dns_acl_detach(dns_acl_t **aclp) {
}
isc_boolean_t
-dns_aclelement_equal(dns_aclelement_t *ea, dns_aclelement_t *eb) {
+dns_aclelement_equal(const dns_aclelement_t *ea, const dns_aclelement_t *eb) {
if (ea->type != eb->type)
return (ISC_FALSE);
switch (ea->type) {
@@ -338,7 +338,7 @@ dns_aclelement_equal(dns_aclelement_t *ea, dns_aclelement_t *eb) {
}
isc_boolean_t
-dns_acl_equal(dns_acl_t *a, dns_acl_t *b) {
+dns_acl_equal(const dns_acl_t *a, const dns_acl_t *b) {
unsigned int i;
if (a == b)
return (ISC_TRUE);
@@ -353,7 +353,7 @@ dns_acl_equal(dns_acl_t *a, dns_acl_t *b) {
}
static isc_boolean_t
-is_loopback(dns_aclipprefix_t *p) {
+is_loopback(const dns_aclipprefix_t *p) {
switch (p->address.family) {
case AF_INET:
if (p->prefixlen == 32 &&
@@ -372,7 +372,7 @@ is_loopback(dns_aclipprefix_t *p) {
}
isc_boolean_t
-dns_acl_isinsecure(dns_acl_t *a) {
+dns_acl_isinsecure(const dns_acl_t *a) {
unsigned int i;
for (i = 0; i < a->length; i++) {
dns_aclelement_t *e = &a->elements[i];
diff --git a/usr.sbin/bind/lib/dns/compress.c b/usr.sbin/bind/lib/dns/compress.c
index 025858ec67a..423cfb9124f 100644
--- a/usr.sbin/bind/lib/dns/compress.c
+++ b/usr.sbin/bind/lib/dns/compress.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2006 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $ISC: compress.c,v 1.50.206.2 2004/03/06 08:13:37 marka Exp $ */
+/* $ISC: compress.c,v 1.50.206.4 2006/03/02 00:37:20 marka Exp $ */
#define DNS_NAME_USEINLINE 1
@@ -111,7 +111,7 @@ do { \
* If no match is found return ISC_FALSE.
*/
isc_boolean_t
-dns_compress_findglobal(dns_compress_t *cctx, dns_name_t *name,
+dns_compress_findglobal(dns_compress_t *cctx, const dns_name_t *name,
dns_name_t *prefix, isc_uint16_t *offset)
{
dns_name_t tname, nname;
@@ -161,15 +161,15 @@ dns_compress_findglobal(dns_compress_t *cctx, dns_name_t *name,
}
static inline unsigned int
-name_length(dns_name_t *name) {
+name_length(const dns_name_t *name) {
isc_region_t r;
dns_name_toregion(name, &r);
return (r.length);
}
void
-dns_compress_add(dns_compress_t *cctx, dns_name_t *name, dns_name_t *prefix,
- isc_uint16_t offset)
+dns_compress_add(dns_compress_t *cctx, const dns_name_t *name,
+ const dns_name_t *prefix, isc_uint16_t offset)
{
dns_name_t tname;
unsigned int start;
diff --git a/usr.sbin/bind/lib/dns/include/dns/acl.h b/usr.sbin/bind/lib/dns/include/dns/acl.h
index a39c09fa7b9..264182c98ff 100644
--- a/usr.sbin/bind/lib/dns/include/dns/acl.h
+++ b/usr.sbin/bind/lib/dns/include/dns/acl.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2006 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2002 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $ISC: acl.h,v 1.20.52.3 2004/03/08 09:04:34 marka Exp $ */
+/* $ISC: acl.h,v 1.20.52.5 2006/03/02 00:37:20 marka Exp $ */
#ifndef DNS_ACL_H
#define DNS_ACL_H 1
@@ -104,7 +104,7 @@ dns_acl_create(isc_mem_t *mctx, int n, dns_acl_t **target);
*/
isc_result_t
-dns_acl_appendelement(dns_acl_t *acl, dns_aclelement_t *elt);
+dns_acl_appendelement(dns_acl_t *acl, const dns_aclelement_t *elt);
/*
* Append an element to an existing ACL.
*/
@@ -128,13 +128,13 @@ void
dns_acl_detach(dns_acl_t **aclp);
isc_boolean_t
-dns_aclelement_equal(dns_aclelement_t *ea, dns_aclelement_t *eb);
+dns_aclelement_equal(const dns_aclelement_t *ea, const dns_aclelement_t *eb);
isc_boolean_t
-dns_acl_equal(dns_acl_t *a, dns_acl_t *b);
+dns_acl_equal(const dns_acl_t *a, const dns_acl_t *b);
isc_boolean_t
-dns_acl_isinsecure(dns_acl_t *a);
+dns_acl_isinsecure(const dns_acl_t *a);
/*
* Return ISC_TRUE iff the acl 'a' is considered insecure, that is,
* if it contains IP addresses other than those of the local host.
@@ -154,12 +154,12 @@ void
dns_aclenv_destroy(dns_aclenv_t *env);
isc_result_t
-dns_acl_match(isc_netaddr_t *reqaddr,
- dns_name_t *reqsigner,
- dns_acl_t *acl,
- dns_aclenv_t *env,
+dns_acl_match(const isc_netaddr_t *reqaddr,
+ const dns_name_t *reqsigner,
+ const dns_acl_t *acl,
+ const dns_aclenv_t *env,
int *match,
- dns_aclelement_t **matchelt);
+ const dns_aclelement_t **matchelt);
/*
* General, low-level ACL matching. This is expected to
* be useful even for weird stuff like the topology and sortlist statements.
@@ -185,11 +185,11 @@ dns_acl_match(isc_netaddr_t *reqaddr,
*/
isc_boolean_t
-dns_aclelement_match(isc_netaddr_t *reqaddr,
- dns_name_t *reqsigner,
- dns_aclelement_t *e,
- dns_aclenv_t *env,
- dns_aclelement_t **matchelt);
+dns_aclelement_match(const isc_netaddr_t *reqaddr,
+ const dns_name_t *reqsigner,
+ const dns_aclelement_t *e,
+ const dns_aclenv_t *env,
+ const dns_aclelement_t **matchelt);
/*
* Like dns_acl_match, but matches against the single ACL element 'e'
* rather than a complete list and returns ISC_TRUE iff it matched.
@@ -200,9 +200,9 @@ dns_aclelement_match(isc_netaddr_t *reqaddr,
*/
isc_result_t
-dns_acl_elementmatch(dns_acl_t *acl,
- dns_aclelement_t *elt,
- dns_aclelement_t **matchelt);
+dns_acl_elementmatch(const dns_acl_t *acl,
+ const dns_aclelement_t *elt,
+ const dns_aclelement_t **matchelt);
/*
* Search for an ACL element in 'acl' which is exactly the same as 'elt'.
* If there is one, and 'matchelt' is non NULL, then '*matchelt' will point
diff --git a/usr.sbin/bind/lib/dns/include/dns/cache.h b/usr.sbin/bind/lib/dns/include/dns/cache.h
index cc37869df77..23f0b09fec7 100644
--- a/usr.sbin/bind/lib/dns/include/dns/cache.h
+++ b/usr.sbin/bind/lib/dns/include/dns/cache.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2006 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $ISC: cache.h,v 1.17.12.3 2004/03/08 09:04:34 marka Exp $ */
+/* $ISC: cache.h,v 1.17.12.5 2006/03/02 00:37:20 marka Exp $ */
#ifndef DNS_CACHE_H
#define DNS_CACHE_H 1
@@ -151,7 +151,7 @@ dns_cache_attachdb(dns_cache_t *cache, dns_db_t **dbp);
isc_result_t
-dns_cache_setfilename(dns_cache_t *cahce, char *filename);
+dns_cache_setfilename(dns_cache_t *cahce, const char *filename);
/*
* If 'filename' is non-NULL, make the cache persistent.
* The cache's data will be stored in the given file.
diff --git a/usr.sbin/bind/lib/dns/include/dns/compress.h b/usr.sbin/bind/lib/dns/include/dns/compress.h
index 4dbe00d00b5..cc9307ed9c8 100644
--- a/usr.sbin/bind/lib/dns/include/dns/compress.h
+++ b/usr.sbin/bind/lib/dns/include/dns/compress.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2006 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2002 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $ISC: compress.h,v 1.29.2.2.8.1 2004/03/06 08:13:51 marka Exp $ */
+/* $ISC: compress.h,v 1.29.2.2.8.3 2006/03/02 00:37:20 marka Exp $ */
#ifndef DNS_COMPRESS_H
#define DNS_COMPRESS_H 1
@@ -136,7 +136,7 @@ dns_compress_getedns(dns_compress_t *cctx);
*/
isc_boolean_t
-dns_compress_findglobal(dns_compress_t *cctx, dns_name_t *name,
+dns_compress_findglobal(dns_compress_t *cctx, const dns_name_t *name,
dns_name_t *prefix, isc_uint16_t *offset);
/*
* Finds longest possible match of 'name' in the global compression table.
@@ -155,8 +155,8 @@ dns_compress_findglobal(dns_compress_t *cctx, dns_name_t *name,
*/
void
-dns_compress_add(dns_compress_t *cctx, dns_name_t *name, dns_name_t *prefix,
- isc_uint16_t offset);
+dns_compress_add(dns_compress_t *cctx, const dns_name_t *name,
+ const dns_name_t *prefix, isc_uint16_t offset);
/*
* Add compression pointers for 'name' to the compression table,
* not replacing existing pointers.
diff --git a/usr.sbin/bind/lib/dns/include/dns/keytable.h b/usr.sbin/bind/lib/dns/include/dns/keytable.h
index 0487be8590b..206e3b58ea3 100644
--- a/usr.sbin/bind/lib/dns/include/dns/keytable.h
+++ b/usr.sbin/bind/lib/dns/include/dns/keytable.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2006 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2000, 2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $ISC: keytable.h,v 1.10.206.1 2004/03/06 08:13:56 marka Exp $ */
+/* $ISC: keytable.h,v 1.10.206.3 2006/01/06 00:01:42 marka Exp $ */
#ifndef DNS_KEYTABLE_H
#define DNS_KEYTABLE_H 1
@@ -137,7 +137,8 @@ dns_keytable_findkeynode(dns_keytable_t *keytable, dns_name_t *name,
dns_keynode_t **keynodep);
/*
* Search for a key named 'name', matching 'algorithm' and 'tag' in
- * 'keytable'.
+ * 'keytable'. This finds the first instance which matches. Use
+ * dns_keytable_findnextkeynode() to find other instances.
*
* Requires:
*
@@ -150,6 +151,7 @@ dns_keytable_findkeynode(dns_keytable_t *keytable, dns_name_t *name,
* Returns:
*
* ISC_R_SUCCESS
+ * DNS_R_PARTIALMATCH the name existed in the keytable.
* ISC_R_NOTFOUND
*
* Any other result indicates an error.
@@ -160,7 +162,7 @@ dns_keytable_findnextkeynode(dns_keytable_t *keytable, dns_keynode_t *keynode,
dns_keynode_t **nextnodep);
/*
* Search for the next key with the same properties as 'keynode' in
- * 'keytable'.
+ * 'keytable' as found by dns_keytable_findkeynode().
*
* Requires:
*
diff --git a/usr.sbin/bind/lib/dns/include/dns/message.h b/usr.sbin/bind/lib/dns/include/dns/message.h
index f90276aa847..4099857a00a 100644
--- a/usr.sbin/bind/lib/dns/include/dns/message.h
+++ b/usr.sbin/bind/lib/dns/include/dns/message.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2006 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $ISC: message.h,v 1.100.2.3.8.7 2004/03/08 02:08:00 marka Exp $ */
+/* $ISC: message.h,v 1.100.2.3.8.10 2006/02/28 06:32:54 marka Exp $ */
#ifndef DNS_MESSAGE_H
#define DNS_MESSAGE_H 1
@@ -236,7 +236,7 @@ struct dns_message {
isc_region_t saved;
dns_rdatasetorderfunc_t order;
- void * order_arg;
+ const void * order_arg;
};
/***
@@ -710,6 +710,27 @@ dns_message_findtype(dns_name_t *name, dns_rdatatype_t type,
* ISC_R_NOTFOUND -- the desired type does not exist.
*/
+isc_result_t
+dns_message_find(dns_name_t *name, dns_rdataclass_t rdclass,
+ dns_rdatatype_t type, dns_rdatatype_t covers,
+ dns_rdataset_t **rdataset);
+/*%<
+ * Search the name for the specified rdclass and type. If it is found,
+ * *rdataset is filled in with a pointer to that rdataset.
+ *
+ * Requires:
+ *\li if '**rdataset' is non-NULL, *rdataset needs to be NULL.
+ *
+ *\li 'type' be a valid type, and NOT dns_rdatatype_any.
+ *
+ *\li If 'type' is dns_rdatatype_rrsig, 'covers' must be a valid type.
+ * Otherwise it should be 0.
+ *
+ * Returns:
+ *\li #ISC_R_SUCCESS -- all is well.
+ *\li #ISC_R_NOTFOUND -- the desired type does not exist.
+ */
+
void
dns_message_movename(dns_message_t *msg, dns_name_t *name,
dns_section_t fromsection,
@@ -1260,7 +1281,7 @@ dns_message_getrawmessage(dns_message_t *msg);
void
dns_message_setsortorder(dns_message_t *msg, dns_rdatasetorderfunc_t order,
- void *order_arg);
+ const void *order_arg);
/*
* Define the order in which RR sets get rendered by
* dns_message_rendersection() to be the ascending order
diff --git a/usr.sbin/bind/lib/dns/include/dns/peer.h b/usr.sbin/bind/lib/dns/include/dns/peer.h
index bec93880d6d..7bd6b3fff25 100644
--- a/usr.sbin/bind/lib/dns/include/dns/peer.h
+++ b/usr.sbin/bind/lib/dns/include/dns/peer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2006 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2000, 2001, 2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $ISC: peer.h,v 1.16.2.1.10.3 2004/03/06 08:13:58 marka Exp $ */
+/* $ISC: peer.h,v 1.16.2.1.10.5 2006/03/02 00:37:20 marka Exp $ */
#ifndef DNS_PEER_H
#define DNS_PEER_H 1
@@ -167,7 +167,8 @@ isc_result_t
dns_peer_setkey(dns_peer_t *peer, dns_name_t **keyval);
isc_result_t
-dns_peer_settransfersource(dns_peer_t *peer, isc_sockaddr_t *transfer_source);
+dns_peer_settransfersource(dns_peer_t *peer,
+ const isc_sockaddr_t *transfer_source);
isc_result_t
dns_peer_gettransfersource(dns_peer_t *peer, isc_sockaddr_t *transfer_source);
diff --git a/usr.sbin/bind/lib/dns/include/dns/resolver.h b/usr.sbin/bind/lib/dns/include/dns/resolver.h
index c4397ab5ec2..042e833ee6b 100644
--- a/usr.sbin/bind/lib/dns/include/dns/resolver.h
+++ b/usr.sbin/bind/lib/dns/include/dns/resolver.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2006 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2001, 2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $ISC: resolver.h,v 1.34.12.7 2004/04/15 23:56:31 marka Exp $ */
+/* $ISC: resolver.h,v 1.34.12.9 2006/02/01 23:48:51 marka Exp $ */
#ifndef DNS_RESOLVER_H
#define DNS_RESOLVER_H 1
@@ -136,7 +136,7 @@ dns_resolver_create(dns_view_t *view,
*
* 'dispatchv6' is a valid dispatcher with an IPv6 UDP socket, or is NULL.
*
- * *resp != NULL && *resp == NULL.
+ * resp != NULL && *resp == NULL.
*
* Returns:
*
diff --git a/usr.sbin/bind/lib/dns/include/dns/types.h b/usr.sbin/bind/lib/dns/include/dns/types.h
index 56537df4d1e..638307e25a2 100644
--- a/usr.sbin/bind/lib/dns/include/dns/types.h
+++ b/usr.sbin/bind/lib/dns/include/dns/types.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2006 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1998-2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $ISC: types.h,v 1.103.12.7 2004/03/08 09:04:39 marka Exp $ */
+/* $ISC: types.h,v 1.103.12.9 2006/03/02 00:37:20 marka Exp $ */
#ifndef DNS_TYPES_H
#define DNS_TYPES_H 1
@@ -294,6 +294,6 @@ typedef void
(*dns_updatecallback_t)(void *, isc_result_t, dns_message_t *);
typedef int
-(*dns_rdatasetorderfunc_t)(dns_rdata_t *rdata, void *arg);
+(*dns_rdatasetorderfunc_t)(const dns_rdata_t *rdata, const void *arg);
#endif /* DNS_TYPES_H */
diff --git a/usr.sbin/bind/lib/dns/include/dns/validator.h b/usr.sbin/bind/lib/dns/include/dns/validator.h
index 478564ab9ef..c1cac1bbfc1 100644
--- a/usr.sbin/bind/lib/dns/include/dns/validator.h
+++ b/usr.sbin/bind/lib/dns/include/dns/validator.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2000-2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $ISC: validator.h,v 1.18.12.9 2005/09/06 02:12:41 marka Exp $ */
+/* $ISC: validator.h,v 1.18.12.11 2006/01/06 00:01:42 marka Exp $ */
#ifndef DNS_VALIDATOR_H
#define DNS_VALIDATOR_H 1
@@ -24,27 +24,35 @@
***** Module Info
*****/
-/*
+/*! \file
+ *
+ * \brief
* DNS Validator
+ * This is the BIND 9 validator, the module responsible for validating the
+ * rdatasets and negative responses (messages). It makes use of zones in
+ * the view and may fetch RRset to complete trust chains. It implements
+ * DNSSEC as specified in RFC 4033, 4034 and 4035.
*
- * XXX <TBS> XXX
+ * It can also optionally implement ISC's DNSSEC look-aside validation.
+ *
+ * Correct operation is critical to preventing spoofed answers from secure
+ * zones being accepted.
*
* MP:
- * The module ensures appropriate synchronization of data structures it
+ *\li The module ensures appropriate synchronization of data structures it
* creates and manipulates.
*
* Reliability:
- * No anticipated impact.
+ *\li No anticipated impact.
*
* Resources:
- * <TBS>
+ *\li TBS
*
* Security:
- * No anticipated impact.
+ *\li No anticipated impact.
*
* Standards:
- * RFCs: 1034, 1035, 2181, 2535, <TBS>
- * Drafts: <TBS>
+ *\li RFCs: 1034, 1035, 2181, 4033, 4034, 4035.
*/
#include <isc/lang.h>
@@ -58,12 +66,16 @@
#include <dst/dst.h>
-/*
+/*%
* A dns_validatorevent_t is sent when a 'validation' completes.
- *
+ * \brief
* 'name', 'rdataset', 'sigrdataset', and 'message' are the values that were
* supplied when dns_validator_create() was called. They are returned to the
* caller so that they may be freed.
+ *
+ * If the RESULT is ISC_R_SUCCESS and the answer is secure then
+ * proofs[] will contain the the names of the NSEC records that hold the
+ * various proofs. Note the same name may appear multiple times.
*/
typedef struct dns_validatorevent {
ISC_EVENT_COMMON(struct dns_validatorevent);
@@ -81,9 +93,9 @@ typedef struct dns_validatorevent {
#define DNS_VALIDATOR_NODATAPROOF 1
#define DNS_VALIDATOR_NOWILDCARDPROOF 2
-/*
- * A validator object represents a validation in procgress.
- *
+/*%
+ * A validator object represents a validation in progress.
+ * \brief
* Clients are strongly discouraged from using this type directly, with
* the exception of the 'link' field, which may be used directly for
* whatever purpose the client desires.
@@ -128,7 +140,10 @@ struct dns_validator {
unsigned int depth;
};
-#define DNS_VALIDATOR_DLV 1
+/*%
+ * dns_validator_create() options.
+ */
+#define DNS_VALIDATOR_DLV 1U
ISC_LANG_BEGINDECLS
@@ -138,7 +153,7 @@ dns_validator_create(dns_view_t *view, dns_name_t *name, dns_rdatatype_t type,
dns_message_t *message, unsigned int options,
isc_task_t *task, isc_taskaction_t action, void *arg,
dns_validator_t **validatorp);
-/*
+/*%<
* Start a DNSSEC validation.
*
* This validates a response to the question given by
@@ -163,41 +178,45 @@ dns_validator_create(dns_view_t *view, dns_name_t *name, dns_rdatatype_t type,
* arguments must be provided.
*
* The validation is performed in the context of 'view'.
- * 'options' must be zero.
*
* When the validation finishes, a dns_validatorevent_t with
* the given 'action' and 'arg' are sent to 'task'.
* Its 'result' field will be ISC_R_SUCCESS iff the
* response was successfully proven to be either secure or
* part of a known insecure domain.
+ *
+ * options:
+ * If DNS_VALIDATOR_DLV is set the caller knows there is not a
+ * trusted key and the validator should immediately attempt to validate
+ * the answer by looking for a appopriate DLV RRset.
*/
void
dns_validator_cancel(dns_validator_t *validator);
-/*
+/*%<
* Cancel a DNSSEC validation in progress.
*
* Requires:
- * 'validator' points to a valid DNSSEC validator, which
+ *\li 'validator' points to a valid DNSSEC validator, which
* may or may not already have completed.
*
* Ensures:
- * It the validator has not already sent its completion
+ *\li It the validator has not already sent its completion
* event, it will send it with result code ISC_R_CANCELED.
*/
void
dns_validator_destroy(dns_validator_t **validatorp);
-/*
+/*%<
* Destroy a DNSSEC validator.
*
* Requires:
- * '*validatorp' points to a valid DNSSEC validator.
- * The validator must have completed and sent its completion
+ *\li '*validatorp' points to a valid DNSSEC validator.
+ * \li The validator must have completed and sent its completion
* event.
*
* Ensures:
- * All resources used by the validator are freed.
+ *\li All resources used by the validator are freed.
*/
ISC_LANG_ENDDECLS
diff --git a/usr.sbin/bind/lib/dns/include/dns/xfrin.h b/usr.sbin/bind/lib/dns/include/dns/xfrin.h
index 07247adb6be..03027c03996 100644
--- a/usr.sbin/bind/lib/dns/include/dns/xfrin.h
+++ b/usr.sbin/bind/lib/dns/include/dns/xfrin.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2006 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2001, 2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $ISC: xfrin.h,v 1.18.136.2 2004/03/06 08:14:01 marka Exp $ */
+/* $ISC: xfrin.h,v 1.18.136.4 2006/07/20 01:10:29 marka Exp $ */
#ifndef DNS_XFRIN_H
#define DNS_XFRIN_H 1
@@ -75,10 +75,12 @@ dns_xfrin_create2(dns_zone_t *zone, dns_rdatatype_t xfrtype,
* code as arguments when the transfer finishes.
*
* Requires:
- * 'xfrtype' is dns_rdatatype_axfr or dns_rdatatype_ixfr.
+ * 'xfrtype' is dns_rdatatype_axfr, dns_rdatatype_ixfr
+ * or dns_rdatatype_soa (soa query followed by axfr if
+ * serial is greater than current serial).
*
- * If 'xfrtype' is dns_rdatatype_ixfr, the zone has a
- * database.
+ * If 'xfrtype' is dns_rdatatype_ixfr or dns_rdatatype_soa,
+ * the zone has a database.
*/
void
diff --git a/usr.sbin/bind/lib/dns/keytable.c b/usr.sbin/bind/lib/dns/keytable.c
index e6fa9168878..73b38e723d6 100644
--- a/usr.sbin/bind/lib/dns/keytable.c
+++ b/usr.sbin/bind/lib/dns/keytable.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2006 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2000, 2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $ISC: keytable.c,v 1.26.12.3 2004/03/08 09:04:30 marka Exp $ */
+/* $ISC: keytable.c,v 1.26.12.5 2006/01/06 00:01:42 marka Exp $ */
#include <config.h>
@@ -244,6 +244,13 @@ dns_keytable_findkeynode(dns_keytable_t *keytable, dns_name_t *name,
RWLOCK(&keytable->rwlock, isc_rwlocktype_read);
+ /*
+ * Note we don't want the DNS_R_PARTIALMATCH from dns_rbt_findname()
+ * as that indicates that 'name' was not found.
+ *
+ * DNS_R_PARTIALMATCH indicates that the name was found but we
+ * didn't get a match on algorithm and key id arguments.
+ */
knode = NULL;
data = NULL;
result = dns_rbt_findname(keytable->table, name, 0, NULL, &data);
@@ -261,7 +268,7 @@ dns_keytable_findkeynode(dns_keytable_t *keytable, dns_name_t *name,
UNLOCK(&keytable->lock);
*keynodep = knode;
} else
- result = ISC_R_NOTFOUND;
+ result = DNS_R_PARTIALMATCH;
} else if (result == DNS_R_PARTIALMATCH)
result = ISC_R_NOTFOUND;
diff --git a/usr.sbin/bind/lib/dns/lookup.c b/usr.sbin/bind/lib/dns/lookup.c
index f387111ad68..b54380e8f94 100644
--- a/usr.sbin/bind/lib/dns/lookup.c
+++ b/usr.sbin/bind/lib/dns/lookup.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2006 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2000, 2001, 2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $ISC: lookup.c,v 1.9.12.5 2004/04/15 02:10:40 marka Exp $ */
+/* $ISC: lookup.c,v 1.9.12.7 2006/01/04 23:50:20 marka Exp $ */
#include <config.h>
@@ -154,11 +154,6 @@ build_event(dns_lookup_t *lookup) {
dns_rdataset_disassociate(rdataset);
isc_mem_put(lookup->mctx, rdataset, sizeof(dns_rdataset_t));
}
- if (sigrdataset != NULL) {
- if (dns_rdataset_isassociated(sigrdataset))
- dns_rdataset_disassociate(sigrdataset);
- isc_mem_put(lookup->mctx, sigrdataset, sizeof(dns_rdataset_t));
- }
return (result);
}
@@ -229,13 +224,14 @@ lookup_find(dns_lookup_t *lookup, dns_fetchevent_t *event) {
send_event = ISC_TRUE;
goto done;
}
- } else {
+ } else if (event != NULL) {
result = event->result;
fname = dns_fixedname_name(&event->foundname);
dns_resolver_destroyfetch(&lookup->fetch);
INSIST(event->rdataset == &lookup->rdataset);
INSIST(event->sigrdataset == &lookup->sigrdataset);
- }
+ } else
+ fname = NULL; /* Silence compiler warning. */
/*
* If we've been canceled, forget about the result.
diff --git a/usr.sbin/bind/lib/dns/openssl_link.c b/usr.sbin/bind/lib/dns/openssl_link.c
index 585e8646656..10ba445e210 100644
--- a/usr.sbin/bind/lib/dns/openssl_link.c
+++ b/usr.sbin/bind/lib/dns/openssl_link.c
@@ -1,5 +1,5 @@
/*
- * Portions Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Portions Copyright (C) 2004, 2006 Internet Systems Consortium, Inc. ("ISC")
* Portions Copyright (C) 1999-2003 Internet Software Consortium.
* Portions Copyright (C) 1995-2000 by Network Associates, Inc.
*
@@ -18,7 +18,7 @@
/*
* Principal Author: Brian Wellington
- * $ISC: openssl_link.c,v 1.1.4.1 2004/12/09 04:07:18 marka Exp $
+ * $ISC: openssl_link.c,v 1.1.4.3 2006/05/23 23:51:03 marka Exp $
*/
#ifdef OPENSSL
@@ -39,7 +39,7 @@
#include <openssl/rand.h>
#include <openssl/crypto.h>
-#if defined(CRYPTO_LOCK_ENGINE) && (OPENSSL_VERSION_NUMBER < 0x00907000L)
+#if defined(CRYPTO_LOCK_ENGINE) && (OPENSSL_VERSION_NUMBER != 0x00907000L)
#define USE_ENGINE 1
#endif
@@ -160,7 +160,7 @@ dst__openssl_init() {
goto cleanup_rm;
}
ENGINE_set_RAND(e, rm);
- RAND_set_rand_method(e);
+ RAND_set_rand_method(rm);
#else
RAND_set_rand_method(rm);
#endif
diff --git a/usr.sbin/bind/lib/dns/openssldh_link.c b/usr.sbin/bind/lib/dns/openssldh_link.c
index 55f678ee5a0..878d88108a1 100644
--- a/usr.sbin/bind/lib/dns/openssldh_link.c
+++ b/usr.sbin/bind/lib/dns/openssldh_link.c
@@ -1,5 +1,5 @@
/*
- * Portions Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Portions Copyright (C) 2004, 2006 Internet Systems Consortium, Inc. ("ISC")
* Portions Copyright (C) 1999-2002 Internet Software Consortium.
* Portions Copyright (C) 1995-2000 by Network Associates, Inc.
*
@@ -18,7 +18,7 @@
/*
* Principal Author: Brian Wellington
- * $ISC: openssldh_link.c,v 1.1.4.1 2004/12/09 04:07:18 marka Exp $
+ * $ISC: openssldh_link.c,v 1.1.4.3 2006/03/02 00:37:20 marka Exp $
*/
#ifdef OPENSSL
@@ -138,6 +138,79 @@ openssldh_paramcompare(const dst_key_t *key1, const dst_key_t *key2) {
return (ISC_TRUE);
}
+#ifndef HAVE_DH_GENERATE_PARAMETERS
+/* ====================================================================
+ * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this
+ * software must display the following acknowledgment:
+ * "This product includes software developed by the OpenSSL Project
+ * for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
+ *
+ * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * openssl-core@openssl.org.
+ *
+ * 5. Products derived from this software may not be called "OpenSSL"
+ * nor may "OpenSSL" appear in their names without prior written
+ * permission of the OpenSSL Project.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by the OpenSSL Project
+ * for use in the OpenSSL Toolkit (http://www.openssl.org/)"
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This product includes cryptographic software written by Eric Young
+ * (eay@cryptsoft.com). This product includes software written by Tim
+ * Hudson (tjh@cryptsoft.com).
+ *
+ */
+static DH *
+DH_generate_parameters(int prime_len, int generator,
+ void (*callback)(int,int,void *), void *cb_arg)
+{
+ BN_GENCB cb;
+ DH *dh = NULL;
+
+ dh = DH_new();
+ if (dh != NULL) {
+ BN_GENCB_set_old(&cb, callback, cb_arg);
+
+ if (DH_generate_parameters_ex(dh, prime_len, generator, &cb))
+ return (dh);
+ DH_free(dh);
+ }
+ return (NULL);
+}
+#endif
+
static isc_result_t
openssldh_generate(dst_key_t *key, int generator) {
DH *dh = NULL;
diff --git a/usr.sbin/bind/lib/dns/opensslrsa_link.c b/usr.sbin/bind/lib/dns/opensslrsa_link.c
index 55c1be871eb..35d62d85821 100644
--- a/usr.sbin/bind/lib/dns/opensslrsa_link.c
+++ b/usr.sbin/bind/lib/dns/opensslrsa_link.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2006 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2000-2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -17,7 +17,7 @@
/*
* Principal Author: Brian Wellington
- * $ISC: opensslrsa_link.c,v 1.1.4.1 2004/12/09 04:07:18 marka Exp $
+ * $ISC: opensslrsa_link.c,v 1.1.4.9 2006/11/07 21:28:40 marka Exp $
*/
#ifdef OPENSSL
@@ -39,6 +39,22 @@
#include <openssl/err.h>
#include <openssl/objects.h>
#include <openssl/rsa.h>
+#if OPENSSL_VERSION_NUMBER > 0x00908000L
+#include <openssl/bn.h>
+#endif
+
+/*
+ * We don't use configure for windows so enforce the OpenSSL version
+ * here. Unlike with configure we don't support overriding this test.
+ */
+#ifdef WIN32
+#if !((OPENSSL_VERSION_NUMBER >= 0x009070cfL && \
+ OPENSSL_VERSION_NUMBER < 0x00908000L) || \
+ OPENSSL_VERSION_NUMBER >= 0x0090804fL)
+#error Please upgrade OpenSSL to 0.9.8d/0.9.7l or greater.
+#endif
+#endif
+
/*
* XXXMPA Temporarially disable RSA_BLINDING as it requires
@@ -68,6 +84,12 @@
(rsa)->flags &= ~(RSA_FLAG_CACHE_PUBLIC | RSA_FLAG_CACHE_PRIVATE); \
(rsa)->flags &= ~RSA_FLAG_BLINDING; \
} while (0)
+#elif defined(RSA_FLAG_NO_BLINDING)
+#define SET_FLAGS(rsa) \
+ do { \
+ (rsa)->flags &= ~RSA_FLAG_BLINDING; \
+ (rsa)->flags |= RSA_FLAG_NO_BLINDING; \
+ } while (0)
#else
#define SET_FLAGS(rsa) \
do { \
@@ -87,12 +109,16 @@ opensslrsa_createctx(dst_key_t *key, dst_context_t *dctx) {
isc_md5_t *md5ctx;
md5ctx = isc_mem_get(dctx->mctx, sizeof(isc_md5_t));
+ if (md5ctx == NULL)
+ return (ISC_R_NOMEMORY);
isc_md5_init(md5ctx);
dctx->opaque = md5ctx;
} else {
isc_sha1_t *sha1ctx;
sha1ctx = isc_mem_get(dctx->mctx, sizeof(isc_sha1_t));
+ if (sha1ctx == NULL)
+ return (ISC_R_NOMEMORY);
isc_sha1_init(sha1ctx);
dctx->opaque = sha1ctx;
}
@@ -260,20 +286,55 @@ opensslrsa_compare(const dst_key_t *key1, const dst_key_t *key2) {
static isc_result_t
opensslrsa_generate(dst_key_t *key, int exp) {
+#if OPENSSL_VERSION_NUMBER > 0x00908000L
+ BN_GENCB cb;
+ RSA *rsa = RSA_new();
+ BIGNUM *e = BN_new();
+
+ if (rsa == NULL || e == NULL)
+ goto err;
+
+ if (exp == 0) {
+ /* RSA_F4 0x10001 */
+ BN_set_bit(e, 0);
+ BN_set_bit(e, 16);
+ } else {
+ /* F5 0x100000001 */
+ BN_set_bit(e, 0);
+ BN_set_bit(e, 32);
+ }
+
+ BN_GENCB_set_old(&cb, NULL, NULL);
+
+ if (RSA_generate_key_ex(rsa, key->key_size, e, &cb)) {
+ BN_free(e);
+ SET_FLAGS(rsa);
+ key->opaque = rsa;
+ return (ISC_R_SUCCESS);
+ }
+
+err:
+ if (e != NULL)
+ BN_free(e);
+ if (rsa != NULL)
+ RSA_free(rsa);
+ return (dst__openssl_toresult(DST_R_OPENSSLFAILURE));
+#else
RSA *rsa;
unsigned long e;
if (exp == 0)
- e = RSA_3;
+ e = RSA_F4;
else
- e = RSA_F4;
+ e = 0x40000003;
rsa = RSA_generate_key(key->key_size, e, NULL, NULL);
if (rsa == NULL)
- return (dst__openssl_toresult(DST_R_OPENSSLFAILURE));
+ return (dst__openssl_toresult(DST_R_OPENSSLFAILURE));
SET_FLAGS(rsa);
key->opaque = rsa;
return (ISC_R_SUCCESS);
+#endif
}
static isc_boolean_t
diff --git a/usr.sbin/bind/lib/dns/peer.c b/usr.sbin/bind/lib/dns/peer.c
index 49d91fbf8fd..b4b3d981037 100644
--- a/usr.sbin/bind/lib/dns/peer.c
+++ b/usr.sbin/bind/lib/dns/peer.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2006 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2000, 2001, 2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $ISC: peer.c,v 1.14.2.1.10.4 2004/03/06 08:13:41 marka Exp $ */
+/* $ISC: peer.c,v 1.14.2.1.10.6 2006/03/02 00:37:20 marka Exp $ */
#include <config.h>
@@ -491,7 +491,9 @@ dns_peer_setkeybycharp(dns_peer_t *peer, const char *keyval) {
}
isc_result_t
-dns_peer_settransfersource(dns_peer_t *peer, isc_sockaddr_t *transfer_source) {
+dns_peer_settransfersource(dns_peer_t *peer,
+ const isc_sockaddr_t *transfer_source)
+{
REQUIRE(DNS_PEER_VALID(peer));
if (peer->transfer_source != NULL) {
diff --git a/usr.sbin/bind/lib/dns/portlist.c b/usr.sbin/bind/lib/dns/portlist.c
index d5d8803bb74..9e6332b4393 100644
--- a/usr.sbin/bind/lib/dns/portlist.c
+++ b/usr.sbin/bind/lib/dns/portlist.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2006 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,7 +15,9 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $ISC: portlist.c,v 1.3.72.4 2004/03/16 05:50:21 marka Exp $ */
+/* $ISC: portlist.c,v 1.3.72.6 2006/08/25 05:25:50 marka Exp $ */
+
+#include <config.h>
#include <stdlib.h>
diff --git a/usr.sbin/bind/lib/dns/rdata/generic/dlv_32769.c b/usr.sbin/bind/lib/dns/rdata/generic/dlv_32769.c
new file mode 100644
index 00000000000..bdcb87d4771
--- /dev/null
+++ b/usr.sbin/bind/lib/dns/rdata/generic/dlv_32769.c
@@ -0,0 +1,281 @@
+/*
+ * Copyright (C) 2004, 2006 Internet Systems Consortium, Inc. ("ISC")
+ *
+ * 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.
+ */
+
+/* $ISC: dlv_32769.c,v 1.2.4.2 2006/02/19 06:50:46 marka Exp $ */
+
+/* draft-ietf-dnsext-delegation-signer-05.txt */
+
+#ifndef RDATA_GENERIC_DLV_32769_C
+#define RDATA_GENERIC_DLV_32769_C
+
+#define RRTYPE_DLV_ATTRIBUTES 0
+
+static inline isc_result_t
+fromtext_dlv(ARGS_FROMTEXT) {
+ isc_token_t token;
+
+ REQUIRE(type == 32769);
+
+ UNUSED(type);
+ UNUSED(rdclass);
+ UNUSED(origin);
+ UNUSED(options);
+ UNUSED(callbacks);
+
+ /*
+ * Key tag.
+ */
+ RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
+ ISC_FALSE));
+ if (token.value.as_ulong > 0xffffU)
+ RETTOK(ISC_R_RANGE);
+ RETERR(uint16_tobuffer(token.value.as_ulong, target));
+
+ /*
+ * Algorithm.
+ */
+ RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
+ ISC_FALSE));
+ if (token.value.as_ulong > 0xffU)
+ RETTOK(ISC_R_RANGE);
+ RETERR(uint8_tobuffer(token.value.as_ulong, target));
+
+ /*
+ * Digest type.
+ */
+ RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
+ ISC_FALSE));
+ if (token.value.as_ulong > 0xffU)
+ RETTOK(ISC_R_RANGE);
+ RETERR(uint8_tobuffer(token.value.as_ulong, target));
+ type = (isc_uint16_t) token.value.as_ulong;
+
+ /*
+ * Digest.
+ */
+ return (isc_hex_tobuffer(lexer, target, -1));
+}
+
+static inline isc_result_t
+totext_dlv(ARGS_TOTEXT) {
+ isc_region_t sr;
+ char buf[sizeof("64000 ")];
+ unsigned int n;
+
+ REQUIRE(rdata->type == 32769);
+ REQUIRE(rdata->length != 0);
+
+ UNUSED(tctx);
+
+ dns_rdata_toregion(rdata, &sr);
+
+ /*
+ * Key tag.
+ */
+ n = uint16_fromregion(&sr);
+ isc_region_consume(&sr, 2);
+ sprintf(buf, "%u ", n);
+ RETERR(str_totext(buf, target));
+
+ /*
+ * Algorithm.
+ */
+ n = uint8_fromregion(&sr);
+ isc_region_consume(&sr, 1);
+ sprintf(buf, "%u ", n);
+ RETERR(str_totext(buf, target));
+
+ /*
+ * Digest type.
+ */
+ n = uint8_fromregion(&sr);
+ isc_region_consume(&sr, 1);
+ sprintf(buf, "%u", n);
+ RETERR(str_totext(buf, target));
+
+ /*
+ * Digest.
+ */
+ if ((tctx->flags & DNS_STYLEFLAG_MULTILINE) != 0)
+ RETERR(str_totext(" (", target));
+ RETERR(str_totext(tctx->linebreak, target));
+ RETERR(isc_hex_totext(&sr, tctx->width - 2, tctx->linebreak, target));
+ if ((tctx->flags & DNS_STYLEFLAG_MULTILINE) != 0)
+ RETERR(str_totext(" )", target));
+ return (ISC_R_SUCCESS);
+}
+
+static inline isc_result_t
+fromwire_dlv(ARGS_FROMWIRE) {
+ isc_region_t sr;
+
+ REQUIRE(type == 32769);
+
+ UNUSED(type);
+ UNUSED(rdclass);
+ UNUSED(dctx);
+ UNUSED(options);
+
+ isc_buffer_activeregion(source, &sr);
+ if (sr.length < 4)
+ return (ISC_R_UNEXPECTEDEND);
+
+ isc_buffer_forward(source, sr.length);
+ return (mem_tobuffer(target, sr.base, sr.length));
+}
+
+static inline isc_result_t
+towire_dlv(ARGS_TOWIRE) {
+ isc_region_t sr;
+
+ REQUIRE(rdata->type == 32769);
+ REQUIRE(rdata->length != 0);
+
+ UNUSED(cctx);
+
+ dns_rdata_toregion(rdata, &sr);
+ return (mem_tobuffer(target, sr.base, sr.length));
+}
+
+static inline int
+compare_dlv(ARGS_COMPARE) {
+ isc_region_t r1;
+ isc_region_t r2;
+
+ REQUIRE(rdata1->type == rdata2->type);
+ REQUIRE(rdata1->rdclass == rdata2->rdclass);
+ REQUIRE(rdata1->type == 32769);
+ REQUIRE(rdata1->length != 0);
+ REQUIRE(rdata2->length != 0);
+
+ dns_rdata_toregion(rdata1, &r1);
+ dns_rdata_toregion(rdata2, &r2);
+ return (isc_region_compare(&r1, &r2));
+}
+
+static inline isc_result_t
+fromstruct_dlv(ARGS_FROMSTRUCT) {
+ dns_rdata_dlv_t *dlv = source;
+
+ REQUIRE(type == 32769);
+ REQUIRE(source != NULL);
+ REQUIRE(dlv->common.rdtype == type);
+ REQUIRE(dlv->common.rdclass == rdclass);
+
+ UNUSED(type);
+ UNUSED(rdclass);
+
+ RETERR(uint16_tobuffer(dlv->key_tag, target));
+ RETERR(uint8_tobuffer(dlv->algorithm, target));
+ RETERR(uint8_tobuffer(dlv->digest_type, target));
+
+ return (mem_tobuffer(target, dlv->digest, dlv->length));
+}
+
+static inline isc_result_t
+tostruct_dlv(ARGS_TOSTRUCT) {
+ dns_rdata_dlv_t *dlv = target;
+ isc_region_t region;
+
+ REQUIRE(rdata->type == 32769);
+ REQUIRE(target != NULL);
+ REQUIRE(rdata->length != 0);
+
+ dlv->common.rdclass = rdata->rdclass;
+ dlv->common.rdtype = rdata->type;
+ ISC_LINK_INIT(&dlv->common, link);
+
+ dns_rdata_toregion(rdata, &region);
+
+ dlv->key_tag = uint16_fromregion(&region);
+ isc_region_consume(&region, 2);
+ dlv->algorithm = uint8_fromregion(&region);
+ isc_region_consume(&region, 1);
+ dlv->digest_type = uint8_fromregion(&region);
+ isc_region_consume(&region, 1);
+ dlv->length = region.length;
+
+ dlv->digest = mem_maybedup(mctx, region.base, region.length);
+ if (dlv->digest == NULL)
+ return (ISC_R_NOMEMORY);
+
+ dlv->mctx = mctx;
+ return (ISC_R_SUCCESS);
+}
+
+static inline void
+freestruct_dlv(ARGS_FREESTRUCT) {
+ dns_rdata_dlv_t *dlv = source;
+
+ REQUIRE(dlv != NULL);
+ REQUIRE(dlv->common.rdtype == 32769);
+
+ if (dlv->mctx == NULL)
+ return;
+
+ if (dlv->digest != NULL)
+ isc_mem_free(dlv->mctx, dlv->digest);
+ dlv->mctx = NULL;
+}
+
+static inline isc_result_t
+additionaldata_dlv(ARGS_ADDLDATA) {
+ REQUIRE(rdata->type == 32769);
+
+ UNUSED(rdata);
+ UNUSED(add);
+ UNUSED(arg);
+
+ return (ISC_R_SUCCESS);
+}
+
+static inline isc_result_t
+digest_dlv(ARGS_DIGEST) {
+ isc_region_t r;
+
+ REQUIRE(rdata->type == 32769);
+
+ dns_rdata_toregion(rdata, &r);
+
+ return ((digest)(arg, &r));
+}
+
+static inline isc_boolean_t
+checkowner_dlv(ARGS_CHECKOWNER) {
+
+ REQUIRE(type == 32769);
+
+ UNUSED(name);
+ UNUSED(type);
+ UNUSED(rdclass);
+ UNUSED(wildcard);
+
+ return (ISC_TRUE);
+}
+
+static inline isc_boolean_t
+checknames_dlv(ARGS_CHECKNAMES) {
+
+ REQUIRE(rdata->type == 32769);
+
+ UNUSED(rdata);
+ UNUSED(owner);
+ UNUSED(bad);
+
+ return (ISC_TRUE);
+}
+
+#endif /* RDATA_GENERIC_DLV_32769_C */
diff --git a/usr.sbin/bind/lib/dns/rdata/generic/dlv_32769.h b/usr.sbin/bind/lib/dns/rdata/generic/dlv_32769.h
new file mode 100644
index 00000000000..2db63241524
--- /dev/null
+++ b/usr.sbin/bind/lib/dns/rdata/generic/dlv_32769.h
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2004, 2006 Internet Systems Consortium, Inc. ("ISC")
+ *
+ * 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.
+ */
+
+/* $ISC: dlv_32769.h,v 1.2.4.2 2006/02/19 06:50:46 marka Exp $ */
+
+/* draft-ietf-dnsext-delegation-signer-05.txt */
+#ifndef GENERIC_DLV_32769_H
+#define GENERIC_DLV_32769_H 1
+
+typedef struct dns_rdata_dlv {
+ dns_rdatacommon_t common;
+ isc_mem_t *mctx;
+ isc_uint16_t key_tag;
+ isc_uint8_t algorithm;
+ isc_uint8_t digest_type;
+ isc_uint16_t length;
+ unsigned char *digest;
+} dns_rdata_dlv_t;
+
+#endif /* GENERIC_DLV_32769_H */
diff --git a/usr.sbin/bind/lib/dns/tcpmsg.c b/usr.sbin/bind/lib/dns/tcpmsg.c
index 599ce265824..c5d2d2ed39f 100644
--- a/usr.sbin/bind/lib/dns/tcpmsg.c
+++ b/usr.sbin/bind/lib/dns/tcpmsg.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2006 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $ISC: tcpmsg.c,v 1.24.206.1 2004/03/06 08:13:46 marka Exp $ */
+/* $ISC: tcpmsg.c,v 1.24.206.3 2006/08/10 23:59:28 marka Exp $ */
#include <config.h>
@@ -52,6 +52,7 @@ recv_length(isc_task_t *task, isc_event_t *ev_in) {
INSIST(VALID_TCPMSG(tcpmsg));
dev = &tcpmsg->event;
+ tcpmsg->address = ev->address;
if (ev->result != ISC_R_SUCCESS) {
tcpmsg->result = ev->result;
@@ -108,6 +109,7 @@ recv_message(isc_task_t *task, isc_event_t *ev_in) {
INSIST(VALID_TCPMSG(tcpmsg));
dev = &tcpmsg->event;
+ tcpmsg->address = ev->address;
if (ev->result != ISC_R_SUCCESS) {
tcpmsg->result = ev->result;
@@ -116,7 +118,6 @@ recv_message(isc_task_t *task, isc_event_t *ev_in) {
tcpmsg->result = ISC_R_SUCCESS;
isc_buffer_add(&tcpmsg->buffer, ev->n);
- tcpmsg->address = ev->address;
XDEBUG(("Received %d bytes (of %d)\n", ev->n, tcpmsg->size));
diff --git a/usr.sbin/bind/lib/dns/tkey.c b/usr.sbin/bind/lib/dns/tkey.c
index 66d8fb289d8..e82ebe164b0 100644
--- a/usr.sbin/bind/lib/dns/tkey.c
+++ b/usr.sbin/bind/lib/dns/tkey.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2001, 2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -16,7 +16,7 @@
*/
/*
- * $ISC: tkey.c,v 1.71.2.1.10.7 2005/06/12 00:02:26 marka Exp $
+ * $ISC: tkey.c,v 1.71.2.1.10.9 2006/01/04 23:50:20 marka Exp $
*/
#include <config.h>
@@ -441,15 +441,17 @@ process_gsstkey(dns_message_t *msg, dns_name_t *signer, dns_name_t *name,
dstkey, ISC_TRUE, signer,
tkeyin->inception, tkeyin->expire,
msg->mctx, ring, NULL);
+#if 1
if (result != ISC_R_SUCCESS)
goto failure;
-
+#else
if (result == ISC_R_NOTFOUND) {
tkeyout->error = dns_tsigerror_badalg;
return (ISC_R_SUCCESS);
}
if (result != ISC_R_SUCCESS)
goto failure;
+#endif
/* This key is good for a long time */
isc_stdtime_get(&now);
diff --git a/usr.sbin/bind/lib/isc/heap.c b/usr.sbin/bind/lib/isc/heap.c
index d006b4773d0..a605df3d423 100644
--- a/usr.sbin/bind/lib/isc/heap.c
+++ b/usr.sbin/bind/lib/isc/heap.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1997-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,15 +15,15 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $ISC: heap.c,v 1.28.12.3 2004/03/08 09:04:48 marka Exp $ */
+/* $ISC: heap.c,v 1.28.12.4 2006/04/17 18:27:20 explorer Exp $ */
-/*
+/*! \file
* Heap implementation of priority queues adapted from the following:
*
- * _Introduction to Algorithms_, Cormen, Leiserson, and Rivest,
+ * \li "Introduction to Algorithms," Cormen, Leiserson, and Rivest,
* MIT Press / McGraw Hill, 1990, ISBN 0-262-03141-8, chapter 7.
*
- * _Algorithms_, Second Edition, Sedgewick, Addison-Wesley, 1988,
+ * \li "Algorithms," Second Edition, Sedgewick, Addison-Wesley, 1988,
* ISBN 0-201-06673-4, chapter 11.
*/
@@ -35,20 +35,23 @@
#include <isc/string.h> /* Required for memcpy. */
#include <isc/util.h>
-/*
+/*@{*/
+/*%
* Note: to make heap_parent and heap_left easy to compute, the first
* element of the heap array is not used; i.e. heap subscripts are 1-based,
- * not 0-based.
+ * not 0-based. The parent is index/2, and the left-child is index*2.
+ * The right child is index*2+1.
*/
#define heap_parent(i) ((i) >> 1)
#define heap_left(i) ((i) << 1)
+/*@}*/
#define SIZE_INCREMENT 1024
#define HEAP_MAGIC ISC_MAGIC('H', 'E', 'A', 'P')
#define VALID_HEAP(h) ISC_MAGIC_VALID(h, HEAP_MAGIC)
-/*
+/*%
* When the heap is in a consistent state, the following invariant
* holds true: for every element i > 1, heap_parent(i) has a priority
* higher than or equal to that of i.
@@ -57,6 +60,7 @@
! heap->compare(heap->array[(i)], \
heap->array[heap_parent(i)]))
+/*% ISC heap structure. */
struct isc_heap {
unsigned int magic;
isc_mem_t * mctx;
@@ -141,8 +145,8 @@ static void
float_up(isc_heap_t *heap, unsigned int i, void *elt) {
unsigned int p;
- for (p = heap_parent(i);
- i > 1 && heap->compare(elt, heap->array[p]);
+ for (p = heap_parent(i) ;
+ i > 1 && heap->compare(elt, heap->array[p]) ;
i = p, p = heap_parent(i)) {
heap->array[i] = heap->array[p];
if (heap->index != NULL)
@@ -196,48 +200,48 @@ isc_heap_insert(isc_heap_t *heap, void *elt) {
}
void
-isc_heap_delete(isc_heap_t *heap, unsigned int i) {
+isc_heap_delete(isc_heap_t *heap, unsigned int index) {
void *elt;
isc_boolean_t less;
REQUIRE(VALID_HEAP(heap));
- REQUIRE(i >= 1 && i <= heap->last);
+ REQUIRE(index >= 1 && index <= heap->last);
- if (i == heap->last) {
+ if (index == heap->last) {
heap->last--;
} else {
elt = heap->array[heap->last--];
- less = heap->compare(elt, heap->array[i]);
- heap->array[i] = elt;
+ less = heap->compare(elt, heap->array[index]);
+ heap->array[index] = elt;
if (less)
- float_up(heap, i, heap->array[i]);
+ float_up(heap, index, heap->array[index]);
else
- sink_down(heap, i, heap->array[i]);
+ sink_down(heap, index, heap->array[index]);
}
}
void
-isc_heap_increased(isc_heap_t *heap, unsigned int i) {
+isc_heap_increased(isc_heap_t *heap, unsigned int index) {
REQUIRE(VALID_HEAP(heap));
- REQUIRE(i >= 1 && i <= heap->last);
+ REQUIRE(index >= 1 && index <= heap->last);
- float_up(heap, i, heap->array[i]);
+ float_up(heap, index, heap->array[index]);
}
void
-isc_heap_decreased(isc_heap_t *heap, unsigned int i) {
+isc_heap_decreased(isc_heap_t *heap, unsigned int index) {
REQUIRE(VALID_HEAP(heap));
- REQUIRE(i >= 1 && i <= heap->last);
+ REQUIRE(index >= 1 && index <= heap->last);
- sink_down(heap, i, heap->array[i]);
+ sink_down(heap, index, heap->array[index]);
}
void *
-isc_heap_element(isc_heap_t *heap, unsigned int i) {
+isc_heap_element(isc_heap_t *heap, unsigned int index) {
REQUIRE(VALID_HEAP(heap));
- REQUIRE(i >= 1 && i <= heap->last);
+ REQUIRE(index >= 1 && index <= heap->last);
- return (heap->array[i]);
+ return (heap->array[index]);
}
void
@@ -247,6 +251,6 @@ isc_heap_foreach(isc_heap_t *heap, isc_heapaction_t action, void *uap) {
REQUIRE(VALID_HEAP(heap));
REQUIRE(action != NULL);
- for (i = 1; i <= heap->last; i++)
+ for (i = 1 ; i <= heap->last ; i++)
(action)(heap->array[i], uap);
}
diff --git a/usr.sbin/bind/lib/isc/hmacmd5.c b/usr.sbin/bind/lib/isc/hmacmd5.c
index f848be1fb57..08b42a07de1 100644
--- a/usr.sbin/bind/lib/isc/hmacmd5.c
+++ b/usr.sbin/bind/lib/isc/hmacmd5.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2006 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2000, 2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $ISC: hmacmd5.c,v 1.5.12.3 2004/03/08 09:04:48 marka Exp $ */
+/* $ISC: hmacmd5.c,v 1.5.12.5 2006/02/26 23:49:48 marka Exp $ */
/*
* This code implements the HMAC-MD5 keyed hash algorithm
@@ -65,7 +65,6 @@ void
isc_hmacmd5_invalidate(isc_hmacmd5_t *ctx) {
isc_md5_invalidate(&ctx->md5ctx);
memset(ctx->key, 0, sizeof(ctx->key));
- memset(ctx, 0, sizeof(ctx));
}
/*
diff --git a/usr.sbin/bind/lib/isc/include/isc/heap.h b/usr.sbin/bind/lib/isc/include/isc/heap.h
index cb8ca46ee8e..ba766db891f 100644
--- a/usr.sbin/bind/lib/isc/include/isc/heap.h
+++ b/usr.sbin/bind/lib/isc/include/isc/heap.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1997-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,36 +15,155 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $ISC: heap.h,v 1.16.206.1 2004/03/06 08:14:41 marka Exp $ */
+/* $ISC: heap.h,v 1.16.206.2 2006/04/17 18:27:20 explorer Exp $ */
#ifndef ISC_HEAP_H
#define ISC_HEAP_H 1
+/*! \file */
+
#include <isc/lang.h>
#include <isc/types.h>
ISC_LANG_BEGINDECLS
-/*
+/*%
* The comparision function returns ISC_TRUE if the first argument has
* higher priority than the second argument, and ISC_FALSE otherwise.
*/
typedef isc_boolean_t (*isc_heapcompare_t)(void *, void *);
+/*%
+ * The index function allows the client of the heap to receive a callback
+ * when an item's index number changes. This allows it to maintain
+ * sync with its external state, but still delete itself, since deletions
+ * from the heap require the index be provided.
+ */
typedef void (*isc_heapindex_t)(void *, unsigned int);
+
+/*%
+ * The heapaction function is used when iterating over the heap.
+ *
+ * NOTE: The heap structure CANNOT BE MODIFIED during the call to
+ * isc_heap_foreach().
+ */
typedef void (*isc_heapaction_t)(void *, void *);
typedef struct isc_heap isc_heap_t;
-isc_result_t isc_heap_create(isc_mem_t *, isc_heapcompare_t,
- isc_heapindex_t, unsigned int, isc_heap_t **);
-void isc_heap_destroy(isc_heap_t **);
-isc_result_t isc_heap_insert(isc_heap_t *, void *);
-void isc_heap_delete(isc_heap_t *, unsigned int);
-void isc_heap_increased(isc_heap_t *, unsigned int);
-void isc_heap_decreased(isc_heap_t *, unsigned int);
-void * isc_heap_element(isc_heap_t *, unsigned int);
-void isc_heap_foreach(isc_heap_t *, isc_heapaction_t, void *);
+isc_result_t
+isc_heap_create(isc_mem_t *mctx, isc_heapcompare_t compare,
+ isc_heapindex_t index, unsigned int size_increment,
+ isc_heap_t **heapp);
+/*!<
+ * \brief Create a new heap. The heap is implemented using a space-efficient
+ * storage method. When the heap elements are deleted space is not freed
+ * but will be reused when new elements are inserted.
+ *
+ * Requires:
+ *\li "mctx" is valid.
+ *\li "compare" is a function which takes two void * arguments and
+ * returns ISC_TRUE if the first argument has a higher priority than
+ * the second, and ISC_FALSE otherwise.
+ *\li "index" is a function which takes a void *, and an unsigned int
+ * argument. This function will be called whenever an element's
+ * index value changes, so it may continue to delete itself from the
+ * heap. This option may be NULL if this functionality is unneeded.
+ *\li "size_increment" is a hint about how large the heap should grow
+ * when resizing is needed. If this is 0, a default size will be
+ * used, which is currently 1024, allowing space for an additional 1024
+ * heap elements to be inserted before adding more space.
+ *\li "heapp" is not NULL, and "*heap" is NULL.
+ *
+ * Returns:
+ *\li ISC_R_SUCCESS - success
+ *\li ISC_R_NOMEMORY - insufficient memory
+ */
+
+void
+isc_heap_destroy(isc_heap_t **heapp);
+/*!<
+ * \brief Destroys a heap.
+ *
+ * Requires:
+ *\li "heapp" is not NULL and "*heap" points to a valid isc_heap_t.
+ */
+
+isc_result_t
+isc_heap_insert(isc_heap_t *heap, void *elt);
+/*!<
+ * \brief Inserts a new element into a heap.
+ *
+ * Requires:
+ *\li "heapp" is not NULL and "*heap" points to a valid isc_heap_t.
+ */
+
+void
+isc_heap_delete(isc_heap_t *heap, unsigned int index);
+/*!<
+ * \brief Deletes an element from a heap, by element index.
+ *
+ * Requires:
+ *\li "heapp" is not NULL and "*heap" points to a valid isc_heap_t.
+ *\li "index" is a valid element index, as provided by the "index" callback
+ * provided during heap creation.
+ */
+
+void
+isc_heap_increased(isc_heap_t *heap, unsigned int index);
+/*!<
+ * \brief Indicates to the heap that an element's priority has increased.
+ * This function MUST be called whenever an element has increased in priority.
+ *
+ * Requires:
+ *\li "heapp" is not NULL and "*heap" points to a valid isc_heap_t.
+ *\li "index" is a valid element index, as provided by the "index" callback
+ * provided during heap creation.
+ */
+
+void
+isc_heap_decreased(isc_heap_t *heap, unsigned int index);
+/*!<
+ * \brief Indicates to the heap that an element's priority has decreased.
+ * This function MUST be called whenever an element has decreased in priority.
+ *
+ * Requires:
+ *\li "heapp" is not NULL and "*heap" points to a valid isc_heap_t.
+ *\li "index" is a valid element index, as provided by the "index" callback
+ * provided during heap creation.
+ */
+
+void *
+isc_heap_element(isc_heap_t *heap, unsigned int index);
+/*!<
+ * \brief Returns the element for a specific element index.
+ *
+ * Requires:
+ *\li "heapp" is not NULL and "*heap" points to a valid isc_heap_t.
+ *\li "index" is a valid element index, as provided by the "index" callback
+ * provided during heap creation.
+ *
+ * Returns:
+ *\li A pointer to the element for the element index.
+ */
+
+void
+isc_heap_foreach(isc_heap_t *heap, isc_heapaction_t action, void *uap);
+/*!<
+ * \brief Iterate over the heap, calling an action for each element. The
+ * order of iteration is not sorted.
+ *
+ * Requires:
+ *\li "heapp" is not NULL and "*heap" points to a valid isc_heap_t.
+ *\li "action" is not NULL, and is a function which takes two arguments.
+ * The first is a void *, representing the element, and the second is
+ * "uap" as provided to isc_heap_foreach.
+ *\li "uap" is a caller-provided argument, and may be NULL.
+ *
+ * Note:
+ *\li The heap structure CANNOT be modified during this iteration. The only
+ * safe function to call while iterating the heap is isc_heap_element().
+ */
ISC_LANG_ENDDECLS
diff --git a/usr.sbin/bind/lib/isc/include/isc/list.h b/usr.sbin/bind/lib/isc/include/isc/list.h
index 4477cf04a67..fa0eb8a0cfc 100644
--- a/usr.sbin/bind/lib/isc/include/isc/list.h
+++ b/usr.sbin/bind/lib/isc/include/isc/list.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2006 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1997-2002 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $ISC: list.h,v 1.18.2.2.8.1 2004/03/06 08:14:43 marka Exp $ */
+/* $ISC: list.h,v 1.18.2.2.8.3 2006/06/06 00:11:40 marka Exp $ */
#ifndef ISC_LIST_H
#define ISC_LIST_H 1
@@ -90,12 +90,16 @@
do { \
if ((elt)->link.next != NULL) \
(elt)->link.next->link.prev = (elt)->link.prev; \
- else \
+ else { \
+ ISC_INSIST((list).tail == (elt)); \
(list).tail = (elt)->link.prev; \
+ } \
if ((elt)->link.prev != NULL) \
(elt)->link.prev->link.next = (elt)->link.next; \
- else \
+ else { \
+ ISC_INSIST((list).head == (elt)); \
(list).head = (elt)->link.next; \
+ } \
(elt)->link.prev = (type *)(-1); \
(elt)->link.next = (type *)(-1); \
} while (0)
diff --git a/usr.sbin/bind/lib/isc/include/isc/sockaddr.h b/usr.sbin/bind/lib/isc/include/isc/sockaddr.h
index 35ab1a366d4..0cae29c6135 100644
--- a/usr.sbin/bind/lib/isc/include/isc/sockaddr.h
+++ b/usr.sbin/bind/lib/isc/include/isc/sockaddr.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1998-2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $ISC: sockaddr.h,v 1.35.12.8 2005/07/29 00:13:10 marka Exp $ */
+/* $ISC: sockaddr.h,v 1.35.12.10 2006/03/02 00:37:20 marka Exp $ */
#ifndef ISC_SOCKADDR_H
#define ISC_SOCKADDR_H 1
@@ -141,7 +141,7 @@ isc_sockaddr_setport(isc_sockaddr_t *sockaddr, in_port_t port);
*/
in_port_t
-isc_sockaddr_getport(isc_sockaddr_t *sockaddr);
+isc_sockaddr_getport(const isc_sockaddr_t *sockaddr);
/*
* Get the port stored in 'sockaddr'.
*/
@@ -168,25 +168,25 @@ isc_sockaddr_format(const isc_sockaddr_t *sa, char *array, unsigned int size);
*/
isc_boolean_t
-isc_sockaddr_ismulticast(isc_sockaddr_t *sa);
+isc_sockaddr_ismulticast(const isc_sockaddr_t *sa);
/*
* Returns ISC_TRUE if the address is a multicast address.
*/
isc_boolean_t
-isc_sockaddr_isexperimental(isc_sockaddr_t *sa);
+isc_sockaddr_isexperimental(const isc_sockaddr_t *sa);
/*
* Returns ISC_TRUE if the address is a experimental (CLASS E) address.
*/
isc_boolean_t
-isc_sockaddr_islinklocal(isc_sockaddr_t *sa);
+isc_sockaddr_islinklocal(const isc_sockaddr_t *sa);
/*
* Returns ISC_TRUE if the address is a link local addresss.
*/
isc_boolean_t
-isc_sockaddr_issitelocal(isc_sockaddr_t *sa);
+isc_sockaddr_issitelocal(const isc_sockaddr_t *sa);
/*
* Returns ISC_TRUE if the address is a sitelocal address.
*/
diff --git a/usr.sbin/bind/lib/isc/include/isc/symtab.h b/usr.sbin/bind/lib/isc/include/isc/symtab.h
index e93705182e3..ba43f7c4e54 100644
--- a/usr.sbin/bind/lib/isc/include/isc/symtab.h
+++ b/usr.sbin/bind/lib/isc/include/isc/symtab.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2006 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1996-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $ISC: symtab.h,v 1.16.206.1 2004/03/06 08:14:49 marka Exp $ */
+/* $ISC: symtab.h,v 1.16.206.3 2006/03/02 00:37:20 marka Exp $ */
#ifndef ISC_SYMTAB_H
#define ISC_SYMTAB_H 1
@@ -88,6 +88,7 @@
typedef union isc_symvalue {
void * as_pointer;
+ const void * as_cpointer;
int as_integer;
unsigned int as_uinteger;
} isc_symvalue_t;
diff --git a/usr.sbin/bind/lib/isc/netscope.c b/usr.sbin/bind/lib/isc/netscope.c
index e1c64204700..bdb75c87a93 100644
--- a/usr.sbin/bind/lib/isc/netscope.c
+++ b/usr.sbin/bind/lib/isc/netscope.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2006 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2002 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -17,9 +17,11 @@
#if defined(LIBC_SCCS) && !defined(lint)
static char rcsid[] =
- "$ISC: netscope.c,v 1.5.142.7 2004/03/12 10:31:26 marka Exp $";
+ "$ISC: netscope.c,v 1.5.142.9 2006/08/25 05:25:50 marka Exp $";
#endif /* LIBC_SCCS and not lint */
+#include <config.h>
+
#include <isc/string.h>
#include <isc/net.h>
#include <isc/netscope.h>
diff --git a/usr.sbin/bind/lib/isc/nothreads/condition.c b/usr.sbin/bind/lib/isc/nothreads/condition.c
index 919088a3f7d..21a19dd404a 100644
--- a/usr.sbin/bind/lib/isc/nothreads/condition.c
+++ b/usr.sbin/bind/lib/isc/nothreads/condition.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2006 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2000, 2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,7 +15,9 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $ISC: condition.c,v 1.4.12.3 2004/03/08 09:04:54 marka Exp $ */
+/* $ISC: condition.c,v 1.4.12.5 2006/08/25 05:25:50 marka Exp $ */
+
+#include <config.h>
#include <isc/util.h>
diff --git a/usr.sbin/bind/lib/isc/nothreads/mutex.c b/usr.sbin/bind/lib/isc/nothreads/mutex.c
index d9b2fb8623c..3aab9fbb3cc 100644
--- a/usr.sbin/bind/lib/isc/nothreads/mutex.c
+++ b/usr.sbin/bind/lib/isc/nothreads/mutex.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2006 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2000, 2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,7 +15,9 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $ISC: mutex.c,v 1.4.12.3 2004/03/08 09:04:54 marka Exp $ */
+/* $ISC: mutex.c,v 1.4.12.5 2006/08/25 05:25:50 marka Exp $ */
+
+#include <config.h>
#include <isc/util.h>
diff --git a/usr.sbin/bind/lib/isc/taskpool.c b/usr.sbin/bind/lib/isc/taskpool.c
index 2dbcc445672..7b06e70de9f 100644
--- a/usr.sbin/bind/lib/isc/taskpool.c
+++ b/usr.sbin/bind/lib/isc/taskpool.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2006 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $ISC: taskpool.c,v 1.10.12.3 2004/03/08 09:04:50 marka Exp $ */
+/* $ISC: taskpool.c,v 1.10.12.5 2006/01/04 23:50:21 marka Exp $ */
#include <config.h>
@@ -52,6 +52,10 @@ isc_taskpool_create(isc_taskmgr_t *tmgr, isc_mem_t *mctx,
pool->mctx = mctx;
pool->ntasks = ntasks;
pool->tasks = isc_mem_get(mctx, ntasks * sizeof(isc_task_t *));
+ if (pool->tasks == NULL) {
+ isc_mem_put(mctx, pool, sizeof(*pool));
+ return (ISC_R_NOMEMORY);
+ }
for (i = 0; i < ntasks; i++)
pool->tasks[i] = NULL;
for (i = 0; i < ntasks; i++) {
diff --git a/usr.sbin/bind/lib/isc/unix/ipv6.c b/usr.sbin/bind/lib/isc/unix/ipv6.c
index 66df390bcc9..54e8112a6e5 100644
--- a/usr.sbin/bind/lib/isc/unix/ipv6.c
+++ b/usr.sbin/bind/lib/isc/unix/ipv6.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2006 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,7 +15,9 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $ISC: ipv6.c,v 1.7.206.1 2004/03/06 08:15:00 marka Exp $ */
+/* $ISC: ipv6.c,v 1.7.206.3 2006/08/25 05:25:50 marka Exp $ */
+
+#include <config.h>
#include <isc/ipv6.h>
diff --git a/usr.sbin/bind/lib/isccfg/include/isccfg/cfg.h b/usr.sbin/bind/lib/isccfg/include/isccfg/cfg.h
index 91aa3c4b495..e308f41f0e9 100644
--- a/usr.sbin/bind/lib/isccfg/include/isccfg/cfg.h
+++ b/usr.sbin/bind/lib/isccfg/include/isccfg/cfg.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2006 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2000-2002 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $ISC: cfg.h,v 1.30.12.4 2004/03/08 09:05:07 marka Exp $ */
+/* $ISC: cfg.h,v 1.30.12.6 2006/03/02 00:37:20 marka Exp $ */
#ifndef ISCCFG_CFG_H
#define ISCCFG_CFG_H 1
@@ -74,7 +74,7 @@ typedef struct cfg_listelt cfg_listelt_t;
* "directory".
*/
typedef isc_result_t
-(*cfg_parsecallback_t)(const char *clausename, cfg_obj_t *obj, void *arg);
+(*cfg_parsecallback_t)(const char *clausename, const cfg_obj_t *obj, void *arg);
/***
*** Functions
@@ -143,20 +143,20 @@ cfg_parser_destroy(cfg_parser_t **pctxp);
*/
isc_boolean_t
-cfg_obj_isvoid(cfg_obj_t *obj);
+cfg_obj_isvoid(const cfg_obj_t *obj);
/*
* Return true iff 'obj' is of void type (e.g., an optional
* value not specified).
*/
isc_boolean_t
-cfg_obj_ismap(cfg_obj_t *obj);
+cfg_obj_ismap(const cfg_obj_t *obj);
/*
* Return true iff 'obj' is of a map type.
*/
isc_result_t
-cfg_map_get(cfg_obj_t *mapobj, const char* name, cfg_obj_t **obj);
+cfg_map_get(const cfg_obj_t *mapobj, const char* name, const cfg_obj_t **obj);
/*
* Extract an element from a configuration object, which
* must be of a map type.
@@ -171,8 +171,8 @@ cfg_map_get(cfg_obj_t *mapobj, const char* name, cfg_obj_t **obj);
* ISC_R_NOTFOUND - name not found in map
*/
-cfg_obj_t *
-cfg_map_getname(cfg_obj_t *mapobj);
+const cfg_obj_t *
+cfg_map_getname(const cfg_obj_t *mapobj);
/*
* Get the name of a named map object, like a server "key" clause.
*
@@ -185,13 +185,13 @@ cfg_map_getname(cfg_obj_t *mapobj);
*/
isc_boolean_t
-cfg_obj_istuple(cfg_obj_t *obj);
+cfg_obj_istuple(const cfg_obj_t *obj);
/*
* Return true iff 'obj' is of a map type.
*/
-cfg_obj_t *
-cfg_tuple_get(cfg_obj_t *tupleobj, const char *name);
+const cfg_obj_t *
+cfg_tuple_get(const cfg_obj_t *tupleobj, const char *name);
/*
* Extract an element from a configuration object, which
* must be of a tuple type.
@@ -203,13 +203,13 @@ cfg_tuple_get(cfg_obj_t *tupleobj, const char *name);
*/
isc_boolean_t
-cfg_obj_isuint32(cfg_obj_t *obj);
+cfg_obj_isuint32(const cfg_obj_t *obj);
/*
* Return true iff 'obj' is of integer type.
*/
isc_uint32_t
-cfg_obj_asuint32(cfg_obj_t *obj);
+cfg_obj_asuint32(const cfg_obj_t *obj);
/*
* Returns the value of a configuration object of 32-bit integer type.
*
@@ -221,13 +221,13 @@ cfg_obj_asuint32(cfg_obj_t *obj);
*/
isc_boolean_t
-cfg_obj_isuint64(cfg_obj_t *obj);
+cfg_obj_isuint64(const cfg_obj_t *obj);
/*
* Return true iff 'obj' is of integer type.
*/
isc_uint64_t
-cfg_obj_asuint64(cfg_obj_t *obj);
+cfg_obj_asuint64(const cfg_obj_t *obj);
/*
* Returns the value of a configuration object of 64-bit integer type.
*
@@ -239,13 +239,13 @@ cfg_obj_asuint64(cfg_obj_t *obj);
*/
isc_boolean_t
-cfg_obj_isstring(cfg_obj_t *obj);
+cfg_obj_isstring(const cfg_obj_t *obj);
/*
* Return true iff 'obj' is of string type.
*/
-char *
-cfg_obj_asstring(cfg_obj_t *obj);
+const char *
+cfg_obj_asstring(const cfg_obj_t *obj);
/*
* Returns the value of a configuration object of a string type
* as a null-terminated string.
@@ -258,13 +258,13 @@ cfg_obj_asstring(cfg_obj_t *obj);
*/
isc_boolean_t
-cfg_obj_isboolean(cfg_obj_t *obj);
+cfg_obj_isboolean(const cfg_obj_t *obj);
/*
* Return true iff 'obj' is of a boolean type.
*/
isc_boolean_t
-cfg_obj_asboolean(cfg_obj_t *obj);
+cfg_obj_asboolean(const cfg_obj_t *obj);
/*
* Returns the value of a configuration object of a boolean type.
*
@@ -276,13 +276,13 @@ cfg_obj_asboolean(cfg_obj_t *obj);
*/
isc_boolean_t
-cfg_obj_issockaddr(cfg_obj_t *obj);
+cfg_obj_issockaddr(const cfg_obj_t *obj);
/*
* Return true iff 'obj' is a socket address.
*/
-isc_sockaddr_t *
-cfg_obj_assockaddr(cfg_obj_t *obj);
+const isc_sockaddr_t *
+cfg_obj_assockaddr(const cfg_obj_t *obj);
/*
* Returns the value of a configuration object representing a socket address.
*
@@ -295,13 +295,13 @@ cfg_obj_assockaddr(cfg_obj_t *obj);
*/
isc_boolean_t
-cfg_obj_isnetprefix(cfg_obj_t *obj);
+cfg_obj_isnetprefix(const cfg_obj_t *obj);
/*
* Return true iff 'obj' is a network prefix.
*/
void
-cfg_obj_asnetprefix(cfg_obj_t *obj, isc_netaddr_t *netaddr,
+cfg_obj_asnetprefix(const cfg_obj_t *obj, isc_netaddr_t *netaddr,
unsigned int *prefixlen);
/*
* Gets the value of a configuration object representing a network
@@ -314,13 +314,13 @@ cfg_obj_asnetprefix(cfg_obj_t *obj, isc_netaddr_t *netaddr,
*/
isc_boolean_t
-cfg_obj_islist(cfg_obj_t *obj);
+cfg_obj_islist(const cfg_obj_t *obj);
/*
* Return true iff 'obj' is of list type.
*/
-cfg_listelt_t *
-cfg_list_first(cfg_obj_t *obj);
+const cfg_listelt_t *
+cfg_list_first(const cfg_obj_t *obj);
/*
* Returns the first list element in a configuration object of a list type.
*
@@ -332,8 +332,8 @@ cfg_list_first(cfg_obj_t *obj);
* or NULL if the list is empty or nonexistent.
*/
-cfg_listelt_t *
-cfg_list_next(cfg_listelt_t *elt);
+const cfg_listelt_t *
+cfg_list_next(const cfg_listelt_t *elt);
/*
* Returns the next element of a list of configuration objects.
*
@@ -346,8 +346,8 @@ cfg_list_next(cfg_listelt_t *elt);
* or NULL if there are no more elements.
*/
-cfg_obj_t *
-cfg_listelt_value(cfg_listelt_t *elt);
+const cfg_obj_t *
+cfg_listelt_value(const cfg_listelt_t *elt);
/*
* Returns the configuration object associated with cfg_listelt_t.
*
@@ -360,7 +360,7 @@ cfg_listelt_value(cfg_listelt_t *elt);
*/
void
-cfg_print(cfg_obj_t *obj,
+cfg_print(const cfg_obj_t *obj,
void (*f)(void *closure, const char *text, int textlen),
void *closure);
/*
@@ -378,7 +378,7 @@ cfg_print_grammar(const cfg_type_t *type,
*/
isc_boolean_t
-cfg_obj_istype(cfg_obj_t *obj, const cfg_type_t *type);
+cfg_obj_istype(const cfg_obj_t *obj, const cfg_type_t *type);
/*
* Return true iff 'obj' is of type 'type'.
*/
@@ -389,7 +389,8 @@ void cfg_obj_destroy(cfg_parser_t *pctx, cfg_obj_t **obj);
*/
void
-cfg_obj_log(cfg_obj_t *obj, isc_log_t *lctx, int level, const char *fmt, ...)
+cfg_obj_log(const cfg_obj_t *obj, isc_log_t *lctx, int level,
+ const char *fmt, ...)
ISC_FORMAT_PRINTF(4, 5);
/*
* Log a message concerning configuration object 'obj' to the logging
@@ -398,13 +399,13 @@ cfg_obj_log(cfg_obj_t *obj, isc_log_t *lctx, int level, const char *fmt, ...)
*/
const char *
-cfg_obj_file(cfg_obj_t *obj);
+cfg_obj_file(const cfg_obj_t *obj);
/*
* Return the file that defined this object.
*/
unsigned int
-cfg_obj_line(cfg_obj_t *obj);
+cfg_obj_line(const cfg_obj_t *obj);
/*
* Return the line in file where this object was defined.
*/
diff --git a/usr.sbin/bind/lib/isccfg/include/isccfg/grammar.h b/usr.sbin/bind/lib/isccfg/include/isccfg/grammar.h
index 1386ef8b998..356ada9f6f6 100644
--- a/usr.sbin/bind/lib/isccfg/include/isccfg/grammar.h
+++ b/usr.sbin/bind/lib/isccfg/include/isccfg/grammar.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2006 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2002, 2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $ISC: grammar.h,v 1.3.50.4 2004/11/30 01:15:44 marka Exp $ */
+/* $ISC: grammar.h,v 1.3.50.6 2006/03/02 00:37:20 marka Exp $ */
#ifndef ISCCFG_GRAMMAR_H
#define ISCCFG_GRAMMAR_H 1
@@ -63,7 +63,7 @@ typedef struct cfg_rep cfg_rep_t;
typedef isc_result_t (*cfg_parsefunc_t)(cfg_parser_t *, const cfg_type_t *type,
cfg_obj_t **);
-typedef void (*cfg_printfunc_t)(cfg_printer_t *, cfg_obj_t *);
+typedef void (*cfg_printfunc_t)(cfg_printer_t *, const cfg_obj_t *);
typedef void (*cfg_docfunc_t)(cfg_printer_t *, const cfg_type_t *);
typedef void (*cfg_freefunc_t)(cfg_parser_t *, cfg_obj_t *);
@@ -156,7 +156,7 @@ struct cfg_obj {
isc_sockaddr_t sockaddr;
cfg_netprefix_t netprefix;
} value;
- char * file;
+ const char * file;
unsigned int line;
};
@@ -274,16 +274,16 @@ isc_result_t
cfg_parse_uint32(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret);
void
-cfg_print_uint32(cfg_printer_t *pctx, cfg_obj_t *obj);
+cfg_print_uint32(cfg_printer_t *pctx, const cfg_obj_t *obj);
void
-cfg_print_uint64(cfg_printer_t *pctx, cfg_obj_t *obj);
+cfg_print_uint64(cfg_printer_t *pctx, const cfg_obj_t *obj);
isc_result_t
cfg_parse_qstring(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret);
void
-cfg_print_ustring(cfg_printer_t *pctx, cfg_obj_t *obj);
+cfg_print_ustring(cfg_printer_t *pctx, const cfg_obj_t *obj);
isc_result_t
cfg_parse_astring(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret);
@@ -292,7 +292,7 @@ isc_result_t
cfg_parse_rawaddr(cfg_parser_t *pctx, unsigned int flags, isc_netaddr_t *na);
void
-cfg_print_rawaddr(cfg_printer_t *pctx, isc_netaddr_t *na);
+cfg_print_rawaddr(cfg_printer_t *pctx, const isc_netaddr_t *na);
isc_boolean_t
cfg_lookingat_netaddr(cfg_parser_t *pctx, unsigned int flags);
@@ -304,7 +304,7 @@ isc_result_t
cfg_parse_sockaddr(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret);
void
-cfg_print_sockaddr(cfg_printer_t *pctx, cfg_obj_t *obj);
+cfg_print_sockaddr(cfg_printer_t *pctx, const cfg_obj_t *obj);
void
cfg_doc_sockaddr(cfg_printer_t *pctx, const cfg_type_t *type);
@@ -323,7 +323,7 @@ isc_result_t
cfg_parse_tuple(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret);
void
-cfg_print_tuple(cfg_printer_t *pctx, cfg_obj_t *obj);
+cfg_print_tuple(cfg_printer_t *pctx, const cfg_obj_t *obj);
void
cfg_doc_tuple(cfg_printer_t *pctx, const cfg_type_t *type);
@@ -339,7 +339,7 @@ isc_result_t
cfg_parse_bracketed_list(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret);
void
-cfg_print_bracketed_list(cfg_printer_t *pctx, cfg_obj_t *obj);
+cfg_print_bracketed_list(cfg_printer_t *pctx, const cfg_obj_t *obj);
void
cfg_doc_bracketed_list(cfg_printer_t *pctx, const cfg_type_t *type);
@@ -348,7 +348,7 @@ isc_result_t
cfg_parse_spacelist(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret);
void
-cfg_print_spacelist(cfg_printer_t *pctx, cfg_obj_t *obj);
+cfg_print_spacelist(cfg_printer_t *pctx, const cfg_obj_t *obj);
isc_result_t
cfg_parse_enum(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret);
@@ -374,7 +374,7 @@ isc_result_t
cfg_parse_addressed_map(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret);
void
-cfg_print_map(cfg_printer_t *pctx, cfg_obj_t *obj);
+cfg_print_map(cfg_printer_t *pctx, const cfg_obj_t *obj);
void
cfg_doc_map(cfg_printer_t *pctx, const cfg_type_t *type);
@@ -383,7 +383,7 @@ isc_result_t
cfg_parse_mapbody(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret);
void
-cfg_print_mapbody(cfg_printer_t *pctx, cfg_obj_t *obj);
+cfg_print_mapbody(cfg_printer_t *pctx, const cfg_obj_t *obj);
void
cfg_doc_mapbody(cfg_printer_t *pctx, const cfg_type_t *type);
@@ -392,7 +392,7 @@ isc_result_t
cfg_parse_void(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret);
void
-cfg_print_void(cfg_printer_t *pctx, cfg_obj_t *obj);
+cfg_print_void(cfg_printer_t *pctx, const cfg_obj_t *obj);
void
cfg_doc_void(cfg_printer_t *pctx, const cfg_type_t *type);
@@ -401,7 +401,7 @@ isc_result_t
cfg_parse_obj(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret);
void
-cfg_print_obj(cfg_printer_t *pctx, cfg_obj_t *obj);
+cfg_print_obj(cfg_printer_t *pctx, const cfg_obj_t *obj);
void
cfg_doc_obj(cfg_printer_t *pctx, const cfg_type_t *type);
diff --git a/usr.sbin/bind/lib/lwres/api b/usr.sbin/bind/lib/lwres/api
index 0ab1e92dc29..63704dd62ad 100644
--- a/usr.sbin/bind/lib/lwres/api
+++ b/usr.sbin/bind/lib/lwres/api
@@ -1,3 +1,3 @@
LIBINTERFACE = 10
-LIBREVISION = 1
+LIBREVISION = 5
LIBAGE = 1
diff --git a/usr.sbin/bind/lib/lwres/gai_strerror.c b/usr.sbin/bind/lib/lwres/gai_strerror.c
index 076c64d6129..4d578831336 100644
--- a/usr.sbin/bind/lib/lwres/gai_strerror.c
+++ b/usr.sbin/bind/lib/lwres/gai_strerror.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2006 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2000, 2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,7 +15,9 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $ISC: gai_strerror.c,v 1.14.2.1.10.1 2004/03/06 08:15:30 marka Exp $ */
+/* $ISC: gai_strerror.c,v 1.14.2.1.10.3 2006/08/25 05:25:50 marka Exp $ */
+
+#include <config.h>
#include <lwres/netdb.h>
diff --git a/usr.sbin/bind/lib/lwres/man/lwres.3 b/usr.sbin/bind/lib/lwres/man/lwres.3
index 9f418dbfbbb..bbe61fb98d4 100644
--- a/usr.sbin/bind/lib/lwres/man/lwres.3
+++ b/usr.sbin/bind/lib/lwres/man/lwres.3
@@ -13,14 +13,17 @@
.\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
.\" PERFORMANCE OF THIS SOFTWARE.
.\"
-.\" $ISC: lwres.3,v 1.15.206.5 2005/10/13 02:33:58 marka Exp $
+.\" $ISC: lwres.3,v 1.15.206.6 2006/06/29 13:02:31 marka Exp $
.\"
.hy 0
.ad l
-.\" ** You probably do not want to edit this file directly **
-.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1).
-.\" Instead of manually editing it, you probably should edit the DocBook XML
-.\" source for it and then use the DocBook XSL Stylesheets to regenerate it.
+.\" Title: lwres
+.\" Author:
+.\" Generator: DocBook XSL Stylesheets v1.70.1 <http://docbook.sf.net/>
+.\" Date: Jun 30, 2000
+.\" Manual: BIND9
+.\" Source: BIND9
+.\"
.TH "LWRES" "3" "Jun 30, 2000" "BIND9" "BIND9"
.\" disable hyphenation
.nh
@@ -155,3 +158,5 @@ bit should be set.
\fBlwres_config\fR(3),
\fBresolver\fR(5),
\fBlwresd\fR(8).
+.SH "COPYRIGHT"
+Copyright \(co 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
diff --git a/usr.sbin/bind/lib/lwres/man/lwres_buffer.3 b/usr.sbin/bind/lib/lwres/man/lwres_buffer.3
index 3e62b068568..898801ecbd6 100644
--- a/usr.sbin/bind/lib/lwres/man/lwres_buffer.3
+++ b/usr.sbin/bind/lib/lwres/man/lwres_buffer.3
@@ -13,14 +13,17 @@
.\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
.\" PERFORMANCE OF THIS SOFTWARE.
.\"
-.\" $ISC: lwres_buffer.3,v 1.12.2.1.8.5 2005/10/13 02:33:58 marka Exp $
+.\" $ISC: lwres_buffer.3,v 1.12.2.1.8.6 2006/06/29 13:02:31 marka Exp $
.\"
.hy 0
.ad l
-.\" ** You probably do not want to edit this file directly **
-.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1).
-.\" Instead of manually editing it, you probably should edit the DocBook XML
-.\" source for it and then use the DocBook XSL Stylesheets to regenerate it.
+.\" Title: lwres_buffer
+.\" Author:
+.\" Generator: DocBook XSL Stylesheets v1.70.1 <http://docbook.sf.net/>
+.\" Date: Jun 30, 2000
+.\" Manual: BIND9
+.\" Source: BIND9
+.\"
.TH "LWRES_BUFFER" "3" "Jun 30, 2000" "BIND9" "BIND9"
.\" disable hyphenation
.nh
@@ -33,37 +36,37 @@ lwres_buffer_init, lwres_buffer_invalidate, lwres_buffer_add, lwres_buffer_subtr
#include <lwres/lwbuffer.h>
.fi
.HP 23
-\fBvoid\ \fBlwres_buffer_init\fR\fR\fB(\fR\fBlwres_buffer_t\ *b\fR\fB, \fR\fBvoid\ *base\fR\fB, \fR\fBunsigned\ int\ length\fR\fB);\fR
+.BI "void lwres_buffer_init(lwres_buffer_t\ *b, void\ *base, unsigned\ int\ length);"
.HP 29
-\fBvoid\ \fBlwres_buffer_invalidate\fR\fR\fB(\fR\fBlwres_buffer_t\ *b\fR\fB);\fR
+.BI "void lwres_buffer_invalidate(lwres_buffer_t\ *b);"
.HP 22
-\fBvoid\ \fBlwres_buffer_add\fR\fR\fB(\fR\fBlwres_buffer_t\ *b\fR\fB, \fR\fBunsigned\ int\ n\fR\fB);\fR
+.BI "void lwres_buffer_add(lwres_buffer_t\ *b, unsigned\ int\ n);"
.HP 27
-\fBvoid\ \fBlwres_buffer_subtract\fR\fR\fB(\fR\fBlwres_buffer_t\ *b\fR\fB, \fR\fBunsigned\ int\ n\fR\fB);\fR
+.BI "void lwres_buffer_subtract(lwres_buffer_t\ *b, unsigned\ int\ n);"
.HP 24
-\fBvoid\ \fBlwres_buffer_clear\fR\fR\fB(\fR\fBlwres_buffer_t\ *b\fR\fB);\fR
+.BI "void lwres_buffer_clear(lwres_buffer_t\ *b);"
.HP 24
-\fBvoid\ \fBlwres_buffer_first\fR\fR\fB(\fR\fBlwres_buffer_t\ *b\fR\fB);\fR
+.BI "void lwres_buffer_first(lwres_buffer_t\ *b);"
.HP 26
-\fBvoid\ \fBlwres_buffer_forward\fR\fR\fB(\fR\fBlwres_buffer_t\ *b\fR\fB, \fR\fBunsigned\ int\ n\fR\fB);\fR
+.BI "void lwres_buffer_forward(lwres_buffer_t\ *b, unsigned\ int\ n);"
.HP 23
-\fBvoid\ \fBlwres_buffer_back\fR\fR\fB(\fR\fBlwres_buffer_t\ *b\fR\fB, \fR\fBunsigned\ int\ n\fR\fB);\fR
+.BI "void lwres_buffer_back(lwres_buffer_t\ *b, unsigned\ int\ n);"
.HP 36
-\fBlwres_uint8_t\ \fBlwres_buffer_getuint8\fR\fR\fB(\fR\fBlwres_buffer_t\ *b\fR\fB);\fR
+.BI "lwres_uint8_t lwres_buffer_getuint8(lwres_buffer_t\ *b);"
.HP 27
-\fBvoid\ \fBlwres_buffer_putuint8\fR\fR\fB(\fR\fBlwres_buffer_t\ *b\fR\fB, \fR\fBlwres_uint8_t\ val\fR\fB);\fR
+.BI "void lwres_buffer_putuint8(lwres_buffer_t\ *b, lwres_uint8_t\ val);"
.HP 38
-\fBlwres_uint16_t\ \fBlwres_buffer_getuint16\fR\fR\fB(\fR\fBlwres_buffer_t\ *b\fR\fB);\fR
+.BI "lwres_uint16_t lwres_buffer_getuint16(lwres_buffer_t\ *b);"
.HP 28
-\fBvoid\ \fBlwres_buffer_putuint16\fR\fR\fB(\fR\fBlwres_buffer_t\ *b\fR\fB, \fR\fBlwres_uint16_t\ val\fR\fB);\fR
+.BI "void lwres_buffer_putuint16(lwres_buffer_t\ *b, lwres_uint16_t\ val);"
.HP 38
-\fBlwres_uint32_t\ \fBlwres_buffer_getuint32\fR\fR\fB(\fR\fBlwres_buffer_t\ *b\fR\fB);\fR
+.BI "lwres_uint32_t lwres_buffer_getuint32(lwres_buffer_t\ *b);"
.HP 28
-\fBvoid\ \fBlwres_buffer_putuint32\fR\fR\fB(\fR\fBlwres_buffer_t\ *b\fR\fB, \fR\fBlwres_uint32_t\ val\fR\fB);\fR
+.BI "void lwres_buffer_putuint32(lwres_buffer_t\ *b, lwres_uint32_t\ val);"
.HP 25
-\fBvoid\ \fBlwres_buffer_putmem\fR\fR\fB(\fR\fBlwres_buffer_t\ *b\fR\fB, \fR\fBconst\ unsigned\ char\ *base\fR\fB, \fR\fBunsigned\ int\ length\fR\fB);\fR
+.BI "void lwres_buffer_putmem(lwres_buffer_t\ *b, const\ unsigned\ char\ *base, unsigned\ int\ length);"
.HP 25
-\fBvoid\ \fBlwres_buffer_getmem\fR\fR\fB(\fR\fBlwres_buffer_t\ *b\fR\fB, \fR\fBunsigned\ char\ *base\fR\fB, \fR\fBunsigned\ int\ length\fR\fB);\fR
+.BI "void lwres_buffer_getmem(lwres_buffer_t\ *b, unsigned\ char\ *base, unsigned\ int\ length);"
.SH "DESCRIPTION"
.PP
These functions provide bounds checked access to a region of memory where data is being read or written. They are based on, and similar to, the
@@ -89,6 +92,8 @@ The
\fIactive region\fR
is an (optional) subregion of the remaining region. It extends from the current offset to an offset in the remaining region. Initially, the active region is empty. If the current offset advances beyond the chosen offset, the active region will also be empty.
.PP
+.sp
+.RS 3n
.nf
/\-\-\-\-\-\-\-\-\-\-\-\-entire length\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\\\\
/\-\-\-\-\- used region \-\-\-\-\-\\\\/\-\- available \-\-\\\\
@@ -107,11 +112,13 @@ is an (optional) subregion of the remaining region. It extends from the current
b\-d == remaining region.
b\-c == optional active region.
.fi
+.RE
.sp
.PP
\fBlwres_buffer_init()\fR
initializes the
-\fBlwres_buffer_t\fR\fI*b\fR
+\fBlwres_buffer_t\fR
+\fI*b\fR
and assocates it with the memory region of size
\fIlength\fR
bytes starting at location
@@ -209,3 +216,5 @@ bytes of memory from
\fIb\fR
to
\fIbase\fR.
+.SH "COPYRIGHT"
+Copyright \(co 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
diff --git a/usr.sbin/bind/lib/lwres/man/lwres_config.3 b/usr.sbin/bind/lib/lwres/man/lwres_config.3
index fac43d5b8ae..9a65240a8ed 100644
--- a/usr.sbin/bind/lib/lwres/man/lwres_config.3
+++ b/usr.sbin/bind/lib/lwres/man/lwres_config.3
@@ -13,14 +13,17 @@
.\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
.\" PERFORMANCE OF THIS SOFTWARE.
.\"
-.\" $ISC: lwres_config.3,v 1.12.2.1.8.5 2005/10/13 02:33:58 marka Exp $
+.\" $ISC: lwres_config.3,v 1.12.2.1.8.6 2006/06/29 13:02:31 marka Exp $
.\"
.hy 0
.ad l
-.\" ** You probably do not want to edit this file directly **
-.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1).
-.\" Instead of manually editing it, you probably should edit the DocBook XML
-.\" source for it and then use the DocBook XSL Stylesheets to regenerate it.
+.\" Title: lwres_config
+.\" Author:
+.\" Generator: DocBook XSL Stylesheets v1.70.1 <http://docbook.sf.net/>
+.\" Date: Jun 30, 2000
+.\" Manual: BIND9
+.\" Source: BIND9
+.\"
.TH "LWRES_CONFIG" "3" "Jun 30, 2000" "BIND9" "BIND9"
.\" disable hyphenation
.nh
@@ -33,15 +36,15 @@ lwres_conf_init, lwres_conf_clear, lwres_conf_parse, lwres_conf_print, lwres_con
#include <lwres/lwres.h>
.fi
.HP 21
-\fBvoid\ \fBlwres_conf_init\fR\fR\fB(\fR\fBlwres_context_t\ *ctx\fR\fB);\fR
+.BI "void lwres_conf_init(lwres_context_t\ *ctx);"
.HP 22
-\fBvoid\ \fBlwres_conf_clear\fR\fR\fB(\fR\fBlwres_context_t\ *ctx\fR\fB);\fR
+.BI "void lwres_conf_clear(lwres_context_t\ *ctx);"
.HP 32
-\fBlwres_result_t\ \fBlwres_conf_parse\fR\fR\fB(\fR\fBlwres_context_t\ *ctx\fR\fB, \fR\fBconst\ char\ *filename\fR\fB);\fR
+.BI "lwres_result_t lwres_conf_parse(lwres_context_t\ *ctx, const\ char\ *filename);"
.HP 32
-\fBlwres_result_t\ \fBlwres_conf_print\fR\fR\fB(\fR\fBlwres_context_t\ *ctx\fR\fB, \fR\fBFILE\ *fp\fR\fB);\fR
+.BI "lwres_result_t lwres_conf_print(lwres_context_t\ *ctx, FILE\ *fp);"
.HP 30
-\fBlwres_conf_t\ *\ \fBlwres_conf_get\fR\fR\fB(\fR\fBlwres_context_t\ *ctx\fR\fB);\fR
+.BI "lwres_conf_t * lwres_conf_get(lwres_context_t\ *ctx);"
.SH "DESCRIPTION"
.PP
\fBlwres_conf_init()\fR
@@ -70,7 +73,8 @@ prints the
structure for resolver context
\fIctx\fR
to the
-\fBFILE\fR\fIfp\fR.
+\fBFILE\fR
+\fIfp\fR.
.SH "RETURN VALUES"
.PP
\fBlwres_conf_parse()\fR
@@ -95,3 +99,5 @@ unless an error occurred when converting the network addresses to a numeric host
.SH "FILES"
.PP
\fI/etc/resolv.conf\fR
+.SH "COPYRIGHT"
+Copyright \(co 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
diff --git a/usr.sbin/bind/lib/lwres/man/lwres_gabn.3 b/usr.sbin/bind/lib/lwres/man/lwres_gabn.3
index da2b36721dd..9b669cf9c14 100644
--- a/usr.sbin/bind/lib/lwres/man/lwres_gabn.3
+++ b/usr.sbin/bind/lib/lwres/man/lwres_gabn.3
@@ -13,14 +13,17 @@
.\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
.\" PERFORMANCE OF THIS SOFTWARE.
.\"
-.\" $ISC: lwres_gabn.3,v 1.13.2.1.8.5 2005/10/13 02:33:52 marka Exp $
+.\" $ISC: lwres_gabn.3,v 1.13.2.1.8.6 2006/06/29 13:02:31 marka Exp $
.\"
.hy 0
.ad l
-.\" ** You probably do not want to edit this file directly **
-.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1).
-.\" Instead of manually editing it, you probably should edit the DocBook XML
-.\" source for it and then use the DocBook XSL Stylesheets to regenerate it.
+.\" Title: lwres_gabn
+.\" Author:
+.\" Generator: DocBook XSL Stylesheets v1.70.1 <http://docbook.sf.net/>
+.\" Date: Jun 30, 2000
+.\" Manual: BIND9
+.\" Source: BIND9
+.\"
.TH "LWRES_GABN" "3" "Jun 30, 2000" "BIND9" "BIND9"
.\" disable hyphenation
.nh
@@ -33,17 +36,17 @@ lwres_gabnrequest_render, lwres_gabnresponse_render, lwres_gabnrequest_parse, lw
#include <lwres/lwres.h>
.fi
.HP 40
-\fBlwres_result_t\ \fBlwres_gabnrequest_render\fR\fR\fB(\fR\fBlwres_context_t\ *ctx\fR\fB, \fR\fBlwres_gabnrequest_t\ *req\fR\fB, \fR\fBlwres_lwpacket_t\ *pkt\fR\fB, \fR\fBlwres_buffer_t\ *b\fR\fB);\fR
+.BI "lwres_result_t lwres_gabnrequest_render(lwres_context_t\ *ctx, lwres_gabnrequest_t\ *req, lwres_lwpacket_t\ *pkt, lwres_buffer_t\ *b);"
.HP 41
-\fBlwres_result_t\ \fBlwres_gabnresponse_render\fR\fR\fB(\fR\fBlwres_context_t\ *ctx\fR\fB, \fR\fBlwres_gabnresponse_t\ *req\fR\fB, \fR\fBlwres_lwpacket_t\ *pkt\fR\fB, \fR\fBlwres_buffer_t\ *b\fR\fB);\fR
+.BI "lwres_result_t lwres_gabnresponse_render(lwres_context_t\ *ctx, lwres_gabnresponse_t\ *req, lwres_lwpacket_t\ *pkt, lwres_buffer_t\ *b);"
.HP 39
-\fBlwres_result_t\ \fBlwres_gabnrequest_parse\fR\fR\fB(\fR\fBlwres_context_t\ *ctx\fR\fB, \fR\fBlwres_buffer_t\ *b\fR\fB, \fR\fBlwres_lwpacket_t\ *pkt\fR\fB, \fR\fBlwres_gabnrequest_t\ **structp\fR\fB);\fR
+.BI "lwres_result_t lwres_gabnrequest_parse(lwres_context_t\ *ctx, lwres_buffer_t\ *b, lwres_lwpacket_t\ *pkt, lwres_gabnrequest_t\ **structp);"
.HP 40
-\fBlwres_result_t\ \fBlwres_gabnresponse_parse\fR\fR\fB(\fR\fBlwres_context_t\ *ctx\fR\fB, \fR\fBlwres_buffer_t\ *b\fR\fB, \fR\fBlwres_lwpacket_t\ *pkt\fR\fB, \fR\fBlwres_gabnresponse_t\ **structp\fR\fB);\fR
+.BI "lwres_result_t lwres_gabnresponse_parse(lwres_context_t\ *ctx, lwres_buffer_t\ *b, lwres_lwpacket_t\ *pkt, lwres_gabnresponse_t\ **structp);"
.HP 29
-\fBvoid\ \fBlwres_gabnresponse_free\fR\fR\fB(\fR\fBlwres_context_t\ *ctx\fR\fB, \fR\fBlwres_gabnresponse_t\ **structp\fR\fB);\fR
+.BI "void lwres_gabnresponse_free(lwres_context_t\ *ctx, lwres_gabnresponse_t\ **structp);"
.HP 28
-\fBvoid\ \fBlwres_gabnrequest_free\fR\fR\fB(\fR\fBlwres_context_t\ *ctx\fR\fB, \fR\fBlwres_gabnrequest_t\ **structp\fR\fB);\fR
+.BI "void lwres_gabnrequest_free(lwres_context_t\ *ctx, lwres_gabnrequest_t\ **structp);"
.SH "DESCRIPTION"
.PP
These are low\-level routines for creating and parsing lightweight resolver name\-to\-address lookup request and response messages.
@@ -57,6 +60,7 @@ There are four main functions for the getaddrbyname opcode. One render function
These structures are defined in
\fI<lwres/lwres.h>\fR. They are shown below.
.sp
+.RS 3n
.nf
#define LWRES_OPCODE_GETADDRSBYNAME 0x00010001U
typedef struct lwres_addr lwres_addr_t;
@@ -80,6 +84,7 @@ typedef struct {
size_t baselen;
} lwres_gabnresponse_t;
.fi
+.RE
.sp
.PP
\fBlwres_gabnrequest_render()\fR
@@ -133,7 +138,8 @@ structures referenced via
.PP
The getaddrbyname opcode functions
\fBlwres_gabnrequest_render()\fR,
-\fBlwres_gabnresponse_render()\fR\fBlwres_gabnrequest_parse()\fR
+\fBlwres_gabnresponse_render()\fR
+\fBlwres_gabnrequest_parse()\fR
and
\fBlwres_gabnresponse_parse()\fR
all return
@@ -164,3 +170,5 @@ indicate that the packet is not a response to an earlier query.
.SH "SEE ALSO"
.PP
\fBlwres_packet\fR(3 )
+.SH "COPYRIGHT"
+Copyright \(co 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
diff --git a/usr.sbin/bind/lib/lwres/man/lwres_gai_strerror.3 b/usr.sbin/bind/lib/lwres/man/lwres_gai_strerror.3
index 1a902f0ab57..d575109d1f6 100644
--- a/usr.sbin/bind/lib/lwres/man/lwres_gai_strerror.3
+++ b/usr.sbin/bind/lib/lwres/man/lwres_gai_strerror.3
@@ -13,14 +13,17 @@
.\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
.\" PERFORMANCE OF THIS SOFTWARE.
.\"
-.\" $ISC: lwres_gai_strerror.3,v 1.13.2.1.8.5 2005/10/13 02:33:52 marka Exp $
+.\" $ISC: lwres_gai_strerror.3,v 1.13.2.1.8.6 2006/06/29 13:02:31 marka Exp $
.\"
.hy 0
.ad l
-.\" ** You probably do not want to edit this file directly **
-.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1).
-.\" Instead of manually editing it, you probably should edit the DocBook XML
-.\" source for it and then use the DocBook XSL Stylesheets to regenerate it.
+.\" Title: lwres_gai_strerror
+.\" Author:
+.\" Generator: DocBook XSL Stylesheets v1.70.1 <http://docbook.sf.net/>
+.\" Date: Jun 30, 2000
+.\" Manual: BIND9
+.\" Source: BIND9
+.\"
.TH "LWRES_GAI_STRERROR" "3" "Jun 30, 2000" "BIND9" "BIND9"
.\" disable hyphenation
.nh
@@ -33,48 +36,48 @@ gai_strerror \- print suitable error string
#include <lwres/netdb.h>
.fi
.HP 20
-\fBchar\ *\ \fBgai_strerror\fR\fR\fB(\fR\fBint\ ecode\fR\fB);\fR
+.BI "char * gai_strerror(int\ ecode);"
.SH "DESCRIPTION"
.PP
\fBlwres_gai_strerror()\fR
returns an error message corresponding to an error code returned by
\fBgetaddrinfo()\fR. The following error codes and their meaning are defined in
\fIinclude/lwres/netdb.h\fR.
-.TP
+.TP 3n
\fBEAI_ADDRFAMILY\fR
address family for hostname not supported
-.TP
+.TP 3n
\fBEAI_AGAIN\fR
temporary failure in name resolution
-.TP
+.TP 3n
\fBEAI_BADFLAGS\fR
invalid value for
\fBai_flags\fR
-.TP
+.TP 3n
\fBEAI_FAIL\fR
non\-recoverable failure in name resolution
-.TP
+.TP 3n
\fBEAI_FAMILY\fR
\fBai_family\fR
not supported
-.TP
+.TP 3n
\fBEAI_MEMORY\fR
memory allocation failure
-.TP
+.TP 3n
\fBEAI_NODATA\fR
no address associated with hostname
-.TP
+.TP 3n
\fBEAI_NONAME\fR
hostname or servname not provided, or not known
-.TP
+.TP 3n
\fBEAI_SERVICE\fR
servname not supported for
\fBai_socktype\fR
-.TP
+.TP 3n
\fBEAI_SOCKTYPE\fR
\fBai_socktype\fR
not supported
-.TP
+.TP 3n
\fBEAI_SYSTEM\fR
system error returned in errno
The message
@@ -97,3 +100,5 @@ used by
\fBlwres_getaddrinfo\fR(3),
\fBgetaddrinfo\fR(3),
\fBRFC2133\fR().
+.SH "COPYRIGHT"
+Copyright \(co 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
diff --git a/usr.sbin/bind/lib/lwres/man/lwres_getaddrinfo.3 b/usr.sbin/bind/lib/lwres/man/lwres_getaddrinfo.3
index 302afe40aa7..80c23221f4b 100644
--- a/usr.sbin/bind/lib/lwres/man/lwres_getaddrinfo.3
+++ b/usr.sbin/bind/lib/lwres/man/lwres_getaddrinfo.3
@@ -13,14 +13,17 @@
.\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
.\" PERFORMANCE OF THIS SOFTWARE.
.\"
-.\" $ISC: lwres_getaddrinfo.3,v 1.16.2.1.8.6 2005/10/13 02:33:53 marka Exp $
+.\" $ISC: lwres_getaddrinfo.3,v 1.16.2.1.8.7 2006/06/29 13:02:31 marka Exp $
.\"
.hy 0
.ad l
-.\" ** You probably do not want to edit this file directly **
-.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1).
-.\" Instead of manually editing it, you probably should edit the DocBook XML
-.\" source for it and then use the DocBook XSL Stylesheets to regenerate it.
+.\" Title: lwres_getaddrinfo
+.\" Author:
+.\" Generator: DocBook XSL Stylesheets v1.70.1 <http://docbook.sf.net/>
+.\" Date: Jun 30, 2000
+.\" Manual: BIND9
+.\" Source: BIND9
+.\"
.TH "LWRES_GETADDRINFO" "3" "Jun 30, 2000" "BIND9" "BIND9"
.\" disable hyphenation
.nh
@@ -33,13 +36,14 @@ lwres_getaddrinfo, lwres_freeaddrinfo \- socket address structure to host and se
#include <lwres/netdb.h>
.fi
.HP 22
-\fBint\ \fBlwres_getaddrinfo\fR\fR\fB(\fR\fBconst\ char\ *hostname\fR\fB, \fR\fBconst\ char\ *servname\fR\fB, \fR\fBconst\ struct\ addrinfo\ *hints\fR\fB, \fR\fBstruct\ addrinfo\ **res\fR\fB);\fR
+.BI "int lwres_getaddrinfo(const\ char\ *hostname, const\ char\ *servname, const\ struct\ addrinfo\ *hints, struct\ addrinfo\ **res);"
.HP 24
-\fBvoid\ \fBlwres_freeaddrinfo\fR\fR\fB(\fR\fBstruct\ addrinfo\ *ai\fR\fB);\fR
+.BI "void lwres_freeaddrinfo(struct\ addrinfo\ *ai);"
.PP
If the operating system does not provide a
\fBstruct addrinfo\fR, the following structure is used:
.sp
+.RS 3n
.nf
struct addrinfo {
int ai_flags; /* AI_PASSIVE, AI_CANONNAME */
@@ -52,6 +56,7 @@ struct addrinfo {
struct addrinfo *ai_next; /* next structure in linked list */
};
.fi
+.RE
.sp
.SH "DESCRIPTION"
.PP
@@ -77,13 +82,13 @@ is either a decimal port number or a service name as listed in
is an optional pointer to a
\fBstruct addrinfo\fR. This structure can be used to provide hints concerning the type of socket that the caller supports or wishes to use. The caller can supply the following structure elements in
\fI*hints\fR:
-.TP
+.TP 3n
\fBai_family\fR
The protocol family that should be used. When
\fBai_family\fR
is set to
\fBPF_UNSPEC\fR, it means the caller will accept any protocol family supported by the operating system.
-.TP
+.TP 3n
\fBai_socktype\fR
denotes the type of socket \(em
\fBSOCK_STREAM\fR,
@@ -93,12 +98,12 @@ or
\(em that is wanted. When
\fBai_socktype\fR
is zero the caller will accept any socket type.
-.TP
+.TP 3n
\fBai_protocol\fR
indicates which transport protocol is wanted: IPPROTO_UDP or IPPROTO_TCP. If
\fBai_protocol\fR
is zero the caller will accept any protocol.
-.TP
+.TP 3n
\fBai_flags\fR
Flag bits. If the
\fBAI_CANONNAME\fR
@@ -209,7 +214,8 @@ if an error occurs. If both
and
\fIservname\fR
are
-\fBNULL\fR\fBlwres_getaddrinfo()\fR
+\fBNULL\fR
+\fBlwres_getaddrinfo()\fR
returns
\fBEAI_NONAME\fR.
.SH "SEE ALSO"
@@ -225,3 +231,5 @@ returns
\fBsendto\fR(2),
\fBsendmsg\fR(2),
\fBsocket\fR(2).
+.SH "COPYRIGHT"
+Copyright \(co 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
diff --git a/usr.sbin/bind/lib/lwres/man/lwres_gethostent.3 b/usr.sbin/bind/lib/lwres/man/lwres_gethostent.3
index 8eaf06c10b5..c8b59ae33ad 100644
--- a/usr.sbin/bind/lib/lwres/man/lwres_gethostent.3
+++ b/usr.sbin/bind/lib/lwres/man/lwres_gethostent.3
@@ -13,14 +13,17 @@
.\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
.\" PERFORMANCE OF THIS SOFTWARE.
.\"
-.\" $ISC: lwres_gethostent.3,v 1.16.2.1.8.5 2005/10/13 02:33:53 marka Exp $
+.\" $ISC: lwres_gethostent.3,v 1.16.2.1.8.6 2006/06/29 13:02:31 marka Exp $
.\"
.hy 0
.ad l
-.\" ** You probably do not want to edit this file directly **
-.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1).
-.\" Instead of manually editing it, you probably should edit the DocBook XML
-.\" source for it and then use the DocBook XSL Stylesheets to regenerate it.
+.\" Title: lwres_gethostent
+.\" Author:
+.\" Generator: DocBook XSL Stylesheets v1.70.1 <http://docbook.sf.net/>
+.\" Date: Jun 30, 2000
+.\" Manual: BIND9
+.\" Source: BIND9
+.\"
.TH "LWRES_GETHOSTENT" "3" "Jun 30, 2000" "BIND9" "BIND9"
.\" disable hyphenation
.nh
@@ -33,27 +36,27 @@ lwres_gethostbyname, lwres_gethostbyname2, lwres_gethostbyaddr, lwres_gethostent
#include <lwres/netdb.h>
.fi
.HP 37
-\fBstruct\ hostent\ *\ \fBlwres_gethostbyname\fR\fR\fB(\fR\fBconst\ char\ *name\fR\fB);\fR
+.BI "struct hostent * lwres_gethostbyname(const\ char\ *name);"
.HP 38
-\fBstruct\ hostent\ *\ \fBlwres_gethostbyname2\fR\fR\fB(\fR\fBconst\ char\ *name\fR\fB, \fR\fBint\ af\fR\fB);\fR
+.BI "struct hostent * lwres_gethostbyname2(const\ char\ *name, int\ af);"
.HP 37
-\fBstruct\ hostent\ *\ \fBlwres_gethostbyaddr\fR\fR\fB(\fR\fBconst\ char\ *addr\fR\fB, \fR\fBint\ len\fR\fB, \fR\fBint\ type\fR\fB);\fR
+.BI "struct hostent * lwres_gethostbyaddr(const\ char\ *addr, int\ len, int\ type);"
.HP 34
-\fBstruct\ hostent\ *\ \fBlwres_gethostent\fR\fR\fB(\fR\fBvoid\fR\fB);\fR
+.BI "struct hostent * lwres_gethostent(void);"
.HP 22
-\fBvoid\ \fBlwres_sethostent\fR\fR\fB(\fR\fBint\ stayopen\fR\fB);\fR
+.BI "void lwres_sethostent(int\ stayopen);"
.HP 22
-\fBvoid\ \fBlwres_endhostent\fR\fR\fB(\fR\fBvoid\fR\fB);\fR
+.BI "void lwres_endhostent(void);"
.HP 39
-\fBstruct\ hostent\ *\ \fBlwres_gethostbyname_r\fR\fR\fB(\fR\fBconst\ char\ *name\fR\fB, \fR\fBstruct\ hostent\ *resbuf\fR\fB, \fR\fBchar\ *buf\fR\fB, \fR\fBint\ buflen\fR\fB, \fR\fBint\ *error\fR\fB);\fR
+.BI "struct hostent * lwres_gethostbyname_r(const\ char\ *name, struct\ hostent\ *resbuf, char\ *buf, int\ buflen, int\ *error);"
.HP 39
-\fBstruct\ hostent\ *\ \fBlwres_gethostbyaddr_r\fR\fR\fB(\fR\fBconst\ char\ *addr\fR\fB, \fR\fBint\ len\fR\fB, \fR\fBint\ type\fR\fB, \fR\fBstruct\ hostent\ *resbuf\fR\fB, \fR\fBchar\ *buf\fR\fB, \fR\fBint\ buflen\fR\fB, \fR\fBint\ *error\fR\fB);\fR
+.BI "struct hostent * lwres_gethostbyaddr_r(const\ char\ *addr, int\ len, int\ type, struct\ hostent\ *resbuf, char\ *buf, int\ buflen, int\ *error);"
.HP 36
-\fBstruct\ hostent\ *\ \fBlwres_gethostent_r\fR\fR\fB(\fR\fBstruct\ hostent\ *resbuf\fR\fB, \fR\fBchar\ *buf\fR\fB, \fR\fBint\ buflen\fR\fB, \fR\fBint\ *error\fR\fB);\fR
+.BI "struct hostent * lwres_gethostent_r(struct\ hostent\ *resbuf, char\ *buf, int\ buflen, int\ *error);"
.HP 24
-\fBvoid\ \fBlwres_sethostent_r\fR\fR\fB(\fR\fBint\ stayopen\fR\fB);\fR
+.BI "void lwres_sethostent_r(int\ stayopen);"
.HP 24
-\fBvoid\ \fBlwres_endhostent_r\fR\fR\fB(\fR\fBvoid\fR\fB);\fR
+.BI "void lwres_endhostent_r(void);"
.SH "DESCRIPTION"
.PP
These functions provide hostname\-to\-address and address\-to\-hostname lookups by means of the lightweight resolver. They are similar to the standard
@@ -63,6 +66,7 @@ functions provided by most operating systems. They use a
which is usually defined in
\fI<namedb.h>\fR.
.sp
+.RS 3n
.nf
struct hostent {
char *h_name; /* official name of host */
@@ -73,25 +77,26 @@ struct hostent {
};
#define h_addr h_addr_list[0] /* address, for backward compatibility */
.fi
+.RE
.sp
.PP
The members of this structure are:
-.TP
+.TP 3n
\fBh_name\fR
The official (canonical) name of the host.
-.TP
+.TP 3n
\fBh_aliases\fR
A NULL\-terminated array of alternate names (nicknames) for the host.
-.TP
+.TP 3n
\fBh_addrtype\fR
The type of address being returned \(em
\fBPF_INET\fR
or
\fBPF_INET6\fR.
-.TP
+.TP 3n
\fBh_length\fR
The length of the address in bytes.
-.TP
+.TP 3n
\fBh_addr_list\fR
A
\fBNULL\fR
@@ -217,16 +222,16 @@ return NULL to indicate an error. In this case the global variable
\fBlwres_h_errno\fR
will contain one of the following error codes defined in
\fI<lwres/netdb.h>\fR:
-.TP
+.TP 3n
\fBHOST_NOT_FOUND\fR
The host or address was not found.
-.TP
+.TP 3n
\fBTRY_AGAIN\fR
A recoverable error occurred, e.g., a timeout. Retrying the lookup may succeed.
-.TP
+.TP 3n
\fBNO_RECOVERY\fR
A non\-recoverable error occurred.
-.TP
+.TP 3n
\fBNO_DATA\fR
The name exists, but has no address information associated with it (or vice versa in the case of a reverse lookup). The code NO_ADDRESS is accepted as a synonym for NO_DATA for backwards compatibility.
.PP
@@ -286,3 +291,5 @@ The resolver daemon does not currently support any non\-DNS name services such a
\fI/etc/hosts\fR
or
\fBNIS\fR, consequently the above functions don't, either.
+.SH "COPYRIGHT"
+Copyright \(co 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
diff --git a/usr.sbin/bind/lib/lwres/man/lwres_getnameinfo.3 b/usr.sbin/bind/lib/lwres/man/lwres_getnameinfo.3
index 1fe1cf2d320..484e8f2f34c 100644
--- a/usr.sbin/bind/lib/lwres/man/lwres_getnameinfo.3
+++ b/usr.sbin/bind/lib/lwres/man/lwres_getnameinfo.3
@@ -13,14 +13,17 @@
.\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
.\" PERFORMANCE OF THIS SOFTWARE.
.\"
-.\" $ISC: lwres_getnameinfo.3,v 1.15.2.1.8.5 2005/10/13 02:33:53 marka Exp $
+.\" $ISC: lwres_getnameinfo.3,v 1.15.2.1.8.6 2006/06/29 13:02:31 marka Exp $
.\"
.hy 0
.ad l
-.\" ** You probably do not want to edit this file directly **
-.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1).
-.\" Instead of manually editing it, you probably should edit the DocBook XML
-.\" source for it and then use the DocBook XSL Stylesheets to regenerate it.
+.\" Title: lwres_getnameinfo
+.\" Author:
+.\" Generator: DocBook XSL Stylesheets v1.70.1 <http://docbook.sf.net/>
+.\" Date: Jun 30, 2000
+.\" Manual: BIND9
+.\" Source: BIND9
+.\"
.TH "LWRES_GETNAMEINFO" "3" "Jun 30, 2000" "BIND9" "BIND9"
.\" disable hyphenation
.nh
@@ -33,7 +36,7 @@ lwres_getnameinfo \- lightweight resolver socket address structure to hostname a
#include <lwres/netdb.h>
.fi
.HP 22
-\fBint\ \fBlwres_getnameinfo\fR\fR\fB(\fR\fBconst\ struct\ sockaddr\ *sa\fR\fB, \fR\fBsize_t\ salen\fR\fB, \fR\fBchar\ *host\fR\fB, \fR\fBsize_t\ hostlen\fR\fB, \fR\fBchar\ *serv\fR\fB, \fR\fBsize_t\ servlen\fR\fB, \fR\fBint\ flags\fR\fB);\fR
+.BI "int lwres_getnameinfo(const\ struct\ sockaddr\ *sa, size_t\ salen, char\ *host, size_t\ hostlen, char\ *serv, size_t\ servlen, int\ flags);"
.SH "DESCRIPTION"
.PP
This function is equivalent to the
@@ -41,7 +44,8 @@ This function is equivalent to the
function defined in RFC2133.
\fBlwres_getnameinfo()\fR
returns the hostname for the
-\fBstruct sockaddr\fR\fIsa\fR
+\fBstruct sockaddr\fR
+\fIsa\fR
which is
\fIsalen\fR
bytes long. The hostname is of length
@@ -64,19 +68,19 @@ bytes long. The maximum length of the service name is
The
\fIflags\fR
argument sets the following bits:
-.TP
+.TP 3n
\fBNI_NOFQDN\fR
A fully qualified domain name is not required for local hosts. The local part of the fully qualified domain name is returned instead.
-.TP
+.TP 3n
\fBNI_NUMERICHOST\fR
Return the address in numeric form, as if calling inet_ntop(), instead of a host name.
-.TP
+.TP 3n
\fBNI_NAMEREQD\fR
A name is required. If the hostname cannot be found in the DNS and this flag is set, a non\-zero error code is returned. If the hostname is not found and the flag is not set, the address is returned in numeric form.
-.TP
+.TP 3n
\fBNI_NUMERICSERV\fR
The service name is returned as a digit string representing the port number.
-.TP
+.TP 3n
\fBNI_DGRAM\fR
Specifies that the service being looked up is a datagram service, and causes getservbyport() to be called with a second argument of "udp" instead of its default of "tcp". This is required for the few ports (512\-514) that have different services for UDP and TCP.
.SH "RETURN VALUES"
@@ -96,3 +100,5 @@ returns 0 on success or a non\-zero error code if an error occurs.
RFC2133 fails to define what the nonzero return values of
\fBgetnameinfo\fR(3)
are.
+.SH "COPYRIGHT"
+Copyright \(co 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
diff --git a/usr.sbin/bind/lib/lwres/man/lwres_getrrsetbyname.3 b/usr.sbin/bind/lib/lwres/man/lwres_getrrsetbyname.3
index c12b9104075..1be62de70a1 100644
--- a/usr.sbin/bind/lib/lwres/man/lwres_getrrsetbyname.3
+++ b/usr.sbin/bind/lib/lwres/man/lwres_getrrsetbyname.3
@@ -13,14 +13,17 @@
.\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
.\" PERFORMANCE OF THIS SOFTWARE.
.\"
-.\" $ISC: lwres_getrrsetbyname.3,v 1.11.2.1.8.5 2005/10/13 02:33:53 marka Exp $
+.\" $ISC: lwres_getrrsetbyname.3,v 1.11.2.1.8.6 2006/06/29 13:02:31 marka Exp $
.\"
.hy 0
.ad l
-.\" ** You probably do not want to edit this file directly **
-.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1).
-.\" Instead of manually editing it, you probably should edit the DocBook XML
-.\" source for it and then use the DocBook XSL Stylesheets to regenerate it.
+.\" Title: lwres_getrrsetbyname
+.\" Author:
+.\" Generator: DocBook XSL Stylesheets v1.70.1 <http://docbook.sf.net/>
+.\" Date: Oct 18, 2000
+.\" Manual: BIND9
+.\" Source: BIND9
+.\"
.TH "LWRES_GETRRSETBYNAME" "3" "Oct 18, 2000" "BIND9" "BIND9"
.\" disable hyphenation
.nh
@@ -33,12 +36,13 @@ lwres_getrrsetbyname, lwres_freerrset \- retrieve DNS records
#include <lwres/netdb.h>
.fi
.HP 25
-\fBint\ \fBlwres_getrrsetbyname\fR\fR\fB(\fR\fBconst\ char\ *hostname\fR\fB, \fR\fBunsigned\ int\ rdclass\fR\fB, \fR\fBunsigned\ int\ rdtype\fR\fB, \fR\fBunsigned\ int\ flags\fR\fB, \fR\fBstruct\ rrsetinfo\ **res\fR\fB);\fR
+.BI "int lwres_getrrsetbyname(const\ char\ *hostname, unsigned\ int\ rdclass, unsigned\ int\ rdtype, unsigned\ int\ flags, struct\ rrsetinfo\ **res);"
.HP 21
-\fBvoid\ \fBlwres_freerrset\fR\fR\fB(\fR\fBstruct\ rrsetinfo\ *rrset\fR\fB);\fR
+.BI "void lwres_freerrset(struct\ rrsetinfo\ *rrset);"
.PP
The following structures are used:
.sp
+.RS 3n
.nf
struct rdatainfo {
unsigned int rdi_length; /* length of data */
@@ -56,6 +60,7 @@ struct rrsetinfo {
struct rdatainfo *rri_sigs; /* individual signatures */
};
.fi
+.RE
.sp
.SH "DESCRIPTION"
.PP
@@ -115,22 +120,24 @@ created by a call to
.PP
\fBlwres_getrrsetbyname()\fR
returns zero on success, and one of the following error codes if an error occurred:
-.TP
+.TP 3n
\fBERRSET_NONAME\fR
the name does not exist
-.TP
+.TP 3n
\fBERRSET_NODATA\fR
the name exists, but does not have data of the desired type
-.TP
+.TP 3n
\fBERRSET_NOMEMORY\fR
memory could not be allocated
-.TP
+.TP 3n
\fBERRSET_INVAL\fR
a parameter is invalid
-.TP
+.TP 3n
\fBERRSET_FAIL\fR
other failure
-.TP
+.TP 3n
.SH "SEE ALSO"
.PP
\fBlwres\fR(3).
+.SH "COPYRIGHT"
+Copyright \(co 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
diff --git a/usr.sbin/bind/lib/lwres/man/lwres_gnba.3 b/usr.sbin/bind/lib/lwres/man/lwres_gnba.3
index c8c418a0555..13d1b627eda 100644
--- a/usr.sbin/bind/lib/lwres/man/lwres_gnba.3
+++ b/usr.sbin/bind/lib/lwres/man/lwres_gnba.3
@@ -13,14 +13,17 @@
.\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
.\" PERFORMANCE OF THIS SOFTWARE.
.\"
-.\" $ISC: lwres_gnba.3,v 1.13.2.1.8.5 2005/10/13 02:33:53 marka Exp $
+.\" $ISC: lwres_gnba.3,v 1.13.2.1.8.6 2006/06/29 13:02:31 marka Exp $
.\"
.hy 0
.ad l
-.\" ** You probably do not want to edit this file directly **
-.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1).
-.\" Instead of manually editing it, you probably should edit the DocBook XML
-.\" source for it and then use the DocBook XSL Stylesheets to regenerate it.
+.\" Title: lwres_gnba
+.\" Author:
+.\" Generator: DocBook XSL Stylesheets v1.70.1 <http://docbook.sf.net/>
+.\" Date: Jun 30, 2000
+.\" Manual: BIND9
+.\" Source: BIND9
+.\"
.TH "LWRES_GNBA" "3" "Jun 30, 2000" "BIND9" "BIND9"
.\" disable hyphenation
.nh
@@ -33,17 +36,17 @@ lwres_gnbarequest_render, lwres_gnbaresponse_render, lwres_gnbarequest_parse, lw
#include <lwres/lwres.h>
.fi
.HP 40
-\fBlwres_result_t\ \fBlwres_gnbarequest_render\fR\fR\fB(\fR\fBlwres_context_t\ *\fR\fB\fIctx\fR\fR\fB, \fR\fBlwres_gnbarequest_t\ *\fR\fB\fIreq\fR\fR\fB, \fR\fBlwres_lwpacket_t\ *\fR\fB\fIpkt\fR\fR\fB, \fR\fBlwres_buffer_t\ *\fR\fB\fIb\fR\fR\fB);\fR
+.BI "lwres_result_t lwres_gnbarequest_render(lwres_context_t\ *" "ctx" ", lwres_gnbarequest_t\ *" "req" ", lwres_lwpacket_t\ *" "pkt" ", lwres_buffer_t\ *" "b" ");"
.HP 41
-\fBlwres_result_t\ \fBlwres_gnbaresponse_render\fR\fR\fB(\fR\fBlwres_context_t\ *ctx\fR\fB, \fR\fBlwres_gnbaresponse_t\ *req\fR\fB, \fR\fBlwres_lwpacket_t\ *pkt\fR\fB, \fR\fBlwres_buffer_t\ *b\fR\fB);\fR
+.BI "lwres_result_t lwres_gnbaresponse_render(lwres_context_t\ *ctx, lwres_gnbaresponse_t\ *req, lwres_lwpacket_t\ *pkt, lwres_buffer_t\ *b);"
.HP 39
-\fBlwres_result_t\ \fBlwres_gnbarequest_parse\fR\fR\fB(\fR\fBlwres_context_t\ *ctx\fR\fB, \fR\fBlwres_buffer_t\ *b\fR\fB, \fR\fBlwres_lwpacket_t\ *pkt\fR\fB, \fR\fBlwres_gnbarequest_t\ **structp\fR\fB);\fR
+.BI "lwres_result_t lwres_gnbarequest_parse(lwres_context_t\ *ctx, lwres_buffer_t\ *b, lwres_lwpacket_t\ *pkt, lwres_gnbarequest_t\ **structp);"
.HP 40
-\fBlwres_result_t\ \fBlwres_gnbaresponse_parse\fR\fR\fB(\fR\fBlwres_context_t\ *ctx\fR\fB, \fR\fBlwres_buffer_t\ *b\fR\fB, \fR\fBlwres_lwpacket_t\ *pkt\fR\fB, \fR\fBlwres_gnbaresponse_t\ **structp\fR\fB);\fR
+.BI "lwres_result_t lwres_gnbaresponse_parse(lwres_context_t\ *ctx, lwres_buffer_t\ *b, lwres_lwpacket_t\ *pkt, lwres_gnbaresponse_t\ **structp);"
.HP 29
-\fBvoid\ \fBlwres_gnbaresponse_free\fR\fR\fB(\fR\fBlwres_context_t\ *ctx\fR\fB, \fR\fBlwres_gnbaresponse_t\ **structp\fR\fB);\fR
+.BI "void lwres_gnbaresponse_free(lwres_context_t\ *ctx, lwres_gnbaresponse_t\ **structp);"
.HP 28
-\fBvoid\ \fBlwres_gnbarequest_free\fR\fR\fB(\fR\fBlwres_context_t\ *ctx\fR\fB, \fR\fBlwres_gnbarequest_t\ **structp\fR\fB);\fR
+.BI "void lwres_gnbarequest_free(lwres_context_t\ *ctx, lwres_gnbarequest_t\ **structp);"
.SH "DESCRIPTION"
.PP
These are low\-level routines for creating and parsing lightweight resolver address\-to\-name lookup request and response messages.
@@ -57,6 +60,7 @@ to the canonical format. This is complemented by a parse function which converts
These structures are defined in
\fIlwres/lwres.h\fR. They are shown below.
.sp
+.RS 3n
.nf
#define LWRES_OPCODE_GETNAMEBYADDR 0x00010002U
typedef struct {
@@ -74,6 +78,7 @@ typedef struct {
size_t baselen;
} lwres_gnbaresponse_t;
.fi
+.RE
.sp
.PP
\fBlwres_gnbarequest_render()\fR
@@ -127,7 +132,8 @@ structures referenced via
.PP
The getnamebyaddr opcode functions
\fBlwres_gnbarequest_render()\fR,
-\fBlwres_gnbaresponse_render()\fR\fBlwres_gnbarequest_parse()\fR
+\fBlwres_gnbaresponse_render()\fR
+\fBlwres_gnbarequest_parse()\fR
and
\fBlwres_gnbaresponse_parse()\fR
all return
@@ -158,3 +164,5 @@ indicate that the packet is not a response to an earlier query.
.SH "SEE ALSO"
.PP
\fBlwres_packet\fR(3).
+.SH "COPYRIGHT"
+Copyright \(co 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
diff --git a/usr.sbin/bind/lib/lwres/man/lwres_hstrerror.3 b/usr.sbin/bind/lib/lwres/man/lwres_hstrerror.3
index a09fc85e1b0..242590c996e 100644
--- a/usr.sbin/bind/lib/lwres/man/lwres_hstrerror.3
+++ b/usr.sbin/bind/lib/lwres/man/lwres_hstrerror.3
@@ -13,14 +13,17 @@
.\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
.\" PERFORMANCE OF THIS SOFTWARE.
.\"
-.\" $ISC: lwres_hstrerror.3,v 1.13.2.1.8.5 2005/10/13 02:33:53 marka Exp $
+.\" $ISC: lwres_hstrerror.3,v 1.13.2.1.8.6 2006/06/29 13:02:31 marka Exp $
.\"
.hy 0
.ad l
-.\" ** You probably do not want to edit this file directly **
-.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1).
-.\" Instead of manually editing it, you probably should edit the DocBook XML
-.\" source for it and then use the DocBook XSL Stylesheets to regenerate it.
+.\" Title: lwres_hstrerror
+.\" Author:
+.\" Generator: DocBook XSL Stylesheets v1.70.1 <http://docbook.sf.net/>
+.\" Date: Jun 30, 2000
+.\" Manual: BIND9
+.\" Source: BIND9
+.\"
.TH "LWRES_HSTRERROR" "3" "Jun 30, 2000" "BIND9" "BIND9"
.\" disable hyphenation
.nh
@@ -33,9 +36,9 @@ lwres_herror, lwres_hstrerror \- lightweight resolver error message generation
#include <lwres/netdb.h>
.fi
.HP 18
-\fBvoid\ \fBlwres_herror\fR\fR\fB(\fR\fBconst\ char\ *s\fR\fB);\fR
+.BI "void lwres_herror(const\ char\ *s);"
.HP 29
-\fBconst\ char\ *\ \fBlwres_hstrerror\fR\fR\fB(\fR\fBint\ err\fR\fB);\fR
+.BI "const char * lwres_hstrerror(int\ err);"
.SH "DESCRIPTION"
.PP
\fBlwres_herror()\fR
@@ -51,19 +54,19 @@ for the error code stored in the global variable
\fBlwres_hstrerror()\fR
returns an appropriate string for the error code gievn by
\fIerr\fR. The values of the error codes and messages are as follows:
-.TP
+.TP 3n
\fBNETDB_SUCCESS\fR
Resolver Error 0 (no error)
-.TP
+.TP 3n
\fBHOST_NOT_FOUND\fR
Unknown host
-.TP
+.TP 3n
\fBTRY_AGAIN\fR
Host name lookup failure
-.TP
+.TP 3n
\fBNO_RECOVERY\fR
Unknown server error
-.TP
+.TP 3n
\fBNO_DATA\fR
No address associated with name
.SH "RETURN VALUES"
@@ -79,3 +82,5 @@ is not a valid error code.
.PP
\fBherror\fR(3),
\fBlwres_hstrerror\fR(3).
+.SH "COPYRIGHT"
+Copyright \(co 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
diff --git a/usr.sbin/bind/lib/lwres/man/lwres_inetntop.3 b/usr.sbin/bind/lib/lwres/man/lwres_inetntop.3
index 51a26491425..4ea9df84d47 100644
--- a/usr.sbin/bind/lib/lwres/man/lwres_inetntop.3
+++ b/usr.sbin/bind/lib/lwres/man/lwres_inetntop.3
@@ -13,14 +13,17 @@
.\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
.\" PERFORMANCE OF THIS SOFTWARE.
.\"
-.\" $ISC: lwres_inetntop.3,v 1.12.2.1.8.5 2005/10/13 02:33:53 marka Exp $
+.\" $ISC: lwres_inetntop.3,v 1.12.2.1.8.6 2006/06/29 13:02:31 marka Exp $
.\"
.hy 0
.ad l
-.\" ** You probably do not want to edit this file directly **
-.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1).
-.\" Instead of manually editing it, you probably should edit the DocBook XML
-.\" source for it and then use the DocBook XSL Stylesheets to regenerate it.
+.\" Title: lwres_inetntop
+.\" Author:
+.\" Generator: DocBook XSL Stylesheets v1.70.1 <http://docbook.sf.net/>
+.\" Date: Jun 30, 2000
+.\" Manual: BIND9
+.\" Source: BIND9
+.\"
.TH "LWRES_INETNTOP" "3" "Jun 30, 2000" "BIND9" "BIND9"
.\" disable hyphenation
.nh
@@ -33,7 +36,7 @@ lwres_net_ntop \- lightweight resolver IP address presentation
#include <lwres/net.h>
.fi
.HP 28
-\fBconst\ char\ *\ \fBlwres_net_ntop\fR\fR\fB(\fR\fBint\ af\fR\fB, \fR\fBconst\ void\ *src\fR\fB, \fR\fBchar\ *dst\fR\fB, \fR\fBsize_t\ size\fR\fB);\fR
+.BI "const char * lwres_net_ntop(int\ af, const\ void\ *src, char\ *dst, size_t\ size);"
.SH "DESCRIPTION"
.PP
\fBlwres_net_ntop()\fR
@@ -67,3 +70,5 @@ is not supported.
\fBRFC1884\fR(),
\fBinet_ntop\fR(3),
\fBerrno\fR(3).
+.SH "COPYRIGHT"
+Copyright \(co 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
diff --git a/usr.sbin/bind/lib/lwres/man/lwres_noop.3 b/usr.sbin/bind/lib/lwres/man/lwres_noop.3
index aea47722aa0..1adac1e1885 100644
--- a/usr.sbin/bind/lib/lwres/man/lwres_noop.3
+++ b/usr.sbin/bind/lib/lwres/man/lwres_noop.3
@@ -13,14 +13,17 @@
.\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
.\" PERFORMANCE OF THIS SOFTWARE.
.\"
-.\" $ISC: lwres_noop.3,v 1.14.2.1.8.5 2005/10/13 02:33:54 marka Exp $
+.\" $ISC: lwres_noop.3,v 1.14.2.1.8.6 2006/06/29 13:02:31 marka Exp $
.\"
.hy 0
.ad l
-.\" ** You probably do not want to edit this file directly **
-.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1).
-.\" Instead of manually editing it, you probably should edit the DocBook XML
-.\" source for it and then use the DocBook XSL Stylesheets to regenerate it.
+.\" Title: lwres_noop
+.\" Author:
+.\" Generator: DocBook XSL Stylesheets v1.70.1 <http://docbook.sf.net/>
+.\" Date: Jun 30, 2000
+.\" Manual: BIND9
+.\" Source: BIND9
+.\"
.TH "LWRES_NOOP" "3" "Jun 30, 2000" "BIND9" "BIND9"
.\" disable hyphenation
.nh
@@ -33,17 +36,17 @@ lwres_nooprequest_render, lwres_noopresponse_render, lwres_nooprequest_parse, lw
#include <lwres/lwres.h>
.fi
.HP 40
-\fBlwres_result_t\ \fBlwres_nooprequest_render\fR\fR\fB(\fR\fBlwres_context_t\ *ctx\fR\fB, \fR\fBlwres_nooprequest_t\ *req\fR\fB, \fR\fBlwres_lwpacket_t\ *pkt\fR\fB, \fR\fBlwres_buffer_t\ *b\fR\fB);\fR
+.BI "lwres_result_t lwres_nooprequest_render(lwres_context_t\ *ctx, lwres_nooprequest_t\ *req, lwres_lwpacket_t\ *pkt, lwres_buffer_t\ *b);"
.HP 41
-\fBlwres_result_t\ \fBlwres_noopresponse_render\fR\fR\fB(\fR\fBlwres_context_t\ *ctx\fR\fB, \fR\fBlwres_noopresponse_t\ *req\fR\fB, \fR\fBlwres_lwpacket_t\ *pkt\fR\fB, \fR\fBlwres_buffer_t\ *b\fR\fB);\fR
+.BI "lwres_result_t lwres_noopresponse_render(lwres_context_t\ *ctx, lwres_noopresponse_t\ *req, lwres_lwpacket_t\ *pkt, lwres_buffer_t\ *b);"
.HP 39
-\fBlwres_result_t\ \fBlwres_nooprequest_parse\fR\fR\fB(\fR\fBlwres_context_t\ *ctx\fR\fB, \fR\fBlwres_buffer_t\ *b\fR\fB, \fR\fBlwres_lwpacket_t\ *pkt\fR\fB, \fR\fBlwres_nooprequest_t\ **structp\fR\fB);\fR
+.BI "lwres_result_t lwres_nooprequest_parse(lwres_context_t\ *ctx, lwres_buffer_t\ *b, lwres_lwpacket_t\ *pkt, lwres_nooprequest_t\ **structp);"
.HP 40
-\fBlwres_result_t\ \fBlwres_noopresponse_parse\fR\fR\fB(\fR\fBlwres_context_t\ *ctx\fR\fB, \fR\fBlwres_buffer_t\ *b\fR\fB, \fR\fBlwres_lwpacket_t\ *pkt\fR\fB, \fR\fBlwres_noopresponse_t\ **structp\fR\fB);\fR
+.BI "lwres_result_t lwres_noopresponse_parse(lwres_context_t\ *ctx, lwres_buffer_t\ *b, lwres_lwpacket_t\ *pkt, lwres_noopresponse_t\ **structp);"
.HP 29
-\fBvoid\ \fBlwres_noopresponse_free\fR\fR\fB(\fR\fBlwres_context_t\ *ctx\fR\fB, \fR\fBlwres_noopresponse_t\ **structp\fR\fB);\fR
+.BI "void lwres_noopresponse_free(lwres_context_t\ *ctx, lwres_noopresponse_t\ **structp);"
.HP 28
-\fBvoid\ \fBlwres_nooprequest_free\fR\fR\fB(\fR\fBlwres_context_t\ *ctx\fR\fB, \fR\fBlwres_nooprequest_t\ **structp\fR\fB);\fR
+.BI "void lwres_nooprequest_free(lwres_context_t\ *ctx, lwres_nooprequest_t\ **structp);"
.SH "DESCRIPTION"
.PP
These are low\-level routines for creating and parsing lightweight resolver no\-op request and response messages.
@@ -61,6 +64,7 @@ to the canonical format. This is complemented by a parse function which converts
These structures are defined in
\fIlwres/lwres.h\fR. They are shown below.
.sp
+.RS 3n
.nf
#define LWRES_OPCODE_NOOP 0x00000000U
typedef struct {
@@ -72,6 +76,7 @@ typedef struct {
unsigned char *data;
} lwres_noopresponse_t;
.fi
+.RE
.sp
Although the structures have different types, they are identical. This is because the no\-op opcode simply echos whatever data was sent: the response is therefore identical to the request.
.PP
@@ -126,7 +131,8 @@ structures referenced via
.PP
The no\-op opcode functions
\fBlwres_nooprequest_render()\fR,
-\fBlwres_noopresponse_render()\fR\fBlwres_nooprequest_parse()\fR
+\fBlwres_noopresponse_render()\fR
+\fBlwres_nooprequest_parse()\fR
and
\fBlwres_noopresponse_parse()\fR
all return
@@ -157,3 +163,5 @@ indicate that the packet is not a response to an earlier query.
.SH "SEE ALSO"
.PP
\fBlwres_packet\fR(3 )
+.SH "COPYRIGHT"
+Copyright \(co 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
diff --git a/usr.sbin/bind/lib/lwres/man/lwres_packet.3 b/usr.sbin/bind/lib/lwres/man/lwres_packet.3
index 4690239598f..e796d57c552 100644
--- a/usr.sbin/bind/lib/lwres/man/lwres_packet.3
+++ b/usr.sbin/bind/lib/lwres/man/lwres_packet.3
@@ -13,14 +13,17 @@
.\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
.\" PERFORMANCE OF THIS SOFTWARE.
.\"
-.\" $ISC: lwres_packet.3,v 1.15.2.1.8.5 2005/10/13 02:33:54 marka Exp $
+.\" $ISC: lwres_packet.3,v 1.15.2.1.8.6 2006/06/29 13:02:31 marka Exp $
.\"
.hy 0
.ad l
-.\" ** You probably do not want to edit this file directly **
-.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1).
-.\" Instead of manually editing it, you probably should edit the DocBook XML
-.\" source for it and then use the DocBook XSL Stylesheets to regenerate it.
+.\" Title: lwres_packet
+.\" Author:
+.\" Generator: DocBook XSL Stylesheets v1.70.1 <http://docbook.sf.net/>
+.\" Date: Jun 30, 2000
+.\" Manual: BIND9
+.\" Source: BIND9
+.\"
.TH "LWRES_PACKET" "3" "Jun 30, 2000" "BIND9" "BIND9"
.\" disable hyphenation
.nh
@@ -33,9 +36,9 @@ lwres_lwpacket_renderheader, lwres_lwpacket_parseheader \- lightweight resolver
#include <lwres/lwpacket.h>
.fi
.HP 43
-\fBlwres_result_t\ \fBlwres_lwpacket_renderheader\fR\fR\fB(\fR\fBlwres_buffer_t\ *b\fR\fB, \fR\fBlwres_lwpacket_t\ *pkt\fR\fB);\fR
+.BI "lwres_result_t lwres_lwpacket_renderheader(lwres_buffer_t\ *b, lwres_lwpacket_t\ *pkt);"
.HP 42
-\fBlwres_result_t\ \fBlwres_lwpacket_parseheader\fR\fR\fB(\fR\fBlwres_buffer_t\ *b\fR\fB, \fR\fBlwres_lwpacket_t\ *pkt\fR\fB);\fR
+.BI "lwres_result_t lwres_lwpacket_parseheader(lwres_buffer_t\ *b, lwres_lwpacket_t\ *pkt);"
.SH "DESCRIPTION"
.PP
These functions rely on a
@@ -43,6 +46,7 @@ These functions rely on a
which is defined in
\fIlwres/lwpacket.h\fR.
.sp
+.RS 3n
.nf
typedef struct lwres_lwpacket lwres_lwpacket_t;
struct lwres_lwpacket {
@@ -57,52 +61,54 @@ struct lwres_lwpacket {
lwres_uint16_t authlength;
};
.fi
+.RE
.sp
.PP
The elements of this structure are:
-.TP
+.TP 3n
\fBlength\fR
the overall packet length, including the entire packet header. This field is filled in by the lwres_gabn_*() and lwres_gnba_*() calls.
-.TP
+.TP 3n
\fBversion\fR
the header format. There is currently only one format,
\fBLWRES_LWPACKETVERSION_0\fR. This field is filled in by the lwres_gabn_*() and lwres_gnba_*() calls.
-.TP
+.TP 3n
\fBpktflags\fR
library\-defined flags for this packet: for instance whether the packet is a request or a reply. Flag values can be set, but not defined by the caller. This field is filled in by the application wit the exception of the LWRES_LWPACKETFLAG_RESPONSE bit, which is set by the library in the lwres_gabn_*() and lwres_gnba_*() calls.
-.TP
+.TP 3n
\fBserial\fR
is set by the requestor and is returned in all replies. If two or more packets from the same source have the same serial number and are from the same source, they are assumed to be duplicates and the latter ones may be dropped. This field must be set by the application.
-.TP
+.TP 3n
\fBopcode\fR
indicates the operation. Opcodes between 0x00000000 and 0x03ffffff are reserved for use by the lightweight resolver library. Opcodes between 0x04000000 and 0xffffffff are application defined. This field is filled in by the lwres_gabn_*() and lwres_gnba_*() calls.
-.TP
+.TP 3n
\fBresult\fR
is only valid for replies. Results between 0x04000000 and 0xffffffff are application defined. Results between 0x00000000 and 0x03ffffff are reserved for library use. This field is filled in by the lwres_gabn_*() and lwres_gnba_*() calls.
-.TP
+.TP 3n
\fBrecvlength\fR
is the maximum buffer size that the receiver can handle on requests and the size of the buffer needed to satisfy a request when the buffer is too large for replies. This field is supplied by the application.
-.TP
+.TP 3n
\fBauthtype\fR
defines the packet level authentication that is used. Authorisation types between 0x1000 and 0xffff are application defined and types between 0x0000 and 0x0fff are reserved for library use. Currently these are not used and must be zero.
-.TP
+.TP 3n
\fBauthlen\fR
gives the length of the authentication data. Since packet authentication is currently not used, this must be zero.
.PP
The following opcodes are currently defined:
-.TP
+.TP 3n
\fBNOOP\fR
Success is always returned and the packet contents are echoed. The lwres_noop_*() functions should be used for this type.
-.TP
+.TP 3n
\fBGETADDRSBYNAME\fR
returns all known addresses for a given name. The lwres_gabn_*() functions should be used for this type.
-.TP
+.TP 3n
\fBGETNAMEBYADDR\fR
return the hostname for the given address. The lwres_gnba_*() functions should be used for this type.
.PP
\fBlwres_lwpacket_renderheader()\fR
transfers the contents of lightweight resolver packet structure
-\fBlwres_lwpacket_t\fR\fI*pkt\fR
+\fBlwres_lwpacket_t\fR
+\fI*pkt\fR
in network byte order to the lightweight resolver buffer,
\fI*b\fR.
.PP
@@ -127,3 +133,5 @@ and lightweight resolver packet
\fI*pkt\fR
both functions return
\fBLWRES_R_UNEXPECTEDEND\fR.
+.SH "COPYRIGHT"
+Copyright \(co 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
diff --git a/usr.sbin/bind/lib/lwres/man/lwres_resutil.3 b/usr.sbin/bind/lib/lwres/man/lwres_resutil.3
index a6dbe800b84..9eb51d1b719 100644
--- a/usr.sbin/bind/lib/lwres/man/lwres_resutil.3
+++ b/usr.sbin/bind/lib/lwres/man/lwres_resutil.3
@@ -13,14 +13,17 @@
.\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
.\" PERFORMANCE OF THIS SOFTWARE.
.\"
-.\" $ISC: lwres_resutil.3,v 1.14.2.1.8.5 2005/10/13 02:33:54 marka Exp $
+.\" $ISC: lwres_resutil.3,v 1.14.2.1.8.6 2006/06/29 13:02:31 marka Exp $
.\"
.hy 0
.ad l
-.\" ** You probably do not want to edit this file directly **
-.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1).
-.\" Instead of manually editing it, you probably should edit the DocBook XML
-.\" source for it and then use the DocBook XSL Stylesheets to regenerate it.
+.\" Title: lwres_resutil
+.\" Author:
+.\" Generator: DocBook XSL Stylesheets v1.70.1 <http://docbook.sf.net/>
+.\" Date: Jun 30, 2000
+.\" Manual: BIND9
+.\" Source: BIND9
+.\"
.TH "LWRES_RESUTIL" "3" "Jun 30, 2000" "BIND9" "BIND9"
.\" disable hyphenation
.nh
@@ -33,13 +36,13 @@ lwres_string_parse, lwres_addr_parse, lwres_getaddrsbyname, lwres_getnamebyaddr
#include <lwres/lwres.h>
.fi
.HP 34
-\fBlwres_result_t\ \fBlwres_string_parse\fR\fR\fB(\fR\fBlwres_buffer_t\ *b\fR\fB, \fR\fBchar\ **c\fR\fB, \fR\fBlwres_uint16_t\ *len\fR\fB);\fR
+.BI "lwres_result_t lwres_string_parse(lwres_buffer_t\ *b, char\ **c, lwres_uint16_t\ *len);"
.HP 32
-\fBlwres_result_t\ \fBlwres_addr_parse\fR\fR\fB(\fR\fBlwres_buffer_t\ *b\fR\fB, \fR\fBlwres_addr_t\ *addr\fR\fB);\fR
+.BI "lwres_result_t lwres_addr_parse(lwres_buffer_t\ *b, lwres_addr_t\ *addr);"
.HP 36
-\fBlwres_result_t\ \fBlwres_getaddrsbyname\fR\fR\fB(\fR\fBlwres_context_t\ *ctx\fR\fB, \fR\fBconst\ char\ *name\fR\fB, \fR\fBlwres_uint32_t\ addrtypes\fR\fB, \fR\fBlwres_gabnresponse_t\ **structp\fR\fB);\fR
+.BI "lwres_result_t lwres_getaddrsbyname(lwres_context_t\ *ctx, const\ char\ *name, lwres_uint32_t\ addrtypes, lwres_gabnresponse_t\ **structp);"
.HP 35
-\fBlwres_result_t\ \fBlwres_getnamebyaddr\fR\fR\fB(\fR\fBlwres_context_t\ *ctx\fR\fB, \fR\fBlwres_uint32_t\ addrtype\fR\fB, \fR\fBlwres_uint16_t\ addrlen\fR\fB, \fR\fBconst\ unsigned\ char\ *addr\fR\fB, \fR\fBlwres_gnbaresponse_t\ **structp\fR\fB);\fR
+.BI "lwres_result_t lwres_getnamebyaddr(lwres_context_t\ *ctx, lwres_uint32_t\ addrtype, lwres_uint16_t\ addrlen, const\ unsigned\ char\ *addr, lwres_gnbaresponse_t\ **structp);"
.SH "DESCRIPTION"
.PP
\fBlwres_string_parse()\fR
@@ -71,6 +74,7 @@ use the
\fBlwres_gnbaresponse_t\fR
structure defined below:
.sp
+.RS 3n
.nf
typedef struct {
lwres_uint32_t flags;
@@ -85,6 +89,7 @@ typedef struct {
size_t baselen;
} lwres_gabnresponse_t;
.fi
+.RE
.sp
The contents of this structure are not manipulated directly but they are controlled through the
\fBlwres_gabn\fR(3 )
@@ -158,3 +163,5 @@ if the buffers used for sending queries and receiving replies are too small.
.PP
\fBlwres_buffer\fR(3),
\fBlwres_gabn\fR(3).
+.SH "COPYRIGHT"
+Copyright \(co 2004, 2005 Internet Systems Consortium, Inc. ("ISC")