gateway icon indicating copy to clipboard operation
gateway copied to clipboard

A golang library for discovering the address of a LAN gateway.

Results 6 gateway issues
Sort by recently updated
recently updated
newest added

Here's some improvements to the /proc/net/route parsing on Linux.

My full example. Feel free to implement in your package. ``` package main import ( "net" "fmt" "errors" "syscall" "golang.org/x/net/route" ) var ( errNoGateway = errors.New("No gateway") ) func GetGateway()...

Just sharing my implementation incase you feel to incorporate it someday (IPv4 only though). Feel free to copy it and modify it in any shape or form, you can ignore...

Otherwise there's the potential that the PATH does not include the directory where the executable lives, or that the PATH is set so that some other executable with the same...