summaryrefslogtreecommitdiff
path: root/lookupAAAA.go
blob: 8ae3f020b913e8d8ae2200f90362eaa3e2c53b4f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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)
}
*/