libif

package
v0.0.0-...-313d9de Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Down

func Down(iface *net.Interface) error

Down attempts to bring an interface down.

func InterfaceAddr

func InterfaceAddr(iface *net.Interface) (net.IP, error)

func SetIface

func SetIface(c Ifconfig) error

SetIface applies an interface configuration.

func Unconfigure

func Unconfigure(iface *net.Interface) error

Unconfigure removes the configuration of an interface.

func Up

func Up(iface *net.Interface) error

Up attemtps to bring an interface up.

Types

type Ifconfig

type Ifconfig struct {
	Interface     *net.Interface
	Router        net.IP
	IP            net.IP
	MTU           int
	DNS           []net.IP
	DomainName    string
	Netmask       net.IPMask
	LeaseDuration time.Duration
}

Jump to

Keyboard shortcuts

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