start displaying real AAAA & naming buttons
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
34c07f7f92
commit
eb554cfeb7
20
gui.go
20
gui.go
|
@ -61,16 +61,26 @@ func addDNSTab(window *gui.Node, title string) {
|
|||
s := tb.GetText()
|
||||
log("text =", s)
|
||||
}
|
||||
g2.NewButton("dump Host.ifmap", func () {
|
||||
g2.NewButton("Network Interfaces", func () {
|
||||
for i, t := range me.ifmap {
|
||||
log("name =", t.iface.Name)
|
||||
log("int =", i, "name =", t.name, t.iface)
|
||||
dd.AddDropdownName(t.iface.Name)
|
||||
}
|
||||
})
|
||||
g2.NewButton("Hostname", func () {
|
||||
getHostname()
|
||||
g.NewLabel("FQDN = " + me.fqdn)
|
||||
})
|
||||
g2.NewButton("Actual AAAA", func () {
|
||||
var aaaa []string
|
||||
aaaa = realAAAA()
|
||||
for _, s := range aaaa {
|
||||
g.NewLabel("my actual AAAA = " + s)
|
||||
}
|
||||
})
|
||||
g2.NewButton("checkDNS()", func () {
|
||||
me.checkDNS()
|
||||
})
|
||||
g2.NewButton("getHostname()", func () {
|
||||
getHostname()
|
||||
checkDNS()
|
||||
})
|
||||
g2.NewButton("os.User()", func () {
|
||||
user, _ := user.Current()
|
||||
|
|
13
net.go
13
net.go
|
@ -91,6 +91,19 @@ func checkInterface(i net.Interface) {
|
|||
}
|
||||
}
|
||||
|
||||
func realAAAA() []string {
|
||||
var aaaa []string
|
||||
|
||||
for s, t := range me.ipmap {
|
||||
if (t.IsReal()) {
|
||||
if (t.ipv6) {
|
||||
aaaa = append(aaaa, s)
|
||||
}
|
||||
}
|
||||
}
|
||||
return aaaa
|
||||
}
|
||||
|
||||
func checkDNS() (map[string]*IPtype, map[string]*IPtype) {
|
||||
var ipv4s map[string]*IPtype
|
||||
var ipv6s map[string]*IPtype
|
||||
|
|
Loading…
Reference in New Issue