This should now work at least for Darwin/FreeBSD/NetBSD/Solaris, and hopefully for any sane netstat output.
Created a new generic parser for output of netstat -rn
A major overhaul of gateway_test.go has been done to permit testing of interface discovery, by mocking calls to the net package using testify.
Moved all the nasty text blocks of netstat output into their own file which can be go generateed from a list of text files in route-tables directory using the script found in tools directory.
See evidence.md in notes directory for real output on BSD flavors available on AWS.
This should now work at least for Darwin/FreeBSD/NetBSD/Solaris, and hopefully for any sane
netstat
output.netstat -rn
gateway_test.go
has been done to permit testing of interface discovery, by mocking calls to thenet
package using testify.go generate
ed from a list of text files inroute-tables
directory using the script found intools
directory.See
evidence.md
innotes
directory for real output on BSD flavors available on AWS.