tun

package
v1.31.1 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2023 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package tun provides TUN which implemented device.Device interface.

Index

Constants

View Source
const Driver = "tun"

Variables

This section is empty.

Functions

func Open

func Open(name string, mtu uint32) (_ device.Device, err error)

Types

type TUN

type TUN struct {
	*iobased.Endpoint
	// contains filtered or unexported fields
}

func (*TUN) BatchSize

func (t *TUN) BatchSize() int

func (*TUN) Close

func (t *TUN) Close() error

func (*TUN) MTU

func (t *TUN) MTU() uint32

func (*TUN) Name

func (t *TUN) Name() string

func (*TUN) Offset

func (t *TUN) Offset() int

func (*TUN) Read

func (t *TUN) Read(buffs [][]byte, sizes []int, offset int) (n int, err error)

func (*TUN) Type

func (t *TUN) Type() string

func (*TUN) UseEndpoint

func (t *TUN) UseEndpoint() error

func (*TUN) UseIOBased

func (t *TUN) UseIOBased() error

func (*TUN) Write

func (t *TUN) Write(buffs [][]byte, offset int) (int, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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