Package org.dspace.statistics.util
Class DnsLookup
java.lang.Object
org.dspace.statistics.util.DnsLookup
XBill DNS resolver to retrieve host names for client IP addresses.
TODO: deal with IPv6 addresses.
- Author:
- kevinvandevelde at atmire.com, ben at atmire.com
-
Method Summary
-
Method Details
-
reverseDns
Resolve an IP address to a host name.- Parameters:
hostIp- dotted decimal IPv4 address.- Returns:
- name if resolved, or the address.
- Throws:
IOException- from infrastructure.
-
forward
Resolve a host name to an IPv4 address.- Parameters:
hostname- hostname to resolve to IP- Returns:
- IPv4 address
- Throws:
IOException- from infrastructure or no resolution.
-