The netresolv suite provides functions and documentation for communicating
with domain name servers, retrieving network host entries from
/etc/hosts or via DNS, converting CIDR network addresses, performing
Hesiod information lookups, retrieving network entries from
/etc/networks, implementing TSIG transaction/request security of
DNS messages, performing name-to-address and address-to-name
translations, and utilizing /etc/resolv.conf for resolver configuration.
Historically, much of the code is derived from the CSRG BSD distributions, such
as the old BSD gethostbyname() standard API. It was previously also maintained by ISC and distributed with BIND
and libbind. The handoff of the maintainership from ISC to NetBSD
happened in July 2013. The libbind-6.0 version from March 2009 is
available via ISC at <http://ftp.isc.org/isc/libbind/6.0/>.
Bug fixes and development discussion for this code can be discussed on the tech-userlevel mailing list.
Patches of NetBSD (June 2013 head) against libbind-6.0 are available at:
will be removed, and src/external/bsd/netresolv will be created,
ISC's latest version (from ISC's CVS) imported on a vendor branch,
and then NetBSD's changes merged.
libbind provides portability headers: port_before.h and port_after.h
port directory provides portability headers for many operating systems
make directory provides common Makefile rules and mkdep
bsd directory contains compatibility code, such as:
daemon(), \_\_ftruncate(), isc\_\_gettimeofday(), gettimeofday(),
mkstemp(), mktemp(), gettemp(), putenv(), \_\_readv(), setenv(),
unsetenv(), findenv(), \_\_setitimer(), strcasecmp(), strncasecmp(),
strdup(), isc_strerror(), strpbrk(), strsep(), strtoul(), \_\_utimes(),
dst directory contains the Digital Signature Toolkit
code for the DST API and crypto API.
The dst code is not included in NetBSD's src. Probably the code in src/lib/libc using it actually is
NetBSD adds \_inet_aton.c and \_inet_pton.c
libbind has (and NetBSD does not have) inet_data in inet.
irs is the Information Retrieval System; it provides
getaddrinfo, gethostbyname, and related.
NetBSD doesn't include irs directory as is. But is comparable
to some of what we have in src/lib/libc/net/
NetBSD doesn't have
dns.c top-level accessor function for the dns,
dns_gr.c for hesiod,
isc directory provides many portability functions
primarily used for ISC software.
NetBSD only ships with:
nameser provides the name resolver routines to parse DNS responses
libbind has (and NetBSD does not have) in nameser:
ns_date.c which provides ns_datetosecs(), isleap(), and datepart();
ns_newmsg.c for building DNS message packets;
ns_rdata.c for unpacking or comparing rdata; and
ns_sign.c and for ns_verify.c for tsig.
NetBSD adds \_\_dn_comp.c, \_\_res_close.c, \_\_res_send.c,
h_errno.c, res_compat.c, and res_state.c.
libbind has (and NetBSD does not have) in resolv
(even though NetBSD manual documents them):
tests directory contains dig tool from bind8
CVSweb for NetBSD wikisrc <wikimaster@NetBSD.org> software: FreeBSD-CVSweb