MiniDNS / minidns

DNS library for Android and Java SE
Other
220 stars 61 forks source link

PTR lookup from IP need full name #58

Closed ppanero closed 7 years ago

ppanero commented 7 years ago

I could not find in the documentation (is there more appart from the README.md file?) how to make a PTR query work.

The following is not working, giving back a NX_DOMAIN:

ResolverApi.INSTANCE.resolve("172.217.0.174", classOf[PTR])

The following works but I had to manually construct the name to query. Is there a way to get that? if not, is an implementation for it in the roadmap?

ResolverApi.INSTANCE.resolve("174.0.217.172.in-addr.arpa", classOf[PTR])
Flowdalic commented 7 years ago

Good point. I think it may be sensible to add

ResolverResult<PTR> ResolverApi.reverseLookup(InetAddress);

as part of ResolverApi.