routeable

package
v1.9.16 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 4, 2021 License: Unlicense, ISC Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Address net.IP

Address is the network address that routes to the gateway and thus the internet

View Source
var Gateway net.IP

Gateway stores the current network default gateway as discovered by github.com/jackpal/gateway

View Source
var Interface *net.Interface

Interface is the net.Interface of the Address above

View Source
var SecondaryAddresses []net.IP

SecondaryAddresses are all the other addresses that can be reached from somewhere (including localhost) but not necessarily the internet

View Source
var SecondaryInterfaces []*net.Interface

SecondaryInterfaces is the interfaces of the SecondaryAddresses stored in the corresponding slice index

Functions

func Check

func Check(err error) bool

func Debug

func Debug(a ...interface{})

func Debugc

func Debugc(fn func() string)

func Debugf

func Debugf(format string, a ...interface{})

func Debugs

func Debugs(a interface{})

func Discover added in v1.9.16

func Discover() (err error)

Discover enumerates and evaluates all known network interfaces and addresses and filters it down to the ones that reach both a LAN and the internet

We are only interested in IPv4 addresses because for the most part, domestic ISPs do not issue their customers with IPv6 routing, it's still a pain in the ass outside of large data centre connections

func Error

func Error(a ...interface{})

func Errorc

func Errorc(fn func() string)

func Errorf

func Errorf(format string, a ...interface{})

func Errors

func Errors(a interface{})

func Fatal

func Fatal(a ...interface{})

func Fatalc

func Fatalc(fn func() string)

func Fatalf

func Fatalf(format string, a ...interface{})

func Fatals

func Fatals(a interface{})

func GetAddressesAndInterfaces added in v1.9.16

func GetAddressesAndInterfaces() (Interfaces []*net.Interface, Addresses map[string]struct{})

GetAddressesAndInterfaces returns all of the addresses and interfaces that would be resolved from an automatic addresses that can connect two processes at all

func GetAllInterfacesAndAddresses added in v1.9.16

func GetAllInterfacesAndAddresses() (interfaces []*net.Interface, udpAddrs []*net.UDPAddr)

func GetInterface

func GetInterface() (ifc *net.Interface, address string, err error)

GetInterface returns the address and interface of multicast-and-internet capable interfaces

func GetListenable added in v1.9.16

func GetListenable() net.IP

func Info

func Info(a ...interface{})

func Infoc

func Infoc(fn func() string)

func Infof

func Infof(format string, a ...interface{})

func Infos

func Infos(a interface{})

func Trace

func Trace(a ...interface{})

func Tracec

func Tracec(fn func() string)

func Tracef

func Tracef(format string, a ...interface{})

func Traces

func Traces(a interface{})

func Warn

func Warn(a ...interface{})

func Warnc

func Warnc(fn func() string)

func Warnf

func Warnf(format string, a ...interface{})

func Warns

func Warns(a interface{})

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL