Package filius.software.dns
Class Resolver
java.lang.Object
java.lang.Thread
filius.software.Anwendung
filius.software.clientserver.ClientAnwendung
filius.software.dns.Resolver
- All Implemented Interfaces:
Runnable
Ausschnitt aus dem RFC 1035:
Question section format
The question section is used to carry the "question" in most queries, i.e., the parameters that define what is being asked. The section contains QDCOUNT (usually 1) entries, each of the following format: ...
The answer, authority, and additional sections all share the same format: a variable number of resource records, where the number of records is specified in the corresponding count field in the header. Each resource record has the following format: ...
Question section format
The question section is used to carry the "question" in most queries, i.e., the parameters that define what is being asked. The section contains QDCOUNT (usually 1) entries, each of the following format: ...
- QNAME a domain name represented as a sequence of labels, where each label consists of a length octet followed by that number of octets. The domain name terminates with the zero length octet for the null label of the root. Note that this field may be an odd number of octets; no padding is used.
- QTYPE a two octet code which specifies the type of the query. The values for this field include all codes valid for a TYPE field, together with some more general codes which can match more than one type of RR.
- QCLASS a two octet code that specifies the class of the query. For example, the QCLASS field is IN for the Internet.
The answer, authority, and additional sections all share the same format: a variable number of resource records, where the number of records is specified in the corresponding count field in the header. Each resource record has the following format: ...
- NAME a domain name to which this resource record pertains.
- TYPE two octets containing one of the RR type codes. This field specifies the meaning of the data in the RDATA field.
- CLASS two octets which specify the class of the data in the RDATA field.
- TTL a 32 bit unsigned integer that specifies the time interval (in seconds) that the resource record may be cached before it should be discarded. Zero values are interpreted to mean that the RR can only be used for the transaction in progress, and should not be cached.
- RDLENGTH an unsigned 16 bit integer that specifies the length in octets of the RDATA field.
- RDATA a variable length string of octets that describes the resource. The format of this information varies according to the TYPE and CLASS of the resource record. For example, the if the TYPE is A and the CLASS is IN, the RDATA field is a 4 octet ARPA Internet address.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler -
Field Summary
Fields inherited from class filius.software.clientserver.ClientAnwendung
socketFields inherited from class filius.software.Anwendung
betriebssystem, runningFields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringextractAddressForNameServer(List<ResourceRecord> rrList, String domain) protected List<ResourceRecord>extractRankedResourceRecordList(DNSNachricht antwort, String type, String domainname) protected List<ResourceRecord>extractResourceRecords(List<ResourceRecord> liste, String typ, String domainname) holeIPAdresse(String domainname) holeIPAdresse(String domainname, String dnsServer) Methode zur Aufloesung eines Domainnamens zu einer IP-Adresse.holeIPAdresseMailServer(String domainname) Resolve domain name (but not an IP address!)Methods inherited from class filius.software.clientserver.ClientAnwendung
beenden, istVerbundenMethods inherited from class filius.software.Anwendung
ausfuehren, benachrichtigeBeobachter, benachrichtigeBeobachter, getSystemSoftware, hinzuBeobachter, holeAnwendungsName, run, setAnwendungsName, setSystemSoftware, setzeAnwendungsName, startenMethods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
-
Constructor Details
-
Resolver
public Resolver()
-
-
Method Details
-
holeIPAdresse
- Throws:
TimeOutException
-
holeIPAdresse
Methode zur Aufloesung eines Domainnamens zu einer IP-Adresse.- Parameters:
domainname-- Returns:
- Throws:
TimeOutException
-
resolveA
Resolve domain name (but not an IP address!)- Throws:
TimeOutException
-
resolveA
- Throws:
TimeOutException
-
holeIPAdresseMailServer
- Throws:
TimeOutException
-
extractRankedResourceRecordList
protected List<ResourceRecord> extractRankedResourceRecordList(DNSNachricht antwort, String type, String domainname) -
resolveMX
- Throws:
TimeOutException
-
resolveMX
- Throws:
TimeOutException
-
resolve
public DNSNachricht resolve(String domainname, String type, String dnsServerAddress) throws TimeOutException - Throws:
TimeOutException
-
resolveNS
- Throws:
TimeOutException
-
extractAddressForNameServer
-
extractResourceRecords
protected List<ResourceRecord> extractResourceRecords(List<ResourceRecord> liste, String typ, String domainname)
-