diff options
Diffstat (limited to 'lookupAAAA.go')
| -rw-r--r-- | lookupAAAA.go | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/lookupAAAA.go b/lookupAAAA.go new file mode 100644 index 0000000..8ae3f02 --- /dev/null +++ b/lookupAAAA.go @@ -0,0 +1,32 @@ +package main + +/* +import "log" +import "github.com/miekg/dns" + +import "git.wit.org/jcarr/dnssecsocket" + +import "github.com/davecgh/go-spew/spew" +// import "github.com/Showmax/go-fqdn" + +func lookupAAAA(hostname string) string { + // lookup the IP address from DNS + dnsRR := dnssecsocket.Dnstrace(hostname, "AAAA") + spew.Dump(dnsRR) + if (dnsRR == nil) { + return "BROKEN" + } + ipaddr := dns.Field(dnsRR, 1) + log.Println("ipaddr", ipaddr) + return ipaddr +} +*/ + +/* +func main() { + hostname := "check.lab.wit.org" + // 2604:bbc0:2:248:5054:f0ff:fe00:156 + + lookupAAAA(hostname) +} +*/ |
