wintun

package
v0.0.0-...-897e99f Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Rendered for windows/amd64

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidAdapterHandle = errors.New("adapter handle is invalid")
	ErrInvalidSessionHandle = errors.New("session handle is invalid")
	ErrEmptyPacket          = errors.New("packet cannot be empty")
	ErrNoDataAvailable      = errors.New("No more data is available.")
	ErrFailedToReceive      = errors.New("failed to receive Wintun packet")
)

Functions

func UninstallWintun

func UninstallWintun()

Types

type WintunAdapter

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

func NewWintunAdapter

func NewWintunAdapter(name, tunnelType string) (*WintunAdapter, error)

func NewWintunAdapterWithGUID

func NewWintunAdapterWithGUID(name, tunnelType string, componentID swiftypes.GUID) (*WintunAdapter, error)

func (*WintunAdapter) Close

func (a *WintunAdapter) Close() error

func (*WintunAdapter) GetAdapterGUID

func (a *WintunAdapter) GetAdapterGUID() (swiftypes.GUID, error)

func (*WintunAdapter) GetAdapterIndex

func (a *WintunAdapter) GetAdapterIndex() (int, error)

func (*WintunAdapter) GetAdapterLUID

func (a *WintunAdapter) GetAdapterLUID() (swiftypes.LUID, error)

func (*WintunAdapter) GetAdapterName

func (a *WintunAdapter) GetAdapterName() (string, error)

func (*WintunAdapter) GetFD

func (a *WintunAdapter) GetFD() *os.File

func (*WintunAdapter) GetRunningDriverVersion

func (a *WintunAdapter) GetRunningDriverVersion() (string, error)

func (*WintunAdapter) StartSession

func (a *WintunAdapter) StartSession(capacity uint32) (*WintunSession, error)

type WintunSession

type WintunSession struct {
	*WintunAdapter
	// contains filtered or unexported fields
}

func (*WintunSession) Close

func (s *WintunSession) Close() error

func (*WintunSession) Read

func (s *WintunSession) Read(buf []byte) (int, error)

func (*WintunSession) ReadNow

func (s *WintunSession) ReadNow(buf []byte) (int, error)

func (*WintunSession) Write

func (s *WintunSession) Write(buf []byte) (int, error)

Jump to

Keyboard shortcuts

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