network

package
v0.0.0-...-6af2dc9 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2021 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Device

type Device interface {
	io.Reader
	io.Writer

	Name() string
}

type LinuxTun

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

func (*LinuxTun) ConfigureDNS

func (n *LinuxTun) ConfigureDNS() (string, error)

func (*LinuxTun) GetIndex

func (n *LinuxTun) GetIndex(idx int) Device

func (*LinuxTun) GetNext

func (n *LinuxTun) GetNext() Device

func (*LinuxTun) GetRaws

func (n *LinuxTun) GetRaws() []Device

func (*LinuxTun) Name

func (n *LinuxTun) Name() string

func (*LinuxTun) SetIP

func (n *LinuxTun) SetIP(ip string)

func (*LinuxTun) Stop

func (n *LinuxTun) Stop() error

type NetworkInterface

type NetworkInterface interface {
	SetIP(ip string)
	GetRaws() []Device
	GetIndex(idx int) Device
	GetNext() Device
	ConfigureDNS() (string, error)
	Name() string
	Stop() error
}

func CreateTun

func CreateTun() NetworkInterface

Jump to

Keyboard shortcuts

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