tun

package module
v0.0.0-...-2e3ee8b Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NativeTun

type NativeTun struct {
	*os.File
	// contains filtered or unexported fields
}

func (*NativeTun) AddAddressCIDR

func (tun *NativeTun) AddAddressCIDR(cidrAddr string) error

FIXME: convert to netlink or something more native https://stackoverflow.com/a/49334944

func (*NativeTun) Index

func (tun *NativeTun) Index() (int, error)

func (*NativeTun) MTU

func (tun *NativeTun) MTU() (int, error)

func (*NativeTun) SetMTU

func (tun *NativeTun) SetMTU(mtu int) error

func (*NativeTun) SetUP

func (tun *NativeTun) SetUP() error

type TunDevice

type TunDevice interface {
	io.ReadWriteCloser
	MTU() (int, error)
	SetMTU(mtu int) error
	SetUP() error
	AddAddressCIDR(addrCIDR string) error
}

func CreateTun

func CreateTun(name string) (TunDevice, error)

Jump to

Keyboard shortcuts

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