A library for discovering the address of a LAN gateway.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.travis.yml Add travis config file. Jun 1, 2016
LICENSE
README.md
gateway_common.go support "ip route get" as fallback on linux systems Apr 7, 2018
gateway_darwin.go Refactor out parsing code, simplify execution, improve testing Jun 1, 2016
gateway_freebsd.go Refactor out parsing code, simplify execution, improve testing Jun 1, 2016
gateway_linux.go support "ip route get" as fallback on linux systems Apr 7, 2018
gateway_solaris.go Refactor out parsing code, simplify execution, improve testing Jun 1, 2016
gateway_test.go
gateway_unimplemented.go Support FreeBSD and Solaris by "netstat -rn" Jun 1, 2016
gateway_windows.go hide terminal pop up on windows Apr 7, 2018

README.md

gateway

A simple library for discovering the IP address of the default gateway.

Build Status

Provides implementations for:

  • FreeBSD
  • Linux
  • OS X (Darwin)
  • Solaris
  • Windows

Other platforms use an implementation that always returns an error.

Pull requests for other OSs happily considered!