tun

package
v0.0.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultMTU uint32 = 1350

Functions

func AddTunRoutes

func AddTunRoutes(name string, routes []IPRoute) error

func SetTunAddress

func SetTunAddress(name string, addr string, mtu uint32) (err error)

Types

type IPRoute

type IPRoute struct {
	Dest    netip.Prefix
	Gateway netip.Addr
}

type TunConfig

type TunConfig struct {
	Name string
	Addr string
	MTU  uint32
}

Directories

Path Synopsis
device/iobased
Package iobased provides the implementation of io.ReadWriter based data-link layer endpoints.
Package iobased provides the implementation of io.ReadWriter based data-link layer endpoints.

Jump to

Keyboard shortcuts

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