netlink

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SIOCAIFADDR_IN6       = 2155899162 // netinet6/in6_var.h
	IN6_IFF_NODAD         = 0x0020     // netinet6/in6_var.h
	IN6_IFF_SECURED       = 0x0400     // netinet6/in6_var.h
	ND6_INFINITE_LIFETIME = 0xFFFFFFFF // netinet6/nd6.h
)

Variables

This section is empty.

Functions

func FindProcessName

func FindProcessName(network string, ip net.IP, port uint16, _ net.IP, _ uint16) (string, error)

func Route added in v0.3.4

func Route(options *Options) error

Types

type Options added in v0.3.4

type Options struct {
	Endpoint     stack.LinkEndpoint
	Writer       io.ReadWriteCloser
	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 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