gateway

package module
v0.0.0-...-d90e929 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2020 License: MIT Imports: 4 Imported by: 0

README

gateway

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

Features

  • System api implementation

support system

  • linux
  • windows
  • darwin
  • dragonfly freebsd netbsd openbsd (not tested)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DiscoverGateway

func DiscoverGateway() (*net.IP, error)

Types

type Interface

type Interface struct {
	Inte *net.Interface

	Gw net.IP

	Metric int
}

func DiscoverInterface

func DiscoverInterface() (*Interface, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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