Search in sources :

Example 26 with DNSName

use of org.minidns.dnsname.DNSName in project minidns by MiniDNS.

the class ResolverApi method reverseLookup.

public ResolverResult<PTR> reverseLookup(Inet6Address inet6Address) throws IOException {
    DNSName reversedIpAddress = InetAddressUtil.reverseIpAddressOf(inet6Address);
    DNSName dnsName = DNSName.from(reversedIpAddress, DNSName.IP6_ARPA);
    return resolve(dnsName, PTR.class);
}
Also used : DNSName(org.minidns.dnsname.DNSName)

Example 27 with DNSName

use of org.minidns.dnsname.DNSName in project minidns by MiniDNS.

the class NSEC method parse.

public static NSEC parse(DataInputStream dis, byte[] data, int length) throws IOException {
    DNSName next = DNSName.parse(dis, data);
    byte[] typeBitmap = new byte[length - next.size()];
    if (dis.read(typeBitmap) != typeBitmap.length)
        throw new IOException();
    TYPE[] types = readTypeBitMap(typeBitmap);
    return new NSEC(next, types);
}
Also used : IOException(java.io.IOException) DNSName(org.minidns.dnsname.DNSName) TYPE(org.minidns.record.Record.TYPE)

Aggregations

DNSName (org.minidns.dnsname.DNSName)22 Test (org.junit.Test)8 IOException (java.io.IOException)6 DnsName (org.minidns.dnsname.DnsName)5 InetAddress (java.net.InetAddress)4 ArrayList (java.util.ArrayList)4 Data (org.minidns.record.Data)4 Record (org.minidns.record.Record)4 LinkedList (java.util.LinkedList)3 DNSMessage (org.minidns.dnsmessage.DNSMessage)3 Question (org.minidns.dnsmessage.Question)3 TYPE (org.minidns.record.Record.TYPE)3 UInt16 (org.jivesoftware.smack.datatypes.UInt16)2 RemoteConnectionEndpointLookupFailure (org.jivesoftware.smack.util.rce.RemoteConnectionEndpointLookupFailure)2 InternetAddressRR (org.minidns.record.InternetAddressRR)2 SRV (org.minidns.record.SRV)2 ByteArrayOutputStream (java.io.ByteArrayOutputStream)1 DataOutputStream (java.io.DataOutputStream)1 Inet4Address (java.net.Inet4Address)1 Inet6Address (java.net.Inet6Address)1