Class DNSLookup


public class DNSLookup
extends java.lang.Object

Implements a DNS client. Usage: DNSLookup -r -p protocol -l localhost DNSServer domain. -r (optional) indicates whether recursion is desired, i.e. whether a query that cannot be resolved by the named server should be passed on to another server.

-p protocol (optional) defines the socket protocol to be used. By default, the JDK UDP implementation will be used. The alternatives are UDP or RawUDP.

-l localhost (optional) should be specified if the protocol has been set to RawUDP. The information will be used to construct the IP header.

DNSServer is the IP address of the DNS server.

domain is the domain name to be resolved.

Constructor Summary
Method Summary
static void main(java.lang.String[] args)
          Sends a DNS query to a DNS server.
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public DNSLookup()
Method Detail


public static void main(java.lang.String[] args)
Sends a DNS query to a DNS server.