Skip to content

xml4cn/dnsjava

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

481 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dnsjava v1.1

http://www.xbill.org/dnsjava

Author:

Brian Wellington ([email protected])
September 20, 1999

Overview:

dnsjava is an implementation of DNS in Java.  It supports all of the common
record types and the DNSSEC types.  It can be used for queries, zone transfers,
and dynamic updates.  It includes a cache which can be used by clients, and a
minimal implementation of a server.  It supports TSIG authenticated messages ,
partial DNSSEC verification, and EDNS0.

dnsjava provides functionality above and beyond that of the InetAddress class.
Since it is written in pure Java, dnsjava is fully threadable.

dnsjava was started as an excuse to learn Java.  It was useful for testing new
features in BIND without rewriting the C resolver.  It was then cleaned up and
extended in order to be used as a testing framework for DNS interoperability
testing.  The high level API and caching resolver were added to make it useful
to a wider audience.


Getting started:

Run 'make' from the toplevel directory to build dnsjava.  JDK 1.1 or higher is
required.  If using JDK 1.1, ignore the deprecation warning.

To compile dnssec support (org.xbill.DNS.security), JDK 1.2 or higher and the
Java Cryptography Extensions are required.  Run 'make dnssec' to compile this
package.  This does not include TSIG support, which does not require 1.2.

Limitations:

There's no way to determine what the local nameserver is at runtime from within
the JVM.  First, the property 'dns.server' (a comma delimited list) is
checked.  These can either be IP addresses or hostnames (which are resolved
using Java's built in DNS support).  If the underlying OS is unix-based, the
dnsjava package can parse /etc/resolv.conf and determine the nameservers.  If
the underlying OS is Windows, winipcfg/ipconfig can be called and the output
parsed.  Otherwise, or if these attempts fail, the default nameserver is
"localhost".  This is very bad.  Unfortunately, I have no idea how to determine
the nameserver under MacOS or any other OSes.  Contributions of code are
welcome (see org/xbill/DNS/FindServer.java for the basic structure).

One some machines, InetAddress.getLocalHost() returns 127.0.0.1.  This is
usually caused by a bug in the JVM, and often happens when the machine has
a dynamic address and its hostname is not in DNS.  If the @me@ variable
is present in the textual form of an A record and InetAddress.getLocalHost()
doesn't work, dnsjava will print an error and die.  I don't know of a way to
fix this without using JNI.

Not all of the record types are supported.  Most unsupported types are
deprecated or rarely used.  Adding support for a new type is not difficult,
and requires no changes to any existing files.  If you want to see a new type
supported, send a patch or just ask.


Additional documentation:

Javadoc (1.2) documentation is provided in the doc/ subdirectory.


License:

dnsjava is placed under the GNU Library General Public License (LGPL).  However,
usage under additional licenses may be granted by the author.

About

Mirror of the dnsjava.org SVN repo from sf.net

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • Java 99.7%
  • Other 0.3%