Documentation
¶
Overview ¶
copied from https://github.com/coredns/coredns/blob/master/plugin/pkg/dnsutil/reverse.go
Index ¶
- Constants
- func ExtractAddressFromReverse(reverseName string) string
- func GetDomainByIP(ip net.IP) (string, bool)
- func IsReverse(name string) int
- func ResolveIP(domain string) ([]net.IP, error)
- func ResolveIPv4(domain string) ([]net.IP, error)
- func ResolveIPv6(domain string) ([]net.IP, error)
- type DNS
- type DNSServer
- type FakeIP
Constants ¶
View Source
const ( // IP4arpa is the reverse tree suffix for v4 IP addresses. IP4arpa = ".in-addr.arpa." // IP6arpa is the reverse tree suffix for v6 IP addresses. IP6arpa = ".ip6.arpa." )
Variables ¶
This section is empty.
Functions ¶
func ExtractAddressFromReverse ¶
ExtractAddressFromReverse turns a standard PTR reverse record name into an IP address. This works for ipv4 or ipv6.
54.119.58.176.in-addr.arpa. becomes 176.58.119.54. If the conversion fails the empty string is returned.
Types ¶
Click to show internal directories.
Click to hide internal directories.