summaryrefslogtreecommitdiff
path: root/dns.go
diff options
context:
space:
mode:
Diffstat (limited to 'dns.go')
-rw-r--r--dns.go51
1 files changed, 51 insertions, 0 deletions
diff --git a/dns.go b/dns.go
new file mode 100644
index 0000000..017ffce
--- /dev/null
+++ b/dns.go
@@ -0,0 +1,51 @@
+// Various Linux/Unix'y things
+
+// https://wiki.archlinux.org/title/Dynamic_DNS
+
+package main
+
+import (
+// "os"
+// "os/exec"
+ "log"
+ "net"
+// "git.wit.org/wit/gui"
+// "github.com/davecgh/go-spew/spew"
+)
+
+type IPtype struct {
+ // IP string
+ IPv4 bool
+ IPv6 bool
+ LinkLocal bool
+}
+
+type Host struct {
+ Name string
+ domainname string
+ hostname string
+ fqdn string
+ ips map[string]*IPtype
+}
+
+/*
+ Check a bunch of things. If they don't work right, then things are not correctly configured
+ They are things like:
+ /etc/hosts
+ hostname
+ hostname -f
+ domainname
+*/
+func (h *Host) verifyETC() bool {
+ return true
+}
+
+func (h *Host) updateIPs(host string) {
+ ips, err := net.LookupIP(host)
+ if err != nil {
+ log.Fatal(err)
+ }
+ for _, ip := range ips {
+ log.Println(host, ip)
+ }
+}