swiftunnel

package module
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: 10 Imported by: 0

README

Swifttunnel

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NilConfig = Config{}

Functions

This section is empty.

Types

type Config

type Config struct {
	AdapterName string
	AdapterType swiftypes.AdapterType

	MTU           int
	UnicastConfig *swiftypes.UnicastConfig

	MultiQueue  bool
	Permissions *Permissions
	Persist     bool
}

func NewDefaultConfig

func NewDefaultConfig() Config

type Permissions

type Permissions struct {
	Owner uint
	Group uint
}

func NewPermissions

func NewPermissions(owner, group uint) *Permissions

type SwiftInterface

type SwiftInterface struct {
	io.ReadWriteCloser
	// contains filtered or unexported fields
}

func NewSwiftInterface

func NewSwiftInterface(config Config) (*SwiftInterface, error)

func (*SwiftInterface) AddRoute

func (a *SwiftInterface) AddRoute(route *netlink.Route) error

func (*SwiftInterface) GetAdapterIndex

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

func (*SwiftInterface) GetAdapterName

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

func (*SwiftInterface) GetFD

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

func (*SwiftInterface) SetDNS

func (a *SwiftInterface) SetDNS(config *swiftypes.DNSConfig) error

func (*SwiftInterface) SetMTU

func (a *SwiftInterface) SetMTU(mtu int) error

func (*SwiftInterface) SetStatus

func (a *SwiftInterface) SetStatus(status swiftypes.InterfaceStatus) error

func (*SwiftInterface) SetUnicastIpAddressEntry

func (a *SwiftInterface) SetUnicastIpAddressEntry(config *swiftypes.UnicastConfig) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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