summaryrefslogtreecommitdiff
path: root/structs.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2023-02-18 23:37:11 -0600
committerJeff Carr <[email protected]>2023-02-18 23:37:11 -0600
commit7ad38cdf6c3fdb7bc7f0c36ed2c1c63426a3b906 (patch)
tree5e4fc79919546fdd0ea34fd67be4001d504f446c /structs.go
parent3959b6c328fc335475f2e9df8aaabbc9a1ca7c43 (diff)
v0.0.2 next step: acutally try to nsupdate
upto the point where DNS update is next. start displaying real AAAA & naming buttons add RFC 2136 defining nsupdate. Vixie et al in 1997 Personal thansk to Paul for meeting with me some years back ready to pull DNS records starting a checkDNS() function dampen output. actually track IPs poll every 2 seconds (netlink is not the right thing here) ready to start looking for changes screw everything about logging. I hate log.whatthefuck*(){} Do you know what I don't care about? log() You shouldn't care either. Ignore it until you need it that is what logging is for. building something that works. So, here you go. a damn log() function in one place Also, because I'm annoyed today sleep() and exit() Because, when I want you to sleep or exit, I don't want to go to the top of a file and declare stupid shit related to nanoseconds or add "import os.Exit" or whatever the hell stop wasting my time. life is short. if he sit tunnelbroker down add IsRealIP() and IsIPv6() need a netlink function to trigger on changes (nope) put the gui plugin's in the debian package for now set the window title build a .deb package Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'structs.go')
-rw-r--r--structs.go35
1 files changed, 35 insertions, 0 deletions
diff --git a/structs.go b/structs.go
new file mode 100644
index 0000000..4300674
--- /dev/null
+++ b/structs.go
@@ -0,0 +1,35 @@
+// This creates a simple hello world window
+package main
+
+import (
+ "net"
+)
+
+// It's probably a terrible idea to call this 'me'
+var me Host
+
+type Host struct {
+ hostname string // mirrors
+ domainname string // kernel.org
+ fqdn string // mirrors.kernel.org
+ ipmap map[string]*IPtype // the current ip addresses
+ ifmap map[int]*IFtype // the current interfaces
+ ipchange bool // set to true if things change
+}
+
+type IPtype struct {
+ gone bool // used to track if the ip exists
+ ipv6 bool // the future
+ ipv4 bool // the past
+ LinkLocal bool
+ iface *net.Interface
+ ip net.IP
+ ipnet *net.IPNet
+}
+
+type IFtype struct {
+ gone bool // used to track if the interface exists
+ name string // just a shortcut to the name. maybe this is dumb
+ // up bool // could be used to track ifup/ifdown
+ iface *net.Interface
+}