netlink

package
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindProcessName

func FindProcessName(network string, ip net.IP, srcPort uint16, to net.IP, toPort uint16) (string, error)

func Route added in v0.3.4

func Route(opt *Options) error

Types

type Options added in v0.3.4

type Options struct {
	Endpoint     stack.LinkEndpoint
	Writer       Tun
	Interface    TunScheme
	Inet6Address []netip.Prefix
	Inet4Address []netip.Prefix
	Routes       []netip.Prefix
	MTU          int
}

func (*Options) V4Address added in v0.3.4

func (o *Options) V4Address() netip.Prefix

func (*Options) V6Address added in v0.3.4

func (o *Options) V6Address() netip.Prefix

type Tun added in v0.3.5

type Tun interface {
	Tun() wun.Device
	Write(bufs [][]byte) (int, error)
	Read(bufs [][]byte, sizes []int) (n int, err error)
	io.Closer
}

type TunScheme added in v0.3.4

type TunScheme struct {
	Fd     int
	Scheme string
	Name   string
}

func ParseTunScheme added in v0.3.4

func ParseTunScheme(str string) (TunScheme, error)

Jump to

Keyboard shortcuts

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