summaryrefslogtreecommitdiffstats
path: root/contrib/bind9/lib
diff options
context:
space:
mode:
authordougb <dougb@FreeBSD.org>2005-12-29 04:22:58 +0000
committerdougb <dougb@FreeBSD.org>2005-12-29 04:22:58 +0000
commit13e6e55147add29e8d7701891f70aefeb3d74645 (patch)
tree570b6e4f35462e81147786cc2f272d28fac7f470 /contrib/bind9/lib
parent9123af99f7956e2383e5b9c4d39e84bea89915fe (diff)
downloadFreeBSD-src-13e6e55147add29e8d7701891f70aefeb3d74645.zip
FreeBSD-src-13e6e55147add29e8d7701891f70aefeb3d74645.tar.gz
Vendor import of BIND 9.3.2
Diffstat (limited to 'contrib/bind9/lib')
-rw-r--r--contrib/bind9/lib/bind/Makefile.in13
-rw-r--r--contrib/bind9/lib/bind/api4
-rw-r--r--contrib/bind9/lib/bind/config.h.in4
-rwxr-xr-xcontrib/bind9/lib/bind/configure591
-rw-r--r--contrib/bind9/lib/bind/configure.in223
-rw-r--r--contrib/bind9/lib/bind/dst/dst_api.c12
-rw-r--r--contrib/bind9/lib/bind/dst/hmac_link.c15
-rw-r--r--contrib/bind9/lib/bind/dst/md5.h5
-rw-r--r--contrib/bind9/lib/bind/dst/md5_dgst.c2
-rw-r--r--contrib/bind9/lib/bind/dst/support.c20
-rw-r--r--contrib/bind9/lib/bind/include/isc/eventlib.h4
-rw-r--r--contrib/bind9/lib/bind/include/resolv.h7
-rw-r--r--contrib/bind9/lib/bind/include/resolv_mt.h47
-rw-r--r--contrib/bind9/lib/bind/inet/inet_cidr_ntop.c4
-rw-r--r--contrib/bind9/lib/bind/inet/inet_ntop.c4
-rw-r--r--contrib/bind9/lib/bind/inet/inet_pton.c17
-rw-r--r--contrib/bind9/lib/bind/inet/nsap_addr.c5
-rw-r--r--contrib/bind9/lib/bind/irs/dns_ho.c5
-rw-r--r--contrib/bind9/lib/bind/irs/getaddrinfo.c27
-rw-r--r--contrib/bind9/lib/bind/irs/gethostent_r.c14
-rw-r--r--contrib/bind9/lib/bind/irs/getnetent_r.c8
-rw-r--r--contrib/bind9/lib/bind/irs/getnetgrent_r.c13
-rw-r--r--contrib/bind9/lib/bind/irs/hesiod.c6
-rw-r--r--contrib/bind9/lib/bind/isc/ev_connects.c8
-rw-r--r--contrib/bind9/lib/bind/isc/ev_files.c25
-rw-r--r--contrib/bind9/lib/bind/isc/eventlib.c235
-rw-r--r--contrib/bind9/lib/bind/isc/eventlib_p.h63
-rw-r--r--contrib/bind9/lib/bind/isc/memcluster.c50
-rw-r--r--contrib/bind9/lib/bind/nameser/ns_parse.c10
-rw-r--r--contrib/bind9/lib/bind/nameser/ns_ttl.c5
-rw-r--r--contrib/bind9/lib/bind/nameser/ns_verify.c17
-rw-r--r--contrib/bind9/lib/bind/port_after.h.in13
-rw-r--r--contrib/bind9/lib/bind/port_before.h.in8
-rw-r--r--contrib/bind9/lib/bind/resolv/Makefile.in8
-rw-r--r--contrib/bind9/lib/bind/resolv/mtctxres.c128
-rw-r--r--contrib/bind9/lib/bind/resolv/res_comp.c14
-rw-r--r--contrib/bind9/lib/bind/resolv/res_debug.c16
-rw-r--r--contrib/bind9/lib/bind/resolv/res_findzonecut.c6
-rw-r--r--contrib/bind9/lib/bind/resolv/res_init.c69
-rw-r--r--contrib/bind9/lib/bind/resolv/res_mkupdate.c11
-rw-r--r--contrib/bind9/lib/bind/resolv/res_send.c46
-rw-r--r--contrib/bind9/lib/bind/resolv/res_sendsigned.c12
-rw-r--r--contrib/bind9/lib/bind9/api2
-rw-r--r--contrib/bind9/lib/bind9/check.c10
-rw-r--r--contrib/bind9/lib/bind9/getaddresses.c8
-rw-r--r--contrib/bind9/lib/dns/adb.c12
-rw-r--r--contrib/bind9/lib/dns/api4
-rw-r--r--contrib/bind9/lib/dns/cache.c27
-rw-r--r--contrib/bind9/lib/dns/forward.c13
-rw-r--r--contrib/bind9/lib/dns/gen-unix.h8
-rw-r--r--contrib/bind9/lib/dns/include/dns/forward.h9
-rw-r--r--contrib/bind9/lib/dns/include/dns/masterdump.h6
-rw-r--r--contrib/bind9/lib/dns/include/dns/rdataset.h37
-rw-r--r--contrib/bind9/lib/dns/include/dns/validator.h10
-rw-r--r--contrib/bind9/lib/dns/journal.c19
-rw-r--r--contrib/bind9/lib/dns/key.c5
-rw-r--r--contrib/bind9/lib/dns/message.c62
-rw-r--r--contrib/bind9/lib/dns/name.c28
-rw-r--r--contrib/bind9/lib/dns/rbt.c9
-rw-r--r--contrib/bind9/lib/dns/rbtdb.c43
-rw-r--r--contrib/bind9/lib/dns/rdata.c14
-rw-r--r--contrib/bind9/lib/dns/rdata/any_255/tsig_250.c16
-rw-r--r--contrib/bind9/lib/dns/rdata/generic/ds_43.c12
-rw-r--r--contrib/bind9/lib/dns/rdata/generic/rt_21.c6
-rw-r--r--contrib/bind9/lib/dns/resolver.c224
-rw-r--r--contrib/bind9/lib/dns/tkey.c10
-rw-r--r--contrib/bind9/lib/dns/tsig.c6
-rw-r--r--contrib/bind9/lib/dns/validator.c618
-rw-r--r--contrib/bind9/lib/dns/xfrin.c10
-rw-r--r--contrib/bind9/lib/dns/zone.c245
-rw-r--r--contrib/bind9/lib/isc/api6
-rw-r--r--contrib/bind9/lib/isc/include/isc/Makefile.in8
-rw-r--r--contrib/bind9/lib/isc/include/isc/netaddr.h6
-rw-r--r--contrib/bind9/lib/isc/include/isc/print.h8
-rw-r--r--contrib/bind9/lib/isc/include/isc/quota.h14
-rw-r--r--contrib/bind9/lib/isc/include/isc/sockaddr.h6
-rw-r--r--contrib/bind9/lib/isc/include/isc/timer.h13
-rw-r--r--contrib/bind9/lib/isc/inet_pton.c19
-rw-r--r--contrib/bind9/lib/isc/lfsr.c8
-rw-r--r--contrib/bind9/lib/isc/mem.c31
-rw-r--r--contrib/bind9/lib/isc/nls/msgcat.c5
-rw-r--r--contrib/bind9/lib/isc/pthreads/mutex.c30
-rw-r--r--contrib/bind9/lib/isc/quota.c39
-rw-r--r--contrib/bind9/lib/isc/result.c5
-rw-r--r--contrib/bind9/lib/isc/rwlock.c18
-rw-r--r--contrib/bind9/lib/isc/timer.c6
-rw-r--r--contrib/bind9/lib/isc/unix/entropy.c21
-rw-r--r--contrib/bind9/lib/isc/unix/ifiter_ioctl.c16
-rw-r--r--contrib/bind9/lib/isc/unix/ifiter_sysctl.c6
-rw-r--r--contrib/bind9/lib/isc/unix/net.c8
-rw-r--r--contrib/bind9/lib/isc/unix/os.c6
-rw-r--r--contrib/bind9/lib/isc/unix/socket.c105
-rw-r--r--contrib/bind9/lib/isc/unix/stdtime.c5
-rw-r--r--contrib/bind9/lib/isccfg/api2
-rw-r--r--contrib/bind9/lib/isccfg/namedconf.c7
-rw-r--r--contrib/bind9/lib/lwres/Makefile.in10
-rw-r--r--contrib/bind9/lib/lwres/api6
-rw-r--r--contrib/bind9/lib/lwres/getaddrinfo.c6
-rw-r--r--contrib/bind9/lib/lwres/getipnode.c7
-rw-r--r--contrib/bind9/lib/lwres/include/lwres/platform.h.in14
-rw-r--r--contrib/bind9/lib/lwres/include/lwres/stdlib.h40
-rw-r--r--contrib/bind9/lib/lwres/lwconfig.c12
-rw-r--r--contrib/bind9/lib/lwres/lwinetntop.c6
-rw-r--r--contrib/bind9/lib/lwres/lwinetpton.c19
-rw-r--r--contrib/bind9/lib/lwres/man/lwres.3176
-rw-r--r--contrib/bind9/lib/lwres/man/lwres.docbook24
-rw-r--r--contrib/bind9/lib/lwres/man/lwres.html537
-rw-r--r--contrib/bind9/lib/lwres/man/lwres_buffer.3272
-rw-r--r--contrib/bind9/lib/lwres/man/lwres_buffer.docbook23
-rw-r--r--contrib/bind9/lib/lwres/man/lwres_buffer.html832
-rw-r--r--contrib/bind9/lib/lwres/man/lwres_config.392
-rw-r--r--contrib/bind9/lib/lwres/man/lwres_config.docbook24
-rw-r--r--contrib/bind9/lib/lwres/man/lwres_config.html388
-rw-r--r--contrib/bind9/lib/lwres/man/lwres_context.3163
-rw-r--r--contrib/bind9/lib/lwres/man/lwres_context.docbook25
-rw-r--r--contrib/bind9/lib/lwres/man/lwres_context.html653
-rw-r--r--contrib/bind9/lib/lwres/man/lwres_gabn.3147
-rw-r--r--contrib/bind9/lib/lwres/man/lwres_gabn.docbook24
-rw-r--r--contrib/bind9/lib/lwres/man/lwres_gabn.html580
-rw-r--r--contrib/bind9/lib/lwres/man/lwres_gai_strerror.369
-rw-r--r--contrib/bind9/lib/lwres/man/lwres_gai_strerror.docbook24
-rw-r--r--contrib/bind9/lib/lwres/man/lwres_gai_strerror.html381
-rw-r--r--contrib/bind9/lib/lwres/man/lwres_getaddrinfo.3204
-rw-r--r--contrib/bind9/lib/lwres/man/lwres_getaddrinfo.docbook24
-rw-r--r--contrib/bind9/lib/lwres/man/lwres_getaddrinfo.html800
-rw-r--r--contrib/bind9/lib/lwres/man/lwres_gethostent.3334
-rw-r--r--contrib/bind9/lib/lwres/man/lwres_gethostent.docbook20
-rw-r--r--contrib/bind9/lib/lwres/man/lwres_gethostent.html1110
-rw-r--r--contrib/bind9/lib/lwres/man/lwres_getipnode.3123
-rw-r--r--contrib/bind9/lib/lwres/man/lwres_getipnode.docbook24
-rw-r--r--contrib/bind9/lib/lwres/man/lwres_getipnode.html688
-rw-r--r--contrib/bind9/lib/lwres/man/lwres_getnameinfo.398
-rw-r--r--contrib/bind9/lib/lwres/man/lwres_getnameinfo.docbook24
-rw-r--r--contrib/bind9/lib/lwres/man/lwres_getnameinfo.html410
-rw-r--r--contrib/bind9/lib/lwres/man/lwres_getrrsetbyname.398
-rw-r--r--contrib/bind9/lib/lwres/man/lwres_getrrsetbyname.docbook24
-rw-r--r--contrib/bind9/lib/lwres/man/lwres_getrrsetbyname.html455
-rw-r--r--contrib/bind9/lib/lwres/man/lwres_gnba.3160
-rw-r--r--contrib/bind9/lib/lwres/man/lwres_gnba.docbook23
-rw-r--r--contrib/bind9/lib/lwres/man/lwres_gnba.html587
-rw-r--r--contrib/bind9/lib/lwres/man/lwres_hstrerror.382
-rw-r--r--contrib/bind9/lib/lwres/man/lwres_hstrerror.docbook23
-rw-r--r--contrib/bind9/lib/lwres/man/lwres_hstrerror.html311
-rw-r--r--contrib/bind9/lib/lwres/man/lwres_inetntop.381
-rw-r--r--contrib/bind9/lib/lwres/man/lwres_inetntop.docbook23
-rw-r--r--contrib/bind9/lib/lwres/man/lwres_inetntop.html247
-rw-r--r--contrib/bind9/lib/lwres/man/lwres_noop.3205
-rw-r--r--contrib/bind9/lib/lwres/man/lwres_noop.docbook23
-rw-r--r--contrib/bind9/lib/lwres/man/lwres_noop.html585
-rw-r--r--contrib/bind9/lib/lwres/man/lwres_packet.3140
-rw-r--r--contrib/bind9/lib/lwres/man/lwres_packet.docbook23
-rw-r--r--contrib/bind9/lib/lwres/man/lwres_packet.html482
-rw-r--r--contrib/bind9/lib/lwres/man/lwres_resutil.3171
-rw-r--r--contrib/bind9/lib/lwres/man/lwres_resutil.docbook23
-rw-r--r--contrib/bind9/lib/lwres/man/lwres_resutil.html544
-rw-r--r--contrib/bind9/lib/lwres/print.c26
-rw-r--r--contrib/bind9/lib/lwres/strtoul.c135
157 files changed, 7791 insertions, 8758 deletions
diff --git a/contrib/bind9/lib/bind/Makefile.in b/contrib/bind9/lib/bind/Makefile.in
index 0a2a1a0..5c34c1a 100644
--- a/contrib/bind9/lib/bind/Makefile.in
+++ b/contrib/bind9/lib/bind/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
# Copyright (C) 2001-2003 Internet Software Consortium.
#
# Permission to use, copy, modify, and distribute this software for any
@@ -13,7 +13,7 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
-# $Id: Makefile.in,v 1.12.2.5.2.7 2004/12/09 04:07:14 marka Exp $
+# $Id: Makefile.in,v 1.12.2.5.2.9 2005/07/29 00:13:08 marka Exp $
srcdir = @srcdir@
VPATH = @srcdir@
@@ -85,10 +85,11 @@ NAMESEROBJS= nameser/ns_date.@O@ nameser/ns_name.@O@ nameser/ns_netint.@O@ \
nameser/ns_parse.@O@ nameser/ns_print.@O@ nameser/ns_samedomain.@O@ \
nameser/ns_sign.@O@ nameser/ns_ttl.@O@ nameser/ns_verify.@O@
-RESOLVOBJS= resolv/herror.@O@ resolv/res_comp.@O@ resolv/res_data.@O@ \
- resolv/res_debug.@O@ resolv/res_findzonecut.@O@ resolv/res_init.@O@ \
- resolv/res_mkquery.@O@ resolv/res_mkupdate.@O@ resolv/res_query.@O@ \
- resolv/res_send.@O@ resolv/res_sendsigned.@O@ resolv/res_update.@O@
+RESOLVOBJS= resolv/herror.@O@ resolv/mtctxres.@O@ resolv/res_comp.@O@ \
+ resolv/res_data.@O@ resolv/res_debug.@O@ resolv/res_findzonecut.@O@ \
+ resolv/res_init.@O@ resolv/res_mkquery.@O@ resolv/res_mkupdate.@O@ \
+ resolv/res_query.@O@ resolv/res_send.@O@ resolv/res_sendsigned.@O@ \
+ resolv/res_update.@O@
SUBDIRS = bsd dst include inet irs isc nameser resolv @PORT_INCLUDE@
diff --git a/contrib/bind9/lib/bind/api b/contrib/bind9/lib/bind/api
index acc853b..dcc846e 100644
--- a/contrib/bind9/lib/bind/api
+++ b/contrib/bind9/lib/bind/api
@@ -1,3 +1,3 @@
-LIBINTERFACE = 3
-LIBREVISION = 8
+LIBINTERFACE = 4
+LIBREVISION = 2
LIBAGE = 0
diff --git a/contrib/bind9/lib/bind/config.h.in b/contrib/bind9/lib/bind/config.h.in
index 6c86b4d..82a1560 100644
--- a/contrib/bind9/lib/bind/config.h.in
+++ b/contrib/bind9/lib/bind/config.h.in
@@ -1,6 +1,8 @@
#undef _SOCKADDR_LEN
#undef HAVE_FCNTL_H
#undef HAVE_PATHS_H
+#undef HAVE_INTTYPES_H
+#undef HAVE_STROPTS_H
#undef HAVE_SYS_TIMERS_H
#undef SYS_CDEFS_H
#undef _POSIX_PTHREAD_SEMANTICS
@@ -35,6 +37,8 @@
#undef HAS_PW_CLASS
+#undef uintptr_t
+
/* Shut up warnings about sputaux in stdio.h on BSD/OS pre-4.1 */
#undef SHUTUP_SPUTAUX
#ifdef SHUTUP_SPUTAUX
diff --git a/contrib/bind9/lib/bind/configure b/contrib/bind9/lib/bind/configure
index 1baa91e..8f12621 100755
--- a/contrib/bind9/lib/bind/configure
+++ b/contrib/bind9/lib/bind/configure
@@ -1,5 +1,5 @@
#! /bin/sh
-# From configure.in Revision: 1.83.2.5.2.10 .
+# From configure.in Revision: 1.83.2.5.2.22 .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.59.
#
@@ -464,7 +464,7 @@ ac_includes_default="\
# include <unistd.h>
#endif"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os SET_MAKE RANLIB ac_ct_RANLIB INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA STD_CINCLUDES STD_CDEFINES STD_CWARNINGS CCOPT AR ARFLAGS LN ETAGS PERL CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP ISC_PLATFORM_NEEDSYSSELECTH WANT_IRS_GR WANT_IRS_GR_OBJS WANT_IRS_PW WANT_IRS_PW_OBJS WANT_IRS_NIS WANT_IRS_NIS_OBJS WANT_IRS_NISGR_OBJS WANT_IRS_NISPW_OBJS WANT_IRS_DBPW_OBJS ALWAYS_DEFINES DO_PTHREADS WANT_IRS_THREADSGR_OBJS WANT_IRS_THREADSPW_OBJS WANT_IRS_THREADS_OBJS WANT_THREADS_OBJS USE_IFNAMELINKID ISC_THREAD_DIR DAEMON_OBJS NEED_DAEMON STRSEP_OBJS NEED_STRSEP NEED_STRERROR MKDEPCC MKDEPCFLAGS MKDEPPROG IRIX_DNSSEC_WARNINGS_HACK purify_path PURIFY LN_S ECHO ac_ct_AR STRIP ac_ct_STRIP CXX CXXFLAGS ac_ct_CXX CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL O A SA LIBTOOL_MKDEP_SED LIBTOOL_MODE_COMPILE LIBTOOL_MODE_INSTALL LIBTOOL_MODE_LINK HAS_INET6_STRUCTS ISC_PLATFORM_NEEDNETINETIN6H ISC_PLATFORM_NEEDNETINET6IN6H HAS_IN_ADDR6 NEED_IN6ADDR_ANY ISC_PLATFORM_HAVEIN6PKTINFO ISC_PLATFORM_FIXIN6ISADDR ISC_IPV6_H ISC_IPV6_O ISC_ISCIPV6_O ISC_IPV6_C HAVE_SIN6_SCOPE_ID HAVE_SOCKADDR_STORAGE ISC_PLATFORM_NEEDNTOP ISC_PLATFORM_NEEDPTON ISC_PLATFORM_NEEDATON HAVE_SA_LEN HAVE_MINIMUM_IFREQ BSD_COMP SOLARIS_BITTYPES USE_FIONBIO_IOCTL PORT_DIR PORT_INCLUDE ISC_PLATFORM_MSGHDRFLAVOR ISC_PLATFORM_NEEDPORTT ISC_LWRES_ENDHOSTENTINT ISC_LWRES_SETNETENTINT ISC_LWRES_ENDNETENTINT ISC_LWRES_GETHOSTBYADDRVOID ISC_LWRES_NEEDHERRNO ISC_LWRES_GETIPNODEPROTO ISC_LWRES_GETADDRINFOPROTO ISC_LWRES_GETNAMEINFOPROTO NEED_PSELECT NEED_GETTIMEOFDAY HAVE_STRNDUP ISC_PLATFORM_NEEDSTRSEP ISC_PLATFORM_NEEDVSNPRINTF ISC_EXTRA_OBJS ISC_EXTRA_SRCS USE_SYSERROR_LIST ISC_PLATFORM_QUADFORMAT ISC_SOCKLEN_T GETGROUPLIST_ARGS NET_R_ARGS NET_R_BAD NET_R_COPY NET_R_COPY_ARGS NET_R_OK NET_R_SETANSWER NET_R_RETURN GETNETBYADDR_ADDR_T NETENT_DATA NET_R_ENT_ARGS NET_R_SET_RESULT NET_R_SET_RETURN NET_R_END_RESULT NET_R_END_RETURN GROUP_R_ARGS GROUP_R_BAD GROUP_R_OK GROUP_R_RETURN GROUP_R_END_RESULT GROUP_R_END_RETURN GROUP_R_ENT_ARGS GROUP_R_SET_RESULT GROUP_R_SET_RETURN HOST_R_ARGS HOST_R_BAD HOST_R_COPY HOST_R_COPY_ARGS HOST_R_ERRNO HOST_R_OK HOST_R_RETURN HOST_R_SETANSWER HOSTENT_DATA HOST_R_END_RESULT HOST_R_END_RETURN HOST_R_ENT_ARGS HOST_R_SET_RESULT HOST_R_SET_RETURN SETPWENT_VOID SETGRENT_VOID NGR_R_ARGS NGR_R_BAD NGR_R_COPY NGR_R_COPY_ARGS NGR_R_OK NGR_R_RETURN NGR_R_PRIVATE NGR_R_END_RESULT NGR_R_END_RETURN NGR_R_ENT_ARGS NGR_R_SET_RESULT NGR_R_SET_RETURN PROTO_R_ARGS PROTO_R_BAD PROTO_R_COPY PROTO_R_COPY_ARGS PROTO_R_OK PROTO_R_SETANSWER PROTO_R_RETURN PROTO_R_END_RESULT PROTO_R_END_RETURN PROTO_R_ENT_ARGS PROTO_R_SET_RESULT PROTO_R_SET_RETURN PASS_R_ARGS PASS_R_BAD PASS_R_COPY PASS_R_COPY_ARGS PASS_R_OK PASS_R_RETURN PASS_R_END_RESULT PASS_R_END_RETURN PASS_R_ENT_ARGS PASS_R_SET_RESULT PASS_R_SET_RETURN SERV_R_ARGS SERV_R_BAD SERV_R_COPY SERV_R_COPY_ARGS SERV_R_OK SERV_R_SETANSWER SERV_R_RETURN SERV_R_END_RESULT SERV_R_END_RETURN SERV_R_ENT_ARGS SERV_R_SET_RESULT SERV_R_SET_RETURN SETNETGRENT_ARGS INNETGR_ARGS BIND9_TOP_BUILDDIR BIND9_VERSION LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os SET_MAKE RANLIB ac_ct_RANLIB INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA STD_CINCLUDES STD_CDEFINES STD_CWARNINGS CCOPT AR ARFLAGS LN ETAGS PERL CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP ISC_PLATFORM_NEEDSYSSELECTH WANT_IRS_GR WANT_IRS_GR_OBJS WANT_IRS_PW WANT_IRS_PW_OBJS WANT_IRS_NIS WANT_IRS_NIS_OBJS WANT_IRS_NISGR_OBJS WANT_IRS_NISPW_OBJS WANT_IRS_DBPW_OBJS ALWAYS_DEFINES DO_PTHREADS WANT_IRS_THREADSGR_OBJS WANT_IRS_THREADSPW_OBJS WANT_IRS_THREADS_OBJS WANT_THREADS_OBJS USE_IFNAMELINKID ISC_THREAD_DIR DAEMON_OBJS NEED_DAEMON STRSEP_OBJS NEED_STRSEP NEED_STRERROR MKDEPCC MKDEPCFLAGS MKDEPPROG IRIX_DNSSEC_WARNINGS_HACK purify_path PURIFY LN_S ECHO ac_ct_AR STRIP ac_ct_STRIP CXX CXXFLAGS ac_ct_CXX CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL O A SA LIBTOOL_MKDEP_SED LIBTOOL_MODE_COMPILE LIBTOOL_MODE_INSTALL LIBTOOL_MODE_LINK HAS_INET6_STRUCTS ISC_PLATFORM_NEEDNETINETIN6H ISC_PLATFORM_NEEDNETINET6IN6H HAS_IN_ADDR6 NEED_IN6ADDR_ANY ISC_PLATFORM_HAVEIN6PKTINFO ISC_PLATFORM_FIXIN6ISADDR ISC_IPV6_H ISC_IPV6_O ISC_ISCIPV6_O ISC_IPV6_C HAVE_SIN6_SCOPE_ID HAVE_SOCKADDR_STORAGE ISC_PLATFORM_NEEDNTOP ISC_PLATFORM_NEEDPTON ISC_PLATFORM_NEEDATON HAVE_SA_LEN HAVE_MINIMUM_IFREQ BSD_COMP SOLARIS_BITTYPES USE_FIONBIO_IOCTL PORT_NONBLOCK PORT_DIR USE_POLL HAVE_MD5 SOLARIS2 PORT_INCLUDE ISC_PLATFORM_MSGHDRFLAVOR ISC_PLATFORM_NEEDPORTT ISC_LWRES_ENDHOSTENTINT ISC_LWRES_SETNETENTINT ISC_LWRES_ENDNETENTINT ISC_LWRES_GETHOSTBYADDRVOID ISC_LWRES_NEEDHERRNO ISC_LWRES_GETIPNODEPROTO ISC_LWRES_GETADDRINFOPROTO ISC_LWRES_GETNAMEINFOPROTO NEED_PSELECT NEED_GETTIMEOFDAY HAVE_STRNDUP ISC_PLATFORM_NEEDSTRSEP ISC_PLATFORM_NEEDVSNPRINTF ISC_EXTRA_OBJS ISC_EXTRA_SRCS USE_SYSERROR_LIST ISC_PLATFORM_QUADFORMAT ISC_SOCKLEN_T GETGROUPLIST_ARGS NET_R_ARGS NET_R_BAD NET_R_COPY NET_R_COPY_ARGS NET_R_OK NET_R_SETANSWER NET_R_RETURN GETNETBYADDR_ADDR_T NETENT_DATA NET_R_ENT_ARGS NET_R_SET_RESULT NET_R_SET_RETURN NET_R_END_RESULT NET_R_END_RETURN GROUP_R_ARGS GROUP_R_BAD GROUP_R_OK GROUP_R_RETURN GROUP_R_END_RESULT GROUP_R_END_RETURN GROUP_R_ENT_ARGS GROUP_R_SET_RESULT GROUP_R_SET_RETURN HOST_R_ARGS HOST_R_BAD HOST_R_COPY HOST_R_COPY_ARGS HOST_R_ERRNO HOST_R_OK HOST_R_RETURN HOST_R_SETANSWER HOSTENT_DATA HOST_R_END_RESULT HOST_R_END_RETURN HOST_R_ENT_ARGS HOST_R_SET_RESULT HOST_R_SET_RETURN SETPWENT_VOID SETGRENT_VOID NGR_R_ARGS NGR_R_BAD NGR_R_COPY NGR_R_COPY_ARGS NGR_R_OK NGR_R_RETURN NGR_R_PRIVATE NGR_R_END_RESULT NGR_R_END_RETURN NGR_R_ENT_ARGS NGR_R_SET_RESULT NGR_R_SET_RETURN PROTO_R_ARGS PROTO_R_BAD PROTO_R_COPY PROTO_R_COPY_ARGS PROTO_R_OK PROTO_R_SETANSWER PROTO_R_RETURN PROTO_R_END_RESULT PROTO_R_END_RETURN PROTO_R_ENT_ARGS PROTO_R_SET_RESULT PROTO_R_SET_RETURN PASS_R_ARGS PASS_R_BAD PASS_R_COPY PASS_R_COPY_ARGS PASS_R_OK PASS_R_RETURN PASS_R_END_RESULT PASS_R_END_RETURN PASS_R_ENT_ARGS PASS_R_SET_RESULT PASS_R_SET_RETURN SERV_R_ARGS SERV_R_BAD SERV_R_COPY SERV_R_COPY_ARGS SERV_R_OK SERV_R_SETANSWER SERV_R_RETURN SERV_R_END_RESULT SERV_R_END_RETURN SERV_R_ENT_ARGS SERV_R_SET_RESULT SERV_R_SET_RETURN SETNETGRENT_ARGS INNETGR_ARGS BIND9_TOP_BUILDDIR BIND9_VERSION LIBOBJS LTLIBOBJS'
ac_subst_files='BIND9_INCLUDES BIND9_MAKE_RULES LIBBIND_API'
# Initialize some variables set by options.
@@ -1019,7 +1019,7 @@ if test -n "$ac_init_help"; then
Optional Features:
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --disable-threads disable multithreading
+ --enable-threads enable multithreading
--enable-shared[=PKGS]
build shared libraries [default=yes]
--enable-static[=PKGS]
@@ -3472,7 +3472,8 @@ done
-for ac_header in fcntl.h db.h paths.h sys/time.h unistd.h sys/sockio.h sys/select.h sys/timers.h
+
+for ac_header in fcntl.h db.h paths.h sys/time.h unistd.h sys/sockio.h sys/select.h sys/timers.h stropts.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if eval "test \"\${$as_ac_Header+set}\" = set"; then
@@ -3622,7 +3623,6 @@ fi
done
-
echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
if test "${ac_cv_c_const+set}" = set; then
@@ -3867,6 +3867,72 @@ _ACEOF
fi
+echo "$as_me:$LINENO: checking for uintptr_t" >&5
+echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
+if test "${ac_cv_type_uintptr_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if ((uintptr_t *) 0)
+ return 0;
+if (sizeof (uintptr_t))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_type_uintptr_t=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type_uintptr_t=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
+echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
+if test $ac_cv_type_uintptr_t = yes; then
+ :
+else
+
+cat >>confdefs.h <<_ACEOF
+#define uintptr_t unsigned long
+_ACEOF
+
+fi
+
echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
if test "${ac_cv_header_time+set}" = set; then
@@ -4435,24 +4501,81 @@ esac
#
# First, decide whether to use multithreading or not.
#
-echo "$as_me:$LINENO: checking whether to look for thread support" >&5
-echo $ECHO_N "checking whether to look for thread support... $ECHO_C" >&6
+# Enable multithreading by default on systems where it is known
+# to work well, and where debugging of multithreaded programs
+# is supported.
+#
+
+echo "$as_me:$LINENO: checking whether to build with thread support" >&5
+echo $ECHO_N "checking whether to build with thread support... $ECHO_C" >&6
+
+case $host in
+*-dec-osf*)
+ use_threads=true ;;
+*-solaris2.[0-6])
+ # Thread signals are broken on Solaris 2.6; they are sometimes
+ # delivered to the wrong thread.
+ use_threads=false ;;
+*-solaris*)
+ use_threads=true ;;
+*-ibm-aix*)
+ use_threads=true ;;
+*-hp-hpux10*)
+ use_threads=false ;;
+*-hp-hpux11*)
+ use_threads=true ;;
+*-sgi-irix*)
+ use_threads=true ;;
+*-sco-sysv*uw*|*-*-sysv*UnixWare*)
+ # UnixWare
+ use_threads=false ;;
+*-*-sysv*OpenUNIX*)
+ # UnixWare
+ use_threads=true ;;
+*-netbsd*)
+ if test -r /usr/lib/libpthread.so ; then
+ use_threads=true
+ else
+ # Socket I/O optimizations introduced in 9.2 expose a
+ # bug in unproven-pthreads; see PR #12650
+ use_threads=false
+ fi
+ ;;
+*-openbsd*)
+ # OpenBSD users have reported that named dumps core on
+ # startup when built with threads.
+ use_threads=false ;;
+*-freebsd*)
+ use_threads=false ;;
+*-bsdi234*)
+ # Thread signals do not work reliably on some versions of BSD/OS.
+ use_threads=false ;;
+*-bsdi5*)
+ use_threads=true ;;
+*-linux*)
+ # Threads are disabled on Linux by default because most
+ # Linux kernels produce unusable core dumps from multithreaded
+ # programs, and because of limitations in setuid().
+ use_threads=false ;;
+*)
+ use_threads=false ;;
+esac
+
# Check whether --enable-threads or --disable-threads was given.
if test "${enable_threads+set}" = set; then
enableval="$enable_threads"
fi;
case "$enable_threads" in
- yes|'')
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
+ yes)
use_threads=true
;;
no)
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
use_threads=false
;;
+ '')
+ # Use system-dependent default
+ ;;
*)
{ { echo "$as_me:$LINENO: error: --enable-threads takes yes or no" >&5
echo "$as_me: error: --enable-threads takes yes or no" >&2;}
@@ -4462,6 +4585,15 @@ esac
if $use_threads
then
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+if $use_threads
+then
#
# Search for / configure pthreads in a system-dependent fashion.
#
@@ -4497,23 +4629,32 @@ echo "${ECHO_T}PTL2" >&6
echo "$as_me: WARNING: linking with PTL2 is highly experimental and not expected to work" >&2;}
CC=ptlgcc
else
- if test ! -d $LOCALBASE/pthreads
+ if test -r /usr/lib/libpthread.so
then
- echo "$as_me:$LINENO: result: none" >&5
+ echo "$as_me:$LINENO: result: native" >&5
+echo "${ECHO_T}native" >&6
+ LIBS="-lpthread $LIBS"
+ else
+ if test ! -d $LOCALBASE/pthreads
+ then
+ echo "$as_me:$LINENO: result: none" >&5
echo "${ECHO_T}none" >&6
- use_threads=false
- fi
+ { { echo "$as_me:$LINENO: error: \"could not find thread libraries\"" >&5
+echo "$as_me: error: \"could not find thread libraries\"" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
- if $use_threads
- then
- echo "$as_me:$LINENO: result: mit-pthreads/unproven-pthreads" >&5
+ if $use_threads
+ then
+ echo "$as_me:$LINENO: result: mit-pthreads/unproven-pthreads" >&5
echo "${ECHO_T}mit-pthreads/unproven-pthreads" >&6
- pkg="$LOCALBASE/pthreads"
- lib1="-L$pkg/lib -Wl,-R$pkg/lib"
- lib2="-lpthread -lm -lgcc -lpthread"
- LIBS="$lib1 $lib2 $LIBS"
- CPPFLAGS="$CPPFLAGS -I$pkg/include"
- STD_CINCLUDES="$STD_CINCLUDES -I$pkg/include"
+ pkg="$LOCALBASE/pthreads"
+ lib1="-L$pkg/lib -Wl,-R$pkg/lib"
+ lib2="-lpthread -lm -lgcc -lpthread"
+ LIBS="$lib1 $lib2 $LIBS"
+ CPPFLAGS="$CPPFLAGS -I$pkg/include"
+ STD_CINCLUDES="$STD_CINCLUDES -I$pkg/include"
+ fi
fi
fi
;;
@@ -4883,7 +5024,9 @@ _ACEOF
LIBS="-lc $LIBS"
else
- use_threads=false
+ { { echo "$as_me:$LINENO: error: \"could not find thread libraries\"" >&5
+echo "$as_me: error: \"could not find thread libraries\"" >&2;}
+ { (exit 1); exit 1; }; }
fi
fi
@@ -5444,6 +5587,10 @@ _ACEOF
;;
*hpux11*)
cat >>confdefs.h <<\_ACEOF
+#define NEED_ENDNETGRENT_R 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
#define _PTHREADS_DRAFT4 1
_ACEOF
@@ -5597,11 +5744,20 @@ fi
;;
esac
fi
+ cat >>confdefs.h <<\_ACEOF
+#define _REENTRANT 1
+_ACEOF
+
ALWAYS_DEFINES="-D_REENTRANT"
DO_PTHREADS="#define DO_PTHREADS 1"
WANT_IRS_THREADSGR_OBJS="\${WANT_IRS_THREADSGR_OBJS}"
WANT_IRS_THREADSPW_OBJS="\${WANT_IRS_THREADSPW_OBJS}"
- WANT_IRS_THREADS_OBJS="\${WANT_IRS_THREADS_OBJS}"
+ case $host in
+ ia64-hp-hpux11.*)
+ WANT_IRS_THREADS_OBJS="";;
+ *)
+ WANT_IRS_THREADS_OBJS="\${WANT_IRS_THREADS_OBJS}";;
+ esac
WANT_THREADS_OBJS="\${WANT_THREADS_OBJS}"
thread_dir=pthreads
else
@@ -5614,6 +5770,13 @@ else
thread_dir=nothreads
fi
+
+
+
+
+
+
+
echo "$as_me:$LINENO: checking for strlcat" >&5
echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
if test "${ac_cv_func_strlcat+set}" = set; then
@@ -5712,13 +5875,6 @@ _ACEOF
fi
-
-
-
-
-
-
-
echo "$as_me:$LINENO: checking for if_nametoindex" >&5
echo $ECHO_N "checking for if_nametoindex... $ECHO_C" >&6
if test "${ac_cv_func_if_nametoindex+set}" = set; then
@@ -6267,7 +6423,7 @@ else
;;
*)
# Turn off the pointlessly noisy warnings.
- STD_CWARNINGS="+w1 +W 474,530"
+ STD_CWARNINGS="+w1 +W 474,530,2193,2236"
;;
esac
CCOPT="$CCOPT -Ae -z"
@@ -6424,6 +6580,156 @@ fi
case "$host" in
mips-sgi-irix*)
;;
+ ia64-hp-hpux11.*)
+
+echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
+echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
+if test "${ac_cv_lib_socket_socket+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsocket $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char socket ();
+int
+main ()
+{
+socket ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_socket_socket=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_socket_socket=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
+echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
+if test $ac_cv_lib_socket_socket = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBSOCKET 1
+_ACEOF
+
+ LIBS="-lsocket $LIBS"
+
+fi
+
+
+echo "$as_me:$LINENO: checking for inet_ntoa in -lnsl" >&5
+echo $ECHO_N "checking for inet_ntoa in -lnsl... $ECHO_C" >&6
+if test "${ac_cv_lib_nsl_inet_ntoa+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lnsl $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char inet_ntoa ();
+int
+main ()
+{
+inet_ntoa ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_nsl_inet_ntoa=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_nsl_inet_ntoa=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_inet_ntoa" >&5
+echo "${ECHO_T}$ac_cv_lib_nsl_inet_ntoa" >&6
+if test $ac_cv_lib_nsl_inet_ntoa = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBNSL 1
+_ACEOF
+
+ LIBS="-lnsl $LIBS"
+
+fi
+
+ ;;
*)
echo "$as_me:$LINENO: checking for gethostbyname_r in -ld4r" >&5
@@ -7296,7 +7602,7 @@ ia64-*-hpux*)
;;
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 7299 "configure"' > conftest.$ac_ext
+ echo '#line 7605 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -8293,7 +8599,7 @@ fi
# Provide some information about the compiler.
-echo "$as_me:8296:" \
+echo "$as_me:8602:" \
"checking for Fortran 77 compiler version" >&5
ac_compiler=`set X $ac_compile; echo $2`
{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
@@ -9354,11 +9660,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:9357: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:9663: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:9361: \$? = $ac_status" >&5
+ echo "$as_me:9667: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
@@ -9597,11 +9903,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:9600: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:9906: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:9604: \$? = $ac_status" >&5
+ echo "$as_me:9910: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
@@ -9657,11 +9963,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:9660: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:9966: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:9664: \$? = $ac_status" >&5
+ echo "$as_me:9970: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -11842,7 +12148,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 11845 "configure"
+#line 12151 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11940,7 +12246,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 11943 "configure"
+#line 12249 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -14137,11 +14443,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:14140: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:14446: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:14144: \$? = $ac_status" >&5
+ echo "$as_me:14450: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
@@ -14197,11 +14503,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:14200: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:14506: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:14204: \$? = $ac_status" >&5
+ echo "$as_me:14510: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -15558,7 +15864,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 15561 "configure"
+#line 15867 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -15656,7 +15962,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 15659 "configure"
+#line 15965 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -16493,11 +16799,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:16496: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:16802: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:16500: \$? = $ac_status" >&5
+ echo "$as_me:16806: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
@@ -16553,11 +16859,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:16556: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:16862: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:16560: \$? = $ac_status" >&5
+ echo "$as_me:16866: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -18592,11 +18898,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:18595: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:18901: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:18599: \$? = $ac_status" >&5
+ echo "$as_me:18905: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
@@ -18835,11 +19141,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:18838: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:19144: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:18842: \$? = $ac_status" >&5
+ echo "$as_me:19148: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
@@ -18895,11 +19201,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:18898: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:19204: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:18902: \$? = $ac_status" >&5
+ echo "$as_me:19208: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -21080,7 +21386,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 21083 "configure"
+#line 21389 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -21178,7 +21484,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 21181 "configure"
+#line 21487 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -23007,6 +23313,10 @@ PORT_DIR=port/unknown
SOLARIS_BITTYPES="#undef NEED_SOLARIS_BITTYPES"
BSD_COMP="#undef BSD_COMP"
USE_FIONBIO_IOCTL="#undef USE_FIONBIO_IOCTL"
+PORT_NONBLOCK="#define PORT_NONBLOCK O_NONBLOCK"
+HAVE_MD5="#undef HAVE_MD5"
+USE_POLL="#undef HAVE_POLL"
+SOLARIS2="#undef SOLARIS2"
case "$host" in
*aix3.2*) PORT_DIR="port/aix32";;
*aix4*) PORT_DIR="port/aix4";;
@@ -23014,7 +23324,9 @@ case "$host" in
*aux3*) PORT_DIR="port/aux3";;
*-bsdi2*) PORT_DIR="port/bsdos2";;
*-bsdi*) PORT_DIR="port/bsdos";;
- *-cygwin*) PORT_DIR="port/cygwin";;
+ *-cygwin*)
+ PORT_NONBLOCK="#define PORT_NONBLOCK O_NDELAY"
+ PORT_DIR="port/cygwin";;
*-darwin*) PORT_DIR="port/darwin";;
*-osf*) PORT_DIR="port/decunix";;
*-freebsd*) PORT_DIR="port/freebsd";;
@@ -23030,16 +23342,28 @@ case "$host" in
*-openbsd*) PORT_DIR="port/openbsd";;
*-qnx*) PORT_DIR="port/qnx";;
*-rhapsody*) PORT_DIR="port/rhapsody";;
- *-solaris2.[01234]*)
+ *-sunos4*)
+ PORT_NONBLOCK="#define PORT_NONBLOCK O_NDELAY"
+ PORT_DIR="port/sunos";;
+ *-solaris2.[01234])
BSD_COMP="#define BSD_COMP 1"
SOLARIS_BITTYPES="#define NEED_SOLARIS_BITTYPES 1"
USE_FIONBIO_IOCTL="#define USE_FIONBIO_IOCTL 1"
+ SOLARIS2="#define SOLARIS2 1"
PORT_DIR="port/solaris";;
- *-solaris2.5*)
+ *-solaris2.5)
BSD_COMP="#define BSD_COMP 1"
SOLARIS_BITTYPES="#define NEED_SOLARIS_BITTYPES 1"
+ SOLARIS2="#define SOLARIS2 1"
+ PORT_DIR="port/solaris";;
+ *-solaris2.[67])
+ BSD_COMP="#define BSD_COMP 1"
+ SOLARIS2="#define SOLARIS2 1"
PORT_DIR="port/solaris";;
*-solaris2*) BSD_COMP="#define BSD_COMP 1"
+ USE_POLL="#define USE_POLL 1"
+ HAVE_MD5="#define HAVE_MD5 1"
+ SOLARIS2="#define SOLARIS2 1"
PORT_DIR="port/solaris";;
*-ultrix*) PORT_DIR="port/ultrix";;
*-sco-sysv*uw2.0*) PORT_DIR="port/unixware20";;
@@ -23050,10 +23374,14 @@ esac
-PORT_INCLUDE=${PORT_DIR}/include
+
+
+PORT_INCLUDE=${PORT_DIR}/include
+
+
#
# Look for a 4.4BSD or 4.3BSD struct msghdr
#
@@ -25188,6 +25516,10 @@ _ACEOF
fi
+case $host in
+ia64-hp-hpux11.*)
+;;
+*)
echo "$as_me:$LINENO: checking for getnetbyaddr_r" >&5
echo $ECHO_N "checking for getnetbyaddr_r... $ECHO_C" >&6
if test "${ac_cv_func_getnetbyaddr_r+set}" = set; then
@@ -25518,6 +25850,66 @@ else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#undef __USE_MISC
+#define __USE_MISC
+#include <netdb.h>
+int getnetbyaddr_r (uint32_t, int, struct netent *,
+ char *, size_t, struct netent **, int *);
+
+int
+main ()
+{
+return (0)
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+
+NET_R_ARGS="#define NET_R_ARGS char *buf, size_t buflen, struct netent **answerp, int *h_errnop"
+NET_R_BAD="#define NET_R_BAD ERANGE"
+NET_R_COPY="#define NET_R_COPY buf, buflen"
+NET_R_COPY_ARGS="#define NET_R_COPY_ARGS char *buf, size_t buflen"
+NET_R_OK="#define NET_R_OK 0"
+NET_R_SETANSWER="#define NET_R_SETANSWER 1"
+NET_R_RETURN="#define NET_R_RETURN int"
+GETNETBYADDR_ADDR_T="#define GETNETBYADDR_ADDR_T unsigned long int"
+NETENT_DATA="#undef NETENT_DATA"
+
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
@@ -25543,6 +25935,8 @@ NETENT_DATA="#undef NETENT_DATA"
fi
+esac
+
case "$host" in
*dec-osf*) GETNETBYADDR_ADDR_T="#define GETNETBYADDR_ADDR_T int" ;;
esac
@@ -25767,6 +26161,11 @@ fi
+
+case $host in
+ia64-hp-hpux11.*)
+;;
+*)
echo "$as_me:$LINENO: checking for endnetent_r" >&5
echo $ECHO_N "checking for endnetent_r... $ECHO_C" >&6
if test "${ac_cv_func_endnetent_r+set}" = set; then
@@ -26029,6 +26428,7 @@ NET_R_END_RETURN="#define NET_R_END_RETURN void"
fi
+esac
@@ -26606,6 +27006,10 @@ fi
+case $host in
+ia64-hp-hpux11.*)
+;;
+*)
echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
if test "${ac_cv_func_gethostbyname_r+set}" = set; then
@@ -26805,7 +27209,7 @@ HOST_R_ARGS="#define HOST_R_ARGS struct hostent_data *hdptr"
HOST_R_BAD="#define HOST_R_BAD (-1)"
HOST_R_COPY="#define HOST_R_COPY hdptr"
HOST_R_COPY_ARGS="#define HOST_R_COPY_ARGS HOST_R_ARGS"
-HOST_R_ERRNO="#define HOST_R_ERRNO NULL"
+HOST_R_ERRNO="#undef HOST_R_ERRNO"
HOST_R_OK="#define HOST_R_OK 0"
HOST_R_RETURN="#define HOST_R_RETURN int"
HOST_R_SETANSWER="#undef HOST_R_SETANSWER"
@@ -26896,6 +27300,7 @@ HOSTENT_DATA="#undef HOSTENT_DATA"
fi
+esac
@@ -26906,6 +27311,10 @@ fi
+case $host in
+ia64-hp-hpux11.*)
+;;
+*)
echo "$as_me:$LINENO: checking for endhostent_r" >&5
echo $ECHO_N "checking for endhostent_r... $ECHO_C" >&6
if test "${ac_cv_func_endhostent_r+set}" = set; then
@@ -27171,10 +27580,15 @@ HOST_R_ENT_ARGS="#undef HOST_R_ENT_ARGS /*empty*/"
fi
+esac;
+case $host in
+ia64-hp-hpux11.*)
+;;
+*)
echo "$as_me:$LINENO: checking for sethostent_r" >&5
echo $ECHO_N "checking for sethostent_r... $ECHO_C" >&6
if test "${ac_cv_func_sethostent_r+set}" = set; then
@@ -27428,6 +27842,7 @@ HOST_R_SET_RETURN="#define HOST_R_SET_RETURN void"
fi
+esac
@@ -27599,6 +28014,10 @@ fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+case $host in
+ia64-hp-hpux11.*)
+;;
+*)
echo "$as_me:$LINENO: checking for getnetgrent_r" >&5
echo $ECHO_N "checking for getnetgrent_r... $ECHO_C" >&6
if test "${ac_cv_func_getnetgrent_r+set}" = set; then
@@ -27878,6 +28297,7 @@ NGR_R_RETURN="#define NGR_R_RETURN int"
fi
+esac
@@ -28209,6 +28629,10 @@ _ACEOF
fi
+case $host in
+ia64-hp-hpux11.*)
+;;
+*)
echo "$as_me:$LINENO: checking for getprotoent_r" >&5
echo $ECHO_N "checking for getprotoent_r... $ECHO_C" >&6
if test "${ac_cv_func_getprotoent_r+set}" = set; then
@@ -28435,6 +28859,7 @@ PROTO_R_RETURN="#define PROTO_R_RETURN struct protoent *"
fi
+esac
@@ -28443,6 +28868,10 @@ fi
+case $host in
+ia64-hp-hpux11.*)
+;;
+*)
echo "$as_me:$LINENO: checking for endprotoent_r" >&5
echo $ECHO_N "checking for endprotoent_r... $ECHO_C" >&6
if test "${ac_cv_func_endprotoent_r+set}" = set; then
@@ -28599,10 +29028,15 @@ PROTO_R_ENT_ARGS="#undef PROTO_R_ENT_ARGS /*empty*/"
fi
+esac
+case $host in
+ia64-hp-hpux11.*)
+;;
+*)
echo "$as_me:$LINENO: checking for setprotoent_r" >&5
echo $ECHO_N "checking for setprotoent_r... $ECHO_C" >&6
if test "${ac_cv_func_setprotoent_r+set}" = set; then
@@ -28754,6 +29188,7 @@ PROTO_R_SET_RETURN="#define PROTO_R_SET_RETURN void"
fi
+esac
@@ -29685,6 +30120,10 @@ _ACEOF
fi
+case $host in
+ia64-hp-hpux11.*)
+;;
+*)
echo "$as_me:$LINENO: checking for getservent_r" >&5
echo $ECHO_N "checking for getservent_r... $ECHO_C" >&6
if test "${ac_cv_func_getservent_r+set}" = set; then
@@ -29907,6 +30346,7 @@ SERV_R_RETURN="#define SERV_R_RETURN struct servent *"
fi
+esac
@@ -29915,6 +30355,10 @@ fi
+case $host in
+ia64-hp-hpux11.*)
+;;
+*)
echo "$as_me:$LINENO: checking for endservent_r" >&5
echo $ECHO_N "checking for endservent_r... $ECHO_C" >&6
if test "${ac_cv_func_endservent_r+set}" = set; then
@@ -30071,10 +30515,15 @@ SERV_R_ENT_ARGS="#undef SERV_R_ENT_ARGS /*empty*/"
fi
+esac
+case $host in
+ia64-hp-hpux11.*)
+;;
+*)
echo "$as_me:$LINENO: checking for setservent_r" >&5
echo $ECHO_N "checking for setservent_r... $ECHO_C" >&6
if test "${ac_cv_func_setservent_r+set}" = set; then
@@ -30229,6 +30678,7 @@ SERV_R_SET_RETURN="#define SERV_R_SET_RETURN void"
fi
+esac
@@ -30489,7 +30939,6 @@ case "$host" in
hack_shutup_in6addr_init_macros=yes
;;
*-solaris2.8)
- hack_shutup_pthreadmutexinit=yes
hack_shutup_in6addr_init_macros=yes
;;
*-solaris2.9)
@@ -31304,7 +31753,11 @@ s,@HAVE_MINIMUM_IFREQ@,$HAVE_MINIMUM_IFREQ,;t t
s,@BSD_COMP@,$BSD_COMP,;t t
s,@SOLARIS_BITTYPES@,$SOLARIS_BITTYPES,;t t
s,@USE_FIONBIO_IOCTL@,$USE_FIONBIO_IOCTL,;t t
+s,@PORT_NONBLOCK@,$PORT_NONBLOCK,;t t
s,@PORT_DIR@,$PORT_DIR,;t t
+s,@USE_POLL@,$USE_POLL,;t t
+s,@HAVE_MD5@,$HAVE_MD5,;t t
+s,@SOLARIS2@,$SOLARIS2,;t t
s,@PORT_INCLUDE@,$PORT_INCLUDE,;t t
s,@ISC_PLATFORM_MSGHDRFLAVOR@,$ISC_PLATFORM_MSGHDRFLAVOR,;t t
s,@ISC_PLATFORM_NEEDPORTT@,$ISC_PLATFORM_NEEDPORTT,;t t
diff --git a/contrib/bind9/lib/bind/configure.in b/contrib/bind9/lib/bind/configure.in
index 74c1870..50ffe82 100644
--- a/contrib/bind9/lib/bind/configure.in
+++ b/contrib/bind9/lib/bind/configure.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
# Copyright (C) 2001 Internet Software Consortium.
#
# Permission to use, copy, modify, and distribute this software for any
@@ -13,7 +13,7 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
-AC_REVISION($Revision: 1.83.2.5.2.10 $)
+AC_REVISION($Revision: 1.83.2.5.2.22 $)
AC_INIT(resolv/herror.c)
AC_PREREQ(2.13)
@@ -169,12 +169,12 @@ AC_PROG_CC
AC_HEADER_STDC
-AC_CHECK_HEADERS(fcntl.h db.h paths.h sys/time.h unistd.h sys/sockio.h sys/select.h sys/timers.h)
-
+AC_CHECK_HEADERS(fcntl.h db.h paths.h sys/time.h unistd.h sys/sockio.h sys/select.h sys/timers.h stropts.h)
AC_C_CONST
AC_C_INLINE
AC_TYPE_SIZE_T
+AC_CHECK_TYPE(uintptr_t,unsigned long)
AC_HEADER_TIME
#
# check if we need to #include sys/select.h explicitly
@@ -315,86 +315,7 @@ case "$use_randomdev" in
;;
esac
-#
-# Begin pthreads checking.
-#
-# First, decide whether to use multithreading or not.
-#
-AC_MSG_CHECKING(whether to look for thread support)
-AC_ARG_ENABLE(threads,
- [ --disable-threads disable multithreading])
-case "$enable_threads" in
- yes|'')
- AC_MSG_RESULT(yes)
- use_threads=true
- ;;
- no)
- AC_MSG_RESULT(no)
- use_threads=false
- ;;
- *)
- AC_MSG_ERROR([--enable-threads takes yes or no])
- ;;
-esac
-
-if $use_threads
-then
- #
- # Search for / configure pthreads in a system-dependent fashion.
- #
- case "$host" in
- *-netbsd*)
- # NetBSD has multiple pthreads implementations. The
- # recommended one to use is "unproven-pthreads". The
- # older "mit-pthreads" may also work on some NetBSD
- # versions. The PTL2 thread library does not
- # currently work with bind9, but can be chosen with
- # the --with-ptl2 option for those who wish to
- # experiment with it.
- CC="gcc"
- AC_MSG_CHECKING(which NetBSD thread library to use)
-
- AC_ARG_WITH(ptl2,
-[ --with-ptl2 on NetBSD, use the ptl2 thread library (experimental)],
- use_ptl2="$withval", use_ptl2="no")
-
- : ${LOCALBASE:=/usr/pkg}
-
- if test "X$use_ptl2" = "Xyes"
- then
- AC_MSG_RESULT(PTL2)
- AC_MSG_WARN(
-[linking with PTL2 is highly experimental and not expected to work])
- CC=ptlgcc
- else
- if test ! -d $LOCALBASE/pthreads
- then
- AC_MSG_RESULT(none)
- use_threads=false
- fi
-
- if $use_threads
- then
- AC_MSG_RESULT(mit-pthreads/unproven-pthreads)
- pkg="$LOCALBASE/pthreads"
- lib1="-L$pkg/lib -Wl,-R$pkg/lib"
- lib2="-lpthread -lm -lgcc -lpthread"
- LIBS="$lib1 $lib2 $LIBS"
- CPPFLAGS="$CPPFLAGS -I$pkg/include"
- STD_CINCLUDES="$STD_CINCLUDES -I$pkg/include"
- fi
- fi
- ;;
- *)
- AC_CHECK_LIB(pthread, pthread_create,,
- AC_CHECK_LIB(pthread, __pthread_create,,
- AC_CHECK_LIB(pthread, __pthread_create_system,,
- AC_CHECK_LIB(c_r, pthread_create,,
- AC_CHECK_LIB(c, pthread_create,,
- use_threads=false)))))
- ;;
- esac
-fi
+sinclude(../../config.threads.in)dnl
if $use_threads
then
@@ -451,6 +372,7 @@ then
AC_DEFINE(POSIX_GETGRNAM_R)
;;
*hpux11*)
+ AC_DEFINE(NEED_ENDNETGRENT_R)
AC_DEFINE(_PTHREADS_DRAFT4)
;;
#
@@ -503,11 +425,17 @@ then
;;
esac
fi
+ AC_DEFINE(_REENTRANT)
ALWAYS_DEFINES="-D_REENTRANT"
DO_PTHREADS="#define DO_PTHREADS 1"
WANT_IRS_THREADSGR_OBJS="\${WANT_IRS_THREADSGR_OBJS}"
WANT_IRS_THREADSPW_OBJS="\${WANT_IRS_THREADSPW_OBJS}"
- WANT_IRS_THREADS_OBJS="\${WANT_IRS_THREADS_OBJS}"
+ case $host in
+ ia64-hp-hpux11.*)
+ WANT_IRS_THREADS_OBJS="";;
+ *)
+ WANT_IRS_THREADS_OBJS="\${WANT_IRS_THREADS_OBJS}";;
+ esac
WANT_THREADS_OBJS="\${WANT_THREADS_OBJS}"
thread_dir=pthreads
else
@@ -520,8 +448,6 @@ else
thread_dir=nothreads
fi
-AC_CHECK_FUNC(strlcat, AC_DEFINE(HAVE_STRLCAT))
-
AC_SUBST(ALWAYS_DEFINES)
AC_SUBST(DO_PTHREADS)
AC_SUBST(WANT_IRS_THREADSGR_OBJS)
@@ -529,6 +455,8 @@ AC_SUBST(WANT_IRS_THREADSPW_OBJS)
AC_SUBST(WANT_IRS_THREADS_OBJS)
AC_SUBST(WANT_THREADS_OBJS)
+AC_CHECK_FUNC(strlcat, AC_DEFINE(HAVE_STRLCAT))
+
AC_CHECK_FUNC(if_nametoindex,
[USE_IFNAMELINKID="#define USE_IFNAMELINKID 1"],
[USE_IFNAMELINKID="#undef USE_IFNAMELINKID"])
@@ -605,7 +533,7 @@ else
;;
*)
# Turn off the pointlessly noisy warnings.
- STD_CWARNINGS="+w1 +W 474,530"
+ STD_CWARNINGS="+w1 +W 474,530,2193,2236"
;;
esac
CCOPT="$CCOPT -Ae -z"
@@ -666,6 +594,10 @@ AC_CHECK_FUNC(catgets, AC_DEFINE(HAVE_CATGETS),)
case "$host" in
mips-sgi-irix*)
;;
+ ia64-hp-hpux11.*)
+ AC_CHECK_LIB(socket, socket)
+ AC_CHECK_LIB(nsl, inet_ntoa)
+ ;;
*)
AC_CHECK_LIB(d4r, gethostbyname_r)
AC_CHECK_LIB(socket, socket)
@@ -1075,6 +1007,10 @@ PORT_DIR=port/unknown
SOLARIS_BITTYPES="#undef NEED_SOLARIS_BITTYPES"
BSD_COMP="#undef BSD_COMP"
USE_FIONBIO_IOCTL="#undef USE_FIONBIO_IOCTL"
+PORT_NONBLOCK="#define PORT_NONBLOCK O_NONBLOCK"
+HAVE_MD5="#undef HAVE_MD5"
+USE_POLL="#undef HAVE_POLL"
+SOLARIS2="#undef SOLARIS2"
case "$host" in
*aix3.2*) PORT_DIR="port/aix32";;
*aix4*) PORT_DIR="port/aix4";;
@@ -1082,7 +1018,9 @@ case "$host" in
*aux3*) PORT_DIR="port/aux3";;
*-bsdi2*) PORT_DIR="port/bsdos2";;
*-bsdi*) PORT_DIR="port/bsdos";;
- *-cygwin*) PORT_DIR="port/cygwin";;
+ *-cygwin*)
+ PORT_NONBLOCK="#define PORT_NONBLOCK O_NDELAY"
+ PORT_DIR="port/cygwin";;
*-darwin*) PORT_DIR="port/darwin";;
*-osf*) PORT_DIR="port/decunix";;
*-freebsd*) PORT_DIR="port/freebsd";;
@@ -1098,30 +1036,46 @@ case "$host" in
*-openbsd*) PORT_DIR="port/openbsd";;
*-qnx*) PORT_DIR="port/qnx";;
*-rhapsody*) PORT_DIR="port/rhapsody";;
- *-solaris2.[[01234]]*)
+ *-sunos4*)
+ PORT_NONBLOCK="#define PORT_NONBLOCK O_NDELAY"
+ PORT_DIR="port/sunos";;
+ *-solaris2.[[01234]])
BSD_COMP="#define BSD_COMP 1"
SOLARIS_BITTYPES="#define NEED_SOLARIS_BITTYPES 1"
USE_FIONBIO_IOCTL="#define USE_FIONBIO_IOCTL 1"
+ SOLARIS2="#define SOLARIS2 1"
PORT_DIR="port/solaris";;
- *-solaris2.5*)
+ *-solaris2.5)
BSD_COMP="#define BSD_COMP 1"
SOLARIS_BITTYPES="#define NEED_SOLARIS_BITTYPES 1"
+ SOLARIS2="#define SOLARIS2 1"
+ PORT_DIR="port/solaris";;
+ *-solaris2.[[67]])
+ BSD_COMP="#define BSD_COMP 1"
+ SOLARIS2="#define SOLARIS2 1"
PORT_DIR="port/solaris";;
*-solaris2*) BSD_COMP="#define BSD_COMP 1"
+ USE_POLL="#define USE_POLL 1"
+ HAVE_MD5="#define HAVE_MD5 1"
+ SOLARIS2="#define SOLARIS2 1"
PORT_DIR="port/solaris";;
*-ultrix*) PORT_DIR="port/ultrix";;
*-sco-sysv*uw2.0*) PORT_DIR="port/unixware20";;
*-sco-sysv*uw2.1.2*) PORT_DIR="port/unixware212";;
*-sco-sysv*uw7*) PORT_DIR="port/unixware7";;
esac
+
AC_SUBST(BSD_COMP)
AC_SUBST(SOLARIS_BITTYPES)
AC_SUBST(USE_FIONBIO_IOCTL)
+AC_SUBST(PORT_NONBLOCK)
AC_SUBST(PORT_DIR)
+AC_SUBST(USE_POLL)
+AC_SUBST(HAVE_MD5)
+AC_SUBST(SOLARIS2)
PORT_INCLUDE=${PORT_DIR}/include
AC_SUBST(PORT_INCLUDE)
-
#
# Look for a 4.4BSD or 4.3BSD struct msghdr
#
@@ -1365,6 +1319,10 @@ AC_SUBST(GETGROUPLIST_ARGS)
AC_CHECK_FUNC(setgroupent,,AC_DEFINE(NEED_SETGROUPENT))
+case $host in
+ia64-hp-hpux11.*)
+;;
+*)
AC_CHECK_FUNC(getnetbyaddr_r,
AC_TRY_COMPILE(
[
@@ -1453,6 +1411,26 @@ NET_R_RETURN="#define NET_R_RETURN int"
GETNETBYADDR_ADDR_T="#define GETNETBYADDR_ADDR_T long"
NETENT_DATA="#define NETENT_DATA 1"
],
+AC_TRY_COMPILE(
+#undef __USE_MISC
+#define __USE_MISC
+[#include <netdb.h>
+int getnetbyaddr_r (uint32_t, int, struct netent *,
+ char *, size_t, struct netent **, int *);
+],
+[return (0)],
+[
+NET_R_ARGS="#define NET_R_ARGS char *buf, size_t buflen, struct netent **answerp, int *h_errnop"
+NET_R_BAD="#define NET_R_BAD ERANGE"
+NET_R_COPY="#define NET_R_COPY buf, buflen"
+NET_R_COPY_ARGS="#define NET_R_COPY_ARGS char *buf, size_t buflen"
+NET_R_OK="#define NET_R_OK 0"
+NET_R_SETANSWER="#define NET_R_SETANSWER 1"
+NET_R_RETURN="#define NET_R_RETURN int"
+GETNETBYADDR_ADDR_T="#define GETNETBYADDR_ADDR_T unsigned long int"
+NETENT_DATA="#undef NETENT_DATA"
+],
+)
)
)
)
@@ -1468,6 +1446,8 @@ NET_R_RETURN="#define NET_R_RETURN struct netent *"
GETNETBYADDR_ADDR_T="#define GETNETBYADDR_ADDR_T long"
NETENT_DATA="#undef NETENT_DATA"
)
+esac
+
case "$host" in
*dec-osf*) GETNETBYADDR_ADDR_T="#define GETNETBYADDR_ADDR_T int" ;;
esac
@@ -1516,6 +1496,11 @@ AC_SUBST(NET_R_ENT_ARGS)
AC_SUBST(NET_R_SET_RESULT)
AC_SUBST(NET_R_SET_RETURN)
+
+case $host in
+ia64-hp-hpux11.*)
+;;
+*)
AC_CHECK_FUNC(endnetent_r,
AC_TRY_COMPILE(
[
@@ -1560,6 +1545,7 @@ NET_R_END_RETURN="#define NET_R_END_RETURN void"
NET_R_END_RESULT="#define NET_R_END_RESULT(x) /*empty*/"
NET_R_END_RETURN="#define NET_R_END_RETURN void"
)
+esac
AC_SUBST(NET_R_END_RESULT)
AC_SUBST(NET_R_END_RETURN)
@@ -1612,6 +1598,10 @@ AC_SUBST(GROUP_R_SET_RESULT)
AC_SUBST(GROUP_R_SET_RETURN)
+case $host in
+ia64-hp-hpux11.*)
+;;
+*)
AC_CHECK_FUNC(gethostbyname_r,
AC_TRY_COMPILE(
[
@@ -1646,7 +1636,7 @@ HOST_R_ARGS="#define HOST_R_ARGS struct hostent_data *hdptr"
HOST_R_BAD="#define HOST_R_BAD (-1)"
HOST_R_COPY="#define HOST_R_COPY hdptr"
HOST_R_COPY_ARGS="#define HOST_R_COPY_ARGS HOST_R_ARGS"
-HOST_R_ERRNO="#define HOST_R_ERRNO NULL"
+HOST_R_ERRNO="#undef HOST_R_ERRNO"
HOST_R_OK="#define HOST_R_OK 0"
HOST_R_RETURN="#define HOST_R_RETURN int"
HOST_R_SETANSWER="#undef HOST_R_SETANSWER"
@@ -1684,6 +1674,7 @@ HOST_R_RETURN="#define HOST_R_RETURN struct hostent *"
HOST_R_SETANSWER="#undef HOST_R_SETANSWER"
HOSTENT_DATA="#undef HOSTENT_DATA"
)
+esac
AC_SUBST(HOST_R_ARGS)
AC_SUBST(HOST_R_BAD)
AC_SUBST(HOST_R_COPY)
@@ -1694,6 +1685,10 @@ AC_SUBST(HOST_R_RETURN)
AC_SUBST(HOST_R_SETANSWER)
AC_SUBST(HOSTENT_DATA)
+case $host in
+ia64-hp-hpux11.*)
+;;
+*)
AC_CHECK_FUNC(endhostent_r,
AC_TRY_COMPILE([
#undef _REENTRANT
@@ -1739,10 +1734,15 @@ HOST_R_END_RESULT="#define HOST_R_END_RESULT(x) /*empty*/"
HOST_R_END_RETURN="#define HOST_R_END_RETURN void"
HOST_R_ENT_ARGS="#undef HOST_R_ENT_ARGS /*empty*/"
)
+esac;
AC_SUBST(HOST_R_END_RESULT)
AC_SUBST(HOST_R_END_RETURN)
AC_SUBST(HOST_R_ENT_ARGS)
+case $host in
+ia64-hp-hpux11.*)
+;;
+*)
AC_CHECK_FUNC(sethostent_r,
AC_TRY_COMPILE([
#undef _REENTRANT
@@ -1778,6 +1778,7 @@ HOST_R_SET_RETURN="#define HOST_R_SET_RETURN void"],
HOST_R_SET_RESULT="#undef HOST_R_SET_RESULT"
HOST_R_SET_RETURN="#define HOST_R_SET_RETURN void"
)
+esac
AC_SUBST(HOST_R_SET_RESULT)
AC_SUBST(HOST_R_SET_RETURN)
@@ -1819,6 +1820,10 @@ SETGRENT_VOID="#undef SETGRENT_VOID"
)
AC_SUBST(SETGRENT_VOID)
+case $host in
+ia64-hp-hpux11.*)
+;;
+*)
AC_CHECK_FUNC(getnetgrent_r,
AC_TRY_COMPILE(
[
@@ -1886,6 +1891,7 @@ NGR_R_COPY_ARGS="#define NGR_R_COPY_ARGS NGR_R_ARGS"
NGR_R_OK="#define NGR_R_OK 1"
NGR_R_RETURN="#define NGR_R_RETURN int"
)
+esac
AC_SUBST(NGR_R_ARGS)
AC_SUBST(NGR_R_BAD)
AC_SUBST(NGR_R_COPY)
@@ -1930,6 +1936,10 @@ AC_SUBST(NGR_R_SET_RETURN)
AC_CHECK_FUNC(innetgr_r,,AC_DEFINE(NEED_INNETGR_R))
+case $host in
+ia64-hp-hpux11.*)
+;;
+*)
AC_CHECK_FUNC(getprotoent_r,
AC_TRY_COMPILE(
[
@@ -1984,6 +1994,7 @@ PROTO_R_OK="#define PROTO_R_OK pptr"
PROTO_R_SETANSWER="#undef PROTO_R_SETANSWER"
PROTO_R_RETURN="#define PROTO_R_RETURN struct protoent *"
)
+esac
AC_SUBST(PROTO_R_ARGS)
AC_SUBST(PROTO_R_BAD)
AC_SUBST(PROTO_R_COPY)
@@ -1992,6 +2003,10 @@ AC_SUBST(PROTO_R_OK)
AC_SUBST(PROTO_R_SETANSWER)
AC_SUBST(PROTO_R_RETURN)
+case $host in
+ia64-hp-hpux11.*)
+;;
+*)
AC_CHECK_FUNC(endprotoent_r,
AC_TRY_COMPILE(
[
@@ -2015,10 +2030,15 @@ PROTO_R_END_RESULT="#define PROTO_R_END_RESULT(x) /*empty*/"
PROTO_R_END_RETURN="#define PROTO_R_END_RETURN void"
PROTO_R_ENT_ARGS="#undef PROTO_R_ENT_ARGS /*empty*/"
)
+esac
AC_SUBST(PROTO_R_END_RESULT)
AC_SUBST(PROTO_R_END_RETURN)
AC_SUBST(PROTO_R_ENT_ARGS)
+case $host in
+ia64-hp-hpux11.*)
+;;
+*)
AC_CHECK_FUNC(setprotoent_r,
AC_TRY_COMPILE(
[
@@ -2037,6 +2057,7 @@ PROTO_R_SET_RETURN="#define PROTO_R_SET_RETURN void"
PROTO_R_SET_RESULT="#undef PROTO_R_SET_RESULT"
PROTO_R_SET_RETURN="#define PROTO_R_SET_RETURN void"
)
+esac
AC_SUBST(PROTO_R_SET_RESULT)
AC_SUBST(PROTO_R_SET_RETURN)
@@ -2126,6 +2147,10 @@ AC_SUBST(PASS_R_SET_RETURN)
AC_CHECK_FUNC(getpwnam_r,,AC_DEFINE(NEED_GETPWNAM_R))
AC_CHECK_FUNC(getpwuid_r,,AC_DEFINE(NEED_GETPWUID_R))
+case $host in
+ia64-hp-hpux11.*)
+;;
+*)
AC_CHECK_FUNC(getservent_r,
AC_TRY_COMPILE([
#undef __USE_MISC
@@ -2172,6 +2197,7 @@ SERV_R_OK="#define SERV_R_OK sptr"
SERV_R_SETANSWER="#undef SERV_R_SETANSWER"
SERV_R_RETURN="#define SERV_R_RETURN struct servent *"
)
+esac
AC_SUBST(SERV_R_ARGS)
AC_SUBST(SERV_R_BAD)
AC_SUBST(SERV_R_COPY)
@@ -2180,6 +2206,10 @@ AC_SUBST(SERV_R_OK)
AC_SUBST(SERV_R_SETANSWER)
AC_SUBST(SERV_R_RETURN)
+case $host in
+ia64-hp-hpux11.*)
+;;
+*)
AC_CHECK_FUNC(endservent_r,
AC_TRY_COMPILE(
[
@@ -2204,10 +2234,15 @@ SERV_R_END_RESULT="#define SERV_R_END_RESULT(x) /*empty*/"
SERV_R_END_RETURN="#define SERV_R_END_RETURN void "
SERV_R_ENT_ARGS="#undef SERV_R_ENT_ARGS /*empty*/"
)
+esac
AC_SUBST(SERV_R_END_RESULT)
AC_SUBST(SERV_R_END_RETURN)
AC_SUBST(SERV_R_ENT_ARGS)
+case $host in
+ia64-hp-hpux11.*)
+;;
+*)
AC_CHECK_FUNC(setservent_r,
AC_TRY_COMPILE(
[
@@ -2229,6 +2264,7 @@ SERV_R_SET_RETURN="#define SERV_R_SET_RETURN void"
SERV_R_SET_RESULT="#undef SERV_R_SET_RESULT"
SERV_R_SET_RETURN="#define SERV_R_SET_RETURN void"
)
+esac
AC_SUBST(SERV_R_SET_RESULT)
AC_SUBST(SERV_R_SET_RETURN)
@@ -2327,7 +2363,6 @@ case "$host" in
hack_shutup_in6addr_init_macros=yes
;;
*-solaris2.8)
- hack_shutup_pthreadmutexinit=yes
hack_shutup_in6addr_init_macros=yes
;;
*-solaris2.9)
diff --git a/contrib/bind9/lib/bind/dst/dst_api.c b/contrib/bind9/lib/bind/dst/dst_api.c
index 5f67bd9..51dfd0b 100644
--- a/contrib/bind9/lib/bind/dst/dst_api.c
+++ b/contrib/bind9/lib/bind/dst/dst_api.c
@@ -1,5 +1,5 @@
#ifndef LINT
-static const char rcsid[] = "$Header: /proj/cvs/prod/bind9/lib/bind/dst/dst_api.c,v 1.4.2.6.8.1 2004/09/16 00:57:33 marka Exp $";
+static const char rcsid[] = "$Header: /proj/cvs/prod/bind9/lib/bind/dst/dst_api.c,v 1.4.2.6.8.3 2005/10/11 00:48:14 marka Exp $";
#endif
/*
@@ -336,7 +336,10 @@ dst_read_key(const char *in_keyname, const u_int16_t in_id,
if (in_keyname == NULL) {
EREPORT(("dst_read_private_key(): Null key name passed in\n"));
return (NULL);
- } else
+ } else if (strlen(in_keyname) >= sizeof(keyname)) {
+ EREPORT(("dst_read_private_key(): keyname too big\n"));
+ return (NULL);
+ } else
strcpy(keyname, in_keyname);
/* before I read in the public key, check if it is allowed to sign */
@@ -347,7 +350,7 @@ dst_read_key(const char *in_keyname, const u_int16_t in_id,
return pubkey;
if (!(dg_key = dst_s_get_key_struct(keyname, pubkey->dk_alg,
- pubkey->dk_flags, pubkey->dk_proto,
+ pubkey->dk_flags, pubkey->dk_proto,
0)))
return (dg_key);
/* Fill in private key and some fields in the general key structure */
@@ -953,7 +956,6 @@ dst_generate_key(const char *name, const int bits, const int exp,
const int flags, const int protocol, const int alg)
{
DST_KEY *new_key = NULL;
- int res;
int dnslen;
u_char dns[2048];
@@ -975,7 +977,7 @@ dst_generate_key(const char *name, const int bits, const int exp,
alg));
return (dst_free_key(new_key));
}
- if ((res = new_key->dk_func->generate(new_key, exp)) <= 0) {
+ if (new_key->dk_func->generate(new_key, exp) <= 0) {
EREPORT(("dst_generate_key_pair(): Key generation failure %s %d %d %d\n",
new_key->dk_key_name, new_key->dk_alg,
new_key->dk_key_size, exp));
diff --git a/contrib/bind9/lib/bind/dst/hmac_link.c b/contrib/bind9/lib/bind/dst/hmac_link.c
index 8a641d0..aa66c80 100644
--- a/contrib/bind9/lib/bind/dst/hmac_link.c
+++ b/contrib/bind9/lib/bind/dst/hmac_link.c
@@ -1,6 +1,6 @@
#ifdef HMAC_MD5
#ifndef LINT
-static const char rcsid[] = "$Header: /proj/cvs/prod/bind9/lib/bind/dst/hmac_link.c,v 1.2.2.1 2003/06/27 03:51:36 marka Exp $";
+static const char rcsid[] = "$Header: /proj/cvs/prod/bind9/lib/bind/dst/hmac_link.c,v 1.2.2.1.4.1 2005/07/28 07:43:16 marka Exp $";
#endif
/*
* Portions Copyright (c) 1995-1998 by Trusted Information Systems, Inc.
@@ -36,8 +36,15 @@ static const char rcsid[] = "$Header: /proj/cvs/prod/bind9/lib/bind/dst/hmac_lin
#include <resolv.h>
#include "dst_internal.h"
+
#ifdef USE_MD5
-# include "md5.h"
+# ifndef HAVE_MD5
+# include "md5.h"
+# else
+# ifdef SOLARIS2
+# include <sys/md5.h>
+# endif
+# endif
# ifndef _MD5_H_
# define _MD5_H_ 1 /* make sure we do not include rsaref md5.h file */
# endif
@@ -438,7 +445,11 @@ dst_hmac_md5_generate_key(DST_KEY *key, const int nothing)
* related functions
*/
int
+#ifdef SUNW_LIBMD5
+dst_md5_hmac_init()
+#else
dst_hmac_md5_init()
+#endif
{
if (dst_t_func[KEY_HMAC_MD5] != NULL)
return (1);
diff --git a/contrib/bind9/lib/bind/dst/md5.h b/contrib/bind9/lib/bind/dst/md5.h
index c886d17..6525662 100644
--- a/contrib/bind9/lib/bind/dst/md5.h
+++ b/contrib/bind9/lib/bind/dst/md5.h
@@ -59,6 +59,8 @@
#ifndef HEADER_MD5_H
#define HEADER_MD5_H
+#ifndef HAVE_MD5
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -99,3 +101,6 @@ unsigned char *MD5();
#endif
#endif
+#else
+#include <sys/md5.h>
+#endif /* HAVE_MD5 */
diff --git a/contrib/bind9/lib/bind/dst/md5_dgst.c b/contrib/bind9/lib/bind/dst/md5_dgst.c
index 48c327e..ba0a5a1 100644
--- a/contrib/bind9/lib/bind/dst/md5_dgst.c
+++ b/contrib/bind9/lib/bind/dst/md5_dgst.c
@@ -58,6 +58,7 @@
#ifdef USE_MD5 /* Added by ogud@tis.com 1998/1/26 */
#include <port_before.h>
+#ifndef HAVE_MD5
#include <stdio.h>
#include "md5_locl.h"
#include <port_after.h>
@@ -367,4 +368,5 @@ unsigned long *l;
}
}
#endif
+#endif /* HAVE_MD5 */
#endif /* USE_MD5 */
diff --git a/contrib/bind9/lib/bind/dst/support.c b/contrib/bind9/lib/bind/dst/support.c
index 7b86ea9..8fe3cdb 100644
--- a/contrib/bind9/lib/bind/dst/support.c
+++ b/contrib/bind9/lib/bind/dst/support.c
@@ -1,4 +1,4 @@
-static const char rcsid[] = "$Header: /proj/cvs/prod/bind9/lib/bind/dst/support.c,v 1.2.2.1 2001/11/02 22:25:29 gson Exp $";
+static const char rcsid[] = "$Header: /proj/cvs/prod/bind9/lib/bind/dst/support.c,v 1.2.2.1.10.2 2005/10/11 00:48:14 marka Exp $";
/*
@@ -103,7 +103,7 @@ dst_s_id_calc(const u_char *key, const int keysize)
int size = keysize;
if (!key || (keysize <= 0))
- return (-1);
+ return (0xffffU);
for (ac = 0; size > 1; size -= 2, kp += 2)
ac += ((*kp) << 8) + *(kp + 1);
@@ -311,19 +311,15 @@ dst_s_fopen(const char *filename, const char *mode, int perm)
{
FILE *fp;
char pathname[PATH_MAX];
- size_t plen = sizeof(pathname);
+
+ if (strlen(filename) + strlen(dst_path) >= sizeof(pathname))
+ return (NULL);
if (*dst_path != '\0') {
strcpy(pathname, dst_path);
- plen -= strlen(pathname);
- }
- else
- pathname[0] = '\0';
-
- if (plen > strlen(filename))
- strncpy(&pathname[PATH_MAX - plen], filename, plen-1);
- else
- return (NULL);
+ strcat(pathname, filename);
+ } else
+ strcpy(pathname, filename);
fp = fopen(pathname, mode);
if (perm)
diff --git a/contrib/bind9/lib/bind/include/isc/eventlib.h b/contrib/bind9/lib/bind/include/isc/eventlib.h
index 6750e4d..033b312 100644
--- a/contrib/bind9/lib/bind/include/isc/eventlib.h
+++ b/contrib/bind9/lib/bind/include/isc/eventlib.h
@@ -18,7 +18,7 @@
/* eventlib.h - exported interfaces for eventlib
* vix 09sep95 [initial]
*
- * $Id: eventlib.h,v 1.1.2.1.4.1 2004/03/09 08:33:31 marka Exp $
+ * $Id: eventlib.h,v 1.1.2.1.4.2 2005/07/28 07:43:18 marka Exp $
*/
#ifndef _EVENTLIB_H
@@ -76,6 +76,8 @@ typedef struct { unsigned char mask[256/8]; } evByteMask;
#define EV_WRITE 2
#define EV_EXCEPT 4
+#define EV_WASNONBLOCKING 8 /* Internal library use. */
+
/* eventlib.c */
#define evCreate __evCreate
#define evSetDebug __evSetDebug
diff --git a/contrib/bind9/lib/bind/include/resolv.h b/contrib/bind9/lib/bind/include/resolv.h
index f4f3fa4..87a9520 100644
--- a/contrib/bind9/lib/bind/include/resolv.h
+++ b/contrib/bind9/lib/bind/include/resolv.h
@@ -50,7 +50,7 @@
/*
* @(#)resolv.h 8.1 (Berkeley) 6/2/93
- * $Id: resolv.h,v 1.7.2.11.4.2 2004/06/25 00:41:05 marka Exp $
+ * $Id: resolv.h,v 1.7.2.11.4.3 2005/08/25 04:44:13 marka Exp $
*/
#ifndef _RESOLV_H_
@@ -291,6 +291,11 @@ extern struct __res_state *__res_state(void);
__END_DECLS
#define _res (*__res_state())
#else
+#ifdef __linux
+__BEGIN_DECLS
+extern struct __res_state * __res_state(void);
+__END_DECLS
+#endif
#ifndef __BIND_NOSTATIC
extern struct __res_state _res;
#endif
diff --git a/contrib/bind9/lib/bind/include/resolv_mt.h b/contrib/bind9/lib/bind/include/resolv_mt.h
new file mode 100644
index 0000000..27963a1
--- /dev/null
+++ b/contrib/bind9/lib/bind/include/resolv_mt.h
@@ -0,0 +1,47 @@
+#ifndef _RESOLV_MT_H
+#define _RESOLV_MT_H
+
+#include <sys/types.h>
+#include <netinet/in.h>
+#include <arpa/nameser.h>
+#include <resolv.h>
+
+/* Access functions for the libresolv private interface */
+
+int __res_enable_mt(void);
+int __res_disable_mt(void);
+
+/* Per-thread context */
+
+typedef struct {
+int no_hosts_fallback_private;
+int retry_save;
+int retry_private;
+char inet_nsap_ntoa_tmpbuf[255*3];
+char sym_ntos_unname[20];
+char sym_ntop_unname[20];
+char p_option_nbuf[40];
+char p_time_nbuf[40];
+char precsize_ntoa_retbuf[sizeof "90000000.00"];
+char loc_ntoa_tmpbuf[sizeof
+"1000 60 60.000 N 1000 60 60.000 W -12345678.00m 90000000.00m 90000000.00m 90000000.00m"];
+char p_secstodate_output[15];
+} mtctxres_t;
+
+/* Thread-specific data (TSD) */
+
+mtctxres_t *___mtctxres(void);
+#define mtctxres (___mtctxres())
+
+/* Various static data that should be TSD */
+
+#define sym_ntos_unname (mtctxres->sym_ntos_unname)
+#define sym_ntop_unname (mtctxres->sym_ntop_unname)
+#define inet_nsap_ntoa_tmpbuf (mtctxres->inet_nsap_ntoa_tmpbuf)
+#define p_option_nbuf (mtctxres->p_option_nbuf)
+#define p_time_nbuf (mtctxres->p_time_nbuf)
+#define precsize_ntoa_retbuf (mtctxres->precsize_ntoa_retbuf)
+#define loc_ntoa_tmpbuf (mtctxres->loc_ntoa_tmpbuf)
+#define p_secstodate_output (mtctxres->p_secstodate_output)
+
+#endif /* _RESOLV_MT_H */
diff --git a/contrib/bind9/lib/bind/inet/inet_cidr_ntop.c b/contrib/bind9/lib/bind/inet/inet_cidr_ntop.c
index 184ad7c..192cf1e 100644
--- a/contrib/bind9/lib/bind/inet/inet_cidr_ntop.c
+++ b/contrib/bind9/lib/bind/inet/inet_cidr_ntop.c
@@ -16,7 +16,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static const char rcsid[] = "$Id: inet_cidr_ntop.c,v 1.1.2.1.8.2 2004/03/17 00:29:46 marka Exp $";
+static const char rcsid[] = "$Id: inet_cidr_ntop.c,v 1.1.2.1.8.3 2005/11/03 23:08:40 marka Exp $";
#endif
#include "port_before.h"
@@ -178,7 +178,9 @@ inet_cidr_ntop_ipv6(const u_char *src, int bits, char *dst, size_t size) {
for (i = 0; i < NS_IN6ADDRSZ; i++)
words[i / 2] |= (src[i] << ((1 - (i % 2)) << 3));
best.base = -1;
+ best.len = 0;
cur.base = -1;
+ cur.len = 0;
for (i = 0; i < (NS_IN6ADDRSZ / NS_INT16SZ); i++) {
if (words[i] == 0) {
if (cur.base == -1)
diff --git a/contrib/bind9/lib/bind/inet/inet_ntop.c b/contrib/bind9/lib/bind/inet/inet_ntop.c
index 6141407..cd502ab 100644
--- a/contrib/bind9/lib/bind/inet/inet_ntop.c
+++ b/contrib/bind9/lib/bind/inet/inet_ntop.c
@@ -16,7 +16,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static const char rcsid[] = "$Id: inet_ntop.c,v 1.1.2.1.8.1 2004/03/09 08:33:33 marka Exp $";
+static const char rcsid[] = "$Id: inet_ntop.c,v 1.1.2.1.8.2 2005/11/03 23:08:40 marka Exp $";
#endif /* LIBC_SCCS and not lint */
#include "port_before.h"
@@ -137,7 +137,9 @@ inet_ntop6(src, dst, size)
for (i = 0; i < NS_IN6ADDRSZ; i++)
words[i / 2] |= (src[i] << ((1 - (i % 2)) << 3));
best.base = -1;
+ best.len = 0;
cur.base = -1;
+ cur.len = 0;
for (i = 0; i < (NS_IN6ADDRSZ / NS_INT16SZ); i++) {
if (words[i] == 0) {
if (cur.base == -1)
diff --git a/contrib/bind9/lib/bind/inet/inet_pton.c b/contrib/bind9/lib/bind/inet/inet_pton.c
index c7813f8..f18a7b6 100644
--- a/contrib/bind9/lib/bind/inet/inet_pton.c
+++ b/contrib/bind9/lib/bind/inet/inet_pton.c
@@ -16,7 +16,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static const char rcsid[] = "$Id: inet_pton.c,v 1.2.206.1 2004/03/09 08:33:33 marka Exp $";
+static const char rcsid[] = "$Id: inet_pton.c,v 1.2.206.2 2005/07/28 07:43:18 marka Exp $";
#endif /* LIBC_SCCS and not lint */
#include "port_before.h"
@@ -141,7 +141,7 @@ inet_pton6(src, dst)
xdigits_u[] = "0123456789ABCDEF";
u_char tmp[NS_IN6ADDRSZ], *tp, *endp, *colonp;
const char *xdigits, *curtok;
- int ch, saw_xdigit;
+ int ch, seen_xdigits;
u_int val;
memset((tp = tmp), '\0', NS_IN6ADDRSZ);
@@ -152,7 +152,7 @@ inet_pton6(src, dst)
if (*++src != ':')
return (0);
curtok = src;
- saw_xdigit = 0;
+ seen_xdigits = 0;
val = 0;
while ((ch = *src++) != '\0') {
const char *pch;
@@ -162,14 +162,13 @@ inet_pton6(src, dst)
if (pch != NULL) {
val <<= 4;
val |= (pch - xdigits);
- if (val > 0xffff)
+ if (++seen_xdigits > 4)
return (0);
- saw_xdigit = 1;
continue;
}
if (ch == ':') {
curtok = src;
- if (!saw_xdigit) {
+ if (!seen_xdigits) {
if (colonp)
return (0);
colonp = tp;
@@ -181,19 +180,19 @@ inet_pton6(src, dst)
return (0);
*tp++ = (u_char) (val >> 8) & 0xff;
*tp++ = (u_char) val & 0xff;
- saw_xdigit = 0;
+ seen_xdigits = 0;
val = 0;
continue;
}
if (ch == '.' && ((tp + NS_INADDRSZ) <= endp) &&
inet_pton4(curtok, tp) > 0) {
tp += NS_INADDRSZ;
- saw_xdigit = 0;
+ seen_xdigits = 0;
break; /* '\0' was seen by inet_pton4(). */
}
return (0);
}
- if (saw_xdigit) {
+ if (seen_xdigits) {
if (tp + NS_INT16SZ > endp)
return (0);
*tp++ = (u_char) (val >> 8) & 0xff;
diff --git a/contrib/bind9/lib/bind/inet/nsap_addr.c b/contrib/bind9/lib/bind/inet/nsap_addr.c
index 0b9108a..a4b98e7 100644
--- a/contrib/bind9/lib/bind/inet/nsap_addr.c
+++ b/contrib/bind9/lib/bind/inet/nsap_addr.c
@@ -16,7 +16,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static const char rcsid[] = "$Id: nsap_addr.c,v 1.2.206.1 2004/03/09 08:33:33 marka Exp $";
+static const char rcsid[] = "$Id: nsap_addr.c,v 1.2.206.2 2005/07/28 07:43:18 marka Exp $";
#endif /* LIBC_SCCS and not lint */
#include "port_before.h"
@@ -31,6 +31,7 @@ static const char rcsid[] = "$Id: nsap_addr.c,v 1.2.206.1 2004/03/09 08:33:33 ma
#include <ctype.h>
#include <resolv.h>
+#include <resolv_mt.h>
#include "port_after.h"
@@ -79,7 +80,7 @@ char *
inet_nsap_ntoa(int binlen, const u_char *binary, char *ascii) {
int nib;
int i;
- static char tmpbuf[2+255*3];
+ char *tmpbuf = inet_nsap_ntoa_tmpbuf;
char *start;
if (ascii)
diff --git a/contrib/bind9/lib/bind/irs/dns_ho.c b/contrib/bind9/lib/bind/irs/dns_ho.c
index 69b4b4f..e8da61a 100644
--- a/contrib/bind9/lib/bind/irs/dns_ho.c
+++ b/contrib/bind9/lib/bind/irs/dns_ho.c
@@ -52,7 +52,7 @@
/* BIND Id: gethnamaddr.c,v 8.15 1996/05/22 04:56:30 vixie Exp $ */
#if defined(LIBC_SCCS) && !defined(lint)
-static const char rcsid[] = "$Id: dns_ho.c,v 1.5.2.7.4.5 2004/08/24 00:32:15 marka Exp $";
+static const char rcsid[] = "$Id: dns_ho.c,v 1.5.2.7.4.6 2005/10/11 00:48:14 marka Exp $";
#endif /* LIBC_SCCS and not lint */
/* Imports. */
@@ -688,7 +688,7 @@ gethostans(struct irs_ho *this,
{
struct pvt *pvt = (struct pvt *)this->private;
int type, class, ancount, qdcount, n, haveanswer, had_error;
- int error = NETDB_SUCCESS, arcount;
+ int error = NETDB_SUCCESS;
int (*name_ok)(const char *);
const HEADER *hp;
const u_char *eom;
@@ -735,7 +735,6 @@ gethostans(struct irs_ho *this,
hp = (const HEADER *)ansbuf;
ancount = ntohs(hp->ancount);
qdcount = ntohs(hp->qdcount);
- arcount = ntohs(hp->arcount);
bp = pvt->hostbuf;
ep = pvt->hostbuf + sizeof(pvt->hostbuf);
cp = ansbuf + HFIXEDSZ;
diff --git a/contrib/bind9/lib/bind/irs/getaddrinfo.c b/contrib/bind9/lib/bind/irs/getaddrinfo.c
index e08cf78..4f741a8 100644
--- a/contrib/bind9/lib/bind/irs/getaddrinfo.c
+++ b/contrib/bind9/lib/bind/irs/getaddrinfo.c
@@ -244,6 +244,7 @@ do { \
goto free; \
} while (/*CONSTCOND*/0)
+#ifndef SOLARIS2
#define ERR(err) \
do { \
/* external reference: error, and label bad */ \
@@ -251,6 +252,16 @@ do { \
goto bad; \
/*NOTREACHED*/ \
} while (/*CONSTCOND*/0)
+#else
+#define ERR(err) \
+do { \
+ /* external reference: error, and label bad */ \
+ error = (err); \
+ if (error == error) \
+ goto bad; \
+} while (/*CONSTCOND*/0)
+#endif
+
#define MATCH_FAMILY(x, y, w) \
((x) == (y) || (/*CONSTCOND*/(w) && ((x) == PF_UNSPEC || (y) == PF_UNSPEC)))
@@ -321,6 +332,15 @@ getaddrinfo(hostname, servname, hints, res)
pai->ai_family = PF_UNSPEC;
pai->ai_socktype = ANY;
pai->ai_protocol = ANY;
+#ifdef __sparcv9
+ /*
+ * clear _ai_pad to preserve binary
+ * compatibility with previously compiled 64-bit
+ * applications in a pre-SUSv3 environment by
+ * guaranteeing the upper 32-bits are empty.
+ */
+ pai->_ai_pad = 0;
+#endif /* __sparcv9 */
pai->ai_addrlen = 0;
pai->ai_canonname = NULL;
pai->ai_addr = NULL;
@@ -345,6 +365,13 @@ getaddrinfo(hostname, servname, hints, res)
}
memcpy(pai, hints, sizeof(*pai));
+#ifdef __sparcv9
+ /*
+ * We need to clear _ai_pad to preserve binary
+ * compatibility. See prior comment.
+ */
+ pai->_ai_pad = 0;
+#endif
/*
* if both socktype/protocol are specified, check if they
* are meaningful combination.
diff --git a/contrib/bind9/lib/bind/irs/gethostent_r.c b/contrib/bind9/lib/bind/irs/gethostent_r.c
index 28f1a7f..8a7cff0 100644
--- a/contrib/bind9/lib/bind/irs/gethostent_r.c
+++ b/contrib/bind9/lib/bind/irs/gethostent_r.c
@@ -16,7 +16,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static const char rcsid[] = "$Id: gethostent_r.c,v 1.4.206.3 2004/09/01 02:03:07 marka Exp $";
+static const char rcsid[] = "$Id: gethostent_r.c,v 1.4.206.4 2005/09/03 12:47:38 marka Exp $";
#endif /* LIBC_SCCS and not lint */
#include <port_before.h>
@@ -44,7 +44,9 @@ gethostbyname_r(const char *name, struct hostent *hptr, HOST_R_ARGS) {
int n = 0;
#endif
+#ifdef HOST_R_ERRNO
HOST_R_ERRNO;
+#endif
#ifdef HOST_R_SETANSWER
if (he == NULL || (n = copy_hostent(he, hptr, HOST_R_COPY)) != 0)
@@ -69,7 +71,9 @@ gethostbyaddr_r(const char *addr, int len, int type,
int n = 0;
#endif
+#ifdef HOST_R_ERRNO
HOST_R_ERRNO;
+#endif
#ifdef HOST_R_SETANSWER
if (he == NULL || (n = copy_hostent(he, hptr, HOST_R_COPY)) != 0)
@@ -99,7 +103,9 @@ gethostent_r(struct hostent *hptr, HOST_R_ARGS) {
int n = 0;
#endif
+#ifdef HOST_R_ERRNO
HOST_R_ERRNO;
+#endif
#ifdef HOST_R_SETANSWER
if (he == NULL || (n = copy_hostent(he, hptr, HOST_R_COPY)) != 0)
@@ -123,6 +129,9 @@ sethostent_r(int stay_open, HOST_R_ENT_ARGS)
sethostent_r(int stay_open)
#endif
{
+#ifdef HOST_R_ENT_ARGS
+ UNUSED(hdptr);
+#endif
sethostent(stay_open);
#ifdef HOST_R_SET_RESULT
return (HOST_R_SET_RESULT);
@@ -136,6 +145,9 @@ endhostent_r(HOST_R_ENT_ARGS)
endhostent_r(void)
#endif
{
+#ifdef HOST_R_ENT_ARGS
+ UNUSED(hdptr);
+#endif
endhostent();
HOST_R_END_RESULT(HOST_R_OK);
}
diff --git a/contrib/bind9/lib/bind/irs/getnetent_r.c b/contrib/bind9/lib/bind/irs/getnetent_r.c
index 0b540b0..1f8290d 100644
--- a/contrib/bind9/lib/bind/irs/getnetent_r.c
+++ b/contrib/bind9/lib/bind/irs/getnetent_r.c
@@ -16,7 +16,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static const char rcsid[] = "$Id: getnetent_r.c,v 1.3.206.1 2004/03/09 08:33:36 marka Exp $";
+static const char rcsid[] = "$Id: getnetent_r.c,v 1.3.206.2 2005/09/03 12:47:38 marka Exp $";
#endif /* LIBC_SCCS and not lint */
#include <port_before.h>
@@ -118,6 +118,9 @@ setnetent_r(int stay_open, NET_R_ENT_ARGS)
setnetent_r(int stay_open)
#endif
{
+#ifdef NET_R_ENT_ARGS
+ UNUSED(ndptr);
+#endif
setnetent(stay_open);
#ifdef NET_R_SET_RESULT
return (NET_R_SET_RESULT);
@@ -131,6 +134,9 @@ endnetent_r(NET_R_ENT_ARGS)
endnetent_r()
#endif
{
+#ifdef NET_R_ENT_ARGS
+ UNUSED(ndptr);
+#endif
endnetent();
NET_R_END_RESULT(NET_R_OK);
}
diff --git a/contrib/bind9/lib/bind/irs/getnetgrent_r.c b/contrib/bind9/lib/bind/irs/getnetgrent_r.c
index bb78b56..b5d9bb1 100644
--- a/contrib/bind9/lib/bind/irs/getnetgrent_r.c
+++ b/contrib/bind9/lib/bind/irs/getnetgrent_r.c
@@ -16,7 +16,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static const char rcsid[] = "$Id: getnetgrent_r.c,v 1.5.2.1.4.3 2004/11/30 01:15:43 marka Exp $";
+static const char rcsid[] = "$Id: getnetgrent_r.c,v 1.5.2.1.4.4 2005/09/03 12:47:38 marka Exp $";
#endif /* LIBC_SCCS and not lint */
#include <port_before.h>
@@ -77,8 +77,14 @@ setnetgrent_r(const char *netgroup)
#endif
{
char *tmp;
+#if defined(NGR_R_ENT_ARGS) && !defined(NGR_R_PRIVATE)
+ UNUSED(buf);
+ UNUSED(buflen);
+#endif
+
DE_CONST(netgroup, tmp);
setnetgrent(tmp);
+
#ifdef NGR_R_PRIVATE
*buf = NULL;
#endif
@@ -94,6 +100,11 @@ endnetgrent_r(NGR_R_ENT_ARGS)
endnetgrent_r(void)
#endif
{
+#if defined(NGR_R_ENT_ARGS) && !defined(NGR_R_PRIVATE)
+ UNUSED(buf);
+ UNUSED(buflen);
+#endif
+
endnetgrent();
#ifdef NGR_R_PRIVATE
if (*buf != NULL)
diff --git a/contrib/bind9/lib/bind/irs/hesiod.c b/contrib/bind9/lib/bind/irs/hesiod.c
index 9b0efeb..618c592 100644
--- a/contrib/bind9/lib/bind/irs/hesiod.c
+++ b/contrib/bind9/lib/bind/irs/hesiod.c
@@ -1,5 +1,5 @@
#if defined(LIBC_SCCS) && !defined(lint)
-static const char rcsid[] = "$Id: hesiod.c,v 1.1.2.1.4.3 2004/05/17 07:48:56 marka Exp $";
+static const char rcsid[] = "$Id: hesiod.c,v 1.1.2.1.4.4 2005/07/28 07:43:19 marka Exp $";
#endif
/*
@@ -83,9 +83,7 @@ hesiod_init(void **context) {
return (-1);
}
- ctx->LHS = NULL;
- ctx->RHS = NULL;
- ctx->res = NULL;
+ memset(ctx, 0, sizeof (*ctx));
if (parse_config_file(ctx, _PATH_HESIOD_CONF) < 0) {
#ifdef DEF_RHS
diff --git a/contrib/bind9/lib/bind/isc/ev_connects.c b/contrib/bind9/lib/bind/isc/ev_connects.c
index 043e5f4..4b0dd22 100644
--- a/contrib/bind9/lib/bind/isc/ev_connects.c
+++ b/contrib/bind9/lib/bind/isc/ev_connects.c
@@ -20,7 +20,7 @@
*/
#if !defined(LINT) && !defined(CODECENTER)
-static const char rcsid[] = "$Id: ev_connects.c,v 1.4.206.1 2004/03/09 08:33:40 marka Exp $";
+static const char rcsid[] = "$Id: ev_connects.c,v 1.4.206.2 2005/07/08 04:52:54 marka Exp $";
#endif
/* Import. */
@@ -168,10 +168,10 @@ evCancelConn(evContext opaqueCtx, evConnID id) {
return (-1);
} else {
#ifdef USE_FIONBIO_IOCTL
- int on = 1;
- OK(ioctl(this->fd, FIONBIO, (char *)&on));
+ int off = 0;
+ OK(ioctl(this->fd, FIONBIO, (char *)&off));
#else
- OK(fcntl(this->fd, F_SETFL, mode | PORT_NONBLOCK));
+ OK(fcntl(this->fd, F_SETFL, mode & ~PORT_NONBLOCK));
#endif
}
}
diff --git a/contrib/bind9/lib/bind/isc/ev_files.c b/contrib/bind9/lib/bind/isc/ev_files.c
index 4d5eb55..1f95ed0 100644
--- a/contrib/bind9/lib/bind/isc/ev_files.c
+++ b/contrib/bind9/lib/bind/isc/ev_files.c
@@ -20,7 +20,7 @@
*/
#if !defined(LINT) && !defined(CODECENTER)
-static const char rcsid[] = "$Id: ev_files.c,v 1.3.2.1.4.1 2004/03/09 08:33:42 marka Exp $";
+static const char rcsid[] = "$Id: ev_files.c,v 1.3.2.1.4.3 2005/07/28 07:43:19 marka Exp $";
#endif
#include "port_before.h"
@@ -58,8 +58,10 @@ evSelectFD(evContext opaqueCtx,
ctx, fd, eventmask, func, uap);
if (eventmask == 0 || (eventmask & ~EV_MASK_ALL) != 0)
EV_ERR(EINVAL);
+#ifndef USE_POLL
if (fd > ctx->highestFD)
EV_ERR(EINVAL);
+#endif
OK(mode = fcntl(fd, F_GETFL, NULL)); /* side effect: validate fd. */
/*
@@ -68,6 +70,11 @@ evSelectFD(evContext opaqueCtx,
* of our deselect()'s have to leave it in O_NONBLOCK. If not, then
* all but our last deselect() has to leave it in O_NONBLOCK.
*/
+#ifdef USE_POLL
+ /* Make sure both ctx->pollfds[] and ctx->fdTable[] are large enough */
+ if (fd >= ctx->maxnfds && evPollfdRealloc(ctx, 1, fd) != 0)
+ EV_ERR(ENOMEM);
+#endif /* USE_POLL */
id = FindFD(ctx, fd, EV_MASK_ALL);
if (id == NULL) {
if (mode & PORT_NONBLOCK)
@@ -143,13 +150,6 @@ evSelectFD(evContext opaqueCtx,
if (opaqueID)
opaqueID->opaque = id;
- evPrintf(ctx, 5,
- "evSelectFD(fd %d, mask 0x%x): new masks: 0x%lx 0x%lx 0x%lx\n",
- fd, eventmask,
- (u_long)ctx->rdNext.fds_bits[0],
- (u_long)ctx->wrNext.fds_bits[0],
- (u_long)ctx->exNext.fds_bits[0]);
-
return (0);
}
@@ -204,7 +204,7 @@ evDeselectFD(evContext opaqueCtx, evFileID opaqueID) {
* and (b) the caller didn't ask us anything about O_NONBLOCK.
*/
#ifdef USE_FIONBIO_IOCTL
- int off = 1;
+ int off = 0;
(void) ioctl(del->fd, FIONBIO, (char *)&off);
#else
(void) fcntl(del->fd, F_SETFL, mode & ~PORT_NONBLOCK);
@@ -259,13 +259,6 @@ evDeselectFD(evContext opaqueCtx, evFileID opaqueID) {
if (del == ctx->fdNext)
ctx->fdNext = del->next;
- evPrintf(ctx, 5,
- "evDeselectFD(fd %d, mask 0x%x): new masks: 0x%lx 0x%lx 0x%lx\n",
- del->fd, eventmask,
- (u_long)ctx->rdNext.fds_bits[0],
- (u_long)ctx->wrNext.fds_bits[0],
- (u_long)ctx->exNext.fds_bits[0]);
-
/* Couldn't free it before now since we were using fields out of it. */
FREE(del);
diff --git a/contrib/bind9/lib/bind/isc/eventlib.c b/contrib/bind9/lib/bind/isc/eventlib.c
index 06d791e..77b1414 100644
--- a/contrib/bind9/lib/bind/isc/eventlib.c
+++ b/contrib/bind9/lib/bind/isc/eventlib.c
@@ -20,7 +20,7 @@
*/
#if !defined(LINT) && !defined(CODECENTER)
-static const char rcsid[] = "$Id: eventlib.c,v 1.2.2.1.4.4 2004/12/09 04:07:15 marka Exp $";
+static const char rcsid[] = "$Id: eventlib.c,v 1.2.2.1.4.5 2005/07/28 07:43:20 marka Exp $";
#endif
#include "port_before.h"
@@ -29,6 +29,9 @@ static const char rcsid[] = "$Id: eventlib.c,v 1.2.2.1.4.4 2004/12/09 04:07:15 m
#include <sys/types.h>
#include <sys/time.h>
#include <sys/stat.h>
+#ifdef SOLARIS2
+#include <limits.h>
+#endif /* SOLARIS2 */
#include <errno.h>
#include <signal.h>
@@ -44,9 +47,13 @@ static const char rcsid[] = "$Id: eventlib.c,v 1.2.2.1.4.4 2004/12/09 04:07:15 m
int __evOptMonoTime;
+#ifdef USE_POLL
+#define pselect Pselect
+#endif /* USE_POLL */
+
/* Forward. */
-#ifdef NEED_PSELECT
+#if defined(NEED_PSELECT) || defined(USE_POLL)
static int pselect(int, void *, void *, void *,
struct timespec *,
const sigset_t *);
@@ -78,6 +85,18 @@ evCreate(evContext *opaqueCtx) {
INIT_LIST(ctx->accepts);
/* Files. */
+#ifdef USE_POLL
+ ctx->pollfds = NULL;
+ ctx->maxnfds = 0;
+ ctx->firstfd = 0;
+ emulMaskInit(ctx, rdLast, EV_READ, 1);
+ emulMaskInit(ctx, rdNext, EV_READ, 0);
+ emulMaskInit(ctx, wrLast, EV_WRITE, 1);
+ emulMaskInit(ctx, wrNext, EV_WRITE, 0);
+ emulMaskInit(ctx, exLast, EV_EXCEPT, 1);
+ emulMaskInit(ctx, exNext, EV_EXCEPT, 0);
+ emulMaskInit(ctx, nonblockBefore, EV_WASNONBLOCKING, 0);
+#endif /* USE_POLL */
ctx->files = NULL;
FD_ZERO(&ctx->rdNext);
FD_ZERO(&ctx->wrNext);
@@ -86,11 +105,16 @@ evCreate(evContext *opaqueCtx) {
ctx->fdMax = -1;
ctx->fdNext = NULL;
ctx->fdCount = 0; /* Invalidate {rd,wr,ex}Last. */
+#ifndef USE_POLL
ctx->highestFD = FD_SETSIZE - 1;
+ memset(ctx->fdTable, 0, sizeof ctx->fdTable);
+#else
+ ctx->highestFD = INT_MAX / sizeof(struct pollfd);
+ ctx->fdTable = NULL;
+#endif
#ifdef EVENTLIB_TIME_CHECKS
ctx->lastFdCount = 0;
#endif
- memset(ctx->fdTable, 0, sizeof ctx->fdTable);
/* Streams. */
ctx->streams = NULL;
@@ -284,34 +308,37 @@ evGetNext(evContext opaqueCtx, evEvent *opaqueEv, int options) {
}
#endif
do {
+#ifndef USE_POLL
/* XXX need to copy only the bits we are using. */
ctx->rdLast = ctx->rdNext;
ctx->wrLast = ctx->wrNext;
ctx->exLast = ctx->exNext;
-
+#else
+ /*
+ * The pollfd structure uses separate fields for
+ * the input and output events (corresponding to
+ * the ??Next and ??Last fd sets), so there's no
+ * need to copy one to the other.
+ */
+#endif /* USE_POLL */
if (m == Timer) {
INSIST(tp == &t);
t = evSubTime(nextTime, ctx->lastEventTime);
}
- evPrintf(ctx, 4,
- "pselect(%d, 0x%lx, 0x%lx, 0x%lx, %ld.%09ld)\n",
- ctx->fdMax+1,
- (u_long)ctx->rdLast.fds_bits[0],
- (u_long)ctx->wrLast.fds_bits[0],
- (u_long)ctx->exLast.fds_bits[0],
- tp ? (long)tp->tv_sec : -1L,
- tp ? tp->tv_nsec : -1);
-
/* XXX should predict system's earliness and adjust. */
x = pselect(ctx->fdMax+1,
&ctx->rdLast, &ctx->wrLast, &ctx->exLast,
tp, NULL);
pselect_errno = errno;
+#ifndef USE_POLL
evPrintf(ctx, 4, "select() returns %d (err: %s)\n",
x, (x == -1) ? strerror(errno) : "none");
-
+#else
+ evPrintf(ctx, 4, "poll() returns %d (err: %s)\n",
+ x, (x == -1) ? strerror(errno) : "none");
+#endif /* USE_POLL */
/* Anything but a poll can change the time. */
if (m != JustPoll)
ctx->lastEventTime = evNowTime();
@@ -704,7 +731,7 @@ evGetOption(evContext *opaqueCtx, const char *option, int *value) {
return (-1);
}
-#ifdef NEED_PSELECT
+#if defined(NEED_PSELECT) || defined(USE_POLL)
/* XXX needs to move to the porting library. */
static int
pselect(int nfds, void *rfds, void *wfds, void *efds,
@@ -714,15 +741,69 @@ pselect(int nfds, void *rfds, void *wfds, void *efds,
struct timeval tv, *tvp;
sigset_t sigs;
int n;
+#ifdef USE_POLL
+ int polltimeout = INFTIM;
+ evContext_p *ctx;
+ struct pollfd *fds;
+ nfds_t pnfds;
+
+ UNUSED(nfds);
+#endif /* USE_POLL */
if (tsp) {
tvp = &tv;
tv = evTimeVal(*tsp);
+#ifdef USE_POLL
+ polltimeout = 1000 * tv.tv_sec + tv.tv_usec / 1000;
+#endif /* USE_POLL */
} else
tvp = NULL;
if (sigmask)
sigprocmask(SIG_SETMASK, sigmask, &sigs);
+#ifndef USE_POLL
n = select(nfds, rfds, wfds, efds, tvp);
+#else
+ /*
+ * rfds, wfds, and efds should all be from the same evContext_p,
+ * so any of them will do. If they're all NULL, the caller is
+ * presumably calling us to block.
+ */
+ if (rfds != NULL)
+ ctx = ((__evEmulMask *)rfds)->ctx;
+ else if (wfds != NULL)
+ ctx = ((__evEmulMask *)wfds)->ctx;
+ else if (efds != NULL)
+ ctx = ((__evEmulMask *)efds)->ctx;
+ else
+ ctx = NULL;
+ if (ctx != NULL && ctx->fdMax != -1) {
+ fds = &(ctx->pollfds[ctx->firstfd]);
+ pnfds = ctx->fdMax - ctx->firstfd + 1;
+ } else {
+ fds = NULL;
+ pnfds = 0;
+ }
+ n = poll(fds, pnfds, polltimeout);
+ /*
+ * pselect() should return the total number of events on the file
+ * desriptors, not just the count of fd:s with activity. Hence,
+ * traverse the pollfds array and count the events.
+ */
+ if (n > 0) {
+ int i, e;
+ for (e = 0, i = ctx->firstfd; i <= ctx->fdMax; i++) {
+ if (ctx->pollfds[i].fd < 0)
+ continue;
+ if (FD_ISSET(i, &ctx->rdLast))
+ e++;
+ if (FD_ISSET(i, &ctx->wrLast))
+ e++;
+ if (FD_ISSET(i, &ctx->exLast))
+ e++;
+ }
+ n = e;
+ }
+#endif /* USE_POLL */
if (sigmask)
sigprocmask(SIG_SETMASK, &sigs, NULL);
if (tsp)
@@ -730,3 +811,127 @@ pselect(int nfds, void *rfds, void *wfds, void *efds,
return (n);
}
#endif
+
+#ifdef USE_POLL
+int
+evPollfdRealloc(evContext_p *ctx, int pollfd_chunk_size, int fd) {
+
+ int i, maxnfds;
+ void *pollfds, *fdTable;
+
+ if (fd < ctx->maxnfds)
+ return (0);
+
+ /* Don't allow ridiculously small values for pollfd_chunk_size */
+ if (pollfd_chunk_size < 20)
+ pollfd_chunk_size = 20;
+
+ maxnfds = (1 + (fd/pollfd_chunk_size)) * pollfd_chunk_size;
+
+ pollfds = realloc(ctx->pollfds, maxnfds * sizeof(*ctx->pollfds));
+ if (pollfds != NULL)
+ ctx->pollfds = pollfds;
+ fdTable = realloc(ctx->fdTable, maxnfds * sizeof(*ctx->fdTable));
+ if (fdTable != NULL)
+ ctx->fdTable = fdTable;
+
+ if (pollfds == NULL || fdTable == NULL) {
+ evPrintf(ctx, 2, "pollfd() realloc (%ld) failed\n",
+ (long)maxnfds*sizeof(struct pollfd));
+ return (-1);
+ }
+
+ for (i = ctx->maxnfds; i < maxnfds; i++) {
+ ctx->pollfds[i].fd = -1;
+ ctx->pollfds[i].events = 0;
+ ctx->fdTable[i] = 0;
+ }
+
+ ctx->maxnfds = maxnfds;
+
+ return (0);
+}
+
+/* Find the appropriate 'events' or 'revents' field in the pollfds array */
+short *
+__fd_eventfield(int fd, __evEmulMask *maskp) {
+
+ evContext_p *ctx = (evContext_p *)maskp->ctx;
+
+ if (!maskp->result || maskp->type == EV_WASNONBLOCKING)
+ return (&(ctx->pollfds[fd].events));
+ else
+ return (&(ctx->pollfds[fd].revents));
+}
+
+/* Translate to poll(2) event */
+short
+__poll_event(__evEmulMask *maskp) {
+
+ switch ((maskp)->type) {
+ case EV_READ:
+ return (POLLRDNORM);
+ case EV_WRITE:
+ return (POLLWRNORM);
+ case EV_EXCEPT:
+ return (POLLRDBAND | POLLPRI | POLLWRBAND);
+ case EV_WASNONBLOCKING:
+ return (POLLHUP);
+ default:
+ return (0);
+ }
+}
+
+/*
+ * Clear the events corresponding to the specified mask. If this leaves
+ * the events mask empty (apart from the POLLHUP bit), set the fd field
+ * to -1 so that poll(2) will ignore this fd.
+ */
+void
+__fd_clr(int fd, __evEmulMask *maskp) {
+
+ evContext_p *ctx = maskp->ctx;
+
+ *__fd_eventfield(fd, maskp) &= ~__poll_event(maskp);
+ if ((ctx->pollfds[fd].events & ~POLLHUP) == 0) {
+ ctx->pollfds[fd].fd = -1;
+ if (fd == ctx->fdMax)
+ while (ctx->fdMax > ctx->firstfd &&
+ ctx->pollfds[ctx->fdMax].fd < 0)
+ ctx->fdMax--;
+ if (fd == ctx->firstfd)
+ while (ctx->firstfd <= ctx->fdMax &&
+ ctx->pollfds[ctx->firstfd].fd < 0)
+ ctx->firstfd++;
+ /*
+ * Do we have a empty set of descriptors?
+ */
+ if (ctx->firstfd > ctx->fdMax) {
+ ctx->fdMax = -1;
+ ctx->firstfd = 0;
+ }
+ }
+}
+
+/*
+ * Set the events bit(s) corresponding to the specified mask. If the events
+ * field has any other bits than POLLHUP set, also set the fd field so that
+ * poll(2) will watch this fd.
+ */
+void
+__fd_set(int fd, __evEmulMask *maskp) {
+
+ evContext_p *ctx = maskp->ctx;
+
+ *__fd_eventfield(fd, maskp) |= __poll_event(maskp);
+ if ((ctx->pollfds[fd].events & ~POLLHUP) != 0) {
+ ctx->pollfds[fd].fd = fd;
+ if (fd < ctx->firstfd || ctx->fdMax == -1)
+ ctx->firstfd = fd;
+ if (fd > ctx->fdMax)
+ ctx->fdMax = fd;
+ }
+}
+#endif /* USE_POLL */
+
+/*! \file */
diff --git a/contrib/bind9/lib/bind/isc/eventlib_p.h b/contrib/bind9/lib/bind/isc/eventlib_p.h
index 8c58c7f..b95741d 100644
--- a/contrib/bind9/lib/bind/isc/eventlib_p.h
+++ b/contrib/bind9/lib/bind/isc/eventlib_p.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 2005 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 1995-1999 by Internet Software Consortium
*
* Permission to use, copy, modify, and distribute this software for any
@@ -18,7 +18,7 @@
/* eventlib_p.h - private interfaces for eventlib
* vix 09sep95 [initial]
*
- * $Id: eventlib_p.h,v 1.3.2.1.4.2 2004/12/05 22:38:43 marka Exp $
+ * $Id: eventlib_p.h,v 1.3.2.1.4.3 2005/07/28 07:43:20 marka Exp $
*/
#ifndef _EVENTLIB_P_H
@@ -63,6 +63,13 @@
#define FILL(p)
#endif
+#ifdef USE_POLL
+#ifdef HAVE_STROPTS_H
+#include <stropts.h>
+#endif
+#include <poll.h>
+#endif /* USE_POLL */
+
typedef struct evConn {
evConnFunc func;
void * uap;
@@ -166,6 +173,40 @@ typedef struct evEvent_p {
} u;
} evEvent_p;
+#ifdef USE_POLL
+typedef struct {
+ void *ctx; /* pointer to the evContext_p */
+ uint32_t type; /* READ, WRITE, EXCEPT, nonblk */
+ uint32_t result; /* 1 => revents, 0 => events */
+} __evEmulMask;
+
+#define emulMaskInit(ctx, field, ev, lastnext) \
+ ctx->field.ctx = ctx; \
+ ctx->field.type = ev; \
+ ctx->field.result = lastnext;
+
+extern short *__fd_eventfield(int fd, __evEmulMask *maskp);
+extern short __poll_event(__evEmulMask *maskp);
+extern void __fd_clr(int fd, __evEmulMask *maskp);
+extern void __fd_set(int fd, __evEmulMask *maskp);
+
+#undef FD_ZERO
+#define FD_ZERO(maskp)
+
+#undef FD_SET
+#define FD_SET(fd, maskp) \
+ __fd_set(fd, maskp)
+
+#undef FD_CLR
+#define FD_CLR(fd, maskp) \
+ __fd_clr(fd, maskp)
+
+#undef FD_ISSET
+#define FD_ISSET(fd, maskp) \
+ ((*__fd_eventfield(fd, maskp) & __poll_event(maskp)) != 0)
+
+#endif /* USE_POLL */
+
typedef struct {
/* Global. */
const evEvent_p *cur;
@@ -177,12 +218,26 @@ typedef struct {
LIST(evAccept) accepts;
/* Files. */
evFile *files, *fdNext;
+#ifndef USE_POLL
fd_set rdLast, rdNext;
fd_set wrLast, wrNext;
fd_set exLast, exNext;
fd_set nonblockBefore;
int fdMax, fdCount, highestFD;
evFile *fdTable[FD_SETSIZE];
+#else
+ struct pollfd *pollfds; /* Allocated as needed */
+ evFile **fdTable; /* Ditto */
+ int maxnfds; /* # elements in above */
+ int firstfd; /* First active fd */
+ int fdMax; /* Last active fd */
+ int fdCount; /* # fd:s with I/O */
+ int highestFD; /* max fd allowed by OS */
+ __evEmulMask rdLast, rdNext;
+ __evEmulMask wrLast, wrNext;
+ __evEmulMask exLast, exNext;
+ __evEmulMask nonblockBefore;
+#endif /* USE_POLL */
#ifdef EVENTLIB_TIME_CHECKS
struct timespec lastSelectTime;
int lastFdCount;
@@ -203,6 +258,10 @@ typedef struct {
void evPrintf(const evContext_p *ctx, int level, const char *fmt, ...)
ISC_FORMAT_PRINTF(3, 4);
+#ifdef USE_POLL
+extern int evPollfdRealloc(evContext_p *ctx, int pollfd_chunk_size, int fd);
+#endif /* USE_POLL */
+
/* ev_timers.c */
#define evCreateTimers __evCreateTimers
heap_context evCreateTimers(const evContext_p *);
diff --git a/contrib/bind9/lib/bind/isc/memcluster.c b/contrib/bind9/lib/bind/isc/memcluster.c
index 0632ec7..c5b7202 100644
--- a/contrib/bind9/lib/bind/isc/memcluster.c
+++ b/contrib/bind9/lib/bind/isc/memcluster.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 2005 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 1997,1999 by Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -24,7 +24,7 @@
#if !defined(LINT) && !defined(CODECENTER)
-static const char rcsid[] = "$Id: memcluster.c,v 1.3.206.4 2004/09/16 00:57:34 marka Exp $";
+static const char rcsid[] = "$Id: memcluster.c,v 1.3.206.7 2005/10/11 00:48:15 marka Exp $";
#endif /* not lint */
#include "port_before.h"
@@ -90,12 +90,28 @@ struct stats {
u_long freefrags;
};
+#ifdef DO_PTHREADS
+#include <pthread.h>
+static pthread_mutex_t memlock = PTHREAD_MUTEX_INITIALIZER;
+#define MEMLOCK (void)pthread_mutex_lock(&memlock)
+#define MEMUNLOCK (void)pthread_mutex_unlock(&memlock)
+#else
+/*
+ * Catch bad lock usage in non threaded build.
+ */
+static unsigned int memlock = 0;
+#define MEMLOCK do { INSIST(memlock == 0); memlock = 1; } while (0)
+#define MEMUNLOCK do { INSIST(memlock == 1); memlock = 0; } while (0)
+#endif /* DO_PTHEADS */
+
/* Private data. */
static size_t max_size;
static size_t mem_target;
+#ifndef MEMCLUSTER_BIG_MALLOC
static size_t mem_target_half;
static size_t mem_target_fudge;
+#endif
static memcluster_element ** freelists;
#ifdef MEMCLUSTER_RECORD
static memcluster_element ** activelists;
@@ -132,8 +148,10 @@ meminit(size_t init_max_size, size_t target_size) {
mem_target = DEF_MEM_TARGET;
else
mem_target = target_size;
+#ifndef MEMCLUSTER_BIG_MALLOC
mem_target_half = mem_target / 2;
mem_target_fudge = mem_target + mem_target / 4;
+#endif
freelists = malloc(max_size * sizeof (memcluster_element *));
stats = malloc((max_size+1) * sizeof (struct stats));
if (freelists == NULL || stats == NULL) {
@@ -173,14 +191,20 @@ __memget_record(size_t size, const char *file, int line) {
#endif
void *ret;
+ MEMLOCK;
+
#if !defined(MEMCLUSTER_RECORD)
UNUSED(file);
UNUSED(line);
#endif
- if (freelists == NULL)
- if (meminit(0, 0) == -1)
+ if (freelists == NULL) {
+ if (meminit(0, 0) == -1) {
+ MEMUNLOCK;
return (NULL);
+ }
+ }
if (size == 0U) {
+ MEMUNLOCK;
errno = EINVAL;
return (NULL);
}
@@ -191,6 +215,7 @@ __memget_record(size_t size, const char *file, int line) {
#if defined(DEBUGGING_MEMCLUSTER)
e = malloc(new_size);
if (e == NULL) {
+ MEMUNLOCK;
errno = ENOMEM;
return (NULL);
}
@@ -202,11 +227,13 @@ __memget_record(size_t size, const char *file, int line) {
e->next = activelists[max_size];
activelists[max_size] = e;
#endif
+ MEMUNLOCK;
e->fencepost = FRONT_FENCEPOST;
p = (char *)e + sizeof *e + size;
memcpy(p, &fp, sizeof fp);
return ((char *)e + sizeof *e);
#else
+ MEMUNLOCK;
return (malloc(size));
#endif
}
@@ -226,6 +253,7 @@ __memget_record(size_t size, const char *file, int line) {
if (basic_blocks == NULL) {
new = malloc(NUM_BASIC_BLOCKS * mem_target);
if (new == NULL) {
+ MEMUNLOCK;
errno = ENOMEM;
return (NULL);
}
@@ -253,6 +281,7 @@ __memget_record(size_t size, const char *file, int line) {
total_size = mem_target;
new = malloc(total_size);
if (new == NULL) {
+ MEMUNLOCK;
errno = ENOMEM;
return (NULL);
}
@@ -318,6 +347,7 @@ __memget_record(size_t size, const char *file, int line) {
stats[size].gets++;
stats[size].totalgets++;
stats[new_size].freefrags--;
+ MEMUNLOCK;
#if defined(DEBUGGING_MEMCLUSTER)
return ((char *)e + sizeof *e);
#else
@@ -347,6 +377,8 @@ __memput_record(void *mem, size_t size, const char *file, int line) {
char *p;
#endif
+ MEMLOCK;
+
#if !defined (MEMCLUSTER_RECORD)
UNUSED(file);
UNUSED(line);
@@ -355,6 +387,7 @@ __memput_record(void *mem, size_t size, const char *file, int line) {
REQUIRE(freelists != NULL);
if (size == 0U) {
+ MEMUNLOCK;
errno = EINVAL;
return;
}
@@ -398,6 +431,7 @@ __memput_record(void *mem, size_t size, const char *file, int line) {
INSIST(stats[max_size].gets != 0U);
stats[max_size].gets--;
+ MEMUNLOCK;
return;
}
@@ -436,6 +470,7 @@ __memput_record(void *mem, size_t size, const char *file, int line) {
INSIST(stats[size].gets != 0U);
stats[size].gets--;
stats[new_size].freefrags++;
+ MEMUNLOCK;
}
void *
@@ -464,8 +499,12 @@ memstats(FILE *out) {
memcluster_element *e;
#endif
- if (freelists == NULL)
+ MEMLOCK;
+
+ if (freelists == NULL) {
+ MEMUNLOCK;
return;
+ }
for (i = 1; i <= max_size; i++) {
const struct stats *s = &stats[i];
@@ -492,6 +531,7 @@ memstats(FILE *out) {
}
}
#endif
+ MEMUNLOCK;
}
int
diff --git a/contrib/bind9/lib/bind/nameser/ns_parse.c b/contrib/bind9/lib/bind/nameser/ns_parse.c
index 34ebd3d..19a6f51 100644
--- a/contrib/bind9/lib/bind/nameser/ns_parse.c
+++ b/contrib/bind9/lib/bind/nameser/ns_parse.c
@@ -16,7 +16,7 @@
*/
#ifndef lint
-static const char rcsid[] = "$Id: ns_parse.c,v 1.3.2.1.4.1 2004/03/09 08:33:44 marka Exp $";
+static const char rcsid[] = "$Id: ns_parse.c,v 1.3.2.1.4.3 2005/10/11 00:48:16 marka Exp $";
#endif
/* Import. */
@@ -40,7 +40,12 @@ static void setsection(ns_msg *msg, ns_sect sect);
/* Macros. */
+#ifndef SOLARIS2
#define RETERR(err) do { errno = (err); return (-1); } while (0)
+#else
+#define RETERR(err) \
+ do { errno = (err); if (errno == errno) return (-1); } while (0)
+#endif
/* Public. */
@@ -135,7 +140,8 @@ ns_parserr(ns_msg *handle, ns_sect section, int rrnum, ns_rr *rr) {
int tmp;
/* Make section right. */
- if ((tmp = section) < 0 || section >= ns_s_max)
+ tmp = section;
+ if (tmp < 0 || section >= ns_s_max)
RETERR(ENODEV);
if (section != handle->_sect)
setsection(handle, section);
diff --git a/contrib/bind9/lib/bind/nameser/ns_ttl.c b/contrib/bind9/lib/bind/nameser/ns_ttl.c
index 368b05a..4d18d3f 100644
--- a/contrib/bind9/lib/bind/nameser/ns_ttl.c
+++ b/contrib/bind9/lib/bind/nameser/ns_ttl.c
@@ -16,7 +16,7 @@
*/
#ifndef lint
-static const char rcsid[] = "$Id: ns_ttl.c,v 1.1.206.1 2004/03/09 08:33:45 marka Exp $";
+static const char rcsid[] = "$Id: ns_ttl.c,v 1.1.206.2 2005/07/28 07:43:21 marka Exp $";
#endif
/* Import. */
@@ -133,7 +133,8 @@ ns_parse_ttl(const char *src, u_long *dst) {
goto einval;
else
ttl += tmp;
- }
+ } else if (!dirty)
+ goto einval;
*dst = ttl;
return (0);
diff --git a/contrib/bind9/lib/bind/nameser/ns_verify.c b/contrib/bind9/lib/bind/nameser/ns_verify.c
index 7ee00a6..adda249 100644
--- a/contrib/bind9/lib/bind/nameser/ns_verify.c
+++ b/contrib/bind9/lib/bind/nameser/ns_verify.c
@@ -16,7 +16,7 @@
*/
#ifndef lint
-static const char rcsid[] = "$Id: ns_verify.c,v 1.1.206.1 2004/03/09 08:33:45 marka Exp $";
+static const char rcsid[] = "$Id: ns_verify.c,v 1.1.206.2 2005/10/11 00:48:16 marka Exp $";
#endif
/* Import. */
@@ -144,7 +144,7 @@ ns_verify(u_char *msg, int *msglen, void *k,
int n;
int error;
u_int16_t type, length;
- u_int16_t fudge, sigfieldlen, id, otherfieldlen;
+ u_int16_t fudge, sigfieldlen, otherfieldlen;
dst_init();
if (msg == NULL || msglen == NULL || *msglen < 0)
@@ -198,9 +198,9 @@ ns_verify(u_char *msg, int *msglen, void *k,
sigstart = cp;
cp += sigfieldlen;
- /* Read the original id and error. */
+ /* Skip id and read error. */
BOUNDS_CHECK(cp, 2*INT16SZ);
- GETSHORT(id, cp);
+ cp += INT16SZ;
GETSHORT(error, cp);
/* Parse the other data. */
@@ -341,12 +341,12 @@ ns_verify_tcp(u_char *msg, int *msglen, ns_tcp_tsig_state *state,
int required)
{
HEADER *hp = (HEADER *)msg;
- u_char *recstart, *rdatastart, *sigstart;
+ u_char *recstart, *sigstart;
unsigned int sigfieldlen, otherfieldlen;
u_char *cp, *eom = msg + *msglen, *cp2;
char name[MAXDNAME], alg[MAXDNAME];
u_char buf[MAXDNAME];
- int n, type, length, fudge, id, error;
+ int n, type, length, fudge, error;
time_t timesigned;
if (msg == NULL || msglen == NULL || state == NULL)
@@ -403,7 +403,6 @@ ns_verify_tcp(u_char *msg, int *msglen, ns_tcp_tsig_state *state,
return (NS_TSIG_ERROR_FORMERR);
/* Read the algorithm name. */
- rdatastart = cp;
n = dn_expand(msg, eom, cp, alg, MAXDNAME);
if (n < 0)
return (NS_TSIG_ERROR_FORMERR);
@@ -429,9 +428,9 @@ ns_verify_tcp(u_char *msg, int *msglen, ns_tcp_tsig_state *state,
sigstart = cp;
cp += sigfieldlen;
- /* Read the original id and error. */
+ /* Skip id and read error. */
BOUNDS_CHECK(cp, 2*INT16SZ);
- GETSHORT(id, cp);
+ cp += INT16SZ;
GETSHORT(error, cp);
/* Parse the other data. */
diff --git a/contrib/bind9/lib/bind/port_after.h.in b/contrib/bind9/lib/bind/port_after.h.in
index c043561..0c956b7 100644
--- a/contrib/bind9/lib/bind/port_after.h.in
+++ b/contrib/bind9/lib/bind/port_after.h.in
@@ -8,6 +8,9 @@
#if (!defined(BSD)) || (BSD < 199306)
#include <sys/bitypes.h>
#endif
+#ifdef HAVE_INTTYPES_H
+#include <inttypes.h>
+#endif
@NEED_PSELECT@
@HAVE_SA_LEN@
@@ -27,9 +30,7 @@
@INNETGR_ARGS@
@SETNETGRENT_ARGS@
@USE_IFNAMELINKID@
-
-/* XXX sunos and cygwin needs O_NDELAY */
-#define PORT_NONBLOCK O_NONBLOCK
+@PORT_NONBLOCK@
/*
* We need to know the IPv6 address family number even on IPv4-only systems.
@@ -255,7 +256,7 @@ char * strsep(char **stringp, const char *delim);
#endif
#ifndef ALIGN
-#define ALIGN(p) (((unsigned int)(p) + (sizeof(int) - 1)) & ~(sizeof(int) - 1))
+#define ALIGN(p) (((uintptr_t)(p) + (sizeof(long) - 1)) & ~(sizeof(long) - 1))
#endif
#ifdef NEED_SETGROUPENT
@@ -298,7 +299,7 @@ GROUP_R_SET_RETURN setgrent_r(GROUP_R_ENT_ARGS);
GROUP_R_END_RETURN endgrent_r(GROUP_R_ENT_ARGS);
#endif
-#ifdef NEED_INNETGR_R
+#if defined(NEED_INNETGR_R) && defined(NGR_R_RETURN)
NGR_R_RETURN
innetgr_r(const char *, const char *, const char *, const char *);
#endif
@@ -381,7 +382,9 @@ int isc__gettimeofday(struct timeval *tp, struct timezone *tzp);
int getnetgrent(char **machinep, char **userp, char **domainp);
+#ifdef NGR_R_ARGS
int getnetgrent_r(char **machinep, char **userp, char **domainp, NGR_R_ARGS);
+#endif
#ifdef SETNETGRENT_ARGS
void setnetgrent(SETNETGRENT_ARGS);
diff --git a/contrib/bind9/lib/bind/port_before.h.in b/contrib/bind9/lib/bind/port_before.h.in
index d6fbe86..c754efd 100644
--- a/contrib/bind9/lib/bind/port_before.h.in
+++ b/contrib/bind9/lib/bind/port_before.h.in
@@ -18,6 +18,9 @@ struct timezone; /* silence warning */
@WANT_IRS_PW@
@BSD_COMP@
+@USE_POLL@
+@HAVE_MD5@
+@SOLARIS2@
@DO_PTHREADS@
@GETGROUPLIST_ARGS@
@@ -135,4 +138,9 @@ struct timezone; /* silence warning */
#define ISC_FORMAT_PRINTF(fmt, args)
#endif
+/* Pull in host order macros when _XOPEN_SOURCE_EXTENDED is defined. */
+#if defined(__hpux) && defined(_XOPEN_SOURCE_EXTENDED)
+#include <sys/byteorder.h>
+#endif
+
#endif
diff --git a/contrib/bind9/lib/bind/resolv/Makefile.in b/contrib/bind9/lib/bind/resolv/Makefile.in
index 74a20e7..a235fbc 100644
--- a/contrib/bind9/lib/bind/resolv/Makefile.in
+++ b/contrib/bind9/lib/bind/resolv/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
# Copyright (C) 2001 Internet Software Consortium.
#
# Permission to use, copy, modify, and distribute this software for any
@@ -13,16 +13,16 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
-# $Id: Makefile.in,v 1.3.206.1 2004/03/15 01:02:54 marka Exp $
+# $Id: Makefile.in,v 1.3.206.3 2005/07/29 00:13:09 marka Exp $
srcdir= @srcdir@
VPATH = @srcdir@
-OBJS= herror.@O@ res_comp.@O@ res_data.@O@ res_debug.@O@ \
+OBJS= herror.@O@ mtctxres.@O@ res_comp.@O@ res_data.@O@ res_debug.@O@ \
res_findzonecut.@O@ res_init.@O@ res_mkquery.@O@ res_mkupdate.@O@ \
res_query.@O@ res_send.@O@ res_sendsigned.@O@ res_update.@O@
-SRCS= herror.c res_comp.c res_data.c res_debug.c \
+SRCS= herror.c mtctxres.c res_comp.c res_data.c res_debug.c \
res_findzonecut.c res_init.c res_mkquery.c res_mkupdate.c \
res_query.c res_send.c res_sendsigned.c res_update.c
diff --git a/contrib/bind9/lib/bind/resolv/mtctxres.c b/contrib/bind9/lib/bind/resolv/mtctxres.c
new file mode 100644
index 0000000..f33cf11
--- /dev/null
+++ b/contrib/bind9/lib/bind/resolv/mtctxres.c
@@ -0,0 +1,128 @@
+#include <port_before.h>
+#ifdef DO_PTHREADS
+#include <pthread.h>
+#endif
+#include <errno.h>
+#include <netdb.h>
+#include <stdlib.h>
+#include <string.h>
+#include <resolv_mt.h>
+#include <irs.h>
+#include <port_after.h>
+
+#ifdef DO_PTHREADS
+static pthread_key_t key;
+static int mt_key_initialized = 0;
+
+static int __res_init_ctx(void);
+static void __res_destroy_ctx(void *);
+
+#if defined(sun) && !defined(__GNUC__)
+#pragma init (_mtctxres_init)
+#endif
+#endif
+
+static mtctxres_t sharedctx;
+
+#ifdef DO_PTHREADS
+/*
+ * Initialize the TSD key. By doing this at library load time, we're
+ * implicitly running without interference from other threads, so there's
+ * no need for locking.
+ */
+static void
+_mtctxres_init(void) {
+ int pthread_keycreate_ret;
+
+ pthread_keycreate_ret = pthread_key_create(&key, __res_destroy_ctx);
+ if (pthread_keycreate_ret == 0)
+ mt_key_initialized = 1;
+}
+#endif
+
+/*
+ * To support binaries that used the private MT-safe interface in
+ * Solaris 8, we still need to provide the __res_enable_mt()
+ * and __res_disable_mt() entry points. They're do-nothing routines.
+ */
+int
+__res_enable_mt(void) {
+ return (-1);
+}
+
+int
+__res_disable_mt(void) {
+ return (0);
+}
+
+#ifdef DO_PTHREADS
+static int
+__res_init_ctx(void) {
+
+ mtctxres_t *mt;
+ int ret;
+
+
+ if (pthread_getspecific(key) != 0) {
+ /* Already exists */
+ return (0);
+ }
+
+ if ((mt = malloc(sizeof (mtctxres_t))) == 0) {
+ errno = ENOMEM;
+ return (-1);
+ }
+
+ memset(mt, 0, sizeof (mtctxres_t));
+
+ if ((ret = pthread_setspecific(key, mt)) != 0) {
+ free(mt);
+ errno = ret;
+ return (-1);
+ }
+
+ return (0);
+}
+
+static void
+__res_destroy_ctx(void *value) {
+
+ mtctxres_t *mt = (mtctxres_t *)value;
+
+ if (mt != 0)
+ free(mt);
+}
+#endif
+
+mtctxres_t *
+___mtctxres(void) {
+#ifdef DO_PTHREADS
+ mtctxres_t *mt;
+
+ /*
+ * This if clause should only be executed if we are linking
+ * statically. When linked dynamically _mtctxres_init() should
+ * be called at binding time due the #pragma above.
+ */
+ if (!mt_key_initialized) {
+ static pthread_mutex_t keylock = PTHREAD_MUTEX_INITIALIZER;
+ pthread_mutex_lock(&keylock);
+ _mtctxres_init();
+ pthread_mutex_unlock(&keylock);
+ }
+
+ /*
+ * If we have already been called in this thread return the existing
+ * context. Otherwise recreat a new context and return it. If
+ * that fails return a global context.
+ */
+ if (mt_key_initialized) {
+ if (((mt = pthread_getspecific(key)) != 0) ||
+ (__res_init_ctx() == 0 &&
+ (mt = pthread_getspecific(key)) != 0)) {
+ return (mt);
+ }
+ }
+#endif
+ return (&sharedctx);
+}
diff --git a/contrib/bind9/lib/bind/resolv/res_comp.c b/contrib/bind9/lib/bind/resolv/res_comp.c
index 6468dbc..8cc99a7 100644
--- a/contrib/bind9/lib/bind/resolv/res_comp.c
+++ b/contrib/bind9/lib/bind/resolv/res_comp.c
@@ -70,7 +70,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
static const char sccsid[] = "@(#)res_comp.c 8.1 (Berkeley) 6/4/93";
-static const char rcsid[] = "$Id: res_comp.c,v 1.1.2.1.4.1 2004/03/09 08:33:54 marka Exp $";
+static const char rcsid[] = "$Id: res_comp.c,v 1.1.2.1.4.2 2005/07/28 07:43:22 marka Exp $";
#endif /* LIBC_SCCS and not lint */
#include "port_before.h"
@@ -242,6 +242,18 @@ res_dnok(const char *dn) {
* __getshort
* Note that one _ comes from C and the others come from us.
*/
+
+#ifdef SOLARIS2
+#ifdef __putlong
+#undef __putlong
+#endif
+#ifdef __putshort
+#undef __putshort
+#endif
+#pragma weak putlong = __putlong
+#pragma weak putshort = __putshort
+#endif /* SOLARIS2 */
+
void __putlong(u_int32_t src, u_char *dst) { ns_put32(src, dst); }
void __putshort(u_int16_t src, u_char *dst) { ns_put16(src, dst); }
#ifndef __ultrix__
diff --git a/contrib/bind9/lib/bind/resolv/res_debug.c b/contrib/bind9/lib/bind/resolv/res_debug.c
index 1e228be..8dda12c 100644
--- a/contrib/bind9/lib/bind/resolv/res_debug.c
+++ b/contrib/bind9/lib/bind/resolv/res_debug.c
@@ -95,7 +95,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
static const char sccsid[] = "@(#)res_debug.c 8.1 (Berkeley) 6/4/93";
-static const char rcsid[] = "$Id: res_debug.c,v 1.3.2.5.4.5 2004/07/28 20:16:46 marka Exp $";
+static const char rcsid[] = "$Id: res_debug.c,v 1.3.2.5.4.6 2005/07/28 07:43:22 marka Exp $";
#endif /* LIBC_SCCS and not lint */
#include "port_before.h"
@@ -113,6 +113,7 @@ static const char rcsid[] = "$Id: res_debug.c,v 1.3.2.5.4.5 2004/07/28 20:16:46
#include <math.h>
#include <netdb.h>
#include <resolv.h>
+#include <resolv_mt.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -504,7 +505,7 @@ sym_ston(const struct res_sym *syms, const char *name, int *success) {
const char *
sym_ntos(const struct res_sym *syms, int number, int *success) {
- static char unname[20];
+ char *unname = sym_ntos_unname;
for ((void)NULL; syms->name != 0; syms++) {
if (number == syms->number) {
@@ -522,7 +523,7 @@ sym_ntos(const struct res_sym *syms, int number, int *success) {
const char *
sym_ntop(const struct res_sym *syms, int number, int *success) {
- static char unname[20];
+ char *unname = sym_ntop_unname;
for ((void)NULL; syms->name != 0; syms++) {
if (number == syms->number) {
@@ -596,7 +597,7 @@ p_class(int class) {
*/
const char *
p_option(u_long option) {
- static char nbuf[40];
+ char *nbuf = p_option_nbuf;
switch (option) {
case RES_INIT: return "init";
@@ -639,7 +640,7 @@ p_option(u_long option) {
*/
const char *
p_time(u_int32_t value) {
- static char nbuf[40]; /* XXX nonreentrant */
+ char *nbuf = p_time_nbuf;
if (ns_format_ttl(value, nbuf, sizeof nbuf) < 0)
sprintf(nbuf, "%u", value);
@@ -695,7 +696,7 @@ static const char *
precsize_ntoa(prec)
u_int8_t prec;
{
- static char retbuf[sizeof "90000000.00"]; /* XXX nonreentrant */
+ char *retbuf = precsize_ntoa_retbuf;
unsigned long val;
int mantissa, exponent;
@@ -1097,8 +1098,7 @@ dn_count_labels(const char *name) {
*/
char *
p_secstodate (u_long secs) {
- /* XXX nonreentrant */
- static char output[15]; /* YYYYMMDDHHMMSS and null */
+ char *output = p_secstodate_output;
time_t clock = secs;
struct tm *time;
#ifdef HAVE_TIME_R
diff --git a/contrib/bind9/lib/bind/resolv/res_findzonecut.c b/contrib/bind9/lib/bind/resolv/res_findzonecut.c
index 154babd..804beb6 100644
--- a/contrib/bind9/lib/bind/resolv/res_findzonecut.c
+++ b/contrib/bind9/lib/bind/resolv/res_findzonecut.c
@@ -1,5 +1,5 @@
#if !defined(lint) && !defined(SABER)
-static const char rcsid[] = "$Id: res_findzonecut.c,v 1.2.2.3.4.3 2004/09/16 07:06:11 marka Exp $";
+static const char rcsid[] = "$Id: res_findzonecut.c,v 1.2.2.3.4.4 2005/10/11 00:48:16 marka Exp $";
#endif /* not lint */
/*
@@ -319,7 +319,6 @@ get_soa(res_state statp, const char *dname, ns_class class, int opts,
for (i = 0; i < n; i++) {
const char *t;
const u_char *rdata;
- int rdlen;
ns_rr rr;
if (ns_parserr(&msg, sect, i, &rr) < 0) {
@@ -368,7 +367,6 @@ get_soa(res_state statp, const char *dname, ns_class class, int opts,
}
strcpy(zname, t);
rdata = ns_rr_rdata(rr);
- rdlen = ns_rr_rdlen(rr);
if (ns_name_uncompress(resp, ns_msg_end(msg), rdata,
mname, msize) < 0) {
DPRINTF(("get_soa: ns_name_uncompress failed")
@@ -526,7 +524,6 @@ save_ns(res_state statp, ns_msg *msg, ns_sect sect,
const u_char *rdata;
rr_ns *nsrr;
ns_rr rr;
- int rdlen;
if (ns_parserr(msg, sect, i, &rr) < 0) {
DPRINTF(("save_ns: ns_parserr(%s, %d) failed",
@@ -545,7 +542,6 @@ save_ns(res_state statp, ns_msg *msg, ns_sect sect,
return (-1);
}
rdata = ns_rr_rdata(rr);
- rdlen = ns_rr_rdlen(rr);
if (ns_name_uncompress(ns_msg_base(*msg),
ns_msg_end(*msg), rdata,
tname, sizeof tname) < 0) {
diff --git a/contrib/bind9/lib/bind/resolv/res_init.c b/contrib/bind9/lib/bind/resolv/res_init.c
index 241f5f7..28a3ebd 100644
--- a/contrib/bind9/lib/bind/resolv/res_init.c
+++ b/contrib/bind9/lib/bind/resolv/res_init.c
@@ -70,7 +70,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
static const char sccsid[] = "@(#)res_init.c 8.1 (Berkeley) 6/7/93";
-static const char rcsid[] = "$Id: res_init.c,v 1.9.2.5.4.2 2004/03/16 12:34:18 marka Exp $";
+static const char rcsid[] = "$Id: res_init.c,v 1.9.2.5.4.5 2005/11/03 00:00:52 marka Exp $";
#endif /* LIBC_SCCS and not lint */
#include "port_before.h"
@@ -102,6 +102,10 @@ static const char rcsid[] = "$Id: res_init.c,v 1.9.2.5.4.2 2004/03/16 12:34:18 m
#define RESOLVSORT
#define DEBUG
+#ifdef SOLARIS2
+#include <sys/systeminfo.h>
+#endif
+
static void res_setoptions __P((res_state, const char *, const char *));
#ifdef RESOLVSORT
@@ -163,6 +167,9 @@ __res_vinit(res_state statp, int preinit) {
int dots;
union res_sockaddr_union u[2];
+ if (statp->_u._ext.ext != NULL)
+ res_ndestroy(statp);
+
if (!preinit) {
statp->retrans = RES_TIMEOUT;
statp->retry = RES_DFLRETRY;
@@ -170,9 +177,6 @@ __res_vinit(res_state statp, int preinit) {
statp->id = res_randomid();
}
- if ((statp->options & RES_INIT) != 0U)
- res_ndestroy(statp);
-
memset(u, 0, sizeof(u));
#ifdef USELOOPBACK
u[nserv].sin.sin_addr = inet_makeaddr(IN_LOOPBACKNET, 1);
@@ -212,12 +216,42 @@ __res_vinit(res_state statp, int preinit) {
statp->_u._ext.ext->nsaddrs[0].sin = statp->nsaddr;
strcpy(statp->_u._ext.ext->nsuffix, "ip6.arpa");
strcpy(statp->_u._ext.ext->nsuffix2, "ip6.int");
- }
+ } else
+ return (-1);
#ifdef RESOLVSORT
statp->nsort = 0;
#endif
res_setservers(statp, u, nserv);
+#ifdef SOLARIS2
+ /*
+ * The old libresolv derived the defaultdomain from NIS/NIS+.
+ * We want to keep this behaviour
+ */
+ {
+ char buf[sizeof(statp->defdname)], *cp;
+ int ret;
+
+ if ((ret = sysinfo(SI_SRPC_DOMAIN, buf, sizeof(buf))) > 0 &&
+ (unsigned int)ret <= sizeof(buf)) {
+ if (buf[0] == '+')
+ buf[0] = '.';
+ cp = strchr(buf, '.');
+ if (cp == NULL) {
+ if (strlcpy(statp->defdname, buf,
+ sizeof(statp->defdname))
+ >= sizeof(statp->defdname))
+ goto freedata;
+ } else {
+ if (strlcpy(statp->defdname, cp+1,
+ sizeof(statp->defdname))
+ >= sizeof(statp->defdname))
+ goto freedata;
+ }
+ }
+ }
+#endif /* SOLARIS2 */
+
/* Allow user to override the local domain definition */
if ((cp = getenv("LOCALDOMAIN")) != NULL) {
(void)strncpy(statp->defdname, cp, sizeof(statp->defdname) - 1);
@@ -456,6 +490,15 @@ __res_vinit(res_state statp, int preinit) {
res_setoptions(statp, cp, "env");
statp->options |= RES_INIT;
return (0);
+
+#ifdef SOLARIS2
+ freedata:
+ if (statp->_u._ext.ext != NULL) {
+ free(statp->_u._ext.ext);
+ statp->_u._ext.ext = NULL;
+ }
+ return (-1);
+#endif
}
static void
@@ -495,6 +538,22 @@ res_setoptions(res_state statp, const char *options, const char *source)
if (statp->options & RES_DEBUG)
printf(";;\ttimeout=%d\n", statp->retrans);
#endif
+#ifdef SOLARIS2
+ } else if (!strncmp(cp, "retrans:", sizeof("retrans:") - 1)) {
+ /*
+ * For backward compatibility, 'retrans' is
+ * supported as an alias for 'timeout', though
+ * without an imposed maximum.
+ */
+ statp->retrans = atoi(cp + sizeof("retrans:") - 1);
+ } else if (!strncmp(cp, "retry:", sizeof("retry:") - 1)){
+ /*
+ * For backward compatibility, 'retry' is
+ * supported as an alias for 'attempts', though
+ * without an imposed maximum.
+ */
+ statp->retry = atoi(cp + sizeof("retry:") - 1);
+#endif /* SOLARIS2 */
} else if (!strncmp(cp, "attempts:", sizeof("attempts:") - 1)){
i = atoi(cp + sizeof("attempts:") - 1);
if (i <= RES_MAXRETRY)
diff --git a/contrib/bind9/lib/bind/resolv/res_mkupdate.c b/contrib/bind9/lib/bind/resolv/res_mkupdate.c
index aac95e5..01078f1 100644
--- a/contrib/bind9/lib/bind/resolv/res_mkupdate.c
+++ b/contrib/bind9/lib/bind/resolv/res_mkupdate.c
@@ -21,7 +21,7 @@
*/
#if !defined(lint) && !defined(SABER)
-static const char rcsid[] = "$Id: res_mkupdate.c,v 1.1.2.1.4.3 2004/06/03 04:44:48 marka Exp $";
+static const char rcsid[] = "$Id: res_mkupdate.c,v 1.1.2.1.4.5 2005/10/14 05:43:47 marka Exp $";
#endif /* not lint */
#include "port_before.h"
@@ -78,7 +78,7 @@ int
res_nmkupdate(res_state statp, ns_updrec *rrecp_in, u_char *buf, int buflen) {
ns_updrec *rrecp_start = rrecp_in;
HEADER *hp;
- u_char *cp, *sp1, *sp2, *startp, *endp;
+ u_char *cp, *sp2, *startp, *endp;
int n, i, soanum, multiline;
ns_updrec *rrecp;
struct in_addr ina;
@@ -101,7 +101,6 @@ res_nmkupdate(res_state statp, ns_updrec *rrecp_in, u_char *buf, int buflen) {
hp->id = htons(++statp->id);
hp->opcode = ns_o_update;
hp->rcode = NOERROR;
- sp1 = buf + 2*INT16SZ; /* save pointer to zocount */
cp = buf + HFIXEDSZ;
buflen -= HFIXEDSZ;
dpp = dnptrs;
@@ -922,10 +921,10 @@ res_mkupdrec(int section, const char *dname,
}
INIT_LINK(rrecp, r_link);
INIT_LINK(rrecp, r_glink);
- rrecp->r_class = class;
- rrecp->r_type = type;
+ rrecp->r_class = (ns_class)class;
+ rrecp->r_type = (ns_type)type;
rrecp->r_ttl = ttl;
- rrecp->r_section = section;
+ rrecp->r_section = (ns_sect)section;
return (rrecp);
}
diff --git a/contrib/bind9/lib/bind/resolv/res_send.c b/contrib/bind9/lib/bind/resolv/res_send.c
index 81c2425..5be2489 100644
--- a/contrib/bind9/lib/bind/resolv/res_send.c
+++ b/contrib/bind9/lib/bind/resolv/res_send.c
@@ -52,7 +52,7 @@
*/
/*
- * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 2005 by Internet Systems Consortium, Inc. ("ISC")
* Portions Copyright (c) 1996-1999 by Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -70,7 +70,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
static const char sccsid[] = "@(#)res_send.c 8.1 (Berkeley) 6/4/93";
-static const char rcsid[] = "$Id: res_send.c,v 1.5.2.2.4.5 2004/08/10 02:19:56 marka Exp $";
+static const char rcsid[] = "$Id: res_send.c,v 1.5.2.2.4.7 2005/08/15 02:04:41 marka Exp $";
#endif /* LIBC_SCCS and not lint */
/*
@@ -103,6 +103,13 @@ static const char rcsid[] = "$Id: res_send.c,v 1.5.2.2.4.5 2004/08/10 02:19:56 m
#include "port_after.h"
+#ifdef USE_POLL
+#ifdef HAVE_STROPTS_H
+#include <stropts.h>
+#endif
+#include <poll.h>
+#endif /* USE_POLL */
+
/* Options. Leave them on. */
#define DEBUG
#include "res_debug.h"
@@ -110,7 +117,11 @@ static const char rcsid[] = "$Id: res_send.c,v 1.5.2.2.4.5 2004/08/10 02:19:56 m
#define EXT(res) ((res)->_u._ext)
+#ifndef USE_POLL
static const int highestFD = FD_SETSIZE - 1;
+#else
+static int highestFD = 0;
+#endif
/* Forward. */
@@ -125,7 +136,7 @@ static void Aerror(const res_state, FILE *, const char *, int,
const struct sockaddr *, int);
static void Perror(const res_state, FILE *, const char *, int);
static int sock_eq(struct sockaddr *, struct sockaddr *);
-#ifdef NEED_PSELECT
+#if defined(NEED_PSELECT) && !defined(USE_POLL)
static int pselect(int, void *, void *, void *,
struct timespec *,
const sigset_t *);
@@ -280,6 +291,10 @@ res_nsend(res_state statp,
int gotsomewhere, terrno, try, v_circuit, resplen, ns, n;
char abuf[NI_MAXHOST];
+#ifdef USE_POLL
+ highestFD = sysconf(_SC_OPEN_MAX) - 1;
+#endif
+
if (statp->nscount == 0) {
errno = ESRCH;
return (-1);
@@ -760,10 +775,15 @@ send_dg(res_state statp,
const struct sockaddr *nsap;
int nsaplen;
struct timespec now, timeout, finish;
- fd_set dsmask;
struct sockaddr_storage from;
ISC_SOCKLEN_T fromlen;
int resplen, seconds, n, s;
+#ifdef USE_POLL
+ int polltimeout;
+ struct pollfd pollfd;
+#else
+ fd_set dsmask;
+#endif
nsap = get_nsaddr(statp, ns);
nsaplen = get_salen(nsap);
@@ -841,6 +861,7 @@ send_dg(res_state statp,
wait:
now = evNowTime();
nonow:
+#ifndef USE_POLL
FD_ZERO(&dsmask);
FD_SET(s, &dsmask);
if (evCmpTime(finish, now) > 0)
@@ -848,6 +869,17 @@ send_dg(res_state statp,
else
timeout = evConsTime(0, 0);
n = pselect(s + 1, &dsmask, NULL, NULL, &timeout, NULL);
+#else
+ timeout = evSubTime(finish, now);
+ if (timeout.tv_sec < 0)
+ timeout = evConsTime(0, 0);
+ polltimeout = 1000*timeout.tv_sec +
+ timeout.tv_nsec/1000000;
+ pollfd.fd = s;
+ pollfd.events = POLLRDNORM;
+ n = poll(&pollfd, 1, polltimeout);
+#endif /* USE_POLL */
+
if (n == 0) {
Dprint(statp->options & RES_DEBUG, (stdout, ";; timeout\n"));
*gotsomewhere = 1;
@@ -856,7 +888,11 @@ send_dg(res_state statp,
if (n < 0) {
if (errno == EINTR)
goto wait;
+#ifndef USE_POLL
Perror(statp, stderr, "select", errno);
+#else
+ Perror(statp, stderr, "poll", errno);
+#endif /* USE_POLL */
res_nclose(statp);
return (0);
}
@@ -1025,7 +1061,7 @@ sock_eq(struct sockaddr *a, struct sockaddr *b) {
}
}
-#ifdef NEED_PSELECT
+#if defined(NEED_PSELECT) && !defined(USE_POLL)
/* XXX needs to move to the porting library. */
static int
pselect(int nfds, void *rfds, void *wfds, void *efds,
diff --git a/contrib/bind9/lib/bind/resolv/res_sendsigned.c b/contrib/bind9/lib/bind/resolv/res_sendsigned.c
index 1984377..d1d2274 100644
--- a/contrib/bind9/lib/bind/resolv/res_sendsigned.c
+++ b/contrib/bind9/lib/bind/resolv/res_sendsigned.c
@@ -122,8 +122,16 @@ retry:
(stdout, "%s", ""),
answer, (anslen > len) ? len : anslen);
- Dprint(statp->pfcode & RES_PRF_REPLY,
- (stdout, ";; TSIG invalid (%s)\n", p_rcode(ret)));
+ if (ret > 0) {
+ Dprint(statp->pfcode & RES_PRF_REPLY,
+ (stdout, ";; server rejected TSIG (%s)\n",
+ p_rcode(ret)));
+ } else {
+ Dprint(statp->pfcode & RES_PRF_REPLY,
+ (stdout, ";; TSIG invalid (%s)\n",
+ p_rcode(-ret)));
+ }
+
free (nstatp);
free (newmsg);
dst_free_key(dstkey);
diff --git a/contrib/bind9/lib/bind9/api b/contrib/bind9/lib/bind9/api
index b4cd78b..0a12b5e 100644
--- a/contrib/bind9/lib/bind9/api
+++ b/contrib/bind9/lib/bind9/api
@@ -1,3 +1,3 @@
LIBINTERFACE = 0
-LIBREVISION = 5
+LIBREVISION = 7
LIBAGE = 0
diff --git a/contrib/bind9/lib/bind9/check.c b/contrib/bind9/lib/bind9/check.c
index 0cf1e75..e6e86fd 100644
--- a/contrib/bind9/lib/bind9/check.c
+++ b/contrib/bind9/lib/bind9/check.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 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.
*/
-/* $Id: check.c,v 1.37.6.29 2004/11/22 05:02:41 marka Exp $ */
+/* $Id: check.c,v 1.37.6.32 2005/11/03 23:08:41 marka Exp $ */
#include <config.h>
@@ -119,7 +119,7 @@ check_orderent(cfg_obj_t *ent, isc_log_t *logctx) {
result = ISC_R_FAILURE;
} else if (strcasecmp(cfg_obj_asstring(obj), "fixed") == 0) {
cfg_obj_log(obj, logctx, ISC_LOG_WARNING,
- "rrset-order: order 'fixed' not implemented");
+ "rrset-order: order 'fixed' not fully implemented");
} else if (/* strcasecmp(cfg_obj_asstring(obj), "fixed") != 0 && */
strcasecmp(cfg_obj_asstring(obj), "random") != 0 &&
strcasecmp(cfg_obj_asstring(obj), "cyclic") != 0) {
@@ -598,8 +598,10 @@ validate_masters(cfg_obj_t *obj, cfg_obj_t *config, isc_uint32_t *countp,
REQUIRE(countp != NULL);
result = isc_symtab_create(mctx, 100, NULL, NULL, ISC_FALSE, &symtab);
- if (result != ISC_R_SUCCESS)
+ if (result != ISC_R_SUCCESS) {
+ *countp = count;
return (result);
+ }
newlist:
list = cfg_tuple_get(obj, "addresses");
diff --git a/contrib/bind9/lib/bind9/getaddresses.c b/contrib/bind9/lib/bind9/getaddresses.c
index fafc0a6..02d1104 100644
--- a/contrib/bind9/lib/bind9/getaddresses.c
+++ b/contrib/bind9/lib/bind9/getaddresses.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2001, 2002 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: getaddresses.c,v 1.13.126.6 2004/09/16 01:00:58 marka Exp $ */
+/* $Id: getaddresses.c,v 1.13.126.8 2005/10/14 02:13:06 marka Exp $ */
#include <config.h>
#include <string.h>
@@ -65,8 +65,8 @@ bind9_getaddresses(const char *hostname, in_port_t port,
REQUIRE(addrcount != NULL);
REQUIRE(addrsize > 0);
- have_ipv4 = (isc_net_probeipv4() == ISC_R_SUCCESS);
- have_ipv6 = (isc_net_probeipv6() == ISC_R_SUCCESS);
+ have_ipv4 = ISC_TF((isc_net_probeipv4() == ISC_R_SUCCESS));
+ have_ipv6 = ISC_TF((isc_net_probeipv6() == ISC_R_SUCCESS));
/*
* Try IPv4, then IPv6. In order to handle the extended format
diff --git a/contrib/bind9/lib/dns/adb.c b/contrib/bind9/lib/dns/adb.c
index 9c8d4d5..c0b31db 100644
--- a/contrib/bind9/lib/dns/adb.c
+++ b/contrib/bind9/lib/dns/adb.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 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.
*/
-/* $Id: adb.c,v 1.181.2.11.2.20 2004/11/10 22:32:40 marka Exp $ */
+/* $Id: adb.c,v 1.181.2.11.2.24 2005/10/14 05:19:00 marka Exp $ */
/*
* Implementation notes
@@ -1784,7 +1784,7 @@ shutdown_task(isc_task_t *task, isc_event_t *ev) {
static isc_boolean_t
check_expire_name(dns_adbname_t **namep, isc_stdtime_t now) {
dns_adbname_t *name;
- isc_result_t result = ISC_FALSE;
+ isc_boolean_t result = ISC_FALSE;
INSIST(namep != NULL && DNS_ADBNAME_VALID(*namep));
name = *namep;
@@ -1861,7 +1861,7 @@ static isc_boolean_t
cleanup_names(dns_adb_t *adb, int bucket, isc_stdtime_t now) {
dns_adbname_t *name;
dns_adbname_t *next_name;
- isc_result_t result = ISC_FALSE;
+ isc_boolean_t result = ISC_FALSE;
DP(CLEAN_LEVEL, "cleaning name bucket %d", bucket);
@@ -3347,7 +3347,7 @@ dns_adb_marklame(dns_adb_t *adb, dns_adbaddrinfo_t *addr, dns_name_t *zone,
bucket = addr->entry->lock_bucket;
LOCK(&adb->entrylocks[bucket]);
zi = ISC_LIST_HEAD(addr->entry->zoneinfo);
- while (zi != NULL && dns_name_equal(zone, &zi->zone))
+ while (zi != NULL && !dns_name_equal(zone, &zi->zone))
zi = ISC_LIST_NEXT(zi, plink);
if (zi != NULL) {
if (expire_time > zi->lame_timer)
@@ -3366,7 +3366,7 @@ dns_adb_marklame(dns_adb_t *adb, dns_adbaddrinfo_t *addr, dns_name_t *zone,
unlock:
UNLOCK(&adb->entrylocks[bucket]);
- return (ISC_R_SUCCESS);
+ return (result);
}
void
diff --git a/contrib/bind9/lib/dns/api b/contrib/bind9/lib/dns/api
index c06a62e..7df8157 100644
--- a/contrib/bind9/lib/dns/api
+++ b/contrib/bind9/lib/dns/api
@@ -1,3 +1,3 @@
-LIBINTERFACE = 20
-LIBREVISION = 2
+LIBINTERFACE = 21
+LIBREVISION = 1
LIBAGE = 0
diff --git a/contrib/bind9/lib/dns/cache.c b/contrib/bind9/lib/dns/cache.c
index b148f60..0e17a95 100644
--- a/contrib/bind9/lib/dns/cache.c
+++ b/contrib/bind9/lib/dns/cache.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 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.
*/
-/* $Id: cache.c,v 1.45.2.4.8.7 2004/03/08 02:07:52 marka Exp $ */
+/* $Id: cache.c,v 1.45.2.4.8.9 2005/03/17 03:58:30 marka Exp $ */
#include <config.h>
@@ -1021,27 +1021,10 @@ dns_cache_flushname(dns_cache_t *cache, dns_name_t *name) {
dns_rdataset_init(&rdataset);
dns_rdatasetiter_current(iter, &rdataset);
-
- for (result = dns_rdataset_first(&rdataset);
- result == ISC_R_SUCCESS;
- result = dns_rdataset_next(&rdataset))
- {
- dns_rdata_t rdata = DNS_RDATA_INIT;
- dns_rdatatype_t covers;
-
- dns_rdataset_current(&rdataset, &rdata);
- if (rdata.type == dns_rdatatype_rrsig)
- covers = dns_rdata_covers(&rdata);
- else
- covers = 0;
- result = dns_db_deleterdataset(cache->db, node, NULL,
- rdata.type, covers);
- if (result != ISC_R_SUCCESS &&
- result != DNS_R_UNCHANGED)
- break;
- }
+ result = dns_db_deleterdataset(cache->db, node, NULL,
+ rdataset.type, rdataset.covers);
dns_rdataset_disassociate(&rdataset);
- if (result != ISC_R_NOMORE)
+ if (result != ISC_R_SUCCESS && result != DNS_R_UNCHANGED)
break;
}
if (result == ISC_R_NOMORE)
diff --git a/contrib/bind9/lib/dns/forward.c b/contrib/bind9/lib/dns/forward.c
index f94abfe..1455fbad 100644
--- a/contrib/bind9/lib/dns/forward.c
+++ b/contrib/bind9/lib/dns/forward.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 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.
*/
-/* $Id: forward.c,v 1.5.206.1 2004/03/06 08:13:38 marka Exp $ */
+/* $Id: forward.c,v 1.5.206.3 2005/03/17 03:58:30 marka Exp $ */
#include <config.h>
@@ -139,13 +139,20 @@ isc_result_t
dns_fwdtable_find(dns_fwdtable_t *fwdtable, dns_name_t *name,
dns_forwarders_t **forwardersp)
{
+ return (dns_fwdtable_find2(fwdtable, name, NULL, forwardersp));
+}
+
+isc_result_t
+dns_fwdtable_find2(dns_fwdtable_t *fwdtable, dns_name_t *name,
+ dns_name_t *foundname, dns_forwarders_t **forwardersp)
+{
isc_result_t result;
REQUIRE(VALID_FWDTABLE(fwdtable));
RWLOCK(&fwdtable->rwlock, isc_rwlocktype_read);
- result = dns_rbt_findname(fwdtable->table, name, 0, NULL,
+ result = dns_rbt_findname(fwdtable->table, name, 0, foundname,
(void **)forwardersp);
if (result == DNS_R_PARTIALMATCH)
result = ISC_R_SUCCESS;
diff --git a/contrib/bind9/lib/dns/gen-unix.h b/contrib/bind9/lib/dns/gen-unix.h
index 8c1818d..bd007c4 100644
--- a/contrib/bind9/lib/dns/gen-unix.h
+++ b/contrib/bind9/lib/dns/gen-unix.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 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.
*/
-/* $Id: gen-unix.h,v 1.12.12.3 2004/03/08 09:04:29 marka Exp $ */
+/* $Id: gen-unix.h,v 1.12.12.5 2005/06/09 23:54:29 marka Exp $ */
/*
* This file is responsible for defining two operations that are not
@@ -40,6 +40,10 @@
#include <isc/boolean.h>
#include <isc/lang.h>
+#ifdef NEED_OPTARG
+extern char *optarg;
+#endif
+
#define isc_commandline_parse getopt
#define isc_commandline_argument optarg
diff --git a/contrib/bind9/lib/dns/include/dns/forward.h b/contrib/bind9/lib/dns/include/dns/forward.h
index f1bf5ab..1eb62d2 100644
--- a/contrib/bind9/lib/dns/include/dns/forward.h
+++ b/contrib/bind9/lib/dns/include/dns/forward.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 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.
*/
-/* $Id: forward.h,v 1.2.206.1 2004/03/06 08:13:56 marka Exp $ */
+/* $Id: forward.h,v 1.2.206.3 2005/03/17 03:58:31 marka Exp $ */
#ifndef DNS_FORWARD_H
#define DNS_FORWARD_H 1
@@ -67,6 +67,10 @@ dns_fwdtable_add(dns_fwdtable_t *fwdtable, dns_name_t *name,
isc_result_t
dns_fwdtable_find(dns_fwdtable_t *fwdtable, dns_name_t *name,
dns_forwarders_t **forwardersp);
+
+isc_result_t
+dns_fwdtable_find2(dns_fwdtable_t *fwdtable, dns_name_t *name,
+ dns_name_t *foundname, dns_forwarders_t **forwardersp);
/*
* Finds a domain in the forwarding table. The closest matching parent
* domain is returned.
@@ -75,6 +79,7 @@ dns_fwdtable_find(dns_fwdtable_t *fwdtable, dns_name_t *name,
* fwdtable is a valid forwarding table.
* name is a valid name
* forwardersp != NULL && *forwardersp == NULL
+ * foundname to be NULL or a valid name with buffer.
*
* Returns:
* ISC_R_SUCCESS
diff --git a/contrib/bind9/lib/dns/include/dns/masterdump.h b/contrib/bind9/lib/dns/include/dns/masterdump.h
index 5058945..888c588 100644
--- a/contrib/bind9/lib/dns/include/dns/masterdump.h
+++ b/contrib/bind9/lib/dns/include/dns/masterdump.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 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.
*/
-/* $Id: masterdump.h,v 1.22.12.8 2004/03/19 05:00:49 marka Exp $ */
+/* $Id: masterdump.h,v 1.22.12.10 2005/09/06 02:12:41 marka Exp $ */
#ifndef DNS_MASTERDUMP_H
#define DNS_MASTERDUMP_H 1
@@ -122,7 +122,7 @@ LIBDNS_EXTERNAL_DATA extern const dns_master_style_t dns_master_style_full;
* stop of its own, but the class and type share one.
*/
LIBDNS_EXTERNAL_DATA extern const dns_master_style_t
- dns_master_style_explicitttl;
+ dns_master_style_explicitttl;
/*
* A master style format designed for cache files. It prints explicit TTL
diff --git a/contrib/bind9/lib/dns/include/dns/rdataset.h b/contrib/bind9/lib/dns/include/dns/rdataset.h
index e2b0753..d856784 100644
--- a/contrib/bind9/lib/dns/include/dns/rdataset.h
+++ b/contrib/bind9/lib/dns/include/dns/rdataset.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 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.
*/
-/* $Id: rdataset.h,v 1.41.2.5.2.6 2004/03/08 02:08:01 marka Exp $ */
+/* $Id: rdataset.h,v 1.41.2.5.2.8 2005/03/17 03:58:31 marka Exp $ */
#ifndef DNS_RDATASET_H
#define DNS_RDATASET_H 1
@@ -130,22 +130,23 @@ struct dns_rdataset {
* Used by message.c to indicate that the rdataset's rdata had differing
* TTL values, and the rdataset->ttl holds the smallest.
*/
-#define DNS_RDATASETATTR_QUESTION 0x0001
-#define DNS_RDATASETATTR_RENDERED 0x0002 /* Used by message.c */
-#define DNS_RDATASETATTR_ANSWERED 0x0004 /* Used by server. */
-#define DNS_RDATASETATTR_CACHE 0x0008 /* Used by resolver. */
-#define DNS_RDATASETATTR_ANSWER 0x0010 /* Used by resolver. */
-#define DNS_RDATASETATTR_ANSWERSIG 0x0020 /* Used by resolver. */
-#define DNS_RDATASETATTR_EXTERNAL 0x0040 /* Used by resolver. */
-#define DNS_RDATASETATTR_NCACHE 0x0080 /* Used by resolver. */
-#define DNS_RDATASETATTR_CHAINING 0x0100 /* Used by resolver. */
-#define DNS_RDATASETATTR_TTLADJUSTED 0x0200 /* Used by message.c */
-#define DNS_RDATASETATTR_FIXEDORDER 0x0400
-#define DNS_RDATASETATTR_RANDOMIZE 0x0800
-#define DNS_RDATASETATTR_CHASE 0x1000 /* Used by resolver. */
-#define DNS_RDATASETATTR_NXDOMAIN 0x2000
-#define DNS_RDATASETATTR_NOQNAME 0x4000
-#define DNS_RDATASETATTR_CHECKNAMES 0x8000 /* Used by resolver. */
+#define DNS_RDATASETATTR_QUESTION 0x00000001
+#define DNS_RDATASETATTR_RENDERED 0x00000002 /* Used by message.c */
+#define DNS_RDATASETATTR_ANSWERED 0x00000004 /* Used by server. */
+#define DNS_RDATASETATTR_CACHE 0x00000008 /* Used by resolver. */
+#define DNS_RDATASETATTR_ANSWER 0x00000010 /* Used by resolver. */
+#define DNS_RDATASETATTR_ANSWERSIG 0x00000020 /* Used by resolver. */
+#define DNS_RDATASETATTR_EXTERNAL 0x00000040 /* Used by resolver. */
+#define DNS_RDATASETATTR_NCACHE 0x00000080 /* Used by resolver. */
+#define DNS_RDATASETATTR_CHAINING 0x00000100 /* Used by resolver. */
+#define DNS_RDATASETATTR_TTLADJUSTED 0x00000200 /* Used by message.c */
+#define DNS_RDATASETATTR_FIXEDORDER 0x00000400
+#define DNS_RDATASETATTR_RANDOMIZE 0x00000800
+#define DNS_RDATASETATTR_CHASE 0x00001000 /* Used by resolver. */
+#define DNS_RDATASETATTR_NXDOMAIN 0x00002000
+#define DNS_RDATASETATTR_NOQNAME 0x00004000
+#define DNS_RDATASETATTR_CHECKNAMES 0x00008000 /* Used by resolver. */
+#define DNS_RDATASETATTR_REQUIREDGLUE 0x00010000
/*
* _OMITDNSSEC:
diff --git a/contrib/bind9/lib/dns/include/dns/validator.h b/contrib/bind9/lib/dns/include/dns/validator.h
index c405fbb..24769f3 100644
--- a/contrib/bind9/lib/dns/include/dns/validator.h
+++ b/contrib/bind9/lib/dns/include/dns/validator.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 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.
*/
-/* $Id: validator.h,v 1.18.12.7 2004/05/14 05:06:41 marka Exp $ */
+/* $Id: validator.h,v 1.18.12.9 2005/09/06 02:12:41 marka Exp $ */
#ifndef DNS_VALIDATOR_H
#define DNS_VALIDATOR_H 1
@@ -120,12 +120,16 @@ struct dns_validator {
dns_fixedname_t fname;
dns_fixedname_t wild;
ISC_LINK(dns_validator_t) link;
- dns_rdataset_t * dlv;
+ dns_rdataset_t dlv;
dns_fixedname_t dlvsep;
isc_boolean_t havedlvsep;
isc_boolean_t mustbesecure;
+ unsigned int dlvlabels;
+ unsigned int depth;
};
+#define DNS_VALIDATOR_DLV 1
+
ISC_LANG_BEGINDECLS
isc_result_t
diff --git a/contrib/bind9/lib/dns/journal.c b/contrib/bind9/lib/dns/journal.c
index 13fbdee..536416d 100644
--- a/contrib/bind9/lib/dns/journal.c
+++ b/contrib/bind9/lib/dns/journal.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2002 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,11 +15,12 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: journal.c,v 1.77.2.1.10.9 2004/09/16 04:57:02 marka Exp $ */
+/* $Id: journal.c,v 1.77.2.1.10.13 2005/11/03 23:08:41 marka Exp $ */
#include <config.h>
#include <stdlib.h>
+#include <unistd.h>
#include <isc/file.h>
#include <isc/mem.h>
@@ -1564,7 +1565,7 @@ read_one_rr(dns_journal_t *j) {
/*
* Read an RR.
*/
- result = journal_read_rrhdr(j, &rrhdr);
+ CHECK(journal_read_rrhdr(j, &rrhdr));
/*
* Perform a sanity check on the journal RR size.
* The smallest possible RR has a 1-byte owner name
@@ -1750,6 +1751,8 @@ dns_diff_subtract(dns_diff_t diff[2], dns_diff_t *r) {
isc_result_t result;
dns_difftuple_t *p[2];
int i, t;
+ isc_boolean_t append;
+
CHECK(dns_diff_sort(&diff[0], rdata_order));
CHECK(dns_diff_sort(&diff[1], rdata_order));
@@ -1778,11 +1781,17 @@ dns_diff_subtract(dns_diff_t diff[2], dns_diff_t *r) {
}
INSIST(t == 0);
/*
- * Identical RRs in both databases; skip them both.
+ * Identical RRs in both databases; skip them both
+ * if the ttl differs.
*/
+ append = ISC_TF(p[0]->ttl != p[1]->ttl);
for (i = 0; i < 2; i++) {
ISC_LIST_UNLINK(diff[i].tuples, p[i], link);
- dns_difftuple_free(&p[i]);
+ if (append) {
+ ISC_LIST_APPEND(r->tuples, p[i], link);
+ } else {
+ dns_difftuple_free(&p[i]);
+ }
}
next: ;
}
diff --git a/contrib/bind9/lib/dns/key.c b/contrib/bind9/lib/dns/key.c
index 7abb2d7..97d970e 100644
--- a/contrib/bind9/lib/dns/key.c
+++ b/contrib/bind9/lib/dns/key.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,10 +15,11 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: key.c,v 1.1.4.1 2004/12/09 04:07:18 marka Exp $ */
+/* $Id: key.c,v 1.1.4.3 2005/06/09 23:54:29 marka Exp $ */
#include <config.h>
+#include <stddef.h>
#include <stdlib.h>
#include <isc/region.h>
diff --git a/contrib/bind9/lib/dns/message.c b/contrib/bind9/lib/dns/message.c
index badde6e..d4b2e19 100644
--- a/contrib/bind9/lib/dns/message.c
+++ b/contrib/bind9/lib/dns/message.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 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.
*/
-/* $Id: message.c,v 1.194.2.10.2.17 2004/05/05 01:32:16 marka Exp $ */
+/* $Id: message.c,v 1.194.2.10.2.20 2005/06/07 01:42:23 marka Exp $ */
/***
*** Imports
@@ -1476,6 +1476,13 @@ getsection(isc_buffer_t *source, dns_message_t *msg, dns_decompress_t *dctx,
free_name = ISC_FALSE;
}
+ if (seen_problem) {
+ if (free_name)
+ isc_mempool_put(msg->namepool, name);
+ if (free_rdataset)
+ isc_mempool_put(msg->rdspool, rdataset);
+ free_name = free_rdataset = ISC_FALSE;
+ }
INSIST(free_name == ISC_FALSE);
INSIST(free_rdataset == ISC_FALSE);
}
@@ -1783,6 +1790,57 @@ dns_message_rendersection(dns_message_t *msg, dns_section_t sectionid,
if (msg->reserved == 0 && (options & DNS_MESSAGERENDER_PARTIAL) != 0)
partial = ISC_TRUE;
+ /*
+ * Render required glue first. Set TC if it won't fit.
+ */
+ name = ISC_LIST_HEAD(*section);
+ if (name != NULL) {
+ rdataset = ISC_LIST_HEAD(name->list);
+ if (rdataset != NULL &&
+ (rdataset->attributes & DNS_RDATASETATTR_REQUIREDGLUE) != 0 &&
+ (rdataset->attributes & DNS_RDATASETATTR_RENDERED) == 0) {
+ void *order_arg = msg->order_arg;
+ st = *(msg->buffer);
+ count = 0;
+ if (partial)
+ result = dns_rdataset_towirepartial(rdataset,
+ name,
+ msg->cctx,
+ msg->buffer,
+ msg->order,
+ order_arg,
+ rd_options,
+ &count,
+ NULL);
+ else
+ result = dns_rdataset_towiresorted(rdataset,
+ name,
+ msg->cctx,
+ msg->buffer,
+ msg->order,
+ order_arg,
+ rd_options,
+ &count);
+ total += count;
+ if (partial && result == ISC_R_NOSPACE) {
+ msg->flags |= DNS_MESSAGEFLAG_TC;
+ msg->buffer->length += msg->reserved;
+ msg->counts[sectionid] += total;
+ return (result);
+ }
+ if (result != ISC_R_SUCCESS) {
+ INSIST(st.used < 65536);
+ dns_compress_rollback(msg->cctx,
+ (isc_uint16_t)st.used);
+ *(msg->buffer) = st; /* rollback */
+ msg->buffer->length += msg->reserved;
+ msg->counts[sectionid] += total;
+ return (result);
+ }
+ rdataset->attributes |= DNS_RDATASETATTR_RENDERED;
+ }
+ }
+
do {
name = ISC_LIST_HEAD(*section);
if (name == NULL) {
diff --git a/contrib/bind9/lib/dns/name.c b/contrib/bind9/lib/dns/name.c
index 37a5f4e..116a56a 100644
--- a/contrib/bind9/lib/dns/name.c
+++ b/contrib/bind9/lib/dns/name.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 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.
*/
-/* $Id: name.c,v 1.127.2.7.2.11 2004/09/01 05:19:59 marka Exp $ */
+/* $Id: name.c,v 1.127.2.7.2.14 2005/10/14 01:38:48 marka Exp $ */
#include <config.h>
@@ -945,9 +945,9 @@ dns_name_fromtext(dns_name_t *name, isc_buffer_t *source,
unsigned char *ndata, *label;
char *tdata;
char c;
- ft_state state, kind;
- unsigned int value, count, tbcount, bitlength, maxlength;
- unsigned int n1, n2, vlen, tlen, nrem, nused, digits, labels, tused;
+ ft_state state;
+ unsigned int value, count;
+ unsigned int n1, n2, tlen, nrem, nused, digits, labels, tused;
isc_boolean_t done;
unsigned char *offsets;
dns_offsets_t odata;
@@ -985,15 +985,10 @@ dns_name_fromtext(dns_name_t *name, isc_buffer_t *source,
*/
n1 = 0;
n2 = 0;
- vlen = 0;
label = NULL;
digits = 0;
value = 0;
count = 0;
- tbcount = 0;
- bitlength = 0;
- maxlength = 0;
- kind = ft_init;
/*
* Make 'name' empty in case of failure.
@@ -1051,7 +1046,6 @@ dns_name_fromtext(dns_name_t *name, isc_buffer_t *source,
state = ft_initialescape;
break;
}
- kind = ft_ordinary;
state = ft_ordinary;
if (nrem == 0)
return (ISC_R_NOSPACE);
@@ -1094,7 +1088,6 @@ dns_name_fromtext(dns_name_t *name, isc_buffer_t *source,
*/
return (DNS_R_BADLABELTYPE);
}
- kind = ft_ordinary;
state = ft_escape;
/* FALLTHROUGH */
case ft_escape:
@@ -1305,13 +1298,14 @@ dns_name_totext(dns_name_t *name, isc_boolean_t omit_final_dot,
trem--;
nlen--;
} else {
- char buf[5];
if (trem < 4)
return (ISC_R_NOSPACE);
- snprintf(buf, sizeof(buf),
- "\\%03u", c);
- memcpy(tdata, buf, 4);
- tdata += 4;
+ *tdata++ = 0x5c;
+ *tdata++ = 0x30 +
+ ((c / 100) % 10);
+ *tdata++ = 0x30 +
+ ((c / 10) % 10);
+ *tdata++ = 0x30 + (c % 10);
trem -= 4;
ndata++;
nlen--;
diff --git a/contrib/bind9/lib/dns/rbt.c b/contrib/bind9/lib/dns/rbt.c
index cb43858..ecff783 100644
--- a/contrib/bind9/lib/dns/rbt.c
+++ b/contrib/bind9/lib/dns/rbt.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 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.
*/
-/* $Id: rbt.c,v 1.115.2.2.2.11 2004/10/25 01:36:07 marka Exp $ */
+/* $Id: rbt.c,v 1.115.2.2.2.13 2005/06/18 01:03:24 marka Exp $ */
/* Principal Authors: DCL */
@@ -2060,7 +2060,10 @@ dns_rbt_deletetreeflat(dns_rbt_t *rbt, unsigned int quantum,
if (DATA(node) != NULL && rbt->data_deleter != NULL)
rbt->data_deleter(DATA(node), rbt->deleter_arg);
- unhash_node(rbt, node);
+ /*
+ * Note: we don't call unhash_node() here as we are destroying
+ * the complete rbt tree.
+ */
#if DNS_RBT_USEMAGIC
node->magic = 0;
#endif
diff --git a/contrib/bind9/lib/dns/rbtdb.c b/contrib/bind9/lib/dns/rbtdb.c
index a0e5ab5..f399dd1 100644
--- a/contrib/bind9/lib/dns/rbtdb.c
+++ b/contrib/bind9/lib/dns/rbtdb.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 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.
*/
-/* $Id: rbtdb.c,v 1.168.2.11.2.16 2004/05/23 11:07:23 marka Exp $ */
+/* $Id: rbtdb.c,v 1.168.2.11.2.22 2005/10/14 01:38:48 marka Exp $ */
/*
* Principal Author: Bob Halley
@@ -97,6 +97,12 @@ typedef isc_uint32_t rbtdb_rdatatype_t;
#define RBTDB_RDATATYPE_NCACHEANY \
RBTDB_RDATATYPE_VALUE(0, dns_rdatatype_any)
+/*
+ * Allow clients with a virtual time of upto 5 minutes in the past to see
+ * records that would have otherwise have expired.
+ */
+#define RBTDB_VIRTUAL 300
+
struct noqname {
dns_name_t name;
void * nsec;
@@ -413,7 +419,7 @@ free_rbtdb(dns_rbtdb_t *rbtdb, isc_boolean_t log, isc_event_t *event) {
again:
if (rbtdb->tree != NULL) {
result = dns_rbt_destroy2(&rbtdb->tree,
- (rbtdb->task != NULL) ? 5 : 0);
+ (rbtdb->task != NULL) ? 1000 : 0);
if (result == ISC_R_QUOTA) {
INSIST(rbtdb->task != NULL);
if (event == NULL)
@@ -2752,10 +2758,9 @@ find_coveringnsec(rbtdb_search_t *search, dns_dbnode_t **nodep,
isc_result_t result;
dns_fixedname_t fname, forigin;
dns_name_t *name, *origin;
- rbtdb_rdatatype_t matchtype, sigmatchtype, nsectype;
+ rbtdb_rdatatype_t matchtype, sigmatchtype;
matchtype = RBTDB_RDATATYPE_VALUE(dns_rdatatype_nsec, 0);
- nsectype = RBTDB_RDATATYPE_VALUE(0, dns_rdatatype_nsec);
sigmatchtype = RBTDB_RDATATYPE_VALUE(dns_rdatatype_rrsig,
dns_rdatatype_nsec);
@@ -2786,7 +2791,9 @@ find_coveringnsec(rbtdb_search_t *search, dns_dbnode_t **nodep,
* node as dirty, so it will get cleaned up
* later.
*/
- if (node->references == 0) {
+ if (header->ttl > search->now - RBTDB_VIRTUAL)
+ header_prev = header;
+ else if (node->references == 0) {
INSIST(header->down == NULL);
if (header_prev != NULL)
header_prev->next =
@@ -2943,7 +2950,9 @@ cache_find(dns_db_t *db, dns_name_t *name, dns_dbversion_t *version,
* mark it as stale, and the node as dirty, so it will
* get cleaned up later.
*/
- if (node->references == 0) {
+ if (header->ttl > now - RBTDB_VIRTUAL)
+ header_prev = header;
+ else if (node->references == 0) {
INSIST(header->down == NULL);
if (header_prev != NULL)
header_prev->next = header->next;
@@ -3210,7 +3219,9 @@ cache_findzonecut(dns_db_t *db, dns_name_t *name, unsigned int options,
* mark it as stale, and the node as dirty, so it will
* get cleaned up later.
*/
- if (node->references == 0) {
+ if (header->ttl > now - RBTDB_VIRTUAL)
+ header_prev = header;
+ else if (node->references == 0) {
INSIST(header->down == NULL);
if (header_prev != NULL)
header_prev->next = header->next;
@@ -3398,7 +3409,7 @@ expirenode(dns_db_t *db, dns_dbnode_t *node, isc_stdtime_t now) {
LOCK(&rbtdb->node_locks[rbtnode->locknum].lock);
for (header = rbtnode->data; header != NULL; header = header->next)
- if (header->ttl <= now) {
+ if (header->ttl <= now - RBTDB_VIRTUAL) {
/*
* We don't check if rbtnode->references == 0 and try
* to free like we do in cache_find(), because
@@ -3640,8 +3651,10 @@ cache_findrdataset(dns_db_t *db, dns_dbnode_t *node, dns_dbversion_t *version,
* rbtnode->references must be non-zero. This is so
* because 'node' is an argument to the function.
*/
- header->attributes |= RDATASET_ATTR_STALE;
- rbtnode->dirty = 1;
+ if (header->ttl <= now - RBTDB_VIRTUAL) {
+ header->attributes |= RDATASET_ATTR_STALE;
+ rbtnode->dirty = 1;
+ }
} else if (EXISTS(header)) {
if (header->type == matchtype)
found = header;
@@ -4344,6 +4357,7 @@ subtractrdataset(dns_db_t *db, dns_dbnode_t *node, dns_dbversion_t *version,
changed = add_changed(rbtdb, rbtversion, rbtnode);
if (changed == NULL) {
free_rdataset(rbtdb->common.mctx, newheader);
+ UNLOCK(&rbtdb->node_locks[rbtnode->locknum].lock);
return (ISC_R_NOMEMORY);
}
@@ -4909,6 +4923,11 @@ dns_rbtdb_create
isc_mem_attach(mctx, &rbtdb->common.mctx);
/*
+ * Must be initalized before free_rbtdb() is called.
+ */
+ isc_ondestroy_init(&rbtdb->common.ondest);
+
+ /*
* Make a copy of the origin name.
*/
result = dns_name_dupwithoffsets(origin, mctx, &rbtdb->common.origin);
@@ -4986,8 +5005,6 @@ dns_rbtdb_create
rbtdb->future_version = NULL;
ISC_LIST_INIT(rbtdb->open_versions);
- isc_ondestroy_init(&rbtdb->common.ondest);
-
rbtdb->common.magic = DNS_DB_MAGIC;
rbtdb->common.impmagic = RBTDB_MAGIC;
diff --git a/contrib/bind9/lib/dns/rdata.c b/contrib/bind9/lib/dns/rdata.c
index 6d4c098..1b3f2a5 100644
--- a/contrib/bind9/lib/dns/rdata.c
+++ b/contrib/bind9/lib/dns/rdata.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 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.
*/
-/* $Id: rdata.c,v 1.147.2.11.2.16 2004/10/06 05:37:40 marka Exp $ */
+/* $Id: rdata.c,v 1.147.2.11.2.20 2005/07/22 05:27:52 marka Exp $ */
#include <config.h>
#include <ctype.h>
@@ -986,11 +986,15 @@ txt_totext(isc_region_t *source, isc_buffer_t *target) {
if (*sp < 0x20 || *sp >= 0x7f) {
if (tl < 4)
return (ISC_R_NOSPACE);
- snprintf(tp, 5, "\\%03u", *sp++);
- tp += 4;
+ *tp++ = 0x5c;
+ *tp++ = 0x30 + ((*sp / 100) % 10);
+ *tp++ = 0x30 + ((*sp / 10) % 10);
+ *tp++ = 0x30 + (*sp % 10);
+ sp++;
tl -= 4;
continue;
}
+ /* double quote, semi-colon, backslash */
if (*sp == 0x22 || *sp == 0x3b || *sp == 0x5c) {
if (tl < 2)
return (ISC_R_NOSPACE);
@@ -1213,7 +1217,7 @@ name_tobuffer(dns_name_t *name, isc_buffer_t *target) {
static isc_uint32_t
uint32_fromregion(isc_region_t *region) {
- unsigned long value;
+ isc_uint32_t value;
REQUIRE(region->length >= 4);
value = region->base[0] << 24;
diff --git a/contrib/bind9/lib/dns/rdata/any_255/tsig_250.c b/contrib/bind9/lib/dns/rdata/any_255/tsig_250.c
index 6943d82..c9b52c7 100644
--- a/contrib/bind9/lib/dns/rdata/any_255/tsig_250.c
+++ b/contrib/bind9/lib/dns/rdata/any_255/tsig_250.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 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.
*/
-/* $Id: tsig_250.c,v 1.52.2.1.2.6 2004/03/08 09:04:40 marka Exp $ */
+/* $Id: tsig_250.c,v 1.52.2.1.2.8 2005/03/20 22:34:01 marka Exp $ */
/* Reviewed: Thu Mar 16 13:39:43 PST 2000 by gson */
@@ -162,8 +162,10 @@ totext_any_tsig(ARGS_TOTEXT) {
*/
sigtime = ((isc_uint64_t)sr.base[0] << 40) |
((isc_uint64_t)sr.base[1] << 32) |
- (sr.base[2] << 24) | (sr.base[3] << 16) |
- (sr.base[4] << 8) | sr.base[5];
+ ((isc_uint64_t)sr.base[2] << 24) |
+ ((isc_uint64_t)sr.base[3] << 16) |
+ ((isc_uint64_t)sr.base[4] << 8) |
+ (isc_uint64_t)sr.base[5];
isc_region_consume(&sr, 6);
bufp = &buf[sizeof(buf) - 1];
*bufp-- = 0;
@@ -457,8 +459,10 @@ tostruct_any_tsig(ARGS_TOSTRUCT) {
INSIST(sr.length >= 6);
tsig->timesigned = ((isc_uint64_t)sr.base[0] << 40) |
((isc_uint64_t)sr.base[1] << 32) |
- (sr.base[2] << 24) | (sr.base[3] << 16) |
- (sr.base[4] << 8) | sr.base[5];
+ ((isc_uint64_t)sr.base[2] << 24) |
+ ((isc_uint64_t)sr.base[3] << 16) |
+ ((isc_uint64_t)sr.base[4] << 8) |
+ (isc_uint64_t)sr.base[5];
isc_region_consume(&sr, 6);
/*
diff --git a/contrib/bind9/lib/dns/rdata/generic/ds_43.c b/contrib/bind9/lib/dns/rdata/generic/ds_43.c
index 538f865..0206b6f 100644
--- a/contrib/bind9/lib/dns/rdata/generic/ds_43.c
+++ b/contrib/bind9/lib/dns/rdata/generic/ds_43.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2002 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: ds_43.c,v 1.6.2.2 2004/03/16 12:38:14 marka Exp $ */
+/* $Id: ds_43.c,v 1.6.2.4 2005/09/06 07:29:31 marka Exp $ */
/* draft-ietf-dnsext-delegation-signer-05.txt */
@@ -28,6 +28,7 @@
static inline isc_result_t
fromtext_ds(ARGS_FROMTEXT) {
isc_token_t token;
+ unsigned char c;
REQUIRE(type == 43);
@@ -49,11 +50,10 @@ fromtext_ds(ARGS_FROMTEXT) {
/*
* Algorithm.
*/
- RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
+ RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
ISC_FALSE));
- if (token.value.as_ulong > 0xffU)
- RETTOK(ISC_R_RANGE);
- RETERR(uint8_tobuffer(token.value.as_ulong, target));
+ RETTOK(dns_secalg_fromtext(&c, &token.value.as_textregion));
+ RETERR(mem_tobuffer(target, &c, 1));
/*
* Digest type.
diff --git a/contrib/bind9/lib/dns/rdata/generic/rt_21.c b/contrib/bind9/lib/dns/rdata/generic/rt_21.c
index 0f568e3..daf9756 100644
--- a/contrib/bind9/lib/dns/rdata/generic/rt_21.c
+++ b/contrib/bind9/lib/dns/rdata/generic/rt_21.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 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.
*/
-/* $Id: rt_21.c,v 1.37.2.1.2.3 2004/03/06 08:14:11 marka Exp $ */
+/* $Id: rt_21.c,v 1.37.2.1.2.5 2005/03/17 03:58:31 marka Exp $ */
/* reviewed: Thu Mar 16 15:02:31 PST 2000 by brister */
@@ -300,7 +300,7 @@ checknames_rt(ARGS_CHECKNAMES) {
isc_region_consume(&region, 2);
dns_name_init(&name, NULL);
dns_name_fromregion(&name, &region);
- if (dns_name_ishostname(&name, ISC_FALSE)) {
+ if (!dns_name_ishostname(&name, ISC_FALSE)) {
if (bad != NULL)
dns_name_clone(&name, bad);
return (ISC_FALSE);
diff --git a/contrib/bind9/lib/dns/resolver.c b/contrib/bind9/lib/dns/resolver.c
index 790a2f4..6f803eb 100644
--- a/contrib/bind9/lib/dns/resolver.c
+++ b/contrib/bind9/lib/dns/resolver.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: resolver.c,v 1.218.2.18.4.51 2005/02/08 23:59:44 marka Exp $ */
+/* $Id: resolver.c,v 1.218.2.18.4.56 2005/10/14 01:38:48 marka Exp $ */
#include <config.h>
@@ -244,6 +244,11 @@ struct fetchctx {
#define TRIEDFIND(f) (((f)->attributes & FCTX_ATTR_TRIEDFIND) != 0)
#define TRIEDALT(f) (((f)->attributes & FCTX_ATTR_TRIEDALT) != 0)
+typedef struct {
+ dns_adbaddrinfo_t * addrinfo;
+ fetchctx_t * fctx;
+} dns_valarg_t;
+
struct dns_fetch {
unsigned int magic;
fetchctx_t * private;
@@ -342,6 +347,35 @@ static isc_result_t ncache_adderesult(dns_message_t *message,
isc_stdtime_t now, dns_ttl_t maxttl,
dns_rdataset_t *ardataset,
isc_result_t *eresultp);
+static void validated(isc_task_t *task, isc_event_t *event);
+
+static isc_result_t
+valcreate(fetchctx_t *fctx, dns_adbaddrinfo_t *addrinfo, dns_name_t *name,
+ dns_rdatatype_t type, dns_rdataset_t *rdataset,
+ dns_rdataset_t *sigrdataset, unsigned int valoptions,
+ isc_task_t *task)
+{
+ dns_validator_t *validator = NULL;
+ dns_valarg_t *valarg;
+ isc_result_t result;
+
+ valarg = isc_mem_get(fctx->res->mctx, sizeof(*valarg));
+ if (valarg == NULL)
+ return (ISC_R_NOMEMORY);
+
+ valarg->fctx = fctx;
+ valarg->addrinfo = addrinfo;
+
+ result = dns_validator_create(fctx->res->view, name, type, rdataset,
+ sigrdataset, fctx->rmessage,
+ valoptions, task, validated, valarg,
+ &validator);
+ if (result == ISC_R_SUCCESS)
+ ISC_LIST_APPEND(fctx->validators, validator, link);
+ else
+ isc_mem_put(fctx->res->mctx, valarg, sizeof(*valarg));
+ return (result);
+}
static isc_boolean_t
fix_mustbedelegationornxdomain(dns_message_t *message, fetchctx_t *fctx) {
@@ -1424,6 +1458,7 @@ resquery_connected(isc_task_t *task, isc_event_t *event) {
case ISC_R_CONNREFUSED:
case ISC_R_NOPERM:
case ISC_R_ADDRNOTAVAIL:
+ case ISC_R_CONNECTIONRESET:
/*
* No route to remote.
*/
@@ -1855,7 +1890,6 @@ fctx_getaddresses(fetchctx_t *fctx) {
isc_boolean_t pruned, all_bad;
dns_rdata_ns_t ns;
isc_boolean_t need_alternate = ISC_FALSE;
- isc_boolean_t unshared;
FCTXTRACE("getaddresses");
@@ -1871,7 +1905,6 @@ fctx_getaddresses(fetchctx_t *fctx) {
res = fctx->res;
pruned = ISC_FALSE;
stdoptions = 0; /* Keep compiler happy. */
- unshared = ISC_TF((fctx->options | DNS_FETCHOPT_UNSHARED) != 0);
/*
* Forwarders.
@@ -2668,7 +2701,7 @@ fctx_create(dns_resolver_t *res, dns_name_t *name, dns_rdatatype_t type,
isc_result_t result;
isc_result_t iresult;
isc_interval_t interval;
- dns_fixedname_t qdomain;
+ dns_fixedname_t fixed;
unsigned int findoptions = 0;
char buf[DNS_NAME_FORMATSIZE + DNS_RDATATYPE_FORMATSIZE];
char typebuf[DNS_RDATATYPE_FORMATSIZE];
@@ -2747,8 +2780,10 @@ fctx_create(dns_resolver_t *res, dns_name_t *name, dns_rdatatype_t type,
dns_name_getlabelsequence(name, 1, labels - 1, &suffix);
name = &suffix;
}
- result = dns_fwdtable_find(fctx->res->view->fwdtable, name,
- &forwarders);
+ dns_fixedname_init(&fixed);
+ domain = dns_fixedname_name(&fixed);
+ result = dns_fwdtable_find2(fctx->res->view->fwdtable, name,
+ domain, &forwarders);
if (result == ISC_R_SUCCESS)
fctx->fwdpolicy = forwarders->fwdpolicy;
@@ -2760,27 +2795,22 @@ fctx_create(dns_resolver_t *res, dns_name_t *name, dns_rdatatype_t type,
*/
if (dns_rdatatype_atparent(type))
findoptions |= DNS_DBFIND_NOEXACT;
- dns_fixedname_init(&qdomain);
- result = dns_view_findzonecut(res->view, name,
- dns_fixedname_name(&qdomain), 0,
- findoptions, ISC_TRUE,
+ result = dns_view_findzonecut(res->view, name, domain,
+ 0, findoptions, ISC_TRUE,
&fctx->nameservers,
NULL);
if (result != ISC_R_SUCCESS)
goto cleanup_name;
- result = dns_name_dup(dns_fixedname_name(&qdomain),
- res->mctx, &fctx->domain);
+ result = dns_name_dup(domain, res->mctx, &fctx->domain);
if (result != ISC_R_SUCCESS) {
dns_rdataset_disassociate(&fctx->nameservers);
goto cleanup_name;
}
} else {
/*
- * We're in forward-only mode. Set the query domain
- * to ".".
+ * We're in forward-only mode. Set the query domain.
*/
- result = dns_name_dup(dns_rootname, res->mctx,
- &fctx->domain);
+ result = dns_name_dup(domain, res->mctx, &fctx->domain);
if (result != ISC_R_SUCCESS)
goto cleanup_name;
}
@@ -3090,11 +3120,15 @@ validated(isc_task_t *task, isc_event_t *event) {
dns_name_t *name;
dns_rdataset_t *rdataset;
dns_rdataset_t *sigrdataset;
+ dns_valarg_t *valarg;
+ dns_adbaddrinfo_t *addrinfo;
UNUSED(task); /* for now */
REQUIRE(event->ev_type == DNS_EVENT_VALIDATORDONE);
- fctx = event->ev_arg;
+ valarg = event->ev_arg;
+ fctx = valarg->fctx;
+ addrinfo = valarg->addrinfo;
REQUIRE(VALID_FCTX(fctx));
REQUIRE(!ISC_LIST_EMPTY(fctx->validators));
@@ -3109,6 +3143,7 @@ validated(isc_task_t *task, isc_event_t *event) {
* destroy the fctx if necessary.
*/
dns_validator_destroy(&vevent->validator);
+ isc_mem_put(fctx->res->mctx, valarg, sizeof(*valarg));
negative = ISC_TF(vevent->rdataset == NULL);
@@ -3166,21 +3201,27 @@ validated(isc_task_t *task, isc_event_t *event) {
if (vevent->result != ISC_R_SUCCESS) {
FCTXTRACE("validation failed");
- if (vevent->rdataset != NULL) {
+ result = ISC_R_NOTFOUND;
+ if (vevent->rdataset != NULL)
result = dns_db_findnode(fctx->cache, vevent->name,
ISC_TRUE, &node);
- if (result != ISC_R_SUCCESS)
- goto noanswer_response;
+ if (result == ISC_R_SUCCESS)
(void)dns_db_deleterdataset(fctx->cache, node, NULL,
vevent->type, 0);
- if (vevent->sigrdataset != NULL)
- (void)dns_db_deleterdataset(fctx->cache,
- node, NULL,
- dns_rdatatype_rrsig,
- vevent->type);
- }
+ if (result == ISC_R_SUCCESS && vevent->sigrdataset != NULL)
+ (void)dns_db_deleterdataset(fctx->cache, node, NULL,
+ dns_rdatatype_rrsig,
+ vevent->type);
+ if (result == ISC_R_SUCCESS)
+ dns_db_detachnode(fctx->cache, &node);
result = vevent->result;
- goto noanswer_response;
+ add_bad(fctx, &addrinfo->sockaddr, result);
+ isc_event_free(&event);
+ if (sentresponse)
+ fctx_done(fctx, result);
+ else
+ fctx_try(fctx);
+ return;
}
isc_stdtime_get(&now);
@@ -3350,7 +3391,8 @@ validated(isc_task_t *task, isc_event_t *event) {
}
static inline isc_result_t
-cache_name(fetchctx_t *fctx, dns_name_t *name, isc_stdtime_t now) {
+cache_name(fetchctx_t *fctx, dns_name_t *name, dns_adbaddrinfo_t *addrinfo,
+ isc_stdtime_t now) {
dns_rdataset_t *rdataset, *sigrdataset;
dns_rdataset_t *addedrdataset, *ardataset, *asigrdataset;
dns_rdataset_t *valrdataset = NULL, *valsigrdataset = NULL;
@@ -3363,8 +3405,8 @@ cache_name(fetchctx_t *fctx, dns_name_t *name, isc_stdtime_t now) {
dns_fetchevent_t *event;
unsigned int options;
isc_task_t *task;
- dns_validator_t *validator;
isc_boolean_t fail;
+ unsigned int valoptions = 0;
/*
* The appropriate bucket lock must be held.
@@ -3385,8 +3427,10 @@ cache_name(fetchctx_t *fctx, dns_name_t *name, isc_stdtime_t now) {
if (result != ISC_R_SUCCESS)
return (result);
- if (res->view->dlv != NULL)
+ if (!secure_domain && res->view->dlv != NULL) {
+ valoptions = DNS_VALIDATOR_DLV;
secure_domain = ISC_TRUE;
+ }
if ((fctx->options & DNS_FETCHOPT_NOVALIDATE) != 0)
need_validation = ISC_FALSE;
@@ -3437,7 +3481,7 @@ cache_name(fetchctx_t *fctx, dns_name_t *name, isc_stdtime_t now) {
/*
* Cache or validate each cacheable rdataset.
*/
- fail = (fctx->res->options & DNS_RESOLVER_CHECKNAMESFAIL) != 0;
+ fail = ISC_TF((fctx->res->options & DNS_RESOLVER_CHECKNAMESFAIL) != 0);
for (rdataset = ISC_LIST_HEAD(name->list);
rdataset != NULL;
rdataset = ISC_LIST_NEXT(rdataset, link)) {
@@ -3569,23 +3613,11 @@ cache_name(fetchctx_t *fctx, dns_name_t *name, isc_stdtime_t now) {
* having to remember which
* rdatasets needed validation.
*/
- validator = NULL;
- result = dns_validator_create(
- res->view,
- name,
- rdataset->type,
- rdataset,
- sigrdataset,
- fctx->rmessage,
- 0,
- task,
- validated,
- fctx,
- &validator);
- if (result == ISC_R_SUCCESS)
- ISC_LIST_APPEND(
- fctx->validators,
- validator, link);
+ result = valcreate(fctx, addrinfo,
+ name, rdataset->type,
+ rdataset,
+ sigrdataset,
+ valoptions, task);
}
} else if (CHAINING(rdataset)) {
if (rdataset->type == dns_rdatatype_cname)
@@ -3660,22 +3692,10 @@ cache_name(fetchctx_t *fctx, dns_name_t *name, isc_stdtime_t now) {
}
}
- if (valrdataset != NULL) {
- validator = NULL;
- result = dns_validator_create(res->view,
- name,
- fctx->type,
- valrdataset,
- valsigrdataset,
- fctx->rmessage,
- 0,
- task,
- validated,
- fctx,
- &validator);
- if (result == ISC_R_SUCCESS)
- ISC_LIST_APPEND(fctx->validators, validator, link);
- }
+ if (valrdataset != NULL)
+ result = valcreate(fctx, addrinfo, name, fctx->type,
+ valrdataset, valsigrdataset, valoptions,
+ task);
if (result == ISC_R_SUCCESS && have_answer) {
fctx->attributes |= FCTX_ATTR_HAVEANSWER;
@@ -3695,7 +3715,8 @@ cache_name(fetchctx_t *fctx, dns_name_t *name, isc_stdtime_t now) {
}
static inline isc_result_t
-cache_message(fetchctx_t *fctx, isc_stdtime_t now) {
+cache_message(fetchctx_t *fctx, dns_adbaddrinfo_t *addrinfo, isc_stdtime_t now)
+{
isc_result_t result;
dns_section_t section;
dns_name_t *name;
@@ -3715,7 +3736,7 @@ cache_message(fetchctx_t *fctx, isc_stdtime_t now) {
dns_message_currentname(fctx->rmessage, section,
&name);
if ((name->attributes & DNS_NAMEATTR_CACHE) != 0) {
- result = cache_name(fctx, name, now);
+ result = cache_name(fctx, name, addrinfo, now);
if (result != ISC_R_SUCCESS)
break;
}
@@ -3783,7 +3804,9 @@ ncache_adderesult(dns_message_t *message, dns_db_t *cache, dns_dbnode_t *node,
}
static inline isc_result_t
-ncache_message(fetchctx_t *fctx, dns_rdatatype_t covers, isc_stdtime_t now) {
+ncache_message(fetchctx_t *fctx, dns_adbaddrinfo_t *addrinfo,
+ dns_rdatatype_t covers, isc_stdtime_t now)
+{
isc_result_t result, eresult;
dns_name_t *name;
dns_resolver_t *res;
@@ -3794,6 +3817,7 @@ ncache_message(fetchctx_t *fctx, dns_rdatatype_t covers, isc_stdtime_t now) {
dns_name_t *aname;
dns_fetchevent_t *event;
isc_uint32_t ttl;
+ unsigned int valoptions = 0;
FCTXTRACE("ncache_message");
@@ -3820,8 +3844,10 @@ ncache_message(fetchctx_t *fctx, dns_rdatatype_t covers, isc_stdtime_t now) {
if (result != ISC_R_SUCCESS)
return (result);
- if (res->view->dlv != NULL)
+ if (!secure_domain && res->view->dlv != NULL) {
+ valoptions = DNS_VALIDATOR_DLV;
secure_domain = ISC_TRUE;
+ }
if ((fctx->options & DNS_FETCHOPT_NOVALIDATE) != 0)
need_validation = ISC_FALSE;
@@ -3858,23 +3884,15 @@ ncache_message(fetchctx_t *fctx, dns_rdatatype_t covers, isc_stdtime_t now) {
/*
* Do negative response validation.
*/
- dns_validator_t *validator = NULL;
- isc_task_t *task = res->buckets[fctx->bucketnum].task;
-
- result = dns_validator_create(res->view, name, fctx->type,
- NULL, NULL,
- fctx->rmessage, 0, task,
- validated, fctx,
- &validator);
- if (result != ISC_R_SUCCESS)
- return (result);
- ISC_LIST_APPEND(fctx->validators, validator, link);
+ result = valcreate(fctx, addrinfo, name, fctx->type,
+ NULL, NULL, valoptions,
+ res->buckets[fctx->bucketnum].task);
/*
* If validation is necessary, return now. Otherwise continue
* to process the message, letting the validation complete
* in its own good time.
*/
- return (ISC_R_SUCCESS);
+ return (result);
}
LOCK(&res->buckets[fctx->bucketnum].lock);
@@ -4992,6 +5010,43 @@ checknames(dns_message_t *message) {
}
static void
+log_packet(dns_message_t *message, int level, isc_mem_t *mctx) {
+ isc_buffer_t buffer;
+ char *buf = NULL;
+ int len = 1024;
+ isc_result_t result;
+
+ if (! isc_log_wouldlog(dns_lctx, level))
+ return;
+
+ /*
+ * Note that these are multiline debug messages. We want a newline
+ * to appear in the log after each message.
+ */
+
+ do {
+ buf = isc_mem_get(mctx, len);
+ if (buf == NULL)
+ break;
+ isc_buffer_init(&buffer, buf, len);
+ result = dns_message_totext(message, &dns_master_style_debug,
+ 0, &buffer);
+ if (result == ISC_R_NOSPACE) {
+ isc_mem_put(mctx, buf, len);
+ len += 1024;
+ } else if (result == ISC_R_SUCCESS)
+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_RESOLVER,
+ DNS_LOGMODULE_RESOLVER, level,
+ "received packet:\n%.*s",
+ (int)isc_buffer_usedlength(&buffer),
+ buf);
+ } while (result == ISC_R_NOSPACE);
+
+ if (buf != NULL)
+ isc_mem_put(mctx, buf, len);
+}
+
+static void
resquery_response(isc_task_t *task, isc_event_t *event) {
isc_result_t result = ISC_R_SUCCESS;
resquery_t *query = event->ev_arg;
@@ -5160,6 +5215,11 @@ resquery_response(isc_task_t *task, isc_event_t *event) {
}
/*
+ * Log the incoming packet.
+ */
+ log_packet(message, ISC_LOG_DEBUG(10), fctx->res->mctx);
+
+ /*
* If the message is signed, check the signature. If not, this
* returns success anyway.
*/
@@ -5427,7 +5487,7 @@ resquery_response(isc_task_t *task, isc_event_t *event) {
* work to be queued to the DNSSEC validator.
*/
if (WANTCACHE(fctx)) {
- result = cache_message(fctx, now);
+ result = cache_message(fctx, query->addrinfo, now);
if (result != ISC_R_SUCCESS)
goto done;
}
@@ -5446,7 +5506,7 @@ resquery_response(isc_task_t *task, isc_event_t *event) {
/*
* Cache any negative cache entries in the message.
*/
- result = ncache_message(fctx, covers, now);
+ result = ncache_message(fctx, query->addrinfo, covers, now);
}
done:
diff --git a/contrib/bind9/lib/dns/tkey.c b/contrib/bind9/lib/dns/tkey.c
index dc49a33..43c8db0 100644
--- a/contrib/bind9/lib/dns/tkey.c
+++ b/contrib/bind9/lib/dns/tkey.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 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 @@
*/
/*
- * $Id: tkey.c,v 1.71.2.1.10.5 2004/06/11 00:30:54 marka Exp $
+ * $Id: tkey.c,v 1.71.2.1.10.7 2005/06/12 00:02:26 marka Exp $
*/
#include <config.h>
@@ -356,7 +356,7 @@ process_dhtkey(dns_message_t *msg, dns_name_t *signer, dns_name_t *name,
isc_buffer_init(&secret, secretdata, sizeof(secretdata));
- randomdata = isc_mem_get(tctx->mctx, TKEY_RANDOM_AMOUNT);
+ randomdata = isc_mem_get(tkeyout->mctx, TKEY_RANDOM_AMOUNT);
if (randomdata == NULL)
goto failure;
@@ -397,8 +397,8 @@ process_dhtkey(dns_message_t *msg, dns_name_t *signer, dns_name_t *name,
isc_buffer_free(&shared);
if (pubkey != NULL)
dst_key_free(&pubkey);
- if (randomdata == NULL)
- isc_mem_put(tctx->mctx, randomdata, TKEY_RANDOM_AMOUNT);
+ if (randomdata != NULL)
+ isc_mem_put(tkeyout->mctx, randomdata, TKEY_RANDOM_AMOUNT);
return (result);
}
diff --git a/contrib/bind9/lib/dns/tsig.c b/contrib/bind9/lib/dns/tsig.c
index fb1ac82..6a8d774 100644
--- a/contrib/bind9/lib/dns/tsig.c
+++ b/contrib/bind9/lib/dns/tsig.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2002 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -16,7 +16,7 @@
*/
/*
- * $Id: tsig.c,v 1.112.2.3.8.4 2004/03/08 09:04:32 marka Exp $
+ * $Id: tsig.c,v 1.112.2.3.8.6 2005/03/17 03:58:31 marka Exp $
*/
#include <config.h>
@@ -167,7 +167,7 @@ dns_tsigkey_createfromkey(dns_name_t *name, dns_name_t *algorithm,
goto cleanup_name;
}
} else {
- if (key != NULL) {
+ if (dstkey != NULL) {
ret = DNS_R_BADALG;
goto cleanup_name;
}
diff --git a/contrib/bind9/lib/dns/validator.c b/contrib/bind9/lib/dns/validator.c
index 069b9c2..a62db34 100644
--- a/contrib/bind9/lib/dns/validator.c
+++ b/contrib/bind9/lib/dns/validator.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: validator.c,v 1.91.2.5.8.15 2005/02/09 05:13:02 marka Exp $ */
+/* $Id: validator.c,v 1.91.2.5.8.21 2005/11/02 02:07:47 marka Exp $ */
#include <config.h>
@@ -51,9 +51,7 @@
#define VALATTR_TRIEDVERIFY 0x0004
#define VALATTR_NEGATIVE 0x0008
#define VALATTR_INSECURITY 0x0010
-#define VALATTR_DLV 0x0020
-#define VALATTR_DLVTRIED 0x0040
-#define VALATTR_DLVSEPTRIED 0x0080
+#define VALATTR_DLVTRIED 0x0020
#define VALATTR_NEEDNOQNAME 0x0100
#define VALATTR_NEEDNOWILDCARD 0x0200
@@ -63,13 +61,10 @@
#define VALATTR_FOUNDNOWILDCARD 0x2000
#define VALATTR_FOUNDNODATA 0x4000
-
#define NEEDNODATA(val) ((val->attributes & VALATTR_NEEDNODATA) != 0)
#define NEEDNOQNAME(val) ((val->attributes & VALATTR_NEEDNOQNAME) != 0)
#define NEEDNOWILDCARD(val) ((val->attributes & VALATTR_NEEDNOWILDCARD) != 0)
-#define DLV(val) ((val->attributes & VALATTR_DLV) != 0)
#define DLVTRIED(val) ((val->attributes & VALATTR_DLVTRIED) != 0)
-#define DLVSEPTRIED(val) ((val->attributes & VALATTR_DLVSEPTRIED) != 0)
#define SHUTDOWN(v) (((v)->attributes & VALATTR_SHUTDOWN) != 0)
@@ -110,8 +105,20 @@ static isc_result_t
dlv_validatezonekey(dns_validator_t *val);
static isc_result_t
+dlv_validator_start(dns_validator_t *val);
+
+static isc_result_t
finddlvsep(dns_validator_t *val, isc_boolean_t resume);
+static inline void
+markanswer(dns_validator_t *val) {
+ validator_log(val, ISC_LOG_DEBUG(3), "marking as answer");
+ if (val->event->rdataset)
+ val->event->rdataset->trust = dns_trust_answer;
+ if (val->event->sigrdataset)
+ val->event->sigrdataset->trust = dns_trust_answer;
+}
+
static void
validator_done(dns_validator_t *val, isc_result_t result) {
isc_task_t *task;
@@ -219,6 +226,13 @@ fetch_callback_validator(isc_task_t *task, isc_event_t *event) {
rdataset = &val->frdataset;
eresult = devent->result;
+ /* Free resources which are not of interest. */
+ if (devent->node != NULL)
+ dns_db_detachnode(devent->db, &devent->node);
+ if (devent->db != NULL)
+ dns_db_detach(&devent->db);
+ if (dns_rdataset_isassociated(&val->fsigrdataset))
+ dns_rdataset_disassociate(&val->fsigrdataset);
isc_event_free(&event);
dns_resolver_destroyfetch(&val->fetch);
@@ -271,6 +285,13 @@ dsfetched(isc_task_t *task, isc_event_t *event) {
rdataset = &val->frdataset;
eresult = devent->result;
+ /* Free resources which are not of interest. */
+ if (devent->node != NULL)
+ dns_db_detachnode(devent->db, &devent->node);
+ if (devent->db != NULL)
+ dns_db_detach(&devent->db);
+ if (dns_rdataset_isassociated(&val->fsigrdataset))
+ dns_rdataset_disassociate(&val->fsigrdataset);
isc_event_free(&event);
dns_resolver_destroyfetch(&val->fetch);
@@ -285,18 +306,6 @@ dsfetched(isc_task_t *task, isc_event_t *event) {
result = validatezonekey(val);
if (result != DNS_R_WAIT)
validator_done(val, result);
- } else if (val->view->dlv != NULL && !DLVTRIED(val) &&
- (eresult == DNS_R_NXRRSET ||
- eresult == DNS_R_NCACHENXRRSET) &&
- !dns_name_issubdomain(val->event->name,
- val->view->dlv))
- {
- validator_log(val, ISC_LOG_DEBUG(2),
- "no DS record: looking for DLV");
-
- result = dlv_validatezonekey(val);
- if (result != DNS_R_WAIT)
- validator_done(val, result);
} else if (eresult == DNS_R_NXRRSET ||
eresult == DNS_R_NCACHENXRRSET)
{
@@ -328,7 +337,6 @@ static void
dsfetched2(isc_task_t *task, isc_event_t *event) {
dns_fetchevent_t *devent;
dns_validator_t *val;
- dns_rdataset_t *rdataset;
dns_name_t *tname;
isc_boolean_t want_destroy;
isc_result_t result;
@@ -338,9 +346,15 @@ dsfetched2(isc_task_t *task, isc_event_t *event) {
INSIST(event->ev_type == DNS_EVENT_FETCHDONE);
devent = (dns_fetchevent_t *)event;
val = devent->ev_arg;
- rdataset = &val->frdataset;
eresult = devent->result;
+ /* Free resources which are not of interest. */
+ if (devent->node != NULL)
+ dns_db_detachnode(devent->db, &devent->node);
+ if (devent->db != NULL)
+ dns_db_detach(&devent->db);
+ if (dns_rdataset_isassociated(&val->fsigrdataset))
+ dns_rdataset_disassociate(&val->fsigrdataset);
dns_resolver_destroyfetch(&val->fetch);
INSIST(val->event != NULL);
@@ -358,7 +372,7 @@ dsfetched2(isc_task_t *task, isc_event_t *event) {
"must be secure failure");
validator_done(val, DNS_R_MUSTBESECURE);
} else {
- val->event->rdataset->trust = dns_trust_answer;
+ markanswer(val);
validator_done(val, ISC_R_SUCCESS);
}
} else {
@@ -553,7 +567,7 @@ nsecnoexistnodata(dns_validator_t *val, dns_name_t* name, dns_name_t *nsecname,
"nsec proves name exists (owner) data=%d",
*data);
return (ISC_R_SUCCESS);
- }
+ }
if (relation == dns_namereln_subdomain &&
dns_nsec_typepresent(&rdata, dns_rdatatype_ns) &&
@@ -627,7 +641,7 @@ static void
authvalidated(isc_task_t *task, isc_event_t *event) {
dns_validatorevent_t *devent;
dns_validator_t *val;
- dns_rdataset_t *rdataset, *sigrdataset;
+ dns_rdataset_t *rdataset;
isc_boolean_t want_destroy;
isc_result_t result;
isc_boolean_t exists, data;
@@ -637,7 +651,6 @@ authvalidated(isc_task_t *task, isc_event_t *event) {
devent = (dns_validatorevent_t *)event;
rdataset = devent->rdataset;
- sigrdataset = devent->sigrdataset;
val = devent->ev_arg;
result = devent->result;
dns_validator_destroy(&val->subvalidator);
@@ -916,8 +929,10 @@ create_validator(dns_validator_t *val, dns_name_t *name, dns_rdatatype_t type,
rdataset, sigrdataset, NULL, 0,
val->task, action, val,
&val->subvalidator);
- if (result == ISC_R_SUCCESS)
+ if (result == ISC_R_SUCCESS) {
val->subvalidator->parent = val;
+ val->subvalidator->depth = val->depth + 1;
+ }
return (result);
}
@@ -1252,10 +1267,7 @@ validate(dns_validator_t *val, isc_boolean_t resume) {
"must be secure failure");
return (DNS_R_MUSTBESECURE);
}
- event->rdataset->trust = dns_trust_answer;
- event->sigrdataset->trust = dns_trust_answer;
- validator_log(val, ISC_LOG_DEBUG(3),
- "marking as answer");
+ markanswer(val);
return (ISC_R_SUCCESS);
}
@@ -1344,110 +1356,9 @@ validate(dns_validator_t *val, isc_boolean_t resume) {
return (DNS_R_NOVALIDSIG);
}
-
-static void
-dlv_validated(isc_task_t *task, isc_event_t *event) {
- dns_validatorevent_t *devent;
- dns_validator_t *val;
- isc_boolean_t want_destroy;
- isc_result_t result;
- isc_result_t eresult;
-
- UNUSED(task);
- INSIST(event->ev_type == DNS_EVENT_VALIDATORDONE);
-
- devent = (dns_validatorevent_t *)event;
- val = devent->ev_arg;
- eresult = devent->result;
-
- isc_event_free(&event);
- dns_validator_destroy(&val->subvalidator);
-
- INSIST(val->event != NULL);
-
- validator_log(val, ISC_LOG_DEBUG(3), "in dsvalidated");
- LOCK(&val->lock);
- if (eresult == ISC_R_SUCCESS) {
- validator_log(val, ISC_LOG_DEBUG(3),
- "dlv with trust %d", val->frdataset.trust);
- if ((val->attributes & VALATTR_INSECURITY) != 0)
- result = proveunsecure(val, ISC_TRUE);
- else
- result = validatezonekey(val);
- if (result != DNS_R_WAIT)
- validator_done(val, result);
- } else {
- validator_log(val, ISC_LOG_DEBUG(3),
- "dlv_validated: got %s",
- isc_result_totext(eresult));
- validator_done(val, eresult);
- }
- want_destroy = exit_check(val);
- UNLOCK(&val->lock);
- if (want_destroy)
- destroy(val);
-}
-
-static void
-dlv_fetched(isc_task_t *task, isc_event_t *event) {
- dns_fetchevent_t *devent;
- dns_validator_t *val;
- dns_rdataset_t *rdataset;
- isc_boolean_t want_destroy;
- isc_result_t result;
- isc_result_t eresult;
-
- UNUSED(task);
- INSIST(event->ev_type == DNS_EVENT_FETCHDONE);
- devent = (dns_fetchevent_t *)event;
- val = devent->ev_arg;
- rdataset = &val->frdataset;
- eresult = devent->result;
-
- isc_event_free(&event);
- dns_resolver_destroyfetch(&val->fetch);
-
- INSIST(val->event != NULL);
-
- validator_log(val, ISC_LOG_DEBUG(3), "in dlv_fetched");
- LOCK(&val->lock);
- if (eresult == ISC_R_SUCCESS) {
- validator_log(val, ISC_LOG_DEBUG(3),
- "dlv set with trust %d", rdataset->trust);
- val->dlv = &val->frdataset;
- result = dlv_validatezonekey(val);
- if (result != DNS_R_WAIT)
- validator_done(val, result);
- } else if (eresult == DNS_R_NXRRSET ||
- eresult == DNS_R_NCACHENXRRSET)
- {
- validator_log(val, ISC_LOG_DEBUG(3),
- "falling back to insecurity proof");
- val->attributes |= VALATTR_INSECURITY;
- result = proveunsecure(val, ISC_FALSE);
- if (result != DNS_R_WAIT)
- validator_done(val, result);
- } else {
- validator_log(val, ISC_LOG_DEBUG(3),
- "dlv_fetched: got %s",
- isc_result_totext(eresult));
- if (eresult == ISC_R_CANCELED)
- validator_done(val, eresult);
- else
- validator_done(val, DNS_R_NOVALIDDS);
- }
- want_destroy = exit_check(val);
- UNLOCK(&val->lock);
- if (want_destroy)
- destroy(val);
-}
-
static isc_result_t
dlv_validatezonekey(dns_validator_t *val) {
- dns_fixedname_t fixed;
dns_keytag_t keytag;
- dns_name_t *name;
- dns_name_t tname;
dns_rdata_dlv_t dlv;
dns_rdata_dnskey_t key;
dns_rdata_rrsig_t sig;
@@ -1460,91 +1371,8 @@ dlv_validatezonekey(dns_validator_t *val) {
isc_boolean_t supported_algorithm;
isc_result_t result;
unsigned char dsbuf[DNS_DS_BUFFERSIZE];
- unsigned int labels;
-
- val->attributes |= VALATTR_DLVTRIED;
-
- dns_name_init(&tname, NULL);
- dns_fixedname_init(&fixed);
- name = dns_fixedname_name(&fixed);
- labels = dns_name_countlabels(val->event->name);
- dns_name_getlabelsequence(val->event->name, 0, labels - 1, &tname);
- result = dns_name_concatenate(&tname, val->view->dlv, name, NULL);
- if (result != ISC_R_SUCCESS) {
- validator_log(val, ISC_LOG_DEBUG(2),
- "DLV concatenate failed");
- return (DNS_R_NOVALIDSIG);
- }
- if (val->dlv == NULL) {
- result = view_find(val, name, dns_rdatatype_dlv);
- if (result == ISC_R_SUCCESS) {
- /*
- * We have DLV records.
- */
- val->dsset = &val->frdataset;
- if (val->frdataset.trust == dns_trust_pending &&
- dns_rdataset_isassociated(&val->fsigrdataset))
- {
- result = create_validator(val,
- val->event->name,
- dns_rdatatype_ds,
- &val->frdataset,
- &val->fsigrdataset,
- dlv_validated,
- "dlv_validatezonekey");
- if (result != ISC_R_SUCCESS)
- return (result);
- return (DNS_R_WAIT);
- } else if (val->frdataset.trust == dns_trust_pending) {
- /*
- * There should never be an unsigned DLV.
- */
- dns_rdataset_disassociate(&val->frdataset);
- validator_log(val, ISC_LOG_DEBUG(2),
- "unsigned DLV record");
- return (DNS_R_NOVALIDSIG);
- } else
- result = ISC_R_SUCCESS;
- } else if (result == ISC_R_NOTFOUND) {
- result = create_fetch(val, name, dns_rdatatype_dlv,
- dlv_fetched,
- "dlv_validatezonekey");
- if (result != ISC_R_SUCCESS)
- return (result);
- return (DNS_R_WAIT);
- } else if (result == DNS_R_NCACHENXDOMAIN ||
- result == DNS_R_NCACHENXRRSET ||
- result == DNS_R_NXDOMAIN ||
- result == DNS_R_NXRRSET)
- {
- /*
- * The DS does not exist.
- */
- if (dns_rdataset_isassociated(&val->frdataset))
- dns_rdataset_disassociate(&val->frdataset);
- if (dns_rdataset_isassociated(&val->fsigrdataset))
- dns_rdataset_disassociate(&val->fsigrdataset);
- validator_log(val, ISC_LOG_DEBUG(2), "no DLV record");
- return (DNS_R_NOVALIDSIG);
- }
- }
-
- /*
- * We have a DLV set.
- */
- INSIST(val->dlv != NULL);
-
- if (val->dlv->trust < dns_trust_secure) {
- if (val->mustbesecure) {
- validator_log(val, ISC_LOG_WARNING,
- "must be secure failure");
- return (DNS_R_MUSTBESECURE);
- }
- val->event->rdataset->trust = dns_trust_answer;
- val->event->sigrdataset->trust = dns_trust_answer;
- return (ISC_R_SUCCESS);
- }
+ validator_log(val, ISC_LOG_DEBUG(3), "dlv_validatezonekey");
/*
* Look through the DLV record and find the keys that can sign the
* key set and the matching signature. For each such key, attempt
@@ -1553,15 +1381,16 @@ dlv_validatezonekey(dns_validator_t *val) {
supported_algorithm = ISC_FALSE;
- for (result = dns_rdataset_first(val->dlv);
+ for (result = dns_rdataset_first(&val->dlv);
result == ISC_R_SUCCESS;
- result = dns_rdataset_next(val->dlv))
+ result = dns_rdataset_next(&val->dlv))
{
dns_rdata_reset(&dlvrdata);
- dns_rdataset_current(val->dlv, &dlvrdata);
+ dns_rdataset_current(&val->dlv, &dlvrdata);
(void)dns_rdata_tostruct(&dlvrdata, &dlv, NULL);
- if (!dns_resolver_algorithm_supported(val->view->resolver,
+ if (dlv.digest_type != DNS_DSDIGEST_SHA1 ||
+ !dns_resolver_algorithm_supported(val->view->resolver,
val->event->name,
dlv.algorithm))
continue;
@@ -1586,8 +1415,12 @@ dlv_validatezonekey(dns_validator_t *val) {
result = dns_ds_buildrdata(val->event->name,
&keyrdata, dlv.digest_type,
dsbuf, &newdsrdata);
- if (result != ISC_R_SUCCESS)
+ if (result != ISC_R_SUCCESS) {
+ validator_log(val, ISC_LOG_DEBUG(3),
+ "dns_ds_buildrdata() -> %s",
+ dns_result_totext(result));
continue;
+ }
/* Covert to DLV */
newdsrdata.type = dns_rdatatype_dlv;
if (dns_rdata_compare(&dlvrdata, &newdsrdata) == 0)
@@ -1598,7 +1431,9 @@ dlv_validatezonekey(dns_validator_t *val) {
"no DNSKEY matching DLV");
continue;
}
-
+ validator_log(val, ISC_LOG_DEBUG(3),
+ "Found matching DLV record: checking for signature");
+
for (result = dns_rdataset_first(val->event->sigrdataset);
result == ISC_R_SUCCESS;
result = dns_rdataset_next(val->event->sigrdataset))
@@ -1610,7 +1445,6 @@ dlv_validatezonekey(dns_validator_t *val) {
if (dlv.key_tag != sig.keyid &&
dlv.algorithm != sig.algorithm)
continue;
-
dstkey = NULL;
result = dns_dnssec_keyfromrdata(val->event->name,
&keyrdata,
@@ -1644,10 +1478,9 @@ dlv_validatezonekey(dns_validator_t *val) {
"must be secure failure");
return (DNS_R_MUSTBESECURE);
}
- val->event->rdataset->trust = dns_trust_answer;
- val->event->sigrdataset->trust = dns_trust_answer;
validator_log(val, ISC_LOG_DEBUG(3),
- "no supported algorithm (dlv)");
+ "no supported algorithm/digest (dlv)");
+ markanswer(val);
return (ISC_R_SUCCESS);
} else
return (DNS_R_NOVALIDSIG);
@@ -1685,6 +1518,10 @@ validatezonekey(dns_validator_t *val) {
event = val->event;
+ if (val->havedlvsep && val->dlv.trust >= dns_trust_secure &&
+ dns_name_equal(event->name, dns_fixedname_name(&val->dlvsep)))
+ return (dlv_validatezonekey(val));
+
if (val->dsset == NULL) {
/*
* First, see if this key was signed by a trusted key.
@@ -1783,22 +1620,6 @@ validatezonekey(dns_validator_t *val) {
if (result != ISC_R_SUCCESS)
return (result);
return (DNS_R_WAIT);
- } else if (val->view->dlv != NULL && !DLVTRIED(val) &&
- (result == DNS_R_NCACHENXRRSET ||
- result == DNS_R_NXRRSET) &&
- !dns_name_issubdomain(val->event->name,
- val->view->dlv))
- {
-
- if (dns_rdataset_isassociated(&val->frdataset))
- dns_rdataset_disassociate(&val->frdataset);
- if (dns_rdataset_isassociated(&val->fsigrdataset))
- dns_rdataset_disassociate(&val->fsigrdataset);
-
- validator_log(val, ISC_LOG_DEBUG(2),
- "no DS record: looking for DLV");
-
- return (dlv_validatezonekey(val));
} else if (result == DNS_R_NCACHENXDOMAIN ||
result == DNS_R_NCACHENXRRSET ||
result == DNS_R_NXDOMAIN ||
@@ -1827,8 +1648,7 @@ validatezonekey(dns_validator_t *val) {
"must be secure failure");
return (DNS_R_MUSTBESECURE);
}
- val->event->rdataset->trust = dns_trust_answer;
- val->event->sigrdataset->trust = dns_trust_answer;
+ markanswer(val);
return (ISC_R_SUCCESS);
}
@@ -1848,6 +1668,8 @@ validatezonekey(dns_validator_t *val) {
dns_rdataset_current(val->dsset, &dsrdata);
(void)dns_rdata_tostruct(&dsrdata, &ds, NULL);
+ if (ds.digest_type != DNS_DSDIGEST_SHA1)
+ continue;
if (!dns_resolver_algorithm_supported(val->view->resolver,
val->event->name,
ds.algorithm))
@@ -1923,24 +1745,15 @@ validatezonekey(dns_validator_t *val) {
event->sigrdataset->trust = dns_trust_secure;
validator_log(val, ISC_LOG_DEBUG(3), "marking as secure");
return (result);
- } else if (result == ISC_R_NOMORE && val->view->dlv != NULL &&
- !DLVTRIED(val) && !dns_name_issubdomain(val->event->name,
- val->view->dlv))
- {
- validator_log(val, ISC_LOG_DEBUG(2),
- "no DS/DNSKEY pair: looking for DLV");
-
- return (dlv_validatezonekey(val));
} else if (result == ISC_R_NOMORE && !supported_algorithm) {
if (val->mustbesecure) {
validator_log(val, ISC_LOG_WARNING,
"must be secure failure");
return (DNS_R_MUSTBESECURE);
}
- val->event->rdataset->trust = dns_trust_answer;
- val->event->sigrdataset->trust = dns_trust_answer;
validator_log(val, ISC_LOG_DEBUG(3),
- "no supported algorithm (ds)");
+ "no supported algorithm/digest (DS)");
+ markanswer(val);
return (ISC_R_SUCCESS);
} else
return (DNS_R_NOVALIDSIG);
@@ -2174,7 +1987,8 @@ nsecvalidate(dns_validator_t *val, isc_boolean_t resume) {
if ((val->attributes & VALATTR_FOUNDNONEXISTENCE) == 0) {
if (!val->seensig && val->soaset != NULL) {
- result = create_validator(val, name, dns_rdatatype_soa,
+ result = create_validator(val, val->soaname,
+ dns_rdatatype_soa,
val->soaset, NULL,
negauthvalidated,
"nsecvalidate");
@@ -2193,8 +2007,7 @@ nsecvalidate(dns_validator_t *val, isc_boolean_t resume) {
}
static isc_boolean_t
-check_ds_algorithm(dns_validator_t *val, dns_name_t *name,
- dns_rdataset_t *rdataset) {
+check_ds(dns_validator_t *val, dns_name_t *name, dns_rdataset_t *rdataset) {
dns_rdata_t dsrdata = DNS_RDATA_INIT;
dns_rdata_ds_t ds;
isc_result_t result;
@@ -2205,16 +2018,20 @@ check_ds_algorithm(dns_validator_t *val, dns_name_t *name,
dns_rdataset_current(rdataset, &dsrdata);
(void)dns_rdata_tostruct(&dsrdata, &ds, NULL);
- if (dns_resolver_algorithm_supported(val->view->resolver,
- name, ds.algorithm))
+ if (ds.digest_type == DNS_DSDIGEST_SHA1 &&
+ dns_resolver_algorithm_supported(val->view->resolver,
+ name, ds.algorithm)) {
+ dns_rdata_reset(&dsrdata);
return (ISC_TRUE);
+ }
dns_rdata_reset(&dsrdata);
}
return (ISC_FALSE);
}
static void
-dlv_fetched2(isc_task_t *task, isc_event_t *event) {
+dlvfetched(isc_task_t *task, isc_event_t *event) {
+ char namebuf[DNS_NAME_FORMATSIZE];
dns_fetchevent_t *devent;
dns_validator_t *val;
isc_boolean_t want_destroy;
@@ -2226,18 +2043,29 @@ dlv_fetched2(isc_task_t *task, isc_event_t *event) {
devent = (dns_fetchevent_t *)event;
val = devent->ev_arg;
eresult = devent->result;
-
+
+ /* Free resources which are not of interest. */
+ if (devent->node != NULL)
+ dns_db_detachnode(devent->db, &devent->node);
+ if (devent->db != NULL)
+ dns_db_detach(&devent->db);
+ if (dns_rdataset_isassociated(&val->fsigrdataset))
+ dns_rdataset_disassociate(&val->fsigrdataset);
isc_event_free(&event);
dns_resolver_destroyfetch(&val->fetch);
-
+
INSIST(val->event != NULL);
- validator_log(val, ISC_LOG_DEBUG(3), "in dlv_fetched2: %s",
+ validator_log(val, ISC_LOG_DEBUG(3), "in dlvfetched: %s",
dns_result_totext(eresult));
LOCK(&val->lock);
if (eresult == ISC_R_SUCCESS) {
+ dns_name_format(dns_fixedname_name(&val->dlvsep), namebuf,
+ sizeof(namebuf));
+ dns_rdataset_clone(&val->frdataset, &val->dlv);
val->havedlvsep = ISC_TRUE;
- result = proveunsecure(val, ISC_FALSE);
+ validator_log(val, ISC_LOG_DEBUG(3), "DLV %s found", namebuf);
+ result = dlv_validator_start(val);
if (result != DNS_R_WAIT)
validator_done(val, result);
} else if (eresult == DNS_R_NXRRSET ||
@@ -2246,13 +2074,26 @@ dlv_fetched2(isc_task_t *task, isc_event_t *event) {
eresult == DNS_R_NCACHENXDOMAIN) {
result = finddlvsep(val, ISC_TRUE);
if (result == ISC_R_SUCCESS) {
- result = proveunsecure(val, ISC_FALSE);
+ dns_name_format(dns_fixedname_name(&val->dlvsep),
+ namebuf, sizeof(namebuf));
+ validator_log(val, ISC_LOG_DEBUG(3), "DLV %s found",
+ namebuf);
+ result = dlv_validator_start(val);
if (result != DNS_R_WAIT)
validator_done(val, result);
} else if (result == ISC_R_NOTFOUND) {
+ validator_log(val, ISC_LOG_DEBUG(3), "DLV not found");
+ markanswer(val);
validator_done(val, ISC_R_SUCCESS);
- } else if (result != DNS_R_WAIT)
- validator_done(val, result);
+ } else {
+ validator_log(val, ISC_LOG_DEBUG(3), "DLV lookup: %s",
+ dns_result_totext(result));
+ if (result != DNS_R_WAIT)
+ validator_done(val, result);
+ }
+ } else {
+ validator_log(val, ISC_LOG_DEBUG(3), "DLV lookup: %s",
+ dns_result_totext(eresult));
}
want_destroy = exit_check(val);
UNLOCK(&val->lock);
@@ -2261,19 +2102,72 @@ dlv_fetched2(isc_task_t *task, isc_event_t *event) {
}
static isc_result_t
+startfinddlvsep(dns_validator_t *val, dns_name_t *unsecure) {
+ char namebuf[DNS_NAME_FORMATSIZE];
+ isc_result_t result;
+
+ INSIST(!DLVTRIED(val));
+
+ val->attributes |= VALATTR_DLVTRIED;
+
+ dns_name_format(unsecure, namebuf, sizeof(namebuf));
+ validator_log(val, ISC_LOG_DEBUG(3),
+ "plain DNSSEC returns unsecure (%s): looking for DLV",
+ namebuf);
+
+ if (dns_name_issubdomain(val->event->name, val->view->dlv)) {
+ validator_log(val, ISC_LOG_WARNING, "must be secure failure");
+ return (DNS_R_MUSTBESECURE);
+ }
+
+ val->dlvlabels = dns_name_countlabels(unsecure) - 1;
+ result = finddlvsep(val, ISC_FALSE);
+ if (result == ISC_R_NOTFOUND) {
+ validator_log(val, ISC_LOG_DEBUG(3), "DLV not found");
+ markanswer(val);
+ return (ISC_R_SUCCESS);
+ }
+ if (result != ISC_R_SUCCESS) {
+ validator_log(val, ISC_LOG_DEBUG(3), "DLV lookup: %s",
+ dns_result_totext(result));
+ return (result);
+ }
+ dns_name_format(dns_fixedname_name(&val->dlvsep), namebuf,
+ sizeof(namebuf));
+ validator_log(val, ISC_LOG_DEBUG(3), "DLV %s found", namebuf);
+ return (dlv_validator_start(val));
+}
+
+static isc_result_t
finddlvsep(dns_validator_t *val, isc_boolean_t resume) {
+ char namebuf[DNS_NAME_FORMATSIZE];
dns_fixedname_t dlvfixed;
dns_name_t *dlvname;
dns_name_t *dlvsep;
dns_name_t noroot;
isc_result_t result;
unsigned int labels;
+
+ INSIST(val->view->dlv != NULL);
if (!resume) {
+
+ if (dns_name_issubdomain(val->event->name, val->view->dlv)) {
+ validator_log(val, ISC_LOG_WARNING,
+ "must be secure failure");
+ return (DNS_R_MUSTBESECURE);
+ }
+
dns_fixedname_init(&val->dlvsep);
dlvsep = dns_fixedname_name(&val->dlvsep);
dns_name_copy(val->event->name, dlvsep, NULL);
- val->attributes |= VALATTR_DLVSEPTRIED;
+ if (val->event->type == dns_rdatatype_ds) {
+ labels = dns_name_countlabels(dlvsep);
+ if (labels == 0)
+ return (ISC_R_NOTFOUND);
+ dns_name_getlabelsequence(dlvsep, 1, labels - 1,
+ dlvsep);
+ }
} else {
dlvsep = dns_fixedname_name(&val->dlvsep);
labels = dns_name_countlabels(dlvsep);
@@ -2283,6 +2177,8 @@ finddlvsep(dns_validator_t *val, isc_boolean_t resume) {
dns_fixedname_init(&dlvfixed);
dlvname = dns_fixedname_name(&dlvfixed);
labels = dns_name_countlabels(dlvsep);
+ if (labels == 0)
+ return (ISC_R_NOTFOUND);
dns_name_getlabelsequence(dlvsep, 0, labels - 1, &noroot);
result = dns_name_concatenate(&noroot, val->view->dlv, dlvname, NULL);
while (result == ISC_R_NOSPACE) {
@@ -2297,32 +2193,37 @@ finddlvsep(dns_validator_t *val, isc_boolean_t resume) {
return (DNS_R_NOVALIDSIG);
}
- while (dns_name_countlabels(dlvname) >
- dns_name_countlabels(val->view->dlv))
- {
+ while (dns_name_countlabels(dlvname) >=
+ dns_name_countlabels(val->view->dlv) + val->dlvlabels) {
+ dns_name_format(dlvname, namebuf, sizeof(namebuf));
+ validator_log(val, ISC_LOG_DEBUG(3), "looking for DLV %s",
+ namebuf);
result = view_find(val, dlvname, dns_rdatatype_dlv);
if (result == ISC_R_SUCCESS) {
if (val->frdataset.trust < dns_trust_secure)
return (DNS_R_NOVALIDSIG);
val->havedlvsep = ISC_TRUE;
+ dns_rdataset_clone(&val->frdataset, &val->dlv);
return (ISC_R_SUCCESS);
}
if (result == ISC_R_NOTFOUND) {
- result = create_fetch(val, dlvname, dns_rdatatype_dlv,
- dlv_fetched2, "finddlvsep");
- if (result != ISC_R_SUCCESS)
- return (result);
- return (DNS_R_WAIT);
+ result = create_fetch(val, dlvname, dns_rdatatype_dlv,
+ dlvfetched, "finddlvsep");
+ if (result != ISC_R_SUCCESS)
+ return (result);
+ return (DNS_R_WAIT);
}
if (result != DNS_R_NXRRSET &&
result != DNS_R_NXDOMAIN &&
result != DNS_R_NCACHENXRRSET &&
- result != DNS_R_NCACHENXDOMAIN)
+ result != DNS_R_NCACHENXDOMAIN)
return (result);
/*
* Strip first labels from both dlvsep and dlvname.
*/
labels = dns_name_countlabels(dlvsep);
+ if (labels == 0)
+ break;
dns_name_getlabelsequence(dlvsep, 1, labels - 1, dlvsep);
labels = dns_name_countlabels(dlvname);
dns_name_getlabelsequence(dlvname, 1, labels - 1, dlvname);
@@ -2330,73 +2231,76 @@ finddlvsep(dns_validator_t *val, isc_boolean_t resume) {
return (ISC_R_NOTFOUND);
}
+/*
+ * proveunsecure walks down from the SEP looking for a break in the
+ * chain of trust. That occurs when we can prove the DS record does
+ * not exist at a delegation point or the DS exists at a delegation
+ * but we don't support the algorithm/digest.
+ */
static isc_result_t
proveunsecure(dns_validator_t *val, isc_boolean_t resume) {
isc_result_t result;
- isc_result_t tresult;
- dns_fixedname_t secroot;
+ dns_fixedname_t fixedsecroot;
+ dns_name_t *secroot;
dns_name_t *tname;
+ char namebuf[DNS_NAME_FORMATSIZE];
- dns_fixedname_init(&secroot);
- result = dns_keytable_finddeepestmatch(val->keytable,
- val->event->name,
- dns_fixedname_name(&secroot));
- /*
- * If the name is not under a security root, it must be insecure.
- */
- if (val->view->dlv != NULL && !DLVSEPTRIED(val) &&
- !dns_name_issubdomain(val->event->name, val->view->dlv)) {
- tresult = finddlvsep(val, ISC_FALSE);
- if (tresult != ISC_R_NOTFOUND && tresult != ISC_R_SUCCESS) {
- validator_log(val, ISC_LOG_DEBUG(3),
- "finddlvsep returned: %s",
- dns_result_totext(tresult));
- return (tresult);
- }
- }
+ dns_fixedname_init(&fixedsecroot);
+ secroot = dns_fixedname_name(&fixedsecroot);
+ if (val->havedlvsep)
+ dns_name_copy(dns_fixedname_name(&val->dlvsep), secroot, NULL);
+ else {
+ result = dns_keytable_finddeepestmatch(val->keytable,
+ val->event->name,
+ secroot);
- if (result == ISC_R_NOTFOUND) {
- if (!val->havedlvsep) {
+ if (result == ISC_R_NOTFOUND) {
validator_log(val, ISC_LOG_DEBUG(3),
- "not beneath secure root / DLV");
+ "not beneath secure root");
if (val->mustbesecure) {
validator_log(val, ISC_LOG_WARNING,
"must be secure failure");
result = DNS_R_MUSTBESECURE;
goto out;
}
- val->event->rdataset->trust = dns_trust_answer;
- return (ISC_R_SUCCESS);
- }
- dns_name_copy(dns_fixedname_name(&val->dlvsep),
- dns_fixedname_name(&secroot), NULL);
- } else if (result != ISC_R_SUCCESS)
- return (result);
- else if (val->havedlvsep &&
- dns_name_issubdomain(dns_fixedname_name(&val->dlvsep),
- dns_fixedname_name(&secroot))) {
- dns_name_copy(dns_fixedname_name(&val->dlvsep),
- dns_fixedname_name(&secroot), NULL);
+ if (val->view->dlv == NULL || DLVTRIED(val)) {
+ markanswer(val);
+ return (ISC_R_SUCCESS);
+ }
+ return (startfinddlvsep(val, dns_rootname));
+ } else if (result != ISC_R_SUCCESS)
+ return (result);
}
if (!resume) {
- val->labels =
- dns_name_countlabels(dns_fixedname_name(&secroot)) + 1;
+ /*
+ * We are looking for breaks below the SEP so add a label.
+ */
+ val->labels = dns_name_countlabels(secroot) + 1;
} else {
validator_log(val, ISC_LOG_DEBUG(3), "resuming proveunsecure");
if (val->frdataset.trust >= dns_trust_secure &&
- !check_ds_algorithm(val, dns_fixedname_name(&val->fname),
- &val->frdataset)) {
+ !check_ds(val, dns_fixedname_name(&val->fname),
+ &val->frdataset)) {
+ dns_name_format(dns_fixedname_name(&val->fname),
+ namebuf, sizeof(namebuf));
if (val->mustbesecure) {
validator_log(val, ISC_LOG_WARNING,
- "must be secure failure");
+ "must be secure failure at '%s'",
+ namebuf);
result = DNS_R_MUSTBESECURE;
goto out;
}
validator_log(val, ISC_LOG_DEBUG(3),
- "no supported algorithm (ds)");
- val->event->rdataset->trust = dns_trust_answer;
- result = ISC_R_SUCCESS;
+ "no supported algorithm/digest (%s/DS)",
+ namebuf);
+ if (val->view->dlv == NULL || DLVTRIED(val)) {
+ markanswer(val);
+ result = ISC_R_SUCCESS;
+ goto out;
+ }
+ result = startfinddlvsep(val,
+ dns_fixedname_name(&val->fname));
goto out;
}
val->labels++;
@@ -2406,7 +2310,6 @@ proveunsecure(dns_validator_t *val, isc_boolean_t resume) {
val->labels <= dns_name_countlabels(val->event->name);
val->labels++)
{
- char namebuf[DNS_NAME_FORMATSIZE];
dns_fixedname_init(&val->fname);
tname = dns_fixedname_name(&val->fname);
@@ -2425,7 +2328,7 @@ proveunsecure(dns_validator_t *val, isc_boolean_t resume) {
if (result == DNS_R_NXRRSET || result == DNS_R_NCACHENXRRSET) {
/*
* There is no DS. If this is a delegation,
- * we're done.
+ * we maybe done.
*/
if (val->frdataset.trust < dns_trust_secure) {
/*
@@ -2443,8 +2346,11 @@ proveunsecure(dns_validator_t *val, isc_boolean_t resume) {
"must be secure failure");
return (DNS_R_MUSTBESECURE);
}
- val->event->rdataset->trust = dns_trust_answer;
- return (ISC_R_SUCCESS);
+ if (val->view->dlv == NULL || DLVTRIED(val)) {
+ markanswer(val);
+ return (ISC_R_SUCCESS);
+ }
+ return (startfinddlvsep(val, tname));
}
continue;
} else if (result == ISC_R_SUCCESS) {
@@ -2453,10 +2359,10 @@ proveunsecure(dns_validator_t *val, isc_boolean_t resume) {
* continue.
*/
if (val->frdataset.trust >= dns_trust_secure) {
- if (!check_ds_algorithm(val, tname,
- &val->frdataset)) {
+ if (!check_ds(val, tname, &val->frdataset)) {
validator_log(val, ISC_LOG_DEBUG(3),
- "no supported algorithm (ds)");
+ "no supported algorithm/"
+ "digest (%s/DS)", namebuf);
if (val->mustbesecure) {
validator_log(val,
ISC_LOG_WARNING,
@@ -2464,9 +2370,13 @@ proveunsecure(dns_validator_t *val, isc_boolean_t resume) {
result = DNS_R_MUSTBESECURE;
goto out;
}
- val->event->rdataset->trust =
- dns_trust_answer;
- result = ISC_R_SUCCESS;
+ if (val->view->dlv == NULL ||
+ DLVTRIED(val)) {
+ markanswer(val);
+ result = ISC_R_SUCCESS;
+ goto out;
+ }
+ result = startfinddlvsep(val, tname);
goto out;
}
continue;
@@ -2531,6 +2441,23 @@ proveunsecure(dns_validator_t *val, isc_boolean_t resume) {
return (result);
}
+static isc_result_t
+dlv_validator_start(dns_validator_t *val) {
+ isc_event_t *event;
+
+ validator_log(val, ISC_LOG_DEBUG(3), "dlv_validator_start");
+
+ /*
+ * Reset state and try again.
+ */
+ val->attributes &= VALATTR_DLVTRIED;
+ val->options &= ~DNS_VALIDATOR_DLV;
+
+ event = (isc_event_t *)val->event;
+ isc_task_send(val->task, &event);
+ return (DNS_R_WAIT);
+}
+
static void
validator_start(isc_task_t *task, isc_event_t *event) {
dns_validator_t *val;
@@ -2547,11 +2474,18 @@ validator_start(isc_task_t *task, isc_event_t *event) {
if (val->event == NULL)
return;
- validator_log(val, ISC_LOG_DEBUG(3), "starting");
+ if (DLVTRIED(val))
+ validator_log(val, ISC_LOG_DEBUG(3), "restarting using DLV");
+ else
+ validator_log(val, ISC_LOG_DEBUG(3), "starting");
LOCK(&val->lock);
- if (val->event->rdataset != NULL && val->event->sigrdataset != NULL) {
+ if ((val->options & DNS_VALIDATOR_DLV) != 0) {
+ validator_log(val, ISC_LOG_DEBUG(3), "looking for DLV");
+ result = startfinddlvsep(val, dns_rootname);
+ } else if (val->event->rdataset != NULL &&
+ val->event->sigrdataset != NULL) {
isc_result_t saved_result;
/*
@@ -2635,7 +2569,6 @@ dns_validator_create(dns_view_t *view, dns_name_t *name, dns_rdatatype_t type,
REQUIRE(type != 0);
REQUIRE(rdataset != NULL ||
(rdataset == NULL && sigrdataset == NULL && message != NULL));
- REQUIRE(options == 0);
REQUIRE(validatorp != NULL && *validatorp == NULL);
tclone = NULL;
@@ -2685,12 +2618,13 @@ dns_validator_create(dns_view_t *view, dns_name_t *name, dns_rdatatype_t type,
val->currentset = NULL;
val->keyset = NULL;
val->dsset = NULL;
- val->dlv = NULL;
+ dns_rdataset_init(&val->dlv);
val->soaset = NULL;
val->nsecset = NULL;
val->soaname = NULL;
val->seensig = ISC_FALSE;
val->havedlvsep = ISC_FALSE;
+ val->depth = 0;
val->mustbesecure = dns_resolver_getmustbesecure(view->resolver, name);
dns_rdataset_init(&val->frdataset);
dns_rdataset_init(&val->fsigrdataset);
@@ -2749,6 +2683,12 @@ destroy(dns_validator_t *val) {
dns_keytable_detach(&val->keytable);
if (val->subvalidator != NULL)
dns_validator_destroy(&val->subvalidator);
+ if (val->havedlvsep)
+ dns_rdataset_disassociate(&val->dlv);
+ if (dns_rdataset_isassociated(&val->frdataset))
+ dns_rdataset_disassociate(&val->frdataset);
+ if (dns_rdataset_isassociated(&val->fsigrdataset))
+ dns_rdataset_disassociate(&val->fsigrdataset);
mctx = val->view->mctx;
if (val->siginfo != NULL)
isc_mem_put(mctx, val->siginfo, sizeof(*val->siginfo));
@@ -2787,9 +2727,14 @@ validator_logv(dns_validator_t *val, isc_logcategory_t *category,
isc_logmodule_t *module, int level, const char *fmt, va_list ap)
{
char msgbuf[2048];
+ static const char spaces[] = " *";
+ int depth = val->depth * 2;
vsnprintf(msgbuf, sizeof(msgbuf), fmt, ap);
+ if ((unsigned int) depth >= sizeof spaces)
+ depth = sizeof spaces - 1;
+
if (val->event != NULL && val->event->name != NULL) {
char namebuf[DNS_NAME_FORMATSIZE];
char typebuf[DNS_RDATATYPE_FORMATSIZE];
@@ -2798,11 +2743,12 @@ validator_logv(dns_validator_t *val, isc_logcategory_t *category,
dns_rdatatype_format(val->event->type, typebuf,
sizeof(typebuf));
isc_log_write(dns_lctx, category, module, level,
- "validating %s %s: %s", namebuf, typebuf,
- msgbuf);
+ "%.*svalidating @%p: %s %s: %s", depth, spaces,
+ val, namebuf, typebuf, msgbuf);
} else {
isc_log_write(dns_lctx, category, module, level,
- "validator @%p: %s", val, msgbuf);
+ "%.*svalidator @%p: %s", depth, spaces,
+ val, msgbuf);
}
}
diff --git a/contrib/bind9/lib/dns/xfrin.c b/contrib/bind9/lib/dns/xfrin.c
index aa4d054..8a824a73 100644
--- a/contrib/bind9/lib/dns/xfrin.c
+++ b/contrib/bind9/lib/dns/xfrin.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 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.
*/
-/* $Id: xfrin.c,v 1.124.2.4.2.9 2004/10/13 22:28:42 marka Exp $ */
+/* $Id: xfrin.c,v 1.124.2.4.2.12 2005/11/03 23:08:41 marka Exp $ */
#include <config.h>
@@ -232,7 +232,7 @@ xfrin_log1(int level, dns_name_t *zonename, dns_rdataclass_t rdclass,
ISC_FORMAT_PRINTF(5, 6);
static void
-xfrin_log(dns_xfrin_ctx_t *xfr, unsigned int level, const char *fmt, ...)
+xfrin_log(dns_xfrin_ctx_t *xfr, int level, const char *fmt, ...)
ISC_FORMAT_PRINTF(3, 4);
/**************************************************************************/
@@ -581,7 +581,7 @@ dns_xfrin_create2(dns_zone_t *zone, dns_rdatatype_t xfrtype,
isc_task_t *task, dns_xfrindone_t done, dns_xfrin_ctx_t **xfrp)
{
dns_name_t *zonename = dns_zone_getorigin(zone);
- dns_xfrin_ctx_t *xfr;
+ dns_xfrin_ctx_t *xfr = NULL;
isc_result_t result;
dns_db_t *db = NULL;
@@ -1391,7 +1391,7 @@ xfrin_log1(int level, dns_name_t *zonename, dns_rdataclass_t rdclass,
*/
static void
-xfrin_log(dns_xfrin_ctx_t *xfr, unsigned int level, const char *fmt, ...)
+xfrin_log(dns_xfrin_ctx_t *xfr, int level, const char *fmt, ...)
{
va_list ap;
diff --git a/contrib/bind9/lib/dns/zone.c b/contrib/bind9/lib/dns/zone.c
index 29f99cb..a993877 100644
--- a/contrib/bind9/lib/dns/zone.c
+++ b/contrib/bind9/lib/dns/zone.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: zone.c,v 1.333.2.23.2.55 2005/02/03 23:50:45 marka Exp $ */
+/* $Id: zone.c,v 1.333.2.23.2.59 2005/07/29 00:38:33 marka Exp $ */
#include <config.h>
@@ -167,6 +167,7 @@ struct dns_zone {
isc_sockaddr_t *masters;
dns_name_t **masterkeynames;
+ isc_boolean_t *mastersok;
unsigned int masterscnt;
unsigned int curmaster;
isc_sockaddr_t masteraddr;
@@ -536,6 +537,7 @@ dns_zone_create(dns_zone_t **zonep, isc_mem_t *mctx) {
zone->minretry = DNS_ZONE_MINRETRY;
zone->masters = NULL;
zone->masterkeynames = NULL;
+ zone->mastersok = NULL;
zone->masterscnt = 0;
zone->curmaster = 0;
zone->notify = NULL;
@@ -590,7 +592,8 @@ dns_zone_create(dns_zone_t **zonep, isc_mem_t *mctx) {
free_mutex:
DESTROYLOCK(&zone->lock);
- return (ISC_R_NOMEMORY);
+ isc_mem_putanddetach(&zone->mctx, zone, sizeof(*zone));
+ return (result);
}
/*
@@ -1250,6 +1253,7 @@ zone_postload(dns_zone_t *zone, dns_db_t *db, isc_time_t loadtime,
isc_uint32_t serial, refresh, retry, expire, minimum;
isc_time_t now;
isc_boolean_t needdump = ISC_FALSE;
+ isc_boolean_t hasinclude = DNS_ZONE_FLAG(zone, DNS_ZONEFLG_HASINCLUDE);
TIME_NOW(&now);
@@ -1355,10 +1359,32 @@ zone_postload(dns_zone_t *zone, dns_db_t *db, isc_time_t loadtime,
if (result != ISC_R_SUCCESS)
goto cleanup;
if (zone->db != NULL) {
- if (!isc_serial_ge(serial, zone->serial)) {
+ /*
+ * This is checked in zone_replacedb() for slave zones
+ * as they don't reload from disk.
+ */
+ if (DNS_ZONE_OPTION(zone, DNS_ZONEOPT_IXFRFROMDIFFS) &&
+ !isc_serial_gt(serial, zone->serial)) {
+ isc_uint32_t serialmin, serialmax;
+
+ INSIST(zone->type == dns_zone_master);
+
+ serialmin = (zone->serial + 1) & 0xffffffffU;
+ serialmax = (zone->serial + 0x7fffffffU) &
+ 0xffffffffU;
+ dns_zone_log(zone, ISC_LOG_ERROR,
+ "ixfr-from-differences: "
+ "new serial (%u) out of range "
+ "[%u - %u]", serial, serialmin,
+ serialmax);
+ result = DNS_R_BADZONE;
+ goto cleanup;
+ } else if (!isc_serial_ge(serial, zone->serial))
dns_zone_log(zone, ISC_LOG_ERROR,
"zone serial has gone backwards");
- }
+ else if (serial == zone->serial && !hasinclude)
+ dns_zone_log(zone, ISC_LOG_ERROR,
+ "zone serial unchanged");
}
zone->serial = serial;
zone->refresh = RANGE(refresh,
@@ -1943,6 +1969,7 @@ dns_zone_setmasterswithkeys(dns_zone_t *zone, isc_sockaddr_t *masters,
isc_sockaddr_t *new;
isc_result_t result = ISC_R_SUCCESS;
dns_name_t **newname;
+ isc_boolean_t *newok;
unsigned int i;
REQUIRE(DNS_ZONE_VALID(zone));
@@ -1972,10 +1999,15 @@ dns_zone_setmasterswithkeys(dns_zone_t *zone, isc_sockaddr_t *masters,
zone->masterscnt * sizeof(dns_name_t *));
zone->masterkeynames = NULL;
}
+ if (zone->mastersok != NULL) {
+ isc_mem_put(zone->mctx, zone->mastersok,
+ zone->masterscnt * sizeof(isc_boolean_t));
+ zone->mastersok = NULL;
+ }
zone->masterscnt = 0;
/*
- * If count == 0, don't allocate any space for masters or keynames
- * so internally, those pointers are NULL if count == 0
+ * If count == 0, don't allocate any space for masters, mastersok or
+ * keynames so internally, those pointers are NULL if count == 0
*/
if (count == 0)
goto unlock;
@@ -1983,27 +2015,35 @@ dns_zone_setmasterswithkeys(dns_zone_t *zone, isc_sockaddr_t *masters,
/*
* masters must countain count elements!
*/
- new = isc_mem_get(zone->mctx,
- count * sizeof(isc_sockaddr_t));
+ new = isc_mem_get(zone->mctx, count * sizeof(*new));
if (new == NULL) {
result = ISC_R_NOMEMORY;
goto unlock;
}
memcpy(new, masters, count * sizeof(*new));
- zone->masters = new;
- zone->masterscnt = count;
- DNS_ZONE_CLRFLAG(zone, DNS_ZONEFLG_NOMASTERS);
+
+ /*
+ * Similarly for mastersok.
+ */
+ newok = isc_mem_get(zone->mctx, count * sizeof(*newok));
+ if (newok == NULL) {
+ result = ISC_R_NOMEMORY;
+ isc_mem_put(zone->mctx, new, count * sizeof(*new));
+ goto unlock;
+ };
+ for (i = 0; i < count; i++)
+ newok[i] = ISC_FALSE;
/*
* if keynames is non-NULL, it must contain count elements!
*/
+ newname = NULL;
if (keynames != NULL) {
- newname = isc_mem_get(zone->mctx,
- count * sizeof(dns_name_t *));
+ newname = isc_mem_get(zone->mctx, count * sizeof(*newname));
if (newname == NULL) {
result = ISC_R_NOMEMORY;
- isc_mem_put(zone->mctx, zone->masters,
- count * sizeof(*new));
+ isc_mem_put(zone->mctx, new, count * sizeof(*new));
+ isc_mem_put(zone->mctx, newok, count * sizeof(*newok));
goto unlock;
}
for (i = 0; i < count; i++)
@@ -2024,16 +2064,27 @@ dns_zone_setmasterswithkeys(dns_zone_t *zone, isc_sockaddr_t *masters,
dns_name_free(
newname[i],
zone->mctx);
- isc_mem_put(zone->mctx, zone->masters,
+ isc_mem_put(zone->mctx, new,
count * sizeof(*new));
+ isc_mem_put(zone->mctx, newok,
+ count * sizeof(*newok));
isc_mem_put(zone->mctx, newname,
count * sizeof(*newname));
goto unlock;
}
}
}
- zone->masterkeynames = newname;
}
+
+ /*
+ * Everything is ok so attach to the zone.
+ */
+ zone->masters = new;
+ zone->mastersok = newok;
+ zone->masterkeynames = newname;
+ zone->masterscnt = count;
+ DNS_ZONE_CLRFLAG(zone, DNS_ZONEFLG_NOMASTERS);
+
unlock:
UNLOCK_ZONE(zone);
return (result);
@@ -2222,6 +2273,7 @@ void
dns_zone_refresh(dns_zone_t *zone) {
isc_interval_t i;
isc_uint32_t oldflags;
+ unsigned int j;
REQUIRE(DNS_ZONE_VALID(zone));
@@ -2266,6 +2318,8 @@ dns_zone_refresh(dns_zone_t *zone) {
zone->retry = ISC_MIN(zone->retry * 2, 6 * 3600);
zone->curmaster = 0;
+ for (j = 0; j < zone->masterscnt; j++)
+ zone->mastersok[j] = ISC_FALSE;
/* initiate soa query */
queue_soa_query(zone);
unlock:
@@ -3186,6 +3240,7 @@ stub_callback(isc_task_t *task, isc_event_t *event) {
isc_time_t now;
isc_boolean_t exiting = ISC_FALSE;
isc_interval_t i;
+ unsigned int j;
stub = revent->ev_arg;
INSIST(DNS_STUB_VALID(stub));
@@ -3360,13 +3415,37 @@ stub_callback(isc_task_t *task, isc_event_t *event) {
isc_event_free(&event);
LOCK_ZONE(zone);
dns_request_destroy(&zone->request);
- zone->curmaster++;
+ /*
+ * Skip to next failed / untried master.
+ */
+ do {
+ zone->curmaster++;
+ } while (zone->curmaster < zone->masterscnt &&
+ zone->mastersok[zone->curmaster]);
DNS_ZONE_CLRFLAG(zone, DNS_ZONEFLG_NOEDNS);
if (exiting || zone->curmaster >= zone->masterscnt) {
+ isc_boolean_t done = ISC_TRUE;
if (!exiting &&
DNS_ZONE_OPTION(zone, DNS_ZONEOPT_USEALTXFRSRC) &&
!DNS_ZONE_FLAG(zone, DNS_ZONEFLG_USEALTXFRSRC)) {
+ /*
+ * Did we get a good answer from all the masters?
+ */
+ for (j = 0; j < zone->masterscnt; j++)
+ if (zone->mastersok[j] == ISC_FALSE) {
+ done = ISC_FALSE;
+ break;
+ }
+ } else
+ done = ISC_TRUE;
+ if (!done) {
zone->curmaster = 0;
+ /*
+ * Find the next failed master.
+ */
+ while (zone->curmaster < zone->masterscnt &&
+ zone->mastersok[zone->curmaster])
+ zone->curmaster++;
DNS_ZONE_SETFLAG(zone, DNS_ZONEFLG_USEALTXFRSRC);
} else {
DNS_ZONE_CLRFLAG(zone, DNS_ZONEFLG_REFRESH);
@@ -3420,6 +3499,7 @@ refresh_callback(isc_task_t *task, isc_event_t *event) {
dns_rdata_soa_t soa;
isc_result_t result;
isc_uint32_t serial;
+ unsigned int j;
zone = revent->ev_arg;
INSIST(DNS_ZONE_VALID(zone));
@@ -3668,6 +3748,7 @@ refresh_callback(isc_task_t *task, isc_event_t *event) {
}
DNS_ZONE_JITTER_ADD(&now, zone->refresh, &zone->refreshtime);
DNS_ZONE_TIME_ADD(&now, zone->expire, &zone->expiretime);
+ zone->mastersok[zone->curmaster] = ISC_TRUE;
goto next_master;
} else {
if (!DNS_ZONE_OPTION(zone, DNS_ZONEOPT_MULTIMASTER))
@@ -3676,6 +3757,7 @@ refresh_callback(isc_task_t *task, isc_event_t *event) {
soa.serial, master, zone->serial);
else
zone_debuglog(zone, me, 1, "ahead");
+ zone->mastersok[zone->curmaster] = ISC_TRUE;
goto next_master;
}
if (msg != NULL)
@@ -3688,13 +3770,37 @@ refresh_callback(isc_task_t *task, isc_event_t *event) {
isc_event_free(&event);
LOCK_ZONE(zone);
dns_request_destroy(&zone->request);
- zone->curmaster++;
+ /*
+ * Skip to next failed / untried master.
+ */
+ do {
+ zone->curmaster++;
+ } while (zone->curmaster < zone->masterscnt &&
+ zone->mastersok[zone->curmaster]);
DNS_ZONE_CLRFLAG(zone, DNS_ZONEFLG_NOEDNS);
if (zone->curmaster >= zone->masterscnt) {
+ isc_boolean_t done = ISC_TRUE;
if (DNS_ZONE_OPTION(zone, DNS_ZONEOPT_USEALTXFRSRC) &&
!DNS_ZONE_FLAG(zone, DNS_ZONEFLG_USEALTXFRSRC)) {
+ /*
+ * Did we get a good answer from all the masters?
+ */
+ for (j = 0; j < zone->masterscnt; j++)
+ if (zone->mastersok[j] == ISC_FALSE) {
+ done = ISC_FALSE;
+ break;
+ }
+ } else
+ done = ISC_TRUE;
+ if (!done) {
DNS_ZONE_SETFLAG(zone, DNS_ZONEFLG_USEALTXFRSRC);
zone->curmaster = 0;
+ /*
+ * Find the next failed master.
+ */
+ while (zone->curmaster < zone->masterscnt &&
+ zone->mastersok[zone->curmaster])
+ zone->curmaster++;
goto requeue;
}
DNS_ZONE_CLRFLAG(zone, DNS_ZONEFLG_REFRESH);
@@ -4023,7 +4129,13 @@ soa_query(isc_task_t *task, isc_event_t *event) {
skip_master:
if (key != NULL)
dns_tsigkey_detach(&key);
- zone->curmaster++;
+ /*
+ * Skip to next failed / untried master.
+ */
+ do {
+ zone->curmaster++;
+ } while (zone->curmaster < zone->masterscnt &&
+ zone->mastersok[zone->curmaster]);
if (zone->curmaster < zone->masterscnt)
goto again;
zone->curmaster = 0;
@@ -5275,40 +5387,58 @@ zone_replacedb(dns_zone_t *zone, dns_db_t *db, isc_boolean_t dump) {
* is enabled in the configuration.
*/
if (zone->db != NULL && zone->journal != NULL &&
- DNS_ZONE_OPTION(zone, DNS_ZONEOPT_IXFRFROMDIFFS)) {
- isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
- DNS_LOGMODULE_ZONE, ISC_LOG_DEBUG(3),
- "generating diffs");
- result = dns_db_diff(zone->mctx, db, ver,
- zone->db, NULL /* XXX */,
+ DNS_ZONE_OPTION(zone, DNS_ZONEOPT_IXFRFROMDIFFS) &&
+ !DNS_ZONE_FLAG(zone, DNS_ZONEFLG_FORCEXFER)) {
+ isc_uint32_t serial;
+
+ dns_zone_log(zone, ISC_LOG_DEBUG(3), "generating diffs");
+
+ result = dns_db_getsoaserial(db, ver, &serial);
+ if (result != ISC_R_SUCCESS) {
+ dns_zone_log(zone, ISC_LOG_ERROR,
+ "ixfr-from-differences: unable to get "
+ "new serial");
+ goto fail;
+ }
+
+ /*
+ * This is checked in zone_postload() for master zones.
+ */
+ if (zone->type == dns_zone_slave &&
+ !isc_serial_gt(serial, zone->serial)) {
+ isc_uint32_t serialmin, serialmax;
+ serialmin = (zone->serial + 1) & 0xffffffffU;
+ serialmax = (zone->serial + 0x7fffffffU) & 0xffffffffU;
+ dns_zone_log(zone, ISC_LOG_ERROR,
+ "ixfr-from-differences: failed: "
+ "new serial (%u) out of range [%u - %u]",
+ serial, serialmin, serialmax);
+ result = ISC_R_RANGE;
+ goto fail;
+ }
+
+ result = dns_db_diff(zone->mctx, db, ver, zone->db, NULL,
zone->journal);
if (result != ISC_R_SUCCESS)
goto fail;
if (dump)
zone_needdump(zone, DNS_DUMP_DELAY);
else if (zone->journalsize != -1) {
- isc_uint32_t serial;
-
- result = dns_db_getsoaserial(db, ver, &serial);
- if (result == ISC_R_SUCCESS) {
- result = dns_journal_compact(zone->mctx,
- zone->journal,
- serial,
- zone->journalsize);
- switch (result) {
- case ISC_R_SUCCESS:
- case ISC_R_NOSPACE:
- case ISC_R_NOTFOUND:
- dns_zone_log(zone, ISC_LOG_DEBUG(3),
- "dns_journal_compact: %s",
- dns_result_totext(result));
- break;
- default:
- dns_zone_log(zone, ISC_LOG_ERROR,
+ result = dns_journal_compact(zone->mctx, zone->journal,
+ serial, zone->journalsize);
+ switch (result) {
+ case ISC_R_SUCCESS:
+ case ISC_R_NOSPACE:
+ case ISC_R_NOTFOUND:
+ dns_zone_log(zone, ISC_LOG_DEBUG(3),
+ "dns_journal_compact: %s",
+ dns_result_totext(result));
+ break;
+ default:
+ dns_zone_log(zone, ISC_LOG_ERROR,
"dns_journal_compact failed: %s",
- dns_result_totext(result));
- break;
- }
+ dns_result_totext(result));
+ break;
}
}
} else {
@@ -5503,7 +5633,14 @@ zone_xfrdone(dns_zone_t *zone, isc_result_t result) {
default:
next_master:
- zone->curmaster++;
+ /*
+ * Skip to next failed / untried master.
+ */
+ do {
+ zone->curmaster++;
+ } while (zone->curmaster < zone->masterscnt &&
+ zone->mastersok[zone->curmaster]);
+ /* FALLTHROUGH */
same_master:
if (zone->curmaster >= zone->masterscnt) {
zone->curmaster = 0;
@@ -5511,6 +5648,9 @@ zone_xfrdone(dns_zone_t *zone, isc_result_t result) {
!DNS_ZONE_FLAG(zone, DNS_ZONEFLG_USEALTXFRSRC)) {
DNS_ZONE_SETFLAG(zone, DNS_ZONEFLG_REFRESH);
DNS_ZONE_SETFLAG(zone, DNS_ZONEFLG_USEALTXFRSRC);
+ while (zone->curmaster < zone->masterscnt &&
+ zone->mastersok[zone->curmaster])
+ zone->curmaster++;
again = ISC_TRUE;
} else
DNS_ZONE_CLRFLAG(zone, DNS_ZONEFLG_USEALTXFRSRC);
@@ -5697,7 +5837,11 @@ got_transfer_quota(isc_task_t *task, isc_event_t *event) {
"requesting AXFR of "
"initial version from %s", mastertext);
xfrtype = dns_rdatatype_axfr;
- } else if (dns_zone_isforced(zone)) {
+ } else if (DNS_ZONE_OPTION(zone, DNS_ZONEOPT_IXFRFROMDIFFS)) {
+ dns_zone_log(zone, ISC_LOG_DEBUG(1), "ixfr-from-differences "
+ "set, requesting AXFR from %s", mastertext);
+ xfrtype = dns_rdatatype_axfr;
+ } else if (DNS_ZONE_FLAG(zone, DNS_ZONEFLG_FORCEXFER)) {
dns_zone_log(zone, ISC_LOG_DEBUG(1),
"forced reload, requesting AXFR of "
"initial version from %s", mastertext);
@@ -6663,6 +6807,9 @@ void
dns_zone_forcereload(dns_zone_t *zone) {
REQUIRE(DNS_ZONE_VALID(zone));
+ if (zone->type == dns_zone_master)
+ return;
+
LOCK_ZONE(zone);
DNS_ZONE_SETFLAG(zone, DNS_ZONEFLG_FORCEXFER);
UNLOCK_ZONE(zone);
diff --git a/contrib/bind9/lib/isc/api b/contrib/bind9/lib/isc/api
index 63704dd..ddeff33 100644
--- a/contrib/bind9/lib/isc/api
+++ b/contrib/bind9/lib/isc/api
@@ -1,3 +1,3 @@
-LIBINTERFACE = 10
-LIBREVISION = 5
-LIBAGE = 1
+LIBINTERFACE = 11
+LIBREVISION = 1
+LIBAGE = 0
diff --git a/contrib/bind9/lib/isc/include/isc/Makefile.in b/contrib/bind9/lib/isc/include/isc/Makefile.in
index 10cad7e..f484c0b 100644
--- a/contrib/bind9/lib/isc/include/isc/Makefile.in
+++ b/contrib/bind9/lib/isc/include/isc/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
# Copyright (C) 1998-2001, 2003 Internet Software Consortium.
#
# Permission to use, copy, modify, and distribute this software for any
@@ -13,7 +13,7 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
-# $Id: Makefile.in,v 1.50.12.4 2004/03/06 08:14:38 marka Exp $
+# $Id: Makefile.in,v 1.50.12.6 2005/03/22 02:32:07 marka Exp $
srcdir = @srcdir@
VPATH = @srcdir@
@@ -28,8 +28,8 @@ top_srcdir = @top_srcdir@
#
HEADERS = app.h assertions.h base64.h bitstring.h boolean.h buffer.h \
bufferlist.h commandline.h entropy.h error.h event.h \
- eventclass.h \
- file.h formatcheck.h fsaccess.h heap.h hex.h hmacmd5.h \
+ eventclass.h file.h formatcheck.h fsaccess.h \
+ hash.h heap.h hex.h hmacmd5.h \
interfaceiter.h @ISC_IPV6_H@ lang.h lex.h \
lfsr.h lib.h list.h log.h magic.h md5.h mem.h msgcat.h msgs.h \
mutexblock.h netaddr.h ondestroy.h os.h parseint.h \
diff --git a/contrib/bind9/lib/isc/include/isc/netaddr.h b/contrib/bind9/lib/isc/include/isc/netaddr.h
index e209a9f..ad3328c 100644
--- a/contrib/bind9/lib/isc/include/isc/netaddr.h
+++ b/contrib/bind9/lib/isc/include/isc/netaddr.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1998-2002 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: netaddr.h,v 1.18.12.7 2004/03/08 09:04:52 marka Exp $ */
+/* $Id: netaddr.h,v 1.18.12.9 2005/07/29 00:13:10 marka Exp $ */
#ifndef ISC_NETADDR_H
#define ISC_NETADDR_H 1
@@ -81,7 +81,7 @@ isc_netaddr_format(const isc_netaddr_t *na, char *array, unsigned int size);
*/
#define ISC_NETADDR_FORMATSIZE \
- sizeof("xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:XXX.XXX.XXX.XXX")
+ sizeof("xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:XXX.XXX.XXX.XXX%SSSSSSSSSS")
/*
* Minimum size of array to pass to isc_netaddr_format().
*/
diff --git a/contrib/bind9/lib/isc/include/isc/print.h b/contrib/bind9/lib/isc/include/isc/print.h
index 19da6b0..1bf3704 100644
--- a/contrib/bind9/lib/isc/include/isc/print.h
+++ b/contrib/bind9/lib/isc/include/isc/print.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 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.
*/
-/* $Id: print.h,v 1.17.188.2 2004/03/06 08:14:46 marka Exp $ */
+/* $Id: print.h,v 1.17.188.4 2005/06/09 23:54:30 marka Exp $ */
#ifndef ISC_PRINT_H
#define ISC_PRINT_H 1
@@ -55,6 +55,10 @@
#include <stdarg.h>
#include <stddef.h>
#endif
+#ifdef ISC_PLATFORM_NEEDSPRINTF
+#include <stdio.h>
+#endif
+
ISC_LANG_BEGINDECLS
diff --git a/contrib/bind9/lib/isc/include/isc/quota.h b/contrib/bind9/lib/isc/include/isc/quota.h
index 8647876..4044118 100644
--- a/contrib/bind9/lib/isc/include/isc/quota.h
+++ b/contrib/bind9/lib/isc/include/isc/quota.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 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.
*/
-/* $Id: quota.h,v 1.8.12.3 2004/03/08 09:04:52 marka Exp $ */
+/* $Id: quota.h,v 1.8.12.6 2005/08/11 15:00:08 marka Exp $ */
#ifndef ISC_QUOTA_H
#define ISC_QUOTA_H 1
@@ -53,7 +53,7 @@ struct isc_quota {
/* Locked by lock. */
int max;
int used;
- isc_boolean_t soft;
+ int soft;
};
isc_result_t
@@ -73,11 +73,17 @@ isc_quota_destroy(isc_quota_t *quota);
*/
void
-isc_quota_soft(isc_quota_t *quota, isc_boolean_t soft);
+isc_quota_soft(isc_quota_t *quota, int soft);
/*
* Turn on/off soft quotas.
*/
+void
+isc_quota_max(isc_quota_t *quota, int max);
+/*
+ * Re-set a maximum quota.
+ */
+
isc_result_t
isc_quota_reserve(isc_quota_t *quota);
/*
diff --git a/contrib/bind9/lib/isc/include/isc/sockaddr.h b/contrib/bind9/lib/isc/include/isc/sockaddr.h
index ffe4105..1ffbca6 100644
--- a/contrib/bind9/lib/isc/include/isc/sockaddr.h
+++ b/contrib/bind9/lib/isc/include/isc/sockaddr.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 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.
*/
-/* $Id: sockaddr.h,v 1.35.12.6 2004/03/08 09:04:53 marka Exp $ */
+/* $Id: sockaddr.h,v 1.35.12.8 2005/07/29 00:13:10 marka Exp $ */
#ifndef ISC_SOCKADDR_H
#define ISC_SOCKADDR_H 1
@@ -192,7 +192,7 @@ isc_sockaddr_issitelocal(isc_sockaddr_t *sa);
*/
#define ISC_SOCKADDR_FORMATSIZE \
- sizeof("xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:XXX.XXX.XXX.XXX#YYYYY")
+ sizeof("xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:XXX.XXX.XXX.XXX#YYYYY%SSSSSSSSSS")
/*
* Minimum size of array to pass to isc_sockaddr_format().
*/
diff --git a/contrib/bind9/lib/isc/include/isc/timer.h b/contrib/bind9/lib/isc/include/isc/timer.h
index be32911..439c943 100644
--- a/contrib/bind9/lib/isc/include/isc/timer.h
+++ b/contrib/bind9/lib/isc/include/isc/timer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1998-2002 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: timer.h,v 1.28.12.4 2004/03/08 09:04:53 marka Exp $ */
+/* $Id: timer.h,v 1.28.12.6 2005/10/27 00:27:30 marka Exp $ */
#ifndef ISC_TIMER_H
#define ISC_TIMER_H 1
@@ -277,8 +277,15 @@ isc_timer_detach(isc_timer_t **timerp);
* timer event callbacks will run after the call.
*/
-isc_result_t
+isc_timertype_t
isc_timer_gettype(isc_timer_t *timer);
+/*%<
+ * Return the timer type.
+ *
+ * Requires:
+ *
+ *\li 'timer' to be a valid timer.
+ */
isc_result_t
isc_timermgr_create(isc_mem_t *mctx, isc_timermgr_t **managerp);
diff --git a/contrib/bind9/lib/isc/inet_pton.c b/contrib/bind9/lib/isc/inet_pton.c
index b253069..026fedf 100644
--- a/contrib/bind9/lib/isc/inet_pton.c
+++ b/contrib/bind9/lib/isc/inet_pton.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1996-2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -17,7 +17,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
static char rcsid[] =
- "$Id: inet_pton.c,v 1.10.2.4.2.1 2004/03/06 08:14:31 marka Exp $";
+ "$Id: inet_pton.c,v 1.10.2.4.2.3 2005/03/31 23:56:14 marka Exp $";
#endif /* LIBC_SCCS and not lint */
#include <config.h>
@@ -132,7 +132,7 @@ inet_pton6(const char *src, unsigned char *dst) {
xdigits_u[] = "0123456789ABCDEF";
unsigned char tmp[NS_IN6ADDRSZ], *tp, *endp, *colonp;
const char *xdigits, *curtok;
- int ch, saw_xdigit;
+ int ch, seen_xdigits;
unsigned int val;
memset((tp = tmp), '\0', NS_IN6ADDRSZ);
@@ -143,7 +143,7 @@ inet_pton6(const char *src, unsigned char *dst) {
if (*++src != ':')
return (0);
curtok = src;
- saw_xdigit = 0;
+ seen_xdigits = 0;
val = 0;
while ((ch = *src++) != '\0') {
const char *pch;
@@ -153,14 +153,13 @@ inet_pton6(const char *src, unsigned char *dst) {
if (pch != NULL) {
val <<= 4;
val |= (pch - xdigits);
- if (val > 0xffff)
+ if (++seen_xdigits > 4)
return (0);
- saw_xdigit = 1;
continue;
}
if (ch == ':') {
curtok = src;
- if (!saw_xdigit) {
+ if (!seen_xdigits) {
if (colonp)
return (0);
colonp = tp;
@@ -170,19 +169,19 @@ inet_pton6(const char *src, unsigned char *dst) {
return (0);
*tp++ = (unsigned char) (val >> 8) & 0xff;
*tp++ = (unsigned char) val & 0xff;
- saw_xdigit = 0;
+ seen_xdigits = 0;
val = 0;
continue;
}
if (ch == '.' && ((tp + NS_INADDRSZ) <= endp) &&
inet_pton4(curtok, tp) > 0) {
tp += NS_INADDRSZ;
- saw_xdigit = 0;
+ seen_xdigits = 0;
break; /* '\0' was seen by inet_pton4(). */
}
return (0);
}
- if (saw_xdigit) {
+ if (seen_xdigits) {
if (tp + NS_INT16SZ > endp)
return (0);
*tp++ = (unsigned char) (val >> 8) & 0xff;
diff --git a/contrib/bind9/lib/isc/lfsr.c b/contrib/bind9/lib/isc/lfsr.c
index e1de6aa..6d5b7ff 100644
--- a/contrib/bind9/lib/isc/lfsr.c
+++ b/contrib/bind9/lib/isc/lfsr.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2002 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,10 +15,11 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: lfsr.c,v 1.11.2.2.2.3 2004/03/08 09:04:49 marka Exp $ */
+/* $Id: lfsr.c,v 1.11.2.2.2.6 2005/10/14 01:38:50 marka Exp $ */
#include <config.h>
+#include <stddef.h>
#include <stdlib.h>
#include <isc/assertions.h>
@@ -55,9 +56,6 @@ isc_lfsr_init(isc_lfsr_t *lfsr, isc_uint32_t state, unsigned int bits,
static inline isc_uint32_t
lfsr_generate(isc_lfsr_t *lfsr)
{
- unsigned int highbit;
-
- highbit = 1 << (lfsr->bits - 1);
/*
* If the previous state is zero, we must fill it with something
diff --git a/contrib/bind9/lib/isc/mem.c b/contrib/bind9/lib/isc/mem.c
index 762aa17..f5069fb 100644
--- a/contrib/bind9/lib/isc/mem.c
+++ b/contrib/bind9/lib/isc/mem.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1997-2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: mem.c,v 1.98.2.7.2.5 2004/03/16 05:50:24 marka Exp $ */
+/* $Id: mem.c,v 1.98.2.7.2.7 2005/03/17 03:58:32 marka Exp $ */
#include <config.h>
@@ -717,6 +717,15 @@ isc_mem_createx(size_t init_max_size, size_t target_size,
if (ctx == NULL)
return (ISC_R_NOMEMORY);
+ if (isc_mutex_init(&ctx->lock) != ISC_R_SUCCESS) {
+ UNEXPECTED_ERROR(__FILE__, __LINE__,
+ "isc_mutex_init() %s",
+ isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
+ ISC_MSG_FAILED, "failed"));
+ (memfree)(arg, ctx);
+ return (ISC_R_UNEXPECTED);
+ }
+
if (init_max_size == 0U)
ctx->max_size = DEF_MAX_SIZE;
else
@@ -775,15 +784,6 @@ isc_mem_createx(size_t init_max_size, size_t target_size,
ctx->highest = NULL;
#endif /* ISC_MEM_USE_INTERNAL_MALLOC */
- if (isc_mutex_init(&ctx->lock) != ISC_R_SUCCESS) {
- UNEXPECTED_ERROR(__FILE__, __LINE__,
- "isc_mutex_init() %s",
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
- ISC_MSG_FAILED, "failed"));
- result = ISC_R_UNEXPECTED;
- goto error;
- }
-
#if ISC_MEM_TRACKLINES
if ((isc_mem_debugging & ISC_MEM_DEBUGRECORD) != 0) {
unsigned int i;
@@ -805,17 +805,18 @@ isc_mem_createx(size_t init_max_size, size_t target_size,
return (ISC_R_SUCCESS);
error:
- if (ctx) {
- if (ctx->stats)
+ if (ctx != NULL) {
+ if (ctx->stats != NULL)
(memfree)(arg, ctx->stats);
#if ISC_MEM_USE_INTERNAL_MALLOC
- if (ctx->freelists)
+ if (ctx->freelists != NULL)
(memfree)(arg, ctx->freelists);
#endif /* ISC_MEM_USE_INTERNAL_MALLOC */
#if ISC_MEM_TRACKLINES
- if (ctx->debuglist)
+ if (ctx->debuglist != NULL)
(ctx->memfree)(ctx->arg, ctx->debuglist);
#endif /* ISC_MEM_TRACKLINES */
+ DESTROYLOCK(&ctx->lock);
(memfree)(arg, ctx);
}
diff --git a/contrib/bind9/lib/isc/nls/msgcat.c b/contrib/bind9/lib/isc/nls/msgcat.c
index 484ab51..906e26e 100644
--- a/contrib/bind9/lib/isc/nls/msgcat.c
+++ b/contrib/bind9/lib/isc/nls/msgcat.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 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.
*/
-/* $Id: msgcat.c,v 1.10.12.4 2004/03/08 09:04:54 marka Exp $ */
+/* $Id: msgcat.c,v 1.10.12.6 2005/06/09 23:54:31 marka Exp $ */
/*
* Principal Author: Bob Halley
@@ -23,6 +23,7 @@
#include <config.h>
+#include <stddef.h>
#include <stdlib.h>
#include <isc/magic.h>
diff --git a/contrib/bind9/lib/isc/pthreads/mutex.c b/contrib/bind9/lib/isc/pthreads/mutex.c
index e29e92b..71db669 100644
--- a/contrib/bind9/lib/isc/pthreads/mutex.c
+++ b/contrib/bind9/lib/isc/pthreads/mutex.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 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.
*/
-/* $Id: mutex.c,v 1.6.26.3 2004/03/08 09:04:55 marka Exp $ */
+/* $Id: mutex.c,v 1.6.26.5 2005/03/17 03:58:32 marka Exp $ */
#include <config.h>
@@ -126,19 +126,6 @@ isc_mutex_lock_profile(isc_mutex_t *mp, const char *file, int line) {
isc_mutexlocker_t *locker = NULL;
int i;
- for (i = 0; i < ISC_MUTEX_MAX_LOCKERS; i++) {
- if (mp->stats->lockers[i].file == NULL) {
- locker = &mp->stats->lockers[i];
- locker->file = file;
- locker->line = line;
- break;
- } else if (mp->stats->lockers[i].file == file &&
- mp->stats->lockers[i].line == line) {
- locker = &mp->stats->lockers[i];
- break;
- }
- }
-
gettimeofday(&prelock_t, NULL);
if (pthread_mutex_lock(&mp->mutex) != 0)
@@ -152,6 +139,19 @@ isc_mutex_lock_profile(isc_mutex_t *mp, const char *file, int line) {
mp->stats->count++;
timevaladd(&mp->stats->wait_total, &postlock_t);
+ for (i = 0; i < ISC_MUTEX_MAX_LOCKERS; i++) {
+ if (mp->stats->lockers[i].file == NULL) {
+ locker = &mp->stats->lockers[i];
+ locker->file = file;
+ locker->line = line;
+ break;
+ } else if (mp->stats->lockers[i].file == file &&
+ mp->stats->lockers[i].line == line) {
+ locker = &mp->stats->lockers[i];
+ break;
+ }
+ }
+
if (locker != NULL) {
locker->count++;
timevaladd(&locker->wait_total, &postlock_t);
diff --git a/contrib/bind9/lib/isc/quota.c b/contrib/bind9/lib/isc/quota.c
index 012bfbb..273a1b2 100644
--- a/contrib/bind9/lib/isc/quota.c
+++ b/contrib/bind9/lib/isc/quota.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 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.
*/
-/* $Id: quota.c,v 1.11.12.3 2004/03/08 09:04:49 marka Exp $ */
+/* $Id: quota.c,v 1.11.12.5 2005/07/29 00:13:09 marka Exp $ */
#include <config.h>
@@ -28,38 +28,45 @@ isc_result_t
isc_quota_init(isc_quota_t *quota, int max) {
quota->max = max;
quota->used = 0;
- quota->soft = ISC_FALSE;
+ quota->soft = 0;
return (isc_mutex_init(&quota->lock));
}
void
isc_quota_destroy(isc_quota_t *quota) {
INSIST(quota->used == 0);
- quota->max = -1;
- quota->used = -1;
- quota->soft = ISC_FALSE;
+ quota->max = 0;
+ quota->used = 0;
+ quota->soft = 0;
DESTROYLOCK(&quota->lock);
}
void
-isc_quota_soft(isc_quota_t *quota, isc_boolean_t soft) {
+isc_quota_soft(isc_quota_t *quota, int soft) {
+ LOCK(&quota->lock);
quota->soft = soft;
+ UNLOCK(&quota->lock);
+}
+
+void
+isc_quota_max(isc_quota_t *quota, int max) {
+ LOCK(&quota->lock);
+ quota->max = max;
+ UNLOCK(&quota->lock);
}
isc_result_t
isc_quota_reserve(isc_quota_t *quota) {
isc_result_t result;
LOCK(&quota->lock);
- if (quota->used < quota->max) {
- quota->used++;
- result = ISC_R_SUCCESS;
- } else {
- if (quota->soft) {
- quota->used++;
+ if (quota->max == 0 || quota->used < quota->max) {
+ if (quota->soft == 0 || quota->used < quota->soft)
+ result = ISC_R_SUCCESS;
+ else
result = ISC_R_SOFTQUOTA;
- } else
- result = ISC_R_QUOTA;
- }
+ quota->used++;
+ } else
+ result = ISC_R_QUOTA;
UNLOCK(&quota->lock);
return (result);
}
diff --git a/contrib/bind9/lib/isc/result.c b/contrib/bind9/lib/isc/result.c
index 5b0ddd3..fd4e5c6 100644
--- a/contrib/bind9/lib/isc/result.c
+++ b/contrib/bind9/lib/isc/result.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1998-2001, 2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,10 +15,11 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: result.c,v 1.56.2.2.8.7 2004/06/11 00:31:01 marka Exp $ */
+/* $Id: result.c,v 1.56.2.2.8.9 2005/06/09 23:54:30 marka Exp $ */
#include <config.h>
+#include <stddef.h>
#include <stdlib.h>
#include <isc/lib.h>
diff --git a/contrib/bind9/lib/isc/rwlock.c b/contrib/bind9/lib/isc/rwlock.c
index 63f0c68..3e444d8 100644
--- a/contrib/bind9/lib/isc/rwlock.c
+++ b/contrib/bind9/lib/isc/rwlock.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1998-2001, 2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: rwlock.c,v 1.33.2.4.2.1 2004/03/06 08:14:35 marka Exp $ */
+/* $Id: rwlock.c,v 1.33.2.4.2.3 2005/03/17 03:58:32 marka Exp $ */
#include <config.h>
@@ -109,7 +109,9 @@ isc_rwlock_init(isc_rwlock_t *rwl, unsigned int read_quota,
isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
ISC_MSG_FAILED, "failed"),
isc_result_totext(result));
- return (ISC_R_UNEXPECTED);
+ result = ISC_R_UNEXPECTED;
+ goto destroy_lock;
+
}
result = isc_condition_init(&rwl->writeable);
if (result != ISC_R_SUCCESS) {
@@ -118,12 +120,20 @@ isc_rwlock_init(isc_rwlock_t *rwl, unsigned int read_quota,
isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
ISC_MSG_FAILED, "failed"),
isc_result_totext(result));
- return (ISC_R_UNEXPECTED);
+ result = ISC_R_UNEXPECTED;
+ goto destroy_rcond;
}
rwl->magic = RWLOCK_MAGIC;
return (ISC_R_SUCCESS);
+
+ destroy_rcond:
+ (void)isc_condition_destroy(&rwl->readable);
+ destroy_lock:
+ DESTROYLOCK(&rwl->lock);
+
+ return (result);
}
static isc_result_t
diff --git a/contrib/bind9/lib/isc/timer.c b/contrib/bind9/lib/isc/timer.c
index f3cdd91..5426079 100644
--- a/contrib/bind9/lib/isc/timer.c
+++ b/contrib/bind9/lib/isc/timer.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1998-2002 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: timer.c,v 1.64.12.9 2004/03/08 09:04:50 marka Exp $ */
+/* $Id: timer.c,v 1.64.12.11 2005/10/27 00:27:29 marka Exp $ */
#include <config.h>
@@ -487,7 +487,7 @@ isc_timer_reset(isc_timer_t *timer, isc_timertype_t type,
return (result);
}
-isc_result_t
+isc_timertype_t
isc_timer_gettype(isc_timer_t *timer) {
isc_timertype_t t;
diff --git a/contrib/bind9/lib/isc/unix/entropy.c b/contrib/bind9/lib/isc/unix/entropy.c
index a2cbb3c..5050663 100644
--- a/contrib/bind9/lib/isc/unix/entropy.c
+++ b/contrib/bind9/lib/isc/unix/entropy.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 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.
*/
-/* $Id: entropy.c,v 1.60.2.3.8.9 2004/03/16 05:02:31 marka Exp $ */
+/* $Id: entropy.c,v 1.60.2.3.8.11 2005/07/12 05:47:43 marka Exp $ */
/*
* This is the system depenedent part of the ISC entropy API.
@@ -446,16 +446,25 @@ make_nonblock(int fd) {
int ret;
int flags;
char strbuf[ISC_STRERRORSIZE];
+#ifdef USE_FIONBIO_IOCTL
+ int on = 1;
+ ret = ioctl(fd, FIONBIO, (char *)&on);
+#else
flags = fcntl(fd, F_GETFL, 0);
- flags |= O_NONBLOCK;
+ flags |= PORT_NONBLOCK;
ret = fcntl(fd, F_SETFL, flags);
+#endif
if (ret == -1) {
isc__strerror(errno, strbuf, sizeof(strbuf));
UNEXPECTED_ERROR(__FILE__, __LINE__,
- "fcntl(%d, F_SETFL, %d): %s",
- fd, flags, strbuf);
+#ifdef USE_FIONBIO_IOCTL
+ "ioctl(%d, FIONBIO, &on): %s", fd,
+#else
+ "fcntl(%d, F_SETFL, %d): %s", fd, flags,
+#endif
+ strbuf);
return (ISC_R_UNEXPECTED);
}
@@ -501,7 +510,7 @@ isc_entropy_createfilesource(isc_entropy_t *ent, const char *fname) {
if (is_usocket)
fd = socket(PF_UNIX, SOCK_STREAM, 0);
else
- fd = open(fname, O_RDONLY | O_NONBLOCK, 0);
+ fd = open(fname, O_RDONLY | PORT_NONBLOCK, 0);
if (fd < 0) {
ret = isc__errno2result(errno);
diff --git a/contrib/bind9/lib/isc/unix/ifiter_ioctl.c b/contrib/bind9/lib/isc/unix/ifiter_ioctl.c
index 6842c1f..0b01b96 100644
--- a/contrib/bind9/lib/isc/unix/ifiter_ioctl.c
+++ b/contrib/bind9/lib/isc/unix/ifiter_ioctl.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 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.
*/
-/* $Id: ifiter_ioctl.c,v 1.19.2.5.2.15 2004/11/10 22:22:49 marka Exp $ */
+/* $Id: ifiter_ioctl.c,v 1.19.2.5.2.17 2005/10/14 02:13:07 marka Exp $ */
/*
* Obtain the list of network interfaces using the SIOCGLIFCONF ioctl.
@@ -896,7 +896,9 @@ internal_current(isc_interfaceiter_t *iter) {
*/
static isc_result_t
internal_next4(isc_interfaceiter_t *iter) {
+#ifdef ISC_PLATFORM_HAVESALEN
struct ifreq *ifrp;
+#endif
REQUIRE (iter->pos < (unsigned int) iter->ifc.ifc_len);
@@ -906,14 +908,14 @@ internal_next4(isc_interfaceiter_t *iter) {
if (!iter->first)
return (ISC_R_SUCCESS);
#endif
+#ifdef ISC_PLATFORM_HAVESALEN
ifrp = (struct ifreq *)((char *) iter->ifc.ifc_req + iter->pos);
-#ifdef ISC_PLATFORM_HAVESALEN
if (ifrp->ifr_addr.sa_len > sizeof(struct sockaddr))
iter->pos += sizeof(ifrp->ifr_name) + ifrp->ifr_addr.sa_len;
else
#endif
- iter->pos += sizeof(*ifrp);
+ iter->pos += sizeof(struct ifreq);
if (iter->pos >= (unsigned int) iter->ifc.ifc_len)
return (ISC_R_NOMORE);
@@ -924,21 +926,23 @@ internal_next4(isc_interfaceiter_t *iter) {
#if defined(SIOCGLIFCONF) && defined(SIOCGLIFADDR)
static isc_result_t
internal_next6(isc_interfaceiter_t *iter) {
+#ifdef ISC_PLATFORM_HAVESALEN
struct LIFREQ *ifrp;
+#endif
if (iter->result6 != ISC_R_SUCCESS && iter->result6 != ISC_R_IGNORE)
return (iter->result6);
REQUIRE(iter->pos6 < (unsigned int) iter->lifc.lifc_len);
+#ifdef ISC_PLATFORM_HAVESALEN
ifrp = (struct LIFREQ *)((char *) iter->lifc.lifc_req + iter->pos6);
-#ifdef ISC_PLATFORM_HAVESALEN
if (ifrp->lifr_addr.sa_len > sizeof(struct sockaddr))
iter->pos6 += sizeof(ifrp->lifr_name) + ifrp->lifr_addr.sa_len;
else
#endif
- iter->pos6 += sizeof(*ifrp);
+ iter->pos6 += sizeof(struct LIFREQ);
if (iter->pos6 >= (unsigned int) iter->lifc.lifc_len)
return (ISC_R_NOMORE);
diff --git a/contrib/bind9/lib/isc/unix/ifiter_sysctl.c b/contrib/bind9/lib/isc/unix/ifiter_sysctl.c
index c0f678b..b10a2d2 100644
--- a/contrib/bind9/lib/isc/unix/ifiter_sysctl.c
+++ b/contrib/bind9/lib/isc/unix/ifiter_sysctl.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 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.
*/
-/* $Id: ifiter_sysctl.c,v 1.14.12.7 2004/03/08 09:04:56 marka Exp $ */
+/* $Id: ifiter_sysctl.c,v 1.14.12.9 2005/03/17 03:58:33 marka Exp $ */
/*
* Obtain the list of network interfaces using sysctl.
@@ -251,7 +251,7 @@ internal_current(isc_interfaceiter_t *iter) {
iter->current.name);
if (dst_sa != NULL &&
- (iter->current.flags & IFF_POINTOPOINT) != 0)
+ (iter->current.flags & INTERFACE_F_POINTTOPOINT) != 0)
get_addr(family, &iter->current.dstaddress, dst_sa,
iter->current.name);
diff --git a/contrib/bind9/lib/isc/unix/net.c b/contrib/bind9/lib/isc/unix/net.c
index 05f4121..e0aeccb 100644
--- a/contrib/bind9/lib/isc/unix/net.c
+++ b/contrib/bind9/lib/isc/unix/net.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 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.
*/
-/* $Id: net.c,v 1.22.2.2.10.7 2004/04/29 01:31:22 marka Exp $ */
+/* $Id: net.c,v 1.22.2.2.10.9 2005/03/17 03:58:33 marka Exp $ */
#include <config.h>
@@ -237,6 +237,7 @@ initialize_ipv6only(void) {
}
#endif /* IPV6_V6ONLY */
+#ifdef ISC_PLATFORM_HAVEIN6PKTINFO
static void
try_ipv6pktinfo(void) {
int s, on;
@@ -289,6 +290,7 @@ initialize_ipv6pktinfo(void) {
RUNTIME_CHECK(isc_once_do(&once_ipv6pktinfo,
try_ipv6pktinfo) == ISC_R_SUCCESS);
}
+#endif /* ISC_PLATFORM_HAVEIN6PKTINFO */
#endif /* WANT_IPV6 */
isc_result_t
@@ -306,12 +308,14 @@ isc_net_probe_ipv6only(void) {
isc_result_t
isc_net_probe_ipv6pktinfo(void) {
#ifdef ISC_PLATFORM_HAVEIPV6
+#ifdef ISC_PLATFORM_HAVEIN6PKTINFO
#ifdef WANT_IPV6
initialize_ipv6pktinfo();
#else
ipv6pktinfo_result = ISC_R_NOTFOUND;
#endif
#endif
+#endif
return (ipv6pktinfo_result);
}
diff --git a/contrib/bind9/lib/isc/unix/os.c b/contrib/bind9/lib/isc/unix/os.c
index 0838e12..4d34d8c 100644
--- a/contrib/bind9/lib/isc/unix/os.c
+++ b/contrib/bind9/lib/isc/unix/os.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 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.
*/
-/* $Id: os.c,v 1.11.12.4 2004/05/18 01:39:20 marka Exp $ */
+/* $Id: os.c,v 1.11.12.6 2005/10/14 02:13:07 marka Exp $ */
#include <config.h>
@@ -26,6 +26,7 @@
#include <unistd.h>
+#ifndef __hpux
static inline long
sysconf_ncpus(void) {
#if defined(_SC_NPROCESSORS_ONLN)
@@ -36,6 +37,7 @@ sysconf_ncpus(void) {
return (0);
#endif
}
+#endif
#endif /* HAVE_SYSCONF */
diff --git a/contrib/bind9/lib/isc/unix/socket.c b/contrib/bind9/lib/isc/unix/socket.c
index f23b72b..595990f 100644
--- a/contrib/bind9/lib/isc/unix/socket.c
+++ b/contrib/bind9/lib/isc/unix/socket.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 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.
*/
-/* $Id: socket.c,v 1.207.2.19.2.15 2004/11/18 21:31:16 marka Exp $ */
+/* $Id: socket.c,v 1.207.2.19.2.22 2005/11/03 23:08:42 marka Exp $ */
#include <config.h>
@@ -280,7 +280,7 @@ socket_log(isc_socket_t *sock, isc_sockaddr_t *address,
const char *fmt, ...)
{
char msgbuf[2048];
- char peerbuf[256];
+ char peerbuf[ISC_SOCKADDR_FORMATSIZE];
va_list ap;
if (! isc_log_wouldlog(isc_lctx, level))
@@ -363,7 +363,7 @@ select_poke(isc_socketmgr_t *mgr, int fd, int msg) {
}
#endif
} while (cc < 0 && SOFT_ERROR(errno));
-
+
if (cc < 0) {
isc__strerror(errno, strbuf, sizeof(strbuf));
FATAL_ERROR(__FILE__, __LINE__,
@@ -389,6 +389,7 @@ select_readmsg(isc_socketmgr_t *mgr, int *fd, int *msg) {
cc = read(mgr->pipe_fds[0], buf, sizeof(buf));
if (cc < 0) {
*msg = SELECT_POKE_NOTHING;
+ *fd = -1; /* Silence compiler. */
if (SOFT_ERROR(errno))
return;
@@ -429,16 +430,25 @@ make_nonblock(int fd) {
int ret;
int flags;
char strbuf[ISC_STRERRORSIZE];
+#ifdef USE_FIONBIO_IOCTL
+ int on = 1;
+ ret = ioctl(fd, FIONBIO, (char *)&on);
+#else
flags = fcntl(fd, F_GETFL, 0);
- flags |= O_NONBLOCK;
+ flags |= PORT_NONBLOCK;
ret = fcntl(fd, F_SETFL, flags);
+#endif
if (ret == -1) {
isc__strerror(errno, strbuf, sizeof(strbuf));
UNEXPECTED_ERROR(__FILE__, __LINE__,
- "fcntl(%d, F_SETFL, %d): %s",
- fd, flags, strbuf);
+#ifdef USE_FIONBIO_IOCTL
+ "ioctl(%d, FIONBIO, &on): %s", fd,
+#else
+ "fcntl(%d, F_SETFL, %d): %s", fd, flags,
+#endif
+ strbuf);
return (ISC_R_UNEXPECTED);
}
@@ -461,7 +471,11 @@ cmsg_len(ISC_SOCKADDR_LEN_T len) {
#else
ISC_SOCKADDR_LEN_T hdrlen;
- hdrlen = (ISC_SOCKADDR_LEN_T)CMSG_DATA(NULL); /* XXX */
+ /*
+ * Cast NULL so that any pointer arithmetic performed by CMSG_DATA
+ * is correct.
+ */
+ hdrlen = (ISC_SOCKADDR_LEN_T)CMSG_DATA(((struct cmsghdr *)NULL));
return (hdrlen + len);
#endif
}
@@ -1222,7 +1236,7 @@ allocate_socket(isc_socketmgr_t *manager, isc_sockettype_t type,
cmsgbuflen += cmsg_space(sizeof(struct timeval));
#endif
sock->recvcmsgbuflen = cmsgbuflen;
- if (sock->recvcmsgbuflen != 0) {
+ if (sock->recvcmsgbuflen != 0U) {
sock->recvcmsgbuf = isc_mem_get(manager->mctx, cmsgbuflen);
if (sock->recvcmsgbuf == NULL)
goto error;
@@ -1233,7 +1247,7 @@ allocate_socket(isc_socketmgr_t *manager, isc_sockettype_t type,
cmsgbuflen = cmsg_space(sizeof(struct in6_pktinfo));
#endif
sock->sendcmsgbuflen = cmsgbuflen;
- if (sock->sendcmsgbuflen != 0) {
+ if (sock->sendcmsgbuflen != 0U) {
sock->sendcmsgbuf = isc_mem_get(manager->mctx, cmsgbuflen);
if (sock->sendcmsgbuf == NULL)
goto error;
@@ -1348,6 +1362,7 @@ isc_socket_create(isc_socketmgr_t *manager, int pf, isc_sockettype_t type,
int on = 1;
#endif
char strbuf[ISC_STRERRORSIZE];
+ const char *err = "socket";
REQUIRE(VALID_MANAGER(manager));
REQUIRE(socketp != NULL && *socketp == NULL);
@@ -1367,23 +1382,24 @@ isc_socket_create(isc_socketmgr_t *manager, int pf, isc_sockettype_t type,
}
#ifdef F_DUPFD
- /*
- * Leave a space for stdio to work in.
- */
- if (sock->fd >= 0 && sock->fd < 20) {
- int new, tmp;
- new = fcntl(sock->fd, F_DUPFD, 20);
- tmp = errno;
- (void)close(sock->fd);
- errno = tmp;
- sock->fd = new;
- }
+ /*
+ * Leave a space for stdio to work in.
+ */
+ if (sock->fd >= 0 && sock->fd < 20) {
+ int new, tmp;
+ new = fcntl(sock->fd, F_DUPFD, 20);
+ tmp = errno;
+ (void)close(sock->fd);
+ errno = tmp;
+ sock->fd = new;
+ err = "isc_socket_create: fcntl";
+ }
#endif
if (sock->fd >= (int)FD_SETSIZE) {
(void)close(sock->fd);
isc_log_iwrite(isc_lctx, ISC_LOGCATEGORY_GENERAL,
- ISC_LOGMODULE_SOCKET, ISC_LOG_ERROR,
+ ISC_LOGMODULE_SOCKET, ISC_LOG_ERROR,
isc_msgcat, ISC_MSGSET_SOCKET,
ISC_MSG_TOOMANYFDS,
"%s: too many open file descriptors", "socket");
@@ -1413,7 +1429,7 @@ isc_socket_create(isc_socketmgr_t *manager, int pf, isc_sockettype_t type,
default:
isc__strerror(errno, strbuf, sizeof(strbuf));
UNEXPECTED_ERROR(__FILE__, __LINE__,
- "socket() %s: %s",
+ "%s() %s: %s", err,
isc_msgcat_get(isc_msgcat,
ISC_MSGSET_GENERAL,
ISC_MSG_FAILED,
@@ -1464,7 +1480,7 @@ isc_socket_create(isc_socketmgr_t *manager, int pf, isc_sockettype_t type,
#endif /* SO_TIMESTAMP */
#if defined(ISC_PLATFORM_HAVEIPV6)
- if (pf == AF_INET6 && sock->recvcmsgbuflen == 0) {
+ if (pf == AF_INET6 && sock->recvcmsgbuflen == 0U) {
/*
* Warn explicitly because this anomaly can be hidden
* in usual operation (and unexpectedly appear later).
@@ -1764,6 +1780,7 @@ internal_accept(isc_task_t *me, isc_event_t *ev) {
int fd;
isc_result_t result = ISC_R_SUCCESS;
char strbuf[ISC_STRERRORSIZE];
+ const char *err = "accept";
UNUSED(me);
@@ -1817,17 +1834,18 @@ internal_accept(isc_task_t *me, isc_event_t *ev) {
(void *)&addrlen);
#ifdef F_DUPFD
- /*
- * Leave a space for stdio to work in.
- */
- if (fd >= 0 && fd < 20) {
- int new, tmp;
- new = fcntl(fd, F_DUPFD, 20);
- tmp = errno;
- (void)close(fd);
- errno = tmp;
- fd = new;
- }
+ /*
+ * Leave a space for stdio to work in.
+ */
+ if (fd >= 0 && fd < 20) {
+ int new, tmp;
+ new = fcntl(fd, F_DUPFD, 20);
+ tmp = errno;
+ (void)close(fd);
+ errno = tmp;
+ fd = new;
+ err = "fcntl";
+ }
#endif
if (fd < 0) {
@@ -1856,7 +1874,7 @@ internal_accept(isc_task_t *me, isc_event_t *ev) {
}
isc__strerror(errno, strbuf, sizeof(strbuf));
UNEXPECTED_ERROR(__FILE__, __LINE__,
- "internal_accept: accept() %s: %s",
+ "internal_accept: %s() %s: %s", err,
isc_msgcat_get(isc_msgcat,
ISC_MSGSET_GENERAL,
ISC_MSG_FAILED,
@@ -1865,7 +1883,7 @@ internal_accept(isc_task_t *me, isc_event_t *ev) {
fd = -1;
result = ISC_R_UNEXPECTED;
} else {
- if (addrlen == 0) {
+ if (addrlen == 0U) {
UNEXPECTED_ERROR(__FILE__, __LINE__,
"internal_accept(): "
"accept() failed to return "
@@ -2197,7 +2215,7 @@ watcher(void *uap) {
cc = select(maxfd, &readfds, &writefds, NULL, NULL);
if (cc < 0) {
if (!SOFT_ERROR(errno)) {
- isc__strerror(errno, strbuf,
+ isc__strerror(errno, strbuf,
sizeof(strbuf));
FATAL_ERROR(__FILE__, __LINE__,
"select() %s: %s",
@@ -3094,6 +3112,7 @@ isc_socket_connect(isc_socket_t *sock, isc_sockaddr_t *addr,
ERROR_MATCH(ENOBUFS, ISC_R_NORESOURCES);
ERROR_MATCH(EPERM, ISC_R_HOSTUNREACH);
ERROR_MATCH(EPIPE, ISC_R_NOTCONNECTED);
+ ERROR_MATCH(ECONNRESET, ISC_R_CONNECTIONRESET);
#undef ERROR_MATCH
}
@@ -3163,6 +3182,7 @@ internal_connect(isc_task_t *me, isc_event_t *ev) {
int cc;
ISC_SOCKADDR_LEN_T optlen;
char strbuf[ISC_STRERRORSIZE];
+ char peerbuf[ISC_SOCKADDR_FORMATSIZE];
UNUSED(me);
INSIST(ev->ev_type == ISC_SOCKEVENT_INTW);
@@ -3239,13 +3259,16 @@ internal_connect(isc_task_t *me, isc_event_t *ev) {
ERROR_MATCH(EPERM, ISC_R_HOSTUNREACH);
ERROR_MATCH(EPIPE, ISC_R_NOTCONNECTED);
ERROR_MATCH(ETIMEDOUT, ISC_R_TIMEDOUT);
+ ERROR_MATCH(ECONNRESET, ISC_R_CONNECTIONRESET);
#undef ERROR_MATCH
default:
dev->result = ISC_R_UNEXPECTED;
+ isc_sockaddr_format(&sock->address, peerbuf,
+ sizeof(peerbuf));
isc__strerror(errno, strbuf, sizeof(strbuf));
UNEXPECTED_ERROR(__FILE__, __LINE__,
- "internal_connect: connect() %s",
- strbuf);
+ "internal_connect: connect(%s) %s",
+ peerbuf, strbuf);
}
} else {
dev->result = ISC_R_SUCCESS;
@@ -3407,7 +3430,7 @@ isc_socket_cancel(isc_socket_t *sock, isc_task_t *task, unsigned int how) {
dev->result = ISC_R_CANCELED;
dev->ev_sender = sock;
isc_task_sendanddetach(&current_task,
- ISC_EVENT_PTR(&dev));
+ ISC_EVENT_PTR(&dev));
}
dev = next;
diff --git a/contrib/bind9/lib/isc/unix/stdtime.c b/contrib/bind9/lib/isc/unix/stdtime.c
index 8946a60..b8d818d 100644
--- a/contrib/bind9/lib/isc/unix/stdtime.c
+++ b/contrib/bind9/lib/isc/unix/stdtime.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,10 +15,11 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: stdtime.c,v 1.11.2.1.10.3 2004/03/08 09:04:57 marka Exp $ */
+/* $Id: stdtime.c,v 1.11.2.1.10.5 2005/06/09 23:54:31 marka Exp $ */
#include <config.h>
+#include <stddef.h> /* NULL */
#include <stdlib.h> /* NULL */
#include <syslog.h>
diff --git a/contrib/bind9/lib/isccfg/api b/contrib/bind9/lib/isccfg/api
index 7e9f0b6..59ed93b 100644
--- a/contrib/bind9/lib/isccfg/api
+++ b/contrib/bind9/lib/isccfg/api
@@ -1,3 +1,3 @@
LIBINTERFACE = 1
-LIBREVISION = 5
+LIBREVISION = 6
LIBAGE = 0
diff --git a/contrib/bind9/lib/isccfg/namedconf.c b/contrib/bind9/lib/isccfg/namedconf.c
index 3321bd6..bfc5dda 100644
--- a/contrib/bind9/lib/isccfg/namedconf.c
+++ b/contrib/bind9/lib/isccfg/namedconf.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 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.
*/
-/* $Id: namedconf.c,v 1.21.44.29 2004/10/17 23:19:51 marka Exp $ */
+/* $Id: namedconf.c,v 1.21.44.32 2005/10/26 05:06:40 marka Exp $ */
#include <config.h>
@@ -479,7 +479,7 @@ static cfg_type_t cfg_type_hostname = {
};
/*
- * "server-id" arguement.
+ * "server-id" argument.
*/
static isc_result_t
@@ -619,6 +619,7 @@ options_clauses[] = {
{ "use-id-pool", &cfg_type_boolean, CFG_CLAUSEFLAG_OBSOLETE },
{ "use-ixfr", &cfg_type_boolean, 0 },
{ "version", &cfg_type_qstringornone, 0 },
+ { "flush-zones-on-shutdown", &cfg_type_boolean, 0 },
{ NULL, NULL, 0 }
};
diff --git a/contrib/bind9/lib/lwres/Makefile.in b/contrib/bind9/lib/lwres/Makefile.in
index 548c5d5..024b988 100644
--- a/contrib/bind9/lib/lwres/Makefile.in
+++ b/contrib/bind9/lib/lwres/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
# Copyright (C) 2000, 2001 Internet Software Consortium.
#
# Permission to use, copy, modify, and distribute this software for any
@@ -13,7 +13,7 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
-# $Id: Makefile.in,v 1.25.12.6 2004/08/28 06:25:23 marka Exp $
+# $Id: Makefile.in,v 1.25.12.8 2005/06/09 23:54:32 marka Exp $
srcdir = @srcdir@
VPATH = @srcdir@
@@ -35,14 +35,16 @@ OBJS = context.@O@ gai_strerror.@O@ getaddrinfo.@O@ gethost.@O@ \
getipnode.@O@ getnameinfo.@O@ getrrset.@O@ herror.@O@ \
lwbuffer.@O@ lwconfig.@O@ lwpacket.@O@ lwresutil.@O@ \
lwres_gabn.@O@ lwres_gnba.@O@ lwres_grbn.@O@ lwres_noop.@O@ \
- lwinetaton.@O@ lwinetpton.@O@ lwinetntop.@O@ print.@O@
+ lwinetaton.@O@ lwinetpton.@O@ lwinetntop.@O@ print.@O@ \
+ strtoul.@O@
# Alphabetically
SRCS = context.c gai_strerror.c getaddrinfo.c gethost.c \
getipnode.c getnameinfo.c getrrset.c herror.c \
lwbuffer.c lwconfig.c lwpacket.c lwresutil.c \
lwres_gabn.c lwres_gnba.c lwres_grbn.c lwres_noop.c \
- lwinetaton.c lwinetpton.c lwinetntop.c print.c
+ lwinetaton.c lwinetpton.c lwinetntop.c print.c \
+ strtoul.c
LIBS = @LIBS@
diff --git a/contrib/bind9/lib/lwres/api b/contrib/bind9/lib/lwres/api
index 01be873..0ab1e92 100644
--- a/contrib/bind9/lib/lwres/api
+++ b/contrib/bind9/lib/lwres/api
@@ -1,3 +1,3 @@
-LIBINTERFACE = 3
-LIBREVISION = 2
-LIBAGE = 2
+LIBINTERFACE = 10
+LIBREVISION = 1
+LIBAGE = 1
diff --git a/contrib/bind9/lib/lwres/getaddrinfo.c b/contrib/bind9/lib/lwres/getaddrinfo.c
index 86f48aa..c063274 100644
--- a/contrib/bind9/lib/lwres/getaddrinfo.c
+++ b/contrib/bind9/lib/lwres/getaddrinfo.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2001 Internet Software Consortium.
*
* This code is derived from software contributed to ISC by
@@ -18,17 +18,17 @@
* IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: getaddrinfo.c,v 1.41.206.1 2004/03/06 08:15:30 marka Exp $ */
+/* $Id: getaddrinfo.c,v 1.41.206.3 2005/06/09 23:54:33 marka Exp $ */
#include <config.h>
#include <string.h>
#include <errno.h>
-#include <stdlib.h>
#include <lwres/lwres.h>
#include <lwres/net.h>
#include <lwres/netdb.h>
+#include <lwres/stdlib.h>
#define SA(addr) ((struct sockaddr *)(addr))
#define SIN(addr) ((struct sockaddr_in *)(addr))
diff --git a/contrib/bind9/lib/lwres/getipnode.c b/contrib/bind9/lib/lwres/getipnode.c
index 5bda15e..9b1a07b 100644
--- a/contrib/bind9/lib/lwres/getipnode.c
+++ b/contrib/bind9/lib/lwres/getipnode.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 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.
*/
-/* $Id: getipnode.c,v 1.30.2.4.2.4 2004/03/06 08:15:31 marka Exp $ */
+/* $Id: getipnode.c,v 1.30.2.4.2.6 2005/04/29 00:03:32 marka Exp $ */
#include <config.h>
@@ -331,6 +331,8 @@ lwres_getipnodebyaddr(const void *src, size_t len, int af, int *error_num) {
n = lwres_getnamebyaddr(lwrctx, LWRES_ADDRTYPE_V6, IN6ADDRSZ,
src, &by);
if (n != 0) {
+ lwres_conf_clear(lwrctx);
+ lwres_context_destroy(&lwrctx);
*error_num = HOST_NOT_FOUND;
return (NULL);
}
@@ -338,6 +340,7 @@ lwres_getipnodebyaddr(const void *src, size_t len, int af, int *error_num) {
lwres_gnbaresponse_free(lwrctx, &by);
if (he1 == NULL)
*error_num = NO_RECOVERY;
+ lwres_conf_clear(lwrctx);
lwres_context_destroy(&lwrctx);
return (he1);
}
diff --git a/contrib/bind9/lib/lwres/include/lwres/platform.h.in b/contrib/bind9/lib/lwres/include/lwres/platform.h.in
index 9c6502b..e995aa4 100644
--- a/contrib/bind9/lib/lwres/include/lwres/platform.h.in
+++ b/contrib/bind9/lib/lwres/include/lwres/platform.h.in
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 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.
*/
-/* $Id: platform.h.in,v 1.12.2.1.10.2 2004/08/28 06:25:26 marka Exp $ */
+/* $Id: platform.h.in,v 1.12.2.1.10.5 2005/06/08 02:08:32 marka Exp $ */
#ifndef LWRES_PLATFORM_H
#define LWRES_PLATFORM_H 1
@@ -88,6 +88,16 @@
*/
@LWRES_PLATFORM_NEEDSPRINTF@
+/*
+ * The printf format string modifier to use with lwres_uint64_t values.
+ */
+@LWRES_PLATFORM_QUADFORMAT@
+
+/*! \brief
+ * Define if this system needs strtoul.
+ */
+@LWRES_PLATFORM_NEEDSTRTOUL@
+
#ifndef LWRES_PLATFORM_USEDECLSPEC
#define LIBLWRES_EXTERNAL_DATA
#else
diff --git a/contrib/bind9/lib/lwres/include/lwres/stdlib.h b/contrib/bind9/lib/lwres/include/lwres/stdlib.h
new file mode 100644
index 0000000..f5d4db2
--- /dev/null
+++ b/contrib/bind9/lib/lwres/include/lwres/stdlib.h
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2003 Internet Software Consortium.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND 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.
+ */
+
+/* $Id: stdlib.h,v 1.2.4.1 2005/06/08 02:08:32 marka Exp $ */
+
+#ifndef LWRES_STDLIB_H
+#define LWRES_STDLIB_H 1
+
+/*! \file */
+
+#include <stdlib.h>
+
+#include <lwres/lang.h>
+#include <lwres/platform.h>
+
+#ifdef LWRES_PLATFORM_NEEDSTRTOUL
+#define strtoul lwres_strtoul
+#endif
+
+LWRES_LANG_BEGINDECLS
+
+unsigned long lwres_strtoul(const char *, char **, int);
+
+LWRES_LANG_ENDDECLS
+
+#endif
diff --git a/contrib/bind9/lib/lwres/lwconfig.c b/contrib/bind9/lib/lwres/lwconfig.c
index 9fc7825..7fc2c5d 100644
--- a/contrib/bind9/lib/lwres/lwconfig.c
+++ b/contrib/bind9/lib/lwres/lwconfig.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 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.
*/
-/* $Id: lwconfig.c,v 1.33.2.1.2.5 2004/03/08 09:05:10 marka Exp $ */
+/* $Id: lwconfig.c,v 1.33.2.1.2.8 2005/06/08 02:35:21 marka Exp $ */
/***
*** Module for parsing resolv.conf files.
@@ -277,6 +277,7 @@ lwres_conf_parsenameserver(lwres_context_t *ctx, FILE *fp) {
char word[LWRES_CONFMAXLINELEN];
int res;
lwres_conf_t *confdata;
+ lwres_addr_t address;
confdata = &ctx->confdata;
@@ -292,10 +293,9 @@ lwres_conf_parsenameserver(lwres_context_t *ctx, FILE *fp) {
if (res != EOF && res != '\n')
return (LWRES_R_FAILURE); /* Extra junk on line. */
- res = lwres_create_addr(word,
- &confdata->nameservers[confdata->nsnext++], 1);
- if (res != LWRES_R_SUCCESS)
- return (res);
+ res = lwres_create_addr(word, &address, 1);
+ if (res == LWRES_R_SUCCESS)
+ confdata->nameservers[confdata->nsnext++] = address;
return (LWRES_R_SUCCESS);
}
diff --git a/contrib/bind9/lib/lwres/lwinetntop.c b/contrib/bind9/lib/lwres/lwinetntop.c
index f4af00d..78cd0b0 100644
--- a/contrib/bind9/lib/lwres/lwinetntop.c
+++ b/contrib/bind9/lib/lwres/lwinetntop.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1996-2001, 2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -17,7 +17,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
static char rcsid[] =
- "$Id: lwinetntop.c,v 1.9.12.3 2004/08/28 06:25:24 marka Exp $";
+ "$Id: lwinetntop.c,v 1.9.12.5 2005/11/04 00:16:34 marka Exp $";
#endif /* LIBC_SCCS and not lint */
#include <config.h>
@@ -126,7 +126,9 @@ inet_ntop6(const unsigned char *src, char *dst, size_t size) {
for (i = 0; i < NS_IN6ADDRSZ; i++)
words[i / 2] |= (src[i] << ((1 - (i % 2)) << 3));
best.base = -1;
+ best.len = 0;
cur.base = -1;
+ cur.len = 0;
for (i = 0; i < (NS_IN6ADDRSZ / NS_INT16SZ); i++) {
if (words[i] == 0) {
if (cur.base == -1)
diff --git a/contrib/bind9/lib/lwres/lwinetpton.c b/contrib/bind9/lib/lwres/lwinetpton.c
index 280b077..e24334b 100644
--- a/contrib/bind9/lib/lwres/lwinetpton.c
+++ b/contrib/bind9/lib/lwres/lwinetpton.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1996-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -16,7 +16,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$Id: lwinetpton.c,v 1.6.206.1 2004/03/06 08:15:32 marka Exp $";
+static char rcsid[] = "$Id: lwinetpton.c,v 1.6.206.3 2005/03/31 23:56:15 marka Exp $";
#endif /* LIBC_SCCS and not lint */
#include <config.h>
@@ -129,7 +129,7 @@ inet_pton6(const char *src, unsigned char *dst) {
xdigits_u[] = "0123456789ABCDEF";
unsigned char tmp[NS_IN6ADDRSZ], *tp, *endp, *colonp;
const char *xdigits, *curtok;
- int ch, saw_xdigit;
+ int ch, seen_xdigits;
unsigned int val;
memset((tp = tmp), '\0', NS_IN6ADDRSZ);
@@ -140,7 +140,7 @@ inet_pton6(const char *src, unsigned char *dst) {
if (*++src != ':')
return (0);
curtok = src;
- saw_xdigit = 0;
+ seen_xdigits = 0;
val = 0;
while ((ch = *src++) != '\0') {
const char *pch;
@@ -150,14 +150,13 @@ inet_pton6(const char *src, unsigned char *dst) {
if (pch != NULL) {
val <<= 4;
val |= (pch - xdigits);
- if (val > 0xffff)
+ if (++seen_xdigits > 4)
return (0);
- saw_xdigit = 1;
continue;
}
if (ch == ':') {
curtok = src;
- if (!saw_xdigit) {
+ if (!seen_xdigits) {
if (colonp)
return (0);
colonp = tp;
@@ -167,19 +166,19 @@ inet_pton6(const char *src, unsigned char *dst) {
return (0);
*tp++ = (unsigned char) (val >> 8) & 0xff;
*tp++ = (unsigned char) val & 0xff;
- saw_xdigit = 0;
+ seen_xdigits = 0;
val = 0;
continue;
}
if (ch == '.' && ((tp + NS_INADDRSZ) <= endp) &&
inet_pton4(curtok, tp) > 0) {
tp += NS_INADDRSZ;
- saw_xdigit = 0;
+ seen_xdigits = 0;
break; /* '\0' was seen by inet_pton4(). */
}
return (0);
}
- if (saw_xdigit) {
+ if (seen_xdigits) {
if (tp + NS_INT16SZ > endp)
return (0);
*tp++ = (unsigned char) (val >> 8) & 0xff;
diff --git a/contrib/bind9/lib/lwres/man/lwres.3 b/contrib/bind9/lib/lwres/man/lwres.3
index ad125d2..3411eac 100644
--- a/contrib/bind9/lib/lwres/man/lwres.3
+++ b/contrib/bind9/lib/lwres/man/lwres.3
@@ -1,144 +1,142 @@
-.\" Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
-.\" Copyright (C) 2000, 2001 Internet Software Consortium.
-.\"
+.\" Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
+.\" Copyright (C) 2000, 2001 Internet Software Consortium.
+.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
-.\"
+.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND 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,
+.\" 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.
.\"
-.\" $Id: lwres.3,v 1.15.206.1 2004/03/06 07:41:42 marka Exp $
+.\" $Id: lwres.3,v 1.15.206.5 2005/10/13 02:33:58 marka Exp $
.\"
-.TH "LWRES" "3" "Jun 30, 2000" "BIND9" ""
-.SH NAME
+.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.
+.TH "LWRES" "3" "Jun 30, 2000" "BIND9" "BIND9"
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.SH "NAME"
lwres \- introduction to the lightweight resolver library
-.SH SYNOPSIS
-\fB#include <lwres/lwres.h>\fR
+.SH "SYNOPSIS"
+.nf
+#include <lwres/lwres.h>
+.fi
.SH "DESCRIPTION"
.PP
-The BIND 9 lightweight resolver library is a simple, name service
-independent stub resolver library. It provides hostname-to-address
-and address-to-hostname lookup services to applications by
-transmitting lookup requests to a resolver daemon
+The BIND 9 lightweight resolver library is a simple, name service independent stub resolver library. It provides hostname\-to\-address and address\-to\-hostname lookup services to applications by transmitting lookup requests to a resolver daemon
\fBlwresd\fR
-running on the local host. The resover daemon performs the
-lookup using the DNS or possibly other name service protocols,
-and returns the results to the application through the library.
-The library and resolver daemon communicate using a simple
-UDP-based protocol.
+running on the local host. The resover daemon performs the lookup using the DNS or possibly other name service protocols, and returns the results to the application through the library. The library and resolver daemon communicate using a simple UDP\-based protocol.
.SH "OVERVIEW"
.PP
-The lwresd library implements multiple name service APIs.
-The standard
+The lwresd library implements multiple name service APIs. The standard
\fBgethostbyname()\fR,
\fBgethostbyaddr()\fR,
\fBgethostbyname_r()\fR,
\fBgethostbyaddr_r()\fR,
\fBgetaddrinfo()\fR,
-\fBgetipnodebyname()\fR,
-and
+\fBgetipnodebyname()\fR, and
\fBgetipnodebyaddr()\fR
-functions are all supported. To allow the lwres library to coexist
-with system libraries that define functions of the same name,
-the library defines these functions with names prefixed by
-lwres_.
-To define the standard names, applications must include the
-header file
+functions are all supported. To allow the lwres library to coexist with system libraries that define functions of the same name, the library defines these functions with names prefixed by
+lwres_. To define the standard names, applications must include the header file
\fI<lwres/netdb.h>\fR
-which contains macro definitions mapping the standard function names
-into
+which contains macro definitions mapping the standard function names into
lwres_
-prefixed ones. Operating system vendors who integrate the lwres
-library into their base distributions should rename the functions
-in the library proper so that the renaming macros are not needed.
+prefixed ones. Operating system vendors who integrate the lwres library into their base distributions should rename the functions in the library proper so that the renaming macros are not needed.
.PP
The library also provides a native API consisting of the functions
\fBlwres_getaddrsbyname()\fR
and
-\fBlwres_getnamebyaddr()\fR.
-These may be called by applications that require more detailed
-control over the lookup process than the standard functions
-provide.
-.PP
-In addition to these name service independent address lookup
-functions, the library implements a new, experimental API
-for looking up arbitrary DNS resource records, using the
+\fBlwres_getnamebyaddr()\fR. These may be called by applications that require more detailed control over the lookup process than the standard functions provide.
+.PP
+In addition to these name service independent address lookup functions, the library implements a new, experimental API for looking up arbitrary DNS resource records, using the
\fBlwres_getaddrsbyname()\fR
function.
.PP
-Finally, there is a low-level API for converting lookup
-requests and responses to and from raw lwres protocol packets.
-This API can be used by clients requiring nonblocking operation,
-and is also used when implementing the server side of the lwres
-protocol, for example in the
+Finally, there is a low\-level API for converting lookup requests and responses to and from raw lwres protocol packets. This API can be used by clients requiring nonblocking operation, and is also used when implementing the server side of the lwres protocol, for example in the
\fBlwresd\fR
-resolver daemon. The use of this low-level API in clients
-and servers is outlined in the following sections.
-.SH "CLIENT-SIDE LOW-LEVEL API CALL FLOW"
+resolver daemon. The use of this low\-level API in clients and servers is outlined in the following sections.
+.SH "CLIENT\-SIDE LOW\-LEVEL API CALL FLOW"
.PP
-When a client program wishes to make an lwres request using the
-native low-level API, it typically performs the following
-sequence of actions.
+When a client program wishes to make an lwres request using the native low\-level API, it typically performs the following sequence of actions.
.PP
-(1) Allocate or use an existing \fBlwres_packet_t\fR,
-called pkt below.
+(1) Allocate or use an existing
+\fBlwres_packet_t\fR, called
+\fIpkt\fR
+below.
.PP
-(2) Set \fBpkt.recvlength\fR to the maximum length we will accept.
-This is done so the receiver of our packets knows how large our receive
-buffer is. The "default" is a constant in
-\fIlwres.h\fR: LWRES_RECVLENGTH = 4096.
+(2) Set
+pkt.recvlength
+to the maximum length we will accept. This is done so the receiver of our packets knows how large our receive buffer is. The "default" is a constant in
+\fIlwres.h\fR:
+\fBLWRES_RECVLENGTH = 4096\fR.
.PP
-(3) Set \fBpkt.serial\fR
-to a unique serial number. This value is echoed
-back to the application by the remote server.
+(3) Set
+pkt.serial
+to a unique serial number. This value is echoed back to the application by the remote server.
.PP
-(4) Set \fBpkt.pktflags\fR. Usually this is set to 0.
+(4) Set
+pkt.pktflags. Usually this is set to 0.
.PP
-(5) Set \fBpkt.result\fR to 0.
+(5) Set
+pkt.result
+to 0.
.PP
-(6) Call \fBlwres_*request_render()\fR,
-or marshall in the data using the primitives
-such as \fBlwres_packet_render()\fR
+(6) Call
+\fBlwres_*request_render()\fR, or marshall in the data using the primitives such as
+\fBlwres_packet_render()\fR
and storing the packet data.
.PP
(7) Transmit the resulting buffer.
.PP
-(8) Call \fBlwres_*response_parse()\fR
+(8) Call
+\fBlwres_*response_parse()\fR
to parse any packets received.
.PP
-(9) Verify that the opcode and serial match a request, and process the
-packet specific information contained in the body.
-.SH "SERVER-SIDE LOW-LEVEL API CALL FLOW"
+(9) Verify that the opcode and serial match a request, and process the packet specific information contained in the body.
+.SH "SERVER\-SIDE LOW\-LEVEL API CALL FLOW"
.PP
-When implementing the server side of the lightweight resolver
-protocol using the lwres library, a sequence of actions like the
-following is typically involved in processing each request packet.
+When implementing the server side of the lightweight resolver protocol using the lwres library, a sequence of actions like the following is typically involved in processing each request packet.
.PP
-Note that the same \fBlwres_packet_t\fR is used
-in both the \fB_parse()\fR and \fB_render()\fR calls,
-with only a few modifications made
-to the packet header's contents between uses. This method is recommended
-as it keeps the serial, opcode, and other fields correct.
+Note that the same
+\fBlwres_packet_t\fR
+is used in both the
+\fB_parse()\fR
+and
+\fB_render()\fR
+calls, with only a few modifications made to the packet header's contents between uses. This method is recommended as it keeps the serial, opcode, and other fields correct.
.PP
-(1) When a packet is received, call \fBlwres_*request_parse()\fR to
-unmarshall it. This returns a \fBlwres_packet_t\fR (also called pkt, below)
-as well as a data specific type, such as \fBlwres_gabnrequest_t\fR.
+(1) When a packet is received, call
+\fBlwres_*request_parse()\fR
+to unmarshall it. This returns a
+\fBlwres_packet_t\fR
+(also called
+\fIpkt\fR, below) as well as a data specific type, such as
+\fBlwres_gabnrequest_t\fR.
.PP
(2) Process the request in the data specific type.
.PP
-(3) Set the \fBpkt.result\fR,
-\fBpkt.recvlength\fR as above. All other fields can
-be left untouched since they were filled in by the \fB*_parse()\fR call
-above. If using \fBlwres_*response_render()\fR,
-\fBpkt.pktflags\fR will be set up
-properly. Otherwise, the LWRES_LWPACKETFLAG_RESPONSE bit should be
-set.
+(3) Set the
+pkt.result,
+pkt.recvlength
+as above. All other fields can be left untouched since they were filled in by the
+\fB*_parse()\fR
+call above. If using
+\fBlwres_*response_render()\fR,
+pkt.pktflags
+will be set up properly. Otherwise, the
+\fBLWRES_LWPACKETFLAG_RESPONSE\fR
+bit should be set.
.PP
(4) Call the data specific rendering function, such as
\fBlwres_gabnresponse_render()\fR.
diff --git a/contrib/bind9/lib/lwres/man/lwres.docbook b/contrib/bind9/lib/lwres/man/lwres.docbook
index 511d82e..83258a9 100644
--- a/contrib/bind9/lib/lwres/man/lwres.docbook
+++ b/contrib/bind9/lib/lwres/man/lwres.docbook
@@ -1,7 +1,9 @@
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.0//EN"
+ "http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd"
+ [<!ENTITY mdash "&#8212;">]>
<!--
- - Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
- - Copyright (C) 2001 Internet Software Consortium.
+ - Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
+ - Copyright (C) 2000, 2001 Internet Software Consortium.
-
- Permission to use, copy, modify, and distribute this software for any
- purpose with or without fee is hereby granted, provided that the above
@@ -16,7 +18,7 @@
- PERFORMANCE OF THIS SOFTWARE.
-->
-<!-- $Id: lwres.docbook,v 1.3.206.1 2004/03/06 08:15:37 marka Exp $ -->
+<!-- $Id: lwres.docbook,v 1.3.206.3 2005/05/12 21:36:11 sra Exp $ -->
<refentry>
<refentryinfo>
@@ -28,6 +30,20 @@
<manvolnum>3</manvolnum>
<refmiscinfo>BIND9</refmiscinfo>
</refmeta>
+
+ <docinfo>
+ <copyright>
+ <year>2004</year>
+ <year>2005</year>
+ <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
+ </copyright>
+ <copyright>
+ <year>2000</year>
+ <year>2001</year>
+ <holder>Internet Software Consortium.</holder>
+ </copyright>
+ </docinfo>
+
<refnamediv>
<refname>lwres</refname>
<refpurpose>introduction to the lightweight resolver library</refpurpose>
diff --git a/contrib/bind9/lib/lwres/man/lwres.html b/contrib/bind9/lib/lwres/man/lwres.html
index 793ab72..1d5e57b 100644
--- a/contrib/bind9/lib/lwres/man/lwres.html
+++ b/contrib/bind9/lib/lwres/man/lwres.html
@@ -1,433 +1,216 @@
<!--
- - Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
- - Copyright (C) 2001 Internet Software Consortium.
- -
+ - Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
+ - Copyright (C) 2000, 2001 Internet Software Consortium.
+ -
- Permission to use, copy, modify, and distribute this software for any
- purpose with or without fee is hereby granted, provided that the above
- copyright notice and this permission notice appear in all copies.
- -
+ -
- THE SOFTWARE IS PROVIDED "AS IS" AND 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,
+ - 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.
-->
-
-<!-- $Id: lwres.html,v 1.4.2.1.4.2 2004/08/22 23:39:02 marka Exp $ -->
-
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<HTML
-><HEAD
-><TITLE
->lwres</TITLE
-><META
-NAME="GENERATOR"
-CONTENT="Modular DocBook HTML Stylesheet Version 1.7"></HEAD
-><BODY
-CLASS="REFENTRY"
-BGCOLOR="#FFFFFF"
-TEXT="#000000"
-LINK="#0000FF"
-VLINK="#840084"
-ALINK="#0000FF"
-><H1
-><A
-NAME="AEN1"
-></A
->lwres</H1
-><DIV
-CLASS="REFNAMEDIV"
-><A
-NAME="AEN8"
-></A
-><H2
->Name</H2
->lwres&nbsp;--&nbsp;introduction to the lightweight resolver library</DIV
-><DIV
-CLASS="REFSYNOPSISDIV"
-><A
-NAME="AEN11"
-></A
-><H2
->Synopsis</H2
-><DIV
-CLASS="FUNCSYNOPSIS"
-><P
-></P
-><A
-NAME="AEN12"
-></A
-><PRE
-CLASS="FUNCSYNOPSISINFO"
->#include &lt;lwres/lwres.h&gt;</PRE
-><P
-></P
-></DIV
-></DIV
-><DIV
-CLASS="REFSECT1"
-><A
-NAME="AEN14"
-></A
-><H2
->DESCRIPTION</H2
-><P
->The BIND 9 lightweight resolver library is a simple, name service
+<!-- $Id: lwres.html,v 1.4.2.1.4.9 2005/10/13 02:33:54 marka Exp $ -->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>lwres</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en">
+<a name="id2463721"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2>Name</h2>
+<p>lwres &#8212; introduction to the lightweight resolver library</p>
+</div>
+<div class="refsynopsisdiv">
+<h2>Synopsis</h2>
+<div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;lwres/lwres.h&gt;</pre></div>
+</div>
+<div class="refsect1" lang="en">
+<a name="id2525832"></a><h2>DESCRIPTION</h2>
+<p>
+The BIND 9 lightweight resolver library is a simple, name service
independent stub resolver library. It provides hostname-to-address
and address-to-hostname lookup services to applications by
transmitting lookup requests to a resolver daemon
-<B
-CLASS="COMMAND"
->lwresd</B
->
+<span><strong class="command">lwresd</strong></span>
running on the local host. The resover daemon performs the
lookup using the DNS or possibly other name service protocols,
and returns the results to the application through the library.
The library and resolver daemon communicate using a simple
-UDP-based protocol.</P
-></DIV
-><DIV
-CLASS="REFSECT1"
-><A
-NAME="AEN18"
-></A
-><H2
->OVERVIEW</H2
-><P
->The lwresd library implements multiple name service APIs.
+UDP-based protocol.
+</p>
+</div>
+<div class="refsect1" lang="en">
+<a name="id2525845"></a><h2>OVERVIEW</h2>
+<p>
+The lwresd library implements multiple name service APIs.
The standard
-<CODE
-CLASS="FUNCTION"
->gethostbyname()</CODE
->,
-<CODE
-CLASS="FUNCTION"
->gethostbyaddr()</CODE
->,
-<CODE
-CLASS="FUNCTION"
->gethostbyname_r()</CODE
->,
-<CODE
-CLASS="FUNCTION"
->gethostbyaddr_r()</CODE
->,
-<CODE
-CLASS="FUNCTION"
->getaddrinfo()</CODE
->,
-<CODE
-CLASS="FUNCTION"
->getipnodebyname()</CODE
->,
+<code class="function">gethostbyname()</code>,
+<code class="function">gethostbyaddr()</code>,
+<code class="function">gethostbyname_r()</code>,
+<code class="function">gethostbyaddr_r()</code>,
+<code class="function">getaddrinfo()</code>,
+<code class="function">getipnodebyname()</code>,
and
-<CODE
-CLASS="FUNCTION"
->getipnodebyaddr()</CODE
->
+<code class="function">getipnodebyaddr()</code>
functions are all supported. To allow the lwres library to coexist
with system libraries that define functions of the same name,
the library defines these functions with names prefixed by
-<VAR
-CLASS="LITERAL"
->lwres_</VAR
->.
+<code class="literal">lwres_</code>.
To define the standard names, applications must include the
header file
-<TT
-CLASS="FILENAME"
->&lt;lwres/netdb.h&gt;</TT
->
+<code class="filename">&lt;lwres/netdb.h&gt;</code>
which contains macro definitions mapping the standard function names
into
-<VAR
-CLASS="LITERAL"
->lwres_</VAR
->
+<code class="literal">lwres_</code>
prefixed ones. Operating system vendors who integrate the lwres
library into their base distributions should rename the functions
-in the library proper so that the renaming macros are not needed.</P
-><P
->The library also provides a native API consisting of the functions
-<CODE
-CLASS="FUNCTION"
->lwres_getaddrsbyname()</CODE
->
+in the library proper so that the renaming macros are not needed.
+</p>
+<p>
+The library also provides a native API consisting of the functions
+<code class="function">lwres_getaddrsbyname()</code>
and
-<CODE
-CLASS="FUNCTION"
->lwres_getnamebyaddr()</CODE
->.
+<code class="function">lwres_getnamebyaddr()</code>.
These may be called by applications that require more detailed
control over the lookup process than the standard functions
-provide.</P
-><P
->In addition to these name service independent address lookup
+provide.
+</p>
+<p>
+In addition to these name service independent address lookup
functions, the library implements a new, experimental API
for looking up arbitrary DNS resource records, using the
-<CODE
-CLASS="FUNCTION"
->lwres_getaddrsbyname()</CODE
->
-function.</P
-><P
->Finally, there is a low-level API for converting lookup
+<code class="function">lwres_getaddrsbyname()</code>
+function.
+</p>
+<p>
+Finally, there is a low-level API for converting lookup
requests and responses to and from raw lwres protocol packets.
This API can be used by clients requiring nonblocking operation,
and is also used when implementing the server side of the lwres
protocol, for example in the
-<B
-CLASS="COMMAND"
->lwresd</B
->
+<span><strong class="command">lwresd</strong></span>
resolver daemon. The use of this low-level API in clients
-and servers is outlined in the following sections.</P
-></DIV
-><DIV
-CLASS="REFSECT1"
-><A
-NAME="AEN38"
-></A
-><H2
->CLIENT-SIDE LOW-LEVEL API CALL FLOW</H2
-><P
->When a client program wishes to make an lwres request using the
+and servers is outlined in the following sections.
+</p>
+</div>
+<div class="refsect1" lang="en">
+<a name="id2525909"></a><h2>CLIENT-SIDE LOW-LEVEL API CALL FLOW</h2>
+<p>
+When a client program wishes to make an lwres request using the
native low-level API, it typically performs the following
-sequence of actions.</P
-><P
->(1) Allocate or use an existing <SPAN
-CLASS="TYPE"
->lwres_packet_t</SPAN
->,
-called <VAR
-CLASS="VARNAME"
->pkt</VAR
-> below.</P
-><P
->(2) Set <CODE
-CLASS="STRUCTFIELD"
->pkt.recvlength</CODE
-> to the maximum length we will accept.
+sequence of actions.
+</p>
+<p>
+(1) Allocate or use an existing <span class="type">lwres_packet_t</span>,
+called <code class="varname">pkt</code> below.
+</p>
+<p>
+(2) Set <em class="structfield"><code>pkt.recvlength</code></em> to the maximum length we will accept.
This is done so the receiver of our packets knows how large our receive
buffer is. The "default" is a constant in
-<TT
-CLASS="FILENAME"
->lwres.h</TT
->: <CODE
-CLASS="CONSTANT"
->LWRES_RECVLENGTH = 4096</CODE
->.</P
-><P
->(3) Set <CODE
-CLASS="STRUCTFIELD"
->pkt.serial</CODE
->
+<code class="filename">lwres.h</code>: <code class="constant">LWRES_RECVLENGTH = 4096</code>.
+</p>
+<p>
+(3) Set <em class="structfield"><code>pkt.serial</code></em>
to a unique serial number. This value is echoed
-back to the application by the remote server.</P
-><P
->(4) Set <CODE
-CLASS="STRUCTFIELD"
->pkt.pktflags</CODE
->. Usually this is set to 0.</P
-><P
->(5) Set <CODE
-CLASS="STRUCTFIELD"
->pkt.result</CODE
-> to 0.</P
-><P
->(6) Call <CODE
-CLASS="FUNCTION"
->lwres_*request_render()</CODE
->,
+back to the application by the remote server.
+</p>
+<p>
+(4) Set <em class="structfield"><code>pkt.pktflags</code></em>. Usually this is set to 0.
+</p>
+<p>
+(5) Set <em class="structfield"><code>pkt.result</code></em> to 0.
+</p>
+<p>
+(6) Call <code class="function">lwres_*request_render()</code>,
or marshall in the data using the primitives
-such as <CODE
-CLASS="FUNCTION"
->lwres_packet_render()</CODE
->
-and storing the packet data.</P
-><P
->(7) Transmit the resulting buffer.</P
-><P
->(8) Call <CODE
-CLASS="FUNCTION"
->lwres_*response_parse()</CODE
->
-to parse any packets received.</P
-><P
->(9) Verify that the opcode and serial match a request, and process the
-packet specific information contained in the body.</P
-></DIV
-><DIV
-CLASS="REFSECT1"
-><A
-NAME="AEN61"
-></A
-><H2
->SERVER-SIDE LOW-LEVEL API CALL FLOW</H2
-><P
->When implementing the server side of the lightweight resolver
+such as <code class="function">lwres_packet_render()</code>
+and storing the packet data.
+</p>
+<p>
+(7) Transmit the resulting buffer.
+</p>
+<p>
+(8) Call <code class="function">lwres_*response_parse()</code>
+to parse any packets received.
+</p>
+<p>
+(9) Verify that the opcode and serial match a request, and process the
+packet specific information contained in the body.
+</p>
+</div>
+<div class="refsect1" lang="en">
+<a name="id2526056"></a><h2>SERVER-SIDE LOW-LEVEL API CALL FLOW</h2>
+<p>
+When implementing the server side of the lightweight resolver
protocol using the lwres library, a sequence of actions like the
-following is typically involved in processing each request packet.</P
-><P
->Note that the same <SPAN
-CLASS="TYPE"
->lwres_packet_t</SPAN
-> is used
-in both the <CODE
-CLASS="FUNCTION"
->_parse()</CODE
-> and <CODE
-CLASS="FUNCTION"
->_render()</CODE
-> calls,
+following is typically involved in processing each request packet.
+</p>
+<p>
+Note that the same <span class="type">lwres_packet_t</span> is used
+in both the <code class="function">_parse()</code> and <code class="function">_render()</code> calls,
with only a few modifications made
to the packet header's contents between uses. This method is recommended
-as it keeps the serial, opcode, and other fields correct.</P
-><P
->(1) When a packet is received, call <CODE
-CLASS="FUNCTION"
->lwres_*request_parse()</CODE
-> to
-unmarshall it. This returns a <SPAN
-CLASS="TYPE"
->lwres_packet_t</SPAN
-> (also called <VAR
-CLASS="VARNAME"
->pkt</VAR
->, below)
-as well as a data specific type, such as <SPAN
-CLASS="TYPE"
->lwres_gabnrequest_t</SPAN
->.</P
-><P
->(2) Process the request in the data specific type.</P
-><P
->(3) Set the <CODE
-CLASS="STRUCTFIELD"
->pkt.result</CODE
->,
-<CODE
-CLASS="STRUCTFIELD"
->pkt.recvlength</CODE
-> as above. All other fields can
-be left untouched since they were filled in by the <CODE
-CLASS="FUNCTION"
->*_parse()</CODE
-> call
-above. If using <CODE
-CLASS="FUNCTION"
->lwres_*response_render()</CODE
->,
-<CODE
-CLASS="STRUCTFIELD"
->pkt.pktflags</CODE
-> will be set up
-properly. Otherwise, the <CODE
-CLASS="CONSTANT"
->LWRES_LWPACKETFLAG_RESPONSE</CODE
-> bit should be
-set.</P
-><P
->(4) Call the data specific rendering function, such as
-<CODE
-CLASS="FUNCTION"
->lwres_gabnresponse_render()</CODE
->.</P
-><P
->(5) Send the resulting packet to the client.</P
-><P
-></P
-></DIV
-><DIV
-CLASS="REFSECT1"
-><A
-NAME="AEN85"
-></A
-><H2
->SEE ALSO</H2
-><P
-><SPAN
-CLASS="CITEREFENTRY"
-><SPAN
-CLASS="REFENTRYTITLE"
->lwres_gethostent</SPAN
->(3)</SPAN
->,
+as it keeps the serial, opcode, and other fields correct.
+</p>
+<p>
+(1) When a packet is received, call <code class="function">lwres_*request_parse()</code> to
+unmarshall it. This returns a <span class="type">lwres_packet_t</span> (also called <code class="varname">pkt</code>, below)
+as well as a data specific type, such as <span class="type">lwres_gabnrequest_t</span>.
+</p>
+<p>
+(2) Process the request in the data specific type.
+</p>
+<p>
+(3) Set the <em class="structfield"><code>pkt.result</code></em>,
+<em class="structfield"><code>pkt.recvlength</code></em> as above. All other fields can
+be left untouched since they were filled in by the <code class="function">*_parse()</code> call
+above. If using <code class="function">lwres_*response_render()</code>,
+<em class="structfield"><code>pkt.pktflags</code></em> will be set up
+properly. Otherwise, the <code class="constant">LWRES_LWPACKETFLAG_RESPONSE</code> bit should be
+set.
+</p>
+<p>
+(4) Call the data specific rendering function, such as
+<code class="function">lwres_gabnresponse_render()</code>.
+</p>
+<p>
+(5) Send the resulting packet to the client.
+</p>
+<p>
+</p>
+</div>
+<div class="refsect1" lang="en">
+<a name="id2526141"></a><h2>SEE ALSO</h2>
+<p>
+<span class="citerefentry"><span class="refentrytitle">lwres_gethostent</span>(3)</span>,
+
+<span class="citerefentry"><span class="refentrytitle">lwres_getipnode</span>(3)</span>,
-<SPAN
-CLASS="CITEREFENTRY"
-><SPAN
-CLASS="REFENTRYTITLE"
->lwres_getipnode</SPAN
->(3)</SPAN
->,
+<span class="citerefentry"><span class="refentrytitle">lwres_getnameinfo</span>(3)</span>,
-<SPAN
-CLASS="CITEREFENTRY"
-><SPAN
-CLASS="REFENTRYTITLE"
->lwres_getnameinfo</SPAN
->(3)</SPAN
->,
+<span class="citerefentry"><span class="refentrytitle">lwres_noop</span>(3)</span>,
-<SPAN
-CLASS="CITEREFENTRY"
-><SPAN
-CLASS="REFENTRYTITLE"
->lwres_noop</SPAN
->(3)</SPAN
->,
+<span class="citerefentry"><span class="refentrytitle">lwres_gabn</span>(3)</span>,
-<SPAN
-CLASS="CITEREFENTRY"
-><SPAN
-CLASS="REFENTRYTITLE"
->lwres_gabn</SPAN
->(3)</SPAN
->,
+<span class="citerefentry"><span class="refentrytitle">lwres_gnba</span>(3)</span>,
-<SPAN
-CLASS="CITEREFENTRY"
-><SPAN
-CLASS="REFENTRYTITLE"
->lwres_gnba</SPAN
->(3)</SPAN
->,
+<span class="citerefentry"><span class="refentrytitle">lwres_context</span>(3)</span>,
-<SPAN
-CLASS="CITEREFENTRY"
-><SPAN
-CLASS="REFENTRYTITLE"
->lwres_context</SPAN
->(3)</SPAN
->,
+<span class="citerefentry"><span class="refentrytitle">lwres_config</span>(3)</span>,
-<SPAN
-CLASS="CITEREFENTRY"
-><SPAN
-CLASS="REFENTRYTITLE"
->lwres_config</SPAN
->(3)</SPAN
->,
+<span class="citerefentry"><span class="refentrytitle">resolver</span>(5)</span>,
-<SPAN
-CLASS="CITEREFENTRY"
-><SPAN
-CLASS="REFENTRYTITLE"
->resolver</SPAN
->(5)</SPAN
->,
+<span class="citerefentry"><span class="refentrytitle">lwresd</span>(8)</span>.
-<SPAN
-CLASS="CITEREFENTRY"
-><SPAN
-CLASS="REFENTRYTITLE"
->lwresd</SPAN
->(8)</SPAN
->.&#13;</P
-></DIV
-></BODY
-></HTML
->
+</p>
+</div>
+</div></body>
+</html>
diff --git a/contrib/bind9/lib/lwres/man/lwres_buffer.3 b/contrib/bind9/lib/lwres/man/lwres_buffer.3
index 232742a..93e888b 100644
--- a/contrib/bind9/lib/lwres/man/lwres_buffer.3
+++ b/contrib/bind9/lib/lwres/man/lwres_buffer.3
@@ -1,174 +1,117 @@
-.\" Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
-.\" Copyright (C) 2000, 2001 Internet Software Consortium.
-.\"
+.\" Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
+.\" Copyright (C) 2000, 2001 Internet Software Consortium.
+.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
-.\"
+.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND 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,
+.\" 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.
.\"
-.\" $Id: lwres_buffer.3,v 1.12.2.1.8.1 2004/03/06 07:41:42 marka Exp $
+.\" $Id: lwres_buffer.3,v 1.12.2.1.8.5 2005/10/13 02:33:58 marka Exp $
.\"
-.TH "LWRES_BUFFER" "3" "Jun 30, 2000" "BIND9" ""
-.SH NAME
+.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.
+.TH "LWRES_BUFFER" "3" "Jun 30, 2000" "BIND9" "BIND9"
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.SH "NAME"
lwres_buffer_init, lwres_buffer_invalidate, lwres_buffer_add, lwres_buffer_subtract, lwres_buffer_clear, lwres_buffer_first, lwres_buffer_forward, lwres_buffer_back, lwres_buffer_getuint8, lwres_buffer_putuint8, lwres_buffer_getuint16, lwres_buffer_putuint16, lwres_buffer_getuint32, lwres_buffer_putuint32, lwres_buffer_putmem, lwres_buffer_getmem \- lightweight resolver buffer management
-.SH SYNOPSIS
-\fB#include <lwres/lwbuffer.h>
-.sp
-.na
-void
-lwres_buffer_init(lwres_buffer_t *b, void *base, unsigned int length);
-.ad
-.sp
-.na
-void
-lwres_buffer_invalidate(lwres_buffer_t *b);
-.ad
-.sp
-.na
-void
-lwres_buffer_add(lwres_buffer_t *b, unsigned int n);
-.ad
-.sp
-.na
-void
-lwres_buffer_subtract(lwres_buffer_t *b, unsigned int n);
-.ad
-.sp
-.na
-void
-lwres_buffer_clear(lwres_buffer_t *b);
-.ad
-.sp
-.na
-void
-lwres_buffer_first(lwres_buffer_t *b);
-.ad
-.sp
-.na
-void
-lwres_buffer_forward(lwres_buffer_t *b, unsigned int n);
-.ad
-.sp
-.na
-void
-lwres_buffer_back(lwres_buffer_t *b, unsigned int n);
-.ad
-.sp
-.na
-lwres_uint8_t
-lwres_buffer_getuint8(lwres_buffer_t *b);
-.ad
-.sp
-.na
-void
-lwres_buffer_putuint8(lwres_buffer_t *b, lwres_uint8_t val);
-.ad
-.sp
-.na
-lwres_uint16_t
-lwres_buffer_getuint16(lwres_buffer_t *b);
-.ad
-.sp
-.na
-void
-lwres_buffer_putuint16(lwres_buffer_t *b, lwres_uint16_t val);
-.ad
-.sp
-.na
-lwres_uint32_t
-lwres_buffer_getuint32(lwres_buffer_t *b);
-.ad
-.sp
-.na
-void
-lwres_buffer_putuint32(lwres_buffer_t *b, lwres_uint32_t val);
-.ad
-.sp
-.na
-void
-lwres_buffer_putmem(lwres_buffer_t *b, const unsigned char *base, unsigned int length);
-.ad
-.sp
-.na
-void
-lwres_buffer_getmem(lwres_buffer_t *b, unsigned char *base, unsigned int length);
-.ad
-\fR
+.SH "SYNOPSIS"
+.nf
+#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
+.HP 29
+\fBvoid\ \fBlwres_buffer_invalidate\fR\fR\fB(\fR\fBlwres_buffer_t\ *b\fR\fB);\fR
+.HP 22
+\fBvoid\ \fBlwres_buffer_add\fR\fR\fB(\fR\fBlwres_buffer_t\ *b\fR\fB, \fR\fBunsigned\ int\ n\fR\fB);\fR
+.HP 27
+\fBvoid\ \fBlwres_buffer_subtract\fR\fR\fB(\fR\fBlwres_buffer_t\ *b\fR\fB, \fR\fBunsigned\ int\ n\fR\fB);\fR
+.HP 24
+\fBvoid\ \fBlwres_buffer_clear\fR\fR\fB(\fR\fBlwres_buffer_t\ *b\fR\fB);\fR
+.HP 24
+\fBvoid\ \fBlwres_buffer_first\fR\fR\fB(\fR\fBlwres_buffer_t\ *b\fR\fB);\fR
+.HP 26
+\fBvoid\ \fBlwres_buffer_forward\fR\fR\fB(\fR\fBlwres_buffer_t\ *b\fR\fB, \fR\fBunsigned\ int\ n\fR\fB);\fR
+.HP 23
+\fBvoid\ \fBlwres_buffer_back\fR\fR\fB(\fR\fBlwres_buffer_t\ *b\fR\fB, \fR\fBunsigned\ int\ n\fR\fB);\fR
+.HP 36
+\fBlwres_uint8_t\ \fBlwres_buffer_getuint8\fR\fR\fB(\fR\fBlwres_buffer_t\ *b\fR\fB);\fR
+.HP 27
+\fBvoid\ \fBlwres_buffer_putuint8\fR\fR\fB(\fR\fBlwres_buffer_t\ *b\fR\fB, \fR\fBlwres_uint8_t\ val\fR\fB);\fR
+.HP 38
+\fBlwres_uint16_t\ \fBlwres_buffer_getuint16\fR\fR\fB(\fR\fBlwres_buffer_t\ *b\fR\fB);\fR
+.HP 28
+\fBvoid\ \fBlwres_buffer_putuint16\fR\fR\fB(\fR\fBlwres_buffer_t\ *b\fR\fB, \fR\fBlwres_uint16_t\ val\fR\fB);\fR
+.HP 38
+\fBlwres_uint32_t\ \fBlwres_buffer_getuint32\fR\fR\fB(\fR\fBlwres_buffer_t\ *b\fR\fB);\fR
+.HP 28
+\fBvoid\ \fBlwres_buffer_putuint32\fR\fR\fB(\fR\fBlwres_buffer_t\ *b\fR\fB, \fR\fBlwres_uint32_t\ val\fR\fB);\fR
+.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
+.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
.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
+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
isc_buffer_
functions in the ISC library.
.PP
-A buffer is a region of memory, together with a set of related
-subregions.
-The \fBused region\fR and the
-\fBavailable\fR region are disjoint, and
-their union is the buffer's region.
-The used region extends from the beginning of the buffer region to the
-last used byte.
-The available region extends from one byte greater than the last used
-byte to the end of the buffer's region.
-The size of the used region can be changed using various
-buffer commands.
-Initially, the used region is empty.
+A buffer is a region of memory, together with a set of related subregions. The
+\fIused region\fR
+and the
+\fIavailable\fR
+region are disjoint, and their union is the buffer's region. The used region extends from the beginning of the buffer region to the last used byte. The available region extends from one byte greater than the last used byte to the end of the buffer's region. The size of the used region can be changed using various buffer commands. Initially, the used region is empty.
.PP
The used region is further subdivided into two disjoint regions: the
-\fBconsumed region\fR and the \fBremaining region\fR.
-The union of these two regions is the used region.
-The consumed region extends from the beginning of the used region to
-the byte before the \fBcurrent\fR offset (if any).
-The \fBremaining\fR region the current pointer to the end of the used
-region.
-The size of the consumed region can be changed using various
-buffer commands.
-Initially, the consumed region is empty.
+\fIconsumed region\fR
+and the
+\fIremaining region\fR. The union of these two regions is the used region. The consumed region extends from the beginning of the used region to the byte before the
+\fIcurrent\fR
+offset (if any). The
+\fIremaining\fR
+region the current pointer to the end of the used region. The size of the consumed region can be changed using various buffer commands. Initially, the consumed region is empty.
.PP
-The \fBactive 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.
+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
.nf
-
- /------------entire length---------------\\\\
- /----- used region -----\\\\/-- available --\\\\
- +----------------------------------------+
+ /\-\-\-\-\-\-\-\-\-\-\-\-entire length\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\\\\
+ /\-\-\-\-\- used region \-\-\-\-\-\\\\/\-\- available \-\-\\\\
+ +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
| consumed | remaining | |
- +----------------------------------------+
+ +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
a b c d e
-
a == base of buffer.
b == current pointer. Can be anywhere between a and d.
c == active pointer. Meaningful between b and d.
d == used pointer.
e == length of buffer.
-
- a-e == entire length of buffer.
- a-d == used region.
- a-b == consumed region.
- b-d == remaining region.
- b-c == optional active region.
-.sp
+ a\-e == entire length of buffer.
+ a\-d == used region.
+ a\-b == consumed region.
+ b\-d == remaining region.
+ b\-c == optional active region.
.fi
+.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
@@ -177,15 +120,13 @@ bytes starting at location
\fBlwres_buffer_invalidate()\fR
marks the buffer
\fI*b\fR
-as invalid. Invalidating a buffer after use is not required,
-but makes it possible to catch its possible accidental use.
+as invalid. Invalidating a buffer after use is not required, but makes it possible to catch its possible accidental use.
.PP
The functions
\fBlwres_buffer_add()\fR
and
\fBlwres_buffer_subtract()\fR
-respectively increase and decrease the used space in
-buffer
+respectively increase and decrease the used space in buffer
\fI*b\fR
by
\fIn\fR
@@ -193,25 +134,23 @@ bytes.
\fBlwres_buffer_add()\fR
checks for buffer overflow and
\fBlwres_buffer_subtract()\fR
-checks for underflow.
-These functions do not allocate or deallocate memory.
-They just change the value of
-\fBused\fR.
+checks for underflow. These functions do not allocate or deallocate memory. They just change the value of
+used.
.PP
-A buffer is re-initialised by
-\fBlwres_buffer_clear()\fR.
-The function sets
-\fBused\fR ,
-\fBcurrent\fR
+A buffer is re\-initialised by
+\fBlwres_buffer_clear()\fR. The function sets
+used
+,
+current
and
-\fBactive\fR
+active
to zero.
.PP
\fBlwres_buffer_first\fR
makes the consumed region of buffer
\fI*p\fR
empty by setting
-\fBcurrent\fR
+current
to zero (the start of the buffer).
.PP
\fBlwres_buffer_forward()\fR
@@ -219,21 +158,19 @@ increases the consumed region of buffer
\fI*b\fR
by
\fIn\fR
-bytes, checking for overflow.
-Similarly,
+bytes, checking for overflow. Similarly,
\fBlwres_buffer_back()\fR
decreases buffer
-\fIb\fR's
-consumed region by
+\fIb\fR's consumed region by
\fIn\fR
bytes and checks for underflow.
.PP
\fBlwres_buffer_getuint8()\fR
-reads an unsigned 8-bit integer from
+reads an unsigned 8\-bit integer from
\fI*b\fR
and returns it.
\fBlwres_buffer_putuint8()\fR
-writes the unsigned 8-bit integer
+writes the unsigned 8\-bit integer
\fIval\fR
to buffer
\fI*b\fR.
@@ -243,21 +180,17 @@ and
\fBlwres_buffer_getuint32()\fR
are identical to
\fBlwres_buffer_putuint8()\fR
-except that they respectively read an unsigned 16-bit or 32-bit integer
-in network byte order from
-\fIb\fR.
-Similarly,
+except that they respectively read an unsigned 16\-bit or 32\-bit integer in network byte order from
+\fIb\fR. Similarly,
\fBlwres_buffer_putuint16()\fR
and
\fBlwres_buffer_putuint32()\fR
-writes the unsigned 16-bit or 32-bit integer
+writes the unsigned 16\-bit or 32\-bit integer
\fIval\fR
to buffer
-\fIb\fR,
-in network byte order.
+\fIb\fR, in network byte order.
.PP
-Arbitrary amounts of data are read or written from a lightweight
-resolver buffer with
+Arbitrary amounts of data are read or written from a lightweight resolver buffer with
\fBlwres_buffer_getmem()\fR
and
\fBlwres_buffer_putmem()\fR
@@ -268,8 +201,7 @@ copies
bytes of memory at
\fIbase\fR
to
-\fIb\fR.
-Conversely,
+\fIb\fR. Conversely,
\fBlwres_buffer_getmem()\fR
copies
\fIlength\fR
diff --git a/contrib/bind9/lib/lwres/man/lwres_buffer.docbook b/contrib/bind9/lib/lwres/man/lwres_buffer.docbook
index 4db9fd3..c70aee5 100644
--- a/contrib/bind9/lib/lwres/man/lwres_buffer.docbook
+++ b/contrib/bind9/lib/lwres/man/lwres_buffer.docbook
@@ -1,7 +1,9 @@
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.0//EN"
+ "http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd"
+ [<!ENTITY mdash "&#8212;">]>
<!--
- - Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
- - Copyright (C) 2001 Internet Software Consortium.
+ - Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
+ - Copyright (C) 2000, 2001 Internet Software Consortium.
-
- Permission to use, copy, modify, and distribute this software for any
- purpose with or without fee is hereby granted, provided that the above
@@ -16,7 +18,7 @@
- PERFORMANCE OF THIS SOFTWARE.
-->
-<!-- $Id: lwres_buffer.docbook,v 1.3.206.1 2004/03/06 08:15:37 marka Exp $ -->
+<!-- $Id: lwres_buffer.docbook,v 1.3.206.3 2005/05/12 21:36:11 sra Exp $ -->
<refentry>
<refentryinfo>
@@ -29,6 +31,19 @@
<refmiscinfo>BIND9</refmiscinfo>
</refmeta>
+ <docinfo>
+ <copyright>
+ <year>2004</year>
+ <year>2005</year>
+ <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
+ </copyright>
+ <copyright>
+ <year>2000</year>
+ <year>2001</year>
+ <holder>Internet Software Consortium.</holder>
+ </copyright>
+ </docinfo>
+
<refnamediv>
<refname>lwres_buffer_init</refname>
<refname>lwres_buffer_invalidate</refname>
diff --git a/contrib/bind9/lib/lwres/man/lwres_buffer.html b/contrib/bind9/lib/lwres/man/lwres_buffer.html
index 79354fc..5a203f1 100644
--- a/contrib/bind9/lib/lwres/man/lwres_buffer.html
+++ b/contrib/bind9/lib/lwres/man/lwres_buffer.html
@@ -1,232 +1,267 @@
<!--
- - Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
- - Copyright (C) 2001 Internet Software Consortium.
- -
+ - Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
+ - Copyright (C) 2000, 2001 Internet Software Consortium.
+ -
- Permission to use, copy, modify, and distribute this software for any
- purpose with or without fee is hereby granted, provided that the above
- copyright notice and this permission notice appear in all copies.
- -
+ -
- THE SOFTWARE IS PROVIDED "AS IS" AND 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,
+ - 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.
-->
-
-<!-- $Id: lwres_buffer.html,v 1.4.2.1.4.2 2004/08/22 23:39:03 marka Exp $ -->
-
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<HTML
-><HEAD
-><TITLE
->lwres_buffer</TITLE
-><META
-NAME="GENERATOR"
-CONTENT="Modular DocBook HTML Stylesheet Version 1.7"></HEAD
-><BODY
-CLASS="REFENTRY"
-BGCOLOR="#FFFFFF"
-TEXT="#000000"
-LINK="#0000FF"
-VLINK="#840084"
-ALINK="#0000FF"
-><H1
-><A
-NAME="AEN1"
-></A
->lwres_buffer</H1
-><DIV
-CLASS="REFNAMEDIV"
-><A
-NAME="AEN8"
-></A
-><H2
->Name</H2
->lwres_buffer_init, lwres_buffer_invalidate, lwres_buffer_add, lwres_buffer_subtract, lwres_buffer_clear, lwres_buffer_first, lwres_buffer_forward, lwres_buffer_back, lwres_buffer_getuint8, lwres_buffer_putuint8, lwres_buffer_getuint16, lwres_buffer_putuint16, lwres_buffer_getuint32, lwres_buffer_putuint32, lwres_buffer_putmem, lwres_buffer_getmem&nbsp;--&nbsp;lightweight resolver buffer management</DIV
-><DIV
-CLASS="REFSYNOPSISDIV"
-><A
-NAME="AEN26"
-></A
-><H2
->Synopsis</H2
-><DIV
-CLASS="FUNCSYNOPSIS"
-><P
-></P
-><A
-NAME="AEN27"
-></A
-><PRE
-CLASS="FUNCSYNOPSISINFO"
->#include &lt;lwres/lwbuffer.h&gt;</PRE
-><P
-><CODE
-><CODE
-CLASS="FUNCDEF"
->void
-lwres_buffer_init</CODE
->(lwres_buffer_t *b, void *base, unsigned int length);</CODE
-></P
-><P
-><CODE
-><CODE
-CLASS="FUNCDEF"
->void
-lwres_buffer_invalidate</CODE
->(lwres_buffer_t *b);</CODE
-></P
-><P
-><CODE
-><CODE
-CLASS="FUNCDEF"
->void
-lwres_buffer_add</CODE
->(lwres_buffer_t *b, unsigned int n);</CODE
-></P
-><P
-><CODE
-><CODE
-CLASS="FUNCDEF"
->void
-lwres_buffer_subtract</CODE
->(lwres_buffer_t *b, unsigned int n);</CODE
-></P
-><P
-><CODE
-><CODE
-CLASS="FUNCDEF"
->void
-lwres_buffer_clear</CODE
->(lwres_buffer_t *b);</CODE
-></P
-><P
-><CODE
-><CODE
-CLASS="FUNCDEF"
->void
-lwres_buffer_first</CODE
->(lwres_buffer_t *b);</CODE
-></P
-><P
-><CODE
-><CODE
-CLASS="FUNCDEF"
->void
-lwres_buffer_forward</CODE
->(lwres_buffer_t *b, unsigned int n);</CODE
-></P
-><P
-><CODE
-><CODE
-CLASS="FUNCDEF"
->void
-lwres_buffer_back</CODE
->(lwres_buffer_t *b, unsigned int n);</CODE
-></P
-><P
-><CODE
-><CODE
-CLASS="FUNCDEF"
->lwres_uint8_t
-lwres_buffer_getuint8</CODE
->(lwres_buffer_t *b);</CODE
-></P
-><P
-><CODE
-><CODE
-CLASS="FUNCDEF"
->void
-lwres_buffer_putuint8</CODE
->(lwres_buffer_t *b, lwres_uint8_t val);</CODE
-></P
-><P
-><CODE
-><CODE
-CLASS="FUNCDEF"
->lwres_uint16_t
-lwres_buffer_getuint16</CODE
->(lwres_buffer_t *b);</CODE
-></P
-><P
-><CODE
-><CODE
-CLASS="FUNCDEF"
->void
-lwres_buffer_putuint16</CODE
->(lwres_buffer_t *b, lwres_uint16_t val);</CODE
-></P
-><P
-><CODE
-><CODE
-CLASS="FUNCDEF"
->lwres_uint32_t
-lwres_buffer_getuint32</CODE
->(lwres_buffer_t *b);</CODE
-></P
-><P
-><CODE
-><CODE
-CLASS="FUNCDEF"
->void
-lwres_buffer_putuint32</CODE
->(lwres_buffer_t *b, lwres_uint32_t val);</CODE
-></P
-><P
-><CODE
-><CODE
-CLASS="FUNCDEF"
->void
-lwres_buffer_putmem</CODE
->(lwres_buffer_t *b, const unsigned char *base, unsigned int length);</CODE
-></P
-><P
-><CODE
-><CODE
-CLASS="FUNCDEF"
->void
-lwres_buffer_getmem</CODE
->(lwres_buffer_t *b, unsigned char *base, unsigned int length);</CODE
-></P
-><P
-></P
-></DIV
-></DIV
-><DIV
-CLASS="REFSECT1"
-><A
-NAME="AEN106"
-></A
-><H2
->DESCRIPTION</H2
-><P
->These functions provide bounds checked access to a region of memory
+<!-- $Id: lwres_buffer.html,v 1.4.2.1.4.8 2005/10/13 02:33:55 marka Exp $ -->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>lwres_buffer</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en">
+<a name="id2463721"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2>Name</h2>
+<p>lwres_buffer_init, lwres_buffer_invalidate, lwres_buffer_add, lwres_buffer_subtract, lwres_buffer_clear, lwres_buffer_first, lwres_buffer_forward, lwres_buffer_back, lwres_buffer_getuint8, lwres_buffer_putuint8, lwres_buffer_getuint16, lwres_buffer_putuint16, lwres_buffer_getuint32, lwres_buffer_putuint32, lwres_buffer_putmem, lwres_buffer_getmem &#8212; lightweight resolver buffer management</p>
+</div>
+<div class="refsynopsisdiv">
+<h2>Synopsis</h2>
+<div class="funcsynopsis">
+<pre class="funcsynopsisinfo">
+#include &lt;lwres/lwbuffer.h&gt;
+</pre>
+<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em">
+<tr>
+<td><code class="funcdef">
+void
+<b class="fsfunc">lwres_buffer_init</b>(</code></td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>
+<code>)</code>;</td>
+</tr>
+</table>
+<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em"><tr>
+<td><code class="funcdef">
+void
+<b class="fsfunc">lwres_buffer_invalidate</b>(</code></td>
+<td> </td>
+<td>
+<code>)</code>;</td>
+</tr></table>
+<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em">
+<tr>
+<td><code class="funcdef">
+void
+<b class="fsfunc">lwres_buffer_add</b>(</code></td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>
+<code>)</code>;</td>
+</tr>
+</table>
+<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em">
+<tr>
+<td><code class="funcdef">
+void
+<b class="fsfunc">lwres_buffer_subtract</b>(</code></td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>
+<code>)</code>;</td>
+</tr>
+</table>
+<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em"><tr>
+<td><code class="funcdef">
+void
+<b class="fsfunc">lwres_buffer_clear</b>(</code></td>
+<td> </td>
+<td>
+<code>)</code>;</td>
+</tr></table>
+<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em"><tr>
+<td><code class="funcdef">
+void
+<b class="fsfunc">lwres_buffer_first</b>(</code></td>
+<td> </td>
+<td>
+<code>)</code>;</td>
+</tr></table>
+<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em">
+<tr>
+<td><code class="funcdef">
+void
+<b class="fsfunc">lwres_buffer_forward</b>(</code></td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>
+<code>)</code>;</td>
+</tr>
+</table>
+<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em">
+<tr>
+<td><code class="funcdef">
+void
+<b class="fsfunc">lwres_buffer_back</b>(</code></td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>
+<code>)</code>;</td>
+</tr>
+</table>
+<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em"><tr>
+<td><code class="funcdef">
+lwres_uint8_t
+<b class="fsfunc">lwres_buffer_getuint8</b>(</code></td>
+<td> </td>
+<td>
+<code>)</code>;</td>
+</tr></table>
+<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em">
+<tr>
+<td><code class="funcdef">
+void
+<b class="fsfunc">lwres_buffer_putuint8</b>(</code></td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>
+<code>)</code>;</td>
+</tr>
+</table>
+<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em"><tr>
+<td><code class="funcdef">
+lwres_uint16_t
+<b class="fsfunc">lwres_buffer_getuint16</b>(</code></td>
+<td> </td>
+<td>
+<code>)</code>;</td>
+</tr></table>
+<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em">
+<tr>
+<td><code class="funcdef">
+void
+<b class="fsfunc">lwres_buffer_putuint16</b>(</code></td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>
+<code>)</code>;</td>
+</tr>
+</table>
+<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em"><tr>
+<td><code class="funcdef">
+lwres_uint32_t
+<b class="fsfunc">lwres_buffer_getuint32</b>(</code></td>
+<td> </td>
+<td>
+<code>)</code>;</td>
+</tr></table>
+<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em">
+<tr>
+<td><code class="funcdef">
+void
+<b class="fsfunc">lwres_buffer_putuint32</b>(</code></td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>
+<code>)</code>;</td>
+</tr>
+</table>
+<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em">
+<tr>
+<td><code class="funcdef">
+void
+<b class="fsfunc">lwres_buffer_putmem</b>(</code></td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>
+<code>)</code>;</td>
+</tr>
+</table>
+<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0">
+<tr>
+<td><code class="funcdef">
+void
+<b class="fsfunc">lwres_buffer_getmem</b>(</code></td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>
+<code>)</code>;</td>
+</tr>
+</table>
+</div>
+</div>
+<div class="refsect1" lang="en">
+<a name="id2526109"></a><h2>DESCRIPTION</h2>
+<p>
+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
-<VAR
-CLASS="LITERAL"
->isc_buffer_</VAR
->
-functions in the ISC library.</P
-><P
->A buffer is a region of memory, together with a set of related
+<code class="literal">isc_buffer_</code>
+functions in the ISC library.
+</p>
+<p>
+A buffer is a region of memory, together with a set of related
subregions.
-The <SPAN
-CLASS="emphasis"
-><I
-CLASS="EMPHASIS"
->used region</I
-></SPAN
-> and the
-<SPAN
-CLASS="emphasis"
-><I
-CLASS="EMPHASIS"
->available</I
-></SPAN
-> region are disjoint, and
+The <span class="emphasis"><em>used region</em></span> and the
+<span class="emphasis"><em>available</em></span> region are disjoint, and
their union is the buffer's region.
The used region extends from the beginning of the buffer region to the
last used byte.
@@ -234,60 +269,33 @@ The available region extends from one byte greater than the last used
byte to the end of the buffer's region.
The size of the used region can be changed using various
buffer commands.
-Initially, the used region is empty.</P
-><P
->The used region is further subdivided into two disjoint regions: the
-<SPAN
-CLASS="emphasis"
-><I
-CLASS="EMPHASIS"
->consumed region</I
-></SPAN
-> and the <SPAN
-CLASS="emphasis"
-><I
-CLASS="EMPHASIS"
->remaining region</I
-></SPAN
->.
+Initially, the used region is empty.
+</p>
+<p>
+The used region is further subdivided into two disjoint regions: the
+<span class="emphasis"><em>consumed region</em></span> and the <span class="emphasis"><em>remaining region</em></span>.
The union of these two regions is the used region.
The consumed region extends from the beginning of the used region to
-the byte before the <SPAN
-CLASS="emphasis"
-><I
-CLASS="EMPHASIS"
->current</I
-></SPAN
-> offset (if any).
-The <SPAN
-CLASS="emphasis"
-><I
-CLASS="EMPHASIS"
->remaining</I
-></SPAN
-> region the current pointer to the end of the used
+the byte before the <span class="emphasis"><em>current</em></span> offset (if any).
+The <span class="emphasis"><em>remaining</em></span> region the current pointer to the end of the used
region.
The size of the consumed region can be changed using various
buffer commands.
-Initially, the consumed region is empty.</P
-><P
->The <SPAN
-CLASS="emphasis"
-><I
-CLASS="EMPHASIS"
->active region</I
-></SPAN
-> is an (optional) subregion of the remaining
+Initially, the consumed region is empty.
+</p>
+<p>
+The <span class="emphasis"><em>active region</em></span> 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.</P
-><P
-><PRE
-CLASS="PROGRAMLISTING"
->
+the active region will also be empty.
+</p>
+<p>
+</p>
+<pre class="programlisting">
+
/------------entire length---------------\\
/----- used region -----\\/-- available --\\
+----------------------------------------+
@@ -305,272 +313,132 @@ CLASS="PROGRAMLISTING"
a-d == used region.
a-b == consumed region.
b-d == remaining region.
- b-c == optional active region.</PRE
-></P
-><P
-><CODE
-CLASS="FUNCTION"
->lwres_buffer_init()</CODE
->
+ b-c == optional active region.
+</pre>
+<p>
+</p>
+<p>
+<code class="function">lwres_buffer_init()</code>
initializes the
-<SPAN
-CLASS="TYPE"
->lwres_buffer_t</SPAN
->
-<VAR
-CLASS="PARAMETER"
->*b</VAR
->
+<span class="type">lwres_buffer_t</span>
+<em class="parameter"><code>*b</code></em>
and assocates it with the memory region of size
-<VAR
-CLASS="PARAMETER"
->length</VAR
->
+<em class="parameter"><code>length</code></em>
bytes starting at location
-<VAR
-CLASS="PARAMETER"
->base.</VAR
-></P
-><P
-><CODE
-CLASS="FUNCTION"
->lwres_buffer_invalidate()</CODE
->
+<em class="parameter"><code>base.</code></em>
+</p>
+<p>
+<code class="function">lwres_buffer_invalidate()</code>
marks the buffer
-<VAR
-CLASS="PARAMETER"
->*b</VAR
->
+<em class="parameter"><code>*b</code></em>
as invalid. Invalidating a buffer after use is not required,
-but makes it possible to catch its possible accidental use.</P
-><P
->The functions
-<CODE
-CLASS="FUNCTION"
->lwres_buffer_add()</CODE
->
+but makes it possible to catch its possible accidental use.
+</p>
+<p>
+The functions
+<code class="function">lwres_buffer_add()</code>
and
-<CODE
-CLASS="FUNCTION"
->lwres_buffer_subtract()</CODE
->
+<code class="function">lwres_buffer_subtract()</code>
respectively increase and decrease the used space in
buffer
-<VAR
-CLASS="PARAMETER"
->*b</VAR
->
+<em class="parameter"><code>*b</code></em>
by
-<VAR
-CLASS="PARAMETER"
->n</VAR
->
+<em class="parameter"><code>n</code></em>
bytes.
-<CODE
-CLASS="FUNCTION"
->lwres_buffer_add()</CODE
->
+<code class="function">lwres_buffer_add()</code>
checks for buffer overflow and
-<CODE
-CLASS="FUNCTION"
->lwres_buffer_subtract()</CODE
->
+<code class="function">lwres_buffer_subtract()</code>
checks for underflow.
These functions do not allocate or deallocate memory.
They just change the value of
-<CODE
-CLASS="STRUCTFIELD"
->used</CODE
->.</P
-><P
->A buffer is re-initialised by
-<CODE
-CLASS="FUNCTION"
->lwres_buffer_clear()</CODE
->.
+<em class="structfield"><code>used</code></em>.
+</p>
+<p>
+A buffer is re-initialised by
+<code class="function">lwres_buffer_clear()</code>.
The function sets
-<CODE
-CLASS="STRUCTFIELD"
->used</CODE
-> ,
-<CODE
-CLASS="STRUCTFIELD"
->current</CODE
->
+<em class="structfield"><code>used</code></em> ,
+<em class="structfield"><code>current</code></em>
and
-<CODE
-CLASS="STRUCTFIELD"
->active</CODE
->
-to zero.</P
-><P
-><CODE
-CLASS="FUNCTION"
->lwres_buffer_first</CODE
->
+<em class="structfield"><code>active</code></em>
+to zero.
+</p>
+<p>
+<code class="function">lwres_buffer_first</code>
makes the consumed region of buffer
-<VAR
-CLASS="PARAMETER"
->*p</VAR
->
+<em class="parameter"><code>*p</code></em>
empty by setting
-<CODE
-CLASS="STRUCTFIELD"
->current</CODE
->
-to zero (the start of the buffer).</P
-><P
-><CODE
-CLASS="FUNCTION"
->lwres_buffer_forward()</CODE
->
+<em class="structfield"><code>current</code></em>
+to zero (the start of the buffer).
+</p>
+<p>
+<code class="function">lwres_buffer_forward()</code>
increases the consumed region of buffer
-<VAR
-CLASS="PARAMETER"
->*b</VAR
->
+<em class="parameter"><code>*b</code></em>
by
-<VAR
-CLASS="PARAMETER"
->n</VAR
->
+<em class="parameter"><code>n</code></em>
bytes, checking for overflow.
Similarly,
-<CODE
-CLASS="FUNCTION"
->lwres_buffer_back()</CODE
->
+<code class="function">lwres_buffer_back()</code>
decreases buffer
-<VAR
-CLASS="PARAMETER"
->b</VAR
->'s
+<em class="parameter"><code>b</code></em>'s
consumed region by
-<VAR
-CLASS="PARAMETER"
->n</VAR
->
-bytes and checks for underflow.</P
-><P
-><CODE
-CLASS="FUNCTION"
->lwres_buffer_getuint8()</CODE
->
+<em class="parameter"><code>n</code></em>
+bytes and checks for underflow.
+</p>
+<p>
+<code class="function">lwres_buffer_getuint8()</code>
reads an unsigned 8-bit integer from
-<VAR
-CLASS="PARAMETER"
->*b</VAR
->
+<em class="parameter"><code>*b</code></em>
and returns it.
-<CODE
-CLASS="FUNCTION"
->lwres_buffer_putuint8()</CODE
->
+<code class="function">lwres_buffer_putuint8()</code>
writes the unsigned 8-bit integer
-<VAR
-CLASS="PARAMETER"
->val</VAR
->
+<em class="parameter"><code>val</code></em>
to buffer
-<VAR
-CLASS="PARAMETER"
->*b</VAR
->.</P
-><P
-><CODE
-CLASS="FUNCTION"
->lwres_buffer_getuint16()</CODE
->
+<em class="parameter"><code>*b</code></em>.
+</p>
+<p>
+<code class="function">lwres_buffer_getuint16()</code>
and
-<CODE
-CLASS="FUNCTION"
->lwres_buffer_getuint32()</CODE
->
+<code class="function">lwres_buffer_getuint32()</code>
are identical to
-<CODE
-CLASS="FUNCTION"
->lwres_buffer_putuint8()</CODE
->
+<code class="function">lwres_buffer_putuint8()</code>
except that they respectively read an unsigned 16-bit or 32-bit integer
in network byte order from
-<VAR
-CLASS="PARAMETER"
->b</VAR
->.
+<em class="parameter"><code>b</code></em>.
Similarly,
-<CODE
-CLASS="FUNCTION"
->lwres_buffer_putuint16()</CODE
->
+<code class="function">lwres_buffer_putuint16()</code>
and
-<CODE
-CLASS="FUNCTION"
->lwres_buffer_putuint32()</CODE
->
+<code class="function">lwres_buffer_putuint32()</code>
writes the unsigned 16-bit or 32-bit integer
-<VAR
-CLASS="PARAMETER"
->val</VAR
->
+<em class="parameter"><code>val</code></em>
to buffer
-<VAR
-CLASS="PARAMETER"
->b</VAR
->,
-in network byte order.</P
-><P
->Arbitrary amounts of data are read or written from a lightweight
+<em class="parameter"><code>b</code></em>,
+in network byte order.
+</p>
+<p>
+Arbitrary amounts of data are read or written from a lightweight
resolver buffer with
-<CODE
-CLASS="FUNCTION"
->lwres_buffer_getmem()</CODE
->
+<code class="function">lwres_buffer_getmem()</code>
and
-<CODE
-CLASS="FUNCTION"
->lwres_buffer_putmem()</CODE
->
+<code class="function">lwres_buffer_putmem()</code>
respectively.
-<CODE
-CLASS="FUNCTION"
->lwres_buffer_putmem()</CODE
->
+<code class="function">lwres_buffer_putmem()</code>
copies
-<VAR
-CLASS="PARAMETER"
->length</VAR
->
+<em class="parameter"><code>length</code></em>
bytes of memory at
-<VAR
-CLASS="PARAMETER"
->base</VAR
->
+<em class="parameter"><code>base</code></em>
to
-<VAR
-CLASS="PARAMETER"
->b</VAR
->.
+<em class="parameter"><code>b</code></em>.
Conversely,
-<CODE
-CLASS="FUNCTION"
->lwres_buffer_getmem()</CODE
->
+<code class="function">lwres_buffer_getmem()</code>
copies
-<VAR
-CLASS="PARAMETER"
->length</VAR
->
+<em class="parameter"><code>length</code></em>
bytes of memory from
-<VAR
-CLASS="PARAMETER"
->b</VAR
->
+<em class="parameter"><code>b</code></em>
to
-<VAR
-CLASS="PARAMETER"
->base</VAR
->.</P
-></DIV
-></BODY
-></HTML
->
+<em class="parameter"><code>base</code></em>.
+</p>
+</div>
+</div></body>
+</html>
diff --git a/contrib/bind9/lib/lwres/man/lwres_config.3 b/contrib/bind9/lib/lwres/man/lwres_config.3
index 0c345ef..9430283 100644
--- a/contrib/bind9/lib/lwres/man/lwres_config.3
+++ b/contrib/bind9/lib/lwres/man/lwres_config.3
@@ -1,51 +1,47 @@
-.\" Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
-.\" Copyright (C) 2000, 2001 Internet Software Consortium.
-.\"
+.\" Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
+.\" Copyright (C) 2000, 2001 Internet Software Consortium.
+.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
-.\"
+.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND 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,
+.\" 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.
.\"
-.\" $Id: lwres_config.3,v 1.12.2.1.8.1 2004/03/06 07:41:42 marka Exp $
+.\" $Id: lwres_config.3,v 1.12.2.1.8.5 2005/10/13 02:33:58 marka Exp $
.\"
-.TH "LWRES_CONFIG" "3" "Jun 30, 2000" "BIND9" ""
-.SH NAME
+.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.
+.TH "LWRES_CONFIG" "3" "Jun 30, 2000" "BIND9" "BIND9"
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.SH "NAME"
lwres_conf_init, lwres_conf_clear, lwres_conf_parse, lwres_conf_print, lwres_conf_get \- lightweight resolver configuration
-.SH SYNOPSIS
-\fB#include <lwres/lwres.h>
-.sp
-.na
-void
-lwres_conf_init(lwres_context_t *ctx);
-.ad
-.sp
-.na
-void
-lwres_conf_clear(lwres_context_t *ctx);
-.ad
-.sp
-.na
-lwres_result_t
-lwres_conf_parse(lwres_context_t *ctx, const char *filename);
-.ad
-.sp
-.na
-lwres_result_t
-lwres_conf_print(lwres_context_t *ctx, FILE *fp);
-.ad
-.sp
-.na
-lwres_conf_t *
-lwres_conf_get(lwres_context_t *ctx);
-.ad
-\fR
+.SH "SYNOPSIS"
+.nf
+#include <lwres/lwres.h>
+.fi
+.HP 21
+\fBvoid\ \fBlwres_conf_init\fR\fR\fB(\fR\fBlwres_context_t\ *ctx\fR\fB);\fR
+.HP 22
+\fBvoid\ \fBlwres_conf_clear\fR\fR\fB(\fR\fBlwres_context_t\ *ctx\fR\fB);\fR
+.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
+.HP 32
+\fBlwres_result_t\ \fBlwres_conf_print\fR\fR\fB(\fR\fBlwres_context_t\ *ctx\fR\fB, \fR\fBFILE\ *fp\fR\fB);\fR
+.HP 30
+\fBlwres_conf_t\ *\ \fBlwres_conf_get\fR\fR\fB(\fR\fBlwres_context_t\ *ctx\fR\fB);\fR
.SH "DESCRIPTION"
.PP
\fBlwres_conf_init()\fR
@@ -55,8 +51,7 @@ structure for lightweight resolver context
\fIctx\fR.
.PP
\fBlwres_conf_clear()\fR
-frees up all the internal memory used by
-that
+frees up all the internal memory used by that
\fBlwres_conf_t\fR
structure in resolver context
\fIctx\fR.
@@ -75,29 +70,24 @@ 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
returns
-LWRES_R_SUCCESS
+\fBLWRES_R_SUCCESS\fR
if it successfully read and parsed
-\fIfilename\fR.
-It returns
-LWRES_R_FAILURE
+\fIfilename\fR. It returns
+\fBLWRES_R_FAILURE\fR
if
\fIfilename\fR
-could not be opened or contained incorrect
-resolver statements.
+could not be opened or contained incorrect resolver statements.
.PP
\fBlwres_conf_print()\fR
returns
-LWRES_R_SUCCESS
-unless an error occurred when converting the network addresses to a
-numeric host address string.
-If this happens, the function returns
-LWRES_R_FAILURE.
+\fBLWRES_R_SUCCESS\fR
+unless an error occurred when converting the network addresses to a numeric host address string. If this happens, the function returns
+\fBLWRES_R_FAILURE\fR.
.SH "SEE ALSO"
.PP
\fBstdio\fR(3),
diff --git a/contrib/bind9/lib/lwres/man/lwres_config.docbook b/contrib/bind9/lib/lwres/man/lwres_config.docbook
index eeb244e..03426be 100644
--- a/contrib/bind9/lib/lwres/man/lwres_config.docbook
+++ b/contrib/bind9/lib/lwres/man/lwres_config.docbook
@@ -1,7 +1,9 @@
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.0//EN"
+ "http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd"
+ [<!ENTITY mdash "&#8212;">]>
<!--
- - Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
- - Copyright (C) 2001 Internet Software Consortium.
+ - Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
+ - Copyright (C) 2000, 2001 Internet Software Consortium.
-
- Permission to use, copy, modify, and distribute this software for any
- purpose with or without fee is hereby granted, provided that the above
@@ -16,7 +18,7 @@
- PERFORMANCE OF THIS SOFTWARE.
-->
-<!-- $Id: lwres_config.docbook,v 1.2.206.1 2004/03/06 08:15:37 marka Exp $ -->
+<!-- $Id: lwres_config.docbook,v 1.2.206.3 2005/05/12 21:36:12 sra Exp $ -->
<refentry>
<refentryinfo>
@@ -30,6 +32,19 @@
<refmiscinfo>BIND9</refmiscinfo>
</refmeta>
+ <docinfo>
+ <copyright>
+ <year>2004</year>
+ <year>2005</year>
+ <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
+ </copyright>
+ <copyright>
+ <year>2000</year>
+ <year>2001</year>
+ <holder>Internet Software Consortium.</holder>
+ </copyright>
+ </docinfo>
+
<refnamediv>
<refname>lwres_conf_init</refname>
<refname>lwres_conf_clear</refname>
@@ -149,6 +164,7 @@ If this happens, the function returns
<citerefentry>
<refentrytitle>resolver</refentrytitle><manvolnum>5</manvolnum>
</citerefentry>.
+</para>
</refsect1>
<refsect1>
<title>FILES</title>
diff --git a/contrib/bind9/lib/lwres/man/lwres_config.html b/contrib/bind9/lib/lwres/man/lwres_config.html
index cd7c63b..7ea416b 100644
--- a/contrib/bind9/lib/lwres/man/lwres_config.html
+++ b/contrib/bind9/lib/lwres/man/lwres_config.html
@@ -1,282 +1,166 @@
<!--
- - Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
- - Copyright (C) 2001 Internet Software Consortium.
- -
+ - Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
+ - Copyright (C) 2000, 2001 Internet Software Consortium.
+ -
- Permission to use, copy, modify, and distribute this software for any
- purpose with or without fee is hereby granted, provided that the above
- copyright notice and this permission notice appear in all copies.
- -
+ -
- THE SOFTWARE IS PROVIDED "AS IS" AND 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,
+ - 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.
-->
-
-<!-- $Id: lwres_config.html,v 1.4.2.1.4.2 2004/08/22 23:39:03 marka Exp $ -->
-
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<HTML
-><HEAD
-><TITLE
->lwres_config</TITLE
-><META
-NAME="GENERATOR"
-CONTENT="Modular DocBook HTML Stylesheet Version 1.7"></HEAD
-><BODY
-CLASS="REFENTRY"
-BGCOLOR="#FFFFFF"
-TEXT="#000000"
-LINK="#0000FF"
-VLINK="#840084"
-ALINK="#0000FF"
-><H1
-><A
-NAME="AEN1"
-></A
->lwres_config</H1
-><DIV
-CLASS="REFNAMEDIV"
-><A
-NAME="AEN8"
-></A
-><H2
->Name</H2
->lwres_conf_init, lwres_conf_clear, lwres_conf_parse, lwres_conf_print, lwres_conf_get&nbsp;--&nbsp;lightweight resolver configuration</DIV
-><DIV
-CLASS="REFSYNOPSISDIV"
-><A
-NAME="AEN15"
-></A
-><H2
->Synopsis</H2
-><DIV
-CLASS="FUNCSYNOPSIS"
-><P
-></P
-><A
-NAME="AEN16"
-></A
-><PRE
-CLASS="FUNCSYNOPSISINFO"
->#include &lt;lwres/lwres.h&gt;</PRE
-><P
-><CODE
-><CODE
-CLASS="FUNCDEF"
->void
-lwres_conf_init</CODE
->(lwres_context_t *ctx);</CODE
-></P
-><P
-><CODE
-><CODE
-CLASS="FUNCDEF"
->void
-lwres_conf_clear</CODE
->(lwres_context_t *ctx);</CODE
-></P
-><P
-><CODE
-><CODE
-CLASS="FUNCDEF"
->lwres_result_t
-lwres_conf_parse</CODE
->(lwres_context_t *ctx, const char *filename);</CODE
-></P
-><P
-><CODE
-><CODE
-CLASS="FUNCDEF"
->lwres_result_t
-lwres_conf_print</CODE
->(lwres_context_t *ctx, FILE *fp);</CODE
-></P
-><P
-><CODE
-><CODE
-CLASS="FUNCDEF"
->lwres_conf_t *
-lwres_conf_get</CODE
->(lwres_context_t *ctx);</CODE
-></P
-><P
-></P
-></DIV
-></DIV
-><DIV
-CLASS="REFSECT1"
-><A
-NAME="AEN40"
-></A
-><H2
->DESCRIPTION</H2
-><P
-><CODE
-CLASS="FUNCTION"
->lwres_conf_init()</CODE
->
+<!-- $Id: lwres_config.html,v 1.4.2.1.4.9 2005/10/13 02:33:55 marka Exp $ -->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>lwres_config</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en">
+<a name="id2463721"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2>Name</h2>
+<p>lwres_conf_init, lwres_conf_clear, lwres_conf_parse, lwres_conf_print, lwres_conf_get &#8212; lightweight resolver configuration</p>
+</div>
+<div class="refsynopsisdiv">
+<h2>Synopsis</h2>
+<div class="funcsynopsis">
+<pre class="funcsynopsisinfo">#include &lt;lwres/lwres.h&gt;</pre>
+<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em"><tr>
+<td><code class="funcdef">
+void
+<b class="fsfunc">lwres_conf_init</b>(</code></td>
+<td> </td>
+<td>
+<code>)</code>;</td>
+</tr></table>
+<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em"><tr>
+<td><code class="funcdef">
+void
+<b class="fsfunc">lwres_conf_clear</b>(</code></td>
+<td> </td>
+<td>
+<code>)</code>;</td>
+</tr></table>
+<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em">
+<tr>
+<td><code class="funcdef">
+lwres_result_t
+<b class="fsfunc">lwres_conf_parse</b>(</code></td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>
+<code>)</code>;</td>
+</tr>
+</table>
+<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em">
+<tr>
+<td><code class="funcdef">
+lwres_result_t
+<b class="fsfunc">lwres_conf_print</b>(</code></td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>
+<code>)</code>;</td>
+</tr>
+</table>
+<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0"><tr>
+<td><code class="funcdef">
+lwres_conf_t *
+<b class="fsfunc">lwres_conf_get</b>(</code></td>
+<td> </td>
+<td>
+<code>)</code>;</td>
+</tr></table>
+</div>
+</div>
+<div class="refsect1" lang="en">
+<a name="id2525910"></a><h2>DESCRIPTION</h2>
+<p>
+<code class="function">lwres_conf_init()</code>
creates an empty
-<SPAN
-CLASS="TYPE"
->lwres_conf_t</SPAN
->
+<span class="type">lwres_conf_t</span>
structure for lightweight resolver context
-<VAR
-CLASS="PARAMETER"
->ctx</VAR
->.</P
-><P
-><CODE
-CLASS="FUNCTION"
->lwres_conf_clear()</CODE
->
+<em class="parameter"><code>ctx</code></em>.
+</p>
+<p>
+<code class="function">lwres_conf_clear()</code>
frees up all the internal memory used by
that
-<SPAN
-CLASS="TYPE"
->lwres_conf_t</SPAN
->
+<span class="type">lwres_conf_t</span>
structure in resolver context
-<VAR
-CLASS="PARAMETER"
->ctx</VAR
->.</P
-><P
-><CODE
-CLASS="FUNCTION"
->lwres_conf_parse()</CODE
->
+<em class="parameter"><code>ctx</code></em>.
+</p>
+<p>
+<code class="function">lwres_conf_parse()</code>
opens the file
-<VAR
-CLASS="PARAMETER"
->filename</VAR
->
+<em class="parameter"><code>filename</code></em>
and parses it to initialise the resolver context
-<VAR
-CLASS="PARAMETER"
->ctx</VAR
->'s
-<SPAN
-CLASS="TYPE"
->lwres_conf_t</SPAN
->
-structure.</P
-><P
-><CODE
-CLASS="FUNCTION"
->lwres_conf_print()</CODE
->
+<em class="parameter"><code>ctx</code></em>'s
+<span class="type">lwres_conf_t</span>
+structure.
+</p>
+<p>
+<code class="function">lwres_conf_print()</code>
prints the
-<SPAN
-CLASS="TYPE"
->lwres_conf_t</SPAN
->
+<span class="type">lwres_conf_t</span>
structure for resolver context
-<VAR
-CLASS="PARAMETER"
->ctx</VAR
->
+<em class="parameter"><code>ctx</code></em>
to the
-<SPAN
-CLASS="TYPE"
->FILE</SPAN
->
-<VAR
-CLASS="PARAMETER"
->fp</VAR
->.</P
-></DIV
-><DIV
-CLASS="REFSECT1"
-><A
-NAME="AEN61"
-></A
-><H2
->RETURN VALUES</H2
-><P
-><CODE
-CLASS="FUNCTION"
->lwres_conf_parse()</CODE
->
+<span class="type">FILE</span>
+<em class="parameter"><code>fp</code></em>.
+</p>
+</div>
+<div class="refsect1" lang="en">
+<a name="id2525981"></a><h2>RETURN VALUES</h2>
+<p>
+<code class="function">lwres_conf_parse()</code>
returns
-<SPAN
-CLASS="ERRORCODE"
->LWRES_R_SUCCESS</SPAN
->
+<span class="errorcode">LWRES_R_SUCCESS</span>
if it successfully read and parsed
-<VAR
-CLASS="PARAMETER"
->filename</VAR
->.
+<em class="parameter"><code>filename</code></em>.
It returns
-<SPAN
-CLASS="ERRORCODE"
->LWRES_R_FAILURE</SPAN
->
+<span class="errorcode">LWRES_R_FAILURE</span>
if
-<VAR
-CLASS="PARAMETER"
->filename</VAR
->
+<em class="parameter"><code>filename</code></em>
could not be opened or contained incorrect
-resolver statements.</P
-><P
-><CODE
-CLASS="FUNCTION"
->lwres_conf_print()</CODE
->
+resolver statements.
+</p>
+<p>
+<code class="function">lwres_conf_print()</code>
returns
-<SPAN
-CLASS="ERRORCODE"
->LWRES_R_SUCCESS</SPAN
->
+<span class="errorcode">LWRES_R_SUCCESS</span>
unless an error occurred when converting the network addresses to a
numeric host address string.
If this happens, the function returns
-<SPAN
-CLASS="ERRORCODE"
->LWRES_R_FAILURE</SPAN
->.</P
-></DIV
-><DIV
-CLASS="REFSECT1"
-><A
-NAME="AEN73"
-></A
-><H2
->SEE ALSO</H2
-><P
-><SPAN
-CLASS="CITEREFENTRY"
-><SPAN
-CLASS="REFENTRYTITLE"
->stdio</SPAN
->(3)</SPAN
->,
-<SPAN
-CLASS="CITEREFENTRY"
-><SPAN
-CLASS="REFENTRYTITLE"
->resolver</SPAN
->(5)</SPAN
->.</P
-></DIV
-><DIV
-CLASS="REFSECT1"
-><A
-NAME="AEN82"
-></A
-><H2
->FILES</H2
-><P
-><TT
-CLASS="FILENAME"
->/etc/resolv.conf</TT
-></P
-></DIV
-></BODY
-></HTML
->
+<span class="errorcode">LWRES_R_FAILURE</span>.
+</p>
+</div>
+<div class="refsect1" lang="en">
+<a name="id2526021"></a><h2>SEE ALSO</h2>
+<p>
+<span class="citerefentry"><span class="refentrytitle">stdio</span>(3)</span>,
+<span class="citerefentry"><span class="refentrytitle">resolver</span>(5)</span>.
+</p>
+</div>
+<div class="refsect1" lang="en">
+<a name="id2526048"></a><h2>FILES</h2>
+<p>
+<code class="filename">/etc/resolv.conf</code>
+</p>
+</div>
+</div></body>
+</html>
diff --git a/contrib/bind9/lib/lwres/man/lwres_context.3 b/contrib/bind9/lib/lwres/man/lwres_context.3
index d19b18a..be8cd38 100644
--- a/contrib/bind9/lib/lwres/man/lwres_context.3
+++ b/contrib/bind9/lib/lwres/man/lwres_context.3
@@ -1,103 +1,82 @@
-.\" Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
-.\" Copyright (C) 2000, 2001 Internet Software Consortium.
-.\"
+.\" Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
+.\" Copyright (C) 2000, 2001, 2003 Internet Software Consortium.
+.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
-.\"
+.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND 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,
+.\" 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.
.\"
-.\" $Id: lwres_context.3,v 1.13.2.2.2.2 2004/03/08 09:05:12 marka Exp $
+.\" $Id: lwres_context.3,v 1.13.2.2.2.6 2005/10/13 02:33:52 marka Exp $
.\"
-.TH "LWRES_CONTEXT" "3" "Jun 30, 2000" "BIND9" ""
-.SH NAME
+.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.
+.TH "LWRES_CONTEXT" "3" "Jun 30, 2000" "BIND9" "BIND9"
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.SH "NAME"
lwres_context_create, lwres_context_destroy, lwres_context_nextserial, lwres_context_initserial, lwres_context_freemem, lwres_context_allocmem, lwres_context_sendrecv \- lightweight resolver context management
-.SH SYNOPSIS
-\fB#include <lwres/lwres.h>
-.sp
-.na
-lwres_result_t
-lwres_context_create(lwres_context_t **contextp, void *arg, lwres_malloc_t malloc_function, lwres_free_t free_function);
-.ad
-.sp
-.na
-lwres_result_t
-lwres_context_destroy(lwres_context_t **contextp);
-.ad
-.sp
-.na
-void
-lwres_context_initserial(lwres_context_t *ctx, lwres_uint32_t serial);
-.ad
-.sp
-.na
-lwres_uint32_t
-lwres_context_nextserial(lwres_context_t *ctx);
-.ad
-.sp
-.na
-void
-lwres_context_freemem(lwres_context_t *ctx, void *mem, size_t len);
-.ad
-.sp
-.na
-void
-lwres_context_allocmem(lwres_context_t *ctx, size_t len);
-.ad
-.sp
-.na
-void *
-lwres_context_sendrecv(lwres_context_t *ctx, void *sendbase, int sendlen, void *recvbase, int recvlen, int *recvd_len);
-.ad
-\fR
+.SH "SYNOPSIS"
+.nf
+#include <lwres/lwres.h>
+.fi
+.HP 36
+\fBlwres_result_t\ \fBlwres_context_create\fR\fR\fB(\fR\fBlwres_context_t\ **contextp\fR\fB, \fR\fBvoid\ *arg\fR\fB, \fR\fBlwres_malloc_t\ malloc_function\fR\fB, \fR\fBlwres_free_t\ free_function\fR\fB);\fR
+.HP 37
+\fBlwres_result_t\ \fBlwres_context_destroy\fR\fR\fB(\fR\fBlwres_context_t\ **contextp\fR\fB);\fR
+.HP 30
+\fBvoid\ \fBlwres_context_initserial\fR\fR\fB(\fR\fBlwres_context_t\ *ctx\fR\fB, \fR\fBlwres_uint32_t\ serial\fR\fB);\fR
+.HP 40
+\fBlwres_uint32_t\ \fBlwres_context_nextserial\fR\fR\fB(\fR\fBlwres_context_t\ *ctx\fR\fB);\fR
+.HP 27
+\fBvoid\ \fBlwres_context_freemem\fR\fR\fB(\fR\fBlwres_context_t\ *ctx\fR\fB, \fR\fBvoid\ *mem\fR\fB, \fR\fBsize_t\ len\fR\fB);\fR
+.HP 28
+\fBvoid\ \fBlwres_context_allocmem\fR\fR\fB(\fR\fBlwres_context_t\ *ctx\fR\fB, \fR\fBsize_t\ len\fR\fB);\fR
+.HP 30
+\fBvoid\ *\ \fBlwres_context_sendrecv\fR\fR\fB(\fR\fBlwres_context_t\ *ctx\fR\fB, \fR\fBvoid\ *sendbase\fR\fB, \fR\fBint\ sendlen\fR\fB, \fR\fBvoid\ *recvbase\fR\fB, \fR\fBint\ recvlen\fR\fB, \fR\fBint\ *recvd_len\fR\fB);\fR
.SH "DESCRIPTION"
.PP
\fBlwres_context_create()\fR
creates a
\fBlwres_context_t\fR
-structure for use in lightweight resolver operations.
-It holds a socket and other data needed for communicating
-with a resolver daemon.
-The new
+structure for use in lightweight resolver operations. It holds a socket and other data needed for communicating with a resolver daemon. The new
\fBlwres_context_t\fR
is returned through
-\fIcontextp\fR,
-a pointer to a
+\fIcontextp\fR, a pointer to a
\fBlwres_context_t\fR
-pointer. This
+pointer. This
\fBlwres_context_t\fR
-pointer must initially be NULL, and is modified
-to point to the newly created
+pointer must initially be NULL, and is modified to point to the newly created
\fBlwres_context_t\fR.
.PP
-When the lightweight resolver needs to perform dynamic memory
-allocation, it will call
+When the lightweight resolver needs to perform dynamic memory allocation, it will call
\fImalloc_function\fR
to allocate memory and
\fIfree_function\fR
-to free it. If
+to free it. If
\fImalloc_function\fR
and
\fIfree_function\fR
-are NULL, memory is allocated using
-\&.Xr malloc 3
-and
-\fBfree\fR(3).
-It is not permitted to have a NULL
+are NULL, memory is allocated using .Xr malloc 3 and
+\fBfree\fR(3). It is not permitted to have a NULL
\fImalloc_function\fR
-and a non-NULL
+and a non\-NULL
\fIfree_function\fR
or vice versa.
\fIarg\fR
-is passed as the first parameter to the memory
-allocation functions.
-If
+is passed as the first parameter to the memory allocation functions. If
\fImalloc_function\fR
and
\fIfree_function\fR
@@ -105,23 +84,18 @@ are NULL,
\fIarg\fR
is unused and should be passed as NULL.
.PP
-Once memory for the structure has been allocated,
-it is initialized using
+Once memory for the structure has been allocated, it is initialized using
\fBlwres_conf_init\fR(3)
and returned via
\fI*contextp\fR.
.PP
\fBlwres_context_destroy()\fR
-destroys a
-\fBlwres_context_t\fR,
-closing its socket.
+destroys a
+\fBlwres_context_t\fR, closing its socket.
\fIcontextp\fR
-is a pointer to a pointer to the context that is to be destroyed.
-The pointer will be set to NULL when the context has been destroyed.
+is a pointer to a pointer to the context that is to be destroyed. The pointer will be set to NULL when the context has been destroyed.
.PP
-The context holds a serial number that is used to identify resolver
-request packets and associate responses with the corresponding requests.
-This serial number is controlled using
+The context holds a serial number that is used to identify resolver request packets and associate responses with the corresponding requests. This serial number is controlled using
\fBlwres_context_initserial()\fR
and
\fBlwres_context_nextserial()\fR.
@@ -136,15 +110,12 @@ increments the serial number and returns the previous value.
Memory for a lightweight resolver context is allocated and freed using
\fBlwres_context_allocmem()\fR
and
-\fBlwres_context_freemem()\fR.
-These use whatever allocations were defined when the context was
-created with
+\fBlwres_context_freemem()\fR. These use whatever allocations were defined when the context was created with
\fBlwres_context_create()\fR.
\fBlwres_context_allocmem()\fR
allocates
\fIlen\fR
-bytes of memory and if successful returns a pointer to the allocated
-storage.
+bytes of memory and if successful returns a pointer to the allocated storage.
\fBlwres_context_freemem()\fR
frees
\fIlen\fR
@@ -153,39 +124,33 @@ bytes of space starting at location
.PP
\fBlwres_context_sendrecv()\fR
performs I/O for the context
-\fIctx\fR.
-Data are read and written from the context's socket.
-It writes data from
+\fIctx\fR. Data are read and written from the context's socket. It writes data from
\fIsendbase\fR
-\(em typically a lightweight resolver query packet \(em
-and waits for a reply which is copied to the receive buffer at
-\fIrecvbase\fR.
-The number of bytes that were written to this receive buffer is
-returned in
+\(em typically a lightweight resolver query packet \(em and waits for a reply which is copied to the receive buffer at
+\fIrecvbase\fR. The number of bytes that were written to this receive buffer is returned in
\fI*recvd_len\fR.
.SH "RETURN VALUES"
.PP
\fBlwres_context_create()\fR
returns
-LWRES_R_NOMEMORY
+\fBLWRES_R_NOMEMORY\fR
if memory for the
\fBstruct lwres_context\fR
-could not be allocated,
-LWRES_R_SUCCESS
+could not be allocated,
+\fBLWRES_R_SUCCESS\fR
otherwise.
.PP
Successful calls to the memory allocator
\fBlwres_context_allocmem()\fR
-return a pointer to the start of the allocated space.
-It returns NULL if memory could not be allocated.
+return a pointer to the start of the allocated space. It returns NULL if memory could not be allocated.
.PP
-LWRES_R_SUCCESS
+\fBLWRES_R_SUCCESS\fR
is returned when
\fBlwres_context_sendrecv()\fR
completes successfully.
-LWRES_R_IOERROR
+\fBLWRES_R_IOERROR\fR
is returned if an I/O error occurs and
-LWRES_R_TIMEOUT
+\fBLWRES_R_TIMEOUT\fR
is returned if
\fBlwres_context_sendrecv()\fR
times out waiting for a response.
@@ -193,4 +158,4 @@ times out waiting for a response.
.PP
\fBlwres_conf_init\fR(3),
\fBmalloc\fR(3),
-\fBfree\fR(3).
+\fBfree\fR(3 ).
diff --git a/contrib/bind9/lib/lwres/man/lwres_context.docbook b/contrib/bind9/lib/lwres/man/lwres_context.docbook
index 137e4bc..48d4336 100644
--- a/contrib/bind9/lib/lwres/man/lwres_context.docbook
+++ b/contrib/bind9/lib/lwres/man/lwres_context.docbook
@@ -1,7 +1,9 @@
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.0//EN"
+ "http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd"
+ [<!ENTITY mdash "&#8212;">]>
<!--
- - Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
- - Copyright (C) 2001, 2003 Internet Software Consortium.
+ - Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
+ - Copyright (C) 2000, 2001, 2003 Internet Software Consortium.
-
- Permission to use, copy, modify, and distribute this software for any
- purpose with or without fee is hereby granted, provided that the above
@@ -16,7 +18,7 @@
- PERFORMANCE OF THIS SOFTWARE.
-->
-<!-- $Id: lwres_context.docbook,v 1.3.2.2.2.1 2004/03/06 08:15:38 marka Exp $ -->
+<!-- $Id: lwres_context.docbook,v 1.3.2.2.2.3 2005/05/12 21:36:12 sra Exp $ -->
<refentry>
<refentryinfo>
@@ -29,6 +31,21 @@
<manvolnum>3</manvolnum>
<refmiscinfo>BIND9</refmiscinfo>
</refmeta>
+
+ <docinfo>
+ <copyright>
+ <year>2004</year>
+ <year>2005</year>
+ <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
+ </copyright>
+ <copyright>
+ <year>2000</year>
+ <year>2001</year>
+ <year>2003</year>
+ <holder>Internet Software Consortium.</holder>
+ </copyright>
+ </docinfo>
+
<refnamediv>
<refname>lwres_context_create</refname>
<refname>lwres_context_destroy</refname>
diff --git a/contrib/bind9/lib/lwres/man/lwres_context.html b/contrib/bind9/lib/lwres/man/lwres_context.html
index cca12d7..8988c5d 100644
--- a/contrib/bind9/lib/lwres/man/lwres_context.html
+++ b/contrib/bind9/lib/lwres/man/lwres_context.html
@@ -1,478 +1,335 @@
<!--
- - Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
- - Copyright (C) 2001 Internet Software Consortium.
- -
+ - Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
+ - Copyright (C) 2000, 2001, 2003 Internet Software Consortium.
+ -
- Permission to use, copy, modify, and distribute this software for any
- purpose with or without fee is hereby granted, provided that the above
- copyright notice and this permission notice appear in all copies.
- -
+ -
- THE SOFTWARE IS PROVIDED "AS IS" AND 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,
+ - 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.
-->
-
-<!-- $Id: lwres_context.html,v 1.5.2.2.2.3 2004/08/22 23:39:03 marka Exp $ -->
-
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<HTML
-><HEAD
-><TITLE
->lwres_context</TITLE
-><META
-NAME="GENERATOR"
-CONTENT="Modular DocBook HTML Stylesheet Version 1.7"></HEAD
-><BODY
-CLASS="REFENTRY"
-BGCOLOR="#FFFFFF"
-TEXT="#000000"
-LINK="#0000FF"
-VLINK="#840084"
-ALINK="#0000FF"
-><H1
-><A
-NAME="AEN1"
-></A
->lwres_context</H1
-><DIV
-CLASS="REFNAMEDIV"
-><A
-NAME="AEN8"
-></A
-><H2
->Name</H2
->lwres_context_create, lwres_context_destroy, lwres_context_nextserial, lwres_context_initserial, lwres_context_freemem, lwres_context_allocmem, lwres_context_sendrecv&nbsp;--&nbsp;lightweight resolver context management</DIV
-><DIV
-CLASS="REFSYNOPSISDIV"
-><A
-NAME="AEN17"
-></A
-><H2
->Synopsis</H2
-><DIV
-CLASS="FUNCSYNOPSIS"
-><P
-></P
-><A
-NAME="AEN18"
-></A
-><PRE
-CLASS="FUNCSYNOPSISINFO"
->#include &lt;lwres/lwres.h&gt;</PRE
-><P
-><CODE
-><CODE
-CLASS="FUNCDEF"
->lwres_result_t
-lwres_context_create</CODE
->(lwres_context_t **contextp, void *arg, lwres_malloc_t malloc_function, lwres_free_t free_function);</CODE
-></P
-><P
-><CODE
-><CODE
-CLASS="FUNCDEF"
->lwres_result_t
-lwres_context_destroy</CODE
->(lwres_context_t **contextp);</CODE
-></P
-><P
-><CODE
-><CODE
-CLASS="FUNCDEF"
->void
-lwres_context_initserial</CODE
->(lwres_context_t *ctx, lwres_uint32_t serial);</CODE
-></P
-><P
-><CODE
-><CODE
-CLASS="FUNCDEF"
->lwres_uint32_t
-lwres_context_nextserial</CODE
->(lwres_context_t *ctx);</CODE
-></P
-><P
-><CODE
-><CODE
-CLASS="FUNCDEF"
->void
-lwres_context_freemem</CODE
->(lwres_context_t *ctx, void *mem, size_t len);</CODE
-></P
-><P
-><CODE
-><CODE
-CLASS="FUNCDEF"
->void
-lwres_context_allocmem</CODE
->(lwres_context_t *ctx, size_t len);</CODE
-></P
-><P
-><CODE
-><CODE
-CLASS="FUNCDEF"
->void *
-lwres_context_sendrecv</CODE
->(lwres_context_t *ctx, void *sendbase, int sendlen, void *recvbase, int recvlen, int *recvd_len);</CODE
-></P
-><P
-></P
-></DIV
-></DIV
-><DIV
-CLASS="REFSECT1"
-><A
-NAME="AEN60"
-></A
-><H2
->DESCRIPTION</H2
-><P
-><CODE
-CLASS="FUNCTION"
->lwres_context_create()</CODE
->
+<!-- $Id: lwres_context.html,v 1.5.2.2.2.10 2005/10/13 02:33:55 marka Exp $ -->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>lwres_context</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en">
+<a name="id2463721"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2>Name</h2>
+<p>lwres_context_create, lwres_context_destroy, lwres_context_nextserial, lwres_context_initserial, lwres_context_freemem, lwres_context_allocmem, lwres_context_sendrecv &#8212; lightweight resolver context management</p>
+</div>
+<div class="refsynopsisdiv">
+<h2>Synopsis</h2>
+<div class="funcsynopsis">
+<pre class="funcsynopsisinfo">#include &lt;lwres/lwres.h&gt;</pre>
+<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em">
+<tr>
+<td><code class="funcdef">
+lwres_result_t
+<b class="fsfunc">lwres_context_create</b>(</code></td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>
+<code>)</code>;</td>
+</tr>
+</table>
+<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em"><tr>
+<td><code class="funcdef">
+lwres_result_t
+<b class="fsfunc">lwres_context_destroy</b>(</code></td>
+<td> </td>
+<td>
+<code>)</code>;</td>
+</tr></table>
+<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em">
+<tr>
+<td><code class="funcdef">
+void
+<b class="fsfunc">lwres_context_initserial</b>(</code></td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>
+<code>)</code>;</td>
+</tr>
+</table>
+<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em"><tr>
+<td><code class="funcdef">
+lwres_uint32_t
+<b class="fsfunc">lwres_context_nextserial</b>(</code></td>
+<td> </td>
+<td>
+<code>)</code>;</td>
+</tr></table>
+<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em">
+<tr>
+<td><code class="funcdef">
+void
+<b class="fsfunc">lwres_context_freemem</b>(</code></td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>
+<code>)</code>;</td>
+</tr>
+</table>
+<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em">
+<tr>
+<td><code class="funcdef">
+void
+<b class="fsfunc">lwres_context_allocmem</b>(</code></td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>
+<code>)</code>;</td>
+</tr>
+</table>
+<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0">
+<tr>
+<td><code class="funcdef">
+void *
+<b class="fsfunc">lwres_context_sendrecv</b>(</code></td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>
+<code>)</code>;</td>
+</tr>
+</table>
+</div>
+</div>
+<div class="refsect1" lang="en">
+<a name="id2525975"></a><h2>DESCRIPTION</h2>
+<p>
+<code class="function">lwres_context_create()</code>
creates a
-<SPAN
-CLASS="TYPE"
->lwres_context_t</SPAN
->
+<span class="type">lwres_context_t</span>
structure for use in lightweight resolver operations.
It holds a socket and other data needed for communicating
with a resolver daemon.
The new
-<SPAN
-CLASS="TYPE"
->lwres_context_t</SPAN
->
+<span class="type">lwres_context_t</span>
is returned through
-<VAR
-CLASS="PARAMETER"
->contextp</VAR
->,
+<em class="parameter"><code>contextp</code></em>,
a pointer to a
-<SPAN
-CLASS="TYPE"
->lwres_context_t</SPAN
->
+<span class="type">lwres_context_t</span>
pointer. This
-<SPAN
-CLASS="TYPE"
->lwres_context_t</SPAN
->
+<span class="type">lwres_context_t</span>
pointer must initially be NULL, and is modified
to point to the newly created
-<SPAN
-CLASS="TYPE"
->lwres_context_t</SPAN
->.&#13;</P
-><P
->When the lightweight resolver needs to perform dynamic memory
+<span class="type">lwres_context_t</span>.
+
+</p>
+<p>
+When the lightweight resolver needs to perform dynamic memory
allocation, it will call
-<VAR
-CLASS="PARAMETER"
->malloc_function</VAR
->
+<em class="parameter"><code>malloc_function</code></em>
to allocate memory and
-<VAR
-CLASS="PARAMETER"
->free_function</VAR
->
+<em class="parameter"><code>free_function</code></em>
to free it. If
-<VAR
-CLASS="PARAMETER"
->malloc_function</VAR
->
+<em class="parameter"><code>malloc_function</code></em>
and
-<VAR
-CLASS="PARAMETER"
->free_function</VAR
->
+<em class="parameter"><code>free_function</code></em>
are NULL, memory is allocated using
.Xr malloc 3
and
-<SPAN
-CLASS="CITEREFENTRY"
-><SPAN
-CLASS="REFENTRYTITLE"
->free</SPAN
->(3)</SPAN
->.
+<span class="citerefentry"><span class="refentrytitle">free</span>(3)</span>.
It is not permitted to have a NULL
-<VAR
-CLASS="PARAMETER"
->malloc_function</VAR
->
+<em class="parameter"><code>malloc_function</code></em>
and a non-NULL
-<VAR
-CLASS="PARAMETER"
->free_function</VAR
->
+<em class="parameter"><code>free_function</code></em>
or vice versa.
-<VAR
-CLASS="PARAMETER"
->arg</VAR
->
+<em class="parameter"><code>arg</code></em>
is passed as the first parameter to the memory
allocation functions.
If
-<VAR
-CLASS="PARAMETER"
->malloc_function</VAR
->
+<em class="parameter"><code>malloc_function</code></em>
and
-<VAR
-CLASS="PARAMETER"
->free_function</VAR
->
+<em class="parameter"><code>free_function</code></em>
are NULL,
-<VAR
-CLASS="PARAMETER"
->arg</VAR
->
+<em class="parameter"><code>arg</code></em>
-is unused and should be passed as NULL.</P
-><P
->Once memory for the structure has been allocated,
+is unused and should be passed as NULL.
+</p>
+<p>
+Once memory for the structure has been allocated,
it is initialized using
-<SPAN
-CLASS="CITEREFENTRY"
-><SPAN
-CLASS="REFENTRYTITLE"
->lwres_conf_init</SPAN
->(3)</SPAN
->
+<span class="citerefentry"><span class="refentrytitle">lwres_conf_init</span>(3)</span>
and returned via
-<VAR
-CLASS="PARAMETER"
->*contextp</VAR
->.&#13;</P
-><P
-><CODE
-CLASS="FUNCTION"
->lwres_context_destroy()</CODE
->
+<em class="parameter"><code>*contextp</code></em>.
+
+</p>
+<p>
+<code class="function">lwres_context_destroy()</code>
destroys a
-<SPAN
-CLASS="TYPE"
->lwres_context_t</SPAN
->,
+<span class="type">lwres_context_t</span>,
closing its socket.
-<VAR
-CLASS="PARAMETER"
->contextp</VAR
->
+<em class="parameter"><code>contextp</code></em>
is a pointer to a pointer to the context that is to be destroyed.
-The pointer will be set to NULL when the context has been destroyed.</P
-><P
->The context holds a serial number that is used to identify resolver
+The pointer will be set to NULL when the context has been destroyed.
+</p>
+<p>
+The context holds a serial number that is used to identify resolver
request packets and associate responses with the corresponding requests.
This serial number is controlled using
-<CODE
-CLASS="FUNCTION"
->lwres_context_initserial()</CODE
->
+<code class="function">lwres_context_initserial()</code>
and
-<CODE
-CLASS="FUNCTION"
->lwres_context_nextserial()</CODE
->.
-<CODE
-CLASS="FUNCTION"
->lwres_context_initserial()</CODE
->
+<code class="function">lwres_context_nextserial()</code>.
+<code class="function">lwres_context_initserial()</code>
sets the serial number for context
-<VAR
-CLASS="PARAMETER"
->*ctx</VAR
->
+<em class="parameter"><code>*ctx</code></em>
to
-<VAR
-CLASS="PARAMETER"
->serial</VAR
->.
+<em class="parameter"><code>serial</code></em>.
-<CODE
-CLASS="FUNCTION"
->lwres_context_nextserial()</CODE
->
-increments the serial number and returns the previous value.</P
-><P
->Memory for a lightweight resolver context is allocated and freed using
-<CODE
-CLASS="FUNCTION"
->lwres_context_allocmem()</CODE
->
+<code class="function">lwres_context_nextserial()</code>
+increments the serial number and returns the previous value.
+</p>
+<p>
+Memory for a lightweight resolver context is allocated and freed using
+<code class="function">lwres_context_allocmem()</code>
and
-<CODE
-CLASS="FUNCTION"
->lwres_context_freemem()</CODE
->.
+<code class="function">lwres_context_freemem()</code>.
These use whatever allocations were defined when the context was
created with
-<CODE
-CLASS="FUNCTION"
->lwres_context_create()</CODE
->.
-<CODE
-CLASS="FUNCTION"
->lwres_context_allocmem()</CODE
->
+<code class="function">lwres_context_create()</code>.
+<code class="function">lwres_context_allocmem()</code>
allocates
-<VAR
-CLASS="PARAMETER"
->len</VAR
->
+<em class="parameter"><code>len</code></em>
bytes of memory and if successful returns a pointer to the allocated
storage.
-<CODE
-CLASS="FUNCTION"
->lwres_context_freemem()</CODE
->
+<code class="function">lwres_context_freemem()</code>
frees
-<VAR
-CLASS="PARAMETER"
->len</VAR
->
+<em class="parameter"><code>len</code></em>
bytes of space starting at location
-<VAR
-CLASS="PARAMETER"
->mem</VAR
->.&#13;</P
-><P
-><CODE
-CLASS="FUNCTION"
->lwres_context_sendrecv()</CODE
->
+<em class="parameter"><code>mem</code></em>.
+
+</p>
+<p>
+<code class="function">lwres_context_sendrecv()</code>
performs I/O for the context
-<VAR
-CLASS="PARAMETER"
->ctx</VAR
->.
+<em class="parameter"><code>ctx</code></em>.
Data are read and written from the context's socket.
It writes data from
-<VAR
-CLASS="PARAMETER"
->sendbase</VAR
->
-&mdash; typically a lightweight resolver query packet &mdash;
+<em class="parameter"><code>sendbase</code></em>
+&#8212; typically a lightweight resolver query packet &#8212;
and waits for a reply which is copied to the receive buffer at
-<VAR
-CLASS="PARAMETER"
->recvbase</VAR
->.
+<em class="parameter"><code>recvbase</code></em>.
The number of bytes that were written to this receive buffer is
returned in
-<VAR
-CLASS="PARAMETER"
->*recvd_len</VAR
->.&#13;</P
-></DIV
-><DIV
-CLASS="REFSECT1"
-><A
-NAME="AEN115"
-></A
-><H2
->RETURN VALUES</H2
-><P
-><CODE
-CLASS="FUNCTION"
->lwres_context_create()</CODE
->
+<em class="parameter"><code>*recvd_len</code></em>.
+
+</p>
+</div>
+<div class="refsect1" lang="en">
+<a name="id2526156"></a><h2>RETURN VALUES</h2>
+<p>
+<code class="function">lwres_context_create()</code>
returns
-<SPAN
-CLASS="ERRORCODE"
->LWRES_R_NOMEMORY</SPAN
->
+<span class="errorcode">LWRES_R_NOMEMORY</span>
if memory for the
-<SPAN
-CLASS="TYPE"
->struct lwres_context</SPAN
->
+<span class="type">struct lwres_context</span>
could not be allocated,
-<SPAN
-CLASS="ERRORCODE"
->LWRES_R_SUCCESS</SPAN
->
-otherwise.</P
-><P
->Successful calls to the memory allocator
-<CODE
-CLASS="FUNCTION"
->lwres_context_allocmem()</CODE
->
+<span class="errorcode">LWRES_R_SUCCESS</span>
+otherwise.
+</p>
+<p>
+Successful calls to the memory allocator
+<code class="function">lwres_context_allocmem()</code>
return a pointer to the start of the allocated space.
-It returns NULL if memory could not be allocated.</P
-><P
-><SPAN
-CLASS="ERRORCODE"
->LWRES_R_SUCCESS</SPAN
->
+It returns NULL if memory could not be allocated.
+</p>
+<p>
+<span class="errorcode">LWRES_R_SUCCESS</span>
is returned when
-<CODE
-CLASS="FUNCTION"
->lwres_context_sendrecv()</CODE
->
+<code class="function">lwres_context_sendrecv()</code>
completes successfully.
-<SPAN
-CLASS="ERRORCODE"
->LWRES_R_IOERROR</SPAN
->
+<span class="errorcode">LWRES_R_IOERROR</span>
is returned if an I/O error occurs and
-<SPAN
-CLASS="ERRORCODE"
->LWRES_R_TIMEOUT</SPAN
->
+<span class="errorcode">LWRES_R_TIMEOUT</span>
is returned if
-<CODE
-CLASS="FUNCTION"
->lwres_context_sendrecv()</CODE
->
-times out waiting for a response.</P
-></DIV
-><DIV
-CLASS="REFSECT1"
-><A
-NAME="AEN130"
-></A
-><H2
->SEE ALSO</H2
-><P
-><SPAN
-CLASS="CITEREFENTRY"
-><SPAN
-CLASS="REFENTRYTITLE"
->lwres_conf_init</SPAN
->(3)</SPAN
->,
+<code class="function">lwres_context_sendrecv()</code>
+times out waiting for a response.
+</p>
+</div>
+<div class="refsect1" lang="en">
+<a name="id2526208"></a><h2>SEE ALSO</h2>
+<p>
+<span class="citerefentry"><span class="refentrytitle">lwres_conf_init</span>(3)</span>,
-<SPAN
-CLASS="CITEREFENTRY"
-><SPAN
-CLASS="REFENTRYTITLE"
->malloc</SPAN
->(3)</SPAN
->,
+<span class="citerefentry"><span class="refentrytitle">malloc</span>(3)</span>,
-<SPAN
-CLASS="CITEREFENTRY"
-><SPAN
-CLASS="REFENTRYTITLE"
->free</SPAN
->(3)</SPAN
->.</P
-></DIV
-></BODY
-></HTML
->
+<span class="citerefentry"><span class="refentrytitle">free</span>(3
+)</span>.
+</p>
+</div>
+</div></body>
+</html>
diff --git a/contrib/bind9/lib/lwres/man/lwres_gabn.3 b/contrib/bind9/lib/lwres/man/lwres_gabn.3
index a309f3e..60a56fe 100644
--- a/contrib/bind9/lib/lwres/man/lwres_gabn.3
+++ b/contrib/bind9/lib/lwres/man/lwres_gabn.3
@@ -1,91 +1,72 @@
-.\" Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
-.\" Copyright (C) 2000, 2001 Internet Software Consortium.
-.\"
+.\" Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
+.\" Copyright (C) 2000, 2001 Internet Software Consortium.
+.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
-.\"
+.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND 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,
+.\" 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.
.\"
-.\" $Id: lwres_gabn.3,v 1.13.2.1.8.1 2004/03/06 07:41:42 marka Exp $
+.\" $Id: lwres_gabn.3,v 1.13.2.1.8.5 2005/10/13 02:33:52 marka Exp $
.\"
-.TH "LWRES_GABN" "3" "Jun 30, 2000" "BIND9" ""
-.SH NAME
+.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.
+.TH "LWRES_GABN" "3" "Jun 30, 2000" "BIND9" "BIND9"
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.SH "NAME"
lwres_gabnrequest_render, lwres_gabnresponse_render, lwres_gabnrequest_parse, lwres_gabnresponse_parse, lwres_gabnresponse_free, lwres_gabnrequest_free \- lightweight resolver getaddrbyname message handling
-.SH SYNOPSIS
-\fB#include <lwres/lwres.h>
-.sp
-.na
-lwres_result_t
-lwres_gabnrequest_render(lwres_context_t *ctx, lwres_gabnrequest_t *req, lwres_lwpacket_t *pkt, lwres_buffer_t *b);
-.ad
-.sp
-.na
-lwres_result_t
-lwres_gabnresponse_render(lwres_context_t *ctx, lwres_gabnresponse_t *req, lwres_lwpacket_t *pkt, lwres_buffer_t *b);
-.ad
-.sp
-.na
-lwres_result_t
-lwres_gabnrequest_parse(lwres_context_t *ctx, lwres_buffer_t *b, lwres_lwpacket_t *pkt, lwres_gabnrequest_t **structp);
-.ad
-.sp
-.na
-lwres_result_t
-lwres_gabnresponse_parse(lwres_context_t *ctx, lwres_buffer_t *b, lwres_lwpacket_t *pkt, lwres_gabnresponse_t **structp);
-.ad
-.sp
-.na
-void
-lwres_gabnresponse_free(lwres_context_t *ctx, lwres_gabnresponse_t **structp);
-.ad
-.sp
-.na
-void
-lwres_gabnrequest_free(lwres_context_t *ctx, lwres_gabnrequest_t **structp);
-.ad
-\fR
+.SH "SYNOPSIS"
+.nf
+#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
+.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
+.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
+.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
+.HP 29
+\fBvoid\ \fBlwres_gabnresponse_free\fR\fR\fB(\fR\fBlwres_context_t\ *ctx\fR\fB, \fR\fBlwres_gabnresponse_t\ **structp\fR\fB);\fR
+.HP 28
+\fBvoid\ \fBlwres_gabnrequest_free\fR\fR\fB(\fR\fBlwres_context_t\ *ctx\fR\fB, \fR\fBlwres_gabnrequest_t\ **structp\fR\fB);\fR
.SH "DESCRIPTION"
.PP
-These are low-level routines for creating and parsing
-lightweight resolver name-to-address lookup request and
-response messages.
+These are low\-level routines for creating and parsing lightweight resolver name\-to\-address lookup request and response messages.
.PP
-There are four main functions for the getaddrbyname opcode.
-One render function converts a getaddrbyname request structure \(em
-\fBlwres_gabnrequest_t\fR \(em
-to the lighweight resolver's canonical format.
-It is complemented by a parse function that converts a packet in this
-canonical format to a getaddrbyname request structure.
-Another render function converts the getaddrbyname response structure \(em
-\fBlwres_gabnresponse_t\fR \(em
-to the canonical format.
-This is complemented by a parse function which converts a packet in
-canonical format to a getaddrbyname response structure.
+There are four main functions for the getaddrbyname opcode. One render function converts a getaddrbyname request structure \(em
+\fBlwres_gabnrequest_t\fR
+\(em to the lighweight resolver's canonical format. It is complemented by a parse function that converts a packet in this canonical format to a getaddrbyname request structure. Another render function converts the getaddrbyname response structure \(em
+\fBlwres_gabnresponse_t\fR
+\(em to the canonical format. This is complemented by a parse function which converts a packet in canonical format to a getaddrbyname response structure.
.PP
These structures are defined in
-\fI<lwres/lwres.h>\fR.
-They are shown below.
+\fI<lwres/lwres.h>\fR. They are shown below.
.sp
.nf
#define LWRES_OPCODE_GETADDRSBYNAME 0x00010001U
-
typedef struct lwres_addr lwres_addr_t;
typedef LWRES_LIST(lwres_addr_t) lwres_addrlist_t;
-
typedef struct {
lwres_uint32_t flags;
lwres_uint32_t addrtypes;
lwres_uint16_t namelen;
char *name;
} lwres_gabnrequest_t;
-
typedef struct {
lwres_uint32_t flags;
lwres_uint16_t naliases;
@@ -98,21 +79,18 @@ typedef struct {
void *base;
size_t baselen;
} lwres_gabnresponse_t;
-.sp
.fi
+.sp
.PP
\fBlwres_gabnrequest_render()\fR
uses resolver context
\fIctx\fR
to convert getaddrbyname request structure
\fIreq\fR
-to canonical format.
-The packet header structure
+to canonical format. The packet header structure
\fIpkt\fR
-is initialised and transferred to
-buffer
-\fIb\fR.
-The contents of
+is initialised and transferred to buffer
+\fIb\fR. The contents of
\fI*req\fR
are then appended to the buffer in canonical format.
\fBlwres_gabnresponse_render()\fR
@@ -127,11 +105,9 @@ to convert the contents of packet
\fIpkt\fR
to a
\fBlwres_gabnrequest_t\fR
-structure.
-Buffer
+structure. Buffer
\fIb\fR
-provides space to be used for storing this structure.
-When the function succeeds, the resulting
+provides space to be used for storing this structure. When the function succeeds, the resulting
\fBlwres_gabnrequest_t\fR
is made available through
\fI*structp\fR.
@@ -152,24 +128,20 @@ that was allocated to the
or
\fBlwres_gabnrequest_t\fR
structures referenced via
-\fIstructp\fR.
-Any memory associated with ancillary buffers and strings for those
-structures is also discarded.
+\fIstructp\fR. Any memory associated with ancillary buffers and strings for those structures is also discarded.
.SH "RETURN VALUES"
.PP
The getaddrbyname opcode functions
-\fBlwres_gabnrequest_render()\fR,
-\fBlwres_gabnresponse_render()\fR
-\fBlwres_gabnrequest_parse()\fR
+\fBlwres_gabnrequest_render()\fR,
+\fBlwres_gabnresponse_render()\fR\fBlwres_gabnrequest_parse()\fR
and
\fBlwres_gabnresponse_parse()\fR
all return
-LWRES_R_SUCCESS
-on success.
-They return
-LWRES_R_NOMEMORY
+\fBLWRES_R_SUCCESS\fR
+on success. They return
+\fBLWRES_R_NOMEMORY\fR
if memory allocation fails.
-LWRES_R_UNEXPECTEDEND
+\fBLWRES_R_UNEXPECTEDEND\fR
is returned if the available space in the buffer
\fIb\fR
is too small to accommodate the packet header or the
@@ -181,15 +153,14 @@ structures.
and
\fBlwres_gabnresponse_parse()\fR
will return
-LWRES_R_UNEXPECTEDEND
-if the buffer is not empty after decoding the received packet.
-These functions will return
-LWRES_R_FAILURE
+\fBLWRES_R_UNEXPECTEDEND\fR
+if the buffer is not empty after decoding the received packet. These functions will return
+\fBLWRES_R_FAILURE\fR
if
-\fBpktflags\fR
+pktflags
in the packet header structure
\fBlwres_lwpacket_t\fR
indicate that the packet is not a response to an earlier query.
.SH "SEE ALSO"
.PP
-\fBlwres_packet\fR(3)
+\fBlwres_packet\fR(3 )
diff --git a/contrib/bind9/lib/lwres/man/lwres_gabn.docbook b/contrib/bind9/lib/lwres/man/lwres_gabn.docbook
index cb9481f..6e90ea3 100644
--- a/contrib/bind9/lib/lwres/man/lwres_gabn.docbook
+++ b/contrib/bind9/lib/lwres/man/lwres_gabn.docbook
@@ -1,7 +1,9 @@
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.0//EN"
+ "http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd"
+ [<!ENTITY mdash "&#8212;">]>
<!--
- - Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
- - Copyright (C) 2001 Internet Software Consortium.
+ - Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
+ - Copyright (C) 2000, 2001 Internet Software Consortium.
-
- Permission to use, copy, modify, and distribute this software for any
- purpose with or without fee is hereby granted, provided that the above
@@ -16,7 +18,7 @@
- PERFORMANCE OF THIS SOFTWARE.
-->
-<!-- $Id: lwres_gabn.docbook,v 1.3.206.1 2004/03/06 08:15:38 marka Exp $ -->
+<!-- $Id: lwres_gabn.docbook,v 1.3.206.3 2005/05/12 21:36:12 sra Exp $ -->
<refentry>
<refentryinfo>
@@ -29,6 +31,20 @@
<manvolnum>3</manvolnum>
<refmiscinfo>BIND9</refmiscinfo>
</refmeta>
+
+ <docinfo>
+ <copyright>
+ <year>2004</year>
+ <year>2005</year>
+ <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
+ </copyright>
+ <copyright>
+ <year>2000</year>
+ <year>2001</year>
+ <holder>Internet Software Consortium.</holder>
+ </copyright>
+ </docinfo>
+
<refnamediv>
<refname>lwres_gabnrequest_render</refname>
<refname>lwres_gabnresponse_render</refname>
diff --git a/contrib/bind9/lib/lwres/man/lwres_gabn.html b/contrib/bind9/lib/lwres/man/lwres_gabn.html
index 6cb6614..7713945 100644
--- a/contrib/bind9/lib/lwres/man/lwres_gabn.html
+++ b/contrib/bind9/lib/lwres/man/lwres_gabn.html
@@ -1,158 +1,195 @@
<!--
- - Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
- - Copyright (C) 2001 Internet Software Consortium.
- -
+ - Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
+ - Copyright (C) 2000, 2001 Internet Software Consortium.
+ -
- Permission to use, copy, modify, and distribute this software for any
- purpose with or without fee is hereby granted, provided that the above
- copyright notice and this permission notice appear in all copies.
- -
+ -
- THE SOFTWARE IS PROVIDED "AS IS" AND 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,
+ - 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.
-->
-
-<!-- $Id: lwres_gabn.html,v 1.6.2.1.4.2 2004/08/22 23:39:03 marka Exp $ -->
-
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<HTML
-><HEAD
-><TITLE
->lwres_gabn</TITLE
-><META
-NAME="GENERATOR"
-CONTENT="Modular DocBook HTML Stylesheet Version 1.7"></HEAD
-><BODY
-CLASS="REFENTRY"
-BGCOLOR="#FFFFFF"
-TEXT="#000000"
-LINK="#0000FF"
-VLINK="#840084"
-ALINK="#0000FF"
-><H1
-><A
-NAME="AEN1"
-></A
->lwres_gabn</H1
-><DIV
-CLASS="REFNAMEDIV"
-><A
-NAME="AEN8"
-></A
-><H2
->Name</H2
->lwres_gabnrequest_render, lwres_gabnresponse_render, lwres_gabnrequest_parse, lwres_gabnresponse_parse, lwres_gabnresponse_free, lwres_gabnrequest_free&nbsp;--&nbsp;lightweight resolver getaddrbyname message handling</DIV
-><DIV
-CLASS="REFSYNOPSISDIV"
-><A
-NAME="AEN16"
-></A
-><H2
->Synopsis</H2
-><DIV
-CLASS="FUNCSYNOPSIS"
-><P
-></P
-><A
-NAME="AEN17"
-></A
-><PRE
-CLASS="FUNCSYNOPSISINFO"
->#include &lt;lwres/lwres.h&gt;</PRE
-><P
-><CODE
-><CODE
-CLASS="FUNCDEF"
->lwres_result_t
-lwres_gabnrequest_render</CODE
->(lwres_context_t *ctx, lwres_gabnrequest_t *req, lwres_lwpacket_t *pkt, lwres_buffer_t *b);</CODE
-></P
-><P
-><CODE
-><CODE
-CLASS="FUNCDEF"
->lwres_result_t
-lwres_gabnresponse_render</CODE
->(lwres_context_t *ctx, lwres_gabnresponse_t *req, lwres_lwpacket_t *pkt, lwres_buffer_t *b);</CODE
-></P
-><P
-><CODE
-><CODE
-CLASS="FUNCDEF"
->lwres_result_t
-lwres_gabnrequest_parse</CODE
->(lwres_context_t *ctx, lwres_buffer_t *b, lwres_lwpacket_t *pkt, lwres_gabnrequest_t **structp);</CODE
-></P
-><P
-><CODE
-><CODE
-CLASS="FUNCDEF"
->lwres_result_t
-lwres_gabnresponse_parse</CODE
->(lwres_context_t *ctx, lwres_buffer_t *b, lwres_lwpacket_t *pkt, lwres_gabnresponse_t **structp);</CODE
-></P
-><P
-><CODE
-><CODE
-CLASS="FUNCDEF"
->void
-lwres_gabnresponse_free</CODE
->(lwres_context_t *ctx, lwres_gabnresponse_t **structp);</CODE
-></P
-><P
-><CODE
-><CODE
-CLASS="FUNCDEF"
->void
-lwres_gabnrequest_free</CODE
->(lwres_context_t *ctx, lwres_gabnrequest_t **structp);</CODE
-></P
-><P
-></P
-></DIV
-></DIV
-><DIV
-CLASS="REFSECT1"
-><A
-NAME="AEN57"
-></A
-><H2
->DESCRIPTION</H2
-><P
->These are low-level routines for creating and parsing
+<!-- $Id: lwres_gabn.html,v 1.6.2.1.4.9 2005/10/13 02:33:55 marka Exp $ -->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>lwres_gabn</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en">
+<a name="id2463721"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2>Name</h2>
+<p>lwres_gabnrequest_render, lwres_gabnresponse_render, lwres_gabnrequest_parse, lwres_gabnresponse_parse, lwres_gabnresponse_free, lwres_gabnrequest_free &#8212; lightweight resolver getaddrbyname message handling</p>
+</div>
+<div class="refsynopsisdiv">
+<h2>Synopsis</h2>
+<div class="funcsynopsis">
+<pre class="funcsynopsisinfo">#include &lt;lwres/lwres.h&gt;</pre>
+<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em">
+<tr>
+<td><code class="funcdef">
+lwres_result_t
+<b class="fsfunc">lwres_gabnrequest_render</b>(</code></td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>
+<code>)</code>;</td>
+</tr>
+</table>
+<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em">
+<tr>
+<td><code class="funcdef">
+lwres_result_t
+<b class="fsfunc">lwres_gabnresponse_render</b>(</code></td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>
+<code>)</code>;</td>
+</tr>
+</table>
+<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em">
+<tr>
+<td><code class="funcdef">
+lwres_result_t
+<b class="fsfunc">lwres_gabnrequest_parse</b>(</code></td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>
+<code>)</code>;</td>
+</tr>
+</table>
+<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em">
+<tr>
+<td><code class="funcdef">
+lwres_result_t
+<b class="fsfunc">lwres_gabnresponse_parse</b>(</code></td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>
+<code>)</code>;</td>
+</tr>
+</table>
+<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em">
+<tr>
+<td><code class="funcdef">
+void
+<b class="fsfunc">lwres_gabnresponse_free</b>(</code></td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>
+<code>)</code>;</td>
+</tr>
+</table>
+<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0">
+<tr>
+<td><code class="funcdef">
+void
+<b class="fsfunc">lwres_gabnrequest_free</b>(</code></td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>
+<code>)</code>;</td>
+</tr>
+</table>
+</div>
+</div>
+<div class="refsect1" lang="en">
+<a name="id2525963"></a><h2>DESCRIPTION</h2>
+<p>
+These are low-level routines for creating and parsing
lightweight resolver name-to-address lookup request and
-response messages.</P
-><P
->There are four main functions for the getaddrbyname opcode.
-One render function converts a getaddrbyname request structure &mdash;
-<SPAN
-CLASS="TYPE"
->lwres_gabnrequest_t</SPAN
-> &mdash;
+response messages.
+</p>
+<p>
+There are four main functions for the getaddrbyname opcode.
+One render function converts a getaddrbyname request structure &#8212;
+<span class="type">lwres_gabnrequest_t</span> &#8212;
to the lighweight resolver's canonical format.
It is complemented by a parse function that converts a packet in this
canonical format to a getaddrbyname request structure.
-Another render function converts the getaddrbyname response structure &mdash;
-<SPAN
-CLASS="TYPE"
->lwres_gabnresponse_t</SPAN
-> &mdash;
+Another render function converts the getaddrbyname response structure &#8212;
+<span class="type">lwres_gabnresponse_t</span> &#8212;
to the canonical format.
This is complemented by a parse function which converts a packet in
-canonical format to a getaddrbyname response structure.</P
-><P
->These structures are defined in
-<TT
-CLASS="FILENAME"
->&lt;lwres/lwres.h&gt;</TT
->.
+canonical format to a getaddrbyname response structure.
+</p>
+<p>
+These structures are defined in
+<code class="filename">&lt;lwres/lwres.h&gt;</code>.
They are shown below.
-<PRE
-CLASS="PROGRAMLISTING"
->#define LWRES_OPCODE_GETADDRSBYNAME 0x00010001U
+</p>
+<pre class="programlisting">
+#define LWRES_OPCODE_GETADDRSBYNAME 0x00010001U
typedef struct lwres_addr lwres_addr_t;
typedef LWRES_LIST(lwres_addr_t) lwres_addrlist_t;
@@ -175,245 +212,116 @@ typedef struct {
lwres_addrlist_t addrs;
void *base;
size_t baselen;
-} lwres_gabnresponse_t;</PRE
-></P
-><P
-><CODE
-CLASS="FUNCTION"
->lwres_gabnrequest_render()</CODE
->
+} lwres_gabnresponse_t;
+</pre>
+<p>
+</p>
+<p>
+<code class="function">lwres_gabnrequest_render()</code>
uses resolver context
-<VAR
-CLASS="PARAMETER"
->ctx</VAR
->
+<em class="parameter"><code>ctx</code></em>
to convert getaddrbyname request structure
-<VAR
-CLASS="PARAMETER"
->req</VAR
->
+<em class="parameter"><code>req</code></em>
to canonical format.
The packet header structure
-<VAR
-CLASS="PARAMETER"
->pkt</VAR
->
+<em class="parameter"><code>pkt</code></em>
is initialised and transferred to
buffer
-<VAR
-CLASS="PARAMETER"
->b</VAR
->.
+<em class="parameter"><code>b</code></em>.
The contents of
-<VAR
-CLASS="PARAMETER"
->*req</VAR
->
+<em class="parameter"><code>*req</code></em>
are then appended to the buffer in canonical format.
-<CODE
-CLASS="FUNCTION"
->lwres_gabnresponse_render()</CODE
->
+<code class="function">lwres_gabnresponse_render()</code>
performs the same task, except it converts a getaddrbyname response structure
-<SPAN
-CLASS="TYPE"
->lwres_gabnresponse_t</SPAN
->
-to the lightweight resolver's canonical format.</P
-><P
-><CODE
-CLASS="FUNCTION"
->lwres_gabnrequest_parse()</CODE
->
+<span class="type">lwres_gabnresponse_t</span>
+to the lightweight resolver's canonical format.
+</p>
+<p>
+<code class="function">lwres_gabnrequest_parse()</code>
uses context
-<VAR
-CLASS="PARAMETER"
->ctx</VAR
->
+<em class="parameter"><code>ctx</code></em>
to convert the contents of packet
-<VAR
-CLASS="PARAMETER"
->pkt</VAR
->
+<em class="parameter"><code>pkt</code></em>
to a
-<SPAN
-CLASS="TYPE"
->lwres_gabnrequest_t</SPAN
->
+<span class="type">lwres_gabnrequest_t</span>
structure.
Buffer
-<VAR
-CLASS="PARAMETER"
->b</VAR
->
+<em class="parameter"><code>b</code></em>
provides space to be used for storing this structure.
When the function succeeds, the resulting
-<SPAN
-CLASS="TYPE"
->lwres_gabnrequest_t</SPAN
->
+<span class="type">lwres_gabnrequest_t</span>
is made available through
-<VAR
-CLASS="PARAMETER"
->*structp</VAR
->.
+<em class="parameter"><code>*structp</code></em>.
-<CODE
-CLASS="FUNCTION"
->lwres_gabnresponse_parse()</CODE
->
+<code class="function">lwres_gabnresponse_parse()</code>
offers the same semantics as
-<CODE
-CLASS="FUNCTION"
->lwres_gabnrequest_parse()</CODE
->
+<code class="function">lwres_gabnrequest_parse()</code>
except it yields a
-<SPAN
-CLASS="TYPE"
->lwres_gabnresponse_t</SPAN
->
-structure.</P
-><P
-><CODE
-CLASS="FUNCTION"
->lwres_gabnresponse_free()</CODE
->
+<span class="type">lwres_gabnresponse_t</span>
+structure.
+</p>
+<p>
+<code class="function">lwres_gabnresponse_free()</code>
and
-<CODE
-CLASS="FUNCTION"
->lwres_gabnrequest_free()</CODE
->
+<code class="function">lwres_gabnrequest_free()</code>
release the memory in resolver context
-<VAR
-CLASS="PARAMETER"
->ctx</VAR
->
+<em class="parameter"><code>ctx</code></em>
that was allocated to the
-<SPAN
-CLASS="TYPE"
->lwres_gabnresponse_t</SPAN
->
+<span class="type">lwres_gabnresponse_t</span>
or
-<SPAN
-CLASS="TYPE"
->lwres_gabnrequest_t</SPAN
->
+<span class="type">lwres_gabnrequest_t</span>
structures referenced via
-<VAR
-CLASS="PARAMETER"
->structp</VAR
->.
+<em class="parameter"><code>structp</code></em>.
Any memory associated with ancillary buffers and strings for those
-structures is also discarded.</P
-></DIV
-><DIV
-CLASS="REFSECT1"
-><A
-NAME="AEN93"
-></A
-><H2
->RETURN VALUES</H2
-><P
->The getaddrbyname opcode functions
-<CODE
-CLASS="FUNCTION"
->lwres_gabnrequest_render()</CODE
->,
-<CODE
-CLASS="FUNCTION"
->lwres_gabnresponse_render()</CODE
->
-<CODE
-CLASS="FUNCTION"
->lwres_gabnrequest_parse()</CODE
->
+structures is also discarded.
+</p>
+</div>
+<div class="refsect1" lang="en">
+<a name="id2526155"></a><h2>RETURN VALUES</h2>
+<p>
+The getaddrbyname opcode functions
+<code class="function">lwres_gabnrequest_render()</code>,
+<code class="function">lwres_gabnresponse_render()</code>
+<code class="function">lwres_gabnrequest_parse()</code>
and
-<CODE
-CLASS="FUNCTION"
->lwres_gabnresponse_parse()</CODE
->
+<code class="function">lwres_gabnresponse_parse()</code>
all return
-<SPAN
-CLASS="ERRORCODE"
->LWRES_R_SUCCESS</SPAN
->
+<span class="errorcode">LWRES_R_SUCCESS</span>
on success.
They return
-<SPAN
-CLASS="ERRORCODE"
->LWRES_R_NOMEMORY</SPAN
->
+<span class="errorcode">LWRES_R_NOMEMORY</span>
if memory allocation fails.
-<SPAN
-CLASS="ERRORCODE"
->LWRES_R_UNEXPECTEDEND</SPAN
->
+<span class="errorcode">LWRES_R_UNEXPECTEDEND</span>
is returned if the available space in the buffer
-<VAR
-CLASS="PARAMETER"
->b</VAR
->
+<em class="parameter"><code>b</code></em>
is too small to accommodate the packet header or the
-<SPAN
-CLASS="TYPE"
->lwres_gabnrequest_t</SPAN
->
+<span class="type">lwres_gabnrequest_t</span>
and
-<SPAN
-CLASS="TYPE"
->lwres_gabnresponse_t</SPAN
->
+<span class="type">lwres_gabnresponse_t</span>
structures.
-<CODE
-CLASS="FUNCTION"
->lwres_gabnrequest_parse()</CODE
->
+<code class="function">lwres_gabnrequest_parse()</code>
and
-<CODE
-CLASS="FUNCTION"
->lwres_gabnresponse_parse()</CODE
->
+<code class="function">lwres_gabnresponse_parse()</code>
will return
-<SPAN
-CLASS="ERRORCODE"
->LWRES_R_UNEXPECTEDEND</SPAN
->
+<span class="errorcode">LWRES_R_UNEXPECTEDEND</span>
if the buffer is not empty after decoding the received packet.
These functions will return
-<SPAN
-CLASS="ERRORCODE"
->LWRES_R_FAILURE</SPAN
->
+<span class="errorcode">LWRES_R_FAILURE</span>
if
-<CODE
-CLASS="STRUCTFIELD"
->pktflags</CODE
->
+<em class="structfield"><code>pktflags</code></em>
in the packet header structure
-<SPAN
-CLASS="TYPE"
->lwres_lwpacket_t</SPAN
->
-indicate that the packet is not a response to an earlier query.</P
-></DIV
-><DIV
-CLASS="REFSECT1"
-><A
-NAME="AEN112"
-></A
-><H2
->SEE ALSO</H2
-><P
-><SPAN
-CLASS="CITEREFENTRY"
-><SPAN
-CLASS="REFENTRYTITLE"
->lwres_packet</SPAN
->(3)</SPAN
-></P
-></DIV
-></BODY
-></HTML
->
+<span class="type">lwres_lwpacket_t</span>
+indicate that the packet is not a response to an earlier query.
+</p>
+</div>
+<div class="refsect1" lang="en">
+<a name="id2526220"></a><h2>SEE ALSO</h2>
+<p>
+<span class="citerefentry"><span class="refentrytitle">lwres_packet</span>(3
+)</span>
+</p>
+</div>
+</div></body>
+</html>
diff --git a/contrib/bind9/lib/lwres/man/lwres_gai_strerror.3 b/contrib/bind9/lib/lwres/man/lwres_gai_strerror.3
index ea75066..388c59e 100644
--- a/contrib/bind9/lib/lwres/man/lwres_gai_strerror.3
+++ b/contrib/bind9/lib/lwres/man/lwres_gai_strerror.3
@@ -1,37 +1,44 @@
-.\" Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
-.\" Copyright (C) 2000, 2001 Internet Software Consortium.
-.\"
+.\" Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
+.\" Copyright (C) 2000, 2001 Internet Software Consortium.
+.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
-.\"
+.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND 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,
+.\" 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.
.\"
-.\" $Id: lwres_gai_strerror.3,v 1.13.2.1.8.1 2004/03/06 07:41:43 marka Exp $
+.\" $Id: lwres_gai_strerror.3,v 1.13.2.1.8.5 2005/10/13 02:33:52 marka Exp $
.\"
-.TH "LWRES_GAI_STRERROR" "3" "Jun 30, 2000" "BIND9" ""
-.SH NAME
+.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.
+.TH "LWRES_GAI_STRERROR" "3" "Jun 30, 2000" "BIND9" "BIND9"
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.SH "NAME"
gai_strerror \- print suitable error string
-.SH SYNOPSIS
-\fB#include <lwres/netdb.h>
-.sp
-.na
-char *
-gai_strerror(int ecode);
-.ad
-\fR
+.SH "SYNOPSIS"
+.nf
+#include <lwres/netdb.h>
+.fi
+.HP 20
+\fBchar\ *\ \fBgai_strerror\fR\fR\fB(\fR\fBint\ ecode\fR\fB);\fR
.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
+\fBgetaddrinfo()\fR. The following error codes and their meaning are defined in
\fIinclude/lwres/netdb.h\fR.
.TP
\fBEAI_ADDRFAMILY\fR
@@ -42,13 +49,14 @@ temporary failure in name resolution
.TP
\fBEAI_BADFLAGS\fR
invalid value for
-ai_flags
+\fBai_flags\fR
.TP
\fBEAI_FAIL\fR
-non-recoverable failure in name resolution
+non\-recoverable failure in name resolution
.TP
\fBEAI_FAMILY\fR
-ai_family not supported
+\fBai_family\fR
+not supported
.TP
\fBEAI_MEMORY\fR
memory allocation failure
@@ -60,22 +68,25 @@ no address associated with hostname
hostname or servname not provided, or not known
.TP
\fBEAI_SERVICE\fR
-servname not supported for ai_socktype
+servname not supported for
+\fBai_socktype\fR
.TP
\fBEAI_SOCKTYPE\fR
-ai_socktype not supported
+\fBai_socktype\fR
+not supported
.TP
\fBEAI_SYSTEM\fR
system error returned in errno
-.PP
-The message \fBinvalid error code\fR is returned if
+The message
+invalid error code
+is returned if
\fIecode\fR
is out of range.
.PP
-ai_flags,
-ai_family
+\fBai_flags\fR,
+\fBai_family\fR
and
-ai_socktype
+\fBai_socktype\fR
are elements of the
\fBstruct addrinfo\fR
used by
@@ -85,4 +96,4 @@ used by
\fBstrerror\fR(3),
\fBlwres_getaddrinfo\fR(3),
\fBgetaddrinfo\fR(3),
-\fBRFC2133\fR.
+\fBRFC2133\fR().
diff --git a/contrib/bind9/lib/lwres/man/lwres_gai_strerror.docbook b/contrib/bind9/lib/lwres/man/lwres_gai_strerror.docbook
index 475d444..f34836d 100644
--- a/contrib/bind9/lib/lwres/man/lwres_gai_strerror.docbook
+++ b/contrib/bind9/lib/lwres/man/lwres_gai_strerror.docbook
@@ -1,7 +1,9 @@
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.0//EN"
+ "http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd"
+ [<!ENTITY mdash "&#8212;">]>
<!--
- - Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
- - Copyright (C) 2001 Internet Software Consortium.
+ - Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
+ - Copyright (C) 2000, 2001 Internet Software Consortium.
-
- Permission to use, copy, modify, and distribute this software for any
- purpose with or without fee is hereby granted, provided that the above
@@ -16,7 +18,7 @@
- PERFORMANCE OF THIS SOFTWARE.
-->
-<!-- $Id: lwres_gai_strerror.docbook,v 1.3.206.1 2004/03/06 08:15:38 marka Exp $ -->
+<!-- $Id: lwres_gai_strerror.docbook,v 1.3.206.3 2005/05/12 21:36:13 sra Exp $ -->
<refentry>
<refentryinfo>
@@ -29,6 +31,20 @@
<manvolnum>3</manvolnum>
<refmiscinfo>BIND9</refmiscinfo>
</refmeta>
+
+ <docinfo>
+ <copyright>
+ <year>2004</year>
+ <year>2005</year>
+ <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
+ </copyright>
+ <copyright>
+ <year>2000</year>
+ <year>2001</year>
+ <holder>Internet Software Consortium.</holder>
+ </copyright>
+ </docinfo>
+
<refnamediv>
<refname>gai_strerror</refname>
<refpurpose>print suitable error string</refpurpose>
diff --git a/contrib/bind9/lib/lwres/man/lwres_gai_strerror.html b/contrib/bind9/lib/lwres/man/lwres_gai_strerror.html
index 45dc5cb..5506564 100644
--- a/contrib/bind9/lib/lwres/man/lwres_gai_strerror.html
+++ b/contrib/bind9/lib/lwres/man/lwres_gai_strerror.html
@@ -1,295 +1,124 @@
<!--
- - Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
- - Copyright (C) 2001 Internet Software Consortium.
- -
+ - Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
+ - Copyright (C) 2000, 2001 Internet Software Consortium.
+ -
- Permission to use, copy, modify, and distribute this software for any
- purpose with or without fee is hereby granted, provided that the above
- copyright notice and this permission notice appear in all copies.
- -
+ -
- THE SOFTWARE IS PROVIDED "AS IS" AND 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,
+ - 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.
-->
-
-<!-- $Id: lwres_gai_strerror.html,v 1.5.2.1.4.2 2004/08/22 23:39:03 marka Exp $ -->
-
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<HTML
-><HEAD
-><TITLE
->lwres_gai_strerror</TITLE
-><META
-NAME="GENERATOR"
-CONTENT="Modular DocBook HTML Stylesheet Version 1.7"></HEAD
-><BODY
-CLASS="REFENTRY"
-BGCOLOR="#FFFFFF"
-TEXT="#000000"
-LINK="#0000FF"
-VLINK="#840084"
-ALINK="#0000FF"
-><H1
-><A
-NAME="AEN1"
-></A
->lwres_gai_strerror</H1
-><DIV
-CLASS="REFNAMEDIV"
-><A
-NAME="AEN8"
-></A
-><H2
->Name</H2
->gai_strerror&nbsp;--&nbsp;print suitable error string</DIV
-><DIV
-CLASS="REFSYNOPSISDIV"
-><A
-NAME="AEN11"
-></A
-><H2
->Synopsis</H2
-><DIV
-CLASS="FUNCSYNOPSIS"
-><P
-></P
-><A
-NAME="AEN12"
-></A
-><PRE
-CLASS="FUNCSYNOPSISINFO"
->#include &lt;lwres/netdb.h&gt;</PRE
-><P
-><CODE
-><CODE
-CLASS="FUNCDEF"
->char *
-gai_strerror</CODE
->(int ecode);</CODE
-></P
-><P
-></P
-></DIV
-></DIV
-><DIV
-CLASS="REFSECT1"
-><A
-NAME="AEN18"
-></A
-><H2
->DESCRIPTION</H2
-><P
-><CODE
-CLASS="FUNCTION"
->lwres_gai_strerror()</CODE
->
+<!-- $Id: lwres_gai_strerror.html,v 1.5.2.1.4.9 2005/10/13 02:33:55 marka Exp $ -->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>lwres_gai_strerror</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en">
+<a name="id2463721"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2>Name</h2>
+<p>gai_strerror &#8212; print suitable error string</p>
+</div>
+<div class="refsynopsisdiv">
+<h2>Synopsis</h2>
+<div class="funcsynopsis">
+<pre class="funcsynopsisinfo">#include &lt;lwres/netdb.h&gt;</pre>
+<p><code class="funcdef">
+char *
+<b class="fsfunc">gai_strerror</b>(</code>int ecode<code>)</code>;</p>
+</div>
+</div>
+<div class="refsect1" lang="en">
+<a name="id2525843"></a><h2>DESCRIPTION</h2>
+<p>
+<code class="function">lwres_gai_strerror()</code>
returns an error message corresponding to an error code returned by
-<CODE
-CLASS="FUNCTION"
->getaddrinfo()</CODE
->.
+<code class="function">getaddrinfo()</code>.
The following error codes and their meaning are defined in
-<TT
-CLASS="FILENAME"
->include/lwres/netdb.h</TT
->.
-<P
-></P
-><DIV
-CLASS="VARIABLELIST"
-><DL
-><DT
-><SPAN
-CLASS="ERRORCODE"
->EAI_ADDRFAMILY</SPAN
-></DT
-><DD
-><P
->address family for hostname not supported</P
-></DD
-><DT
-><SPAN
-CLASS="ERRORCODE"
->EAI_AGAIN</SPAN
-></DT
-><DD
-><P
->temporary failure in name resolution</P
-></DD
-><DT
-><SPAN
-CLASS="ERRORCODE"
->EAI_BADFLAGS</SPAN
-></DT
-><DD
-><P
->invalid value for
-<CODE
-CLASS="CONSTANT"
->ai_flags</CODE
-></P
-></DD
-><DT
-><SPAN
-CLASS="ERRORCODE"
->EAI_FAIL</SPAN
-></DT
-><DD
-><P
->non-recoverable failure in name resolution</P
-></DD
-><DT
-><SPAN
-CLASS="ERRORCODE"
->EAI_FAMILY</SPAN
-></DT
-><DD
-><P
-><CODE
-CLASS="CONSTANT"
->ai_family</CODE
-> not supported</P
-></DD
-><DT
-><SPAN
-CLASS="ERRORCODE"
->EAI_MEMORY</SPAN
-></DT
-><DD
-><P
->memory allocation failure</P
-></DD
-><DT
-><SPAN
-CLASS="ERRORCODE"
->EAI_NODATA</SPAN
-></DT
-><DD
-><P
->no address associated with hostname</P
-></DD
-><DT
-><SPAN
-CLASS="ERRORCODE"
->EAI_NONAME</SPAN
-></DT
-><DD
-><P
->hostname or servname not provided, or not known</P
-></DD
-><DT
-><SPAN
-CLASS="ERRORCODE"
->EAI_SERVICE</SPAN
-></DT
-><DD
-><P
->servname not supported for <CODE
-CLASS="CONSTANT"
->ai_socktype</CODE
-></P
-></DD
-><DT
-><SPAN
-CLASS="ERRORCODE"
->EAI_SOCKTYPE</SPAN
-></DT
-><DD
-><P
-><CODE
-CLASS="CONSTANT"
->ai_socktype</CODE
-> not supported</P
-></DD
-><DT
-><SPAN
-CLASS="ERRORCODE"
->EAI_SYSTEM</SPAN
-></DT
-><DD
-><P
->system error returned in errno</P
-></DD
-></DL
-></DIV
->
-The message <SPAN
-CLASS="ERRORNAME"
->invalid error code</SPAN
-> is returned if
-<VAR
-CLASS="PARAMETER"
->ecode</VAR
->
-is out of range.</P
-><P
-><CODE
-CLASS="CONSTANT"
->ai_flags</CODE
->,
-<CODE
-CLASS="CONSTANT"
->ai_family</CODE
->
+<code class="filename">include/lwres/netdb.h</code>.
+</p>
+<div class="variablelist"><dl>
+<dt><span class="term"><span class="errorcode">EAI_ADDRFAMILY</span></span></dt>
+<dd><p>
+address family for hostname not supported
+</p></dd>
+<dt><span class="term"><span class="errorcode">EAI_AGAIN</span></span></dt>
+<dd><p>
+temporary failure in name resolution
+</p></dd>
+<dt><span class="term"><span class="errorcode">EAI_BADFLAGS</span></span></dt>
+<dd><p>
+invalid value for
+<code class="constant">ai_flags</code>
+</p></dd>
+<dt><span class="term"><span class="errorcode">EAI_FAIL</span></span></dt>
+<dd><p>
+non-recoverable failure in name resolution
+</p></dd>
+<dt><span class="term"><span class="errorcode">EAI_FAMILY</span></span></dt>
+<dd><p>
+<code class="constant">ai_family</code> not supported
+</p></dd>
+<dt><span class="term"><span class="errorcode">EAI_MEMORY</span></span></dt>
+<dd><p>
+memory allocation failure
+</p></dd>
+<dt><span class="term"><span class="errorcode">EAI_NODATA</span></span></dt>
+<dd><p>
+no address associated with hostname
+</p></dd>
+<dt><span class="term"><span class="errorcode">EAI_NONAME</span></span></dt>
+<dd><p>
+hostname or servname not provided, or not known
+</p></dd>
+<dt><span class="term"><span class="errorcode">EAI_SERVICE</span></span></dt>
+<dd><p>
+servname not supported for <code class="constant">ai_socktype</code>
+</p></dd>
+<dt><span class="term"><span class="errorcode">EAI_SOCKTYPE</span></span></dt>
+<dd><p>
+<code class="constant">ai_socktype</code> not supported
+</p></dd>
+<dt><span class="term"><span class="errorcode">EAI_SYSTEM</span></span></dt>
+<dd><p>
+system error returned in errno
+</p></dd>
+</dl></div>
+<p>
+The message <span class="errorname">invalid error code</span> is returned if
+<em class="parameter"><code>ecode</code></em>
+is out of range.
+</p>
+<p>
+<code class="constant">ai_flags</code>,
+<code class="constant">ai_family</code>
and
-<CODE
-CLASS="CONSTANT"
->ai_socktype</CODE
->
+<code class="constant">ai_socktype</code>
are elements of the
-<SPAN
-CLASS="TYPE"
->struct addrinfo</SPAN
->
+<span class="type">struct addrinfo</span>
used by
-<CODE
-CLASS="FUNCTION"
->lwres_getaddrinfo()</CODE
->.</P
-></DIV
-><DIV
-CLASS="REFSECT1"
-><A
-NAME="AEN92"
-></A
-><H2
->SEE ALSO</H2
-><P
-><SPAN
-CLASS="CITEREFENTRY"
-><SPAN
-CLASS="REFENTRYTITLE"
->strerror</SPAN
->(3)</SPAN
->,
+<code class="function">lwres_getaddrinfo()</code>.
+</p>
+</div>
+<div class="refsect1" lang="en">
+<a name="id2526040"></a><h2>SEE ALSO</h2>
+<p>
+<span class="citerefentry"><span class="refentrytitle">strerror</span>(3)</span>,
-<SPAN
-CLASS="CITEREFENTRY"
-><SPAN
-CLASS="REFENTRYTITLE"
->lwres_getaddrinfo</SPAN
->(3)</SPAN
->,
+<span class="citerefentry"><span class="refentrytitle">lwres_getaddrinfo</span>(3)</span>,
-<SPAN
-CLASS="CITEREFENTRY"
-><SPAN
-CLASS="REFENTRYTITLE"
->getaddrinfo</SPAN
->(3)</SPAN
->,
+<span class="citerefentry"><span class="refentrytitle">getaddrinfo</span>(3)</span>,
-<SPAN
-CLASS="CITEREFENTRY"
-><SPAN
-CLASS="REFENTRYTITLE"
->RFC2133</SPAN
-></SPAN
->.</P
-></DIV
-></BODY
-></HTML
->
+<span class="citerefentry"><span class="refentrytitle">RFC2133</span></span>.
+</p>
+</div>
+</div></body>
+</html>
diff --git a/contrib/bind9/lib/lwres/man/lwres_getaddrinfo.3 b/contrib/bind9/lib/lwres/man/lwres_getaddrinfo.3
index d360b3e..df1390a 100644
--- a/contrib/bind9/lib/lwres/man/lwres_getaddrinfo.3
+++ b/contrib/bind9/lib/lwres/man/lwres_getaddrinfo.3
@@ -1,40 +1,44 @@
-.\" Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
-.\" Copyright (C) 2000, 2001 Internet Software Consortium.
-.\"
+.\" Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
+.\" Copyright (C) 2000, 2001, 2003 Internet Software Consortium.
+.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
-.\"
+.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND 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,
+.\" 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.
.\"
-.\" $Id: lwres_getaddrinfo.3,v 1.16.2.1.8.2 2004/03/06 07:41:43 marka Exp $
+.\" $Id: lwres_getaddrinfo.3,v 1.16.2.1.8.6 2005/10/13 02:33:53 marka Exp $
.\"
-.TH "LWRES_GETADDRINFO" "3" "Jun 30, 2000" "BIND9" ""
-.SH NAME
+.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.
+.TH "LWRES_GETADDRINFO" "3" "Jun 30, 2000" "BIND9" "BIND9"
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.SH "NAME"
lwres_getaddrinfo, lwres_freeaddrinfo \- socket address structure to host and service name
-.SH SYNOPSIS
-\fB#include <lwres/netdb.h>
-.sp
-.na
-int
-lwres_getaddrinfo(const char *hostname, const char *servname, const struct addrinfo *hints, struct addrinfo **res);
-.ad
-.sp
-.na
-void
-lwres_freeaddrinfo(struct addrinfo *ai);
-.ad
-\fR
+.SH "SYNOPSIS"
+.nf
+#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
+.HP 24
+\fBvoid\ \fBlwres_freeaddrinfo\fR\fR\fB(\fR\fBstruct\ addrinfo\ *ai\fR\fB);\fR
.PP
If the operating system does not provide a
-\fBstruct addrinfo\fR,
-the following structure is used:
+\fBstruct addrinfo\fR, the following structure is used:
.sp
.nf
struct addrinfo {
@@ -47,47 +51,38 @@ struct addrinfo {
struct sockaddr *ai_addr; /* binary address */
struct addrinfo *ai_next; /* next structure in linked list */
};
-.sp
.fi
+.sp
.SH "DESCRIPTION"
.PP
\fBlwres_getaddrinfo()\fR
is used to get a list of IP addresses and port numbers for host
\fIhostname\fR
and service
-\fIservname\fR.
-The function is the lightweight resolver's implementation of
+\fIservname\fR. The function is the lightweight resolver's implementation of
\fBgetaddrinfo()\fR
as defined in RFC2133.
\fIhostname\fR
and
\fIservname\fR
-are pointers to null-terminated
-strings or
+are pointers to null\-terminated strings or
\fBNULL\fR.
\fIhostname\fR
-is either a host name or a numeric host address string: a dotted decimal
-IPv4 address or an IPv6 address.
+is either a host name or a numeric host address string: a dotted decimal IPv4 address or an IPv6 address.
\fIservname\fR
is either a decimal port number or a service name as listed in
\fI/etc/services\fR.
.PP
\fIhints\fR
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
+\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
\fBai_family\fR
-The protocol family that should be used.
-When
-ai_family
+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.
+\fBPF_UNSPEC\fR, it means the caller will accept any protocol family supported by the operating system.
.TP
\fBai_socktype\fR
denotes the type of socket \(em
@@ -95,122 +90,107 @@ denotes the type of socket \(em
\fBSOCK_DGRAM\fR
or
\fBSOCK_RAW\fR
-\(em that is wanted.
-When
-ai_socktype
+\(em that is wanted. When
+\fBai_socktype\fR
is zero the caller will accept any socket type.
.TP
\fBai_protocol\fR
-indicates which transport protocol is wanted: IPPROTO_UDP or
-IPPROTO_TCP.
-If
-ai_protocol
+indicates which transport protocol is wanted: IPPROTO_UDP or IPPROTO_TCP. If
+\fBai_protocol\fR
is zero the caller will accept any protocol.
.TP
\fBai_flags\fR
-Flag bits.
-If the
+Flag bits. If the
\fBAI_CANONNAME\fR
bit is set, a successful call to
\fBlwres_getaddrinfo()\fR
-will return a null-terminated string containing the canonical name
-of the specified hostname in
-ai_canonname
+will return a null\-terminated string containing the canonical name of the specified hostname in
+\fBai_canonname\fR
of the first
\fBaddrinfo\fR
-structure returned.
-Setting the
+structure returned. Setting the
\fBAI_PASSIVE\fR
-bit indicates that the returned socket address structure is intended
-for used in a call to
-\fBbind\fR(2).
-In this case, if the hostname argument is a
+bit indicates that the returned socket address structure is intended for used in a call to
+\fBbind\fR(2). In this case, if the hostname argument is a
\fBNULL\fR
-pointer, then the IP address portion of the socket
-address structure will be set to
+pointer, then the IP address portion of the socket address structure will be set to
\fBINADDR_ANY\fR
for an IPv4 address or
\fBIN6ADDR_ANY_INIT\fR
for an IPv6 address.
-
+.sp
When
-ai_flags
+\fBai_flags\fR
does not set the
\fBAI_PASSIVE\fR
-bit, the returned socket address structure will be ready
-for use in a call to
-\fBconnect\fR(2)
-for a connection-oriented protocol or
+bit, the returned socket address structure will be ready for use in a call to
+\fBconnect\fR(2 )
+for a connection\-oriented protocol or
\fBconnect\fR(2),
-\fBsendto\fR(2),
-or
-\fBsendmsg\fR(2)
-if a connectionless protocol was chosen.
-The IP address portion of the socket address structure will be
-set to the loopback address if
+\fBsendto\fR(2), or
+\fBsendmsg\fR(2 )
+if a connectionless protocol was chosen. The IP address portion of the socket address structure will be set to the loopback address if
\fIhostname\fR
is a
\fBNULL\fR
pointer and
\fBAI_PASSIVE\fR
is not set in
-ai_flags.
-
+\fBai_flags\fR.
+.sp
If
-ai_flags
+\fBai_flags\fR
is set to
\fBAI_NUMERICHOST\fR
it indicates that
\fIhostname\fR
-should be treated as a numeric string defining an IPv4 or IPv6 address
-and no name resolution should be attempted.
+should be treated as a numeric string defining an IPv4 or IPv6 address and no name resolution should be attempted.
.PP
-All other elements of the \fBstruct addrinfo\fR passed
-via \fIhints\fR must be zero.
+All other elements of the
+\fBstruct addrinfo\fR
+passed via
+\fIhints\fR
+must be zero.
.PP
-A \fIhints\fR of \fBNULL\fR is treated as if
-the caller provided a \fBstruct addrinfo\fR initialized to zero
-with ai_familyset to
-PF_UNSPEC.
+A
+\fIhints\fR
+of
+\fBNULL\fR
+is treated as if the caller provided a
+\fBstruct addrinfo\fR
+initialized to zero with
+\fBai_family\fRset to
+\fBPF_UNSPEC\fR.
.PP
After a successful call to
\fBlwres_getaddrinfo()\fR,
\fI*res\fR
is a pointer to a linked list of one or more
\fBaddrinfo\fR
-structures.
-Each
+structures. Each
\fBstruct addrinfo\fR
-in this list cn be processed by following
-the
-ai_next
+in this list cn be processed by following the
+\fBai_next\fR
pointer, until a
\fBNULL\fR
-pointer is encountered.
-The three members
-ai_family,
-ai_socktype,
-and
-ai_protocol
-in each
-returned
+pointer is encountered. The three members
+\fBai_family\fR,
+\fBai_socktype\fR, and
+\fBai_protocol\fR
+in each returned
\fBaddrinfo\fR
structure contain the corresponding arguments for a call to
-\fBsocket\fR(2).
-For each
+\fBsocket\fR(2). For each
\fBaddrinfo\fR
structure in the list, the
-ai_addr
-member points to a filled-in socket address structure of length
-ai_addrlen.
+\fBai_addr\fR
+member points to a filled\-in socket address structure of length
+\fBai_addrlen\fR.
.PP
All of the information returned by
\fBlwres_getaddrinfo()\fR
-is dynamically allocated: the addrinfo structures, and the socket
-address structures and canonical host name strings pointed to by the
-addrinfostructures.
-Memory allocated for the dynamically allocated structures created by
-a successful call to
+is dynamically allocated: the addrinfo structures, and the socket address structures and canonical host name strings pointed to by the
+\fBaddrinfo\fRstructures. Memory allocated for the dynamically allocated structures created by a successful call to
\fBlwres_getaddrinfo()\fR
is released by
\fBlwres_freeaddrinfo()\fR.
@@ -223,24 +203,22 @@ created by a call to
.PP
\fBlwres_getaddrinfo()\fR
returns zero on success or one of the error codes listed in
-\fBgai_strerror\fR(3)
-if an error occurs.
-If both
+\fBgai_strerror\fR(3 )
+if an error occurs. If both
\fIhostname\fR
and
\fIservname\fR
are
-\fBNULL\fR
-\fBlwres_getaddrinfo()\fR
+\fBNULL\fR\fBlwres_getaddrinfo()\fR
returns
-EAI_NONAME.
+\fBEAI_NONAME\fR.
.SH "SEE ALSO"
.PP
\fBlwres\fR(3),
\fBlwres_getaddrinfo\fR(3),
\fBlwres_freeaddrinfo\fR(3),
\fBlwres_gai_strerror\fR(3),
-\fBRFC2133\fR,
+\fBRFC2133\fR(),
\fBgetservbyname\fR(3),
\fBbind\fR(2),
\fBconnect\fR(2),
diff --git a/contrib/bind9/lib/lwres/man/lwres_getaddrinfo.docbook b/contrib/bind9/lib/lwres/man/lwres_getaddrinfo.docbook
index 2f2fc82..1907219 100644
--- a/contrib/bind9/lib/lwres/man/lwres_getaddrinfo.docbook
+++ b/contrib/bind9/lib/lwres/man/lwres_getaddrinfo.docbook
@@ -1,7 +1,9 @@
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.0//EN"
+ "http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd"
+ [<!ENTITY mdash "&#8212;">]>
<!--
- - Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
- - Copyright (C) 2001, 2003 Internet Software Consortium.
+ - Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
+ - Copyright (C) 2000, 2001, 2003 Internet Software Consortium.
-
- Permission to use, copy, modify, and distribute this software for any
- purpose with or without fee is hereby granted, provided that the above
@@ -16,7 +18,7 @@
- PERFORMANCE OF THIS SOFTWARE.
-->
-<!-- $Id: lwres_getaddrinfo.docbook,v 1.5.206.2 2004/03/06 08:15:39 marka Exp $ -->
+<!-- $Id: lwres_getaddrinfo.docbook,v 1.5.206.4 2005/05/12 21:36:14 sra Exp $ -->
<refentry>
@@ -30,6 +32,20 @@
<refmiscinfo>BIND9</refmiscinfo>
</refmeta>
+ <docinfo>
+ <copyright>
+ <year>2004</year>
+ <year>2005</year>
+ <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
+ </copyright>
+ <copyright>
+ <year>2000</year>
+ <year>2001</year>
+ <year>2003</year>
+ <holder>Internet Software Consortium.</holder>
+ </copyright>
+ </docinfo>
+
<refnamediv>
<refname>lwres_getaddrinfo</refname>
<refname>lwres_freeaddrinfo</refname>
diff --git a/contrib/bind9/lib/lwres/man/lwres_getaddrinfo.html b/contrib/bind9/lib/lwres/man/lwres_getaddrinfo.html
index b568e59..bc84e74 100644
--- a/contrib/bind9/lib/lwres/man/lwres_getaddrinfo.html
+++ b/contrib/bind9/lib/lwres/man/lwres_getaddrinfo.html
@@ -1,97 +1,78 @@
<!--
- - Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
- - Copyright (C) 2001, 2003 Internet Software Consortium.
- -
+ - Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
+ - Copyright (C) 2000, 2001, 2003 Internet Software Consortium.
+ -
- Permission to use, copy, modify, and distribute this software for any
- purpose with or without fee is hereby granted, provided that the above
- copyright notice and this permission notice appear in all copies.
- -
+ -
- THE SOFTWARE IS PROVIDED "AS IS" AND 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,
+ - 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.
-->
-
-<!-- $Id: lwres_getaddrinfo.html,v 1.8.2.1.4.3 2004/08/22 23:39:03 marka Exp $ -->
-
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<HTML
-><HEAD
-><TITLE
->lwres_getaddrinfo</TITLE
-><META
-NAME="GENERATOR"
-CONTENT="Modular DocBook HTML Stylesheet Version 1.7"></HEAD
-><BODY
-CLASS="REFENTRY"
-BGCOLOR="#FFFFFF"
-TEXT="#000000"
-LINK="#0000FF"
-VLINK="#840084"
-ALINK="#0000FF"
-><H1
-><A
-NAME="AEN1"
-></A
->lwres_getaddrinfo</H1
-><DIV
-CLASS="REFNAMEDIV"
-><A
-NAME="AEN8"
-></A
-><H2
->Name</H2
->lwres_getaddrinfo, lwres_freeaddrinfo&nbsp;--&nbsp;socket address structure to host and service name</DIV
-><DIV
-CLASS="REFSYNOPSISDIV"
-><A
-NAME="AEN12"
-></A
-><H2
->Synopsis</H2
-><DIV
-CLASS="FUNCSYNOPSIS"
-><P
-></P
-><A
-NAME="AEN13"
-></A
-><PRE
-CLASS="FUNCSYNOPSISINFO"
->#include &lt;lwres/netdb.h&gt;</PRE
-><P
-><CODE
-><CODE
-CLASS="FUNCDEF"
->int
-lwres_getaddrinfo</CODE
->(const char *hostname, const char *servname, const struct addrinfo *hints, struct addrinfo **res);</CODE
-></P
-><P
-><CODE
-><CODE
-CLASS="FUNCDEF"
->void
-lwres_freeaddrinfo</CODE
->(struct addrinfo *ai);</CODE
-></P
-><P
-></P
-></DIV
-><P
->If the operating system does not provide a
-<SPAN
-CLASS="TYPE"
->struct addrinfo</SPAN
->,
+<!-- $Id: lwres_getaddrinfo.html,v 1.8.2.1.4.10 2005/10/13 02:33:56 marka Exp $ -->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>lwres_getaddrinfo</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en">
+<a name="id2463721"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2>Name</h2>
+<p>lwres_getaddrinfo, lwres_freeaddrinfo &#8212; socket address structure to host and service name</p>
+</div>
+<div class="refsynopsisdiv">
+<h2>Synopsis</h2>
+<div class="funcsynopsis">
+<pre class="funcsynopsisinfo">#include &lt;lwres/netdb.h&gt;</pre>
+<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em">
+<tr>
+<td><code class="funcdef">
+int
+<b class="fsfunc">lwres_getaddrinfo</b>(</code></td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>
+<code>)</code>;</td>
+</tr>
+</table>
+<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0"><tr>
+<td><code class="funcdef">
+void
+<b class="fsfunc">lwres_freeaddrinfo</b>(</code></td>
+<td> </td>
+<td>
+<code>)</code>;</td>
+</tr></table>
+</div>
+<p>
+If the operating system does not provide a
+<span class="type">struct addrinfo</span>,
the following structure is used:
-<PRE
-CLASS="PROGRAMLISTING"
->struct addrinfo {
+</p>
+<pre class="programlisting">
+struct addrinfo {
int ai_flags; /* AI_PASSIVE, AI_CANONNAME */
int ai_family; /* PF_xxx */
int ai_socktype; /* SOCK_xxx */
@@ -100,594 +81,253 @@ CLASS="PROGRAMLISTING"
char *ai_canonname; /* canonical name for hostname */
struct sockaddr *ai_addr; /* binary address */
struct addrinfo *ai_next; /* next structure in linked list */
-};</PRE
-></P
-></DIV
-><DIV
-CLASS="REFSECT1"
-><A
-NAME="AEN29"
-></A
-><H2
->DESCRIPTION</H2
-><P
-><CODE
-CLASS="FUNCTION"
->lwres_getaddrinfo()</CODE
->
+};
+</pre>
+<p>
+</p>
+</div>
+<div class="refsect1" lang="en">
+<a name="id2525883"></a><h2>DESCRIPTION</h2>
+<p>
+<code class="function">lwres_getaddrinfo()</code>
is used to get a list of IP addresses and port numbers for host
-<VAR
-CLASS="PARAMETER"
->hostname</VAR
->
+<em class="parameter"><code>hostname</code></em>
and service
-<VAR
-CLASS="PARAMETER"
->servname</VAR
->.
+<em class="parameter"><code>servname</code></em>.
The function is the lightweight resolver's implementation of
-<CODE
-CLASS="FUNCTION"
->getaddrinfo()</CODE
->
+<code class="function">getaddrinfo()</code>
as defined in RFC2133.
-<VAR
-CLASS="PARAMETER"
->hostname</VAR
->
+<em class="parameter"><code>hostname</code></em>
and
-<VAR
-CLASS="PARAMETER"
->servname</VAR
->
+<em class="parameter"><code>servname</code></em>
are pointers to null-terminated
strings or
-<SPAN
-CLASS="TYPE"
->NULL</SPAN
->.
+<span class="type">NULL</span>.
-<VAR
-CLASS="PARAMETER"
->hostname</VAR
->
+<em class="parameter"><code>hostname</code></em>
is either a host name or a numeric host address string: a dotted decimal
IPv4 address or an IPv6 address.
-<VAR
-CLASS="PARAMETER"
->servname</VAR
->
+<em class="parameter"><code>servname</code></em>
is either a decimal port number or a service name as listed in
-<TT
-CLASS="FILENAME"
->/etc/services</TT
->.</P
-><P
-><VAR
-CLASS="PARAMETER"
->hints</VAR
->
+<code class="filename">/etc/services</code>.
+</p>
+<p>
+<em class="parameter"><code>hints</code></em>
is an optional pointer to a
-<SPAN
-CLASS="TYPE"
->struct addrinfo</SPAN
->.
+<span class="type">struct addrinfo</span>.
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
-<VAR
-CLASS="PARAMETER"
->*hints</VAR
->:
+<em class="parameter"><code>*hints</code></em>:
-<P
-></P
-><DIV
-CLASS="VARIABLELIST"
-><DL
-><DT
-><CODE
-CLASS="CONSTANT"
->ai_family</CODE
-></DT
-><DD
-><P
->The protocol family that should be used.
+</p>
+<div class="variablelist"><dl>
+<dt><span class="term"><code class="constant">ai_family</code></span></dt>
+<dd><p>The protocol family that should be used.
When
-<CODE
-CLASS="CONSTANT"
->ai_family</CODE
->
+<code class="constant">ai_family</code>
is set to
-<SPAN
-CLASS="TYPE"
->PF_UNSPEC</SPAN
->,
+<span class="type">PF_UNSPEC</span>,
it means the caller will accept any protocol family supported by the
-operating system.</P
-></DD
-><DT
-><CODE
-CLASS="CONSTANT"
->ai_socktype</CODE
-></DT
-><DD
-><P
->denotes the type of socket &mdash;
-<SPAN
-CLASS="TYPE"
->SOCK_STREAM</SPAN
->,
-<SPAN
-CLASS="TYPE"
->SOCK_DGRAM</SPAN
->
+operating system.
+</p></dd>
+<dt><span class="term"><code class="constant">ai_socktype</code></span></dt>
+<dd><p>
+denotes the type of socket &#8212;
+<span class="type">SOCK_STREAM</span>,
+<span class="type">SOCK_DGRAM</span>
or
-<SPAN
-CLASS="TYPE"
->SOCK_RAW</SPAN
->
-&mdash; that is wanted.
+<span class="type">SOCK_RAW</span>
+&#8212; that is wanted.
When
-<CODE
-CLASS="CONSTANT"
->ai_socktype</CODE
->
-is zero the caller will accept any socket type.</P
-></DD
-><DT
-><CODE
-CLASS="CONSTANT"
->ai_protocol</CODE
-></DT
-><DD
-><P
->indicates which transport protocol is wanted: IPPROTO_UDP or
+<code class="constant">ai_socktype</code>
+is zero the caller will accept any socket type.
+</p></dd>
+<dt><span class="term"><code class="constant">ai_protocol</code></span></dt>
+<dd><p>
+indicates which transport protocol is wanted: IPPROTO_UDP or
IPPROTO_TCP.
If
-<CODE
-CLASS="CONSTANT"
->ai_protocol</CODE
->
-is zero the caller will accept any protocol.</P
-></DD
-><DT
-><CODE
-CLASS="CONSTANT"
->ai_flags</CODE
-></DT
-><DD
-><P
->Flag bits.
+<code class="constant">ai_protocol</code>
+is zero the caller will accept any protocol.
+</p></dd>
+<dt><span class="term"><code class="constant">ai_flags</code></span></dt>
+<dd>
+<p>
+Flag bits.
If the
-<SPAN
-CLASS="TYPE"
->AI_CANONNAME</SPAN
->
+<span class="type">AI_CANONNAME</span>
bit is set, a successful call to
-<CODE
-CLASS="FUNCTION"
->lwres_getaddrinfo()</CODE
->
+<code class="function">lwres_getaddrinfo()</code>
will return a null-terminated string containing the canonical name
of the specified hostname in
-<CODE
-CLASS="CONSTANT"
->ai_canonname</CODE
->
+<code class="constant">ai_canonname</code>
of the first
-<SPAN
-CLASS="TYPE"
->addrinfo</SPAN
->
+<span class="type">addrinfo</span>
structure returned.
Setting the
-<SPAN
-CLASS="TYPE"
->AI_PASSIVE</SPAN
->
+<span class="type">AI_PASSIVE</span>
bit indicates that the returned socket address structure is intended
for used in a call to
-<SPAN
-CLASS="CITEREFENTRY"
-><SPAN
-CLASS="REFENTRYTITLE"
->bind</SPAN
->(2)</SPAN
->.
+<span class="citerefentry"><span class="refentrytitle">bind</span>(2)</span>.
In this case, if the hostname argument is a
-<SPAN
-CLASS="TYPE"
->NULL</SPAN
->
+<span class="type">NULL</span>
pointer, then the IP address portion of the socket
address structure will be set to
-<SPAN
-CLASS="TYPE"
->INADDR_ANY</SPAN
->
+<span class="type">INADDR_ANY</span>
for an IPv4 address or
-<SPAN
-CLASS="TYPE"
->IN6ADDR_ANY_INIT</SPAN
->
-for an IPv6 address.</P
-><P
->When
-<CODE
-CLASS="CONSTANT"
->ai_flags</CODE
->
+<span class="type">IN6ADDR_ANY_INIT</span>
+for an IPv6 address.
+</p>
+<p>
+When
+<code class="constant">ai_flags</code>
does not set the
-<SPAN
-CLASS="TYPE"
->AI_PASSIVE</SPAN
->
+<span class="type">AI_PASSIVE</span>
bit, the returned socket address structure will be ready
for use in a call to
-<SPAN
-CLASS="CITEREFENTRY"
-><SPAN
-CLASS="REFENTRYTITLE"
->connect</SPAN
->(2)</SPAN
->
+<span class="citerefentry"><span class="refentrytitle">connect</span>(2
+)</span>
for a connection-oriented protocol or
-<SPAN
-CLASS="CITEREFENTRY"
-><SPAN
-CLASS="REFENTRYTITLE"
->connect</SPAN
->(2)</SPAN
->,
+<span class="citerefentry"><span class="refentrytitle">connect</span>(2)</span>,
-<SPAN
-CLASS="CITEREFENTRY"
-><SPAN
-CLASS="REFENTRYTITLE"
->sendto</SPAN
->(2)</SPAN
->,
+<span class="citerefentry"><span class="refentrytitle">sendto</span>(2)</span>,
or
-<SPAN
-CLASS="CITEREFENTRY"
-><SPAN
-CLASS="REFENTRYTITLE"
->sendmsg</SPAN
->(2)</SPAN
->
+<span class="citerefentry"><span class="refentrytitle">sendmsg</span>(2
+)</span>
if a connectionless protocol was chosen.
The IP address portion of the socket address structure will be
set to the loopback address if
-<VAR
-CLASS="PARAMETER"
->hostname</VAR
->
+<em class="parameter"><code>hostname</code></em>
is a
-<SPAN
-CLASS="TYPE"
->NULL</SPAN
->
+<span class="type">NULL</span>
pointer and
-<SPAN
-CLASS="TYPE"
->AI_PASSIVE</SPAN
->
+<span class="type">AI_PASSIVE</span>
is not set in
-<CODE
-CLASS="CONSTANT"
->ai_flags</CODE
->.</P
-><P
->If
-<CODE
-CLASS="CONSTANT"
->ai_flags</CODE
->
+<code class="constant">ai_flags</code>.
+</p>
+<p>
+If
+<code class="constant">ai_flags</code>
is set to
-<SPAN
-CLASS="TYPE"
->AI_NUMERICHOST</SPAN
->
+<span class="type">AI_NUMERICHOST</span>
it indicates that
-<VAR
-CLASS="PARAMETER"
->hostname</VAR
->
+<em class="parameter"><code>hostname</code></em>
should be treated as a numeric string defining an IPv4 or IPv6 address
-and no name resolution should be attempted.</P
-></DD
-></DL
-></DIV
-></P
-><P
->All other elements of the <SPAN
-CLASS="TYPE"
->struct addrinfo</SPAN
-> passed
-via <VAR
-CLASS="PARAMETER"
->hints</VAR
-> must be zero.</P
-><P
->A <VAR
-CLASS="PARAMETER"
->hints</VAR
-> of <SPAN
-CLASS="TYPE"
->NULL</SPAN
-> is treated as if
-the caller provided a <SPAN
-CLASS="TYPE"
->struct addrinfo</SPAN
-> initialized to zero
-with <CODE
-CLASS="CONSTANT"
->ai_family</CODE
->set to
-<CODE
-CLASS="CONSTANT"
->PF_UNSPEC</CODE
->.</P
-><P
->After a successful call to
-<CODE
-CLASS="FUNCTION"
->lwres_getaddrinfo()</CODE
->,
-<VAR
-CLASS="PARAMETER"
->*res</VAR
->
+and no name resolution should be attempted.
+</p>
+</dd>
+</dl></div>
+<p>
+</p>
+<p>
+All other elements of the <span class="type">struct addrinfo</span> passed
+via <em class="parameter"><code>hints</code></em> must be zero.
+</p>
+<p>
+A <em class="parameter"><code>hints</code></em> of <span class="type">NULL</span> is treated as if
+the caller provided a <span class="type">struct addrinfo</span> initialized to zero
+with <code class="constant">ai_family</code>set to
+<code class="constant">PF_UNSPEC</code>.
+</p>
+<p>
+After a successful call to
+<code class="function">lwres_getaddrinfo()</code>,
+<em class="parameter"><code>*res</code></em>
is a pointer to a linked list of one or more
-<SPAN
-CLASS="TYPE"
->addrinfo</SPAN
->
+<span class="type">addrinfo</span>
structures.
Each
-<SPAN
-CLASS="TYPE"
->struct addrinfo</SPAN
->
+<span class="type">struct addrinfo</span>
in this list cn be processed by following
the
-<CODE
-CLASS="CONSTANT"
->ai_next</CODE
->
+<code class="constant">ai_next</code>
pointer, until a
-<SPAN
-CLASS="TYPE"
->NULL</SPAN
->
+<span class="type">NULL</span>
pointer is encountered.
The three members
-<CODE
-CLASS="CONSTANT"
->ai_family</CODE
->,
-<CODE
-CLASS="CONSTANT"
->ai_socktype</CODE
->,
+<code class="constant">ai_family</code>,
+<code class="constant">ai_socktype</code>,
and
-<CODE
-CLASS="CONSTANT"
->ai_protocol</CODE
->
+<code class="constant">ai_protocol</code>
in each
returned
-<SPAN
-CLASS="TYPE"
->addrinfo</SPAN
->
+<span class="type">addrinfo</span>
structure contain the corresponding arguments for a call to
-<SPAN
-CLASS="CITEREFENTRY"
-><SPAN
-CLASS="REFENTRYTITLE"
->socket</SPAN
->(2)</SPAN
->.
+<span class="citerefentry"><span class="refentrytitle">socket</span>(2)</span>.
For each
-<SPAN
-CLASS="TYPE"
->addrinfo</SPAN
->
+<span class="type">addrinfo</span>
structure in the list, the
-<CODE
-CLASS="CONSTANT"
->ai_addr</CODE
->
+<code class="constant">ai_addr</code>
member points to a filled-in socket address structure of length
-<CODE
-CLASS="CONSTANT"
->ai_addrlen</CODE
->.</P
-><P
->All of the information returned by
-<CODE
-CLASS="FUNCTION"
->lwres_getaddrinfo()</CODE
->
+<code class="constant">ai_addrlen</code>.
+</p>
+<p>
+All of the information returned by
+<code class="function">lwres_getaddrinfo()</code>
is dynamically allocated: the addrinfo structures, and the socket
address structures and canonical host name strings pointed to by the
-<CODE
-CLASS="CONSTANT"
->addrinfo</CODE
->structures.
+<code class="constant">addrinfo</code>structures.
Memory allocated for the dynamically allocated structures created by
a successful call to
-<CODE
-CLASS="FUNCTION"
->lwres_getaddrinfo()</CODE
->
+<code class="function">lwres_getaddrinfo()</code>
is released by
-<CODE
-CLASS="FUNCTION"
->lwres_freeaddrinfo()</CODE
->.
-<VAR
-CLASS="PARAMETER"
->ai</VAR
->
+<code class="function">lwres_freeaddrinfo()</code>.
+<em class="parameter"><code>ai</code></em>
is a pointer to a
-<SPAN
-CLASS="TYPE"
->struct addrinfo</SPAN
->
+<span class="type">struct addrinfo</span>
created by a call to
-<CODE
-CLASS="FUNCTION"
->lwres_getaddrinfo()</CODE
->.</P
-></DIV
-><DIV
-CLASS="REFSECT1"
-><A
-NAME="AEN142"
-></A
-><H2
->RETURN VALUES</H2
-><P
-><CODE
-CLASS="FUNCTION"
->lwres_getaddrinfo()</CODE
->
+<code class="function">lwres_getaddrinfo()</code>.
+</p>
+</div>
+<div class="refsect1" lang="en">
+<a name="id2526309"></a><h2>RETURN VALUES</h2>
+<p>
+<code class="function">lwres_getaddrinfo()</code>
returns zero on success or one of the error codes listed in
-<SPAN
-CLASS="CITEREFENTRY"
-><SPAN
-CLASS="REFENTRYTITLE"
->gai_strerror</SPAN
->(3)</SPAN
->
+<span class="citerefentry"><span class="refentrytitle">gai_strerror</span>(3
+)</span>
if an error occurs.
If both
-<VAR
-CLASS="PARAMETER"
->hostname</VAR
->
+<em class="parameter"><code>hostname</code></em>
and
-<VAR
-CLASS="PARAMETER"
->servname</VAR
->
+<em class="parameter"><code>servname</code></em>
are
-<SPAN
-CLASS="TYPE"
->NULL</SPAN
->
-<CODE
-CLASS="FUNCTION"
->lwres_getaddrinfo()</CODE
->
+<span class="type">NULL</span>
+<code class="function">lwres_getaddrinfo()</code>
returns
-<SPAN
-CLASS="ERRORCODE"
->EAI_NONAME</SPAN
->.&#13;</P
-></DIV
-><DIV
-CLASS="REFSECT1"
-><A
-NAME="AEN154"
-></A
-><H2
->SEE ALSO</H2
-><P
-><SPAN
-CLASS="CITEREFENTRY"
-><SPAN
-CLASS="REFENTRYTITLE"
->lwres</SPAN
->(3)</SPAN
->,
+<span class="errorcode">EAI_NONAME</span>.
+
+</p>
+</div>
+<div class="refsect1" lang="en">
+<a name="id2526347"></a><h2>SEE ALSO</h2>
+<p>
+<span class="citerefentry"><span class="refentrytitle">lwres</span>(3)</span>,
-<SPAN
-CLASS="CITEREFENTRY"
-><SPAN
-CLASS="REFENTRYTITLE"
->lwres_getaddrinfo</SPAN
->(3)</SPAN
->,
+<span class="citerefentry"><span class="refentrytitle">lwres_getaddrinfo</span>(3)</span>,
-<SPAN
-CLASS="CITEREFENTRY"
-><SPAN
-CLASS="REFENTRYTITLE"
->lwres_freeaddrinfo</SPAN
->(3)</SPAN
->,
+<span class="citerefentry"><span class="refentrytitle">lwres_freeaddrinfo</span>(3)</span>,
-<SPAN
-CLASS="CITEREFENTRY"
-><SPAN
-CLASS="REFENTRYTITLE"
->lwres_gai_strerror</SPAN
->(3)</SPAN
->,
+<span class="citerefentry"><span class="refentrytitle">lwres_gai_strerror</span>(3)</span>,
-<SPAN
-CLASS="CITEREFENTRY"
-><SPAN
-CLASS="REFENTRYTITLE"
->RFC2133</SPAN
-></SPAN
->,
+<span class="citerefentry"><span class="refentrytitle">RFC2133</span></span>,
-<SPAN
-CLASS="CITEREFENTRY"
-><SPAN
-CLASS="REFENTRYTITLE"
->getservbyname</SPAN
->(3)</SPAN
->,
+<span class="citerefentry"><span class="refentrytitle">getservbyname</span>(3)</span>,
-<SPAN
-CLASS="CITEREFENTRY"
-><SPAN
-CLASS="REFENTRYTITLE"
->bind</SPAN
->(2)</SPAN
->,
+<span class="citerefentry"><span class="refentrytitle">bind</span>(2)</span>,
-<SPAN
-CLASS="CITEREFENTRY"
-><SPAN
-CLASS="REFENTRYTITLE"
->connect</SPAN
->(2)</SPAN
->,
+<span class="citerefentry"><span class="refentrytitle">connect</span>(2)</span>,
-<SPAN
-CLASS="CITEREFENTRY"
-><SPAN
-CLASS="REFENTRYTITLE"
->sendto</SPAN
->(2)</SPAN
->,
+<span class="citerefentry"><span class="refentrytitle">sendto</span>(2)</span>,
-<SPAN
-CLASS="CITEREFENTRY"
-><SPAN
-CLASS="REFENTRYTITLE"
->sendmsg</SPAN
->(2)</SPAN
->,
+<span class="citerefentry"><span class="refentrytitle">sendmsg</span>(2)</span>,
-<SPAN
-CLASS="CITEREFENTRY"
-><SPAN
-CLASS="REFENTRYTITLE"
->socket</SPAN
->(2)</SPAN
->.</P
-></DIV
-></BODY
-></HTML
->
+<span class="citerefentry"><span class="refentrytitle">socket</span>(2)</span>.
+</p>
+</div>
+</div></body>
+</html>
diff --git a/contrib/bind9/lib/lwres/man/lwres_gethostent.3 b/contrib/bind9/lib/lwres/man/lwres_gethostent.3
index 5a42347..99dc533 100644
--- a/contrib/bind9/lib/lwres/man/lwres_gethostent.3
+++ b/contrib/bind9/lib/lwres/man/lwres_gethostent.3
@@ -1,89 +1,64 @@
-.\" Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
-.\" Copyright (C) 2001 Internet Software Consortium.
-.\"
+.\" Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
+.\" Copyright (C) 2001 Internet Software Consortium.
+.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
-.\"
+.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND 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,
+.\" 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.
.\"
-.\" $Id: lwres_gethostent.3,v 1.16.2.1.8.1 2004/03/06 07:41:43 marka Exp $
+.\" $Id: lwres_gethostent.3,v 1.16.2.1.8.5 2005/10/13 02:33:53 marka Exp $
.\"
-.TH "LWRES_GETHOSTENT" "3" "Jun 30, 2000" "BIND9" ""
-.SH NAME
+.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.
+.TH "LWRES_GETHOSTENT" "3" "Jun 30, 2000" "BIND9" "BIND9"
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.SH "NAME"
lwres_gethostbyname, lwres_gethostbyname2, lwres_gethostbyaddr, lwres_gethostent, lwres_sethostent, lwres_endhostent, lwres_gethostbyname_r, lwres_gethostbyaddr_r, lwres_gethostent_r, lwres_sethostent_r, lwres_endhostent_r \- lightweight resolver get network host entry
-.SH SYNOPSIS
-\fB#include <lwres/netdb.h>
-.sp
-.na
-struct hostent *
-lwres_gethostbyname(const char *name);
-.ad
-.sp
-.na
-struct hostent *
-lwres_gethostbyname2(const char *name, int af);
-.ad
-.sp
-.na
-struct hostent *
-lwres_gethostbyaddr(const char *addr, int len, int type);
-.ad
-.sp
-.na
-struct hostent *
-lwres_gethostent(void);
-.ad
-.sp
-.na
-void
-lwres_sethostent(int stayopen);
-.ad
-.sp
-.na
-void
-lwres_endhostent(void);
-.ad
-.sp
-.na
-struct hostent *
-lwres_gethostbyname_r(const char *name, struct hostent *resbuf, char *buf, int buflen, int *error);
-.ad
-.sp
-.na
-struct hostent *
-lwres_gethostbyaddr_r(const char *addr, int len, int type, struct hostent *resbuf, char *buf, int buflen, int *error);
-.ad
-.sp
-.na
-struct hostent *
-lwres_gethostent_r(struct hostent *resbuf, char *buf, int buflen, int *error);
-.ad
-.sp
-.na
-void
-lwres_sethostent_r(int stayopen);
-.ad
-.sp
-.na
-void
-lwres_endhostent_r(void);
-.ad
-\fR
+.SH "SYNOPSIS"
+.nf
+#include <lwres/netdb.h>
+.fi
+.HP 37
+\fBstruct\ hostent\ *\ \fBlwres_gethostbyname\fR\fR\fB(\fR\fBconst\ char\ *name\fR\fB);\fR
+.HP 38
+\fBstruct\ hostent\ *\ \fBlwres_gethostbyname2\fR\fR\fB(\fR\fBconst\ char\ *name\fR\fB, \fR\fBint\ af\fR\fB);\fR
+.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
+.HP 34
+\fBstruct\ hostent\ *\ \fBlwres_gethostent\fR\fR\fB(\fR\fBvoid\fR\fB);\fR
+.HP 22
+\fBvoid\ \fBlwres_sethostent\fR\fR\fB(\fR\fBint\ stayopen\fR\fB);\fR
+.HP 22
+\fBvoid\ \fBlwres_endhostent\fR\fR\fB(\fR\fBvoid\fR\fB);\fR
+.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
+.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
+.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
+.HP 24
+\fBvoid\ \fBlwres_sethostent_r\fR\fR\fB(\fR\fBint\ stayopen\fR\fB);\fR
+.HP 24
+\fBvoid\ \fBlwres_endhostent_r\fR\fR\fB(\fR\fBvoid\fR\fB);\fR
.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
-\fBgethostent\fR(3)
-functions provided by most operating systems.
-They use a
+These functions provide hostname\-to\-address and address\-to\-hostname lookups by means of the lightweight resolver. They are similar to the standard
+\fBgethostent\fR(3 )
+functions provided by most operating systems. They use a
\fBstruct hostent\fR
which is usually defined in
\fI<namedb.h>\fR.
@@ -97,8 +72,8 @@ struct hostent {
char **h_addr_list; /* list of addresses from name server */
};
#define h_addr h_addr_list[0] /* address, for backward compatibility */
-.sp
.fi
+.sp
.PP
The members of this structure are:
.TP
@@ -106,7 +81,7 @@ The members of this structure are:
The official (canonical) name of the host.
.TP
\fBh_aliases\fR
-A NULL-terminated array of alternate names (nicknames) for the host.
+A NULL\-terminated array of alternate names (nicknames) for the host.
.TP
\fBh_addrtype\fR
The type of address being returned \(em
@@ -118,14 +93,14 @@ or
The length of the address in bytes.
.TP
\fBh_addr_list\fR
-A \fBNULL\fR
-terminated array of network addresses for the host.
-Host addresses are returned in network byte order.
+A
+\fBNULL\fR
+terminated array of network addresses for the host. Host addresses are returned in network byte order.
.PP
For backward compatibility with very old software,
-h_addr
+\fBh_addr\fR
is the first address in
-h_addr_list.
+\fBh_addr_list.\fR
.PP
\fBlwres_gethostent()\fR,
\fBlwres_sethostent()\fR,
@@ -134,72 +109,109 @@ h_addr_list.
\fBlwres_sethostent_r()\fR
and
\fBlwres_endhostent_r()\fR
-provide iteration over the known host entries on systems that
-provide such functionality through facilities like
+provide iteration over the known host entries on systems that provide such functionality through facilities like
\fI/etc/hosts\fR
-or NIS. The lightweight resolver does not currently implement
-these functions; it only provides them as stub functions that always
-return failure.
+or NIS. The lightweight resolver does not currently implement these functions; it only provides them as stub functions that always return failure.
.PP
-\fBlwres_gethostbyname()\fR and
-\fBlwres_gethostbyname2()\fR look up the hostname
+\fBlwres_gethostbyname()\fR
+and
+\fBlwres_gethostbyname2()\fR
+look up the hostname
\fIname\fR.
-\fBlwres_gethostbyname()\fR always looks for an IPv4
-address while \fBlwres_gethostbyname2()\fR looks for an
-address of protocol family \fIaf\fR: either
-\fBPF_INET\fR or \fBPF_INET6\fR \(em IPv4 or IPV6
-addresses respectively. Successful calls of the functions return a
+\fBlwres_gethostbyname()\fR
+always looks for an IPv4 address while
+\fBlwres_gethostbyname2()\fR
+looks for an address of protocol family
+\fIaf\fR: either
+\fBPF_INET\fR
+or
+\fBPF_INET6\fR
+\(em IPv4 or IPV6 addresses respectively. Successful calls of the functions return a
\fBstruct hostent\fRfor the name that was looked up.
-\fBNULL\fR is returned if the lookups by
-\fBlwres_gethostbyname()\fR or
-\fBlwres_gethostbyname2()\fR fail.
+\fBNULL\fR
+is returned if the lookups by
+\fBlwres_gethostbyname()\fR
+or
+\fBlwres_gethostbyname2()\fR
+fail.
.PP
Reverse lookups of addresses are performed by
\fBlwres_gethostbyaddr()\fR.
-\fIaddr\fR is an address of length
-\fIlen\fR bytes and protocol family
-\fItype\fR \(em \fBPF_INET\fR or
+\fIaddr\fR
+is an address of length
+\fIlen\fR
+bytes and protocol family
+\fItype\fR
+\(em
+\fBPF_INET\fR
+or
\fBPF_INET6\fR.
-\fBlwres_gethostbyname_r()\fR is a thread-safe function
-for forward lookups. If an error occurs, an error code is returned in
+\fBlwres_gethostbyname_r()\fR
+is a thread\-safe function for forward lookups. If an error occurs, an error code is returned in
\fI*error\fR.
-\fIresbuf\fR is a pointer to a \fBstruct
-hostent\fR which is initialised by a successful call to
-\fBlwres_gethostbyname_r()\fR .
-\fIbuf\fR is a buffer of length
-\fIlen\fR bytes which is used to store the
-h_name, h_aliases, and
-h_addr_list elements of the \fBstruct
-hostent\fR returned in \fIresbuf\fR.
-Successful calls to \fBlwres_gethostbyname_r()\fR
-return \fIresbuf\fR,
-which is a pointer to the \fBstruct hostent\fR it created.
+\fIresbuf\fR
+is a pointer to a
+\fBstruct hostent\fR
+which is initialised by a successful call to
+\fBlwres_gethostbyname_r()\fR
+.
+\fIbuf\fR
+is a buffer of length
+\fIlen\fR
+bytes which is used to store the
+\fBh_name\fR,
+\fBh_aliases\fR, and
+\fBh_addr_list\fR
+elements of the
+\fBstruct hostent\fR
+returned in
+\fIresbuf\fR. Successful calls to
+\fBlwres_gethostbyname_r()\fR
+return
+\fIresbuf\fR, which is a pointer to the
+\fBstruct hostent\fR
+it created.
.PP
-\fBlwres_gethostbyaddr_r()\fR is a thread-safe function
-that performs a reverse lookup of address \fIaddr\fR
-which is \fIlen\fR bytes long and is of protocol
-family \fItype\fR \(em \fBPF_INET\fR or
-\fBPF_INET6\fR. If an error occurs, the error code is returned
-in \fI*error\fR. The other function parameters are
-identical to those in \fBlwres_gethostbyname_r()\fR.
-\fIresbuf\fR is a pointer to a \fBstruct
-hostent\fR which is initialised by a successful call to
+\fBlwres_gethostbyaddr_r()\fR
+is a thread\-safe function that performs a reverse lookup of address
+\fIaddr\fR
+which is
+\fIlen\fR
+bytes long and is of protocol family
+\fItype\fR
+\(em
+\fBPF_INET\fR
+or
+\fBPF_INET6\fR. If an error occurs, the error code is returned in
+\fI*error\fR. The other function parameters are identical to those in
+\fBlwres_gethostbyname_r()\fR.
+\fIresbuf\fR
+is a pointer to a
+\fBstruct hostent\fR
+which is initialised by a successful call to
\fBlwres_gethostbyaddr_r()\fR.
-\fIbuf\fR is a buffer of length
-\fIlen\fR bytes which is used to store the
-h_name, h_aliases, and
-h_addr_list elements of the \fBstruct
-hostent\fR returned in \fIresbuf\fR. Successful
-calls to \fBlwres_gethostbyaddr_r()\fR return
+\fIbuf\fR
+is a buffer of length
+\fIlen\fR
+bytes which is used to store the
+\fBh_name\fR,
+\fBh_aliases\fR, and
+\fBh_addr_list\fR
+elements of the
+\fBstruct hostent\fR
+returned in
+\fIresbuf\fR. Successful calls to
+\fBlwres_gethostbyaddr_r()\fR
+return
\fIresbuf\fR, which is a pointer to the
-\fBstruct hostent()\fR it created.
+\fBstruct hostent()\fR
+it created.
.SH "RETURN VALUES"
.PP
The functions
\fBlwres_gethostbyname()\fR,
\fBlwres_gethostbyname2()\fR,
-\fBlwres_gethostbyaddr()\fR,
-and
+\fBlwres_gethostbyaddr()\fR, and
\fBlwres_gethostent()\fR
return NULL to indicate an error. In this case the global variable
\fBlwres_h_errno\fR
@@ -210,20 +222,15 @@ will contain one of the following error codes defined in
The host or address was not found.
.TP
\fBTRY_AGAIN\fR
-A recoverable error occurred, e.g., a timeout.
-Retrying the lookup may succeed.
+A recoverable error occurred, e.g., a timeout. Retrying the lookup may succeed.
.TP
\fBNO_RECOVERY\fR
-A non-recoverable error occurred.
+A non\-recoverable error occurred.
.TP
\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.
+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
-\fBlwres_hstrerror\fR(3)
+\fBlwres_hstrerror\fR(3 )
translates these error codes to suitable error messages.
.PP
\fBlwres_gethostent()\fR
@@ -232,23 +239,37 @@ and
always return
\fBNULL\fR.
.PP
-Successful calls to \fBlwres_gethostbyname_r()\fR and
-\fBlwres_gethostbyaddr_r()\fR return
-\fIresbuf\fR, a pointer to the \fBstruct
-hostent\fR that was initialised by these functions. They return
-\fBNULL\fR if the lookups fail or if \fIbuf\fR
-was too small to hold the list of addresses and names referenced by
-the h_name, h_aliases, and
-h_addr_list elements of the \fBstruct
-hostent\fR. If \fIbuf\fR was too small, both
-\fBlwres_gethostbyname_r()\fR and
-\fBlwres_gethostbyaddr_r()\fR set the global variable
-\fBerrno\fR to ERANGE.
+Successful calls to
+\fBlwres_gethostbyname_r()\fR
+and
+\fBlwres_gethostbyaddr_r()\fR
+return
+\fIresbuf\fR, a pointer to the
+\fBstruct hostent\fR
+that was initialised by these functions. They return
+\fBNULL\fR
+if the lookups fail or if
+\fIbuf\fR
+was too small to hold the list of addresses and names referenced by the
+\fBh_name\fR,
+\fBh_aliases\fR, and
+\fBh_addr_list\fR
+elements of the
+\fBstruct hostent\fR. If
+\fIbuf\fR
+was too small, both
+\fBlwres_gethostbyname_r()\fR
+and
+\fBlwres_gethostbyaddr_r()\fR
+set the global variable
+\fBerrno\fR
+to
+\fBERANGE\fR.
.SH "SEE ALSO"
.PP
\fBgethostent\fR(3),
\fBlwres_getipnode\fR(3),
-\fBlwres_hstrerror\fR(3)
+\fBlwres_hstrerror\fR(3 )
.SH "BUGS"
.PP
\fBlwres_gethostbyname()\fR,
@@ -256,17 +277,12 @@ hostent\fR. If \fIbuf\fR was too small, both
\fBlwres_gethostbyaddr()\fR
and
\fBlwres_endhostent()\fR
-are not thread safe; they return pointers to static data and
-provide error codes through a global variable.
-Thread-safe versions for name and address lookup are provided by
-\fBlwres_gethostbyname_r()\fR,
-and
+are not thread safe; they return pointers to static data and provide error codes through a global variable. Thread\-safe versions for name and address lookup are provided by
+\fBlwres_gethostbyname_r()\fR, and
\fBlwres_gethostbyaddr_r()\fR
respectively.
.PP
-The resolver daemon does not currently support any non-DNS
-name services such as
+The resolver daemon does not currently support any non\-DNS name services such as
\fI/etc/hosts\fR
or
-\fBNIS\fR,
-consequently the above functions don't, either.
+\fBNIS\fR, consequently the above functions don't, either.
diff --git a/contrib/bind9/lib/lwres/man/lwres_gethostent.docbook b/contrib/bind9/lib/lwres/man/lwres_gethostent.docbook
index 10324c3..9f92d3b 100644
--- a/contrib/bind9/lib/lwres/man/lwres_gethostent.docbook
+++ b/contrib/bind9/lib/lwres/man/lwres_gethostent.docbook
@@ -1,6 +1,8 @@
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.0//EN"
+ "http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd"
+ [<!ENTITY mdash "&#8212;">]>
<!--
- - Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ - Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) 2001 Internet Software Consortium.
-
- Permission to use, copy, modify, and distribute this software for any
@@ -16,7 +18,7 @@
- PERFORMANCE OF THIS SOFTWARE.
-->
-<!-- $Id: lwres_gethostent.docbook,v 1.5.206.1 2004/03/06 08:15:39 marka Exp $ -->
+<!-- $Id: lwres_gethostent.docbook,v 1.5.206.3 2005/05/13 01:22:36 marka Exp $ -->
<refentry>
@@ -30,6 +32,18 @@
<refmiscinfo>BIND9</refmiscinfo>
</refmeta>
+ <docinfo>
+ <copyright>
+ <year>2004</year>
+ <year>2005</year>
+ <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
+ </copyright>
+ <copyright>
+ <year>2001</year>
+ <holder>Internet Software Consortium.</holder>
+ </copyright>
+ </docinfo>
+
<refnamediv>
<refname>lwres_gethostbyname</refname>
<refname>lwres_gethostbyname2</refname>
diff --git a/contrib/bind9/lib/lwres/man/lwres_gethostent.html b/contrib/bind9/lib/lwres/man/lwres_gethostent.html
index 00b285d..263f993 100644
--- a/contrib/bind9/lib/lwres/man/lwres_gethostent.html
+++ b/contrib/bind9/lib/lwres/man/lwres_gethostent.html
@@ -1,784 +1,430 @@
<!--
- - Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
- - Copyright (C) 2001 Internet Software Consortium.
- -
+ - Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
+ - Copyright (C) 2001 Internet Software Consortium.
+ -
- Permission to use, copy, modify, and distribute this software for any
- purpose with or without fee is hereby granted, provided that the above
- copyright notice and this permission notice appear in all copies.
- -
+ -
- THE SOFTWARE IS PROVIDED "AS IS" AND 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,
+ - 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.
-->
-
-<!-- $Id: lwres_gethostent.html,v 1.8.2.1.4.2 2004/08/22 23:39:04 marka Exp $ -->
-
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<HTML
-><HEAD
-><TITLE
->lwres_gethostent</TITLE
-><META
-NAME="GENERATOR"
-CONTENT="Modular DocBook HTML Stylesheet Version 1.7"></HEAD
-><BODY
-CLASS="REFENTRY"
-BGCOLOR="#FFFFFF"
-TEXT="#000000"
-LINK="#0000FF"
-VLINK="#840084"
-ALINK="#0000FF"
-><H1
-><A
-NAME="AEN1"
-></A
->lwres_gethostent</H1
-><DIV
-CLASS="REFNAMEDIV"
-><A
-NAME="AEN8"
-></A
-><H2
->Name</H2
->lwres_gethostbyname, lwres_gethostbyname2, lwres_gethostbyaddr, lwres_gethostent, lwres_sethostent, lwres_endhostent, lwres_gethostbyname_r, lwres_gethostbyaddr_r, lwres_gethostent_r, lwres_sethostent_r, lwres_endhostent_r&nbsp;--&nbsp;lightweight resolver get network host entry</DIV
-><DIV
-CLASS="REFSYNOPSISDIV"
-><A
-NAME="AEN21"
-></A
-><H2
->Synopsis</H2
-><DIV
-CLASS="FUNCSYNOPSIS"
-><P
-></P
-><A
-NAME="AEN22"
-></A
-><PRE
-CLASS="FUNCSYNOPSISINFO"
->#include &lt;lwres/netdb.h&gt;</PRE
-><P
-><CODE
-><CODE
-CLASS="FUNCDEF"
->struct hostent *
-lwres_gethostbyname</CODE
->(const char *name);</CODE
-></P
-><P
-><CODE
-><CODE
-CLASS="FUNCDEF"
->struct hostent *
-lwres_gethostbyname2</CODE
->(const char *name, int af);</CODE
-></P
-><P
-><CODE
-><CODE
-CLASS="FUNCDEF"
->struct hostent *
-lwres_gethostbyaddr</CODE
->(const char *addr, int len, int type);</CODE
-></P
-><P
-><CODE
-><CODE
-CLASS="FUNCDEF"
->struct hostent *
-lwres_gethostent</CODE
->(void);</CODE
-></P
-><P
-><CODE
-><CODE
-CLASS="FUNCDEF"
->void
-lwres_sethostent</CODE
->(int stayopen);</CODE
-></P
-><P
-><CODE
-><CODE
-CLASS="FUNCDEF"
->void
-lwres_endhostent</CODE
->(void);</CODE
-></P
-><P
-><CODE
-><CODE
-CLASS="FUNCDEF"
->struct hostent *
-lwres_gethostbyname_r</CODE
->(const char *name, struct hostent *resbuf, char *buf, int buflen, int *error);</CODE
-></P
-><P
-><CODE
-><CODE
-CLASS="FUNCDEF"
->struct hostent *
-lwres_gethostbyaddr_r</CODE
->(const char *addr, int len, int type, struct hostent *resbuf, char *buf, int buflen, int *error);</CODE
-></P
-><P
-><CODE
-><CODE
-CLASS="FUNCDEF"
->struct hostent *
-lwres_gethostent_r</CODE
->(struct hostent *resbuf, char *buf, int buflen, int *error);</CODE
-></P
-><P
-><CODE
-><CODE
-CLASS="FUNCDEF"
->void
-lwres_sethostent_r</CODE
->(int stayopen);</CODE
-></P
-><P
-><CODE
-><CODE
-CLASS="FUNCDEF"
->void
-lwres_endhostent_r</CODE
->(void);</CODE
-></P
-><P
-></P
-></DIV
-></DIV
-><DIV
-CLASS="REFSECT1"
-><A
-NAME="AEN84"
-></A
-><H2
->DESCRIPTION</H2
-><P
->These functions provide hostname-to-address and
+<!-- $Id: lwres_gethostent.html,v 1.8.2.1.4.8 2005/10/13 02:33:56 marka Exp $ -->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>lwres_gethostent</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en">
+<a name="id2463721"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2>Name</h2>
+<p>lwres_gethostbyname, lwres_gethostbyname2, lwres_gethostbyaddr, lwres_gethostent, lwres_sethostent, lwres_endhostent, lwres_gethostbyname_r, lwres_gethostbyaddr_r, lwres_gethostent_r, lwres_sethostent_r, lwres_endhostent_r &#8212; lightweight resolver get network host entry</p>
+</div>
+<div class="refsynopsisdiv">
+<h2>Synopsis</h2>
+<div class="funcsynopsis">
+<pre class="funcsynopsisinfo">#include &lt;lwres/netdb.h&gt;</pre>
+<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em"><tr>
+<td><code class="funcdef">
+struct hostent *
+<b class="fsfunc">lwres_gethostbyname</b>(</code></td>
+<td> </td>
+<td>
+<code>)</code>;</td>
+</tr></table>
+<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em">
+<tr>
+<td><code class="funcdef">
+struct hostent *
+<b class="fsfunc">lwres_gethostbyname2</b>(</code></td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>
+<code>)</code>;</td>
+</tr>
+</table>
+<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em">
+<tr>
+<td><code class="funcdef">
+struct hostent *
+<b class="fsfunc">lwres_gethostbyaddr</b>(</code></td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>
+<code>)</code>;</td>
+</tr>
+</table>
+<p><code class="funcdef">
+struct hostent *
+<b class="fsfunc">lwres_gethostent</b>(</code>void<code>)</code>;</p>
+<p><code class="funcdef">
+void
+<b class="fsfunc">lwres_sethostent</b>(</code>int stayopen<code>)</code>;</p>
+<p><code class="funcdef">
+void
+<b class="fsfunc">lwres_endhostent</b>(</code>void<code>)</code>;</p>
+<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em">
+<tr>
+<td><code class="funcdef">
+struct hostent *
+<b class="fsfunc">lwres_gethostbyname_r</b>(</code></td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>
+<code>)</code>;</td>
+</tr>
+</table>
+<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em">
+<tr>
+<td><code class="funcdef">
+struct hostent *
+<b class="fsfunc">lwres_gethostbyaddr_r</b>(</code></td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>
+<code>)</code>;</td>
+</tr>
+</table>
+<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em">
+<tr>
+<td><code class="funcdef">
+struct hostent *
+<b class="fsfunc">lwres_gethostent_r</b>(</code></td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>
+<code>)</code>;</td>
+</tr>
+</table>
+<p><code class="funcdef">
+void
+<b class="fsfunc">lwres_sethostent_r</b>(</code>int stayopen<code>)</code>;</p>
+<p><code class="funcdef">
+void
+<b class="fsfunc">lwres_endhostent_r</b>(</code>void<code>)</code>;</p>
+</div>
+</div>
+<div class="refsect1" lang="en">
+<a name="id2526041"></a><h2>DESCRIPTION</h2>
+<p>
+These functions provide hostname-to-address and
address-to-hostname lookups by means of the lightweight resolver.
They are similar to the standard
-<SPAN
-CLASS="CITEREFENTRY"
-><SPAN
-CLASS="REFENTRYTITLE"
->gethostent</SPAN
->(3)</SPAN
->
+<span class="citerefentry"><span class="refentrytitle">gethostent</span>(3
+)</span>
functions provided by most operating systems.
They use a
-<SPAN
-CLASS="TYPE"
->struct hostent</SPAN
->
+<span class="type">struct hostent</span>
which is usually defined in
-<TT
-CLASS="FILENAME"
->&lt;namedb.h&gt;</TT
->.
+<code class="filename">&lt;namedb.h&gt;</code>.
-<PRE
-CLASS="PROGRAMLISTING"
->struct hostent {
+</p>
+<pre class="programlisting">
+struct hostent {
char *h_name; /* official name of host */
char **h_aliases; /* alias list */
int h_addrtype; /* host address type */
int h_length; /* length of address */
char **h_addr_list; /* list of addresses from name server */
};
-#define h_addr h_addr_list[0] /* address, for backward compatibility */</PRE
-></P
-><P
->The members of this structure are:
-<P
-></P
-><DIV
-CLASS="VARIABLELIST"
-><DL
-><DT
-><CODE
-CLASS="CONSTANT"
->h_name</CODE
-></DT
-><DD
-><P
->The official (canonical) name of the host.</P
-></DD
-><DT
-><CODE
-CLASS="CONSTANT"
->h_aliases</CODE
-></DT
-><DD
-><P
->A NULL-terminated array of alternate names (nicknames) for the host.</P
-></DD
-><DT
-><CODE
-CLASS="CONSTANT"
->h_addrtype</CODE
-></DT
-><DD
-><P
->The type of address being returned &mdash;
-<SPAN
-CLASS="TYPE"
->PF_INET</SPAN
->
+#define h_addr h_addr_list[0] /* address, for backward compatibility */
+</pre>
+<p>
+</p>
+<p>
+The members of this structure are:
+</p>
+<div class="variablelist"><dl>
+<dt><span class="term"><code class="constant">h_name</code></span></dt>
+<dd><p>
+The official (canonical) name of the host.
+</p></dd>
+<dt><span class="term"><code class="constant">h_aliases</code></span></dt>
+<dd><p>
+A NULL-terminated array of alternate names (nicknames) for the host.
+</p></dd>
+<dt><span class="term"><code class="constant">h_addrtype</code></span></dt>
+<dd><p>
+The type of address being returned &#8212;
+<span class="type">PF_INET</span>
or
-<SPAN
-CLASS="TYPE"
->PF_INET6</SPAN
->.</P
-></DD
-><DT
-><CODE
-CLASS="CONSTANT"
->h_length</CODE
-></DT
-><DD
-><P
->The length of the address in bytes.</P
-></DD
-><DT
-><CODE
-CLASS="CONSTANT"
->h_addr_list</CODE
-></DT
-><DD
-><P
->A <SPAN
-CLASS="TYPE"
->NULL</SPAN
->
+<span class="type">PF_INET6</span>.
+</p></dd>
+<dt><span class="term"><code class="constant">h_length</code></span></dt>
+<dd><p>
+The length of the address in bytes.
+</p></dd>
+<dt><span class="term"><code class="constant">h_addr_list</code></span></dt>
+<dd><p>
+A <span class="type">NULL</span>
terminated array of network addresses for the host.
-Host addresses are returned in network byte order.</P
-></DD
-></DL
-></DIV
-></P
-><P
->For backward compatibility with very old software,
-<CODE
-CLASS="CONSTANT"
->h_addr</CODE
->
+Host addresses are returned in network byte order.
+</p></dd>
+</dl></div>
+<p>
+</p>
+<p>
+For backward compatibility with very old software,
+<code class="constant">h_addr</code>
is the first address in
-<CODE
-CLASS="CONSTANT"
->h_addr_list.</CODE
-></P
-><P
-><CODE
-CLASS="FUNCTION"
->lwres_gethostent()</CODE
->,
-<CODE
-CLASS="FUNCTION"
->lwres_sethostent()</CODE
->,
-<CODE
-CLASS="FUNCTION"
->lwres_endhostent()</CODE
->,
-<CODE
-CLASS="FUNCTION"
->lwres_gethostent_r()</CODE
->,
-<CODE
-CLASS="FUNCTION"
->lwres_sethostent_r()</CODE
->
+<code class="constant">h_addr_list.</code>
+</p>
+<p>
+<code class="function">lwres_gethostent()</code>,
+<code class="function">lwres_sethostent()</code>,
+<code class="function">lwres_endhostent()</code>,
+<code class="function">lwres_gethostent_r()</code>,
+<code class="function">lwres_sethostent_r()</code>
and
-<CODE
-CLASS="FUNCTION"
->lwres_endhostent_r()</CODE
->
+<code class="function">lwres_endhostent_r()</code>
provide iteration over the known host entries on systems that
provide such functionality through facilities like
-<TT
-CLASS="FILENAME"
->/etc/hosts</TT
->
+<code class="filename">/etc/hosts</code>
or NIS. The lightweight resolver does not currently implement
these functions; it only provides them as stub functions that always
-return failure.</P
-><P
-><CODE
-CLASS="FUNCTION"
->lwres_gethostbyname()</CODE
-> and
-<CODE
-CLASS="FUNCTION"
->lwres_gethostbyname2()</CODE
-> look up the hostname
-<VAR
-CLASS="PARAMETER"
->name</VAR
->.
-<CODE
-CLASS="FUNCTION"
->lwres_gethostbyname()</CODE
-> always looks for an IPv4
-address while <CODE
-CLASS="FUNCTION"
->lwres_gethostbyname2()</CODE
-> looks for an
-address of protocol family <VAR
-CLASS="PARAMETER"
->af</VAR
->: either
-<SPAN
-CLASS="TYPE"
->PF_INET</SPAN
-> or <SPAN
-CLASS="TYPE"
->PF_INET6</SPAN
-> &mdash; IPv4 or IPV6
+return failure.
+</p>
+<p>
+<code class="function">lwres_gethostbyname()</code> and
+<code class="function">lwres_gethostbyname2()</code> look up the hostname
+<em class="parameter"><code>name</code></em>.
+<code class="function">lwres_gethostbyname()</code> always looks for an IPv4
+address while <code class="function">lwres_gethostbyname2()</code> looks for an
+address of protocol family <em class="parameter"><code>af</code></em>: either
+<span class="type">PF_INET</span> or <span class="type">PF_INET6</span> &#8212; IPv4 or IPV6
addresses respectively. Successful calls of the functions return a
-<SPAN
-CLASS="TYPE"
->struct hostent</SPAN
->for the name that was looked up.
-<SPAN
-CLASS="TYPE"
->NULL</SPAN
-> is returned if the lookups by
-<CODE
-CLASS="FUNCTION"
->lwres_gethostbyname()</CODE
-> or
-<CODE
-CLASS="FUNCTION"
->lwres_gethostbyname2()</CODE
-> fail.</P
-><P
->Reverse lookups of addresses are performed by
-<CODE
-CLASS="FUNCTION"
->lwres_gethostbyaddr()</CODE
->.
-<VAR
-CLASS="PARAMETER"
->addr</VAR
-> is an address of length
-<VAR
-CLASS="PARAMETER"
->len</VAR
-> bytes and protocol family
-<VAR
-CLASS="PARAMETER"
->type</VAR
-> &mdash; <SPAN
-CLASS="TYPE"
->PF_INET</SPAN
-> or
-<SPAN
-CLASS="TYPE"
->PF_INET6</SPAN
->.
-<CODE
-CLASS="FUNCTION"
->lwres_gethostbyname_r()</CODE
-> is a thread-safe function
+<span class="type">struct hostent</span>for the name that was looked up.
+<span class="type">NULL</span> is returned if the lookups by
+<code class="function">lwres_gethostbyname()</code> or
+<code class="function">lwres_gethostbyname2()</code> fail.
+</p>
+<p>
+Reverse lookups of addresses are performed by
+<code class="function">lwres_gethostbyaddr()</code>.
+<em class="parameter"><code>addr</code></em> is an address of length
+<em class="parameter"><code>len</code></em> bytes and protocol family
+<em class="parameter"><code>type</code></em> &#8212; <span class="type">PF_INET</span> or
+<span class="type">PF_INET6</span>.
+<code class="function">lwres_gethostbyname_r()</code> is a thread-safe function
for forward lookups. If an error occurs, an error code is returned in
-<VAR
-CLASS="PARAMETER"
->*error</VAR
->.
-<VAR
-CLASS="PARAMETER"
->resbuf</VAR
-> is a pointer to a <SPAN
-CLASS="TYPE"
->struct
-hostent</SPAN
-> which is initialised by a successful call to
-<CODE
-CLASS="FUNCTION"
->lwres_gethostbyname_r()</CODE
-> .
-<VAR
-CLASS="PARAMETER"
->buf</VAR
-> is a buffer of length
-<VAR
-CLASS="PARAMETER"
->len</VAR
-> bytes which is used to store the
-<CODE
-CLASS="CONSTANT"
->h_name</CODE
->, <CODE
-CLASS="CONSTANT"
->h_aliases</CODE
->, and
-<CODE
-CLASS="CONSTANT"
->h_addr_list</CODE
-> elements of the <SPAN
-CLASS="TYPE"
->struct
-hostent</SPAN
-> returned in <VAR
-CLASS="PARAMETER"
->resbuf</VAR
->.
-Successful calls to <CODE
-CLASS="FUNCTION"
->lwres_gethostbyname_r()</CODE
->
-return <VAR
-CLASS="PARAMETER"
->resbuf</VAR
->,
-which is a pointer to the <SPAN
-CLASS="TYPE"
->struct hostent</SPAN
-> it created.</P
-><P
-><CODE
-CLASS="FUNCTION"
->lwres_gethostbyaddr_r()</CODE
-> is a thread-safe function
-that performs a reverse lookup of address <VAR
-CLASS="PARAMETER"
->addr</VAR
->
-which is <VAR
-CLASS="PARAMETER"
->len</VAR
-> bytes long and is of protocol
-family <VAR
-CLASS="PARAMETER"
->type</VAR
-> &mdash; <SPAN
-CLASS="TYPE"
->PF_INET</SPAN
-> or
-<SPAN
-CLASS="TYPE"
->PF_INET6</SPAN
->. If an error occurs, the error code is returned
-in <VAR
-CLASS="PARAMETER"
->*error</VAR
->. The other function parameters are
-identical to those in <CODE
-CLASS="FUNCTION"
->lwres_gethostbyname_r()</CODE
->.
-<VAR
-CLASS="PARAMETER"
->resbuf</VAR
-> is a pointer to a <SPAN
-CLASS="TYPE"
->struct
-hostent</SPAN
-> which is initialised by a successful call to
-<CODE
-CLASS="FUNCTION"
->lwres_gethostbyaddr_r()</CODE
->.
-<VAR
-CLASS="PARAMETER"
->buf</VAR
-> is a buffer of length
-<VAR
-CLASS="PARAMETER"
->len</VAR
-> bytes which is used to store the
-<CODE
-CLASS="CONSTANT"
->h_name</CODE
->, <CODE
-CLASS="CONSTANT"
->h_aliases</CODE
->, and
-<CODE
-CLASS="CONSTANT"
->h_addr_list</CODE
-> elements of the <SPAN
-CLASS="TYPE"
->struct
-hostent</SPAN
-> returned in <VAR
-CLASS="PARAMETER"
->resbuf</VAR
->. Successful
-calls to <CODE
-CLASS="FUNCTION"
->lwres_gethostbyaddr_r()</CODE
-> return
-<VAR
-CLASS="PARAMETER"
->resbuf</VAR
->, which is a pointer to the
-<CODE
-CLASS="FUNCTION"
->struct hostent()</CODE
-> it created.</P
-></DIV
-><DIV
-CLASS="REFSECT1"
-><A
-NAME="AEN191"
-></A
-><H2
->RETURN VALUES</H2
-><P
->The functions
-<CODE
-CLASS="FUNCTION"
->lwres_gethostbyname()</CODE
->,
-<CODE
-CLASS="FUNCTION"
->lwres_gethostbyname2()</CODE
->,
-<CODE
-CLASS="FUNCTION"
->lwres_gethostbyaddr()</CODE
->,
+<em class="parameter"><code>*error</code></em>.
+<em class="parameter"><code>resbuf</code></em> is a pointer to a <span class="type">struct
+hostent</span> which is initialised by a successful call to
+<code class="function">lwres_gethostbyname_r()</code> .
+<em class="parameter"><code>buf</code></em> is a buffer of length
+<em class="parameter"><code>len</code></em> bytes which is used to store the
+<code class="constant">h_name</code>, <code class="constant">h_aliases</code>, and
+<code class="constant">h_addr_list</code> elements of the <span class="type">struct
+hostent</span> returned in <em class="parameter"><code>resbuf</code></em>.
+Successful calls to <code class="function">lwres_gethostbyname_r()</code>
+return <em class="parameter"><code>resbuf</code></em>,
+which is a pointer to the <span class="type">struct hostent</span> it created.
+</p>
+<p>
+<code class="function">lwres_gethostbyaddr_r()</code> is a thread-safe function
+that performs a reverse lookup of address <em class="parameter"><code>addr</code></em>
+which is <em class="parameter"><code>len</code></em> bytes long and is of protocol
+family <em class="parameter"><code>type</code></em> &#8212; <span class="type">PF_INET</span> or
+<span class="type">PF_INET6</span>. If an error occurs, the error code is returned
+in <em class="parameter"><code>*error</code></em>. The other function parameters are
+identical to those in <code class="function">lwres_gethostbyname_r()</code>.
+<em class="parameter"><code>resbuf</code></em> is a pointer to a <span class="type">struct
+hostent</span> which is initialised by a successful call to
+<code class="function">lwres_gethostbyaddr_r()</code>.
+<em class="parameter"><code>buf</code></em> is a buffer of length
+<em class="parameter"><code>len</code></em> bytes which is used to store the
+<code class="constant">h_name</code>, <code class="constant">h_aliases</code>, and
+<code class="constant">h_addr_list</code> elements of the <span class="type">struct
+hostent</span> returned in <em class="parameter"><code>resbuf</code></em>. Successful
+calls to <code class="function">lwres_gethostbyaddr_r()</code> return
+<em class="parameter"><code>resbuf</code></em>, which is a pointer to the
+<code class="function">struct hostent()</code> it created.
+</p>
+</div>
+<div class="refsect1" lang="en">
+<a name="id2526380"></a><h2>RETURN VALUES</h2>
+<p>
+The functions
+<code class="function">lwres_gethostbyname()</code>,
+<code class="function">lwres_gethostbyname2()</code>,
+<code class="function">lwres_gethostbyaddr()</code>,
and
-<CODE
-CLASS="FUNCTION"
->lwres_gethostent()</CODE
->
+<code class="function">lwres_gethostent()</code>
return NULL to indicate an error. In this case the global variable
-<SPAN
-CLASS="TYPE"
->lwres_h_errno</SPAN
->
+<span class="type">lwres_h_errno</span>
will contain one of the following error codes defined in
-<TT
-CLASS="FILENAME"
->&lt;lwres/netdb.h&gt;</TT
->:
+<code class="filename">&lt;lwres/netdb.h&gt;</code>:
-<P
-></P
-><DIV
-CLASS="VARIABLELIST"
-><DL
-><DT
-><CODE
-CLASS="CONSTANT"
->HOST_NOT_FOUND</CODE
-></DT
-><DD
-><P
->The host or address was not found.</P
-></DD
-><DT
-><CODE
-CLASS="CONSTANT"
->TRY_AGAIN</CODE
-></DT
-><DD
-><P
->A recoverable error occurred, e.g., a timeout.
-Retrying the lookup may succeed.</P
-></DD
-><DT
-><CODE
-CLASS="CONSTANT"
->NO_RECOVERY</CODE
-></DT
-><DD
-><P
->A non-recoverable error occurred.</P
-></DD
-><DT
-><CODE
-CLASS="CONSTANT"
->NO_DATA</CODE
-></DT
-><DD
-><P
->The name exists, but has no address information
+</p>
+<div class="variablelist"><dl>
+<dt><span class="term"><code class="constant">HOST_NOT_FOUND</code></span></dt>
+<dd><p>
+The host or address was not found.
+</p></dd>
+<dt><span class="term"><code class="constant">TRY_AGAIN</code></span></dt>
+<dd><p>
+A recoverable error occurred, e.g., a timeout.
+Retrying the lookup may succeed.
+</p></dd>
+<dt><span class="term"><code class="constant">NO_RECOVERY</code></span></dt>
+<dd><p>
+A non-recoverable error occurred.
+</p></dd>
+<dt><span class="term"><code class="constant">NO_DATA</code></span></dt>
+<dd><p>
+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.</P
-></DD
-></DL
-></DIV
-></P
-><P
-><SPAN
-CLASS="CITEREFENTRY"
-><SPAN
-CLASS="REFENTRYTITLE"
->lwres_hstrerror</SPAN
->(3)</SPAN
->
-translates these error codes to suitable error messages.</P
-><P
-><CODE
-CLASS="FUNCTION"
->lwres_gethostent()</CODE
->
+compatibility.
+</p></dd>
+</dl></div>
+<p>
+</p>
+<p>
+<span class="citerefentry"><span class="refentrytitle">lwres_hstrerror</span>(3
+)</span>
+translates these error codes to suitable error messages.
+</p>
+<p>
+<code class="function">lwres_gethostent()</code>
and
-<CODE
-CLASS="FUNCTION"
->lwres_gethostent_r()</CODE
->
+<code class="function">lwres_gethostent_r()</code>
always return
-<SPAN
-CLASS="TYPE"
->NULL</SPAN
->.</P
-><P
->Successful calls to <CODE
-CLASS="FUNCTION"
->lwres_gethostbyname_r()</CODE
-> and
-<CODE
-CLASS="FUNCTION"
->lwres_gethostbyaddr_r()</CODE
-> return
-<VAR
-CLASS="PARAMETER"
->resbuf</VAR
->, a pointer to the <SPAN
-CLASS="TYPE"
->struct
-hostent</SPAN
-> that was initialised by these functions. They return
-<SPAN
-CLASS="TYPE"
->NULL</SPAN
-> if the lookups fail or if <VAR
-CLASS="PARAMETER"
->buf</VAR
->
+<span class="type">NULL</span>.
+</p>
+<p>
+Successful calls to <code class="function">lwres_gethostbyname_r()</code> and
+<code class="function">lwres_gethostbyaddr_r()</code> return
+<em class="parameter"><code>resbuf</code></em>, a pointer to the <span class="type">struct
+hostent</span> that was initialised by these functions. They return
+<span class="type">NULL</span> if the lookups fail or if <em class="parameter"><code>buf</code></em>
was too small to hold the list of addresses and names referenced by
-the <CODE
-CLASS="CONSTANT"
->h_name</CODE
->, <CODE
-CLASS="CONSTANT"
->h_aliases</CODE
->, and
-<CODE
-CLASS="CONSTANT"
->h_addr_list</CODE
-> elements of the <SPAN
-CLASS="TYPE"
->struct
-hostent</SPAN
->. If <VAR
-CLASS="PARAMETER"
->buf</VAR
-> was too small, both
-<CODE
-CLASS="FUNCTION"
->lwres_gethostbyname_r()</CODE
-> and
-<CODE
-CLASS="FUNCTION"
->lwres_gethostbyaddr_r()</CODE
-> set the global variable
-<SPAN
-CLASS="TYPE"
->errno</SPAN
-> to <SPAN
-CLASS="ERRORCODE"
->ERANGE</SPAN
->.</P
-></DIV
-><DIV
-CLASS="REFSECT1"
-><A
-NAME="AEN245"
-></A
-><H2
->SEE ALSO</H2
-><P
-><SPAN
-CLASS="CITEREFENTRY"
-><SPAN
-CLASS="REFENTRYTITLE"
->gethostent</SPAN
->(3)</SPAN
->,
+the <code class="constant">h_name</code>, <code class="constant">h_aliases</code>, and
+<code class="constant">h_addr_list</code> elements of the <span class="type">struct
+hostent</span>. If <em class="parameter"><code>buf</code></em> was too small, both
+<code class="function">lwres_gethostbyname_r()</code> and
+<code class="function">lwres_gethostbyaddr_r()</code> set the global variable
+<span class="type">errno</span> to <span class="errorcode">ERANGE</span>.
+</p>
+</div>
+<div class="refsect1" lang="en">
+<a name="id2526540"></a><h2>SEE ALSO</h2>
+<p>
+<span class="citerefentry"><span class="refentrytitle">gethostent</span>(3)</span>,
-<SPAN
-CLASS="CITEREFENTRY"
-><SPAN
-CLASS="REFENTRYTITLE"
->lwres_getipnode</SPAN
->(3)</SPAN
->,
+<span class="citerefentry"><span class="refentrytitle">lwres_getipnode</span>(3)</span>,
-<SPAN
-CLASS="CITEREFENTRY"
-><SPAN
-CLASS="REFENTRYTITLE"
->lwres_hstrerror</SPAN
->(3)</SPAN
-></P
-></DIV
-><DIV
-CLASS="REFSECT1"
-><A
-NAME="AEN257"
-></A
-><H2
->BUGS</H2
-><P
-><CODE
-CLASS="FUNCTION"
->lwres_gethostbyname()</CODE
->,
-<CODE
-CLASS="FUNCTION"
->lwres_gethostbyname2()</CODE
->,
-<CODE
-CLASS="FUNCTION"
->lwres_gethostbyaddr()</CODE
->
+<span class="citerefentry"><span class="refentrytitle">lwres_hstrerror</span>(3
+)</span>
+</p>
+</div>
+<div class="refsect1" lang="en">
+<a name="id2526644"></a><h2>BUGS</h2>
+<p>
+<code class="function">lwres_gethostbyname()</code>,
+<code class="function">lwres_gethostbyname2()</code>,
+<code class="function">lwres_gethostbyaddr()</code>
and
-<CODE
-CLASS="FUNCTION"
->lwres_endhostent()</CODE
->
+<code class="function">lwres_endhostent()</code>
are not thread safe; they return pointers to static data and
provide error codes through a global variable.
Thread-safe versions for name and address lookup are provided by
-<CODE
-CLASS="FUNCTION"
->lwres_gethostbyname_r()</CODE
->,
+<code class="function">lwres_gethostbyname_r()</code>,
and
-<CODE
-CLASS="FUNCTION"
->lwres_gethostbyaddr_r()</CODE
->
-respectively.</P
-><P
->The resolver daemon does not currently support any non-DNS
+<code class="function">lwres_gethostbyaddr_r()</code>
+respectively.
+</p>
+<p>
+The resolver daemon does not currently support any non-DNS
name services such as
-<TT
-CLASS="FILENAME"
->/etc/hosts</TT
->
+<code class="filename">/etc/hosts</code>
or
-<SPAN
-CLASS="TYPE"
->NIS</SPAN
->,
-consequently the above functions don't, either.</P
-></DIV
-></BODY
-></HTML
->
+<span class="type">NIS</span>,
+consequently the above functions don't, either.
+</p>
+</div>
+</div></body>
+</html>
diff --git a/contrib/bind9/lib/lwres/man/lwres_getipnode.3 b/contrib/bind9/lib/lwres/man/lwres_getipnode.3
index 815a841..d83758c 100644
--- a/contrib/bind9/lib/lwres/man/lwres_getipnode.3
+++ b/contrib/bind9/lib/lwres/man/lwres_getipnode.3
@@ -1,46 +1,46 @@
-.\" Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
-.\" Copyright (C) 2000, 2001 Internet Software Consortium.
-.\"
+.\" Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
+.\" Copyright (C) 2000, 2001, 2003 Internet Software Consortium.
+.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
-.\"
+.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND 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,
+.\" 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.
.\"
-.\" $Id: lwres_getipnode.3,v 1.13.2.2.4.2 2004/03/09 05:21:10 marka Exp $
+.\" $Id: lwres_getipnode.3,v 1.13.2.2.4.6 2005/10/13 02:33:53 marka Exp $
.\"
-.TH "LWRES_GETIPNODE" "3" "Jun 30, 2000" "BIND9" ""
-.SH NAME
+.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.
+.TH "LWRES_GETIPNODE" "3" "Jun 30, 2000" "BIND9" "BIND9"
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.SH "NAME"
lwres_getipnodebyname, lwres_getipnodebyaddr, lwres_freehostent \- lightweight resolver nodename / address translation API
-.SH SYNOPSIS
-\fB#include <lwres/netdb.h>
-.sp
-.na
-struct hostent *
-lwres_getipnodebyname(const char *name, int af, int flags, int *error_num);
-.ad
-.sp
-.na
-struct hostent *
-lwres_getipnodebyaddr(const void *src, size_t len, int af, int *error_num);
-.ad
-.sp
-.na
-void
-lwres_freehostent(struct hostent *he);
-.ad
-\fR
+.SH "SYNOPSIS"
+.nf
+#include <lwres/netdb.h>
+.fi
+.HP 39
+\fBstruct\ hostent\ *\ \fBlwres_getipnodebyname\fR\fR\fB(\fR\fBconst\ char\ *name\fR\fB, \fR\fBint\ af\fR\fB, \fR\fBint\ flags\fR\fB, \fR\fBint\ *error_num\fR\fB);\fR
+.HP 39
+\fBstruct\ hostent\ *\ \fBlwres_getipnodebyaddr\fR\fR\fB(\fR\fBconst\ void\ *src\fR\fB, \fR\fBsize_t\ len\fR\fB, \fR\fBint\ af\fR\fB, \fR\fBint\ *error_num\fR\fB);\fR
+.HP 23
+\fBvoid\ \fBlwres_freehostent\fR\fR\fB(\fR\fBstruct\ hostent\ *he\fR\fB);\fR
.SH "DESCRIPTION"
.PP
-These functions perform thread safe, protocol independent
-nodename-to-address and address-to-nodename
-translation as defined in RFC2553.
+These functions perform thread safe, protocol independent nodename\-to\-address and address\-to\-nodename translation as defined in RFC2553.
.PP
They use a
\fBstruct hostent\fR
@@ -56,8 +56,8 @@ struct hostent {
char **h_addr_list; /* list of addresses from name server */
};
#define h_addr h_addr_list[0] /* address, for backward compatibility */
-.sp
.fi
+.sp
.PP
The members of this structure are:
.TP
@@ -65,10 +65,10 @@ The members of this structure are:
The official (canonical) name of the host.
.TP
\fBh_aliases\fR
-A NULL-terminated array of alternate names (nicknames) for the host.
+A NULL\-terminated array of alternate names (nicknames) for the host.
.TP
\fBh_addrtype\fR
-The type of address being returned - usually
+The type of address being returned \- usually
\fBPF_INET\fR
or
\fBPF_INET6\fR.
@@ -79,49 +79,38 @@ The length of the address in bytes.
\fBh_addr_list\fR
A
\fBNULL\fR
-terminated array of network addresses for the host.
-Host addresses are returned in network byte order.
+terminated array of network addresses for the host. Host addresses are returned in network byte order.
.PP
\fBlwres_getipnodebyname()\fR
looks up addresses of protocol family
\fIaf\fR
for the hostname
-\fIname\fR.
-The
+\fIname\fR. The
\fIflags\fR
-parameter contains ORed flag bits to
-specify the types of addresses that are searched
-for, and the types of addresses that are returned.
-The flag bits are:
+parameter contains ORed flag bits to specify the types of addresses that are searched for, and the types of addresses that are returned. The flag bits are:
.TP
\fBAI_V4MAPPED\fR
This is used with an
\fIaf\fR
-of AF_INET6, and causes IPv4 addresses to be returned as IPv4-mapped
-IPv6 addresses.
+of AF_INET6, and causes IPv4 addresses to be returned as IPv4\-mapped IPv6 addresses.
.TP
\fBAI_ALL\fR
This is used with an
\fIaf\fR
-of AF_INET6, and causes all known addresses (IPv6 and IPv4) to be returned.
-If AI_V4MAPPED is also set, the IPv4 addresses are return as mapped
-IPv6 addresses.
+of AF_INET6, and causes all known addresses (IPv6 and IPv4) to be returned. If AI_V4MAPPED is also set, the IPv4 addresses are return as mapped IPv6 addresses.
.TP
\fBAI_ADDRCONFIG\fR
-Only return an IPv6 or IPv4 address if here is an active network
-interface of that type. This is not currently implemented
-in the BIND 9 lightweight resolver, and the flag is ignored.
+Only return an IPv6 or IPv4 address if here is an active network interface of that type. This is not currently implemented in the BIND 9 lightweight resolver, and the flag is ignored.
.TP
\fBAI_DEFAULT\fR
This default sets the
-AI_V4MAPPED
+\fBAI_V4MAPPED\fR
and
-AI_ADDRCONFIG
+\fBAI_ADDRCONFIG\fR
flag bits.
.PP
\fBlwres_getipnodebyaddr()\fR
-performs a reverse lookup
-of address
+performs a reverse lookup of address
\fIsrc\fR
which is
\fIlen\fR
@@ -133,16 +122,14 @@ or
\fBPF_INET6\fR.
.PP
\fBlwres_freehostent()\fR
-releases all the memory associated with
-the
+releases all the memory associated with the
\fBstruct hostent\fR
pointer
-\fIhe\fR.
-Any memory allocated for the
-h_name,
-h_addr_list
+\fIhe\fR. Any memory allocated for the
+\fBh_name\fR,
+\fBh_addr_list\fR
and
-h_aliases
+\fBh_aliases\fR
is freed, as is the memory for the
\fBhostent\fR
structure itself.
@@ -156,32 +143,26 @@ set
\fI*error_num\fR
to an appropriate error code and the function returns a
\fBNULL\fR
-pointer.
-The error codes and their meanings are defined in
+pointer. The error codes and their meanings are defined in
\fI<lwres/netdb.h>\fR:
.TP
\fBHOST_NOT_FOUND\fR
No such host is known.
.TP
\fBNO_ADDRESS\fR
-The server recognised the request and the name but no address is
-available. Another type of request to the name server for the
-domain might return an answer.
+The server recognised the request and the name but no address is available. Another type of request to the name server for the domain might return an answer.
.TP
\fBTRY_AGAIN\fR
-A temporary and possibly transient error occurred, such as a
-failure of a server to respond. The request may succeed if
-retried.
+A temporary and possibly transient error occurred, such as a failure of a server to respond. The request may succeed if retried.
.TP
\fBNO_RECOVERY\fR
-An unexpected failure occurred, and retrying the request
-is pointless.
+An unexpected failure occurred, and retrying the request is pointless.
.PP
-\fBlwres_hstrerror\fR(3)
+\fBlwres_hstrerror\fR(3 )
translates these error codes to suitable error messages.
.SH "SEE ALSO"
.PP
-\fBRFC2553\fR,
+\fBRFC2553\fR(),
\fBlwres\fR(3),
\fBlwres_gethostent\fR(3),
\fBlwres_getaddrinfo\fR(3),
diff --git a/contrib/bind9/lib/lwres/man/lwres_getipnode.docbook b/contrib/bind9/lib/lwres/man/lwres_getipnode.docbook
index 30c04a3..94de72c 100644
--- a/contrib/bind9/lib/lwres/man/lwres_getipnode.docbook
+++ b/contrib/bind9/lib/lwres/man/lwres_getipnode.docbook
@@ -1,7 +1,9 @@
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.0//EN"
+ "http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd"
+ [<!ENTITY mdash "&#8212;">]>
<!--
- - Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
- - Copyright (C) 2001, 2003 Internet Software Consortium.
+ - Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
+ - Copyright (C) 2000, 2001, 2003 Internet Software Consortium.
-
- Permission to use, copy, modify, and distribute this software for any
- purpose with or without fee is hereby granted, provided that the above
@@ -16,7 +18,7 @@
- PERFORMANCE OF THIS SOFTWARE.
-->
-<!-- $Id: lwres_getipnode.docbook,v 1.4.2.2.4.1 2004/03/06 08:15:39 marka Exp $ -->
+<!-- $Id: lwres_getipnode.docbook,v 1.4.2.2.4.3 2005/05/12 21:36:14 sra Exp $ -->
<refentry>
@@ -30,6 +32,20 @@
<refmiscinfo>BIND9</refmiscinfo>
</refmeta>
+ <docinfo>
+ <copyright>
+ <year>2004</year>
+ <year>2005</year>
+ <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
+ </copyright>
+ <copyright>
+ <year>2000</year>
+ <year>2001</year>
+ <year>2003</year>
+ <holder>Internet Software Consortium.</holder>
+ </copyright>
+ </docinfo>
+
<refnamediv>
<refname>lwres_getipnodebyname</refname>
<refname>lwres_getipnodebyaddr</refname>
diff --git a/contrib/bind9/lib/lwres/man/lwres_getipnode.html b/contrib/bind9/lib/lwres/man/lwres_getipnode.html
index 3063d44..c5038b4 100644
--- a/contrib/bind9/lib/lwres/man/lwres_getipnode.html
+++ b/contrib/bind9/lib/lwres/man/lwres_getipnode.html
@@ -1,512 +1,298 @@
<!--
- - Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
- - Copyright (C) 2001, 2003 Internet Software Consortium.
- -
+ - Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
+ - Copyright (C) 2000, 2001, 2003 Internet Software Consortium.
+ -
- Permission to use, copy, modify, and distribute this software for any
- purpose with or without fee is hereby granted, provided that the above
- copyright notice and this permission notice appear in all copies.
- -
+ -
- THE SOFTWARE IS PROVIDED "AS IS" AND 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,
+ - 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.
-->
-
-<!-- $Id: lwres_getipnode.html,v 1.7.2.1.4.2 2004/08/22 23:39:04 marka Exp $ -->
-
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<HTML
-><HEAD
-><TITLE
->lwres_getipnode</TITLE
-><META
-NAME="GENERATOR"
-CONTENT="Modular DocBook HTML Stylesheet Version 1.7"></HEAD
-><BODY
-CLASS="REFENTRY"
-BGCOLOR="#FFFFFF"
-TEXT="#000000"
-LINK="#0000FF"
-VLINK="#840084"
-ALINK="#0000FF"
-><H1
-><A
-NAME="AEN1"
-></A
->lwres_getipnode</H1
-><DIV
-CLASS="REFNAMEDIV"
-><A
-NAME="AEN8"
-></A
-><H2
->Name</H2
->lwres_getipnodebyname, lwres_getipnodebyaddr, lwres_freehostent&nbsp;--&nbsp;lightweight resolver nodename / address translation API</DIV
-><DIV
-CLASS="REFSYNOPSISDIV"
-><A
-NAME="AEN13"
-></A
-><H2
->Synopsis</H2
-><DIV
-CLASS="FUNCSYNOPSIS"
-><P
-></P
-><A
-NAME="AEN14"
-></A
-><PRE
-CLASS="FUNCSYNOPSISINFO"
->#include &lt;lwres/netdb.h&gt;</PRE
-><P
-><CODE
-><CODE
-CLASS="FUNCDEF"
->struct hostent *
-lwres_getipnodebyname</CODE
->(const char *name, int af, int flags, int *error_num);</CODE
-></P
-><P
-><CODE
-><CODE
-CLASS="FUNCDEF"
->struct hostent *
-lwres_getipnodebyaddr</CODE
->(const void *src, size_t len, int af, int *error_num);</CODE
-></P
-><P
-><CODE
-><CODE
-CLASS="FUNCDEF"
->void
-lwres_freehostent</CODE
->(struct hostent *he);</CODE
-></P
-><P
-></P
-></DIV
-></DIV
-><DIV
-CLASS="REFSECT1"
-><A
-NAME="AEN34"
-></A
-><H2
->DESCRIPTION</H2
-><P
->These functions perform thread safe, protocol independent
+<!-- $Id: lwres_getipnode.html,v 1.7.2.1.4.9 2005/10/13 02:33:56 marka Exp $ -->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>lwres_getipnode</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en">
+<a name="id2463721"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2>Name</h2>
+<p>lwres_getipnodebyname, lwres_getipnodebyaddr, lwres_freehostent &#8212; lightweight resolver nodename / address translation API</p>
+</div>
+<div class="refsynopsisdiv">
+<h2>Synopsis</h2>
+<div class="funcsynopsis">
+<pre class="funcsynopsisinfo">#include &lt;lwres/netdb.h&gt;</pre>
+<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em">
+<tr>
+<td><code class="funcdef">
+struct hostent *
+<b class="fsfunc">lwres_getipnodebyname</b>(</code></td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>
+<code>)</code>;</td>
+</tr>
+</table>
+<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em">
+<tr>
+<td><code class="funcdef">
+struct hostent *
+<b class="fsfunc">lwres_getipnodebyaddr</b>(</code></td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>
+<code>)</code>;</td>
+</tr>
+</table>
+<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0"><tr>
+<td><code class="funcdef">
+void
+<b class="fsfunc">lwres_freehostent</b>(</code></td>
+<td> </td>
+<td>
+<code>)</code>;</td>
+</tr></table>
+</div>
+</div>
+<div class="refsect1" lang="en">
+<a name="id2525896"></a><h2>DESCRIPTION</h2>
+<p>
+These functions perform thread safe, protocol independent
nodename-to-address and address-to-nodename
-translation as defined in RFC2553.</P
-><P
->They use a
-<SPAN
-CLASS="TYPE"
->struct hostent</SPAN
->
+translation as defined in RFC2553.
+</p>
+<p>
+They use a
+<span class="type">struct hostent</span>
which is defined in
-<TT
-CLASS="FILENAME"
->namedb.h</TT
->:
-<PRE
-CLASS="PROGRAMLISTING"
->struct hostent {
+<code class="filename">namedb.h</code>:
+</p>
+<pre class="programlisting">
+struct hostent {
char *h_name; /* official name of host */
char **h_aliases; /* alias list */
int h_addrtype; /* host address type */
int h_length; /* length of address */
char **h_addr_list; /* list of addresses from name server */
};
-#define h_addr h_addr_list[0] /* address, for backward compatibility */</PRE
-></P
-><P
->The members of this structure are:
-<P
-></P
-><DIV
-CLASS="VARIABLELIST"
-><DL
-><DT
-><CODE
-CLASS="CONSTANT"
->h_name</CODE
-></DT
-><DD
-><P
->The official (canonical) name of the host.</P
-></DD
-><DT
-><CODE
-CLASS="CONSTANT"
->h_aliases</CODE
-></DT
-><DD
-><P
->A NULL-terminated array of alternate names (nicknames) for the host.</P
-></DD
-><DT
-><CODE
-CLASS="CONSTANT"
->h_addrtype</CODE
-></DT
-><DD
-><P
->The type of address being returned - usually
-<SPAN
-CLASS="TYPE"
->PF_INET</SPAN
->
+#define h_addr h_addr_list[0] /* address, for backward compatibility */
+</pre>
+<p>
+</p>
+<p>
+The members of this structure are:
+</p>
+<div class="variablelist"><dl>
+<dt><span class="term"><code class="constant">h_name</code></span></dt>
+<dd><p>
+The official (canonical) name of the host.
+</p></dd>
+<dt><span class="term"><code class="constant">h_aliases</code></span></dt>
+<dd><p>
+A NULL-terminated array of alternate names (nicknames) for the host.
+</p></dd>
+<dt><span class="term"><code class="constant">h_addrtype</code></span></dt>
+<dd><p>
+The type of address being returned - usually
+<span class="type">PF_INET</span>
or
-<SPAN
-CLASS="TYPE"
->PF_INET6</SPAN
->.&#13;</P
-></DD
-><DT
-><CODE
-CLASS="CONSTANT"
->h_length</CODE
-></DT
-><DD
-><P
->The length of the address in bytes.</P
-></DD
-><DT
-><CODE
-CLASS="CONSTANT"
->h_addr_list</CODE
-></DT
-><DD
-><P
->A
-<SPAN
-CLASS="TYPE"
->NULL</SPAN
->
+<span class="type">PF_INET6</span>.
+
+</p></dd>
+<dt><span class="term"><code class="constant">h_length</code></span></dt>
+<dd><p>
+The length of the address in bytes.
+</p></dd>
+<dt><span class="term"><code class="constant">h_addr_list</code></span></dt>
+<dd><p>
+A
+<span class="type">NULL</span>
terminated array of network addresses for the host.
-Host addresses are returned in network byte order.</P
-></DD
-></DL
-></DIV
-></P
-><P
-><CODE
-CLASS="FUNCTION"
->lwres_getipnodebyname()</CODE
->
+Host addresses are returned in network byte order.
+</p></dd>
+</dl></div>
+<p>
+</p>
+<p>
+<code class="function">lwres_getipnodebyname()</code>
looks up addresses of protocol family
-<VAR
-CLASS="PARAMETER"
->af</VAR
->
+<em class="parameter"><code>af</code></em>
for the hostname
-<VAR
-CLASS="PARAMETER"
->name</VAR
->.
+<em class="parameter"><code>name</code></em>.
The
-<VAR
-CLASS="PARAMETER"
->flags</VAR
->
+<em class="parameter"><code>flags</code></em>
parameter contains ORed flag bits to
specify the types of addresses that are searched
for, and the types of addresses that are returned.
The flag bits are:
-<P
-></P
-><DIV
-CLASS="VARIABLELIST"
-><DL
-><DT
-><CODE
-CLASS="CONSTANT"
->AI_V4MAPPED</CODE
-></DT
-><DD
-><P
->This is used with an
-<VAR
-CLASS="PARAMETER"
->af</VAR
->
+</p>
+<div class="variablelist"><dl>
+<dt><span class="term"><code class="constant">AI_V4MAPPED</code></span></dt>
+<dd><p>
+This is used with an
+<em class="parameter"><code>af</code></em>
of AF_INET6, and causes IPv4 addresses to be returned as IPv4-mapped
-IPv6 addresses.</P
-></DD
-><DT
-><CODE
-CLASS="CONSTANT"
->AI_ALL</CODE
-></DT
-><DD
-><P
->This is used with an
-<VAR
-CLASS="PARAMETER"
->af</VAR
->
+IPv6 addresses.
+</p></dd>
+<dt><span class="term"><code class="constant">AI_ALL</code></span></dt>
+<dd><p>
+This is used with an
+<em class="parameter"><code>af</code></em>
of AF_INET6, and causes all known addresses (IPv6 and IPv4) to be returned.
If AI_V4MAPPED is also set, the IPv4 addresses are return as mapped
-IPv6 addresses.</P
-></DD
-><DT
-><CODE
-CLASS="CONSTANT"
->AI_ADDRCONFIG</CODE
-></DT
-><DD
-><P
->Only return an IPv6 or IPv4 address if here is an active network
+IPv6 addresses.
+</p></dd>
+<dt><span class="term"><code class="constant">AI_ADDRCONFIG</code></span></dt>
+<dd><p>
+Only return an IPv6 or IPv4 address if here is an active network
interface of that type. This is not currently implemented
-in the BIND 9 lightweight resolver, and the flag is ignored.</P
-></DD
-><DT
-><CODE
-CLASS="CONSTANT"
->AI_DEFAULT</CODE
-></DT
-><DD
-><P
->This default sets the
-<CODE
-CLASS="CONSTANT"
->AI_V4MAPPED</CODE
->
+in the BIND 9 lightweight resolver, and the flag is ignored.
+</p></dd>
+<dt><span class="term"><code class="constant">AI_DEFAULT</code></span></dt>
+<dd><p>
+This default sets the
+<code class="constant">AI_V4MAPPED</code>
and
-<CODE
-CLASS="CONSTANT"
->AI_ADDRCONFIG</CODE
->
-flag bits.</P
-></DD
-></DL
-></DIV
-></P
-><P
-><CODE
-CLASS="FUNCTION"
->lwres_getipnodebyaddr()</CODE
->
+<code class="constant">AI_ADDRCONFIG</code>
+flag bits.
+</p></dd>
+</dl></div>
+<p>
+</p>
+<p>
+<code class="function">lwres_getipnodebyaddr()</code>
performs a reverse lookup
of address
-<VAR
-CLASS="PARAMETER"
->src</VAR
->
+<em class="parameter"><code>src</code></em>
which is
-<VAR
-CLASS="PARAMETER"
->len</VAR
->
+<em class="parameter"><code>len</code></em>
bytes long.
-<VAR
-CLASS="PARAMETER"
->af</VAR
->
+<em class="parameter"><code>af</code></em>
denotes the protocol family, typically
-<SPAN
-CLASS="TYPE"
->PF_INET</SPAN
->
+<span class="type">PF_INET</span>
or
-<SPAN
-CLASS="TYPE"
->PF_INET6</SPAN
->.&#13;</P
-><P
-><CODE
-CLASS="FUNCTION"
->lwres_freehostent()</CODE
->
+<span class="type">PF_INET6</span>.
+
+</p>
+<p>
+<code class="function">lwres_freehostent()</code>
releases all the memory associated with
the
-<SPAN
-CLASS="TYPE"
->struct hostent</SPAN
->
+<span class="type">struct hostent</span>
pointer
-<VAR
-CLASS="PARAMETER"
->he</VAR
->.
+<em class="parameter"><code>he</code></em>.
Any memory allocated for the
-<CODE
-CLASS="CONSTANT"
->h_name</CODE
->,
+<code class="constant">h_name</code>,
-<CODE
-CLASS="CONSTANT"
->h_addr_list</CODE
->
+<code class="constant">h_addr_list</code>
and
-<CODE
-CLASS="CONSTANT"
->h_aliases</CODE
->
+<code class="constant">h_aliases</code>
is freed, as is the memory for the
-<SPAN
-CLASS="TYPE"
->hostent</SPAN
->
-structure itself.</P
-></DIV
-><DIV
-CLASS="REFSECT1"
-><A
-NAME="AEN116"
-></A
-><H2
->RETURN VALUES</H2
-><P
->If an error occurs,
-<CODE
-CLASS="FUNCTION"
->lwres_getipnodebyname()</CODE
->
+<span class="type">hostent</span>
+structure itself.
+</p>
+</div>
+<div class="refsect1" lang="en">
+<a name="id2526131"></a><h2>RETURN VALUES</h2>
+<p>
+If an error occurs,
+<code class="function">lwres_getipnodebyname()</code>
and
-<CODE
-CLASS="FUNCTION"
->lwres_getipnodebyaddr()</CODE
->
+<code class="function">lwres_getipnodebyaddr()</code>
set
-<VAR
-CLASS="PARAMETER"
->*error_num</VAR
->
+<em class="parameter"><code>*error_num</code></em>
to an appropriate error code and the function returns a
-<SPAN
-CLASS="TYPE"
->NULL</SPAN
->
+<span class="type">NULL</span>
pointer.
The error codes and their meanings are defined in
-<TT
-CLASS="FILENAME"
->&lt;lwres/netdb.h&gt;</TT
->:
-<P
-></P
-><DIV
-CLASS="VARIABLELIST"
-><DL
-><DT
-><CODE
-CLASS="CONSTANT"
->HOST_NOT_FOUND</CODE
-></DT
-><DD
-><P
->No such host is known.</P
-></DD
-><DT
-><CODE
-CLASS="CONSTANT"
->NO_ADDRESS</CODE
-></DT
-><DD
-><P
->The server recognised the request and the name but no address is
+<code class="filename">&lt;lwres/netdb.h&gt;</code>:
+</p>
+<div class="variablelist"><dl>
+<dt><span class="term"><code class="constant">HOST_NOT_FOUND</code></span></dt>
+<dd><p>
+No such host is known.
+</p></dd>
+<dt><span class="term"><code class="constant">NO_ADDRESS</code></span></dt>
+<dd><p>
+The server recognised the request and the name but no address is
available. Another type of request to the name server for the
-domain might return an answer.</P
-></DD
-><DT
-><CODE
-CLASS="CONSTANT"
->TRY_AGAIN</CODE
-></DT
-><DD
-><P
->A temporary and possibly transient error occurred, such as a
+domain might return an answer.
+</p></dd>
+<dt><span class="term"><code class="constant">TRY_AGAIN</code></span></dt>
+<dd><p>
+A temporary and possibly transient error occurred, such as a
failure of a server to respond. The request may succeed if
-retried.</P
-></DD
-><DT
-><CODE
-CLASS="CONSTANT"
->NO_RECOVERY</CODE
-></DT
-><DD
-><P
->An unexpected failure occurred, and retrying the request
-is pointless.</P
-></DD
-></DL
-></DIV
-></P
-><P
-><SPAN
-CLASS="CITEREFENTRY"
-><SPAN
-CLASS="REFENTRYTITLE"
->lwres_hstrerror</SPAN
->(3)</SPAN
->
-translates these error codes to suitable error messages.</P
-></DIV
-><DIV
-CLASS="REFSECT1"
-><A
-NAME="AEN149"
-></A
-><H2
->SEE ALSO</H2
-><P
-><SPAN
-CLASS="CITEREFENTRY"
-><SPAN
-CLASS="REFENTRYTITLE"
->RFC2553</SPAN
-></SPAN
->,
+retried.
+</p></dd>
+<dt><span class="term"><code class="constant">NO_RECOVERY</code></span></dt>
+<dd><p>
+An unexpected failure occurred, and retrying the request
+is pointless.
+</p></dd>
+</dl></div>
+<p>
+</p>
+<p>
+<span class="citerefentry"><span class="refentrytitle">lwres_hstrerror</span>(3
+)</span>
+translates these error codes to suitable error messages.
+</p>
+</div>
+<div class="refsect1" lang="en">
+<a name="id2526290"></a><h2>SEE ALSO</h2>
+<p>
+<span class="citerefentry"><span class="refentrytitle">RFC2553</span></span>,
-<SPAN
-CLASS="CITEREFENTRY"
-><SPAN
-CLASS="REFENTRYTITLE"
->lwres</SPAN
->(3)</SPAN
->,
+<span class="citerefentry"><span class="refentrytitle">lwres</span>(3)</span>,
-<SPAN
-CLASS="CITEREFENTRY"
-><SPAN
-CLASS="REFENTRYTITLE"
->lwres_gethostent</SPAN
->(3)</SPAN
->,
+<span class="citerefentry"><span class="refentrytitle">lwres_gethostent</span>(3)</span>,
-<SPAN
-CLASS="CITEREFENTRY"
-><SPAN
-CLASS="REFENTRYTITLE"
->lwres_getaddrinfo</SPAN
->(3)</SPAN
->,
+<span class="citerefentry"><span class="refentrytitle">lwres_getaddrinfo</span>(3)</span>,
-<SPAN
-CLASS="CITEREFENTRY"
-><SPAN
-CLASS="REFENTRYTITLE"
->lwres_getnameinfo</SPAN
->(3)</SPAN
->,
+<span class="citerefentry"><span class="refentrytitle">lwres_getnameinfo</span>(3)</span>,
-<SPAN
-CLASS="CITEREFENTRY"
-><SPAN
-CLASS="REFENTRYTITLE"
->lwres_hstrerror</SPAN
->(3)</SPAN
->.</P
-></DIV
-></BODY
-></HTML
->
+<span class="citerefentry"><span class="refentrytitle">lwres_hstrerror</span>(3)</span>.
+</p>
+</div>
+</div></body>
+</html>
diff --git a/contrib/bind9/lib/lwres/man/lwres_getnameinfo.3 b/contrib/bind9/lib/lwres/man/lwres_getnameinfo.3
index a512270..853c2b9 100644
--- a/contrib/bind9/lib/lwres/man/lwres_getnameinfo.3
+++ b/contrib/bind9/lib/lwres/man/lwres_getnameinfo.3
@@ -1,79 +1,91 @@
-.\" Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
-.\" Copyright (C) 2000, 2001 Internet Software Consortium.
-.\"
+.\" Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
+.\" Copyright (C) 2000, 2001 Internet Software Consortium.
+.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
-.\"
+.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND 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,
+.\" 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.
.\"
-.\" $Id: lwres_getnameinfo.3,v 1.15.2.1.8.1 2004/03/06 07:41:43 marka Exp $
+.\" $Id: lwres_getnameinfo.3,v 1.15.2.1.8.5 2005/10/13 02:33:53 marka Exp $
.\"
-.TH "LWRES_GETNAMEINFO" "3" "Jun 30, 2000" "BIND9" ""
-.SH NAME
+.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.
+.TH "LWRES_GETNAMEINFO" "3" "Jun 30, 2000" "BIND9" "BIND9"
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.SH "NAME"
lwres_getnameinfo \- lightweight resolver socket address structure to hostname and service name
-.SH SYNOPSIS
-\fB#include <lwres/netdb.h>
-.sp
-.na
-int
-lwres_getnameinfo(const struct sockaddr *sa, size_t salen, char *host, size_t hostlen, char *serv, size_t servlen, int flags);
-.ad
-\fR
+.SH "SYNOPSIS"
+.nf
+#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
.SH "DESCRIPTION"
.PP
-This function is equivalent to the \fBgetnameinfo\fR(3) function defined in RFC2133.
-\fBlwres_getnameinfo()\fR returns the hostname for the
-\fBstruct sockaddr\fR \fIsa\fR which is
-\fIsalen\fR bytes long. The hostname is of length
-\fIhostlen\fR and is returned via
-\fI*host.\fR The maximum length of the hostname is
-1025 bytes: NI_MAXHOST.
+This function is equivalent to the
+\fBgetnameinfo\fR(3)
+function defined in RFC2133.
+\fBlwres_getnameinfo()\fR
+returns the hostname for the
+\fBstruct sockaddr\fR\fIsa\fR
+which is
+\fIsalen\fR
+bytes long. The hostname is of length
+\fIhostlen\fR
+and is returned via
+\fI*host.\fR
+The maximum length of the hostname is 1025 bytes:
+\fBNI_MAXHOST\fR.
.PP
The name of the service associated with the port number in
-\fIsa\fR is returned in \fI*serv.\fR
-It is \fIservlen\fR bytes long. The maximum length
-of the service name is NI_MAXSERV - 32 bytes.
+\fIsa\fR
+is returned in
+\fI*serv.\fR
+It is
+\fIservlen\fR
+bytes long. The maximum length of the service name is
+\fBNI_MAXSERV\fR
+\- 32 bytes.
.PP
-The \fIflags\fR argument sets the following
-bits:
+The
+\fIflags\fR
+argument sets the following bits:
.TP
\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.
+A fully qualified domain name is not required for local hosts. The local part of the fully qualified domain name is returned instead.
.TP
\fBNI_NUMERICHOST\fR
-Return the address in numeric form, as if calling inet_ntop(),
-instead of a host name.
+Return the address in numeric form, as if calling inet_ntop(), instead of a host name.
.TP
\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.
+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
\fBNI_NUMERICSERV\fR
The service name is returned as a digit string representing the port number.
.TP
\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.
+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"
.PP
\fBlwres_getnameinfo()\fR
-returns 0 on success or a non-zero error code if an error occurs.
+returns 0 on success or a non\-zero error code if an error occurs.
.SH "SEE ALSO"
.PP
-\fBRFC2133\fR,
+\fBRFC2133\fR(),
\fBgetservbyport\fR(3),
\fBlwres\fR(3),
\fBlwres_getnameinfo\fR(3),
diff --git a/contrib/bind9/lib/lwres/man/lwres_getnameinfo.docbook b/contrib/bind9/lib/lwres/man/lwres_getnameinfo.docbook
index ff2eaad..b6e10ac 100644
--- a/contrib/bind9/lib/lwres/man/lwres_getnameinfo.docbook
+++ b/contrib/bind9/lib/lwres/man/lwres_getnameinfo.docbook
@@ -1,7 +1,9 @@
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.0//EN"
+ "http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd"
+ [<!ENTITY mdash "&#8212;">]>
<!--
- - Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
- - Copyright (C) 2001 Internet Software Consortium.
+ - Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
+ - Copyright (C) 2000, 2001 Internet Software Consortium.
-
- Permission to use, copy, modify, and distribute this software for any
- purpose with or without fee is hereby granted, provided that the above
@@ -16,7 +18,7 @@
- PERFORMANCE OF THIS SOFTWARE.
-->
-<!-- $Id: lwres_getnameinfo.docbook,v 1.3.206.1 2004/03/06 08:15:40 marka Exp $ -->
+<!-- $Id: lwres_getnameinfo.docbook,v 1.3.206.3 2005/05/12 21:36:15 sra Exp $ -->
<refentry>
@@ -30,6 +32,19 @@
<refmiscinfo>BIND9</refmiscinfo>
</refmeta>
+ <docinfo>
+ <copyright>
+ <year>2004</year>
+ <year>2005</year>
+ <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
+ </copyright>
+ <copyright>
+ <year>2000</year>
+ <year>2001</year>
+ <holder>Internet Software Consortium.</holder>
+ </copyright>
+ </docinfo>
+
<refnamediv>
<refname>lwres_getnameinfo</refname>
<refpurpose>lightweight resolver socket address structure to hostname and service name</refpurpose>
@@ -140,6 +155,7 @@ returns 0 on success or a non-zero error code if an error occurs.
<citerefentry>
<refentrytitle>lwres_net_ntop</refentrytitle><manvolnum>3</manvolnum>
</citerefentry>.
+</para>
</refsect1>
<refsect1>
<title>BUGS</title>
diff --git a/contrib/bind9/lib/lwres/man/lwres_getnameinfo.html b/contrib/bind9/lib/lwres/man/lwres_getnameinfo.html
index 8130fe8..6e7a7b1 100644
--- a/contrib/bind9/lib/lwres/man/lwres_getnameinfo.html
+++ b/contrib/bind9/lib/lwres/man/lwres_getnameinfo.html
@@ -1,290 +1,154 @@
<!--
- - Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
- - Copyright (C) 2001 Internet Software Consortium.
- -
+ - Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
+ - Copyright (C) 2000, 2001 Internet Software Consortium.
+ -
- Permission to use, copy, modify, and distribute this software for any
- purpose with or without fee is hereby granted, provided that the above
- copyright notice and this permission notice appear in all copies.
- -
+ -
- THE SOFTWARE IS PROVIDED "AS IS" AND 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,
+ - 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.
-->
-
-<!-- $Id: lwres_getnameinfo.html,v 1.5.2.1.4.2 2004/08/22 23:39:04 marka Exp $ -->
-
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<HTML
-><HEAD
-><TITLE
->lwres_getnameinfo</TITLE
-><META
-NAME="GENERATOR"
-CONTENT="Modular DocBook HTML Stylesheet Version 1.7"></HEAD
-><BODY
-CLASS="REFENTRY"
-BGCOLOR="#FFFFFF"
-TEXT="#000000"
-LINK="#0000FF"
-VLINK="#840084"
-ALINK="#0000FF"
-><H1
-><A
-NAME="AEN1"
-></A
->lwres_getnameinfo</H1
-><DIV
-CLASS="REFNAMEDIV"
-><A
-NAME="AEN8"
-></A
-><H2
->Name</H2
->lwres_getnameinfo&nbsp;--&nbsp;lightweight resolver socket address structure to hostname and service name</DIV
-><DIV
-CLASS="REFSYNOPSISDIV"
-><A
-NAME="AEN11"
-></A
-><H2
->Synopsis</H2
-><DIV
-CLASS="FUNCSYNOPSIS"
-><P
-></P
-><A
-NAME="AEN12"
-></A
-><PRE
-CLASS="FUNCSYNOPSISINFO"
->#include &lt;lwres/netdb.h&gt;</PRE
-><P
-><CODE
-><CODE
-CLASS="FUNCDEF"
->int
-lwres_getnameinfo</CODE
->(const struct sockaddr *sa, size_t salen, char *host, size_t hostlen, char *serv, size_t servlen, int flags);</CODE
-></P
-><P
-></P
-></DIV
-></DIV
-><DIV
-CLASS="REFSECT1"
-><A
-NAME="AEN24"
-></A
-><H2
->DESCRIPTION</H2
-><P
-> This function is equivalent to the <SPAN
-CLASS="CITEREFENTRY"
-><SPAN
-CLASS="REFENTRYTITLE"
->getnameinfo</SPAN
->(3)</SPAN
-> function defined in RFC2133.
-<CODE
-CLASS="FUNCTION"
->lwres_getnameinfo()</CODE
-> returns the hostname for the
-<SPAN
-CLASS="TYPE"
->struct sockaddr</SPAN
-> <VAR
-CLASS="PARAMETER"
->sa</VAR
-> which is
-<VAR
-CLASS="PARAMETER"
->salen</VAR
-> bytes long. The hostname is of length
-<VAR
-CLASS="PARAMETER"
->hostlen</VAR
-> and is returned via
-<VAR
-CLASS="PARAMETER"
->*host.</VAR
-> The maximum length of the hostname is
-1025 bytes: <CODE
-CLASS="CONSTANT"
->NI_MAXHOST</CODE
->.</P
-><P
-> The name of the service associated with the port number in
-<VAR
-CLASS="PARAMETER"
->sa</VAR
-> is returned in <VAR
-CLASS="PARAMETER"
->*serv.</VAR
->
-It is <VAR
-CLASS="PARAMETER"
->servlen</VAR
-> bytes long. The maximum length
-of the service name is <CODE
-CLASS="CONSTANT"
->NI_MAXSERV</CODE
-> - 32 bytes.</P
-><P
-> The <VAR
-CLASS="PARAMETER"
->flags</VAR
-> argument sets the following
+<!-- $Id: lwres_getnameinfo.html,v 1.5.2.1.4.9 2005/10/13 02:33:56 marka Exp $ -->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>lwres_getnameinfo</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en">
+<a name="id2463721"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2>Name</h2>
+<p>lwres_getnameinfo &#8212; lightweight resolver socket address structure to hostname and service name</p>
+</div>
+<div class="refsynopsisdiv">
+<h2>Synopsis</h2>
+<div class="funcsynopsis">
+<pre class="funcsynopsisinfo">#include &lt;lwres/netdb.h&gt;</pre>
+<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0">
+<tr>
+<td><code class="funcdef">
+int
+<b class="fsfunc">lwres_getnameinfo</b>(</code></td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>
+<code>)</code>;</td>
+</tr>
+</table>
+</div>
+</div>
+<div class="refsect1" lang="en">
+<a name="id2525862"></a><h2>DESCRIPTION</h2>
+<p> This function is equivalent to the <span class="citerefentry"><span class="refentrytitle">getnameinfo</span>(3)</span> function defined in RFC2133.
+<code class="function">lwres_getnameinfo()</code> returns the hostname for the
+<span class="type">struct sockaddr</span> <em class="parameter"><code>sa</code></em> which is
+<em class="parameter"><code>salen</code></em> bytes long. The hostname is of length
+<em class="parameter"><code>hostlen</code></em> and is returned via
+<em class="parameter"><code>*host.</code></em> The maximum length of the hostname is
+1025 bytes: <code class="constant">NI_MAXHOST</code>.</p>
+<p> The name of the service associated with the port number in
+<em class="parameter"><code>sa</code></em> is returned in <em class="parameter"><code>*serv.</code></em>
+It is <em class="parameter"><code>servlen</code></em> bytes long. The maximum length
+of the service name is <code class="constant">NI_MAXSERV</code> - 32 bytes.
+</p>
+<p> The <em class="parameter"><code>flags</code></em> argument sets the following
bits:
-<P
-></P
-><DIV
-CLASS="VARIABLELIST"
-><DL
-><DT
-><CODE
-CLASS="CONSTANT"
->NI_NOFQDN</CODE
-></DT
-><DD
-><P
->A fully qualified domain name is not required for local hosts.
-The local part of the fully qualified domain name is returned instead.</P
-></DD
-><DT
-><CODE
-CLASS="CONSTANT"
->NI_NUMERICHOST</CODE
-></DT
-><DD
-><P
->Return the address in numeric form, as if calling inet_ntop(),
-instead of a host name.</P
-></DD
-><DT
-><CODE
-CLASS="CONSTANT"
->NI_NAMEREQD</CODE
-></DT
-><DD
-><P
->A name is required. If the hostname cannot be found in the DNS and
+</p>
+<div class="variablelist"><dl>
+<dt><span class="term"><code class="constant">NI_NOFQDN</code></span></dt>
+<dd><p>
+A fully qualified domain name is not required for local hosts.
+The local part of the fully qualified domain name is returned instead.
+</p></dd>
+<dt><span class="term"><code class="constant">NI_NUMERICHOST</code></span></dt>
+<dd><p>
+Return the address in numeric form, as if calling inet_ntop(),
+instead of a host name.
+</p></dd>
+<dt><span class="term"><code class="constant">NI_NAMEREQD</code></span></dt>
+<dd><p>
+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.</P
-></DD
-><DT
-><CODE
-CLASS="CONSTANT"
->NI_NUMERICSERV</CODE
-></DT
-><DD
-><P
->The service name is returned as a digit string representing the port number.</P
-></DD
-><DT
-><CODE
-CLASS="CONSTANT"
->NI_DGRAM</CODE
-></DT
-><DD
-><P
->Specifies that the service being looked up is a datagram
+address is returned in numeric form.
+</p></dd>
+<dt><span class="term"><code class="constant">NI_NUMERICSERV</code></span></dt>
+<dd><p>
+The service name is returned as a digit string representing the port number.
+</p></dd>
+<dt><span class="term"><code class="constant">NI_DGRAM</code></span></dt>
+<dd><p>
+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.</P
-></DD
-></DL
-></DIV
-></P
-></DIV
-><DIV
-CLASS="REFSECT1"
-><A
-NAME="AEN70"
-></A
-><H2
->RETURN VALUES</H2
-><P
-><CODE
-CLASS="FUNCTION"
->lwres_getnameinfo()</CODE
->
-returns 0 on success or a non-zero error code if an error occurs.</P
-></DIV
-><DIV
-CLASS="REFSECT1"
-><A
-NAME="AEN74"
-></A
-><H2
->SEE ALSO</H2
-><P
-><SPAN
-CLASS="CITEREFENTRY"
-><SPAN
-CLASS="REFENTRYTITLE"
->RFC2133</SPAN
-></SPAN
->,
-<SPAN
-CLASS="CITEREFENTRY"
-><SPAN
-CLASS="REFENTRYTITLE"
->getservbyport</SPAN
->(3)</SPAN
->,
-<SPAN
-CLASS="CITEREFENTRY"
-><SPAN
-CLASS="REFENTRYTITLE"
->lwres</SPAN
->(3)</SPAN
->,
-<SPAN
-CLASS="CITEREFENTRY"
-><SPAN
-CLASS="REFENTRYTITLE"
->lwres_getnameinfo</SPAN
->(3)</SPAN
->,
-<SPAN
-CLASS="CITEREFENTRY"
-><SPAN
-CLASS="REFENTRYTITLE"
->lwres_getnamebyaddr</SPAN
->(3)</SPAN
->.
-<SPAN
-CLASS="CITEREFENTRY"
-><SPAN
-CLASS="REFENTRYTITLE"
->lwres_net_ntop</SPAN
->(3)</SPAN
->.</P
-></DIV
-><DIV
-CLASS="REFSECT1"
-><A
-NAME="AEN94"
-></A
-><H2
->BUGS</H2
-><P
->RFC2133 fails to define what the nonzero return values of
-<SPAN
-CLASS="CITEREFENTRY"
-><SPAN
-CLASS="REFENTRYTITLE"
->getnameinfo</SPAN
->(3)</SPAN
->
-are.</P
-></DIV
-></BODY
-></HTML
->
+TCP.
+</p></dd>
+</dl></div>
+<p>
+</p>
+</div>
+<div class="refsect1" lang="en">
+<a name="id2525988"></a><h2>RETURN VALUES</h2>
+<p>
+<code class="function">lwres_getnameinfo()</code>
+returns 0 on success or a non-zero error code if an error occurs.
+</p>
+</div>
+<div class="refsect1" lang="en">
+<a name="id2526001"></a><h2>SEE ALSO</h2>
+<p>
+<span class="citerefentry"><span class="refentrytitle">RFC2133</span></span>,
+<span class="citerefentry"><span class="refentrytitle">getservbyport</span>(3)</span>,
+<span class="citerefentry"><span class="refentrytitle">lwres</span>(3)</span>,
+<span class="citerefentry"><span class="refentrytitle">lwres_getnameinfo</span>(3)</span>,
+<span class="citerefentry"><span class="refentrytitle">lwres_getnamebyaddr</span>(3)</span>.
+<span class="citerefentry"><span class="refentrytitle">lwres_net_ntop</span>(3)</span>.
+</p>
+</div>
+<div class="refsect1" lang="en">
+<a name="id2526059"></a><h2>BUGS</h2>
+<p>
+RFC2133 fails to define what the nonzero return values of
+<span class="citerefentry"><span class="refentrytitle">getnameinfo</span>(3)</span>
+are.
+</p>
+</div>
+</div></body>
+</html>
diff --git a/contrib/bind9/lib/lwres/man/lwres_getrrsetbyname.3 b/contrib/bind9/lib/lwres/man/lwres_getrrsetbyname.3
index 1558f6d..6d900f8 100644
--- a/contrib/bind9/lib/lwres/man/lwres_getrrsetbyname.3
+++ b/contrib/bind9/lib/lwres/man/lwres_getrrsetbyname.3
@@ -1,36 +1,41 @@
-.\" Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
-.\" Copyright (C) 2000, 2001 Internet Software Consortium.
-.\"
+.\" Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
+.\" Copyright (C) 2000, 2001 Internet Software Consortium.
+.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
-.\"
+.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND 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,
+.\" 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.
.\"
-.\" $Id: lwres_getrrsetbyname.3,v 1.11.2.1.8.1 2004/03/06 07:41:43 marka Exp $
+.\" $Id: lwres_getrrsetbyname.3,v 1.11.2.1.8.5 2005/10/13 02:33:53 marka Exp $
.\"
-.TH "LWRES_GETRRSETBYNAME" "3" "Oct 18, 2000" "BIND9" ""
-.SH NAME
+.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.
+.TH "LWRES_GETRRSETBYNAME" "3" "Oct 18, 2000" "BIND9" "BIND9"
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.SH "NAME"
lwres_getrrsetbyname, lwres_freerrset \- retrieve DNS records
-.SH SYNOPSIS
-\fB#include <lwres/netdb.h>
-.sp
-.na
-int
-lwres_getrrsetbyname(const char *hostname, unsigned int rdclass, unsigned int rdtype, unsigned int flags, struct rrsetinfo **res);
-.ad
-.sp
-.na
-void
-lwres_freerrset(struct rrsetinfo *rrset);
-.ad
-\fR
+.SH "SYNOPSIS"
+.nf
+#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
+.HP 21
+\fBvoid\ \fBlwres_freerrset\fR\fR\fB(\fR\fBstruct\ rrsetinfo\ *rrset\fR\fB);\fR
.PP
The following structures are used:
.sp
@@ -39,7 +44,6 @@ struct rdatainfo {
unsigned int rdi_length; /* length of data */
unsigned char *rdi_data; /* record data */
};
-
struct rrsetinfo {
unsigned int rri_flags; /* RRSET_VALIDATED... */
unsigned int rri_rdclass; /* class number */
@@ -51,19 +55,17 @@ struct rrsetinfo {
struct rdatainfo *rri_rdatas; /* individual records */
struct rdatainfo *rri_sigs; /* individual signatures */
};
-.sp
.fi
+.sp
.SH "DESCRIPTION"
.PP
\fBlwres_getrrsetbyname()\fR
gets a set of resource records associated with a
\fIhostname\fR,
-\fIclass\fR,
-and
+\fIclass\fR, and
\fItype\fR.
\fIhostname\fR
-is
-a pointer a to null-terminated string. The
+is a pointer a to null\-terminated string. The
\fIflags\fR
field is currently unused and must be zero.
.PP
@@ -76,38 +78,30 @@ structure, containing a list of one or more
\fBrdatainfo\fR
structures containing resource records and potentially another list of
\fBrdatainfo\fR
-structures containing SIG resource records
-associated with those records.
-The members
-rri_rdclass
+structures containing SIG resource records associated with those records. The members
+\fBrri_rdclass\fR
and
-rri_rdtype
+\fBrri_rdtype\fR
are copied from the parameters.
-rri_ttl
+\fBrri_ttl\fR
and
-rri_name
-are properties of the obtained rrset.
-The resource records contained in
-rri_rdatas
+\fBrri_name\fR
+are properties of the obtained rrset. The resource records contained in
+\fBrri_rdatas\fR
and
-rri_sigs
-are in uncompressed DNS wire format.
-Properties of the rdataset are represented in the
-rri_flags
-bitfield. If the RRSET_VALIDATED bit is set, the data has been DNSSEC
-validated and the signatures verified.
+\fBrri_sigs\fR
+are in uncompressed DNS wire format. Properties of the rdataset are represented in the
+\fBrri_flags\fR
+bitfield. If the RRSET_VALIDATED bit is set, the data has been DNSSEC validated and the signatures verified.
.PP
All of the information returned by
\fBlwres_getrrsetbyname()\fR
is dynamically allocated: the
-rrsetinfo
+\fBrrsetinfo\fR
and
-rdatainfo
-structures,
-and the canonical host name strings pointed to by the
-rrsetinfostructure.
-Memory allocated for the dynamically allocated structures created by
-a successful call to
+\fBrdatainfo\fR
+structures, and the canonical host name strings pointed to by the
+\fBrrsetinfo\fRstructure. Memory allocated for the dynamically allocated structures created by a successful call to
\fBlwres_getrrsetbyname()\fR
is released by
\fBlwres_freerrset()\fR.
@@ -120,8 +114,7 @@ created by a call to
.SH "RETURN VALUES"
.PP
\fBlwres_getrrsetbyname()\fR
-returns zero on success, and one of the following error
-codes if an error occurred:
+returns zero on success, and one of the following error codes if an error occurred:
.TP
\fBERRSET_NONAME\fR
the name does not exist
@@ -138,7 +131,6 @@ a parameter is invalid
\fBERRSET_FAIL\fR
other failure
.TP
-\fB\fR
.SH "SEE ALSO"
.PP
\fBlwres\fR(3).
diff --git a/contrib/bind9/lib/lwres/man/lwres_getrrsetbyname.docbook b/contrib/bind9/lib/lwres/man/lwres_getrrsetbyname.docbook
index 5ec7884..53c33be 100644
--- a/contrib/bind9/lib/lwres/man/lwres_getrrsetbyname.docbook
+++ b/contrib/bind9/lib/lwres/man/lwres_getrrsetbyname.docbook
@@ -1,7 +1,9 @@
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.0//EN"
+ "http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd"
+ [<!ENTITY mdash "&#8212;">]>
<!--
- - Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
- - Copyright (C) 2001 Internet Software Consortium.
+ - Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
+ - Copyright (C) 2000, 2001 Internet Software Consortium.
-
- Permission to use, copy, modify, and distribute this software for any
- purpose with or without fee is hereby granted, provided that the above
@@ -16,7 +18,7 @@
- PERFORMANCE OF THIS SOFTWARE.
-->
-<!-- $Id: lwres_getrrsetbyname.docbook,v 1.3.206.1 2004/03/06 08:15:40 marka Exp $ -->
+<!-- $Id: lwres_getrrsetbyname.docbook,v 1.3.206.3 2005/05/12 21:36:15 sra Exp $ -->
<refentry>
<refentryinfo>
@@ -29,6 +31,20 @@
<manvolnum>3</manvolnum>
<refmiscinfo>BIND9</refmiscinfo>
</refmeta>
+
+ <docinfo>
+ <copyright>
+ <year>2004</year>
+ <year>2005</year>
+ <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
+ </copyright>
+ <copyright>
+ <year>2000</year>
+ <year>2001</year>
+ <holder>Internet Software Consortium.</holder>
+ </copyright>
+ </docinfo>
+
<refnamediv>
<refname>lwres_getrrsetbyname</refname>
<refname>lwres_freerrset</refname>
diff --git a/contrib/bind9/lib/lwres/man/lwres_getrrsetbyname.html b/contrib/bind9/lib/lwres/man/lwres_getrrsetbyname.html
index 8a688e9..f36a1d2 100644
--- a/contrib/bind9/lib/lwres/man/lwres_getrrsetbyname.html
+++ b/contrib/bind9/lib/lwres/man/lwres_getrrsetbyname.html
@@ -1,91 +1,80 @@
<!--
- - Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
- - Copyright (C) 2001 Internet Software Consortium.
- -
+ - Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
+ - Copyright (C) 2000, 2001 Internet Software Consortium.
+ -
- Permission to use, copy, modify, and distribute this software for any
- purpose with or without fee is hereby granted, provided that the above
- copyright notice and this permission notice appear in all copies.
- -
+ -
- THE SOFTWARE IS PROVIDED "AS IS" AND 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,
+ - 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.
-->
-
-<!-- $Id: lwres_getrrsetbyname.html,v 1.5.2.1.4.2 2004/08/22 23:39:04 marka Exp $ -->
-
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<HTML
-><HEAD
-><TITLE
->lwres_getrrsetbyname</TITLE
-><META
-NAME="GENERATOR"
-CONTENT="Modular DocBook HTML Stylesheet Version 1.7"></HEAD
-><BODY
-CLASS="REFENTRY"
-BGCOLOR="#FFFFFF"
-TEXT="#000000"
-LINK="#0000FF"
-VLINK="#840084"
-ALINK="#0000FF"
-><H1
-><A
-NAME="AEN1"
-></A
->lwres_getrrsetbyname</H1
-><DIV
-CLASS="REFNAMEDIV"
-><A
-NAME="AEN8"
-></A
-><H2
->Name</H2
->lwres_getrrsetbyname, lwres_freerrset&nbsp;--&nbsp;retrieve DNS records</DIV
-><DIV
-CLASS="REFSYNOPSISDIV"
-><A
-NAME="AEN12"
-></A
-><H2
->Synopsis</H2
-><DIV
-CLASS="FUNCSYNOPSIS"
-><P
-></P
-><A
-NAME="AEN13"
-></A
-><PRE
-CLASS="FUNCSYNOPSISINFO"
->#include &lt;lwres/netdb.h&gt;</PRE
-><P
-><CODE
-><CODE
-CLASS="FUNCDEF"
->int
-lwres_getrrsetbyname</CODE
->(const char *hostname, unsigned int rdclass, unsigned int rdtype, unsigned int flags, struct rrsetinfo **res);</CODE
-></P
-><P
-><CODE
-><CODE
-CLASS="FUNCDEF"
->void
-lwres_freerrset</CODE
->(struct rrsetinfo *rrset);</CODE
-></P
-><P
-></P
-></DIV
-><P
->The following structures are used:
-<PRE
-CLASS="PROGRAMLISTING"
->struct rdatainfo {
+<!-- $Id: lwres_getrrsetbyname.html,v 1.5.2.1.4.9 2005/10/13 02:33:57 marka Exp $ -->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>lwres_getrrsetbyname</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en">
+<a name="id2463721"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2>Name</h2>
+<p>lwres_getrrsetbyname, lwres_freerrset &#8212; retrieve DNS records</p>
+</div>
+<div class="refsynopsisdiv">
+<h2>Synopsis</h2>
+<div class="funcsynopsis">
+<pre class="funcsynopsisinfo">#include &lt;lwres/netdb.h&gt;</pre>
+<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em">
+<tr>
+<td><code class="funcdef">
+int
+<b class="fsfunc">lwres_getrrsetbyname</b>(</code></td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>
+<code>)</code>;</td>
+</tr>
+</table>
+<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0"><tr>
+<td><code class="funcdef">
+void
+<b class="fsfunc">lwres_freerrset</b>(</code></td>
+<td> </td>
+<td>
+<code>)</code>;</td>
+</tr></table>
+</div>
+<p>
+The following structures are used:
+</p>
+<pre class="programlisting">
+struct rdatainfo {
unsigned int rdi_length; /* length of data */
unsigned char *rdi_data; /* record data */
};
@@ -100,261 +89,129 @@ struct rrsetinfo {
char *rri_name; /* canonical name */
struct rdatainfo *rri_rdatas; /* individual records */
struct rdatainfo *rri_sigs; /* individual signatures */
-};</PRE
-></P
-></DIV
-><DIV
-CLASS="REFSECT1"
-><A
-NAME="AEN29"
-></A
-><H2
->DESCRIPTION</H2
-><P
-><CODE
-CLASS="FUNCTION"
->lwres_getrrsetbyname()</CODE
->
+};
+</pre>
+<p>
+</p>
+</div>
+<div class="refsect1" lang="en">
+<a name="id2525878"></a><h2>DESCRIPTION</h2>
+<p>
+<code class="function">lwres_getrrsetbyname()</code>
gets a set of resource records associated with a
-<VAR
-CLASS="PARAMETER"
->hostname</VAR
->,
+<em class="parameter"><code>hostname</code></em>,
-<VAR
-CLASS="PARAMETER"
->class</VAR
->,
+<em class="parameter"><code>class</code></em>,
and
-<VAR
-CLASS="PARAMETER"
->type</VAR
->.
+<em class="parameter"><code>type</code></em>.
-<VAR
-CLASS="PARAMETER"
->hostname</VAR
->
+<em class="parameter"><code>hostname</code></em>
is
a pointer a to null-terminated string. The
-<VAR
-CLASS="PARAMETER"
->flags</VAR
->
-field is currently unused and must be zero.</P
-><P
->After a successful call to
-<CODE
-CLASS="FUNCTION"
->lwres_getrrsetbyname()</CODE
->,
+<em class="parameter"><code>flags</code></em>
+field is currently unused and must be zero.
+</p>
+<p>
+After a successful call to
+<code class="function">lwres_getrrsetbyname()</code>,
-<VAR
-CLASS="PARAMETER"
->*res</VAR
->
+<em class="parameter"><code>*res</code></em>
is a pointer to an
-<SPAN
-CLASS="TYPE"
->rrsetinfo</SPAN
->
+<span class="type">rrsetinfo</span>
structure, containing a list of one or more
-<SPAN
-CLASS="TYPE"
->rdatainfo</SPAN
->
+<span class="type">rdatainfo</span>
structures containing resource records and potentially another list of
-<SPAN
-CLASS="TYPE"
->rdatainfo</SPAN
->
+<span class="type">rdatainfo</span>
structures containing SIG resource records
associated with those records.
The members
-<CODE
-CLASS="CONSTANT"
->rri_rdclass</CODE
->
+<code class="constant">rri_rdclass</code>
and
-<CODE
-CLASS="CONSTANT"
->rri_rdtype</CODE
->
+<code class="constant">rri_rdtype</code>
are copied from the parameters.
-<CODE
-CLASS="CONSTANT"
->rri_ttl</CODE
->
+<code class="constant">rri_ttl</code>
and
-<CODE
-CLASS="CONSTANT"
->rri_name</CODE
->
+<code class="constant">rri_name</code>
are properties of the obtained rrset.
The resource records contained in
-<CODE
-CLASS="CONSTANT"
->rri_rdatas</CODE
->
+<code class="constant">rri_rdatas</code>
and
-<CODE
-CLASS="CONSTANT"
->rri_sigs</CODE
->
+<code class="constant">rri_sigs</code>
are in uncompressed DNS wire format.
Properties of the rdataset are represented in the
-<CODE
-CLASS="CONSTANT"
->rri_flags</CODE
->
+<code class="constant">rri_flags</code>
bitfield. If the RRSET_VALIDATED bit is set, the data has been DNSSEC
-validated and the signatures verified. </P
-><P
->All of the information returned by
-<CODE
-CLASS="FUNCTION"
->lwres_getrrsetbyname()</CODE
->
+validated and the signatures verified.
+</p>
+<p>
+All of the information returned by
+<code class="function">lwres_getrrsetbyname()</code>
is dynamically allocated: the
-<CODE
-CLASS="CONSTANT"
->rrsetinfo</CODE
->
+<code class="constant">rrsetinfo</code>
and
-<CODE
-CLASS="CONSTANT"
->rdatainfo</CODE
->
+<code class="constant">rdatainfo</code>
structures,
and the canonical host name strings pointed to by the
-<CODE
-CLASS="CONSTANT"
->rrsetinfo</CODE
->structure.
+<code class="constant">rrsetinfo</code>structure.
Memory allocated for the dynamically allocated structures created by
a successful call to
-<CODE
-CLASS="FUNCTION"
->lwres_getrrsetbyname()</CODE
->
+<code class="function">lwres_getrrsetbyname()</code>
is released by
-<CODE
-CLASS="FUNCTION"
->lwres_freerrset()</CODE
->.
+<code class="function">lwres_freerrset()</code>.
-<VAR
-CLASS="PARAMETER"
->rrset</VAR
->
+<em class="parameter"><code>rrset</code></em>
is a pointer to a
-<SPAN
-CLASS="TYPE"
->struct rrset</SPAN
->
+<span class="type">struct rrset</span>
created by a call to
-<CODE
-CLASS="FUNCTION"
->lwres_getrrsetbyname()</CODE
->.&#13;</P
-><P
-></P
-></DIV
-><DIV
-CLASS="REFSECT1"
-><A
-NAME="AEN62"
-></A
-><H2
->RETURN VALUES</H2
-><P
-><CODE
-CLASS="FUNCTION"
->lwres_getrrsetbyname()</CODE
->
+<code class="function">lwres_getrrsetbyname()</code>.
+
+</p>
+<p>
+</p>
+</div>
+<div class="refsect1" lang="en">
+<a name="id2526058"></a><h2>RETURN VALUES</h2>
+<p>
+<code class="function">lwres_getrrsetbyname()</code>
returns zero on success, and one of the following error
codes if an error occurred:
-<P
-></P
-><DIV
-CLASS="VARIABLELIST"
-><DL
-><DT
-><CODE
-CLASS="CONSTANT"
->ERRSET_NONAME</CODE
-></DT
-><DD
-><P
->the name does not exist</P
-></DD
-><DT
-><CODE
-CLASS="CONSTANT"
->ERRSET_NODATA</CODE
-></DT
-><DD
-><P
->the name exists, but does not have data of the desired type</P
-></DD
-><DT
-><CODE
-CLASS="CONSTANT"
->ERRSET_NOMEMORY</CODE
-></DT
-><DD
-><P
->memory could not be allocated</P
-></DD
-><DT
-><CODE
-CLASS="CONSTANT"
->ERRSET_INVAL</CODE
-></DT
-><DD
-><P
->a parameter is invalid</P
-></DD
-><DT
-><CODE
-CLASS="CONSTANT"
->ERRSET_FAIL</CODE
-></DT
-><DD
-><P
->other failure</P
-></DD
-><DT
-><CODE
-CLASS="CONSTANT"
-></CODE
-></DT
-><DD
-><P
-></P
-></DD
-></DL
-></DIV
->&#13;</P
-></DIV
-><DIV
-CLASS="REFSECT1"
-><A
-NAME="AEN97"
-></A
-><H2
->SEE ALSO</H2
-><P
-><SPAN
-CLASS="CITEREFENTRY"
-><SPAN
-CLASS="REFENTRYTITLE"
->lwres</SPAN
->(3)</SPAN
->.</P
-></DIV
-></BODY
-></HTML
->
+</p>
+<div class="variablelist"><dl>
+<dt><span class="term"><code class="constant">ERRSET_NONAME</code></span></dt>
+<dd><p>
+the name does not exist
+</p></dd>
+<dt><span class="term"><code class="constant">ERRSET_NODATA</code></span></dt>
+<dd><p>
+the name exists, but does not have data of the desired type
+</p></dd>
+<dt><span class="term"><code class="constant">ERRSET_NOMEMORY</code></span></dt>
+<dd><p>
+memory could not be allocated
+</p></dd>
+<dt><span class="term"><code class="constant">ERRSET_INVAL</code></span></dt>
+<dd><p>
+a parameter is invalid
+</p></dd>
+<dt><span class="term"><code class="constant">ERRSET_FAIL</code></span></dt>
+<dd><p>
+other failure
+</p></dd>
+<dt><span class="term"><code class="constant"></code></span></dt>
+<dd><p>
+</p></dd>
+</dl></div>
+<p>
+
+</p>
+</div>
+<div class="refsect1" lang="en">
+<a name="id2526132"></a><h2>SEE ALSO</h2>
+<p>
+<span class="citerefentry"><span class="refentrytitle">lwres</span>(3)</span>.
+</p>
+</div>
+</div></body>
+</html>
diff --git a/contrib/bind9/lib/lwres/man/lwres_gnba.3 b/contrib/bind9/lib/lwres/man/lwres_gnba.3
index 404ae41..58047ce 100644
--- a/contrib/bind9/lib/lwres/man/lwres_gnba.3
+++ b/contrib/bind9/lib/lwres/man/lwres_gnba.3
@@ -1,86 +1,68 @@
-.\" Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
-.\" Copyright (C) 2000, 2001 Internet Software Consortium.
-.\"
+.\" Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
+.\" Copyright (C) 2000, 2001 Internet Software Consortium.
+.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
-.\"
+.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND 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,
+.\" 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.
.\"
-.\" $Id: lwres_gnba.3,v 1.13.2.1.8.1 2004/03/06 07:41:43 marka Exp $
+.\" $Id: lwres_gnba.3,v 1.13.2.1.8.5 2005/10/13 02:33:53 marka Exp $
.\"
-.TH "LWRES_GNBA" "3" "Jun 30, 2000" "BIND9" ""
-.SH NAME
+.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.
+.TH "LWRES_GNBA" "3" "Jun 30, 2000" "BIND9" "BIND9"
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.SH "NAME"
lwres_gnbarequest_render, lwres_gnbaresponse_render, lwres_gnbarequest_parse, lwres_gnbaresponse_parse, lwres_gnbaresponse_free, lwres_gnbarequest_free \- lightweight resolver getnamebyaddress message handling
-.SH SYNOPSIS
-\fB#include <lwres/lwres.h>
-.sp
-.na
-lwres_result_t
-lwres_gnbarequest_render(lwres_context_t *\fIctx\fB, lwres_gnbarequest_t *\fIreq\fB, lwres_lwpacket_t *\fIpkt\fB, lwres_buffer_t *\fIb\fB);
-.ad
-.sp
-.na
-lwres_result_t
-lwres_gnbaresponse_render(lwres_context_t *ctx, lwres_gnbaresponse_t *req, lwres_lwpacket_t *pkt, lwres_buffer_t *b);
-.ad
-.sp
-.na
-lwres_result_t
-lwres_gnbarequest_parse(lwres_context_t *ctx, lwres_buffer_t *b, lwres_lwpacket_t *pkt, lwres_gnbarequest_t **structp);
-.ad
-.sp
-.na
-lwres_result_t
-lwres_gnbaresponse_parse(lwres_context_t *ctx, lwres_buffer_t *b, lwres_lwpacket_t *pkt, lwres_gnbaresponse_t **structp);
-.ad
-.sp
-.na
-void
-lwres_gnbaresponse_free(lwres_context_t *ctx, lwres_gnbaresponse_t **structp);
-.ad
-.sp
-.na
-void
-lwres_gnbarequest_free(lwres_context_t *ctx, lwres_gnbarequest_t **structp);
-.ad
-\fR
+.SH "SYNOPSIS"
+.nf
+#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
+.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
+.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
+.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
+.HP 29
+\fBvoid\ \fBlwres_gnbaresponse_free\fR\fR\fB(\fR\fBlwres_context_t\ *ctx\fR\fB, \fR\fBlwres_gnbaresponse_t\ **structp\fR\fB);\fR
+.HP 28
+\fBvoid\ \fBlwres_gnbarequest_free\fR\fR\fB(\fR\fBlwres_context_t\ *ctx\fR\fB, \fR\fBlwres_gnbarequest_t\ **structp\fR\fB);\fR
.SH "DESCRIPTION"
.PP
-These are low-level routines for creating and parsing
-lightweight resolver address-to-name lookup request and
-response messages.
+These are low\-level routines for creating and parsing lightweight resolver address\-to\-name lookup request and response messages.
.PP
-There are four main functions for the getnamebyaddr opcode.
-One render function converts a getnamebyaddr request structure \(em
-\fBlwres_gnbarequest_t\fR \(em
-to the lightweight resolver's canonical format.
-It is complemented by a parse function that converts a packet in this
-canonical format to a getnamebyaddr request structure.
-Another render function converts the getnamebyaddr response structure \(em
+There are four main functions for the getnamebyaddr opcode. One render function converts a getnamebyaddr request structure \(em
+\fBlwres_gnbarequest_t\fR
+\(em to the lightweight resolver's canonical format. It is complemented by a parse function that converts a packet in this canonical format to a getnamebyaddr request structure. Another render function converts the getnamebyaddr response structure \(em
\fBlwres_gnbaresponse_t\fR
-to the canonical format.
-This is complemented by a parse function which converts a packet in
-canonical format to a getnamebyaddr response structure.
+to the canonical format. This is complemented by a parse function which converts a packet in canonical format to a getnamebyaddr response structure.
.PP
These structures are defined in
-\fIlwres/lwres.h\fR.
-They are shown below.
+\fIlwres/lwres.h\fR. They are shown below.
.sp
.nf
#define LWRES_OPCODE_GETNAMEBYADDR 0x00010002U
-
typedef struct {
lwres_uint32_t flags;
lwres_addr_t addr;
} lwres_gnbarequest_t;
-
typedef struct {
lwres_uint32_t flags;
lwres_uint16_t naliases;
@@ -91,22 +73,19 @@ typedef struct {
void *base;
size_t baselen;
} lwres_gnbaresponse_t;
-.sp
.fi
+.sp
.PP
\fBlwres_gnbarequest_render()\fR
uses resolver context
-ctx
+\fIctx\fR
to convert getnamebyaddr request structure
-req
-to canonical format.
-The packet header structure
-pkt
-is initialised and transferred to
-buffer
-b.
-The contents of
-*req
+\fIreq\fR
+to canonical format. The packet header structure
+\fIpkt\fR
+is initialised and transferred to buffer
+\fIb\fR. The contents of
+\fI*req\fR
are then appended to the buffer in canonical format.
\fBlwres_gnbaresponse_render()\fR
performs the same task, except it converts a getnamebyaddr response structure
@@ -115,19 +94,17 @@ to the lightweight resolver's canonical format.
.PP
\fBlwres_gnbarequest_parse()\fR
uses context
-ctx
+\fIctx\fR
to convert the contents of packet
-pkt
+\fIpkt\fR
to a
\fBlwres_gnbarequest_t\fR
-structure.
-Buffer
-b
-provides space to be used for storing this structure.
-When the function succeeds, the resulting
+structure. Buffer
+\fIb\fR
+provides space to be used for storing this structure. When the function succeeds, the resulting
\fBlwres_gnbarequest_t\fR
is made available through
-*structp.
+\fI*structp\fR.
\fBlwres_gnbaresponse_parse()\fR
offers the same semantics as
\fBlwres_gnbarequest_parse()\fR
@@ -139,32 +116,28 @@ structure.
and
\fBlwres_gnbarequest_free()\fR
release the memory in resolver context
-ctx
+\fIctx\fR
that was allocated to the
\fBlwres_gnbaresponse_t\fR
or
\fBlwres_gnbarequest_t\fR
structures referenced via
-structp.
-Any memory associated with ancillary buffers and strings for those
-structures is also discarded.
+\fIstructp\fR. Any memory associated with ancillary buffers and strings for those structures is also discarded.
.SH "RETURN VALUES"
.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
-LWRES_R_SUCCESS
-on success.
-They return
-LWRES_R_NOMEMORY
+\fBLWRES_R_SUCCESS\fR
+on success. They return
+\fBLWRES_R_NOMEMORY\fR
if memory allocation fails.
-LWRES_R_UNEXPECTEDEND
+\fBLWRES_R_UNEXPECTEDEND\fR
is returned if the available space in the buffer
-b
+\fIb\fR
is too small to accommodate the packet header or the
\fBlwres_gnbarequest_t\fR
and
@@ -174,12 +147,11 @@ structures.
and
\fBlwres_gnbaresponse_parse()\fR
will return
-LWRES_R_UNEXPECTEDEND
-if the buffer is not empty after decoding the received packet.
-These functions will return
-LWRES_R_FAILURE
+\fBLWRES_R_UNEXPECTEDEND\fR
+if the buffer is not empty after decoding the received packet. These functions will return
+\fBLWRES_R_FAILURE\fR
if
-\fBpktflags\fR
+pktflags
in the packet header structure
\fBlwres_lwpacket_t\fR
indicate that the packet is not a response to an earlier query.
diff --git a/contrib/bind9/lib/lwres/man/lwres_gnba.docbook b/contrib/bind9/lib/lwres/man/lwres_gnba.docbook
index 5bd4172..7531486 100644
--- a/contrib/bind9/lib/lwres/man/lwres_gnba.docbook
+++ b/contrib/bind9/lib/lwres/man/lwres_gnba.docbook
@@ -1,7 +1,9 @@
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.0//EN"
+ "http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd"
+ [<!ENTITY mdash "&#8212;">]>
<!--
- - Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
- - Copyright (C) 2001 Internet Software Consortium.
+ - Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
+ - Copyright (C) 2000, 2001 Internet Software Consortium.
-
- Permission to use, copy, modify, and distribute this software for any
- purpose with or without fee is hereby granted, provided that the above
@@ -16,7 +18,7 @@
- PERFORMANCE OF THIS SOFTWARE.
-->
-<!-- $Id: lwres_gnba.docbook,v 1.4.206.1 2004/03/06 08:15:40 marka Exp $ -->
+<!-- $Id: lwres_gnba.docbook,v 1.4.206.3 2005/05/12 21:36:15 sra Exp $ -->
<refentry>
@@ -30,6 +32,19 @@
<refmiscinfo>BIND9</refmiscinfo>
</refmeta>
+ <docinfo>
+ <copyright>
+ <year>2004</year>
+ <year>2005</year>
+ <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
+ </copyright>
+ <copyright>
+ <year>2000</year>
+ <year>2001</year>
+ <holder>Internet Software Consortium.</holder>
+ </copyright>
+ </docinfo>
+
<refnamediv>
<refname>lwres_gnbarequest_render</refname>
<refname>lwres_gnbaresponse_render</refname>
diff --git a/contrib/bind9/lib/lwres/man/lwres_gnba.html b/contrib/bind9/lib/lwres/man/lwres_gnba.html
index 537b259..89cf35e 100644
--- a/contrib/bind9/lib/lwres/man/lwres_gnba.html
+++ b/contrib/bind9/lib/lwres/man/lwres_gnba.html
@@ -1,158 +1,203 @@
<!--
- - Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
- - Copyright (C) 2001 Internet Software Consortium.
- -
+ - Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
+ - Copyright (C) 2000, 2001 Internet Software Consortium.
+ -
- Permission to use, copy, modify, and distribute this software for any
- purpose with or without fee is hereby granted, provided that the above
- copyright notice and this permission notice appear in all copies.
- -
+ -
- THE SOFTWARE IS PROVIDED "AS IS" AND 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,
+ - 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.
-->
-
-<!-- $Id: lwres_gnba.html,v 1.6.2.1.4.2 2004/08/22 23:39:04 marka Exp $ -->
-
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<HTML
-><HEAD
-><TITLE
->lwres_gnba</TITLE
-><META
-NAME="GENERATOR"
-CONTENT="Modular DocBook HTML Stylesheet Version 1.7"></HEAD
-><BODY
-CLASS="REFENTRY"
-BGCOLOR="#FFFFFF"
-TEXT="#000000"
-LINK="#0000FF"
-VLINK="#840084"
-ALINK="#0000FF"
-><H1
-><A
-NAME="AEN1"
-></A
->lwres_gnba</H1
-><DIV
-CLASS="REFNAMEDIV"
-><A
-NAME="AEN8"
-></A
-><H2
->Name</H2
->lwres_gnbarequest_render, lwres_gnbaresponse_render, lwres_gnbarequest_parse, lwres_gnbaresponse_parse, lwres_gnbaresponse_free, lwres_gnbarequest_free&nbsp;--&nbsp;lightweight resolver getnamebyaddress message handling</DIV
-><DIV
-CLASS="REFSYNOPSISDIV"
-><A
-NAME="AEN16"
-></A
-><H2
->Synopsis</H2
-><DIV
-CLASS="FUNCSYNOPSIS"
-><P
-></P
-><A
-NAME="AEN17"
-></A
-><PRE
-CLASS="FUNCSYNOPSISINFO"
->#include &lt;lwres/lwres.h&gt;</PRE
-><P
-><CODE
-><CODE
-CLASS="FUNCDEF"
->lwres_result_t
-lwres_gnbarequest_render</CODE
->(lwres_context_t *ctx, lwres_gnbarequest_t *req, lwres_lwpacket_t *pkt, lwres_buffer_t *b);</CODE
-></P
-><P
-><CODE
-><CODE
-CLASS="FUNCDEF"
->lwres_result_t
-lwres_gnbaresponse_render</CODE
->(lwres_context_t *ctx, lwres_gnbaresponse_t *req, lwres_lwpacket_t *pkt, lwres_buffer_t *b);</CODE
-></P
-><P
-><CODE
-><CODE
-CLASS="FUNCDEF"
->lwres_result_t
-lwres_gnbarequest_parse</CODE
->(lwres_context_t *ctx, lwres_buffer_t *b, lwres_lwpacket_t *pkt, lwres_gnbarequest_t **structp);</CODE
-></P
-><P
-><CODE
-><CODE
-CLASS="FUNCDEF"
->lwres_result_t
-lwres_gnbaresponse_parse</CODE
->(lwres_context_t *ctx, lwres_buffer_t *b, lwres_lwpacket_t *pkt, lwres_gnbaresponse_t **structp);</CODE
-></P
-><P
-><CODE
-><CODE
-CLASS="FUNCDEF"
->void
-lwres_gnbaresponse_free</CODE
->(lwres_context_t *ctx, lwres_gnbaresponse_t **structp);</CODE
-></P
-><P
-><CODE
-><CODE
-CLASS="FUNCDEF"
->void
-lwres_gnbarequest_free</CODE
->(lwres_context_t *ctx, lwres_gnbarequest_t **structp);</CODE
-></P
-><P
-></P
-></DIV
-></DIV
-><DIV
-CLASS="REFSECT1"
-><A
-NAME="AEN61"
-></A
-><H2
->DESCRIPTION</H2
-><P
->These are low-level routines for creating and parsing
+<!-- $Id: lwres_gnba.html,v 1.6.2.1.4.9 2005/10/13 02:33:57 marka Exp $ -->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>lwres_gnba</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en">
+<a name="id2463721"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2>Name</h2>
+<p>lwres_gnbarequest_render, lwres_gnbaresponse_render, lwres_gnbarequest_parse, lwres_gnbaresponse_parse, lwres_gnbaresponse_free, lwres_gnbarequest_free &#8212; lightweight resolver getnamebyaddress message handling</p>
+</div>
+<div class="refsynopsisdiv">
+<h2>Synopsis</h2>
+<div class="funcsynopsis">
+<pre class="funcsynopsisinfo">
+#include &lt;lwres/lwres.h&gt;
+</pre>
+<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em">
+<tr>
+<td><code class="funcdef">
+lwres_result_t
+<b class="fsfunc">lwres_gnbarequest_render</b>
+(</code></td>
+<td>lwres_context_t * </td>
+<td>
+<var class="pdparam">ctx</var>, </td>
+</tr>
+<tr>
+<td> </td>
+<td>lwres_gnbarequest_t * </td>
+<td>
+<var class="pdparam">req</var>, </td>
+</tr>
+<tr>
+<td> </td>
+<td>lwres_lwpacket_t * </td>
+<td>
+<var class="pdparam">pkt</var>, </td>
+</tr>
+<tr>
+<td> </td>
+<td>lwres_buffer_t * </td>
+<td>
+<var class="pdparam">b</var><code>)</code>;</td>
+</tr>
+</table>
+<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em">
+<tr>
+<td><code class="funcdef">
+lwres_result_t
+<b class="fsfunc">lwres_gnbaresponse_render</b>
+(</code></td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>
+<code>)</code>;</td>
+</tr>
+</table>
+<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em">
+<tr>
+<td><code class="funcdef">
+lwres_result_t
+<b class="fsfunc">lwres_gnbarequest_parse</b>(</code></td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>
+<code>)</code>;</td>
+</tr>
+</table>
+<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em">
+<tr>
+<td><code class="funcdef">
+lwres_result_t
+<b class="fsfunc">lwres_gnbaresponse_parse</b>(</code></td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>
+<code>)</code>;</td>
+</tr>
+</table>
+<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em">
+<tr>
+<td><code class="funcdef">
+void
+<b class="fsfunc">lwres_gnbaresponse_free</b>
+(</code></td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>
+<code>)</code>;</td>
+</tr>
+</table>
+<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0">
+<tr>
+<td><code class="funcdef">
+void
+<b class="fsfunc">lwres_gnbarequest_free</b>(</code></td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>
+<code>)</code>;</td>
+</tr>
+</table>
+</div>
+</div>
+<div class="refsect1" lang="en">
+<a name="id2525975"></a><h2>DESCRIPTION</h2>
+<p>
+These are low-level routines for creating and parsing
lightweight resolver address-to-name lookup request and
-response messages.</P
-><P
->There are four main functions for the getnamebyaddr opcode.
-One render function converts a getnamebyaddr request structure &mdash;
-<SPAN
-CLASS="TYPE"
->lwres_gnbarequest_t</SPAN
-> &mdash;
+response messages.
+</p>
+<p>
+There are four main functions for the getnamebyaddr opcode.
+One render function converts a getnamebyaddr request structure &#8212;
+<span class="type">lwres_gnbarequest_t</span> &#8212;
to the lightweight resolver's canonical format.
It is complemented by a parse function that converts a packet in this
canonical format to a getnamebyaddr request structure.
-Another render function converts the getnamebyaddr response structure &mdash;
-<SPAN
-CLASS="TYPE"
->lwres_gnbaresponse_t</SPAN
->
+Another render function converts the getnamebyaddr response structure &#8212;
+<span class="type">lwres_gnbaresponse_t</span>
to the canonical format.
This is complemented by a parse function which converts a packet in
-canonical format to a getnamebyaddr response structure.</P
-><P
->These structures are defined in
-<TT
-CLASS="FILENAME"
->lwres/lwres.h</TT
->.
+canonical format to a getnamebyaddr response structure.
+</p>
+<p>
+These structures are defined in
+<code class="filename">lwres/lwres.h</code>.
They are shown below.
-<PRE
-CLASS="PROGRAMLISTING"
->#define LWRES_OPCODE_GETNAMEBYADDR 0x00010002U
+</p>
+<pre class="programlisting">
+#define LWRES_OPCODE_GETNAMEBYADDR 0x00010002U
typedef struct {
lwres_uint32_t flags;
@@ -168,242 +213,112 @@ typedef struct {
lwres_uint16_t *aliaslen;
void *base;
size_t baselen;
-} lwres_gnbaresponse_t;</PRE
-></P
-><P
-><CODE
-CLASS="FUNCTION"
->lwres_gnbarequest_render()</CODE
->
+} lwres_gnbaresponse_t;
+</pre>
+<p>
+</p>
+<p>
+<code class="function">lwres_gnbarequest_render()</code>
uses resolver context
-<VAR
-CLASS="VARNAME"
->ctx</VAR
->
+<code class="varname">ctx</code>
to convert getnamebyaddr request structure
-<VAR
-CLASS="VARNAME"
->req</VAR
->
+<code class="varname">req</code>
to canonical format.
The packet header structure
-<VAR
-CLASS="VARNAME"
->pkt</VAR
->
+<code class="varname">pkt</code>
is initialised and transferred to
buffer
-<VAR
-CLASS="VARNAME"
->b</VAR
->.
+<code class="varname">b</code>.
The contents of
-<VAR
-CLASS="VARNAME"
->*req</VAR
->
+<code class="varname">*req</code>
are then appended to the buffer in canonical format.
-<CODE
-CLASS="FUNCTION"
->lwres_gnbaresponse_render()</CODE
->
+<code class="function">lwres_gnbaresponse_render()</code>
performs the same task, except it converts a getnamebyaddr response structure
-<SPAN
-CLASS="TYPE"
->lwres_gnbaresponse_t</SPAN
->
-to the lightweight resolver's canonical format.</P
-><P
-><CODE
-CLASS="FUNCTION"
->lwres_gnbarequest_parse()</CODE
->
+<span class="type">lwres_gnbaresponse_t</span>
+to the lightweight resolver's canonical format.
+</p>
+<p>
+<code class="function">lwres_gnbarequest_parse()</code>
uses context
-<VAR
-CLASS="VARNAME"
->ctx</VAR
->
+<code class="varname">ctx</code>
to convert the contents of packet
-<VAR
-CLASS="VARNAME"
->pkt</VAR
->
+<code class="varname">pkt</code>
to a
-<SPAN
-CLASS="TYPE"
->lwres_gnbarequest_t</SPAN
->
+<span class="type">lwres_gnbarequest_t</span>
structure.
Buffer
-<VAR
-CLASS="VARNAME"
->b</VAR
->
+<code class="varname">b</code>
provides space to be used for storing this structure.
When the function succeeds, the resulting
-<SPAN
-CLASS="TYPE"
->lwres_gnbarequest_t</SPAN
->
+<span class="type">lwres_gnbarequest_t</span>
is made available through
-<VAR
-CLASS="VARNAME"
->*structp</VAR
->.
-<CODE
-CLASS="FUNCTION"
->lwres_gnbaresponse_parse()</CODE
->
+<code class="varname">*structp</code>.
+<code class="function">lwres_gnbaresponse_parse()</code>
offers the same semantics as
-<CODE
-CLASS="FUNCTION"
->lwres_gnbarequest_parse()</CODE
->
+<code class="function">lwres_gnbarequest_parse()</code>
except it yields a
-<SPAN
-CLASS="TYPE"
->lwres_gnbaresponse_t</SPAN
->
-structure.</P
-><P
-><CODE
-CLASS="FUNCTION"
->lwres_gnbaresponse_free()</CODE
->
+<span class="type">lwres_gnbaresponse_t</span>
+structure.
+</p>
+<p>
+<code class="function">lwres_gnbaresponse_free()</code>
and
-<CODE
-CLASS="FUNCTION"
->lwres_gnbarequest_free()</CODE
->
+<code class="function">lwres_gnbarequest_free()</code>
release the memory in resolver context
-<VAR
-CLASS="VARNAME"
->ctx</VAR
->
+<code class="varname">ctx</code>
that was allocated to the
-<SPAN
-CLASS="TYPE"
->lwres_gnbaresponse_t</SPAN
->
+<span class="type">lwres_gnbaresponse_t</span>
or
-<SPAN
-CLASS="TYPE"
->lwres_gnbarequest_t</SPAN
->
+<span class="type">lwres_gnbarequest_t</span>
structures referenced via
-<VAR
-CLASS="VARNAME"
->structp</VAR
->.
+<code class="varname">structp</code>.
Any memory associated with ancillary buffers and strings for those
-structures is also discarded.</P
-></DIV
-><DIV
-CLASS="REFSECT1"
-><A
-NAME="AEN97"
-></A
-><H2
->RETURN VALUES</H2
-><P
->The getnamebyaddr opcode functions
-<CODE
-CLASS="FUNCTION"
->lwres_gnbarequest_render()</CODE
->,
-<CODE
-CLASS="FUNCTION"
->lwres_gnbaresponse_render()</CODE
->
-<CODE
-CLASS="FUNCTION"
->lwres_gnbarequest_parse()</CODE
->
+structures is also discarded.
+</p>
+</div>
+<div class="refsect1" lang="en">
+<a name="id2526100"></a><h2>RETURN VALUES</h2>
+<p>
+The getnamebyaddr opcode functions
+<code class="function">lwres_gnbarequest_render()</code>,
+<code class="function">lwres_gnbaresponse_render()</code>
+<code class="function">lwres_gnbarequest_parse()</code>
and
-<CODE
-CLASS="FUNCTION"
->lwres_gnbaresponse_parse()</CODE
->
+<code class="function">lwres_gnbaresponse_parse()</code>
all return
-<SPAN
-CLASS="ERRORCODE"
->LWRES_R_SUCCESS</SPAN
->
+<span class="errorcode">LWRES_R_SUCCESS</span>
on success.
They return
-<SPAN
-CLASS="ERRORCODE"
->LWRES_R_NOMEMORY</SPAN
->
+<span class="errorcode">LWRES_R_NOMEMORY</span>
if memory allocation fails.
-<SPAN
-CLASS="ERRORCODE"
->LWRES_R_UNEXPECTEDEND</SPAN
->
+<span class="errorcode">LWRES_R_UNEXPECTEDEND</span>
is returned if the available space in the buffer
-<VAR
-CLASS="VARNAME"
->b</VAR
->
+<code class="varname">b</code>
is too small to accommodate the packet header or the
-<SPAN
-CLASS="TYPE"
->lwres_gnbarequest_t</SPAN
->
+<span class="type">lwres_gnbarequest_t</span>
and
-<SPAN
-CLASS="TYPE"
->lwres_gnbaresponse_t</SPAN
->
+<span class="type">lwres_gnbaresponse_t</span>
structures.
-<CODE
-CLASS="FUNCTION"
->lwres_gnbarequest_parse()</CODE
->
+<code class="function">lwres_gnbarequest_parse()</code>
and
-<CODE
-CLASS="FUNCTION"
->lwres_gnbaresponse_parse()</CODE
->
+<code class="function">lwres_gnbaresponse_parse()</code>
will return
-<SPAN
-CLASS="ERRORCODE"
->LWRES_R_UNEXPECTEDEND</SPAN
->
+<span class="errorcode">LWRES_R_UNEXPECTEDEND</span>
if the buffer is not empty after decoding the received packet.
These functions will return
-<SPAN
-CLASS="ERRORCODE"
->LWRES_R_FAILURE</SPAN
->
+<span class="errorcode">LWRES_R_FAILURE</span>
if
-<CODE
-CLASS="STRUCTFIELD"
->pktflags</CODE
->
+<em class="structfield"><code>pktflags</code></em>
in the packet header structure
-<SPAN
-CLASS="TYPE"
->lwres_lwpacket_t</SPAN
->
-indicate that the packet is not a response to an earlier query.</P
-></DIV
-><DIV
-CLASS="REFSECT1"
-><A
-NAME="AEN116"
-></A
-><H2
->SEE ALSO</H2
-><P
-><SPAN
-CLASS="CITEREFENTRY"
-><SPAN
-CLASS="REFENTRYTITLE"
->lwres_packet</SPAN
->(3)</SPAN
->.</P
-></DIV
-></BODY
-></HTML
->
+<span class="type">lwres_lwpacket_t</span>
+indicate that the packet is not a response to an earlier query.
+</p>
+</div>
+<div class="refsect1" lang="en">
+<a name="id2526165"></a><h2>SEE ALSO</h2>
+<p>
+<span class="citerefentry"><span class="refentrytitle">lwres_packet</span>(3)</span>.
+</p>
+</div>
+</div></body>
+</html>
diff --git a/contrib/bind9/lib/lwres/man/lwres_hstrerror.3 b/contrib/bind9/lib/lwres/man/lwres_hstrerror.3
index 2260088..a1ecf7c 100644
--- a/contrib/bind9/lib/lwres/man/lwres_hstrerror.3
+++ b/contrib/bind9/lib/lwres/man/lwres_hstrerror.3
@@ -1,67 +1,79 @@
-.\" Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
-.\" Copyright (C) 2000, 2001 Internet Software Consortium.
-.\"
+.\" Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
+.\" Copyright (C) 2000, 2001 Internet Software Consortium.
+.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
-.\"
+.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND 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,
+.\" 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.
.\"
-.\" $Id: lwres_hstrerror.3,v 1.13.2.1.8.1 2004/03/06 07:41:43 marka Exp $
+.\" $Id: lwres_hstrerror.3,v 1.13.2.1.8.5 2005/10/13 02:33:53 marka Exp $
.\"
-.TH "LWRES_HSTRERROR" "3" "Jun 30, 2000" "BIND9" ""
-.SH NAME
+.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.
+.TH "LWRES_HSTRERROR" "3" "Jun 30, 2000" "BIND9" "BIND9"
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.SH "NAME"
lwres_herror, lwres_hstrerror \- lightweight resolver error message generation
-.SH SYNOPSIS
-\fB#include <lwres/netdb.h>
-.sp
-.na
-void
-lwres_herror(const char *s);
-.ad
-.sp
-.na
-const char *
-lwres_hstrerror(int err);
-.ad
-\fR
+.SH "SYNOPSIS"
+.nf
+#include <lwres/netdb.h>
+.fi
+.HP 18
+\fBvoid\ \fBlwres_herror\fR\fR\fB(\fR\fBconst\ char\ *s\fR\fB);\fR
+.HP 29
+\fBconst\ char\ *\ \fBlwres_hstrerror\fR\fR\fB(\fR\fBint\ err\fR\fB);\fR
.SH "DESCRIPTION"
.PP
-\fBlwres_herror()\fR prints the string
-\fIs\fR on \fBstderr\fR followed by the string
-generated by \fBlwres_hstrerror()\fR for the error code
-stored in the global variable lwres_h_errno.
+\fBlwres_herror()\fR
+prints the string
+\fIs\fR
+on
+\fBstderr\fR
+followed by the string generated by
+\fBlwres_hstrerror()\fR
+for the error code stored in the global variable
+\fBlwres_h_errno\fR.
.PP
-\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:
+\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
\fBNETDB_SUCCESS\fR
-\fBResolver Error 0 (no error)\fR
+Resolver Error 0 (no error)
.TP
\fBHOST_NOT_FOUND\fR
-\fBUnknown host\fR
+Unknown host
.TP
\fBTRY_AGAIN\fR
-\fBHost name lookup failure\fR
+Host name lookup failure
.TP
\fBNO_RECOVERY\fR
-\fBUnknown server error\fR
+Unknown server error
.TP
\fBNO_DATA\fR
-\fBNo address associated with name\fR
+No address associated with name
.SH "RETURN VALUES"
.PP
-The string \fBUnknown resolver error\fR is returned by
+The string
+Unknown resolver error
+is returned by
\fBlwres_hstrerror()\fR
when the value of
-lwres_h_errno
+\fBlwres_h_errno\fR
is not a valid error code.
.SH "SEE ALSO"
.PP
diff --git a/contrib/bind9/lib/lwres/man/lwres_hstrerror.docbook b/contrib/bind9/lib/lwres/man/lwres_hstrerror.docbook
index 2ad4c49..a36c072 100644
--- a/contrib/bind9/lib/lwres/man/lwres_hstrerror.docbook
+++ b/contrib/bind9/lib/lwres/man/lwres_hstrerror.docbook
@@ -1,7 +1,9 @@
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.0//EN"
+ "http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd"
+ [<!ENTITY mdash "&#8212;">]>
<!--
- - Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
- - Copyright (C) 2001 Internet Software Consortium.
+ - Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
+ - Copyright (C) 2000, 2001 Internet Software Consortium.
-
- Permission to use, copy, modify, and distribute this software for any
- purpose with or without fee is hereby granted, provided that the above
@@ -16,7 +18,7 @@
- PERFORMANCE OF THIS SOFTWARE.
-->
-<!-- $Id: lwres_hstrerror.docbook,v 1.4.206.1 2004/03/06 08:15:41 marka Exp $ -->
+<!-- $Id: lwres_hstrerror.docbook,v 1.4.206.3 2005/05/12 21:36:15 sra Exp $ -->
<refentry>
@@ -30,6 +32,19 @@
<refmiscinfo>BIND9</refmiscinfo>
</refmeta>
+ <docinfo>
+ <copyright>
+ <year>2004</year>
+ <year>2005</year>
+ <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
+ </copyright>
+ <copyright>
+ <year>2000</year>
+ <year>2001</year>
+ <holder>Internet Software Consortium.</holder>
+ </copyright>
+ </docinfo>
+
<refnamediv>
<refname>lwres_herror</refname>
<refname>lwres_hstrerror</refname>
diff --git a/contrib/bind9/lib/lwres/man/lwres_hstrerror.html b/contrib/bind9/lib/lwres/man/lwres_hstrerror.html
index 0c264af..4204a33 100644
--- a/contrib/bind9/lib/lwres/man/lwres_hstrerror.html
+++ b/contrib/bind9/lib/lwres/man/lwres_hstrerror.html
@@ -1,241 +1,100 @@
<!--
- - Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
- - Copyright (C) 2001 Internet Software Consortium.
- -
+ - Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
+ - Copyright (C) 2000, 2001 Internet Software Consortium.
+ -
- Permission to use, copy, modify, and distribute this software for any
- purpose with or without fee is hereby granted, provided that the above
- copyright notice and this permission notice appear in all copies.
- -
+ -
- THE SOFTWARE IS PROVIDED "AS IS" AND 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,
+ - 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.
-->
-
-<!-- $Id: lwres_hstrerror.html,v 1.5.2.1.4.2 2004/08/22 23:39:04 marka Exp $ -->
-
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<HTML
-><HEAD
-><TITLE
->lwres_hstrerror</TITLE
-><META
-NAME="GENERATOR"
-CONTENT="Modular DocBook HTML Stylesheet Version 1.7"></HEAD
-><BODY
-CLASS="REFENTRY"
-BGCOLOR="#FFFFFF"
-TEXT="#000000"
-LINK="#0000FF"
-VLINK="#840084"
-ALINK="#0000FF"
-><H1
-><A
-NAME="AEN1"
-></A
->lwres_hstrerror</H1
-><DIV
-CLASS="REFNAMEDIV"
-><A
-NAME="AEN8"
-></A
-><H2
->Name</H2
->lwres_herror, lwres_hstrerror&nbsp;--&nbsp;lightweight resolver error message generation</DIV
-><DIV
-CLASS="REFSYNOPSISDIV"
-><A
-NAME="AEN12"
-></A
-><H2
->Synopsis</H2
-><DIV
-CLASS="FUNCSYNOPSIS"
-><P
-></P
-><A
-NAME="AEN13"
-></A
-><PRE
-CLASS="FUNCSYNOPSISINFO"
->#include &lt;lwres/netdb.h&gt;</PRE
-><P
-><CODE
-><CODE
-CLASS="FUNCDEF"
->void
-lwres_herror</CODE
->(const char *s);</CODE
-></P
-><P
-><CODE
-><CODE
-CLASS="FUNCDEF"
->const char *
-lwres_hstrerror</CODE
->(int err);</CODE
-></P
-><P
-></P
-></DIV
-></DIV
-><DIV
-CLASS="REFSECT1"
-><A
-NAME="AEN23"
-></A
-><H2
->DESCRIPTION</H2
-><P
-><CODE
-CLASS="FUNCTION"
->lwres_herror()</CODE
-> prints the string
-<VAR
-CLASS="PARAMETER"
->s</VAR
-> on <SPAN
-CLASS="TYPE"
->stderr</SPAN
-> followed by the string
-generated by <CODE
-CLASS="FUNCTION"
->lwres_hstrerror()</CODE
-> for the error code
-stored in the global variable <CODE
-CLASS="CONSTANT"
->lwres_h_errno</CODE
->.</P
-><P
-><CODE
-CLASS="FUNCTION"
->lwres_hstrerror()</CODE
-> returns an appropriate string
-for the error code gievn by <VAR
-CLASS="PARAMETER"
->err</VAR
->. The values of
+<!-- $Id: lwres_hstrerror.html,v 1.5.2.1.4.9 2005/10/13 02:33:57 marka Exp $ -->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>lwres_hstrerror</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en">
+<a name="id2463721"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2>Name</h2>
+<p>lwres_herror, lwres_hstrerror &#8212; lightweight resolver error message generation</p>
+</div>
+<div class="refsynopsisdiv">
+<h2>Synopsis</h2>
+<div class="funcsynopsis">
+<pre class="funcsynopsisinfo">#include &lt;lwres/netdb.h&gt;</pre>
+<p><code class="funcdef">
+void
+<b class="fsfunc">lwres_herror</b>(</code>const char *s<code>)</code>;</p>
+<p><code class="funcdef">
+const char *
+<b class="fsfunc">lwres_hstrerror</b>(</code>int err<code>)</code>;</p>
+</div>
+</div>
+<div class="refsect1" lang="en">
+<a name="id2525859"></a><h2>DESCRIPTION</h2>
+<p>
+<code class="function">lwres_herror()</code> prints the string
+<em class="parameter"><code>s</code></em> on <span class="type">stderr</span> followed by the string
+generated by <code class="function">lwres_hstrerror()</code> for the error code
+stored in the global variable <code class="constant">lwres_h_errno</code>.
+</p>
+<p>
+<code class="function">lwres_hstrerror()</code> returns an appropriate string
+for the error code gievn by <em class="parameter"><code>err</code></em>. The values of
the error codes and messages are as follows:
-<P
-></P
-><DIV
-CLASS="VARIABLELIST"
-><DL
-><DT
-><SPAN
-CLASS="ERRORCODE"
->NETDB_SUCCESS</SPAN
-></DT
-><DD
-><P
-><SPAN
-CLASS="ERRORNAME"
->Resolver Error 0 (no error)</SPAN
-></P
-></DD
-><DT
-><SPAN
-CLASS="ERRORCODE"
->HOST_NOT_FOUND</SPAN
-></DT
-><DD
-><P
-><SPAN
-CLASS="ERRORNAME"
->Unknown host</SPAN
-></P
-></DD
-><DT
-><SPAN
-CLASS="ERRORCODE"
->TRY_AGAIN</SPAN
-></DT
-><DD
-><P
-><SPAN
-CLASS="ERRORNAME"
->Host name lookup failure</SPAN
-></P
-></DD
-><DT
-><SPAN
-CLASS="ERRORCODE"
->NO_RECOVERY</SPAN
-></DT
-><DD
-><P
-><SPAN
-CLASS="ERRORNAME"
->Unknown server error</SPAN
-></P
-></DD
-><DT
-><SPAN
-CLASS="ERRORCODE"
->NO_DATA</SPAN
-></DT
-><DD
-><P
-><SPAN
-CLASS="ERRORNAME"
->No address associated with name</SPAN
-></P
-></DD
-></DL
-></DIV
-></P
-></DIV
-><DIV
-CLASS="REFSECT1"
-><A
-NAME="AEN65"
-></A
-><H2
->RETURN VALUES</H2
-><P
->The string <SPAN
-CLASS="ERRORNAME"
->Unknown resolver error</SPAN
-> is returned by
-<CODE
-CLASS="FUNCTION"
->lwres_hstrerror()</CODE
->
+</p>
+<div class="variablelist"><dl>
+<dt><span class="term"><span class="errorcode">NETDB_SUCCESS</span></span></dt>
+<dd><p>
+<span class="errorname">Resolver Error 0 (no error)</span>
+</p></dd>
+<dt><span class="term"><span class="errorcode">HOST_NOT_FOUND</span></span></dt>
+<dd><p>
+<span class="errorname">Unknown host</span>
+</p></dd>
+<dt><span class="term"><span class="errorcode">TRY_AGAIN</span></span></dt>
+<dd><p>
+<span class="errorname">Host name lookup failure</span>
+</p></dd>
+<dt><span class="term"><span class="errorcode">NO_RECOVERY</span></span></dt>
+<dd><p>
+<span class="errorname">Unknown server error</span>
+</p></dd>
+<dt><span class="term"><span class="errorcode">NO_DATA</span></span></dt>
+<dd><p>
+<span class="errorname">No address associated with name</span>
+</p></dd>
+</dl></div>
+<p>
+</p>
+</div>
+<div class="refsect1" lang="en">
+<a name="id2525971"></a><h2>RETURN VALUES</h2>
+<p>
+The string <span class="errorname">Unknown resolver error</span> is returned by
+<code class="function">lwres_hstrerror()</code>
when the value of
-<CODE
-CLASS="CONSTANT"
->lwres_h_errno</CODE
->
-is not a valid error code.</P
-></DIV
-><DIV
-CLASS="REFSECT1"
-><A
-NAME="AEN71"
-></A
-><H2
->SEE ALSO</H2
-><P
-><SPAN
-CLASS="CITEREFENTRY"
-><SPAN
-CLASS="REFENTRYTITLE"
->herror</SPAN
->(3)</SPAN
->,
+<code class="constant">lwres_h_errno</code>
+is not a valid error code.
+</p>
+</div>
+<div class="refsect1" lang="en">
+<a name="id2525990"></a><h2>SEE ALSO</h2>
+<p>
+<span class="citerefentry"><span class="refentrytitle">herror</span>(3)</span>,
-<SPAN
-CLASS="CITEREFENTRY"
-><SPAN
-CLASS="REFENTRYTITLE"
->lwres_hstrerror</SPAN
->(3)</SPAN
->.</P
-></DIV
-></BODY
-></HTML
->
+<span class="citerefentry"><span class="refentrytitle">lwres_hstrerror</span>(3)</span>.
+</p>
+</div>
+</div></body>
+</html>
diff --git a/contrib/bind9/lib/lwres/man/lwres_inetntop.3 b/contrib/bind9/lib/lwres/man/lwres_inetntop.3
index a4603c6..782cbaf 100644
--- a/contrib/bind9/lib/lwres/man/lwres_inetntop.3
+++ b/contrib/bind9/lib/lwres/man/lwres_inetntop.3
@@ -1,54 +1,69 @@
-.\" Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
-.\" Copyright (C) 2000, 2001 Internet Software Consortium.
-.\"
+.\" Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
+.\" Copyright (C) 2000, 2001 Internet Software Consortium.
+.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
-.\"
+.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND 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,
+.\" 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.
.\"
-.\" $Id: lwres_inetntop.3,v 1.12.2.1.8.1 2004/03/06 07:41:44 marka Exp $
+.\" $Id: lwres_inetntop.3,v 1.12.2.1.8.5 2005/10/13 02:33:53 marka Exp $
.\"
-.TH "LWRES_INETNTOP" "3" "Jun 30, 2000" "BIND9" ""
-.SH NAME
+.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.
+.TH "LWRES_INETNTOP" "3" "Jun 30, 2000" "BIND9" "BIND9"
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.SH "NAME"
lwres_net_ntop \- lightweight resolver IP address presentation
-.SH SYNOPSIS
-\fB#include <lwres/net.h>
-.sp
-.na
-const char *
-lwres_net_ntop(int af, const void *src, char *dst, size_t size);
-.ad
-\fR
+.SH "SYNOPSIS"
+.nf
+#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
.SH "DESCRIPTION"
.PP
-\fBlwres_net_ntop()\fR converts an IP address of
-protocol family \fIaf\fR \(em IPv4 or IPv6 \(em
-at location \fIsrc\fR from network format to its
-conventional representation as a string. For IPv4 addresses, that
-string would be a dotted-decimal. An IPv6 address would be
-represented in colon notation as described in RFC1884.
+\fBlwres_net_ntop()\fR
+converts an IP address of protocol family
+\fIaf\fR
+\(em IPv4 or IPv6 \(em at location
+\fIsrc\fR
+from network format to its conventional representation as a string. For IPv4 addresses, that string would be a dotted\-decimal. An IPv6 address would be represented in colon notation as described in RFC1884.
.PP
-The generated string is copied to \fIdst\fR provided
-\fIsize\fR indicates it is long enough to store the
-ASCII representation of the address.
+The generated string is copied to
+\fIdst\fR
+provided
+\fIsize\fR
+indicates it is long enough to store the ASCII representation of the address.
.SH "RETURN VALUES"
.PP
-If successful, the function returns \fIdst\fR:
-a pointer to a string containing the presentation format of the
-address. \fBlwres_net_ntop()\fR returns
-\fBNULL\fR and sets the global variable
-errno to EAFNOSUPPORT if
-the protocol family given in \fIaf\fR is not
-supported.
+If successful, the function returns
+\fIdst\fR: a pointer to a string containing the presentation format of the address.
+\fBlwres_net_ntop()\fR
+returns
+\fBNULL\fR
+and sets the global variable
+\fBerrno\fR
+to
+\fBEAFNOSUPPORT\fR
+if the protocol family given in
+\fIaf\fR
+is not supported.
.SH "SEE ALSO"
.PP
-\fBRFC1884\fR,
+\fBRFC1884\fR(),
\fBinet_ntop\fR(3),
\fBerrno\fR(3).
diff --git a/contrib/bind9/lib/lwres/man/lwres_inetntop.docbook b/contrib/bind9/lib/lwres/man/lwres_inetntop.docbook
index e771478..651ef04 100644
--- a/contrib/bind9/lib/lwres/man/lwres_inetntop.docbook
+++ b/contrib/bind9/lib/lwres/man/lwres_inetntop.docbook
@@ -1,7 +1,9 @@
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.0//EN"
+ "http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd"
+ [<!ENTITY mdash "&#8212;">]>
<!--
- - Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
- - Copyright (C) 2001 Internet Software Consortium.
+ - Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
+ - Copyright (C) 2000, 2001 Internet Software Consortium.
-
- Permission to use, copy, modify, and distribute this software for any
- purpose with or without fee is hereby granted, provided that the above
@@ -16,7 +18,7 @@
- PERFORMANCE OF THIS SOFTWARE.
-->
-<!-- $Id: lwres_inetntop.docbook,v 1.3.206.1 2004/03/06 08:15:41 marka Exp $ -->
+<!-- $Id: lwres_inetntop.docbook,v 1.3.206.3 2005/05/12 21:36:15 sra Exp $ -->
<refentry>
@@ -30,6 +32,19 @@
<refmiscinfo>BIND9</refmiscinfo>
</refmeta>
+ <docinfo>
+ <copyright>
+ <year>2004</year>
+ <year>2005</year>
+ <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
+ </copyright>
+ <copyright>
+ <year>2000</year>
+ <year>2001</year>
+ <holder>Internet Software Consortium.</holder>
+ </copyright>
+ </docinfo>
+
<refnamediv>
<refname>lwres_net_ntop</refname>
<refpurpose>lightweight resolver IP address presentation</refpurpose>
diff --git a/contrib/bind9/lib/lwres/man/lwres_inetntop.html b/contrib/bind9/lib/lwres/man/lwres_inetntop.html
index 3453345..3c794a5 100644
--- a/contrib/bind9/lib/lwres/man/lwres_inetntop.html
+++ b/contrib/bind9/lib/lwres/man/lwres_inetntop.html
@@ -1,177 +1,98 @@
<!--
- - Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
- - Copyright (C) 2001 Internet Software Consortium.
- -
+ - Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
+ - Copyright (C) 2000, 2001 Internet Software Consortium.
+ -
- Permission to use, copy, modify, and distribute this software for any
- purpose with or without fee is hereby granted, provided that the above
- copyright notice and this permission notice appear in all copies.
- -
+ -
- THE SOFTWARE IS PROVIDED "AS IS" AND 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,
+ - 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.
-->
-
-<!-- $Id: lwres_inetntop.html,v 1.5.2.1.4.2 2004/08/22 23:39:05 marka Exp $ -->
-
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<HTML
-><HEAD
-><TITLE
->lwres_inetntop</TITLE
-><META
-NAME="GENERATOR"
-CONTENT="Modular DocBook HTML Stylesheet Version 1.7"></HEAD
-><BODY
-CLASS="REFENTRY"
-BGCOLOR="#FFFFFF"
-TEXT="#000000"
-LINK="#0000FF"
-VLINK="#840084"
-ALINK="#0000FF"
-><H1
-><A
-NAME="AEN1"
-></A
->lwres_inetntop</H1
-><DIV
-CLASS="REFNAMEDIV"
-><A
-NAME="AEN8"
-></A
-><H2
->Name</H2
->lwres_net_ntop&nbsp;--&nbsp;lightweight resolver IP address presentation</DIV
-><DIV
-CLASS="REFSYNOPSISDIV"
-><A
-NAME="AEN11"
-></A
-><H2
->Synopsis</H2
-><DIV
-CLASS="FUNCSYNOPSIS"
-><P
-></P
-><A
-NAME="AEN12"
-></A
-><PRE
-CLASS="FUNCSYNOPSISINFO"
->#include &lt;lwres/net.h&gt;</PRE
-><P
-><CODE
-><CODE
-CLASS="FUNCDEF"
->const char *
-lwres_net_ntop</CODE
->(int af, const void *src, char *dst, size_t size);</CODE
-></P
-><P
-></P
-></DIV
-></DIV
-><DIV
-CLASS="REFSECT1"
-><A
-NAME="AEN21"
-></A
-><H2
->DESCRIPTION</H2
-><P
-><CODE
-CLASS="FUNCTION"
->lwres_net_ntop()</CODE
-> converts an IP address of
-protocol family <VAR
-CLASS="PARAMETER"
->af</VAR
-> &mdash; IPv4 or IPv6 &mdash;
-at location <VAR
-CLASS="PARAMETER"
->src</VAR
-> from network format to its
+<!-- $Id: lwres_inetntop.html,v 1.5.2.1.4.9 2005/10/13 02:33:57 marka Exp $ -->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>lwres_inetntop</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en">
+<a name="id2463721"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2>Name</h2>
+<p>lwres_net_ntop &#8212; lightweight resolver IP address presentation</p>
+</div>
+<div class="refsynopsisdiv">
+<h2>Synopsis</h2>
+<div class="funcsynopsis">
+<pre class="funcsynopsisinfo">#include &lt;lwres/net.h&gt;</pre>
+<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0">
+<tr>
+<td><code class="funcdef">
+const char *
+<b class="fsfunc">lwres_net_ntop</b>(</code></td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>
+<code>)</code>;</td>
+</tr>
+</table>
+</div>
+</div>
+<div class="refsect1" lang="en">
+<a name="id2525854"></a><h2>DESCRIPTION</h2>
+<p>
+<code class="function">lwres_net_ntop()</code> converts an IP address of
+protocol family <em class="parameter"><code>af</code></em> &#8212; IPv4 or IPv6 &#8212;
+at location <em class="parameter"><code>src</code></em> from network format to its
conventional representation as a string. For IPv4 addresses, that
string would be a dotted-decimal. An IPv6 address would be
-represented in colon notation as described in RFC1884.</P
-><P
->The generated string is copied to <VAR
-CLASS="PARAMETER"
->dst</VAR
-> provided
-<VAR
-CLASS="PARAMETER"
->size</VAR
-> indicates it is long enough to store the
-ASCII representation of the address.</P
-></DIV
-><DIV
-CLASS="REFSECT1"
-><A
-NAME="AEN30"
-></A
-><H2
->RETURN VALUES</H2
-><P
->If successful, the function returns <VAR
-CLASS="PARAMETER"
->dst</VAR
->:
+represented in colon notation as described in RFC1884.
+</p>
+<p>
+The generated string is copied to <em class="parameter"><code>dst</code></em> provided
+<em class="parameter"><code>size</code></em> indicates it is long enough to store the
+ASCII representation of the address.
+</p>
+</div>
+<div class="refsect1" lang="en">
+<a name="id2525888"></a><h2>RETURN VALUES</h2>
+<p>
+If successful, the function returns <em class="parameter"><code>dst</code></em>:
a pointer to a string containing the presentation format of the
-address. <CODE
-CLASS="FUNCTION"
->lwres_net_ntop()</CODE
-> returns
-<SPAN
-CLASS="TYPE"
->NULL</SPAN
-> and sets the global variable
-<CODE
-CLASS="CONSTANT"
->errno</CODE
-> to <SPAN
-CLASS="ERRORCODE"
->EAFNOSUPPORT</SPAN
-> if
-the protocol family given in <VAR
-CLASS="PARAMETER"
->af</VAR
-> is not
-supported.</P
-></DIV
-><DIV
-CLASS="REFSECT1"
-><A
-NAME="AEN39"
-></A
-><H2
->SEE ALSO</H2
-><P
-><SPAN
-CLASS="CITEREFENTRY"
-><SPAN
-CLASS="REFENTRYTITLE"
->RFC1884</SPAN
-></SPAN
->,
-<SPAN
-CLASS="CITEREFENTRY"
-><SPAN
-CLASS="REFENTRYTITLE"
->inet_ntop</SPAN
->(3)</SPAN
->,
-<SPAN
-CLASS="CITEREFENTRY"
-><SPAN
-CLASS="REFENTRYTITLE"
->errno</SPAN
->(3)</SPAN
->.</P
-></DIV
-></BODY
-></HTML
->
+address. <code class="function">lwres_net_ntop()</code> returns
+<span class="type">NULL</span> and sets the global variable
+<code class="constant">errno</code> to <span class="errorcode">EAFNOSUPPORT</span> if
+the protocol family given in <em class="parameter"><code>af</code></em> is not
+supported.
+</p>
+</div>
+<div class="refsect1" lang="en">
+<a name="id2525918"></a><h2>SEE ALSO</h2>
+<p>
+<span class="citerefentry"><span class="refentrytitle">RFC1884</span></span>,
+<span class="citerefentry"><span class="refentrytitle">inet_ntop</span>(3)</span>,
+<span class="citerefentry"><span class="refentrytitle">errno</span>(3)</span>.
+</p>
+</div>
+</div></body>
+</html>
diff --git a/contrib/bind9/lib/lwres/man/lwres_noop.3 b/contrib/bind9/lib/lwres/man/lwres_noop.3
index 36bb904..d2eba57 100644
--- a/contrib/bind9/lib/lwres/man/lwres_noop.3
+++ b/contrib/bind9/lib/lwres/man/lwres_noop.3
@@ -1,142 +1,140 @@
-.\" Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
-.\" Copyright (C) 2000, 2001 Internet Software Consortium.
-.\"
+.\" Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
+.\" Copyright (C) 2000, 2001 Internet Software Consortium.
+.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
-.\"
+.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND 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,
+.\" 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.
.\"
-.\" $Id: lwres_noop.3,v 1.14.2.1.8.1 2004/03/06 07:41:44 marka Exp $
+.\" $Id: lwres_noop.3,v 1.14.2.1.8.5 2005/10/13 02:33:54 marka Exp $
.\"
-.TH "LWRES_NOOP" "3" "Jun 30, 2000" "BIND9" ""
-.SH NAME
-lwres_nooprequest_render, lwres_noopresponse_render, lwres_nooprequest_parse, lwres_noopresponse_parse, lwres_noopresponse_free, lwres_nooprequest_free \- lightweight resolver no-op message handling
-.SH SYNOPSIS
-\fB#include <lwres/lwres.h>
-.sp
-.na
-lwres_result_t
-lwres_nooprequest_render(lwres_context_t *ctx, lwres_nooprequest_t *req, lwres_lwpacket_t *pkt, lwres_buffer_t *b);
-.ad
-.sp
-.na
-lwres_result_t
-lwres_noopresponse_render(lwres_context_t *ctx, lwres_noopresponse_t *req, lwres_lwpacket_t *pkt, lwres_buffer_t *b);
-.ad
-.sp
-.na
-lwres_result_t
-lwres_nooprequest_parse(lwres_context_t *ctx, lwres_buffer_t *b, lwres_lwpacket_t *pkt, lwres_nooprequest_t **structp);
-.ad
-.sp
-.na
-lwres_result_t
-lwres_noopresponse_parse(lwres_context_t *ctx, lwres_buffer_t *b, lwres_lwpacket_t *pkt, lwres_noopresponse_t **structp);
-.ad
-.sp
-.na
-void
-lwres_noopresponse_free(lwres_context_t *ctx, lwres_noopresponse_t **structp);
-.ad
-.sp
-.na
-void
-lwres_nooprequest_free(lwres_context_t *ctx, lwres_nooprequest_t **structp);
-.ad
-\fR
+.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.
+.TH "LWRES_NOOP" "3" "Jun 30, 2000" "BIND9" "BIND9"
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.SH "NAME"
+lwres_nooprequest_render, lwres_noopresponse_render, lwres_nooprequest_parse, lwres_noopresponse_parse, lwres_noopresponse_free, lwres_nooprequest_free \- lightweight resolver no\-op message handling
+.SH "SYNOPSIS"
+.nf
+#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
+.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
+.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
+.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
+.HP 29
+\fBvoid\ \fBlwres_noopresponse_free\fR\fR\fB(\fR\fBlwres_context_t\ *ctx\fR\fB, \fR\fBlwres_noopresponse_t\ **structp\fR\fB);\fR
+.HP 28
+\fBvoid\ \fBlwres_nooprequest_free\fR\fR\fB(\fR\fBlwres_context_t\ *ctx\fR\fB, \fR\fBlwres_nooprequest_t\ **structp\fR\fB);\fR
.SH "DESCRIPTION"
.PP
-These are low-level routines for creating and parsing
-lightweight resolver no-op request and response messages.
+These are low\-level routines for creating and parsing lightweight resolver no\-op request and response messages.
.PP
-The no-op message is analogous to a \fBping\fR packet:
-a packet is sent to the resolver daemon and is simply echoed back.
-The opcode is intended to allow a client to determine if the server is
-operational or not.
+The no\-op message is analogous to a
+\fBping\fR
+packet: a packet is sent to the resolver daemon and is simply echoed back. The opcode is intended to allow a client to determine if the server is operational or not.
.PP
-There are four main functions for the no-op opcode.
-One render function converts a no-op request structure \(em
-\fBlwres_nooprequest_t\fR \(em
-to the lighweight resolver's canonical format.
-It is complemented by a parse function that converts a packet in this
-canonical format to a no-op request structure.
-Another render function converts the no-op response structure \(em
+There are four main functions for the no\-op opcode. One render function converts a no\-op request structure \(em
+\fBlwres_nooprequest_t\fR
+\(em to the lighweight resolver's canonical format. It is complemented by a parse function that converts a packet in this canonical format to a no\-op request structure. Another render function converts the no\-op response structure \(em
\fBlwres_noopresponse_t\fR
-to the canonical format.
-This is complemented by a parse function which converts a packet in
-canonical format to a no-op response structure.
+to the canonical format. This is complemented by a parse function which converts a packet in canonical format to a no\-op response structure.
.PP
These structures are defined in
-\fIlwres/lwres.h\fR.
-They are shown below.
+\fIlwres/lwres.h\fR. They are shown below.
.sp
.nf
#define LWRES_OPCODE_NOOP 0x00000000U
-
typedef struct {
lwres_uint16_t datalength;
unsigned char *data;
} lwres_nooprequest_t;
-
typedef struct {
lwres_uint16_t datalength;
unsigned char *data;
} lwres_noopresponse_t;
-.sp
.fi
-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.
+.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
-\fBlwres_nooprequest_render()\fR uses resolver
-context \fIctx\fR to convert no-op request structure
-\fIreq\fR to canonical format. The packet header
-structure \fIpkt\fR is initialised and transferred to
-buffer \fIb\fR. The contents of
-\fI*req\fR are then appended to the buffer in
-canonical format. \fBlwres_noopresponse_render()\fR
-performs the same task, except it converts a no-op response structure
-\fBlwres_noopresponse_t\fR to the lightweight resolver's
-canonical format.
+\fBlwres_nooprequest_render()\fR
+uses resolver context
+\fIctx\fR
+to convert no\-op request structure
+\fIreq\fR
+to canonical format. The packet header structure
+\fIpkt\fR
+is initialised and transferred to buffer
+\fIb\fR. The contents of
+\fI*req\fR
+are then appended to the buffer in canonical format.
+\fBlwres_noopresponse_render()\fR
+performs the same task, except it converts a no\-op response structure
+\fBlwres_noopresponse_t\fR
+to the lightweight resolver's canonical format.
.PP
-\fBlwres_nooprequest_parse()\fR uses context
-\fIctx\fR to convert the contents of packet
-\fIpkt\fR to a \fBlwres_nooprequest_t\fR
-structure. Buffer \fIb\fR provides space to be used
-for storing this structure. When the function succeeds, the resulting
-\fBlwres_nooprequest_t\fR is made available through
+\fBlwres_nooprequest_parse()\fR
+uses context
+\fIctx\fR
+to convert the contents of packet
+\fIpkt\fR
+to a
+\fBlwres_nooprequest_t\fR
+structure. Buffer
+\fIb\fR
+provides space to be used for storing this structure. When the function succeeds, the resulting
+\fBlwres_nooprequest_t\fR
+is made available through
\fI*structp\fR.
-\fBlwres_noopresponse_parse()\fR offers the same
-semantics as \fBlwres_nooprequest_parse()\fR except it
-yields a \fBlwres_noopresponse_t\fR structure.
+\fBlwres_noopresponse_parse()\fR
+offers the same semantics as
+\fBlwres_nooprequest_parse()\fR
+except it yields a
+\fBlwres_noopresponse_t\fR
+structure.
.PP
-\fBlwres_noopresponse_free()\fR and
-\fBlwres_nooprequest_free()\fR release the memory in
-resolver context \fIctx\fR that was allocated to the
-\fBlwres_noopresponse_t\fR or \fBlwres_nooprequest_t\fR
-structures referenced via \fIstructp\fR.
+\fBlwres_noopresponse_free()\fR
+and
+\fBlwres_nooprequest_free()\fR
+release the memory in resolver context
+\fIctx\fR
+that was allocated to the
+\fBlwres_noopresponse_t\fR
+or
+\fBlwres_nooprequest_t\fR
+structures referenced via
+\fIstructp\fR.
.SH "RETURN VALUES"
.PP
-The no-op opcode functions
+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
-LWRES_R_SUCCESS
-on success.
-They return
-LWRES_R_NOMEMORY
+\fBLWRES_R_SUCCESS\fR
+on success. They return
+\fBLWRES_R_NOMEMORY\fR
if memory allocation fails.
-LWRES_R_UNEXPECTEDEND
+\fBLWRES_R_UNEXPECTEDEND\fR
is returned if the available space in the buffer
\fIb\fR
is too small to accommodate the packet header or the
@@ -148,15 +146,14 @@ structures.
and
\fBlwres_noopresponse_parse()\fR
will return
-LWRES_R_UNEXPECTEDEND
-if the buffer is not empty after decoding the received packet.
-These functions will return
-LWRES_R_FAILURE
+\fBLWRES_R_UNEXPECTEDEND\fR
+if the buffer is not empty after decoding the received packet. These functions will return
+\fBLWRES_R_FAILURE\fR
if
-pktflags
+\fBpktflags\fR
in the packet header structure
\fBlwres_lwpacket_t\fR
indicate that the packet is not a response to an earlier query.
.SH "SEE ALSO"
.PP
-\fBlwres_packet\fR(3)
+\fBlwres_packet\fR(3 )
diff --git a/contrib/bind9/lib/lwres/man/lwres_noop.docbook b/contrib/bind9/lib/lwres/man/lwres_noop.docbook
index dde2795..fcb3c59 100644
--- a/contrib/bind9/lib/lwres/man/lwres_noop.docbook
+++ b/contrib/bind9/lib/lwres/man/lwres_noop.docbook
@@ -1,7 +1,9 @@
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.0//EN"
+ "http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd"
+ [<!ENTITY mdash "&#8212;">]>
<!--
- - Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
- - Copyright (C) 2001 Internet Software Consortium.
+ - Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
+ - Copyright (C) 2000, 2001 Internet Software Consortium.
-
- Permission to use, copy, modify, and distribute this software for any
- purpose with or without fee is hereby granted, provided that the above
@@ -16,7 +18,7 @@
- PERFORMANCE OF THIS SOFTWARE.
-->
-<!-- $Id: lwres_noop.docbook,v 1.4.206.1 2004/03/06 08:15:41 marka Exp $ -->
+<!-- $Id: lwres_noop.docbook,v 1.4.206.3 2005/05/12 21:36:16 sra Exp $ -->
<refentry>
@@ -30,6 +32,19 @@
<refmiscinfo>BIND9</refmiscinfo>
</refmeta>
+ <docinfo>
+ <copyright>
+ <year>2004</year>
+ <year>2005</year>
+ <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
+ </copyright>
+ <copyright>
+ <year>2000</year>
+ <year>2001</year>
+ <holder>Internet Software Consortium.</holder>
+ </copyright>
+ </docinfo>
+
<refnamediv>
<refname>lwres_nooprequest_render</refname>
<refname>lwres_noopresponse_render</refname>
diff --git a/contrib/bind9/lib/lwres/man/lwres_noop.html b/contrib/bind9/lib/lwres/man/lwres_noop.html
index 0962883..261bac8 100644
--- a/contrib/bind9/lib/lwres/man/lwres_noop.html
+++ b/contrib/bind9/lib/lwres/man/lwres_noop.html
@@ -1,166 +1,202 @@
<!--
- - Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
- - Copyright (C) 2001 Internet Software Consortium.
- -
+ - Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
+ - Copyright (C) 2000, 2001 Internet Software Consortium.
+ -
- Permission to use, copy, modify, and distribute this software for any
- purpose with or without fee is hereby granted, provided that the above
- copyright notice and this permission notice appear in all copies.
- -
+ -
- THE SOFTWARE IS PROVIDED "AS IS" AND 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,
+ - 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.
-->
-
-<!-- $Id: lwres_noop.html,v 1.7.2.1.4.2 2004/08/22 23:39:05 marka Exp $ -->
-
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<HTML
-><HEAD
-><TITLE
->lwres_noop</TITLE
-><META
-NAME="GENERATOR"
-CONTENT="Modular DocBook HTML Stylesheet Version 1.7"></HEAD
-><BODY
-CLASS="REFENTRY"
-BGCOLOR="#FFFFFF"
-TEXT="#000000"
-LINK="#0000FF"
-VLINK="#840084"
-ALINK="#0000FF"
-><H1
-><A
-NAME="AEN1"
-></A
->lwres_noop</H1
-><DIV
-CLASS="REFNAMEDIV"
-><A
-NAME="AEN8"
-></A
-><H2
->Name</H2
->lwres_nooprequest_render, lwres_noopresponse_render, lwres_nooprequest_parse, lwres_noopresponse_parse, lwres_noopresponse_free, lwres_nooprequest_free&nbsp;--&nbsp;lightweight resolver no-op message handling</DIV
-><DIV
-CLASS="REFSYNOPSISDIV"
-><A
-NAME="AEN16"
-></A
-><H2
->Synopsis</H2
-><DIV
-CLASS="FUNCSYNOPSIS"
-><P
-></P
-><A
-NAME="AEN17"
-></A
-><PRE
-CLASS="FUNCSYNOPSISINFO"
->#include &lt;lwres/lwres.h&gt;</PRE
-><P
-><CODE
-><CODE
-CLASS="FUNCDEF"
->lwres_result_t
-lwres_nooprequest_render</CODE
->(lwres_context_t *ctx, lwres_nooprequest_t *req, lwres_lwpacket_t *pkt, lwres_buffer_t *b);</CODE
-></P
-><P
-><CODE
-><CODE
-CLASS="FUNCDEF"
->lwres_result_t
-lwres_noopresponse_render</CODE
->(lwres_context_t *ctx, lwres_noopresponse_t *req, lwres_lwpacket_t *pkt, lwres_buffer_t *b);</CODE
-></P
-><P
-><CODE
-><CODE
-CLASS="FUNCDEF"
->lwres_result_t
-lwres_nooprequest_parse</CODE
->(lwres_context_t *ctx, lwres_buffer_t *b, lwres_lwpacket_t *pkt, lwres_nooprequest_t **structp);</CODE
-></P
-><P
-><CODE
-><CODE
-CLASS="FUNCDEF"
->lwres_result_t
-lwres_noopresponse_parse</CODE
->(lwres_context_t *ctx, lwres_buffer_t *b, lwres_lwpacket_t *pkt, lwres_noopresponse_t **structp);</CODE
-></P
-><P
-><CODE
-><CODE
-CLASS="FUNCDEF"
->void
-lwres_noopresponse_free</CODE
->(lwres_context_t *ctx, lwres_noopresponse_t **structp);</CODE
-></P
-><P
-><CODE
-><CODE
-CLASS="FUNCDEF"
->void
-lwres_nooprequest_free</CODE
->(lwres_context_t *ctx, lwres_nooprequest_t **structp);</CODE
-></P
-><P
-></P
-></DIV
-></DIV
-><DIV
-CLASS="REFSECT1"
-><A
-NAME="AEN57"
-></A
-><H2
->DESCRIPTION</H2
-><P
->These are low-level routines for creating and parsing
-lightweight resolver no-op request and response messages.</P
-><P
->The no-op message is analogous to a <B
-CLASS="COMMAND"
->ping</B
-> packet:
+<!-- $Id: lwres_noop.html,v 1.7.2.1.4.9 2005/10/13 02:33:57 marka Exp $ -->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>lwres_noop</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en">
+<a name="id2463721"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2>Name</h2>
+<p>lwres_nooprequest_render, lwres_noopresponse_render, lwres_nooprequest_parse, lwres_noopresponse_parse, lwres_noopresponse_free, lwres_nooprequest_free &#8212; lightweight resolver no-op message handling</p>
+</div>
+<div class="refsynopsisdiv">
+<h2>Synopsis</h2>
+<div class="funcsynopsis">
+<pre class="funcsynopsisinfo">
+#include &lt;lwres/lwres.h&gt;</pre>
+<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em">
+<tr>
+<td><code class="funcdef">
+lwres_result_t
+<b class="fsfunc">lwres_nooprequest_render</b>(</code></td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>
+<code>)</code>;</td>
+</tr>
+</table>
+<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em">
+<tr>
+<td><code class="funcdef">
+lwres_result_t
+<b class="fsfunc">lwres_noopresponse_render</b>(</code></td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>
+<code>)</code>;</td>
+</tr>
+</table>
+<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em">
+<tr>
+<td><code class="funcdef">
+lwres_result_t
+<b class="fsfunc">lwres_nooprequest_parse</b>(</code></td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>
+<code>)</code>;</td>
+</tr>
+</table>
+<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em">
+<tr>
+<td><code class="funcdef">
+lwres_result_t
+<b class="fsfunc">lwres_noopresponse_parse</b>(</code></td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>
+<code>)</code>;</td>
+</tr>
+</table>
+<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em">
+<tr>
+<td><code class="funcdef">
+void
+<b class="fsfunc">lwres_noopresponse_free</b>(</code></td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>
+<code>)</code>;</td>
+</tr>
+</table>
+<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0">
+<tr>
+<td><code class="funcdef">
+void
+<b class="fsfunc">lwres_nooprequest_free</b>(</code></td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>
+<code>)</code>;</td>
+</tr>
+</table>
+</div>
+</div>
+<div class="refsect1" lang="en">
+<a name="id2525963"></a><h2>DESCRIPTION</h2>
+<p>
+These are low-level routines for creating and parsing
+lightweight resolver no-op request and response messages.
+</p>
+<p>
+The no-op message is analogous to a <span><strong class="command">ping</strong></span> packet:
a packet is sent to the resolver daemon and is simply echoed back.
The opcode is intended to allow a client to determine if the server is
-operational or not.</P
-><P
->There are four main functions for the no-op opcode.
-One render function converts a no-op request structure &mdash;
-<SPAN
-CLASS="TYPE"
->lwres_nooprequest_t</SPAN
-> &mdash;
+operational or not.
+</p>
+<p>
+There are four main functions for the no-op opcode.
+One render function converts a no-op request structure &#8212;
+<span class="type">lwres_nooprequest_t</span> &#8212;
to the lighweight resolver's canonical format.
It is complemented by a parse function that converts a packet in this
canonical format to a no-op request structure.
-Another render function converts the no-op response structure &mdash;
-<SPAN
-CLASS="TYPE"
->lwres_noopresponse_t</SPAN
->
+Another render function converts the no-op response structure &#8212;
+<span class="type">lwres_noopresponse_t</span>
to the canonical format.
This is complemented by a parse function which converts a packet in
-canonical format to a no-op response structure.</P
-><P
->These structures are defined in
-<TT
-CLASS="FILENAME"
->lwres/lwres.h</TT
->.
+canonical format to a no-op response structure.
+</p>
+<p>
+These structures are defined in
+<code class="filename">lwres/lwres.h</code>.
They are shown below.
-<PRE
-CLASS="PROGRAMLISTING"
->#define LWRES_OPCODE_NOOP 0x00000000U
+</p>
+<pre class="programlisting">
+#define LWRES_OPCODE_NOOP 0x00000000U
typedef struct {
lwres_uint16_t datalength;
@@ -170,219 +206,90 @@ typedef struct {
typedef struct {
lwres_uint16_t datalength;
unsigned char *data;
-} lwres_noopresponse_t;</PRE
->
+} lwres_noopresponse_t;
+</pre>
+<p>
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.</P
-><P
-><CODE
-CLASS="FUNCTION"
->lwres_nooprequest_render()</CODE
-> uses resolver
-context <VAR
-CLASS="PARAMETER"
->ctx</VAR
-> to convert no-op request structure
-<VAR
-CLASS="PARAMETER"
->req</VAR
-> to canonical format. The packet header
-structure <VAR
-CLASS="PARAMETER"
->pkt</VAR
-> is initialised and transferred to
-buffer <VAR
-CLASS="PARAMETER"
->b</VAR
->. The contents of
-<VAR
-CLASS="PARAMETER"
->*req</VAR
-> are then appended to the buffer in
-canonical format. <CODE
-CLASS="FUNCTION"
->lwres_noopresponse_render()</CODE
->
+the response is therefore identical to the request.
+</p>
+<p>
+<code class="function">lwres_nooprequest_render()</code> uses resolver
+context <em class="parameter"><code>ctx</code></em> to convert no-op request structure
+<em class="parameter"><code>req</code></em> to canonical format. The packet header
+structure <em class="parameter"><code>pkt</code></em> is initialised and transferred to
+buffer <em class="parameter"><code>b</code></em>. The contents of
+<em class="parameter"><code>*req</code></em> are then appended to the buffer in
+canonical format. <code class="function">lwres_noopresponse_render()</code>
performs the same task, except it converts a no-op response structure
-<SPAN
-CLASS="TYPE"
->lwres_noopresponse_t</SPAN
-> to the lightweight resolver's
-canonical format.</P
-><P
-><CODE
-CLASS="FUNCTION"
->lwres_nooprequest_parse()</CODE
-> uses context
-<VAR
-CLASS="PARAMETER"
->ctx</VAR
-> to convert the contents of packet
-<VAR
-CLASS="PARAMETER"
->pkt</VAR
-> to a <SPAN
-CLASS="TYPE"
->lwres_nooprequest_t</SPAN
->
-structure. Buffer <VAR
-CLASS="PARAMETER"
->b</VAR
-> provides space to be used
+<span class="type">lwres_noopresponse_t</span> to the lightweight resolver's
+canonical format.
+</p>
+<p>
+<code class="function">lwres_nooprequest_parse()</code> uses context
+<em class="parameter"><code>ctx</code></em> to convert the contents of packet
+<em class="parameter"><code>pkt</code></em> to a <span class="type">lwres_nooprequest_t</span>
+structure. Buffer <em class="parameter"><code>b</code></em> provides space to be used
for storing this structure. When the function succeeds, the resulting
-<SPAN
-CLASS="TYPE"
->lwres_nooprequest_t</SPAN
-> is made available through
-<VAR
-CLASS="PARAMETER"
->*structp</VAR
->.
-<CODE
-CLASS="FUNCTION"
->lwres_noopresponse_parse()</CODE
-> offers the same
-semantics as <CODE
-CLASS="FUNCTION"
->lwres_nooprequest_parse()</CODE
-> except it
-yields a <SPAN
-CLASS="TYPE"
->lwres_noopresponse_t</SPAN
-> structure.</P
-><P
-><CODE
-CLASS="FUNCTION"
->lwres_noopresponse_free()</CODE
-> and
-<CODE
-CLASS="FUNCTION"
->lwres_nooprequest_free()</CODE
-> release the memory in
-resolver context <VAR
-CLASS="PARAMETER"
->ctx</VAR
-> that was allocated to the
-<SPAN
-CLASS="TYPE"
->lwres_noopresponse_t</SPAN
-> or <SPAN
-CLASS="TYPE"
->lwres_nooprequest_t</SPAN
->
-structures referenced via <VAR
-CLASS="PARAMETER"
->structp</VAR
->.</P
-></DIV
-><DIV
-CLASS="REFSECT1"
-><A
-NAME="AEN95"
-></A
-><H2
->RETURN VALUES</H2
-><P
->The no-op opcode functions
-<CODE
-CLASS="FUNCTION"
->lwres_nooprequest_render()</CODE
->,
+<span class="type">lwres_nooprequest_t</span> is made available through
+<em class="parameter"><code>*structp</code></em>.
+<code class="function">lwres_noopresponse_parse()</code> offers the same
+semantics as <code class="function">lwres_nooprequest_parse()</code> except it
+yields a <span class="type">lwres_noopresponse_t</span> structure.
+</p>
+<p>
+<code class="function">lwres_noopresponse_free()</code> and
+<code class="function">lwres_nooprequest_free()</code> release the memory in
+resolver context <em class="parameter"><code>ctx</code></em> that was allocated to the
+<span class="type">lwres_noopresponse_t</span> or <span class="type">lwres_nooprequest_t</span>
+structures referenced via <em class="parameter"><code>structp</code></em>.
+</p>
+</div>
+<div class="refsect1" lang="en">
+<a name="id2526096"></a><h2>RETURN VALUES</h2>
+<p>
+The no-op opcode functions
+<code class="function">lwres_nooprequest_render()</code>,
-<CODE
-CLASS="FUNCTION"
->lwres_noopresponse_render()</CODE
->
-<CODE
-CLASS="FUNCTION"
->lwres_nooprequest_parse()</CODE
->
+<code class="function">lwres_noopresponse_render()</code>
+<code class="function">lwres_nooprequest_parse()</code>
and
-<CODE
-CLASS="FUNCTION"
->lwres_noopresponse_parse()</CODE
->
+<code class="function">lwres_noopresponse_parse()</code>
all return
-<SPAN
-CLASS="ERRORCODE"
->LWRES_R_SUCCESS</SPAN
->
+<span class="errorcode">LWRES_R_SUCCESS</span>
on success.
They return
-<SPAN
-CLASS="ERRORCODE"
->LWRES_R_NOMEMORY</SPAN
->
+<span class="errorcode">LWRES_R_NOMEMORY</span>
if memory allocation fails.
-<SPAN
-CLASS="ERRORCODE"
->LWRES_R_UNEXPECTEDEND</SPAN
->
+<span class="errorcode">LWRES_R_UNEXPECTEDEND</span>
is returned if the available space in the buffer
-<VAR
-CLASS="PARAMETER"
->b</VAR
->
+<em class="parameter"><code>b</code></em>
is too small to accommodate the packet header or the
-<SPAN
-CLASS="TYPE"
->lwres_nooprequest_t</SPAN
->
+<span class="type">lwres_nooprequest_t</span>
and
-<SPAN
-CLASS="TYPE"
->lwres_noopresponse_t</SPAN
->
+<span class="type">lwres_noopresponse_t</span>
structures.
-<CODE
-CLASS="FUNCTION"
->lwres_nooprequest_parse()</CODE
->
+<code class="function">lwres_nooprequest_parse()</code>
and
-<CODE
-CLASS="FUNCTION"
->lwres_noopresponse_parse()</CODE
->
+<code class="function">lwres_noopresponse_parse()</code>
will return
-<SPAN
-CLASS="ERRORCODE"
->LWRES_R_UNEXPECTEDEND</SPAN
->
+<span class="errorcode">LWRES_R_UNEXPECTEDEND</span>
if the buffer is not empty after decoding the received packet.
These functions will return
-<SPAN
-CLASS="ERRORCODE"
->LWRES_R_FAILURE</SPAN
->
+<span class="errorcode">LWRES_R_FAILURE</span>
if
-<CODE
-CLASS="CONSTANT"
->pktflags</CODE
->
+<code class="constant">pktflags</code>
in the packet header structure
-<SPAN
-CLASS="TYPE"
->lwres_lwpacket_t</SPAN
->
-indicate that the packet is not a response to an earlier query.</P
-></DIV
-><DIV
-CLASS="REFSECT1"
-><A
-NAME="AEN114"
-></A
-><H2
->SEE ALSO</H2
-><P
-><SPAN
-CLASS="CITEREFENTRY"
-><SPAN
-CLASS="REFENTRYTITLE"
->lwres_packet</SPAN
->(3)</SPAN
-></P
-></DIV
-></BODY
-></HTML
->
+<span class="type">lwres_lwpacket_t</span>
+indicate that the packet is not a response to an earlier query.
+</p>
+</div>
+<div class="refsect1" lang="en">
+<a name="id2526160"></a><h2>SEE ALSO</h2>
+<p>
+<span class="citerefentry"><span class="refentrytitle">lwres_packet</span>(3
+)</span>
+</p>
+</div>
+</div></body>
+</html>
diff --git a/contrib/bind9/lib/lwres/man/lwres_packet.3 b/contrib/bind9/lib/lwres/man/lwres_packet.3
index 1fbc417..777e0c7 100644
--- a/contrib/bind9/lib/lwres/man/lwres_packet.3
+++ b/contrib/bind9/lib/lwres/man/lwres_packet.3
@@ -1,36 +1,41 @@
-.\" Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
-.\" Copyright (C) 2000, 2001 Internet Software Consortium.
-.\"
+.\" Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
+.\" Copyright (C) 2000, 2001 Internet Software Consortium.
+.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
-.\"
+.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND 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,
+.\" 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.
.\"
-.\" $Id: lwres_packet.3,v 1.15.2.1.8.1 2004/03/06 07:41:44 marka Exp $
+.\" $Id: lwres_packet.3,v 1.15.2.1.8.5 2005/10/13 02:33:54 marka Exp $
.\"
-.TH "LWRES_PACKET" "3" "Jun 30, 2000" "BIND9" ""
-.SH NAME
+.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.
+.TH "LWRES_PACKET" "3" "Jun 30, 2000" "BIND9" "BIND9"
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.SH "NAME"
lwres_lwpacket_renderheader, lwres_lwpacket_parseheader \- lightweight resolver packet handling functions
-.SH SYNOPSIS
-\fB#include <lwres/lwpacket.h>
-.sp
-.na
-lwres_result_t
-lwres_lwpacket_renderheader(lwres_buffer_t *b, lwres_lwpacket_t *pkt);
-.ad
-.sp
-.na
-lwres_result_t
-lwres_lwpacket_parseheader(lwres_buffer_t *b, lwres_lwpacket_t *pkt);
-.ad
-\fR
+.SH "SYNOPSIS"
+.nf
+#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
+.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
.SH "DESCRIPTION"
.PP
These functions rely on a
@@ -40,7 +45,6 @@ which is defined in
.sp
.nf
typedef struct lwres_lwpacket lwres_lwpacket_t;
-
struct lwres_lwpacket {
lwres_uint32_t length;
lwres_uint16_t version;
@@ -52,100 +56,74 @@ struct lwres_lwpacket {
lwres_uint16_t authtype;
lwres_uint16_t authlength;
};
-.sp
.fi
+.sp
.PP
The elements of this structure are:
.TP
\fBlength\fR
-the overall packet length, including the entire packet header.
-This field is filled in by the lwres_gabn_*() and lwres_gnba_*()
-calls.
+the overall packet length, including the entire packet header. This field is filled in by the lwres_gabn_*() and lwres_gnba_*() calls.
.TP
\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.
+\fBLWRES_LWPACKETVERSION_0\fR. This field is filled in by the lwres_gabn_*() and lwres_gnba_*() calls.
.TP
\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.
+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
\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.
+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
\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.
+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
\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.
+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
\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.
+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
\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.
+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
\fBauthlen\fR
-gives the length of the authentication data.
-Since packet authentication is currently not used, this must be zero.
+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
\fBNOOP\fR
-Success is always returned and the packet contents are echoed.
-The lwres_noop_*() functions should be used for this type.
+Success is always returned and the packet contents are echoed. The lwres_noop_*() functions should be used for this type.
.TP
\fBGETADDRSBYNAME\fR
-returns all known addresses for a given name.
-The lwres_gabn_*() functions should be used for this type.
+returns all known addresses for a given name. The lwres_gabn_*() functions should be used for this type.
.TP
\fBGETNAMEBYADDR\fR
-return the hostname for the given address.
-The lwres_gnba_*() functions should be used for this type.
+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 in network
-byte order to the lightweight resolver buffer,
+\fBlwres_lwpacket_renderheader()\fR
+transfers the contents of lightweight resolver packet structure
+\fBlwres_lwpacket_t\fR\fI*pkt\fR
+in network byte order to the lightweight resolver buffer,
\fI*b\fR.
.PP
-\fBlwres_lwpacket_parseheader()\fR performs the
-converse operation. It transfers data in network byte order from
-buffer \fI*b\fR to resolver packet
+\fBlwres_lwpacket_parseheader()\fR
+performs the converse operation. It transfers data in network byte order from buffer
+\fI*b\fR
+to resolver packet
\fI*pkt\fR. The contents of the buffer
-\fIb\fR should correspond to a
+\fIb\fR
+should correspond to a
\fBlwres_lwpacket_t\fR.
.SH "RETURN VALUES"
.PP
Successful calls to
-\fBlwres_lwpacket_renderheader()\fR and
-\fBlwres_lwpacket_parseheader()\fR return
-LWRES_R_SUCCESS. If there is insufficient
-space to copy data between the buffer \fI*b\fR and
-lightweight resolver packet \fI*pkt\fR both functions
-return LWRES_R_UNEXPECTEDEND.
+\fBlwres_lwpacket_renderheader()\fR
+and
+\fBlwres_lwpacket_parseheader()\fR
+return
+\fBLWRES_R_SUCCESS\fR. If there is insufficient space to copy data between the buffer
+\fI*b\fR
+and lightweight resolver packet
+\fI*pkt\fR
+both functions return
+\fBLWRES_R_UNEXPECTEDEND\fR.
diff --git a/contrib/bind9/lib/lwres/man/lwres_packet.docbook b/contrib/bind9/lib/lwres/man/lwres_packet.docbook
index 7795ebc..226f994 100644
--- a/contrib/bind9/lib/lwres/man/lwres_packet.docbook
+++ b/contrib/bind9/lib/lwres/man/lwres_packet.docbook
@@ -1,7 +1,9 @@
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.0//EN"
+ "http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd"
+ [<!ENTITY mdash "&#8212;">]>
<!--
- - Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
- - Copyright (C) 2001 Internet Software Consortium.
+ - Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
+ - Copyright (C) 2000, 2001 Internet Software Consortium.
-
- Permission to use, copy, modify, and distribute this software for any
- purpose with or without fee is hereby granted, provided that the above
@@ -16,7 +18,7 @@
- PERFORMANCE OF THIS SOFTWARE.
-->
-<!-- $Id: lwres_packet.docbook,v 1.6.206.1 2004/03/06 08:15:42 marka Exp $ -->
+<!-- $Id: lwres_packet.docbook,v 1.6.206.3 2005/05/12 21:36:16 sra Exp $ -->
<refentry>
@@ -30,6 +32,19 @@
<refmiscinfo>BIND9</refmiscinfo>
</refmeta>
+ <docinfo>
+ <copyright>
+ <year>2004</year>
+ <year>2005</year>
+ <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
+ </copyright>
+ <copyright>
+ <year>2000</year>
+ <year>2001</year>
+ <holder>Internet Software Consortium.</holder>
+ </copyright>
+ </docinfo>
+
<refnamediv>
<refname>lwres_lwpacket_renderheader</refname>
<refname>lwres_lwpacket_parseheader</refname>
diff --git a/contrib/bind9/lib/lwres/man/lwres_packet.html b/contrib/bind9/lib/lwres/man/lwres_packet.html
index cb61e0a..b83fbcb 100644
--- a/contrib/bind9/lib/lwres/man/lwres_packet.html
+++ b/contrib/bind9/lib/lwres/man/lwres_packet.html
@@ -1,109 +1,79 @@
<!--
- - Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
- - Copyright (C) 2001 Internet Software Consortium.
- -
+ - Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
+ - Copyright (C) 2000, 2001 Internet Software Consortium.
+ -
- Permission to use, copy, modify, and distribute this software for any
- purpose with or without fee is hereby granted, provided that the above
- copyright notice and this permission notice appear in all copies.
- -
+ -
- THE SOFTWARE IS PROVIDED "AS IS" AND 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,
+ - 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.
-->
-
-<!-- $Id: lwres_packet.html,v 1.8.2.1.4.2 2004/08/22 23:39:05 marka Exp $ -->
-
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<HTML
-><HEAD
-><TITLE
->lwres_packet</TITLE
-><META
-NAME="GENERATOR"
-CONTENT="Modular DocBook HTML Stylesheet Version 1.7"></HEAD
-><BODY
-CLASS="REFENTRY"
-BGCOLOR="#FFFFFF"
-TEXT="#000000"
-LINK="#0000FF"
-VLINK="#840084"
-ALINK="#0000FF"
-><H1
-><A
-NAME="AEN1"
-></A
->lwres_packet</H1
-><DIV
-CLASS="REFNAMEDIV"
-><A
-NAME="AEN8"
-></A
-><H2
->Name</H2
->lwres_lwpacket_renderheader, lwres_lwpacket_parseheader&nbsp;--&nbsp;lightweight resolver packet handling functions</DIV
-><DIV
-CLASS="REFSYNOPSISDIV"
-><A
-NAME="AEN12"
-></A
-><H2
->Synopsis</H2
-><DIV
-CLASS="FUNCSYNOPSIS"
-><P
-></P
-><A
-NAME="AEN13"
-></A
-><PRE
-CLASS="FUNCSYNOPSISINFO"
->#include &lt;lwres/lwpacket.h&gt;</PRE
-><P
-><CODE
-><CODE
-CLASS="FUNCDEF"
->lwres_result_t
-lwres_lwpacket_renderheader</CODE
->(lwres_buffer_t *b, lwres_lwpacket_t *pkt);</CODE
-></P
-><P
-><CODE
-><CODE
-CLASS="FUNCDEF"
->lwres_result_t
-lwres_lwpacket_parseheader</CODE
->(lwres_buffer_t *b, lwres_lwpacket_t *pkt);</CODE
-></P
-><P
-></P
-></DIV
-></DIV
-><DIV
-CLASS="REFSECT1"
-><A
-NAME="AEN25"
-></A
-><H2
->DESCRIPTION</H2
-><P
->These functions rely on a
-<SPAN
-CLASS="TYPE"
->struct lwres_lwpacket</SPAN
->
+<!-- $Id: lwres_packet.html,v 1.8.2.1.4.9 2005/10/13 02:33:57 marka Exp $ -->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>lwres_packet</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en">
+<a name="id2463721"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2>Name</h2>
+<p>lwres_lwpacket_renderheader, lwres_lwpacket_parseheader &#8212; lightweight resolver packet handling functions</p>
+</div>
+<div class="refsynopsisdiv">
+<h2>Synopsis</h2>
+<div class="funcsynopsis">
+<pre class="funcsynopsisinfo">#include &lt;lwres/lwpacket.h&gt;</pre>
+<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em">
+<tr>
+<td><code class="funcdef">
+lwres_result_t
+<b class="fsfunc">lwres_lwpacket_renderheader</b>(</code></td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>
+<code>)</code>;</td>
+</tr>
+</table>
+<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0">
+<tr>
+<td><code class="funcdef">
+lwres_result_t
+<b class="fsfunc">lwres_lwpacket_parseheader</b>(</code></td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>
+<code>)</code>;</td>
+</tr>
+</table>
+</div>
+</div>
+<div class="refsect1" lang="en">
+<a name="id2525865"></a><h2>DESCRIPTION</h2>
+<p>
+These functions rely on a
+<span class="type">struct lwres_lwpacket</span>
which is defined in
-<TT
-CLASS="FILENAME"
->lwres/lwpacket.h</TT
->.
+<code class="filename">lwres/lwpacket.h</code>.
-<PRE
-CLASS="PROGRAMLISTING"
->typedef struct lwres_lwpacket lwres_lwpacket_t;
+</p>
+<pre class="programlisting">
+typedef struct lwres_lwpacket lwres_lwpacket_t;
struct lwres_lwpacket {
lwres_uint32_t length;
@@ -115,248 +85,132 @@ struct lwres_lwpacket {
lwres_uint32_t recvlength;
lwres_uint16_t authtype;
lwres_uint16_t authlength;
-};</PRE
-></P
-><P
->The elements of this structure are:
-<P
-></P
-><DIV
-CLASS="VARIABLELIST"
-><DL
-><DT
-><CODE
-CLASS="CONSTANT"
->length</CODE
-></DT
-><DD
-><P
->the overall packet length, including the entire packet header.
+};
+</pre>
+<p>
+</p>
+<p>
+The elements of this structure are:
+</p>
+<div class="variablelist"><dl>
+<dt><span class="term"><code class="constant">length</code></span></dt>
+<dd><p>
+the overall packet length, including the entire packet header.
This field is filled in by the lwres_gabn_*() and lwres_gnba_*()
-calls.</P
-></DD
-><DT
-><CODE
-CLASS="CONSTANT"
->version</CODE
-></DT
-><DD
-><P
->the header format. There is currently only one format,
-<SPAN
-CLASS="TYPE"
->LWRES_LWPACKETVERSION_0</SPAN
->.
+calls.
+</p></dd>
+<dt><span class="term"><code class="constant">version</code></span></dt>
+<dd><p>
+the header format. There is currently only one format,
+<span class="type">LWRES_LWPACKETVERSION_0</span>.
This field is filled in by the lwres_gabn_*() and lwres_gnba_*()
-calls.</P
-></DD
-><DT
-><CODE
-CLASS="CONSTANT"
->pktflags</CODE
-></DT
-><DD
-><P
->library-defined flags for this packet: for instance whether the packet
+calls.
+</p></dd>
+<dt><span class="term"><code class="constant">pktflags</code></span></dt>
+<dd><p>
+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.</P
-></DD
-><DT
-><CODE
-CLASS="CONSTANT"
->serial</CODE
-></DT
-><DD
-><P
->is set by the requestor and is returned in all replies. If two or more
+lwres_gabn_*() and lwres_gnba_*() calls.
+</p></dd>
+<dt><span class="term"><code class="constant">serial</code></span></dt>
+<dd><p>
+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.</P
-></DD
-><DT
-><CODE
-CLASS="CONSTANT"
->opcode</CODE
-></DT
-><DD
-><P
->indicates the operation.
+This field must be set by the application.
+</p></dd>
+<dt><span class="term"><code class="constant">opcode</code></span></dt>
+<dd><p>
+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.</P
-></DD
-><DT
-><CODE
-CLASS="CONSTANT"
->result</CODE
-></DT
-><DD
-><P
->is only valid for replies.
+calls.
+</p></dd>
+<dt><span class="term"><code class="constant">result</code></span></dt>
+<dd><p>
+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.</P
-></DD
-><DT
-><CODE
-CLASS="CONSTANT"
->recvlength</CODE
-></DT
-><DD
-><P
->is the maximum buffer size that the receiver can handle on requests
+calls.
+</p></dd>
+<dt><span class="term"><code class="constant">recvlength</code></span></dt>
+<dd><p>
+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.</P
-></DD
-><DT
-><CODE
-CLASS="CONSTANT"
->authtype</CODE
-></DT
-><DD
-><P
->defines the packet level authentication that is used.
+This field is supplied by the application.
+</p></dd>
+<dt><span class="term"><code class="constant">authtype</code></span></dt>
+<dd><p>
+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.</P
-></DD
-><DT
-><CODE
-CLASS="CONSTANT"
->authlen</CODE
-></DT
-><DD
-><P
->gives the length of the authentication data.
-Since packet authentication is currently not used, this must be zero.</P
-></DD
-></DL
-></DIV
-></P
-><P
->The following opcodes are currently defined:
-<P
-></P
-><DIV
-CLASS="VARIABLELIST"
-><DL
-><DT
-><CODE
-CLASS="CONSTANT"
->NOOP</CODE
-></DT
-><DD
-><P
->Success is always returned and the packet contents are echoed.
-The lwres_noop_*() functions should be used for this type.</P
-></DD
-><DT
-><CODE
-CLASS="CONSTANT"
->GETADDRSBYNAME</CODE
-></DT
-><DD
-><P
->returns all known addresses for a given name.
-The lwres_gabn_*() functions should be used for this type.</P
-></DD
-><DT
-><CODE
-CLASS="CONSTANT"
->GETNAMEBYADDR</CODE
-></DT
-><DD
-><P
->return the hostname for the given address.
-The lwres_gnba_*() functions should be used for this type.</P
-></DD
-></DL
-></DIV
-></P
-><P
-><CODE
-CLASS="FUNCTION"
->lwres_lwpacket_renderheader()</CODE
-> transfers the
+Currently these are not used and must be zero.
+</p></dd>
+<dt><span class="term"><code class="constant">authlen</code></span></dt>
+<dd><p>
+gives the length of the authentication data.
+Since packet authentication is currently not used, this must be zero.
+</p></dd>
+</dl></div>
+<p>
+</p>
+<p>
+The following opcodes are currently defined:
+</p>
+<div class="variablelist"><dl>
+<dt><span class="term"><code class="constant">NOOP</code></span></dt>
+<dd><p>
+Success is always returned and the packet contents are echoed.
+The lwres_noop_*() functions should be used for this type.
+</p></dd>
+<dt><span class="term"><code class="constant">GETADDRSBYNAME</code></span></dt>
+<dd><p>
+returns all known addresses for a given name.
+The lwres_gabn_*() functions should be used for this type.
+</p></dd>
+<dt><span class="term"><code class="constant">GETNAMEBYADDR</code></span></dt>
+<dd><p>
+return the hostname for the given address.
+The lwres_gnba_*() functions should be used for this type.
+</p></dd>
+</dl></div>
+<p>
+</p>
+<p>
+<code class="function">lwres_lwpacket_renderheader()</code> transfers the
contents of lightweight resolver packet structure
-<SPAN
-CLASS="TYPE"
->lwres_lwpacket_t</SPAN
-> <VAR
-CLASS="PARAMETER"
->*pkt</VAR
-> in network
+<span class="type">lwres_lwpacket_t</span> <em class="parameter"><code>*pkt</code></em> in network
byte order to the lightweight resolver buffer,
-<VAR
-CLASS="PARAMETER"
->*b</VAR
->.</P
-><P
-><CODE
-CLASS="FUNCTION"
->lwres_lwpacket_parseheader()</CODE
-> performs the
+<em class="parameter"><code>*b</code></em>.
+</p>
+<p>
+<code class="function">lwres_lwpacket_parseheader()</code> performs the
converse operation. It transfers data in network byte order from
-buffer <VAR
-CLASS="PARAMETER"
->*b</VAR
-> to resolver packet
-<VAR
-CLASS="PARAMETER"
->*pkt</VAR
->. The contents of the buffer
-<VAR
-CLASS="PARAMETER"
->b</VAR
-> should correspond to a
-<SPAN
-CLASS="TYPE"
->lwres_lwpacket_t</SPAN
->.</P
-></DIV
-><DIV
-CLASS="REFSECT1"
-><A
-NAME="AEN107"
-></A
-><H2
->RETURN VALUES</H2
-><P
-> Successful calls to
-<CODE
-CLASS="FUNCTION"
->lwres_lwpacket_renderheader()</CODE
-> and
-<CODE
-CLASS="FUNCTION"
->lwres_lwpacket_parseheader()</CODE
-> return
-<SPAN
-CLASS="ERRORCODE"
->LWRES_R_SUCCESS</SPAN
->. If there is insufficient
-space to copy data between the buffer <VAR
-CLASS="PARAMETER"
->*b</VAR
-> and
-lightweight resolver packet <VAR
-CLASS="PARAMETER"
->*pkt</VAR
-> both functions
-return <SPAN
-CLASS="ERRORCODE"
->LWRES_R_UNEXPECTEDEND</SPAN
->.</P
-></DIV
-></BODY
-></HTML
->
+buffer <em class="parameter"><code>*b</code></em> to resolver packet
+<em class="parameter"><code>*pkt</code></em>. The contents of the buffer
+<em class="parameter"><code>b</code></em> should correspond to a
+<span class="type">lwres_lwpacket_t</span>.
+</p>
+</div>
+<div class="refsect1" lang="en">
+<a name="id2526068"></a><h2>RETURN VALUES</h2>
+<p> Successful calls to
+<code class="function">lwres_lwpacket_renderheader()</code> and
+<code class="function">lwres_lwpacket_parseheader()</code> return
+<span class="errorcode">LWRES_R_SUCCESS</span>. If there is insufficient
+space to copy data between the buffer <em class="parameter"><code>*b</code></em> and
+lightweight resolver packet <em class="parameter"><code>*pkt</code></em> both functions
+return <span class="errorcode">LWRES_R_UNEXPECTEDEND</span>.
+</p>
+</div>
+</div></body>
+</html>
diff --git a/contrib/bind9/lib/lwres/man/lwres_resutil.3 b/contrib/bind9/lib/lwres/man/lwres_resutil.3
index d73122d..5d4cfc0 100644
--- a/contrib/bind9/lib/lwres/man/lwres_resutil.3
+++ b/contrib/bind9/lib/lwres/man/lwres_resutil.3
@@ -1,68 +1,68 @@
-.\" Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
-.\" Copyright (C) 2000, 2001 Internet Software Consortium.
-.\"
+.\" Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
+.\" Copyright (C) 2000, 2001 Internet Software Consortium.
+.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
-.\"
+.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND 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,
+.\" 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.
.\"
-.\" $Id: lwres_resutil.3,v 1.14.2.1.8.1 2004/03/06 07:41:44 marka Exp $
+.\" $Id: lwres_resutil.3,v 1.14.2.1.8.5 2005/10/13 02:33:54 marka Exp $
.\"
-.TH "LWRES_RESUTIL" "3" "Jun 30, 2000" "BIND9" ""
-.SH NAME
+.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.
+.TH "LWRES_RESUTIL" "3" "Jun 30, 2000" "BIND9" "BIND9"
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.SH "NAME"
lwres_string_parse, lwres_addr_parse, lwres_getaddrsbyname, lwres_getnamebyaddr \- lightweight resolver utility functions
-.SH SYNOPSIS
-\fB#include <lwres/lwres.h>
-.sp
-.na
-lwres_result_t
-lwres_string_parse(lwres_buffer_t *b, char **c, lwres_uint16_t *len);
-.ad
-.sp
-.na
-lwres_result_t
-lwres_addr_parse(lwres_buffer_t *b, lwres_addr_t *addr);
-.ad
-.sp
-.na
-lwres_result_t
-lwres_getaddrsbyname(lwres_context_t *ctx, const char *name, lwres_uint32_t addrtypes, lwres_gabnresponse_t **structp);
-.ad
-.sp
-.na
-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);
-.ad
-\fR
+.SH "SYNOPSIS"
+.nf
+#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
+.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
+.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
+.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
.SH "DESCRIPTION"
.PP
-\fBlwres_string_parse()\fR retrieves a DNS-encoded
-string starting the current pointer of lightweight resolver buffer
-\fIb\fR: i.e. b->current.
-When the function returns, the address of the first byte of the
-encoded string is returned via \fI*c\fR and the
-length of that string is given by \fI*len\fR. The
-buffer's current pointer is advanced to point at the character
-following the string length, the encoded string, and the trailing
-\fBNULL\fR character.
+\fBlwres_string_parse()\fR
+retrieves a DNS\-encoded string starting the current pointer of lightweight resolver buffer
+\fIb\fR: i.e.
+\fBb\->current\fR. When the function returns, the address of the first byte of the encoded string is returned via
+\fI*c\fR
+and the length of that string is given by
+\fI*len\fR. The buffer's current pointer is advanced to point at the character following the string length, the encoded string, and the trailing
+\fBNULL\fR
+character.
.PP
-\fBlwres_addr_parse()\fR extracts an address from the
-buffer \fIb\fR. The buffer's current pointer
-b->current is presumed to point at an encoded
-address: the address preceded by a 32-bit protocol family identifier
-and a 16-bit length field. The encoded address is copied to
-addr->address and
-addr->length indicates the size in bytes of
-the address that was copied. b->current is
-advanced to point at the next byte of available data in the buffer
-following the encoded address.
+\fBlwres_addr_parse()\fR
+extracts an address from the buffer
+\fIb\fR. The buffer's current pointer
+\fBb\->current\fR
+is presumed to point at an encoded address: the address preceded by a 32\-bit protocol family identifier and a 16\-bit length field. The encoded address is copied to
+\fBaddr\->address\fR
+and
+\fBaddr\->length\fR
+indicates the size in bytes of the address that was copied.
+\fBb\->current\fR
+is advanced to point at the next byte of available data in the buffer following the encoded address.
.PP
\fBlwres_getaddrsbyname()\fR
and
@@ -84,31 +84,40 @@ typedef struct {
void *base;
size_t baselen;
} lwres_gabnresponse_t;
-.sp
.fi
-The contents of this structure are not manipulated directly but
-they are controlled through the
-\fBlwres_gabn\fR(3)
+.sp
+The contents of this structure are not manipulated directly but they are controlled through the
+\fBlwres_gabn\fR(3 )
functions.
.PP
The lightweight resolver uses
-\fBlwres_getaddrsbyname()\fR to perform foward lookups.
-Hostname \fIname\fR is looked up using the resolver
-context \fIctx\fR for memory allocation.
-\fIaddrtypes\fR is a bitmask indicating which type of
-addresses are to be looked up. Current values for this bitmask are
-\fBLWRES_ADDRTYPE_V4\fR for IPv4 addresses and
-\fBLWRES_ADDRTYPE_V6\fR for IPv6 addresses. Results of the
-lookup are returned in \fI*structp\fR.
+\fBlwres_getaddrsbyname()\fR
+to perform foward lookups. Hostname
+\fIname\fR
+is looked up using the resolver context
+\fIctx\fR
+for memory allocation.
+\fIaddrtypes\fR
+is a bitmask indicating which type of addresses are to be looked up. Current values for this bitmask are
+\fBLWRES_ADDRTYPE_V4\fR
+for IPv4 addresses and
+\fBLWRES_ADDRTYPE_V6\fR
+for IPv6 addresses. Results of the lookup are returned in
+\fI*structp\fR.
.PP
-\fBlwres_getnamebyaddr()\fR performs reverse lookups.
-Resolver context \fIctx\fR is used for memory
-allocation. The address type is indicated by
-\fIaddrtype\fR: \fBLWRES_ADDRTYPE_V4\fR or
-\fBLWRES_ADDRTYPE_V6\fR. The address to be looked up is given
-by \fIaddr\fR and its length is
-\fIaddrlen\fR bytes. The result of the function call
-is made available through \fI*structp\fR.
+\fBlwres_getnamebyaddr()\fR
+performs reverse lookups. Resolver context
+\fIctx\fR
+is used for memory allocation. The address type is indicated by
+\fIaddrtype\fR:
+\fBLWRES_ADDRTYPE_V4\fR
+or
+\fBLWRES_ADDRTYPE_V6\fR. The address to be looked up is given by
+\fIaddr\fR
+and its length is
+\fIaddrlen\fR
+bytes. The result of the function call is made available through
+\fI*structp\fR.
.SH "RETURN VALUES"
.PP
Successful calls to
@@ -116,24 +125,23 @@ Successful calls to
and
\fBlwres_addr_parse()\fR
return
-LWRES_R_SUCCESS.
+\fBLWRES_R_SUCCESS.\fR
Both functions return
-LWRES_R_FAILURE
+\fBLWRES_R_FAILURE\fR
if the buffer is corrupt or
-LWRES_R_UNEXPECTEDEND
-if the buffer has less space than expected for the components of the
-encoded string or address.
+\fBLWRES_R_UNEXPECTEDEND\fR
+if the buffer has less space than expected for the components of the encoded string or address.
.PP
\fBlwres_getaddrsbyname()\fR
returns
-LWRES_R_SUCCESS
+\fBLWRES_R_SUCCESS\fR
on success and it returns
-LWRES_R_NOTFOUND
+\fBLWRES_R_NOTFOUND\fR
if the hostname
\fIname\fR
could not be found.
.PP
-LWRES_R_SUCCESS
+\fBLWRES_R_SUCCESS\fR
is returned by a successful call to
\fBlwres_getnamebyaddr()\fR.
.PP
@@ -142,11 +150,10 @@ Both
and
\fBlwres_getnamebyaddr()\fR
return
-LWRES_R_NOMEMORY
+\fBLWRES_R_NOMEMORY\fR
when memory allocation requests fail and
-LWRES_R_UNEXPECTEDEND
-if the buffers used for sending queries and receiving replies are too
-small.
+\fBLWRES_R_UNEXPECTEDEND\fR
+if the buffers used for sending queries and receiving replies are too small.
.SH "SEE ALSO"
.PP
\fBlwres_buffer\fR(3),
diff --git a/contrib/bind9/lib/lwres/man/lwres_resutil.docbook b/contrib/bind9/lib/lwres/man/lwres_resutil.docbook
index e5f891f..7ab2146 100644
--- a/contrib/bind9/lib/lwres/man/lwres_resutil.docbook
+++ b/contrib/bind9/lib/lwres/man/lwres_resutil.docbook
@@ -1,7 +1,9 @@
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.0//EN"
+ "http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd"
+ [<!ENTITY mdash "&#8212;">]>
<!--
- - Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
- - Copyright (C) 2001 Internet Software Consortium.
+ - Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
+ - Copyright (C) 2000, 2001 Internet Software Consortium.
-
- Permission to use, copy, modify, and distribute this software for any
- purpose with or without fee is hereby granted, provided that the above
@@ -16,7 +18,7 @@
- PERFORMANCE OF THIS SOFTWARE.
-->
-<!-- $Id: lwres_resutil.docbook,v 1.5.206.1 2004/03/06 08:15:42 marka Exp $ -->
+<!-- $Id: lwres_resutil.docbook,v 1.5.206.3 2005/05/12 21:36:16 sra Exp $ -->
<refentry>
@@ -30,6 +32,19 @@
<refmiscinfo>BIND9</refmiscinfo>
</refmeta>
+ <docinfo>
+ <copyright>
+ <year>2004</year>
+ <year>2005</year>
+ <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
+ </copyright>
+ <copyright>
+ <year>2000</year>
+ <year>2001</year>
+ <holder>Internet Software Consortium.</holder>
+ </copyright>
+ </docinfo>
+
<refnamediv>
<refname>lwres_string_parse</refname>
<refname>lwres_addr_parse</refname>
diff --git a/contrib/bind9/lib/lwres/man/lwres_resutil.html b/contrib/bind9/lib/lwres/man/lwres_resutil.html
index cc45556..4cee0c7 100644
--- a/contrib/bind9/lib/lwres/man/lwres_resutil.html
+++ b/contrib/bind9/lib/lwres/man/lwres_resutil.html
@@ -1,186 +1,163 @@
<!--
- - Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
- - Copyright (C) 2001 Internet Software Consortium.
- -
+ - Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
+ - Copyright (C) 2000, 2001 Internet Software Consortium.
+ -
- Permission to use, copy, modify, and distribute this software for any
- purpose with or without fee is hereby granted, provided that the above
- copyright notice and this permission notice appear in all copies.
- -
+ -
- THE SOFTWARE IS PROVIDED "AS IS" AND 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,
+ - 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.
-->
-
-<!-- $Id: lwres_resutil.html,v 1.8.2.1.4.2 2004/08/22 23:39:05 marka Exp $ -->
-
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<HTML
-><HEAD
-><TITLE
->lwres_resutil</TITLE
-><META
-NAME="GENERATOR"
-CONTENT="Modular DocBook HTML Stylesheet Version 1.7"></HEAD
-><BODY
-CLASS="REFENTRY"
-BGCOLOR="#FFFFFF"
-TEXT="#000000"
-LINK="#0000FF"
-VLINK="#840084"
-ALINK="#0000FF"
-><H1
-><A
-NAME="AEN1"
-></A
->lwres_resutil</H1
-><DIV
-CLASS="REFNAMEDIV"
-><A
-NAME="AEN8"
-></A
-><H2
->Name</H2
->lwres_string_parse, lwres_addr_parse, lwres_getaddrsbyname, lwres_getnamebyaddr&nbsp;--&nbsp;lightweight resolver utility functions</DIV
-><DIV
-CLASS="REFSYNOPSISDIV"
-><A
-NAME="AEN14"
-></A
-><H2
->Synopsis</H2
-><DIV
-CLASS="FUNCSYNOPSIS"
-><P
-></P
-><A
-NAME="AEN15"
-></A
-><PRE
-CLASS="FUNCSYNOPSISINFO"
->#include &lt;lwres/lwres.h&gt;</PRE
-><P
-><CODE
-><CODE
-CLASS="FUNCDEF"
->lwres_result_t
-lwres_string_parse</CODE
->(lwres_buffer_t *b, char **c, lwres_uint16_t *len);</CODE
-></P
-><P
-><CODE
-><CODE
-CLASS="FUNCDEF"
->lwres_result_t
-lwres_addr_parse</CODE
->(lwres_buffer_t *b, lwres_addr_t *addr);</CODE
-></P
-><P
-><CODE
-><CODE
-CLASS="FUNCDEF"
->lwres_result_t
-lwres_getaddrsbyname</CODE
->(lwres_context_t *ctx, const char *name, lwres_uint32_t addrtypes, lwres_gabnresponse_t **structp);</CODE
-></P
-><P
-><CODE
-><CODE
-CLASS="FUNCDEF"
->lwres_result_t
-lwres_getnamebyaddr</CODE
->(lwres_context_t *ctx, lwres_uint32_t addrtype, lwres_uint16_t addrlen, const unsigned char *addr, lwres_gnbaresponse_t **structp);</CODE
-></P
-><P
-></P
-></DIV
-></DIV
-><DIV
-CLASS="REFSECT1"
-><A
-NAME="AEN43"
-></A
-><H2
->DESCRIPTION</H2
-><P
-><CODE
-CLASS="FUNCTION"
->lwres_string_parse()</CODE
-> retrieves a DNS-encoded
+<!-- $Id: lwres_resutil.html,v 1.8.2.1.4.9 2005/10/13 02:33:58 marka Exp $ -->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>lwres_resutil</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en">
+<a name="id2463721"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2>Name</h2>
+<p>lwres_string_parse, lwres_addr_parse, lwres_getaddrsbyname, lwres_getnamebyaddr &#8212; lightweight resolver utility functions</p>
+</div>
+<div class="refsynopsisdiv">
+<h2>Synopsis</h2>
+<div class="funcsynopsis">
+<pre class="funcsynopsisinfo">#include &lt;lwres/lwres.h&gt;</pre>
+<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em">
+<tr>
+<td><code class="funcdef">
+lwres_result_t
+<b class="fsfunc">lwres_string_parse</b>(</code></td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>
+<code>)</code>;</td>
+</tr>
+</table>
+<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em">
+<tr>
+<td><code class="funcdef">
+lwres_result_t
+<b class="fsfunc">lwres_addr_parse</b>(</code></td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>
+<code>)</code>;</td>
+</tr>
+</table>
+<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em">
+<tr>
+<td><code class="funcdef">
+lwres_result_t
+<b class="fsfunc">lwres_getaddrsbyname</b>(</code></td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>
+<code>)</code>;</td>
+</tr>
+</table>
+<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0">
+<tr>
+<td><code class="funcdef">
+lwres_result_t
+<b class="fsfunc">lwres_getnamebyaddr</b>(</code></td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>, </td>
+</tr>
+<tr>
+<td> </td>
+<td> </td>
+<td>
+<code>)</code>;</td>
+</tr>
+</table>
+</div>
+</div>
+<div class="refsect1" lang="en">
+<a name="id2525921"></a><h2>DESCRIPTION</h2>
+<p>
+<code class="function">lwres_string_parse()</code> retrieves a DNS-encoded
string starting the current pointer of lightweight resolver buffer
-<VAR
-CLASS="PARAMETER"
->b</VAR
->: i.e. <CODE
-CLASS="CONSTANT"
->b-&gt;current</CODE
->.
+<em class="parameter"><code>b</code></em>: i.e. <code class="constant">b-&gt;current</code>.
When the function returns, the address of the first byte of the
-encoded string is returned via <VAR
-CLASS="PARAMETER"
->*c</VAR
-> and the
-length of that string is given by <VAR
-CLASS="PARAMETER"
->*len</VAR
->. The
+encoded string is returned via <em class="parameter"><code>*c</code></em> and the
+length of that string is given by <em class="parameter"><code>*len</code></em>. The
buffer's current pointer is advanced to point at the character
following the string length, the encoded string, and the trailing
-<SPAN
-CLASS="TYPE"
->NULL</SPAN
-> character.</P
-><P
-><CODE
-CLASS="FUNCTION"
->lwres_addr_parse()</CODE
-> extracts an address from the
-buffer <VAR
-CLASS="PARAMETER"
->b</VAR
->. The buffer's current pointer
-<CODE
-CLASS="CONSTANT"
->b-&gt;current</CODE
-> is presumed to point at an encoded
+<span class="type">NULL</span> character.
+</p>
+<p>
+<code class="function">lwres_addr_parse()</code> extracts an address from the
+buffer <em class="parameter"><code>b</code></em>. The buffer's current pointer
+<code class="constant">b-&gt;current</code> is presumed to point at an encoded
address: the address preceded by a 32-bit protocol family identifier
and a 16-bit length field. The encoded address is copied to
-<CODE
-CLASS="CONSTANT"
->addr-&gt;address</CODE
-> and
-<CODE
-CLASS="CONSTANT"
->addr-&gt;length</CODE
-> indicates the size in bytes of
-the address that was copied. <CODE
-CLASS="CONSTANT"
->b-&gt;current</CODE
-> is
+<code class="constant">addr-&gt;address</code> and
+<code class="constant">addr-&gt;length</code> indicates the size in bytes of
+the address that was copied. <code class="constant">b-&gt;current</code> is
advanced to point at the next byte of available data in the buffer
-following the encoded address.</P
-><P
-><CODE
-CLASS="FUNCTION"
->lwres_getaddrsbyname()</CODE
->
+following the encoded address.
+</p>
+<p>
+<code class="function">lwres_getaddrsbyname()</code>
and
-<CODE
-CLASS="FUNCTION"
->lwres_getnamebyaddr()</CODE
->
+<code class="function">lwres_getnamebyaddr()</code>
use the
-<SPAN
-CLASS="TYPE"
->lwres_gnbaresponse_t</SPAN
->
+<span class="type">lwres_gnbaresponse_t</span>
structure defined below:
-<PRE
-CLASS="PROGRAMLISTING"
->typedef struct {
+</p>
+<pre class="programlisting">
+typedef struct {
lwres_uint32_t flags;
lwres_uint16_t naliases;
lwres_uint16_t naddrs;
@@ -191,197 +168,88 @@ CLASS="PROGRAMLISTING"
lwres_addrlist_t addrs;
void *base;
size_t baselen;
-} lwres_gabnresponse_t;</PRE
->
+} lwres_gabnresponse_t;
+</pre>
+<p>
The contents of this structure are not manipulated directly but
they are controlled through the
-<SPAN
-CLASS="CITEREFENTRY"
-><SPAN
-CLASS="REFENTRYTITLE"
->lwres_gabn</SPAN
->(3)</SPAN
->
-functions.</P
-><P
->The lightweight resolver uses
-<CODE
-CLASS="FUNCTION"
->lwres_getaddrsbyname()</CODE
-> to perform foward lookups.
-Hostname <VAR
-CLASS="PARAMETER"
->name</VAR
-> is looked up using the resolver
-context <VAR
-CLASS="PARAMETER"
->ctx</VAR
-> for memory allocation.
-<VAR
-CLASS="PARAMETER"
->addrtypes</VAR
-> is a bitmask indicating which type of
+<span class="citerefentry"><span class="refentrytitle">lwres_gabn</span>(3
+)</span>
+functions.
+</p>
+<p>
+The lightweight resolver uses
+<code class="function">lwres_getaddrsbyname()</code> to perform foward lookups.
+Hostname <em class="parameter"><code>name</code></em> is looked up using the resolver
+context <em class="parameter"><code>ctx</code></em> for memory allocation.
+<em class="parameter"><code>addrtypes</code></em> is a bitmask indicating which type of
addresses are to be looked up. Current values for this bitmask are
-<SPAN
-CLASS="TYPE"
->LWRES_ADDRTYPE_V4</SPAN
-> for IPv4 addresses and
-<SPAN
-CLASS="TYPE"
->LWRES_ADDRTYPE_V6</SPAN
-> for IPv6 addresses. Results of the
-lookup are returned in <VAR
-CLASS="PARAMETER"
->*structp</VAR
->.</P
-><P
-><CODE
-CLASS="FUNCTION"
->lwres_getnamebyaddr()</CODE
-> performs reverse lookups.
-Resolver context <VAR
-CLASS="PARAMETER"
->ctx</VAR
-> is used for memory
+<span class="type">LWRES_ADDRTYPE_V4</span> for IPv4 addresses and
+<span class="type">LWRES_ADDRTYPE_V6</span> for IPv6 addresses. Results of the
+lookup are returned in <em class="parameter"><code>*structp</code></em>.
+</p>
+<p>
+<code class="function">lwres_getnamebyaddr()</code> performs reverse lookups.
+Resolver context <em class="parameter"><code>ctx</code></em> is used for memory
allocation. The address type is indicated by
-<VAR
-CLASS="PARAMETER"
->addrtype</VAR
->: <SPAN
-CLASS="TYPE"
->LWRES_ADDRTYPE_V4</SPAN
-> or
-<SPAN
-CLASS="TYPE"
->LWRES_ADDRTYPE_V6</SPAN
->. The address to be looked up is given
-by <VAR
-CLASS="PARAMETER"
->addr</VAR
-> and its length is
-<VAR
-CLASS="PARAMETER"
->addrlen</VAR
-> bytes. The result of the function call
-is made available through <VAR
-CLASS="PARAMETER"
->*structp</VAR
->.</P
-></DIV
-><DIV
-CLASS="REFSECT1"
-><A
-NAME="AEN84"
-></A
-><H2
->RETURN VALUES</H2
-><P
->Successful calls to
-<CODE
-CLASS="FUNCTION"
->lwres_string_parse()</CODE
->
+<em class="parameter"><code>addrtype</code></em>: <span class="type">LWRES_ADDRTYPE_V4</span> or
+<span class="type">LWRES_ADDRTYPE_V6</span>. The address to be looked up is given
+by <em class="parameter"><code>addr</code></em> and its length is
+<em class="parameter"><code>addrlen</code></em> bytes. The result of the function call
+is made available through <em class="parameter"><code>*structp</code></em>.
+</p>
+</div>
+<div class="refsect1" lang="en">
+<a name="id2526060"></a><h2>RETURN VALUES</h2>
+<p>
+Successful calls to
+<code class="function">lwres_string_parse()</code>
and
-<CODE
-CLASS="FUNCTION"
->lwres_addr_parse()</CODE
->
+<code class="function">lwres_addr_parse()</code>
return
-<SPAN
-CLASS="ERRORCODE"
->LWRES_R_SUCCESS.</SPAN
->
+<span class="errorcode">LWRES_R_SUCCESS.</span>
Both functions return
-<SPAN
-CLASS="ERRORCODE"
->LWRES_R_FAILURE</SPAN
->
+<span class="errorcode">LWRES_R_FAILURE</span>
if the buffer is corrupt or
-<SPAN
-CLASS="ERRORCODE"
->LWRES_R_UNEXPECTEDEND</SPAN
->
+<span class="errorcode">LWRES_R_UNEXPECTEDEND</span>
if the buffer has less space than expected for the components of the
-encoded string or address.</P
-><P
-><CODE
-CLASS="FUNCTION"
->lwres_getaddrsbyname()</CODE
->
+encoded string or address.
+</p>
+<p>
+<code class="function">lwres_getaddrsbyname()</code>
returns
-<SPAN
-CLASS="ERRORCODE"
->LWRES_R_SUCCESS</SPAN
->
+<span class="errorcode">LWRES_R_SUCCESS</span>
on success and it returns
-<SPAN
-CLASS="ERRORCODE"
->LWRES_R_NOTFOUND</SPAN
->
+<span class="errorcode">LWRES_R_NOTFOUND</span>
if the hostname
-<VAR
-CLASS="PARAMETER"
->name</VAR
->
-could not be found.</P
-><P
-><SPAN
-CLASS="ERRORCODE"
->LWRES_R_SUCCESS</SPAN
->
+<em class="parameter"><code>name</code></em>
+could not be found.
+</p>
+<p>
+<span class="errorcode">LWRES_R_SUCCESS</span>
is returned by a successful call to
-<CODE
-CLASS="FUNCTION"
->lwres_getnamebyaddr()</CODE
->.</P
-><P
->Both
-<CODE
-CLASS="FUNCTION"
->lwres_getaddrsbyname()</CODE
->
+<code class="function">lwres_getnamebyaddr()</code>.
+</p>
+<p>
+Both
+<code class="function">lwres_getaddrsbyname()</code>
and
-<CODE
-CLASS="FUNCTION"
->lwres_getnamebyaddr()</CODE
->
+<code class="function">lwres_getnamebyaddr()</code>
return
-<SPAN
-CLASS="ERRORCODE"
->LWRES_R_NOMEMORY</SPAN
->
+<span class="errorcode">LWRES_R_NOMEMORY</span>
when memory allocation requests fail and
-<SPAN
-CLASS="ERRORCODE"
->LWRES_R_UNEXPECTEDEND</SPAN
->
+<span class="errorcode">LWRES_R_UNEXPECTEDEND</span>
if the buffers used for sending queries and receiving replies are too
-small.</P
-></DIV
-><DIV
-CLASS="REFSECT1"
-><A
-NAME="AEN105"
-></A
-><H2
->SEE ALSO</H2
-><P
-><SPAN
-CLASS="CITEREFENTRY"
-><SPAN
-CLASS="REFENTRYTITLE"
->lwres_buffer</SPAN
->(3)</SPAN
->,
+small.
+</p>
+</div>
+<div class="refsect1" lang="en">
+<a name="id2526130"></a><h2>SEE ALSO</h2>
+<p>
+<span class="citerefentry"><span class="refentrytitle">lwres_buffer</span>(3)</span>,
-<SPAN
-CLASS="CITEREFENTRY"
-><SPAN
-CLASS="REFENTRYTITLE"
->lwres_gabn</SPAN
->(3)</SPAN
->.</P
-></DIV
-></BODY
-></HTML
->
+<span class="citerefentry"><span class="refentrytitle">lwres_gabn</span>(3)</span>.
+</p>
+</div>
+</div></body>
+</html>
diff --git a/contrib/bind9/lib/lwres/print.c b/contrib/bind9/lib/lwres/print.c
index e8dd37a..1552228 100644
--- a/contrib/bind9/lib/lwres/print.c
+++ b/contrib/bind9/lib/lwres/print.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 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.
*/
-/* $Id: print.c,v 1.2.4.3 2004/09/16 07:01:13 marka Exp $ */
+/* $Id: print.c,v 1.2.4.7 2005/10/14 01:38:51 marka Exp $ */
#include <config.h>
@@ -25,11 +25,13 @@
#define LWRES__PRINT_SOURCE /* Used to get the lwres_print_* prototypes. */
-#include <stdlib.h>
+#include <lwres/stdlib.h>
#include "assert_p.h"
#include "print_p.h"
+#define LWRES_PRINT_QUADFORMAT LWRES_PLATFORM_QUADFORMAT
+
int
lwres__print_sprintf(char *str, const char *format, ...) {
va_list ap;
@@ -70,7 +72,6 @@ lwres__print_vsnprintf(char *str, size_t size, const char *format, va_list ap) {
int left;
int plus;
int space;
- int neg;
long long tmpi;
unsigned long long tmpui;
unsigned long width;
@@ -110,7 +111,7 @@ lwres__print_vsnprintf(char *str, size_t size, const char *format, va_list ap) {
/*
* Reset flags.
*/
- dot = neg = space = plus = left = zero = alt = h = l = q = 0;
+ dot = space = plus = left = zero = alt = h = l = q = 0;
width = precision = 0;
head = "";
length = pad = zeropad = 0;
@@ -242,7 +243,7 @@ lwres__print_vsnprintf(char *str, size_t size, const char *format, va_list ap) {
head = "";
tmpui = tmpi;
}
- sprintf(buf, "%llu",
+ sprintf(buf, "%" LWRES_PRINT_QUADFORMAT "u",
tmpui);
goto printint;
case 'o':
@@ -254,7 +255,9 @@ lwres__print_vsnprintf(char *str, size_t size, const char *format, va_list ap) {
else
tmpui = va_arg(ap, int);
sprintf(buf,
- alt ? "%#llo" : "%llo", tmpui);
+ alt ? "%#" LWRES_PRINT_QUADFORMAT "o"
+ : "%" LWRES_PRINT_QUADFORMAT "o",
+ tmpui);
goto printint;
case 'u':
if (q)
@@ -264,7 +267,8 @@ lwres__print_vsnprintf(char *str, size_t size, const char *format, va_list ap) {
tmpui = va_arg(ap, unsigned long int);
else
tmpui = va_arg(ap, unsigned int);
- sprintf(buf, "%llu", tmpui);
+ sprintf(buf, "%" LWRES_PRINT_QUADFORMAT "u",
+ tmpui);
goto printint;
case 'x':
if (q)
@@ -279,7 +283,8 @@ lwres__print_vsnprintf(char *str, size_t size, const char *format, va_list ap) {
if (precision > 2U)
precision -= 2;
}
- sprintf(buf, "%llx", tmpui);
+ sprintf(buf, "%" LWRES_PRINT_QUADFORMAT "x",
+ tmpui);
goto printint;
case 'X':
if (q)
@@ -294,7 +299,8 @@ lwres__print_vsnprintf(char *str, size_t size, const char *format, va_list ap) {
if (precision > 2U)
precision -= 2;
}
- sprintf(buf, "%llX", tmpui);
+ sprintf(buf, "%" LWRES_PRINT_QUADFORMAT "X",
+ tmpui);
goto printint;
printint:
if (precision != 0U || width != 0U) {
diff --git a/contrib/bind9/lib/lwres/strtoul.c b/contrib/bind9/lib/lwres/strtoul.c
new file mode 100644
index 0000000..9cda194
--- /dev/null
+++ b/contrib/bind9/lib/lwres/strtoul.c
@@ -0,0 +1,135 @@
+/*
+ * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2003 Internet Software Consortium.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND 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.
+ */
+
+/*
+ * Copyright (c) 1990, 1993
+ * The Regents of the University of California. 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 acknowledgement:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS 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 REGENTS OR 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.
+ */
+
+/*! \file */
+#if defined(LIBC_SCCS) && !defined(lint)
+static char sccsid[] = "@(#)strtoul.c 8.1 (Berkeley) 6/4/93";
+#endif /* LIBC_SCCS and not lint */
+
+/* $Id: strtoul.c,v 1.2.4.1 2005/06/08 02:08:31 marka Exp $ */
+
+#include <config.h>
+
+#include <limits.h>
+#include <ctype.h>
+#include <errno.h>
+
+#include <lwres/stdlib.h>
+
+#define DE_CONST(konst, var) \
+ do { \
+ union { const void *k; void *v; } _u; \
+ _u.k = konst; \
+ var = _u.v; \
+ } while (0)
+
+/*!
+ * Convert a string to an unsigned long integer.
+ *
+ * Ignores `locale' stuff. Assumes that the upper and lower case
+ * alphabets and digits are each contiguous.
+ */
+unsigned long
+lwres_strtoul(const char *nptr, char **endptr, int base) {
+ const char *s = nptr;
+ unsigned long acc;
+ unsigned char c;
+ unsigned long cutoff;
+ int neg = 0, any, cutlim;
+
+ /*
+ * See strtol for comments as to the logic used.
+ */
+ do {
+ c = *s++;
+ } while (isspace(c));
+ if (c == '-') {
+ neg = 1;
+ c = *s++;
+ } else if (c == '+')
+ c = *s++;
+ if ((base == 0 || base == 16) &&
+ c == '0' && (*s == 'x' || *s == 'X')) {
+ c = s[1];
+ s += 2;
+ base = 16;
+ }
+ if (base == 0)
+ base = c == '0' ? 8 : 10;
+ cutoff = (unsigned long)ULONG_MAX / (unsigned long)base;
+ cutlim = (unsigned long)ULONG_MAX % (unsigned long)base;
+ for (acc = 0, any = 0;; c = *s++) {
+ if (!isascii(c))
+ break;
+ if (isdigit(c))
+ c -= '0';
+ else if (isalpha(c))
+ c -= isupper(c) ? 'A' - 10 : 'a' - 10;
+ else
+ break;
+ if (c >= base)
+ break;
+ if (any < 0 || acc > cutoff || (acc == cutoff && c > cutlim))
+ any = -1;
+ else {
+ any = 1;
+ acc *= base;
+ acc += c;
+ }
+ }
+ if (any < 0) {
+ acc = ULONG_MAX;
+ errno = ERANGE;
+ } else if (neg)
+ acc = -acc;
+ if (endptr != 0)
+ DE_CONST(any ? s - 1 : nptr, *endptr);
+ return (acc);
+}
OpenPOWER on IntegriCloud