tun

package
v0.0.0-...-69b9976 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2024 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const MTU = 1300

Variables

This section is empty.

Functions

This section is empty.

Types

type NixTun

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

Currently, this is used for Mac/Linux Tunnels

func (*NixTun) Close

func (n *NixTun) Close() error

func (*NixTun) ConfigureIPAddress

func (n *NixTun) ConfigureIPAddress(addr netip.Prefix) error

func (*NixTun) MTU

func (n *NixTun) MTU() (int, error)

func (*NixTun) Name

func (n *NixTun) Name() string

func (*NixTun) Read

func (n *NixTun) Read(b []byte) (int, error)

func (*NixTun) Write

func (n *NixTun) Write(b []byte) (int, error)

type Tun

type Tun interface {
	Read(b []byte) (int, error)
	Write(b []byte) (int, error)

	Name() string
	Close() error
	MTU() (int, error)

	ConfigureIPAddress(addr netip.Prefix) error
}

func NewTun

func NewTun() (Tun, error)

Jump to

Keyboard shortcuts

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