overlay

package
v0.24.1 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2024 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultMTU = 1300

Variables

This section is empty.

Functions

This section is empty.

Types

type Device

type Device interface {
	io.ReadWriteCloser
	Activate() error
	Cidr() *net.IPNet
	Name() string
	RouteFor(iputil.VpnIp) iputil.VpnIp
	NewMultiQueueReader() (io.ReadWriteCloser, error)
}

func NewDeviceFromConfig

func NewDeviceFromConfig(c *config.C, l *logrus.Logger, tunCidr *net.IPNet, routines int) (Device, error)

func NewUserDevice

func NewUserDevice(tunCidr *net.IPNet) (Device, error)

func NewUserDeviceFromConfig

func NewUserDeviceFromConfig(c *config.C, l *logrus.Logger, tunCidr *net.IPNet, routines int) (Device, error)

type DeviceFactory

type DeviceFactory func(c *config.C, l *logrus.Logger, tunCidr *net.IPNet, routines int) (Device, error)

TODO: We may be able to remove routines

func NewFdDeviceFromConfig

func NewFdDeviceFromConfig(fd *int) DeviceFactory

type Route

type Route struct {
	MTU     int
	Metric  int
	Cidr    *net.IPNet
	Via     *iputil.VpnIp
	Install bool
}

func (Route) Equal

func (r Route) Equal(t Route) bool

Equal determines if a route that could be installed in the system route table is equal to another Via is ignored since that is only consumed within nebula itself

func (Route) String

func (r Route) String() string

type UserDevice

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

func (*UserDevice) Activate

func (d *UserDevice) Activate() error

func (*UserDevice) Cidr

func (d *UserDevice) Cidr() *net.IPNet

func (*UserDevice) Close

func (d *UserDevice) Close() error

func (*UserDevice) Name

func (d *UserDevice) Name() string

func (*UserDevice) NewMultiQueueReader

func (d *UserDevice) NewMultiQueueReader() (io.ReadWriteCloser, error)

func (*UserDevice) Pipe

func (d *UserDevice) Pipe() (*io.PipeReader, *io.PipeWriter)

func (*UserDevice) Read

func (d *UserDevice) Read(p []byte) (n int, err error)

func (*UserDevice) RouteFor

func (d *UserDevice) RouteFor(ip iputil.VpnIp) iputil.VpnIp

func (*UserDevice) Write

func (d *UserDevice) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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