|File Search||Catalog||Content Search|
The dns library provides several easy-to-use DNS lookup routines: dns_ip4, dns_ip4_qualify, dns_name4, dns_mx, and dns_txt.
dns_ip4_qualify supports the traditional configuration mechanisms for hostname rewriting: $LOCALDOMAIN, /etc/resolv.conf, and gethostname. It also supports a powerful new user-controlled rewriting mechanism.
The functions that read /etc/resolv.conf automatically reread it every ten minutes, so system administrators don't have to kill long-running programs.
The dns_domain_* and dns_packet_* functions make it easy to safely parse DNS packets. The dns_transmit_* functions send DNS queries of arbitrary types to arbitrary servers. These are the functions used in the dnscache program.
See http://cr.yp.to/djbdns/blurb/library.html for details.
This package contains the header files and the static library.
libdjbdns for Debian -------------------- All *.c and *.h files for libdjbdns are taken from the djbdns-1.05 tarball, remain unchanged, and are in the public domain: alloc.c alloc.h alloc_re.c byte.h byte_chr.c byte_copy.c byte_diff.c byte_zero.c case.h case_diffb.c dns.h dns_dfd.c dns_domain.c dns_dtda.c dns_ip.c dns_ipq.c dns_mx.c dns_name.c dns_nd.c dns_packet.c dns_random.c dns_rcip.c dns_rc more»
look-up-ip and look-up-name are simple examples on how to use the dns_ip4() and dns_name4() functions from the libdjbdns. For more and more detailed examples, look at the source files of the command-line tools to look up DNS information and debug DNS configuration and of the dnscache program in the upstream djbdns tarball. -- Gerrit Pape <email@example.com>, Fri, 6 Dec 2002 12:07:17 +0100
dns_domain_*(3) dns_domain_*(3) NAME dns_domain_* - The dns_domain library interface SYNOPSIS #include <dns.h> len = dns_domain_length(dn); char *dn; unsigned int len; dns_domain_equal(dn, dn2); char *dn; char *dn2; dns_domain_copy(&dn, in); char *dn = 0; char *in; more»
dns_ip4(3) dns_ip4(3) NAME dns_ip4 - Host n more»
dns_ip4_qualify(3) dns_ip4_qualify(3) NAME dns_ip4_qualify more»
dns_mx(3) dns_mx(3) NAME dns_mx - MX reco more»
dns_name4(3) dns_name4(3) NAME dns_name4 - IP a more»
dns_packet_*(3) dns_packet_*(3) NAME dns_packet_* - T more»