sysnetops

package
v0.1.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Destroy

func Destroy(name string) error

Types

type LinkTun

type LinkTun struct {
	// contains filtered or unexported fields
}

func GetLinkTunByName

func GetLinkTunByName(name string) (*LinkTun, error)

func GetTunTaps

func GetTunTaps() ([]LinkTun, error)

func NewLinkTun

func NewLinkTun() (*LinkTun, error)

func (*LinkTun) AddLoopbackRoute

func (l *LinkTun) AddLoopbackRoute() error

add the next available network address to the interface routes from the range 240.0.0.0/4 and each time a new interface is created the address is increased by 1 (for example, 240.1.0.0/32)

func (*LinkTun) AddRoutes

func (l *LinkTun) AddRoutes(routes ...string) error

func (*LinkTun) Destroy

func (l *LinkTun) Destroy() error

func (*LinkTun) GetLoopbackRoute

func (l *LinkTun) GetLoopbackRoute() (string, error)

func (*LinkTun) Name

func (l *LinkTun) Name() string

func (*LinkTun) RemoveRoutes

func (l *LinkTun) RemoveRoutes(routes ...string) error

func (*LinkTun) Routes

func (l *LinkTun) Routes() ([]string, error)

func (*LinkTun) SetDown

func (l *LinkTun) SetDown() error

func (*LinkTun) SetMTU

func (l *LinkTun) SetMTU(mtu int) error

func (*LinkTun) SetUp

func (l *LinkTun) SetUp() error

func (*LinkTun) Status

func (l *LinkTun) Status() string

Jump to

Keyboard shortcuts

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