diff --git a/gui.go b/gui.go index 51cdca1..ce7e7b7 100644 --- a/gui.go +++ b/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() diff --git a/net.go b/net.go index b52d513..e24fe41 100644 --- a/net.go +++ b/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