Documentation
¶
Index ¶
- Constants
- type Device
- type DeviceFactory
- type Route
- type UserDevice
- func (d *UserDevice) Activate() error
- func (d *UserDevice) Close() error
- func (d *UserDevice) Name() string
- func (d *UserDevice) Networks() []netip.Prefix
- func (d *UserDevice) NewMultiQueueReader() (io.ReadWriteCloser, error)
- func (d *UserDevice) Pipe() (*io.PipeReader, *io.PipeWriter)
- func (d *UserDevice) Read(p []byte) (n int, err error)
- func (d *UserDevice) RoutesFor(ip netip.Addr) routing.Gateways
- func (d *UserDevice) Write(p []byte) (n int, err error)
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
Networks() []netip.Prefix
Name() string
RoutesFor(netip.Addr) routing.Gateways
NewMultiQueueReader() (io.ReadWriteCloser, error)
}
func NewDeviceFromConfig ¶
type DeviceFactory ¶
type DeviceFactory func(c *config.C, l *logrus.Logger, vpnNetworks []netip.Prefix, routines int) (Device, error)
TODO: We may be able to remove routines
func NewFdDeviceFromConfig ¶
func NewFdDeviceFromConfig(fd *int) DeviceFactory
type Route ¶
type UserDevice ¶
type UserDevice struct {
// contains filtered or unexported fields
}
func (*UserDevice) Activate ¶
func (d *UserDevice) Activate() error
func (*UserDevice) Close ¶
func (d *UserDevice) Close() error
func (*UserDevice) Name ¶
func (d *UserDevice) Name() string
func (*UserDevice) Networks ¶
func (d *UserDevice) Networks() []netip.Prefix
func (*UserDevice) NewMultiQueueReader ¶
func (d *UserDevice) NewMultiQueueReader() (io.ReadWriteCloser, error)
func (*UserDevice) Pipe ¶
func (d *UserDevice) Pipe() (*io.PipeReader, *io.PipeWriter)
Click to show internal directories.
Click to hide internal directories.